Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;;
68 ;;; This file is part of GNU Guix.
69 ;;;
70 ;;; GNU Guix is free software; you can redistribute it and/or modify it
71 ;;; under the terms of the GNU General Public License as published by
72 ;;; the Free Software Foundation; either version 3 of the License, or (at
73 ;;; your option) any later version.
74 ;;;
75 ;;; GNU Guix is distributed in the hope that it will be useful, but
76 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 ;;; GNU General Public License for more details.
79 ;;;
80 ;;; You should have received a copy of the GNU General Public License
81 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83 (define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
95 #:use-module (gnu packages dbm)
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
116 #:use-module (gnu packages monitoring)
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
125 #:use-module (gnu packages python-check)
126 #:use-module (gnu packages python-compression)
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
134 #:use-module (gnu packages sphinx)
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
150 #:use-module (gnu packages serialization)
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
154 #:use-module (guix hg-download)
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163 (define-public python-psutil
164 (package
165 (name "python-psutil")
166 (version "5.6.2")
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182 information on running processes and system utilization (CPU, memory, disks,
183 network) in Python. It is useful mainly for system monitoring, profiling and
184 limiting process resources and management of running processes. It implements
185 many functionalities offered by command line tools such as: ps, top, lsof,
186 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187 pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191 (define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199 (define-public python-shapely
200 (package
201 (name "python-shapely")
202 (version "1.6.4.post2")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239 planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
242 (define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261 module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
264 (define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288 and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291 (define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294 (define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314 (define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317 (define-public python-babel
318 (package
319 (name "python-babel")
320 (version "2.7.0")
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
337 (lambda _
338 (invoke "pytest" "-vv" "-k"
339 (string-append
340 ;; XXX: These tests fail when using Pytest 4.x and
341 ;; Babel 2.6.0. Try removing this for later versions.
342 "not test_no_inherit_metazone_marker_never_in_output"
343 " and not test_smoke_dates"
344 " and not test_smoke_numbers")))))))
345 (home-page "http://babel.pocoo.org/")
346 (synopsis
347 "Tools for internationalizing Python applications")
348 (description
349 "Babel is composed of two major parts:
350 - tools to build and work with gettext message catalogs
351 - a Python interface to the CLDR (Common Locale Data Repository), providing
352 access to various locale display names, localized number and date formatting,
353 etc. ")
354 (license license:bsd-3)))
355
356 (define-public python2-babel
357 (package-with-python2 python-babel))
358
359 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
360 (define-public python2-babel-2.6
361 (package
362 (inherit python2-babel)
363 (version "2.6.0")
364 (source (origin
365 (method url-fetch)
366 (uri (pypi-uri "Babel" version))
367 (sha256
368 (base32
369 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
370
371 (define-public python2-backport-ssl-match-hostname
372 (package
373 (name "python2-backport-ssl-match-hostname")
374 (version "3.5.0.1")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (pypi-uri "backports.ssl_match_hostname" version))
379 (sha256
380 (base32
381 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
382 (build-system python-build-system)
383 (arguments
384 `(#:python ,python-2
385 #:tests? #f)) ; no test target
386 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
387 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
388 (description
389 "This backport brings the ssl.match_hostname() function to users of
390 earlier versions of Python. The function checks the hostname in the
391 certificate returned by the server to which a connection has been established,
392 and verifies that it matches the intended target hostname.")
393 (license license:psfl)))
394
395 (define-public python-hdf4
396 (package
397 (name "python-hdf4")
398 (version "0.9")
399 (source
400 (origin
401 (method url-fetch)
402 (uri (pypi-uri name version))
403 (sha256
404 (base32
405 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
406 (build-system python-build-system)
407 (native-inputs `(("nose" ,python-nose)))
408 (propagated-inputs `(("numpy" ,python-numpy)))
409 (inputs
410 `(("hdf4" ,hdf4)
411 ("libjpeg" ,libjpeg)
412 ("zlib" ,zlib)))
413 (arguments
414 `(#:phases
415 (modify-phases %standard-phases
416 (replace 'check
417 (lambda _
418 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
419 ;; on to import numpy. Somehow this works on their CI system.
420 ;; Let's just manage PYTHONPATH here instead.
421 (substitute* "runexamples.sh"
422 (("export PYTHONPATH=.*") ""))
423 (setenv "PYTHONPATH"
424 (string-append (getcwd) ":"
425 (getenv "PYTHONPATH")))
426 (invoke "./runexamples.sh")
427 (invoke "nosetests" "-v"))))))
428 (home-page "https://github.com/fhs/python-hdf4")
429 (synopsis "Python interface to the NCSA HDF4 library")
430 (description
431 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
432 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
433 NetCDF files can also be read and modified. Python-HDF4 is a fork of
434 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
435 (license license:expat)))
436
437 (define-public python2-hdf4
438 (package-with-python2 python-hdf4))
439
440 (define-public python-h5py
441 (package
442 (name "python-h5py")
443 (version "2.8.0")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "h5py" version))
448 (sha256
449 (base32
450 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
451 (build-system python-build-system)
452 (arguments
453 `(#:tests? #f ; no test target
454 #:phases
455 (modify-phases %standard-phases
456 (add-after 'unpack 'fix-hdf5-paths
457 (lambda* (#:key inputs #:allow-other-keys)
458 (let ((prefix (assoc-ref inputs "hdf5")))
459 (substitute* "setup_build.py"
460 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
461 (string-append "['" prefix "/lib" "']"))
462 (("'/opt/local/include', '/usr/local/include'")
463 (string-append "'" prefix "/include" "'")))
464 (substitute* "setup_configure.py"
465 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
466 (string-append "['" prefix "/lib" "']")))
467 #t))))))
468 (propagated-inputs
469 `(("python-six" ,python-six)
470 ("python-numpy" ,python-numpy)))
471 (inputs
472 `(("hdf5" ,hdf5)))
473 (native-inputs
474 `(("python-cython" ,python-cython)
475 ("python-pkgconfig" ,python-pkgconfig)))
476 (home-page "http://www.h5py.org/")
477 (synopsis "Read and write HDF5 files from Python")
478 (description
479 "The h5py package provides both a high- and low-level interface to the
480 HDF5 library from Python. The low-level interface is intended to be a
481 complete wrapping of the HDF5 API, while the high-level component supports
482 access to HDF5 files, datasets and groups using established Python and NumPy
483 concepts.")
484 (license license:bsd-3)))
485
486 (define-public python2-h5py
487 (package-with-python2 python-h5py))
488
489 (define-public python-sh
490 (package
491 (name "python-sh")
492 (version "1.12.14")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "sh" version))
497 (sha256
498 (base32
499 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
500 (build-system python-build-system)
501 (arguments
502 '(#:phases
503 (modify-phases %standard-phases
504 (replace 'check
505 (lambda _
506 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
507 (setenv "HOME" "/tmp")
508 (invoke "python" "sh.py" "test"))))))
509 (native-inputs
510 `(("python-coverage" ,python-coverage)))
511 (home-page "https://github.com/amoffat/sh")
512 (synopsis "Python subprocess replacement")
513 (description "This package provides a replacement for Python's
514 @code{subprocess} feature.")
515 (license license:expat)))
516
517 (define-public python2-sh
518 (package-with-python2 python-sh))
519
520 (define-public python-cftime
521 (package
522 (name "python-cftime")
523 (version "1.0.3.4")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "cftime" version))
528 (sha256
529 (base32
530 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
531 (build-system python-build-system)
532 (propagated-inputs
533 `(("python-numpy" ,python-numpy)))
534 (native-inputs
535 `(("python-coveralls" ,python-coveralls)
536 ("python-cython" ,python-cython)
537 ("python-pytest-cov" ,python-pytest-cov)))
538 (home-page "https://github.com/Unidata/cftime")
539 (synopsis "Library for time handling")
540 (description
541 "This package provides time-handling functionality that used to be part
542 of the netcdf4 package before.")
543 ;; This package claims to include code under the GPLv3 but is released
544 ;; under ISC.
545 (license (list license:isc license:gpl3+))))
546
547 (define-public python-netcdf4
548 (package
549 (name "python-netcdf4")
550 (version "1.4.2")
551 (source
552 (origin
553 (method url-fetch)
554 (uri (pypi-uri "netCDF4" version))
555 (sha256
556 (base32
557 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
558 (build-system python-build-system)
559 (arguments
560 '(#:phases
561 (modify-phases %standard-phases
562 (add-after 'unpack 'configure-locations
563 (lambda* (#:key inputs #:allow-other-keys)
564 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
565 #t)))))
566 (native-inputs
567 `(("python-cython" ,python-cython)))
568 (propagated-inputs
569 `(("python-numpy" ,python-numpy)
570 ("python-cftime" ,python-cftime)))
571 (inputs
572 `(("netcdf" ,netcdf)
573 ("hdf4" ,hdf4)
574 ("hdf5" ,hdf5)))
575 (home-page "https://github.com/Unidata/netcdf4-python")
576 (synopsis "Python/numpy interface to the netCDF library")
577 (description "Netcdf4-python is a Python interface to the netCDF C
578 library. netCDF version 4 has many features not found in earlier
579 versions of the library and is implemented on top of HDF5. This module
580 can read and write files in both the new netCDF 4 and the old netCDF 3
581 format, and can create files that are readable by HDF5 clients. The
582 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
583 to users of that module.")
584 ;; The software is mainly ISC, but includes some files covered
585 ;; by the Expat license.
586 (license (list license:isc license:expat))))
587
588 (define-public python2-netcdf4
589 (package-with-python2 python-netcdf4))
590
591 (define-public python-lockfile
592 (package
593 (name "python-lockfile")
594 (version "0.12.2")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "lockfile" version))
599 (sha256
600 (base32
601 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
602 (build-system python-build-system)
603 (arguments '(#:test-target "check"))
604 (native-inputs
605 `(("python-pbr" ,python-pbr)))
606 (home-page "https://launchpad.net/pylockfile")
607 (synopsis "Platform-independent file locking module")
608 (description
609 "The lockfile package exports a LockFile class which provides a simple
610 API for locking files.")
611 (license license:expat)))
612
613 (define-public python2-lockfile
614 (package-with-python2 python-lockfile))
615
616 (define-public python-semantic-version
617 (package
618 (name "python-semantic-version")
619 (version "2.6.0")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (pypi-uri "semantic_version" version))
624 (sha256
625 (base32
626 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
627 (build-system python-build-system)
628 (arguments
629 `(#:tests? #f)) ; PyPI tarball lacks tests
630 (home-page "https://github.com/rbarrois/python-semanticversion")
631 (synopsis "Semantic versioning module for Python")
632 (description
633 "The @code{semantic_version} class is a small library for handling
634 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
635
636 It can compare versions, generate a new version that represents a bump in one of
637 the version levels, and check whether any given string is a proper semantic
638 version identifier.")
639 (license license:bsd-3)))
640
641 (define-public python2-semantic-version
642 (package-with-python2 python-semantic-version))
643
644 (define-public python-serpent
645 (package
646 (name "python-serpent")
647 (version "1.28")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "serpent" version))
652 (sha256
653 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
654 (build-system python-build-system)
655 (native-inputs
656 `(("python-attrs" ,python-attrs)
657 ("python-pytz" ,python-pytz)))
658 (home-page "https://github.com/irmen/Serpent")
659 (synopsis "Serializer for literal Python expressions")
660 (description
661 "Serpent provides @code{ast.literal_eval()}-compatible object tree
662 serialization. It serializes an object tree into bytes (an utf-8 encoded
663 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
664 to rebuild the original object tree.
665
666 Because only safe literals are encoded, it is safe to send serpent data to
667 other machines, such as over the network.")
668 (license license:expat)))
669
670 (define-public python-setuptools
671 (package
672 (name "python-setuptools")
673 (version "41.0.1")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "setuptools" version ".zip"))
678 (sha256
679 (base32
680 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
681 (modules '((guix build utils)))
682 (snippet
683 '(begin
684 ;; Remove included binaries which are used to build self-extracting
685 ;; installers for Windows.
686 ;; TODO: Find some way to build them ourself so we can include them.
687 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
688 #t))))
689 (build-system python-build-system)
690 ;; FIXME: Tests require pytest, which itself relies on setuptools.
691 ;; One could bootstrap with an internal untested setuptools.
692 (arguments
693 `(#:tests? #f))
694 (home-page "https://pypi.python.org/pypi/setuptools")
695 (synopsis
696 "Library designed to facilitate packaging Python projects")
697 (description
698 "Setuptools is a fully-featured, stable library designed to facilitate
699 packaging Python projects, where packaging includes:
700 Python package and module definitions,
701 distribution package metadata,
702 test hooks,
703 project installation,
704 platform-specific details,
705 Python 3 support.")
706 ;; TODO: setuptools now bundles the following libraries:
707 ;; packaging, pyparsing, six and appdirs. How to unbundle?
708 (license (list license:psfl ; setuptools itself
709 license:expat ; six, appdirs, pyparsing
710 license:asl2.0 ; packaging is dual ASL2/BSD-2
711 license:bsd-2))))
712
713 (define-public python2-setuptools
714 (package-with-python2 python-setuptools))
715
716 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
717 (define-public python-setuptools-for-tensorflow
718 (hidden-package
719 (package
720 (inherit python-setuptools)
721 (version "39.1.0")
722 (source (origin
723 (inherit (package-source python-setuptools))
724 (uri (pypi-uri "setuptools" version ".zip"))
725 (sha256
726 (base32
727 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
728
729 (define-public python-uniseg
730 (package
731 (name "python-uniseg")
732 (version "0.7.1")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (pypi-uri "uniseg" version ".zip"))
737 (sha256
738 (base32
739 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
740 (build-system python-build-system)
741 (arguments
742 '(#:tests? #f)) ; The test suite requires network access.
743 (native-inputs
744 `(("unzip" ,unzip)))
745 (home-page
746 "https://bitbucket.org/emptypage/uniseg-python")
747 (synopsis
748 "Python library to determine Unicode text segmentations")
749 (description
750 "Uniseg is a Python package used to determine Unicode text segmentations.
751 Supported segmentations include:
752 @enumerate
753 @item @dfn{Code point} (any value in the Unicode codespace)
754 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
755 multiple Unicode code points, e.g. \"G\" + acute-accent)
756 @item Word break
757 @item Sentence break
758 @item Line break
759 @end enumerate")
760 (license license:expat)))
761
762 (define-public python2-uniseg
763 (package-with-python2 python-uniseg))
764
765 (define-public python-humanfriendly
766 (package
767 (name "python-humanfriendly")
768 (version "4.4.1")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (pypi-uri "humanfriendly" version))
773 (sha256
774 (base32
775 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
776 (build-system python-build-system)
777 (arguments
778 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
779 #:tests? #f))
780 (propagated-inputs
781 `(("python-monotonic" ,python-monotonic)))
782 (home-page "https://humanfriendly.readthedocs.io")
783 (synopsis "Human-friendly input and output in Python")
784 (description
785 "The functions and classes in @code{humanfriendly} can be used to make
786 text interfaces more user-friendly. It includes tools to parse and format
787 numbers, file sizes, and timespans, timers for long-running operations, menus
788 to allow the user to choose from a list of options, and terminal interaction
789 helpers.")
790 (license license:expat)))
791
792 (define-public python2-humanfriendly
793 (package-with-python2 python-humanfriendly))
794
795 (define-public python-capturer
796 (package
797 (name "python-capturer")
798 (version "2.4")
799 (source
800 (origin
801 (method url-fetch)
802 (uri (pypi-uri "capturer" version))
803 (sha256
804 (base32
805 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
806 (build-system python-build-system)
807 (arguments
808 `(#:tests? #f))
809 (propagated-inputs
810 `(("python-humanfriendly" ,python-humanfriendly)))
811 (home-page "https://capturer.readthedocs.io")
812 (synopsis "Capture stdout and stderr streams of the current process")
813 (description
814 "The capturer package makes it easy to capture the stdout and stderr
815 streams of the current process and subprocesses. Output can be relayed
816 to the terminal in real time but is also available to the Python program
817 for additional processing.")
818 (license license:expat)))
819
820 (define-public python2-capturer
821 (package-with-python2 python-capturer))
822
823 (define-public python-case
824 (package
825 (name "python-case")
826 (version "1.5.3")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "case" version))
831 (sha256
832 (base32
833 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
834 (build-system python-build-system)
835 (propagated-inputs
836 `(("python-mock" ,python-mock)
837 ("python-nose" ,python-nose)
838 ("python-six" ,python-six)
839 ("python-unittest2" ,python-unittest2)))
840 (native-inputs
841 `(("python-coverage" ,python-coverage)))
842 (home-page "https://github.com/celery/case")
843 (synopsis "Unittest utilities and convenience methods")
844 (description
845 "The @code{case} package provides utilities on top of unittest, including
846 some helpful Python 2 compatibility convenience methods.")
847 (license license:bsd-3)))
848
849 (define-public python-verboselogs
850 (package
851 (name "python-verboselogs")
852 (version "1.7")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "verboselogs" version))
857 (sha256
858 (base32
859 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
860 (build-system python-build-system)
861 (native-inputs
862 `(("python-mock" ,python-mock)
863 ("python-astroid" ,python-astroid)
864 ("python-pylint" ,python-pylint)))
865 (home-page "https://verboselogs.readthedocs.io")
866 (synopsis "Verbose logging level for Python's logging module")
867 (description
868 "The @code{verboselogs} package extends Python's @code{logging} module to
869 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
870 (license license:expat)))
871
872 (define-public python2-verboselogs
873 (package-with-python2 python-verboselogs))
874
875 (define-public python-coloredlogs
876 (package
877 (name "python-coloredlogs")
878 (version "7.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "coloredlogs" version))
883 (sha256
884 (base32
885 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
886 (build-system python-build-system)
887 (arguments
888 `(;Tests require some updated modules
889 #:tests? #f))
890 (propagated-inputs
891 `(("python-capturer" ,python-capturer)))
892 (home-page "https://coloredlogs.readthedocs.io")
893 (synopsis "Colored stream handler for Python's logging module")
894 (description
895 "The @code{coloredlogs} package enables colored terminal output for
896 Python's logging module. The @code{ColoredFormatter} class inherits from
897 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
898 messages in color.")
899 (license license:expat)))
900
901 (define-public python2-coloredlogs
902 (package-with-python2 python-coloredlogs))
903
904 (define-public python-et-xmlfile
905 (package
906 (name "python-et-xmlfile")
907 (version "1.0.1")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "et_xmlfile" version))
912 (sha256
913 (base32
914 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
915 (build-system python-build-system)
916 (arguments
917 `(#:phases (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 (invoke "pytest"))))))
921 (native-inputs
922 `(("python-pytest" ,python-pytest)
923 ("python-lxml" ,python-lxml))) ;used for the tests
924 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
925 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
926 (description "This Python library is based upon the @code{xmlfile} module
927 from @code{lxml}. It aims to provide a low memory, compatible implementation
928 of @code{xmlfile}.")
929 (license license:expat)))
930
931 (define-public python2-et-xmlfile
932 (package-with-python2 python-et-xmlfile))
933
934 (define-public python-openpyxl
935 (package
936 (name "python-openpyxl")
937 (version "2.6.2")
938 (source
939 (origin
940 ;; We use the upstream repository, as the tests are not included in the
941 ;; PyPI releases.
942 (method hg-fetch)
943 (uri (hg-reference
944 (url "https://bitbucket.org/openpyxl/openpyxl")
945 (changeset version)))
946 (file-name (string-append name "-" version "-checkout"))
947 (sha256
948 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
949 (build-system python-build-system)
950 (arguments
951 `(#:phases (modify-phases %standard-phases
952 (replace 'check
953 (lambda _
954 (invoke "pytest"))))))
955 (native-inputs
956 ;; For the test suite.
957 `(("python-lxml" ,python-lxml)
958 ("python-pillow" ,python-pillow)
959 ("python-pytest" ,python-pytest)))
960 (propagated-inputs
961 `(("python-et-xmlfile" ,python-et-xmlfile)
962 ("python-jdcal" ,python-jdcal)))
963 (home-page "https://openpyxl.readthedocs.io")
964 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
965 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
966 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
967 standard.")
968 (license license:expat)))
969
970 (define-public python-eventlet
971 (package
972 (name "python-eventlet")
973 (version "0.20.1")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "eventlet" version))
978 (sha256
979 (base32
980 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
981 (build-system python-build-system)
982 (propagated-inputs
983 `(("python-greenlet" ,python-greenlet)))
984 (arguments
985 ;; TODO: Requires unpackaged 'enum-compat'.
986 '(#:tests? #f))
987 (home-page "http://eventlet.net")
988 (synopsis "Concurrent networking library for Python")
989 (description
990 "Eventlet is a concurrent networking library for Python that
991 allows you to change how you run your code, not how you write it.
992 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
993 Coroutines ensure that the developer uses a blocking style of programming
994 that is similar to threading, but provide the benefits of non-blocking I/O.
995 The event dispatch is implicit, which means you can easily use @code{Eventlet}
996 from the Python interpreter, or as a small part of a larger application.")
997 (license license:expat)))
998
999 (define-public python2-eventlet
1000 (let ((base (package-with-python2
1001 (strip-python2-variant python-eventlet))))
1002 (package (inherit base)
1003 (propagated-inputs
1004 `(("python2-enum34" ,python2-enum34)
1005 ,@(package-propagated-inputs base))))))
1006
1007 (define-public python-six
1008 (package
1009 (name "python-six")
1010 (version "1.12.0")
1011 (source
1012 (origin
1013 (method url-fetch)
1014 (uri (pypi-uri "six" version))
1015 (sha256
1016 (base32
1017 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1018 (build-system python-build-system)
1019 (arguments
1020 `(#:phases
1021 (modify-phases %standard-phases
1022 (replace 'check
1023 (lambda _
1024 (invoke "py.test" "-v"))))))
1025 (native-inputs
1026 `(("python-py" ,python-py)
1027 ("python-pytest" ,python-pytest-bootstrap)))
1028 (home-page "https://pypi.python.org/pypi/six/")
1029 (synopsis "Python 2 and 3 compatibility utilities")
1030 (description
1031 "Six is a Python 2 and 3 compatibility library. It provides utility
1032 functions for smoothing over the differences between the Python versions with
1033 the goal of writing Python code that is compatible on both Python versions.
1034 Six supports every Python version since 2.5. It is contained in only one
1035 Python file, so it can be easily copied into your project.")
1036 (license license:x11)))
1037
1038 (define-public python2-six
1039 (package-with-python2 python-six))
1040
1041 (define-public python-six-bootstrap
1042 (package
1043 (inherit python-six)
1044 (name "python-six-bootstrap")
1045 (native-inputs `())
1046 (arguments `(#:tests? #f))))
1047
1048 (define-public python2-six-bootstrap
1049 (package-with-python2 python-six-bootstrap))
1050
1051 (define-public python-schedule
1052 (package
1053 (name "python-schedule")
1054 (version "0.4.3")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "schedule" version))
1059 (sha256
1060 (base32
1061 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1062 (build-system python-build-system)
1063 (native-inputs
1064 `(("python-pytest" ,python-pytest)
1065 ("python-mock" ,python-mock)))
1066 (home-page "https://github.com/dbader/schedule")
1067 (synopsis "Schedule periodic function calls in Python")
1068 (description
1069 "Schedule is an in-process scheduler for periodic jobs that uses the
1070 builder pattern for configuration. Schedule lets you run Python functions (or
1071 any other callable) periodically at pre-determined intervals using a simple,
1072 human-friendly syntax.")
1073 (license license:expat)))
1074
1075 (define-public python2-schedule
1076 (package-with-python2 python-schedule))
1077
1078 (define-public python-pandas
1079 (package
1080 (name "python-pandas")
1081 (version "0.24.2")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "pandas" version))
1086 (sha256
1087 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1088 (build-system python-build-system)
1089 (arguments
1090 `(#:modules ((guix build utils)
1091 (guix build python-build-system)
1092 (ice-9 ftw)
1093 (srfi srfi-26))
1094 #:phases (modify-phases %standard-phases
1095 (add-after 'unpack 'patch-which
1096 (lambda* (#:key inputs #:allow-other-keys)
1097 (let ((which (assoc-ref inputs "which")))
1098 (substitute* "pandas/io/clipboard/__init__.py"
1099 (("^CHECK_CMD = .*")
1100 (string-append "CHECK_CMD = \"" which "\"\n"))))
1101 #t))
1102 (replace 'check
1103 (lambda _
1104 (let ((build-directory
1105 (string-append
1106 (getcwd) "/build/"
1107 (car (scandir "build"
1108 (cut string-prefix? "lib." <>))))))
1109 ;; Disable the "strict data files" option which causes
1110 ;; the build to error out if required data files are
1111 ;; not available (as is the case with PyPI archives).
1112 (substitute* "setup.cfg"
1113 (("addopts = --strict-data-files") "addopts = "))
1114 (with-directory-excursion build-directory
1115 ;; Delete tests that require "moto" which is not yet
1116 ;; in Guix.
1117 (for-each delete-file
1118 '("pandas/tests/io/conftest.py"
1119 "pandas/tests/io/json/test_compression.py"
1120 "pandas/tests/io/parser/test_network.py"
1121 "pandas/tests/io/test_parquet.py"))
1122 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1123 "--skip-network" "-k"
1124 ;; XXX: Due to the deleted tests above.
1125 "not test_read_s3_jsonl"))))))))
1126 (propagated-inputs
1127 `(("python-numpy" ,python-numpy)
1128 ("python-openpyxl" ,python-openpyxl)
1129 ("python-pytz" ,python-pytz)
1130 ("python-dateutil" ,python-dateutil)
1131 ("python-xlrd" ,python-xlrd)))
1132 (inputs
1133 `(("which" ,which)))
1134 (native-inputs
1135 `(("python-cython" ,python-cython)
1136 ("python-beautifulsoup4" ,python-beautifulsoup4)
1137 ("python-lxml" ,python-lxml)
1138 ("python-html5lib" ,python-html5lib)
1139 ("python-nose" ,python-nose)
1140 ("python-pytest" ,python-pytest)
1141 ("python-pytest-mock" ,python-pytest-mock)))
1142 (home-page "https://pandas.pydata.org")
1143 (synopsis "Data structures for data analysis, time series, and statistics")
1144 (description
1145 "Pandas is a Python package providing fast, flexible, and expressive data
1146 structures designed to make working with structured (tabular,
1147 multidimensional, potentially heterogeneous) and time series data both easy
1148 and intuitive. It aims to be the fundamental high-level building block for
1149 doing practical, real world data analysis in Python.")
1150 (license license:bsd-3)))
1151
1152 (define-public python2-pandas
1153 (package-with-python2 python-pandas))
1154
1155 (define-public python2-mechanize
1156 (package
1157 (name "python2-mechanize")
1158 (version "0.2.5")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (pypi-uri "mechanize" version))
1163 (sha256
1164 (base32
1165 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1166 (build-system python-build-system)
1167 (arguments
1168 `(#:python ,python-2 ; apparently incompatible with Python 3
1169 #:tests? #f))
1170 ;; test fails with message
1171 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1172 ;; (python-3.3.2) or
1173 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1174 ;; (python-2.7.5).
1175 ;; The source code is from March 2011 and probably not up-to-date
1176 ;; with respect to python unit tests.
1177 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1178 (synopsis
1179 "Stateful programmatic web browsing in Python")
1180 (description
1181 "Mechanize implements stateful programmatic web browsing in Python,
1182 after Andy Lester’s Perl module WWW::Mechanize.")
1183 (license (license:non-copyleft
1184 "file://COPYING"
1185 "See COPYING in the distribution."))))
1186
1187
1188 (define-public python-simplejson
1189 (package
1190 (name "python-simplejson")
1191 (version "3.14.0")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "simplejson" version))
1196 (sha256
1197 (base32
1198 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1199 (build-system python-build-system)
1200 (home-page "http://simplejson.readthedocs.org/en/latest/")
1201 (synopsis
1202 "Json library for Python")
1203 (description
1204 "JSON (JavaScript Object Notation) is a subset of JavaScript
1205 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1206 format.
1207
1208 Simplejson exposes an API familiar to users of the standard library marshal
1209 and pickle modules. It is the externally maintained version of the json
1210 library contained in Python 2.6, but maintains compatibility with Python 2.5
1211 and (currently) has significant performance advantages, even without using
1212 the optional C extension for speedups. Simplejson is also supported on
1213 Python 3.3+.")
1214 (license license:x11)))
1215
1216 (define-public python2-simplejson
1217 (package-with-python2 python-simplejson))
1218
1219
1220 (define-public python-pyicu
1221 (package
1222 (name "python-pyicu")
1223 (version "2.3.1")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (pypi-uri "PyICU" version))
1228 (sha256
1229 (base32
1230 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1231 (build-system python-build-system)
1232 (inputs
1233 `(("icu4c" ,icu4c)))
1234 (native-inputs
1235 `(("python-pytest" ,python-pytest)
1236 ("python-six" ,python-six)))
1237 (home-page "https://github.com/ovalhub/pyicu")
1238 (synopsis "Python extension wrapping the ICU C++ API")
1239 (description
1240 "PyICU is a python extension wrapping the ICU C++ API.")
1241 (properties `((python2-variant . ,(delay python2-pyicu))))
1242 (license license:x11)))
1243
1244 (define-public python2-pyicu
1245 (let ((base (package-with-python2
1246 (strip-python2-variant python-pyicu))))
1247 (package
1248 (inherit base)
1249 (arguments
1250 `(,@(package-arguments base)
1251 #:phases
1252 (modify-phases %standard-phases
1253 (add-before 'check 'delete-failing-test
1254 (λ _
1255 ;; XXX: This fails due to Unicode issues unique to Python 2,
1256 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1257 (delete-file "test/test_Script.py")
1258 #t))))))))
1259
1260 (define-public python2-dogtail
1261 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1262 ;; spaces in indentation" with Python 3.
1263 (package
1264 (name "python2-dogtail")
1265 (version "0.9.9")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "dogtail" version))
1269 (sha256
1270 (base32
1271 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1272 (build-system python-build-system)
1273 (arguments `(#:python ,python-2
1274 #:tests? #f)) ; invalid command "test"
1275 ;; Currently no offical homepage.
1276 (home-page "https://pypi.python.org/pypi/dogtail/")
1277 (synopsis "GUI test tool and automation framework written in Python")
1278 (description
1279 "Dogtail is a GUI test tool and automation framework written in Python.
1280 It uses Accessibility (a11y) technologies to communicate with desktop
1281 applications. dogtail scripts are written in Python and executed like any
1282 other Python program.")
1283 (license license:gpl2+)))
1284
1285 (define-public python-empy
1286 (package
1287 (name "python-empy")
1288 (version "3.3.3")
1289 (source (origin
1290 (method url-fetch)
1291 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1292 version ".tar.gz"))
1293 (sha256
1294 (base32
1295 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1296 (build-system python-build-system)
1297 (arguments
1298 `(#:tests? #f)) ; python2 only
1299 (home-page "http://www.alcyone.com/software/empy/")
1300 (synopsis "Templating system for Python")
1301 (description
1302 "EmPy is a system for embedding Python expressions and statements in
1303 template text; it takes an EmPy source file, processes it, and produces
1304 output. This is accomplished via expansions, which are special signals to the
1305 EmPy system and are set off by a special prefix (by default the at sign, @@).
1306 EmPy can expand arbitrary Python expressions and statements in this way, as
1307 well as a variety of special forms. Textual data not explicitly delimited in
1308 this way is sent unaffected to the output, allowing Python to be used in
1309 effect as a markup language. Also supported are callbacks via hooks,
1310 recording and playback via diversions, and dynamic, chainable filters. The
1311 system is highly configurable via command line options and embedded
1312 commands.")
1313 (license license:lgpl2.1+)))
1314
1315 (define-public python2-empy
1316 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1317 (package
1318 (inherit base)
1319 (arguments `(,@(package-arguments base)
1320 #:tests? #t)))))
1321
1322 (define-public python2-element-tree
1323 (package
1324 (name "python2-element-tree")
1325 (version "1.2.6")
1326 (source (origin
1327 (method url-fetch)
1328 (uri (string-append
1329 "http://effbot.org/media/downloads/elementtree-"
1330 version "-20050316.tar.gz"))
1331 (sha256
1332 (base32
1333 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1334 (build-system python-build-system)
1335 (arguments
1336 `(#:python ,python-2 ; seems to be part of Python 3
1337 #:tests? #f)) ; no 'test' sub-command
1338 (synopsis "Toolkit for XML processing in Python")
1339 (description
1340 "ElementTree is a Python library supporting lightweight XML processing.")
1341 (home-page "http://effbot.org/zone/element-index.htm")
1342 (license (license:x11-style
1343 "http://docs.python.org/2/license.html"
1344 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1345
1346 (define-public python2-pybugz
1347 (package
1348 (name "python2-pybugz")
1349 (version "0.6.11")
1350 (source (origin
1351 (method url-fetch)
1352 (uri (string-append
1353 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1354 version ".tar.gz"))
1355 (sha256
1356 (base32
1357 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1358 (patches (search-patches "pybugz-stty.patch"
1359 "pybugz-encode-error.patch"))))
1360 (build-system python-build-system)
1361 (arguments
1362 `(#:python ,python-2 ; SyntaxError with Python 3
1363 #:tests? #f)) ; no 'test' sub-command
1364 (propagated-inputs
1365 `(("element-tree" ,python2-element-tree)))
1366 (synopsis "Python and command-line interface to Bugzilla")
1367 (description
1368 "PyBugz is a Python library and command-line tool to query the Bugzilla
1369 bug tracking system. It is meant as an aid to speed up interaction with the
1370 bug tracker.")
1371 (home-page "http://www.liquidx.net/pybugz/")
1372 (license license:gpl2)))
1373
1374 (define-public python2-enum
1375 (package
1376 (name "python2-enum")
1377 (version "0.4.6")
1378 (source (origin
1379 (method url-fetch)
1380 (uri (pypi-uri "enum" version))
1381 (sha256
1382 (base32
1383 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1384 (build-system python-build-system)
1385 (arguments
1386 `(#:python ,python-2))
1387 (home-page "http://pypi.python.org/pypi/enum/")
1388 (synopsis "Robust enumerated type support in Python")
1389 (description
1390 "This provides a module for robust enumerations in Python. It has
1391 been superseded by the Python standard library and is provided only for
1392 compatibility.")
1393 ;; Choice of either license.
1394 (license (list license:gpl3+ license:psfl))))
1395
1396 (define-public python-enum34
1397 (package
1398 (name "python-enum34")
1399 (version "1.1.6")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "enum34" version))
1404 (sha256
1405 (base32
1406 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1407 (build-system python-build-system)
1408 (home-page "https://pypi.python.org/pypi/enum34")
1409 (synopsis "Backported Python 3.4 Enum")
1410 (description
1411 "Enum34 is the new Python stdlib enum module available in Python 3.4
1412 backported for previous versions of Python from 2.4 to 3.3.")
1413 (license license:bsd-3)))
1414
1415 (define-public python2-enum34
1416 (package-with-python2 python-enum34))
1417
1418 (define-public python-parse-type
1419 (package
1420 (name "python-parse-type")
1421 (version "0.4.2")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (pypi-uri "parse_type" version))
1426 (sha256
1427 (base32
1428 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1429 (build-system python-build-system)
1430 (propagated-inputs
1431 `(("python-six" ,python-six)
1432 ("python-parse" ,python-parse)))
1433 (native-inputs
1434 `(("python-pytest" ,python-pytest)
1435 ("python-pytest-runner" ,python-pytest-runner)))
1436 (home-page "https://github.com/jenisys/parse_type")
1437 (synopsis "Extended parse module")
1438 (description
1439 "Parse_type extends the python parse module.")
1440 (properties
1441 `((python2-variant . ,(delay python2-parse-type))))
1442 (license license:bsd-3)))
1443
1444 (define-public python2-parse-type
1445 (let ((base (package-with-python2
1446 (strip-python2-variant python-parse-type))))
1447 (package (inherit base)
1448 (propagated-inputs
1449 `(("python2-enum34" ,python2-enum34)
1450 ,@(package-propagated-inputs base))))))
1451
1452 (define-public python-parse
1453 (package
1454 (name "python-parse")
1455 (version "1.8.4")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (pypi-uri "parse" version))
1460 (sha256
1461 (base32
1462 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1463 (build-system python-build-system)
1464 (arguments
1465 `(#:phases
1466 (modify-phases %standard-phases
1467 (replace 'check
1468 (lambda _ (invoke "python" "test_parse.py"))))))
1469 (home-page "https://github.com/r1chardj0n3s/parse")
1470 (synopsis "Parse strings")
1471 (description
1472 "Parse strings using a specification based on the Python @code{format()}
1473 syntax.")
1474 (license license:x11)))
1475
1476 (define-public python-polib
1477 (package
1478 (name "python-polib")
1479 (version "1.0.8")
1480 (source (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "polib" version))
1483 (sha256
1484 (base32
1485 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1486 (build-system python-build-system)
1487 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1488 (synopsis "Manipulate, create and modify gettext files")
1489 (description "Polib can manipulate any gettext format (po, pot and mo)
1490 files. It can be used to create po files from scratch or to modify
1491 existing ones.")
1492 (license license:expat)))
1493
1494 (define-public python2-polib
1495 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1496 (package
1497 (inherit base)
1498 (arguments `(,@(package-arguments base)
1499 ;; Tests don't work with python2.
1500 #:tests? #f)))))
1501
1502 (define-public scons
1503 (package
1504 (name "scons")
1505 (version "3.0.4")
1506 (source (origin
1507 (method git-fetch)
1508 (uri (git-reference
1509 (url "https://github.com/SCons/scons.git")
1510 (commit version)))
1511 (file-name (git-file-name name version))
1512 (sha256
1513 (base32
1514 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1515 (build-system python-build-system)
1516 (arguments
1517 `(#:use-setuptools? #f ; still relies on distutils
1518 #:tests? #f ; no 'python setup.py test' command
1519 #:phases
1520 (modify-phases %standard-phases
1521 (add-before 'build 'bootstrap
1522 (lambda _
1523 (substitute* "src/engine/SCons/compat/__init__.py"
1524 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1525 "sys.modules[new] = __import__(old)"))
1526 (substitute* "src/engine/SCons/Platform/__init__.py"
1527 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1528 "mod = __import__(full_name)"))
1529 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1530 (chdir "build/scons")
1531 #t)))))
1532 (home-page "http://scons.org/")
1533 (synopsis "Software construction tool written in Python")
1534 (description
1535 "SCons is a software construction tool. Think of SCons as an improved,
1536 cross-platform substitute for the classic Make utility with integrated
1537 functionality similar to autoconf/automake and compiler caches such as ccache.
1538 In short, SCons is an easier, more reliable and faster way to build
1539 software.")
1540 (license license:x11)))
1541
1542 (define-public scons-python2
1543 (package
1544 (inherit (package-with-python2 scons))
1545 (name "scons-python2")))
1546
1547 (define-public python-extras
1548 (package
1549 (name "python-extras")
1550 (version "1.0.0")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "extras" version))
1555 (sha256
1556 (base32
1557 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1558 (build-system python-build-system)
1559 (arguments
1560 ;; FIXME: Circular dependency on testtools.
1561 '(#:tests? #f))
1562 (home-page "https://github.com/testing-cabal/extras")
1563 (synopsis "Useful extensions to the Python standard library")
1564 (description
1565 "Extras is a set of extensions to the Python standard library.")
1566 (license license:expat)))
1567
1568 (define-public python2-extras
1569 (package-with-python2 python-extras))
1570
1571 (define-public python-mimeparse
1572 (package
1573 (name "python-mimeparse")
1574 (version "1.6.0")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "python-mimeparse" version))
1579 (sha256
1580 (base32
1581 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1582 (build-system python-build-system)
1583 (arguments
1584 '(#:phases
1585 (modify-phases %standard-phases
1586 (replace 'check
1587 (lambda _
1588 (invoke "./mimeparse_test.py"))))))
1589 (home-page
1590 "https://github.com/dbtsai/python-mimeparse")
1591 (synopsis "Python library for parsing MIME types")
1592 (description
1593 "Mimeparse provides basic functions for parsing MIME type names and
1594 matching them against a list of media-ranges.")
1595 (license license:expat)))
1596
1597 (define-public python2-mimeparse
1598 (package-with-python2 python-mimeparse))
1599
1600 (define-public python-miniboa
1601 (package
1602 (name "python-miniboa")
1603 (version "1.0.7")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "miniboa" version))
1608 (sha256
1609 (base32
1610 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1611 (build-system python-build-system)
1612 (home-page "https://github.com/shmup/miniboa")
1613 (synopsis "Simple, single-threaded Telnet server")
1614 (description
1615 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1616 server.")
1617 (license license:asl2.0)))
1618
1619 (define-public python2-miniboa
1620 (package-with-python2 python-miniboa))
1621
1622 (define-public python-pafy
1623 (package
1624 (name "python-pafy")
1625 (version "0.5.3.1")
1626 (source
1627 (origin
1628 (method url-fetch)
1629 (uri (pypi-uri "pafy" version))
1630 (sha256
1631 (base32
1632 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1633 (build-system python-build-system)
1634 (arguments
1635 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1636 (propagated-inputs
1637 ;; Youtube-dl is a python package which is imported in the file
1638 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1639 `(("youtube-dl" ,youtube-dl)))
1640 (home-page "https://np1.github.io/pafy/")
1641 (synopsis "Retrieve YouTube content and metadata")
1642 (description
1643 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1644 (license license:lgpl3+)))
1645
1646 (define-public python2-funcsigs
1647 (package
1648 (name "python2-funcsigs")
1649 (version "1.0.2")
1650 (source (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "funcsigs" version))
1653 (sha256
1654 (base32
1655 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1656 (build-system python-build-system)
1657 (arguments
1658 `(#:python ,python-2))
1659 (native-inputs
1660 `(("python2-unittest2" ,python2-unittest2)))
1661 (home-page "http://funcsigs.readthedocs.org")
1662 (synopsis "Python function signatures from PEP362")
1663 (description
1664 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1665 (license license:asl2.0)))
1666
1667 (define-public python2-funcsigs-bootstrap
1668 (package
1669 (inherit python2-funcsigs)
1670 (name "python2-funcsigs-bootstrap")
1671 (native-inputs `())
1672 (arguments
1673 `(#:tests? #f
1674 ,@(package-arguments python2-funcsigs)))))
1675
1676 (define-public python-py
1677 (package
1678 (name "python-py")
1679 (version "1.8.0")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "py" version))
1684 (sha256
1685 (base32
1686 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1687 (build-system python-build-system)
1688 (arguments
1689 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1690 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1691 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1692 ;; Is this module globally installed?"
1693 '(#:tests? #f))
1694 (native-inputs
1695 `(("python-setuptools-scm" ,python-setuptools-scm)))
1696 (home-page "https://github.com/pytest-dev/py")
1697 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1698 (description
1699 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1700 code introspection, and logging.")
1701 (license license:expat)))
1702
1703 (define-public python2-py
1704 (package-with-python2 python-py))
1705
1706 ;; Recent versions of python-fixtures and python-testrepository need
1707 ;; python-pbr for packaging, which itself needs these two packages for
1708 ;; testing.
1709 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1710 ;; same source, just without any test dependencies and with tests disabled.
1711 ;; python-pbr-minmal is then used to package python-fixtures and
1712 ;; python-testrepository.
1713 ;; Strictly speaking we currently could remove the test-requirements from the
1714 ;; normal python-pbr package (and save this package) since test are disabled
1715 ;; there anyway. But this may change in future.
1716 (define-public python-pbr-minimal
1717 (package
1718 (name "python-pbr-minimal")
1719 (version "3.0.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "pbr" version))
1724 (sha256
1725 (base32
1726 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1727 (build-system python-build-system)
1728 (arguments
1729 `(#:tests? #f))
1730 (home-page "http://docs.openstack.org/developer/pbr/")
1731 (synopsis "Minimal build of python-pbr used for bootstrapping")
1732 (description
1733 "Used only for bootstrapping python2-pbr, you should not need this.")
1734 (license license:asl2.0)))
1735
1736 (define-public python2-pbr-minimal
1737 (package-with-python2 python-pbr-minimal))
1738
1739 (define-public python-pbr
1740 (package
1741 (inherit python-pbr-minimal)
1742 (name "python-pbr")
1743 (arguments
1744 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1745 (propagated-inputs
1746 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1747 (native-inputs
1748 `(("python-fixtures" ,python-fixtures-bootstrap)
1749 ;; discover, coverage, hacking, subunit
1750 ("python-mock" ,python-mock)
1751 ("python-six" ,python-six)
1752 ("python-sphinx" ,python-sphinx)
1753 ("python-testrepository" ,python-testrepository-bootstrap)
1754 ("python-testresources" ,python-testresources-bootstrap)
1755 ("python-testscenarios" ,python-testscenarios-bootstrap)
1756 ("python-testtools" ,python-testtools-bootstrap)
1757 ("python-virtualenv" ,python-virtualenv)))
1758 (synopsis "Enhance the default behavior of Python’s setuptools")
1759 (description
1760 "Python Build Reasonableness (PBR) is a library that injects some useful
1761 and sensible default behaviors into your setuptools run. It will set
1762 versions, process requirements files and generate AUTHORS and ChangeLog file
1763 from git information.
1764 ")))
1765
1766 (define-public python2-pbr
1767 (package-with-python2 python-pbr))
1768
1769 (define-public python-pyrsistent
1770 (package
1771 (name "python-pyrsistent")
1772 (version "0.14.11")
1773 (home-page "https://github.com/tobgu/pyrsistent")
1774 (source (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "pyrsistent" version))
1777 (sha256
1778 (base32
1779 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("python-hypothesis" ,python-hypothesis)
1783 ("python-pytest" ,python-pytest)
1784 ("python-pytest-runner" ,python-pytest-runner)))
1785 (propagated-inputs
1786 `(("python-six" ,python-six)))
1787 (synopsis "Persistent data structures for Python")
1788 (description
1789 "Pyrsistent is a number of persistent collections (by some referred to as
1790 functional data structures). Persistent in the sense that they are immutable.
1791
1792 All methods on a data structure that would normally mutate it instead return a
1793 new copy of the structure containing the requested updates. The original
1794 structure is left untouched.")
1795 (license license:expat)))
1796
1797 (define-public python2-pyrsistent
1798 (package-with-python2 python-pyrsistent))
1799
1800 (define-public python-exif-read
1801 (package
1802 (name "python-exif-read")
1803 (version "2.1.2")
1804 (source (origin
1805 (method url-fetch)
1806 (uri (pypi-uri "ExifRead" version))
1807 (sha256
1808 (base32
1809 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1810 (build-system python-build-system)
1811 (arguments `(#:tests? #f)) ; no tests
1812 (home-page "https://github.com/ianare/exif-py")
1813 (synopsis "Python library to extract EXIF data from image files")
1814 (description
1815 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1816 files.")
1817 (license license:bsd-3)))
1818
1819 (define-public python2-exif-read
1820 (package-with-python2 python-exif-read))
1821
1822 (define-public python-pyld
1823 (package
1824 (name "python-pyld")
1825 (version "1.0.3")
1826 (source (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "PyLD" version))
1829 (sha256
1830 (base32
1831 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1832 (build-system python-build-system)
1833 (home-page "https://github.com/digitalbazaar/pyld")
1834 (synopsis "Python implementation of the JSON-LD specification")
1835 (description
1836 "PyLD is an implementation of the JSON-LD specification.")
1837 (license license:bsd-3)))
1838
1839 (define-public python2-pyld
1840 (package-with-python2 python-pyld))
1841
1842 (define-public python-click
1843 (package
1844 (name "python-click")
1845 (version "7.0")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "click" version))
1850 (sha256
1851 (base32
1852 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1853 (build-system python-build-system)
1854 (arguments
1855 `(#:phases
1856 (modify-phases %standard-phases
1857 (add-after 'unpack 'fix-paths
1858 (lambda* (#:key inputs #:allow-other-keys)
1859 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1860 "cross-libc" "libc"))))
1861 (substitute* "click/_unicodefun.py"
1862 (("'locale'")
1863 (string-append "'" glibc "/bin/locale'"))))
1864 #t))
1865 (replace 'check
1866 (lambda _
1867 (invoke "python" "-m" "pytest"))))))
1868 (native-inputs
1869 `(("python-pytest" ,python-pytest)))
1870 (home-page "https://palletsprojects.com/p/click/")
1871 (synopsis "Command line library for Python")
1872 (description
1873 "Click is a Python package for creating command line interfaces in a
1874 composable way with as little code as necessary. Its name stands for
1875 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1876 with sensible defaults out of the box.")
1877 (license license:bsd-3)))
1878
1879 (define-public python2-click
1880 (package-with-python2 python-click))
1881
1882 (define-public python-wheel
1883 (package
1884 (name "python-wheel")
1885 (version "0.32.3")
1886 (source
1887 (origin
1888 (method url-fetch)
1889 (uri (pypi-uri "wheel" version))
1890 (sha256
1891 (base32
1892 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1893 (build-system python-build-system)
1894 (native-inputs
1895 `(("python-jsonschema" ,python-jsonschema)
1896 ("python-pytest-cov" ,python-pytest-cov)))
1897 (home-page "https://bitbucket.org/pypa/wheel/")
1898 (synopsis "Format for built Python packages")
1899 (description
1900 "A wheel is a ZIP-format archive with a specially formatted filename and
1901 the @code{.whl} extension. It is designed to contain all the files for a PEP
1902 376 compatible install in a way that is very close to the on-disk format. Many
1903 packages will be properly installed with only the @code{Unpack} step and the
1904 unpacked archive preserves enough information to @code{Spread} (copy data and
1905 scripts to their final locations) at any later time. Wheel files can be
1906 installed with a newer @code{pip} or with wheel's own command line utility.")
1907 (license license:expat)
1908 (properties `((python2-variant . ,(delay python2-wheel))))))
1909
1910 (define-public python2-wheel
1911 (let ((wheel (package-with-python2
1912 (strip-python2-variant python-wheel))))
1913 (package (inherit wheel)
1914 (native-inputs `(("python2-functools32" ,python2-functools32)
1915 ,@(package-native-inputs wheel))))))
1916
1917 (define-public python-vcversioner
1918 (package
1919 (name "python-vcversioner")
1920 (version "2.16.0.0")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "vcversioner" version))
1925 (sha256
1926 (base32
1927 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1928 (build-system python-build-system)
1929 (synopsis "Python library for version number discovery")
1930 (description "Vcversioner is a Python library that inspects tagging
1931 information in a variety of version control systems in order to discover
1932 version numbers.")
1933 (home-page "https://github.com/habnabit/vcversioner")
1934 (license license:isc)))
1935
1936 (define-public python2-vcversioner
1937 (package-with-python2 python-vcversioner))
1938
1939 (define-public python-jdcal
1940 (package
1941 (name "python-jdcal")
1942 (version "1.4")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "jdcal" version))
1947 (sha256
1948 (base32
1949 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1950 (build-system python-build-system)
1951 (arguments
1952 `(#:phases (modify-phases %standard-phases
1953 (replace 'check
1954 (lambda _
1955 (invoke "pytest"))))))
1956 (native-inputs
1957 `(("python-pytest" ,python-pytest)))
1958 (home-page "https://github.com/phn/jdcal")
1959 (synopsis "Functions to convert between Julian dates Gregorian dates")
1960 (description "This Python library provides functions for converting
1961 between Julian dates and Gregorian dates.")
1962 (license license:bsd-2)))
1963
1964 (define-public python2-jdcal
1965 (package-with-python2 python-jdcal))
1966
1967 (define-public python-jsonschema
1968 (package
1969 (name "python-jsonschema")
1970 (version "3.0.1")
1971 (source (origin
1972 (method url-fetch)
1973 (uri (pypi-uri "jsonschema" version))
1974 (sha256
1975 (base32
1976 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1977 (build-system python-build-system)
1978 (arguments
1979 '(#:phases
1980 (modify-phases %standard-phases
1981 (replace 'check
1982 (lambda _
1983 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1984 (invoke "trial" "jsonschema"))))))
1985 (native-inputs
1986 `(("python-setuptools_scm" ,python-setuptools-scm)
1987 ("python-twisted" ,python-twisted)))
1988 (propagated-inputs
1989 `(("python-attrs" ,python-attrs)
1990 ("python-pyrsistent" ,python-pyrsistent)
1991 ("python-six" ,python-six)))
1992 (home-page "https://github.com/Julian/jsonschema")
1993 (synopsis "Implementation of JSON Schema for Python")
1994 (description
1995 "Jsonschema is an implementation of JSON Schema for Python.")
1996 (license license:expat)
1997 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1998
1999 (define-public python2-jsonschema
2000 (let ((jsonschema (package-with-python2
2001 (strip-python2-variant python-jsonschema))))
2002 (package (inherit jsonschema)
2003 (propagated-inputs
2004 `(("python2-functools32" ,python2-functools32)
2005 ,@(package-propagated-inputs jsonschema))))))
2006
2007 ;; This old version is still required by docker-compose as of 1.24.0.
2008 (define-public python-jsonschema-2.6
2009 (package
2010 (name "python-jsonschema")
2011 (version "2.6.0")
2012 (source (origin
2013 (method url-fetch)
2014 (uri (pypi-uri "jsonschema" version))
2015 (sha256
2016 (base32
2017 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2018 (build-system python-build-system)
2019 (arguments
2020 '(#:phases
2021 (modify-phases %standard-phases
2022 (replace 'check (lambda _ (invoke "nosetests"))))))
2023 (native-inputs
2024 `(("python-nose" ,python-nose)
2025 ("python-vcversioner" ,python-vcversioner)))
2026 (home-page "https://github.com/Julian/jsonschema")
2027 (synopsis "Implementation of JSON Schema for Python")
2028 (description
2029 "Jsonschema is an implementation of JSON Schema for Python.")
2030 (license license:expat)
2031 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2032
2033 (define-public python-schema
2034 (package
2035 (name "python-schema")
2036 (version "0.6.6")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "schema" version))
2041 (sha256
2042 (base32
2043 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2044 (build-system python-build-system)
2045 (native-inputs
2046 `(("python-pytest" ,python-pytest)))
2047 (home-page "https://github.com/keleshev/schema")
2048 (synopsis "Simple data validation library")
2049 (description
2050 "@code{python-schema} is a library for validating Python data
2051 structures, such as those obtained from config-files, forms, external
2052 services or command-line parsing, converted from JSON/YAML (or
2053 something else) to Python data-types.")
2054 (license license:psfl)))
2055
2056 (define-public python2-schema
2057 (package-with-python2 python-schema))
2058
2059 (define-public python-schema-0.5
2060 (package (inherit python-schema)
2061 (version "0.5.0")
2062 (source
2063 (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "schema" version))
2066 (sha256
2067 (base32
2068 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2069
2070 (define-public python2-schema-0.5
2071 (package-with-python2 python-schema-0.5))
2072
2073 (define-public python-kitchen
2074 (package
2075 (name "python-kitchen")
2076 (version "1.2.5")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (pypi-uri "kitchen" version))
2081 (sha256
2082 (base32
2083 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2084 (build-system python-build-system)
2085 (propagated-inputs
2086 `(("python-chardet" ,python-chardet)))
2087 (home-page "https://github.com/fedora-infra/kitchen")
2088 (synopsis "Python API for snippets")
2089 (description "@code{kitchen} module provides a python API for all sorts of
2090 little useful snippets of code that everybody ends up writing for their projects
2091 but never seem big enough to build an independent release. Use kitchen and stop
2092 cutting and pasting that code over and over.")
2093 (license (list license:lgpl2.1+
2094 ;; subprocess.py, test_subprocess.py,
2095 ;; kitchen/pycompat25/defaultdict.py:
2096 license:psfl))))
2097
2098 (define-public python2-kitchen
2099 (package-with-python2 python-kitchen))
2100
2101 (define-public python-unidecode
2102 (package
2103 (name "python-unidecode")
2104 (version "1.1.0")
2105 (source (origin
2106 (method url-fetch)
2107 (uri (pypi-uri "Unidecode" version))
2108 (sha256
2109 (base32
2110 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2111 (build-system python-build-system)
2112 (home-page "https://pypi.python.org/pypi/Unidecode")
2113 (synopsis "ASCII transliterations of Unicode text")
2114 (description
2115 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2116 useful when integrating with legacy code that doesn't support Unicode, or for
2117 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2118 machine identifiers from human-readable Unicode strings that should still be
2119 somewhat intelligible.")
2120 (license license:gpl2+)))
2121
2122 (define-public python2-unidecode
2123 (package-with-python2 python-unidecode))
2124
2125 (define-public python-pyjwt
2126 (package
2127 (name "python-pyjwt")
2128 (version "1.5.3")
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "PyJWT" version))
2133 (sha256
2134 (base32
2135 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2136 (modules '((guix build utils)))
2137 (snippet
2138 '(begin
2139 (for-each delete-file-recursively
2140 (find-files "." "\\.pyc$"))
2141 #t))))
2142 (build-system python-build-system)
2143 (native-inputs
2144 `(("python-pytest" ,python-pytest)
2145 ("python-pytest-cov" ,python-pytest-cov)
2146 ("python-pytest-runner" ,python-pytest-runner)))
2147 (home-page "https://github.com/progrium/pyjwt")
2148 (synopsis "JSON Web Token implementation in Python")
2149 (description
2150 "PyJWT is a JSON Web Token implementation written in Python.")
2151 (license license:expat)))
2152
2153 (define-public python2-pyjwt
2154 (package-with-python2 python-pyjwt))
2155
2156 (define-public python-pykka
2157 (package
2158 (name "python-pykka")
2159 (version "1.2.1")
2160 (source
2161 (origin
2162 (method url-fetch)
2163 (uri (pypi-uri "Pykka" version))
2164 (sha256
2165 (base32
2166 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2167 (build-system python-build-system)
2168 (native-inputs
2169 `(("python-mock" ,python-mock)
2170 ("python-nose" ,python-nose)
2171 ("python-gevent" ,python-gevent)
2172 ("python-eventlet" ,python-eventlet)))
2173 (home-page "https://www.pykka.org/")
2174 (synopsis "Pykka is a Python implementation of the actor model")
2175 (description
2176 "Pykka is a Python implementation of the actor model.
2177 The actor model introduces some simple rules to control the sharing
2178 of state and cooperation between execution units, which makes it
2179 easier to build concurrent applications.")
2180 (license license:asl2.0)))
2181
2182 (define-public python2-pykka
2183 (package-with-python2 python-pykka))
2184
2185 (define-public python-pymsgbox
2186 (package
2187 (name "python-pymsgbox")
2188 (version "1.0.6")
2189 (source
2190 (origin
2191 (method git-fetch)
2192 (uri (git-reference
2193 ;; LICENSE.txt is not present on pypi
2194 (url "https://github.com/asweigart/PyMsgBox")
2195 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2196 (file-name (git-file-name name version))
2197 (sha256
2198 (base32
2199 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2200 (arguments
2201 ;; Circular dependency to run tests:
2202 ;; Tests need pyautogui, which depends on pymsgbox.
2203 '(#:tests? #f))
2204 (build-system python-build-system)
2205 (home-page "https://github.com/asweigart/PyMsgBox")
2206 (synopsis "Python module for JavaScript-like message boxes")
2207 (description
2208 "PyMsgBox is a simple, cross-platform, pure Python module for
2209 JavaScript-like message boxes. Types of dialog boxes include:
2210 @enumerate
2211 @item alert
2212 @item confirm
2213 @item prompt
2214 @item password
2215 @end enumerate
2216 ")
2217 (license license:bsd-3)))
2218
2219 (define-public python-pympler
2220 (package
2221 (name "python-pympler")
2222 (home-page "https://pythonhosted.org/Pympler/")
2223 (version "0.7")
2224 (source (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "Pympler" version))
2227 (sha256
2228 (base32
2229 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases (modify-phases %standard-phases
2233 (delete 'check)
2234 (add-after 'install 'check
2235 (lambda* (#:key inputs outputs #:allow-other-keys)
2236 (add-installed-pythonpath inputs outputs)
2237 (invoke "python" "setup.py" "test"))))))
2238 (synopsis "Measure, monitor and analyze memory behavior")
2239 (description
2240 "Pympler is a development tool to measure, monitor and analyze
2241 the memory behavior of Python objects in a running Python application.
2242
2243 By pympling a Python application, detailed insight in the size and the
2244 lifetime of Python objects can be obtained. Undesirable or unexpected
2245 runtime behavior like memory bloat and other @samp{pymples} can easily
2246 be identified.
2247
2248 A web profiling frontend exposes process statistics, garbage
2249 visualisation and class tracker statistics.")
2250 (license license:asl2.0)))
2251
2252 (define-public python2-pympler
2253 (package-with-python2 python-pympler))
2254
2255 (define-public python-itsdangerous
2256 (package
2257 (name "python-itsdangerous")
2258 (version "1.1.0")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "itsdangerous" version))
2263 (sha256
2264 (base32
2265 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2266 (build-system python-build-system)
2267 (home-page "https://palletsprojects.com/p/itsdangerous/")
2268 (synopsis "Python library for passing data to/from untrusted environments")
2269 (description
2270 "Itsdangerous provides various helpers to pass trusted data to untrusted
2271 environments and back.")
2272 (license license:bsd-3)))
2273
2274 (define-public python2-itsdangerous
2275 (package-with-python2 python-itsdangerous))
2276
2277 (define-public python-pyyaml
2278 (package
2279 (name "python-pyyaml")
2280 (version "3.13")
2281 (source
2282 (origin
2283 (method url-fetch)
2284 (uri (pypi-uri "PyYAML" version))
2285 (sha256
2286 (base32
2287 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2288 (build-system python-build-system)
2289 (inputs
2290 `(("libyaml" ,libyaml)))
2291 (home-page "http://pyyaml.org/wiki/PyYAML")
2292 (synopsis "YAML parser and emitter for Python")
2293 (description
2294 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2295 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2296 API, and sensible error messages. PyYAML supports standard YAML tags and
2297 provides Python-specific tags that allow to represent an arbitrary Python
2298 object.")
2299 (license license:expat)))
2300
2301 (define-public python2-pyyaml
2302 (package-with-python2 python-pyyaml))
2303
2304 (define-public python-vine
2305 (package
2306 (name "python-vine")
2307 (version "1.1.4")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "vine" version))
2312 (sha256
2313 (base32
2314 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2315 (build-system python-build-system)
2316 (native-inputs
2317 `(("python-pytest" ,python-pytest)
2318 ("python-case" ,python-case)))
2319 (home-page "https://github.com/celery/vine")
2320 (synopsis "Promises for Python")
2321 (description
2322 "@code{vine} provides a special implementation of promises in that it can
2323 be used both for \"promise of a value\" and lazy evaluation. The biggest
2324 upside for this is that everything in a promise can also be a promise,
2325 e.g. filters, callbacks and errbacks can all be promises.")
2326 (license license:bsd-3)))
2327
2328 (define-public python-virtualenv
2329 (package
2330 (name "python-virtualenv")
2331 (version "16.1.0")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "virtualenv" version))
2336 (sha256
2337 (base32
2338 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2339 (build-system python-build-system)
2340 (arguments
2341 `(#:phases
2342 (modify-phases %standard-phases
2343 (add-before 'check 'disable-failing-test
2344 (lambda _
2345 ;; Disable failing test. See upstream bug report
2346 ;; https://github.com/pypa/virtualenv/issues/957
2347 (substitute* "tests/test_virtualenv.py"
2348 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2349 #t)))))
2350 (native-inputs
2351 `(("python-mock" ,python-mock)
2352 ("python-pytest" ,python-pytest)))
2353 (home-page "https://virtualenv.pypa.io/")
2354 (synopsis "Virtual Python environment builder")
2355 (description
2356 "Virtualenv is a tool to create isolated Python environments.")
2357 (license license:expat)))
2358
2359 (define-public python2-virtualenv
2360 (package-with-python2 python-virtualenv))
2361
2362 (define-public python-markupsafe
2363 (package
2364 (name "python-markupsafe")
2365 (version "1.1.1")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 (uri (pypi-uri "MarkupSafe" version))
2370 (sha256
2371 (base32
2372 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2373 (build-system python-build-system)
2374 (arguments
2375 `(#:modules ((ice-9 ftw)
2376 (srfi srfi-1)
2377 (srfi srfi-26)
2378 (guix build utils)
2379 (guix build python-build-system))
2380 #:phases (modify-phases %standard-phases
2381 (replace 'check
2382 (lambda _
2383 (let ((cwd (getcwd))
2384 (libdir (find (cut string-prefix? "lib." <>)
2385 (scandir "build"))))
2386 (setenv "PYTHONPATH"
2387 (string-append cwd "/build/" libdir ":"
2388 (getenv "PYTHONPATH")))
2389 (invoke "pytest" "-vv")))))))
2390 (native-inputs
2391 `(("python-pytest" ,python-pytest)))
2392 (home-page "https://github.com/mitsuhiko/markupsafe")
2393 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2394 (description
2395 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2396 for Python.")
2397 (license license:bsd-3)))
2398
2399 (define-public python2-markupsafe
2400 (package-with-python2 python-markupsafe))
2401
2402 (define-public python-jinja2
2403 (package
2404 (name "python-jinja2")
2405 (version "2.10.1")
2406 (source
2407 (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "Jinja2" version))
2410 (sha256
2411 (base32
2412 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2413 (build-system python-build-system)
2414 (propagated-inputs
2415 `(("python-markupsafe" ,python-markupsafe)))
2416 (home-page "http://jinja.pocoo.org/")
2417 (synopsis "Python template engine")
2418 (description
2419 "Jinja2 is a small but fast and easy to use stand-alone template engine
2420 written in pure Python.")
2421 (license license:bsd-3)))
2422
2423 (define-public python2-jinja2
2424 (package-with-python2 python-jinja2))
2425
2426 (define-public python-pystache
2427 (package
2428 (name "python-pystache")
2429 (version "0.5.4")
2430 (source (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "pystache" version))
2433 (sha256
2434 (base32
2435 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2436 (build-system python-build-system)
2437 (arguments
2438 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2439 (home-page "http://defunkt.io/pystache/")
2440 (synopsis "Python logic-less template engine")
2441 (description
2442 "Pystache is a Python implementation of the framework agnostic,
2443 logic-free templating system Mustache.")
2444 (license license:expat)
2445 (properties `((python2-variant . ,(delay python2-pystache))))))
2446
2447 (define-public python2-pystache
2448 (package (inherit (package-with-python2
2449 (strip-python2-variant python-pystache)))
2450 (arguments
2451 `(#:python ,python-2
2452 #:phases
2453 (modify-phases %standard-phases
2454 (replace 'check
2455 (lambda _
2456 (invoke "python" "test_pystache.py"))))))))
2457
2458 (define-public python-joblib
2459 (package
2460 (name "python-joblib")
2461 (version "0.13.0")
2462 (source (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "joblib" version))
2465 (sha256
2466 (base32
2467 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2468 (build-system python-build-system)
2469 (arguments
2470 `(#:phases
2471 (modify-phases %standard-phases
2472 (replace 'check
2473 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2474 (native-inputs
2475 `(("python-pytest" ,python-pytest)))
2476 (home-page "https://joblib.readthedocs.io/")
2477 (synopsis "Using Python functions as pipeline jobs")
2478 (description
2479 "Joblib is a set of tools to provide lightweight pipelining in Python.
2480 In particular, joblib offers: transparent disk-caching of the output values
2481 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2482 logging and tracing of the execution.")
2483 (license license:bsd-3)))
2484
2485 (define-public python2-joblib
2486 (package-with-python2 python-joblib))
2487
2488 (define-public python-daemon
2489 (package
2490 (name "python-daemon")
2491 (version "2.2.3")
2492 (source
2493 (origin
2494 (method url-fetch)
2495 (uri (pypi-uri "python-daemon" version))
2496 (sha256
2497 (base32
2498 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2499 (build-system python-build-system)
2500 (arguments
2501 `(#:phases
2502 (modify-phases %standard-phases
2503 (add-before 'check 'disable-tests
2504 (lambda _
2505 ;; FIXME: Determine why test fails
2506 (substitute* "test/test_daemon.py"
2507 (("test_detaches_process_context")
2508 "skip_test_detaches_process_context"))
2509 #t)))))
2510 (propagated-inputs
2511 `(("python-lockfile" ,python-lockfile)))
2512 (native-inputs
2513 `(("python-unittest2" ,python-unittest2)
2514 ("python-testtools" ,python-testtools)
2515 ("python-testscenarios" ,python-testscenarios)
2516 ("python-mock" ,python-mock)
2517 ("python-docutils" ,python-docutils)))
2518 (home-page "https://pagure.io/python-daemon/")
2519 (synopsis "Python library for making a Unix daemon process")
2520 (description "Python-daemon is a library that assists a Python program to
2521 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2522
2523 This library provides a @code{DaemonContext} class that manages the following
2524 important tasks for becoming a daemon process:
2525 @enumerate
2526 @item Detach the process into its own process group.
2527 @item Set process environment appropriate for running inside a chroot.
2528 @item Renounce suid and sgid privileges.
2529 @item Close all open file descriptors.
2530 @item Change the working directory, uid, gid, and umask.
2531 @item Set appropriate signal handlers.
2532 @item Open new file descriptors for stdin, stdout, and stderr.
2533 @item Manage a specified PID lock file.
2534 @item Register cleanup functions for at-exit processing.
2535 @end enumerate")
2536 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2537 (license (list license:asl2.0 license:gpl3+))))
2538
2539 (define-public python-docutils
2540 (package
2541 (name "python-docutils")
2542 (version "0.14")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "docutils" version))
2547 (sha256
2548 (base32
2549 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2550 (build-system python-build-system)
2551 (arguments
2552 '(#:tests? #f)) ; no setup.py test command
2553 (home-page "http://docutils.sourceforge.net/")
2554 (synopsis "Python Documentation Utilities")
2555 (description
2556 "Docutils is a modular system for processing documentation into useful
2557 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2558 reStructuredText.")
2559 ;; Most of the source code is public domain, but some source files are
2560 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2561 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2562
2563 (define-public python2-docutils
2564 (package-with-python2 python-docutils))
2565
2566 (define-public python-pygments
2567 (package
2568 (name "python-pygments")
2569 (version "2.4.2")
2570 (source
2571 (origin
2572 (method url-fetch)
2573 (uri (pypi-uri "Pygments" version))
2574 (sha256
2575 (base32
2576 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2577 (build-system python-build-system)
2578 (arguments
2579 ;; FIXME: Tests require sphinx, which depends on this.
2580 '(#:tests? #f))
2581 (home-page "http://pygments.org/")
2582 (synopsis "Syntax highlighting")
2583 (description
2584 "Pygments is a syntax highlighting package written in Python.")
2585 (license license:bsd-2)))
2586
2587 (define-public python2-pygments
2588 (package-with-python2 python-pygments))
2589
2590 (define-public python-bumpversion
2591 (package
2592 (name "python-bumpversion")
2593 (version "0.5.3")
2594 (source
2595 (origin
2596 (method url-fetch)
2597 (uri (pypi-uri "bumpversion" version))
2598 (sha256
2599 (base32
2600 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2601 (build-system python-build-system)
2602 (home-page "https://github.com/peritus/bumpversion")
2603 (synopsis "Tool to bump software version")
2604 (description "This tool provides a command-line interface (CLI) to bump a
2605 software version simply.")
2606 (license license:expat)))
2607
2608 (define-public python-deprecated
2609 (package
2610 (name "python-deprecated")
2611 (version "1.2.5")
2612 (source
2613 (origin
2614 (method git-fetch)
2615 (uri (git-reference
2616 (url "https://github.com/tantale/deprecated.git")
2617 (commit (string-append "v" version))))
2618 (file-name (git-file-name name version))
2619 (sha256
2620 (base32
2621 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2622 (build-system python-build-system)
2623 (arguments
2624 `(#:phases (modify-phases %standard-phases
2625 (replace 'check
2626 (lambda _
2627 (invoke "pytest"))))))
2628 (propagated-inputs
2629 `(("python-wrapt" ,python-wrapt)))
2630 (native-inputs
2631 `(("python-bumpversion" ,python-bumpversion)
2632 ("python-pytest" ,python-pytest)
2633 ("python-pytest-cov" ,python-pytest-cov)
2634 ("python-sphinx" ,python-sphinx)
2635 ("python-tox" ,python-tox)))
2636 (home-page "https://github.com/tantale/deprecated")
2637 (synopsis "Python decorator to deprecate classes, functions or methods")
2638 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2639 to deprecate classes, functions or methods.")
2640 (license license:expat)))
2641
2642 (define-public python-pygithub
2643 (package
2644 (name "python-pygithub")
2645 (version "1.43.7")
2646 (source
2647 ;; We fetch from the Git repo because there are no tests in the PyPI
2648 ;; archive.
2649 (origin
2650 (method git-fetch)
2651 (uri (git-reference
2652 (url "https://github.com/PyGithub/PyGithub.git")
2653 (commit (string-append "v" version))))
2654 (file-name (git-file-name name version))
2655 (sha256
2656 (base32
2657 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2658 (build-system python-build-system)
2659 (arguments
2660 `(#:phases (modify-phases %standard-phases
2661 ;; Some tests rely on the network.
2662 (add-after 'unpack 'disable-failing-tests
2663 (lambda _
2664 (substitute* "tests/Issue142.py"
2665 (("testDecodeJson") "disabled_testDecodeJson"))
2666 #t))
2667 (add-before 'check 'prepare-for-tests
2668 (lambda _
2669 (for-each (lambda (f)
2670 (chmod f #o666))
2671 (find-files "./tests"))
2672 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2673 (setenv "PYTHONPATH"
2674 (string-append "./tests:" (getenv "PYTHONPATH")))
2675 #t)))))
2676 (propagated-inputs
2677 `(("python-deprecated" ,python-deprecated)
2678 ("python-pyjwt" ,python-pyjwt)
2679 ("python-requests" ,python-requests)))
2680 (native-inputs `(("python-httpretty" ,python-httpretty)))
2681 (home-page "https://pygithub.readthedocs.io/en/latest/")
2682 (synopsis "Python library for the GitHub API")
2683 (description "This library allows managing GitHub resources such as
2684 repositories, user profiles, and organizations in your Python applications,
2685 using version 3 of the GitHub application programming interface (API).")
2686 (license license:lgpl3+)))
2687
2688 (define-public python-rellu
2689 (package
2690 (name "python-rellu")
2691 (version "0.7")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "rellu" version))
2696 (sha256
2697 (base32
2698 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2699 (build-system python-build-system)
2700 (propagated-inputs
2701 `(("python-invoke" ,python-invoke)
2702 ("python-pygithub" ,python-pygithub)))
2703 (home-page "https://github.com/robotframework/rellu")
2704 (synopsis "Utilities to create PyPI releases")
2705 (description "This collection of utilities contains tooling and templates
2706 to assist in creating releases on GitHub and publishing them on PyPI. It is
2707 designed to be used by Robot Framework and tools and libraries in its
2708 ecosystem, but can naturally be used also by other projects.")
2709 (license license:asl2.0)))
2710
2711 (define-public python-robotframework
2712 (package
2713 (name "python-robotframework")
2714 (version "3.1.2")
2715 ;; There are no tests in the PyPI archive.
2716 (source
2717 (origin
2718 (method git-fetch)
2719 (uri (git-reference
2720 (url "https://github.com/robotframework/robotframework.git")
2721 (commit (string-append "v" version))))
2722 (file-name (git-file-name name version))
2723 (sha256
2724 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2725 (patches (search-patches
2726 "python-robotframework-honor-source-date-epoch.patch"))))
2727 (build-system python-build-system)
2728 (arguments
2729 `(#:phases (modify-phases %standard-phases
2730 (add-before 'build 'build-and-install-doc
2731 (lambda* (#:key outputs #:allow-other-keys)
2732 (let* ((doc-output (assoc-ref outputs "doc"))
2733 (doc (string-append doc-output "/share/"
2734 ,name "-" ,version "/")))
2735 (invoke "invoke" "library-docs" "all")
2736 (mkdir-p doc)
2737 (copy-recursively "doc/libraries"
2738 (string-append doc "/libraries"))
2739 #t)))
2740 (replace 'check
2741 (lambda _
2742 (invoke "python" "utest/run.py"))))))
2743 (native-inputs
2744 `(("python-invoke" ,python-invoke)
2745 ("python-rellu" ,python-rellu)
2746 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2747 (outputs '("out" "doc"))
2748 (home-page "https://robotframework.org")
2749 (synopsis "Generic automation framework")
2750 (description "Robot Framework is a generic automation framework for
2751 acceptance testing, acceptance test driven development (ATDD), and robotic
2752 process automation (RPA).")
2753 (license license:asl2.0)))
2754
2755 (define-public python-robotframework-lint
2756 ;; There is no properly tagged release; the commit below seems to correspond
2757 ;; to the 0.9 stable release available from PyPI. The tests are not
2758 ;; included in the PyPI archive, so we fetch the sources from the upstream
2759 ;; Git repo.
2760 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2761 (revision "1"))
2762 (package
2763 (name "python-robotframework-lint")
2764 (version (git-version "0.9.0" revision commit))
2765 (source
2766 (origin
2767 (method git-fetch)
2768 (uri (git-reference
2769 (url "https://github.com/boakley/robotframework-lint.git")
2770 (commit commit)))
2771 (file-name (git-file-name name version))
2772 (sha256
2773 (base32
2774 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2775 (build-system python-build-system)
2776 (arguments
2777 `(#:phases
2778 (modify-phases %standard-phases
2779 (replace 'check
2780 (lambda _
2781 (invoke "python" "-m" "robot" "-A"
2782 "tests/conf/default.args" "tests"))))))
2783 (propagated-inputs
2784 `(("python-robotframework" ,python-robotframework)))
2785 (home-page "https://github.com/boakley/robotframework-lint/")
2786 (synopsis "Static analysis tool (linter) for Robot Framework")
2787 (description "This package provides the @code{rflint} command-line
2788 utility, a static analysis tool (linter) for Robot Framework source files.")
2789 (license license:asl2.0))))
2790
2791 (define-public python-robotframework-sshlibrary
2792 (package
2793 (name "python-robotframework-sshlibrary")
2794 (version "3.3.0")
2795 ;; There are no tests in the PyPI archive.
2796 (source
2797 (origin
2798 (method git-fetch)
2799 (uri (git-reference
2800 (url "https://github.com/robotframework/SSHLibrary.git")
2801 (commit (string-append "v" version))))
2802 (file-name (git-file-name name version))
2803 (sha256
2804 (base32
2805 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2806 (build-system python-build-system)
2807 (arguments
2808 `(#:phases
2809 (modify-phases %standard-phases
2810 (add-before 'build 'build-and-install-doc
2811 (lambda* (#:key outputs #:allow-other-keys)
2812 (let* ((doc-output (assoc-ref outputs "doc"))
2813 (doc (string-append doc-output "/share/"
2814 ,name "-" ,version "/")))
2815 (invoke "chmod" "-R" "+w" "docs")
2816 (invoke "invoke" "kw-docs" "project-docs")
2817 (mkdir-p doc)
2818 (for-each delete-file (find-files "docs" "\\.rst"))
2819 (copy-recursively "docs" doc)
2820 #t)))
2821 (replace 'check
2822 (lambda _
2823 ;; Some tests require an SSH server; we remove them.
2824 (delete-file "utest/test_client_api.py")
2825 (delete-file "utest/test_scp.py")
2826 (invoke "python" "utest/run.py"))))))
2827 (propagated-inputs
2828 `(("python-robotframework" ,python-robotframework)
2829 ("python-paramiko" ,python-paramiko)
2830 ("python-scp" ,python-scp)))
2831 (native-inputs
2832 `(("openssh" ,openssh)
2833 ("which" ,which)
2834 ;; To generate the documentation
2835 ("python-docutils" ,python-docutils)
2836 ("python-invoke" ,python-invoke)
2837 ("python-pygments" ,python-pygments)
2838 ("python-rellu" ,python-rellu)))
2839 (outputs '("out" "doc"))
2840 (home-page "https://github.com/robotframework/SSHLibrary")
2841 (synopsis "Robot Framework library for SSH and SFTP")
2842 (description "SSHLibrary is a Robot Framework library providing support
2843 for SSH and SFTP. It has the following main usages:
2844 @itemize @bullet
2845 @item Executing commands on the remote machine, either blocking or non-blocking.
2846 @item Writing and reading in an interactive shell.
2847 @item Transferring files and directories over SFTP.
2848 @item Ensuring that files and directories exist on the remote machine.
2849 @end itemize")
2850 (license license:asl2.0)))
2851
2852 (define-public python-scp
2853 (package
2854 (name "python-scp")
2855 (version "0.13.2")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "scp" version))
2860 (sha256
2861 (base32
2862 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2863 (build-system python-build-system)
2864 (arguments
2865 '(#:tests? #f)) ;tests require an SSH server
2866 (propagated-inputs
2867 `(("python-paramiko" ,python-paramiko)))
2868 (home-page "https://github.com/jbardin/scp.py")
2869 (synopsis "SCP protocol module for Python and Paramiko")
2870 (description "The scp module extends the Paramiko library to send and
2871 receive files via the SCP1 protocol, as implemented by the OpenSSH
2872 @command{scp} program.")
2873 (license license:gpl2+)))
2874
2875 (define-public python-rst.linker
2876 (package
2877 (name "python-rst.linker")
2878 (version "1.10")
2879 (source
2880 (origin
2881 (method url-fetch)
2882 (uri (pypi-uri "rst.linker" version))
2883 (sha256
2884 (base32
2885 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2886 (build-system python-build-system)
2887 (propagated-inputs
2888 `(("python-dateutil" ,python-dateutil)
2889 ("python-six" ,python-six)))
2890 (native-inputs
2891 `(("python-setuptools-scm" ,python-setuptools-scm)))
2892 ;; Test would require path.py, which would introduce a cyclic dependence.
2893 (arguments `(#:tests? #f))
2894 ;; Note: As of version 1.7 the documentation is not worth building.
2895 (home-page "https://github.com/jaraco/rst.linker")
2896 (synopsis "Sphinx plugin to add links and timestamps")
2897 (description "rst.linker allows to automatically replace text by a
2898 reStructuredText external reference or timestamps. It's primary purpose is to
2899 augment the changelog, but it can be used for other documents, too.")
2900 (license license:expat)))
2901
2902 (define-public python2-rst.linker
2903 (package-with-python2 python-rst.linker))
2904
2905 (define-public python-feedgenerator
2906 (package
2907 (name "python-feedgenerator")
2908 (version "1.9")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "feedgenerator" version))
2913 (sha256
2914 (base32
2915 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2916 (modules '((guix build utils)))
2917 (snippet
2918 '(begin
2919 ;; Remove pre-compiled .pyc files from source.
2920 (for-each delete-file-recursively
2921 (find-files "." "__pycache__" #:directories? #t))
2922 (for-each delete-file (find-files "." "\\.pyc$"))
2923 #t))))
2924 (build-system python-build-system)
2925 (propagated-inputs
2926 `(("python-pytz" ,python-pytz)
2927 ("python-six" ,python-six)))
2928 (home-page "https://github.com/getpelican/feedgenerator")
2929 (synopsis
2930 "Standalone version of Django's Atom/RSS feed generator")
2931 (description
2932 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2933 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2934 (license license:bsd-3)))
2935
2936 (define-public python2-feedgenerator
2937 (package-with-python2 python-feedgenerator))
2938
2939 (define-public python-toml
2940 (package
2941 (name "python-toml")
2942 (version "0.9.4")
2943 (source
2944 (origin
2945 (method url-fetch)
2946 (uri (pypi-uri "toml" version))
2947 (sha256
2948 (base32
2949 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2950 (build-system python-build-system)
2951 (arguments
2952 `(#:tests? #f)) ;no tests suite in release
2953 (home-page "https://github.com/uiri/toml")
2954 (synopsis "Library for TOML")
2955 (description
2956 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2957 Language (TOML) configuration files.")
2958 (license license:expat)))
2959
2960 (define-public python-jsonrpc-server
2961 (package
2962 (name "python-jsonrpc-server")
2963 (version "0.1.2")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "python-jsonrpc-server" version))
2968 (sha256
2969 (base32
2970 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2971 (build-system python-build-system)
2972 (propagated-inputs
2973 `(("python-future" ,python-future)
2974 ("python-mock" ,python-mock)
2975 ("python-pytest" ,python-pytest)))
2976 (home-page
2977 "https://github.com/palantir/python-jsonrpc-server")
2978 (synopsis "JSON RPC 2.0 server library")
2979 (description
2980 "This package provides a JSON RPC 2.0 server library for Python.")
2981 (license license:expat)))
2982
2983 (define-public python-pydocstyle
2984 (package
2985 (name "python-pydocstyle")
2986 (version "3.0.0")
2987 (source
2988 (origin
2989 (method url-fetch)
2990 (uri (pypi-uri "pydocstyle" version))
2991 (sha256
2992 (base32
2993 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2994 (build-system python-build-system)
2995 (propagated-inputs
2996 `(("python-six" ,python-six)
2997 ("python-snowballstemmer" ,python-snowballstemmer)))
2998 (home-page
2999 "https://github.com/PyCQA/pydocstyle/")
3000 (synopsis "Python docstring style checker")
3001 (description
3002 "This package provides a style checker for the Python Language
3003 Server (PLS).")
3004 (license license:expat)))
3005
3006 (define-public python-language-server
3007 (package
3008 (name "python-language-server")
3009 (version "0.26.1")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "python-language-server" version))
3014 (sha256
3015 (base32
3016 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-pluggy" ,python-pluggy)
3020 ("python-jsonrpc-server" ,python-jsonrpc-server)
3021 ("python-jedi" ,python-jedi)
3022 ("python-yapf" ,python-yapf)
3023 ("python-pyflakes" ,python-pyflakes)
3024 ("python-pydocstyle" ,python-pydocstyle)
3025 ("python-pycodestyle" ,python-pycodestyle)
3026 ("python-mccabe" ,python-mccabe)
3027 ("python-rope" ,python-rope)
3028 ("python-autopep8" ,python-autopep8)
3029 ("python-pylint" ,python-pylint)))
3030 (home-page "https://github.com/palantir/python-language-server")
3031 (synopsis "Python implementation of the Language Server Protocol")
3032 (description
3033 "The Python Language Server (pyls) is an implementation of the Python 3
3034 language specification for the Language Server Protocol (LSP). This tool is
3035 used in text editing environments to provide a complete and integrated
3036 feature-set for programming Python effectively.")
3037 (license license:expat)))
3038
3039 (define-public python-black
3040 (package
3041 (name "python-black")
3042 (version "18.6b4")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "black" version))
3047 (sha256
3048 (base32
3049 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3050 (build-system python-build-system)
3051 (arguments
3052 `(#:phases
3053 (modify-phases %standard-phases
3054 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3055 (lambda _
3056 (let ((python3 (which "python3")))
3057 (substitute* '("tests/data/fmtonoff.py"
3058 "tests/data/string_prefixes.py"
3059 "tests/data/function.py")
3060 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3061 (string-append "#!" python3 (if (string? minor-version)
3062 minor-version
3063 ""))))))))))
3064 (propagated-inputs
3065 `(("python-click" ,python-click)
3066 ("python-attrs" ,python-attrs)
3067 ("python-appdirs" ,python-appdirs)
3068 ("python-toml" ,python-toml)))
3069 (home-page "https://github.com/ambv/black")
3070 (synopsis "The uncompromising code formatter")
3071 (description "Black is the uncompromising Python code formatter.")
3072 (license license:expat)))
3073
3074 (define-public python-blinker
3075 (package
3076 (name "python-blinker")
3077 (version "1.4")
3078 (source
3079 (origin
3080 (method url-fetch)
3081 (uri (pypi-uri "blinker" version))
3082 (sha256
3083 (base32
3084 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3085 (build-system python-build-system)
3086 (home-page "http://pythonhosted.org/blinker/")
3087 (synopsis "Fast, simple object-to-object and broadcast signaling")
3088 (description
3089 "Blinker provides a fast dispatching system that allows any number of
3090 interested parties to subscribe to events, or \"signals\".")
3091 (license license:expat)))
3092
3093 (define-public python2-blinker
3094 (package-with-python2 python-blinker))
3095
3096 (define-public pelican
3097 (package
3098 (name "pelican")
3099 (version "4.0.1")
3100 (source
3101 (origin
3102 (method url-fetch)
3103 (uri (pypi-uri "pelican" version))
3104 (sha256
3105 (base32
3106 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3107 (build-system python-build-system)
3108 (propagated-inputs
3109 `(("python-feedgenerator" ,python-feedgenerator)
3110 ("python-jinja2" ,python-jinja2)
3111 ("python-pygments" ,python-pygments)
3112 ("python-docutils" ,python-docutils)
3113 ("python-pytz" ,python-pytz)
3114 ("python-blinker" ,python-blinker)
3115 ("python-unidecode" ,python-unidecode)
3116 ("python-six" ,python-six)
3117 ("python-dateutil" ,python-dateutil)
3118 ("python-markdown" ,python-markdown)))
3119 (home-page "https://getpelican.com/")
3120 (arguments
3121 `(;; XXX Requires a lot more packages to do unit tests :P
3122 #:tests? #f
3123 #:phases (modify-phases %standard-phases
3124 (add-before
3125 'install 'adjust-requires
3126 ;; Since feedgenerator is installed from git, it doesn't
3127 ;; conform to the version requirements.
3128 ;;
3129 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3130 ;; version requirement so setuptools doesn't get confused.
3131 (lambda _
3132 (substitute* "setup.py"
3133 (("['\"]feedgenerator.*?['\"]")
3134 "'feedgenerator'")))))))
3135 (synopsis "Python-based static site publishing system")
3136 (description
3137 "Pelican is a tool to generate a static blog from reStructuredText,
3138 Markdown input files, and more. Pelican uses Jinja2 for templating
3139 and is very extensible.")
3140 (license license:agpl3+)))
3141
3142 (define-public mallard-ducktype
3143 (package
3144 (name "mallard-ducktype")
3145 (version "1.0.1")
3146 (source
3147 (origin
3148 (method git-fetch)
3149 ;; git-reference because a proper source tarball is not available
3150 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3151 (uri (git-reference
3152 (url "https://github.com/projectmallard/mallard-ducktype.git")
3153 (commit version)))
3154 (file-name (git-file-name name version))
3155 (sha256
3156 (base32
3157 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3158 (build-system python-build-system)
3159 (arguments
3160 '(#:phases
3161 (modify-phases %standard-phases
3162 (replace 'check
3163 (lambda _
3164 (with-directory-excursion "tests"
3165 (invoke "sh" "runtests")))))))
3166 (home-page "http://projectmallard.org")
3167 (synopsis "Convert Ducktype to Mallard documentation markup")
3168 (description
3169 "Ducktype is a lightweight syntax that can represent all the semantics
3170 of the Mallard XML documentation system. Ducktype files can be converted to
3171 Mallard using the @command{ducktype} tool. The yelp-tools package
3172 provides additional functionality on the produced Mallard documents.")
3173 (license license:expat)))
3174
3175 (define-public python-scikit-image
3176 (package
3177 (name "python-scikit-image")
3178 (version "0.14.2")
3179 (source
3180 (origin
3181 (method url-fetch)
3182 (uri (pypi-uri "scikit-image" version))
3183 (sha256
3184 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3185 (build-system python-build-system)
3186 (arguments
3187 ;; TODO: Some tests require running X11 server. Disable them?
3188 '(#:tests? #f))
3189 ;; See DEPENDS.txt for the list of build and run time requiremnts
3190 (propagated-inputs
3191 `(("python-cloudpickle" ,python-cloudpickle)
3192 ("python-dask" ,python-dask)
3193 ("python-matplotlib" ,python-matplotlib)
3194 ("python-networkx" ,python-networkx)
3195 ("python-numpy" ,python-numpy)
3196 ("python-pillow" ,python-pillow)
3197 ("python-pywavelets" ,python-pywavelets)
3198 ("python-scipy" ,python-scipy)
3199 ("python-six" ,python-six)))
3200 (native-inputs
3201 `(("python-cython" ,python-cython)))
3202 (home-page "http://scikit-image.org/")
3203 (synopsis "Image processing in Python")
3204 (description
3205 "Scikit-image is a collection of algorithms for image processing.")
3206 (license license:bsd-3)))
3207
3208 (define-public python2-scikit-image
3209 (package-with-python2 python-scikit-image))
3210
3211 (define-public python-cython
3212 (package
3213 (name "python-cython")
3214 (version "0.29.11")
3215 (source
3216 (origin
3217 (method url-fetch)
3218 (uri (pypi-uri "Cython" version))
3219 (sha256
3220 (base32
3221 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3222 (build-system python-build-system)
3223 ;; we need the full python package and not just the python-wrapper
3224 ;; because we need libpython3.3m.so
3225 (inputs
3226 `(("python" ,python)))
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (add-before 'check 'set-HOME
3231 ;; some tests require access to "$HOME/.cython"
3232 (lambda _ (setenv "HOME" "/tmp") #t))
3233
3234 ;; FIXME: These tests started failing on armhf after the 0.28 update
3235 ;; (commit c69d11c5930), both with an error such as this:
3236 ;; compiling (cpp) and running dictcomp ...
3237 ;; === C/C++ compiler error output: ===
3238 ;; ‘
3239 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3240 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3241 ,@(if (target-arm32?)
3242 `((add-before 'check 'disable-failing-tests
3243 (lambda _
3244 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3245 (for-each (lambda (test)
3246 (format disabled-tests "~a\n" test))
3247 '("memslice" "dictcomp"))
3248 (close-port disabled-tests)))))
3249 '())
3250
3251 (replace 'check
3252 (lambda _
3253 ;; Disable compiler optimizations to greatly reduce the running
3254 ;; time of the test suite.
3255 (setenv "CFLAGS" "-O0")
3256
3257 (invoke "python" "runtests.py" "-vv"
3258 "-j" (number->string (parallel-job-count))))))))
3259 (home-page "https://cython.org/")
3260 (synopsis "C extensions for Python")
3261 (description "Cython is an optimising static compiler for both the Python
3262 programming language and the extended Cython programming language. It makes
3263 writing C extensions for Python as easy as Python itself.")
3264 (license license:asl2.0)
3265 (properties `((python2-variant . ,(delay python2-cython))))))
3266
3267 (define-public python2-cython
3268 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3269 (package
3270 (inherit base)
3271 (name "python2-cython")
3272 (inputs
3273 `(("python-2" ,python-2))) ;this is not automatically changed
3274 (arguments
3275 (substitute-keyword-arguments (package-arguments base)
3276 ((#:phases phases)
3277 `(modify-phases ,phases
3278 (add-before 'check 'adjust-test_embed
3279 (lambda _
3280 (substitute* "runtests.py"
3281 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3282 ;; so it can give the right -L flag to GCC when embedding static
3283 ;; builds of Python. It is unaware that the Python "config"
3284 ;; directory (where the static library lives) was renamed in
3285 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3286 ;; which works fine, because that is where the shared library is.
3287 ;;
3288 ;; It also appears to be unaware that the Makefile in Demos/embed
3289 ;; already unconditionally pass the static library location to GCC,
3290 ;; after checking sysconfig.get_config_var('LIBPL).
3291 ;;
3292 ;; The effect is that the linker is unable to resolve libexpat
3293 ;; symbols when building for Python 2, because neither the Python 2
3294 ;; shared library nor Expat is available. To fix it, we can either
3295 ;; add Expat as an input and make it visible to the linker, or just
3296 ;; prevent it from overriding the Python shared library location.
3297 ;; The end result is identical, so we take the easy route.
3298 ((" or libname not in os\\.listdir\\(libdir\\)")
3299 ""))
3300 #t)))))))))
3301
3302 ;; The RPython toolchain currently does not support Python 3.
3303 (define-public python2-rpython
3304 (package
3305 (name "python2-rpython")
3306 (version "0.2.1")
3307 (source
3308 (origin
3309 (method url-fetch)
3310 (uri (pypi-uri "rpython" version))
3311 (sha256
3312 (base32
3313 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3314 (build-system python-build-system)
3315 (arguments `(#:python ,python-2))
3316 (native-inputs
3317 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3318 (home-page "https://rpython.readthedocs.org")
3319 (synopsis "Framework for implementing interpreters and virtual machines")
3320 (description "RPython is a translation and support framework for
3321 producing implementations of dynamic languages, emphasizing a clean separation
3322 between language specification and implementation aspects.")
3323 (license license:expat)))
3324
3325 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3326 ;; python-scipy still build, as these three packages are often used together.
3327 (define-public python-numpy
3328 (package
3329 (name "python-numpy")
3330 (version "1.15.4")
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (string-append
3335 "https://github.com/numpy/numpy/releases/download/v"
3336 version "/numpy-" version ".tar.gz"))
3337 (sha256
3338 (base32
3339 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3340 (build-system python-build-system)
3341 (inputs
3342 `(("openblas" ,openblas)
3343 ("lapack" ,lapack)))
3344 (native-inputs
3345 `(("python-cython" ,python-cython)
3346 ("python-pytest" ,python-pytest)
3347 ("gfortran" ,gfortran)))
3348 (arguments
3349 `(#:phases
3350 (modify-phases %standard-phases
3351 (add-before 'build 'configure-blas-lapack
3352 (lambda* (#:key inputs #:allow-other-keys)
3353 (call-with-output-file "site.cfg"
3354 (lambda (port)
3355 (format port
3356 "[openblas]
3357 libraries = openblas
3358 library_dirs = ~a/lib
3359 include_dirs = ~a/include
3360
3361 # backslash-n to make emacs happy
3362 \n[lapack]
3363 lapack_libs = lapack
3364 library_dirs = ~a/lib
3365 include_dirs = ~a/include
3366 "
3367 (assoc-ref inputs "openblas")
3368 (assoc-ref inputs "openblas")
3369 (assoc-ref inputs "lapack")
3370 (assoc-ref inputs "lapack"))))
3371 #t))
3372 (add-before 'build 'fix-executable-paths
3373 (lambda* (#:key inputs #:allow-other-keys)
3374 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3375 ;; instead of /bin/sh.
3376 (substitute* "numpy/distutils/exec_command.py"
3377 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3378 (string-append match-start (assoc-ref inputs "bash") match-end)))
3379 ;; Use "gcc" executable, not "cc".
3380 (substitute* "numpy/distutils/system_info.py"
3381 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3382 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3383 #t))
3384 ;; Tests can only be run after the library has been installed and not
3385 ;; within the source directory.
3386 (delete 'check)
3387 (add-after 'install 'check
3388 (lambda* (#:key outputs inputs #:allow-other-keys)
3389 ;; Make installed package available for running the tests
3390 (add-installed-pythonpath inputs outputs)
3391 ;; Make sure "f2py" etc is found.
3392 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3393 ":" (getenv "PATH")))
3394 (with-directory-excursion "/tmp"
3395 (invoke "python" "-c"
3396 "import numpy; numpy.test(verbose=2)")))))))
3397 (home-page "http://www.numpy.org/")
3398 (synopsis "Fundamental package for scientific computing with Python")
3399 (description "NumPy is the fundamental package for scientific computing
3400 with Python. It contains among other things: a powerful N-dimensional array
3401 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3402 and Fortran code, useful linear algebra, Fourier transform, and random number
3403 capabilities.")
3404 (license license:bsd-3)))
3405
3406 (define-public python2-numpy
3407 (package-with-python2 python-numpy))
3408
3409 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3410 ;; interest only for legacy code going back to NumPy's predecessor
3411 ;; Numeric.
3412 (define-public python2-numpy-1.8
3413 (package (inherit python2-numpy)
3414 (version "1.8.2")
3415 (source
3416 (origin
3417 (method url-fetch)
3418 (uri (string-append
3419 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3420 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3421 (sha256
3422 (base32
3423 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3424 (arguments
3425 (substitute-keyword-arguments (package-arguments python2-numpy)
3426 ((#:phases phases)
3427 `(modify-phases ,phases
3428 (replace 'configure-blas-lapack
3429 (lambda* (#:key inputs #:allow-other-keys)
3430 (call-with-output-file "site.cfg"
3431 (lambda (port)
3432 (format port
3433 "[openblas]
3434 libraries = openblas,lapack
3435 library_dirs = ~a/lib:~a/lib
3436 include_dirs = ~a/include:~a/include
3437 "
3438 (assoc-ref inputs "openblas")
3439 (assoc-ref inputs "lapack")
3440 (assoc-ref inputs "openblas")
3441 (assoc-ref inputs "lapack"))))
3442 #t))))))
3443 (native-inputs
3444 `(("python2-nose" ,python2-nose)))
3445 (description "NumPy is the fundamental package for scientific computing
3446 with Python. It contains among other things: a powerful N-dimensional array
3447 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3448 and Fortran code, useful linear algebra, Fourier transform, and random number
3449 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3450 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3451 Numeric.")
3452 (license license:bsd-3)))
3453
3454 (define-public python-munch
3455 (package
3456 (name "python-munch")
3457 (version "2.0.4")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "munch" version))
3462 (sha256
3463 (base32
3464 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3465 (build-system python-build-system)
3466 (home-page "https://github.com/Infinidat/munch")
3467 (synopsis "Dot-accessible dictionary")
3468 (description "Munch is a dot-accessible dictionary similar to JavaScript
3469 objects.")
3470 (license license:expat)))
3471
3472 (define-public python2-munch
3473 (package-with-python2 python-munch))
3474
3475 (define-public python-colormath
3476 (package
3477 (name "python-colormath")
3478 (version "3.0.0")
3479 (source
3480 (origin
3481 (method url-fetch)
3482 (uri (pypi-uri "colormath" version))
3483 (sha256
3484 (base32
3485 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3486 (build-system python-build-system)
3487 (propagated-inputs
3488 `(("python-networkx" ,python-networkx)
3489 ("python-numpy" ,python-numpy)))
3490 (home-page "https://github.com/gtaylor/python-colormath")
3491 (synopsis "Color math and conversion library")
3492 (description
3493 "This is a Python library for color math and conversions.")
3494 (license license:bsd-3)))
3495
3496 (define-public python2-colormath
3497 (package-with-python2 python-colormath))
3498
3499 (define-public python-spectra
3500 (package
3501 (name "python-spectra")
3502 (version "0.0.11")
3503 (source
3504 (origin
3505 (method url-fetch)
3506 (uri (pypi-uri "spectra" version))
3507 (sha256
3508 (base32
3509 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3510 (build-system python-build-system)
3511 (arguments
3512 `(#:phases
3513 (modify-phases %standard-phases
3514 (replace 'check
3515 (lambda _ (invoke "nosetests" "-v"))))))
3516 (propagated-inputs
3517 `(("python-colormath" ,python-colormath)))
3518 (native-inputs
3519 `(("python-nose" ,python-nose)))
3520 (home-page "https://github.com/jsvine/spectra")
3521 (synopsis "Color scales and color conversion")
3522 (description
3523 "This package provides a Python library intended to make color math,
3524 color scales, and color space conversion easy. It has support for:
3525
3526 @enumerate
3527 @item Color scales
3528 @item Color ranges
3529 @item Color blending
3530 @item Brightening/darkening colors
3531 @item Saturating/desaturating colors
3532 @item Conversion to/from multiple color spaces.
3533 @end enumerate\n")
3534 (license license:expat)))
3535
3536 (define-public python2-spectra
3537 (package-with-python2 python-spectra))
3538
3539 (define-public python-numpy-documentation
3540 (package
3541 (name "python-numpy-documentation")
3542 (version (package-version python-numpy))
3543 (source (package-source python-numpy))
3544 (build-system python-build-system)
3545 (native-inputs
3546 `(("python-matplotlib" ,python-matplotlib)
3547 ("python-numpy" ,python-numpy)
3548 ("pkg-config" ,pkg-config)
3549 ("python-sphinx" ,python-sphinx)
3550 ("python-numpydoc" ,python-numpydoc)
3551 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3552 texlive-fonts-cm-super
3553 texlive-fonts-ec
3554 texlive-generic-ifxetex
3555 texlive-generic-pdftex
3556 texlive-latex-amsfonts
3557 texlive-latex-capt-of
3558 texlive-latex-cmap
3559 texlive-latex-environ
3560 texlive-latex-eqparbox
3561 texlive-latex-etoolbox
3562 texlive-latex-expdlist
3563 texlive-latex-fancyhdr
3564 texlive-latex-fancyvrb
3565 texlive-latex-fncychap
3566 texlive-latex-float
3567 texlive-latex-framed
3568 texlive-latex-geometry
3569 texlive-latex-graphics
3570 texlive-latex-hyperref
3571 texlive-latex-mdwtools
3572 texlive-latex-multirow
3573 texlive-latex-needspace
3574 texlive-latex-oberdiek
3575 texlive-latex-parskip
3576 texlive-latex-preview
3577 texlive-latex-tabulary
3578 texlive-latex-threeparttable
3579 texlive-latex-titlesec
3580 texlive-latex-trimspaces
3581 texlive-latex-ucs
3582 texlive-latex-upquote
3583 texlive-latex-url
3584 texlive-latex-varwidth
3585 texlive-latex-wrapfig)))
3586 ("texinfo" ,texinfo)
3587 ("perl" ,perl)
3588 ("scipy-sphinx-theme"
3589 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3590 (method git-fetch)
3591 (uri (git-reference
3592 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3593 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3594 (sha256
3595 (base32
3596 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3597 ,@(package-native-inputs python-numpy)))
3598 (arguments
3599 `(#:tests? #f ; we're only generating the documentation
3600 #:phases
3601 (modify-phases %standard-phases
3602 (delete 'build)
3603 (replace 'install
3604 (lambda* (#:key inputs outputs #:allow-other-keys)
3605 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3606 (doc (string-append
3607 data "/doc/" ,name "-"
3608 ,(package-version python-numpy)))
3609 (info-reader (string-append data "/info"))
3610 (html (string-append doc "/html"))
3611 (scipy-sphinx-theme "scipy-sphinx-theme")
3612 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3613 (pyver ,(string-append "PYVER=")))
3614
3615 ;; FIXME: this is needed to for texlive-union to generate
3616 ;; fonts, which are not found.
3617 (setenv "HOME" "/tmp")
3618
3619 (with-directory-excursion "doc"
3620 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3621 (mkdir-p html)
3622 (invoke "make" "html" pyver)
3623 (invoke "make" "latex" "PAPER=a4" pyver)
3624 (invoke "make" "-C" "build/latex"
3625 "all-pdf" "PAPER=a4" pyver)
3626 ;; FIXME: Generation of the info file fails.
3627 ;; (invoke "make" "info" pyver)
3628 ;; (mkdir-p info)
3629 ;; (copy-file "build/texinfo/numpy.info"
3630 ;; (string-append info "/numpy.info"))
3631 (for-each (lambda (file)
3632 (copy-file (string-append "build/latex" file)
3633 (string-append doc file)))
3634 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3635 (with-directory-excursion "build/html"
3636 (for-each (lambda (file)
3637 (let* ((dir (dirname file))
3638 (tgt-dir (string-append html "/" dir)))
3639 (unless (equal? "." dir)
3640 (mkdir-p tgt-dir))
3641 (install-file file html)))
3642 (find-files "." ".*")))))
3643 #t)))))
3644 (home-page (package-home-page python-numpy))
3645 (synopsis "Documentation for the python-numpy package")
3646 (description (package-description python-numpy))
3647 (license (package-license python-numpy))))
3648
3649 (define-public python2-numpy-documentation
3650 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3651 (package
3652 (inherit numpy-documentation)
3653 (native-inputs `(("python2-functools32" ,python2-functools32)
3654 ,@(package-native-inputs numpy-documentation))))))
3655
3656 (define-public python-pygit2
3657 (package
3658 (name "python-pygit2")
3659 (version "0.28.2")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "pygit2" version))
3664 (sha256
3665 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3666 (build-system python-build-system)
3667 (arguments
3668 '(#:tests? #f)) ; tests don't run correctly in our environment
3669 (propagated-inputs
3670 `(("python-six" ,python-six)
3671 ("python-cffi" ,python-cffi)
3672 ("libgit2" ,libgit2)
3673 ("python-tox" ,python-tox)))
3674 (native-inputs
3675 `(("python-pytest" ,python-pytest)))
3676 (home-page "https://github.com/libgit2/pygit2")
3677 (synopsis "Python bindings for libgit2")
3678 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3679 library, libgit2 implements Git plumbing.")
3680 ;; GPL2.0 only, with linking exception.
3681 (license license:gpl2)))
3682
3683 (define-public python2-pygit2
3684 (package-with-python2 python-pygit2))
3685
3686 (define-public python-pyparsing
3687 (package
3688 (name "python-pyparsing")
3689 (version "2.3.1")
3690 (source
3691 (origin
3692 (method url-fetch)
3693 (uri (pypi-uri "pyparsing" version))
3694 (sha256
3695 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3696 (build-system python-build-system)
3697 (outputs '("out" "doc"))
3698 (arguments
3699 `(#:tests? #f ; no test target
3700 #:phases
3701 (modify-phases %standard-phases
3702 (add-after 'install 'install-doc
3703 (lambda* (#:key outputs #:allow-other-keys)
3704 (let* ((doc (string-append (assoc-ref outputs "doc")
3705 "/share/doc/" ,name "-" ,version))
3706 (html-doc (string-append doc "/html"))
3707 (examples (string-append doc "/examples")))
3708 (mkdir-p html-doc)
3709 (mkdir-p examples)
3710 (for-each
3711 (lambda (dir tgt)
3712 (map (lambda (file)
3713 (install-file file tgt))
3714 (find-files dir ".*")))
3715 (list "docs" "htmldoc" "examples")
3716 (list doc html-doc examples))
3717 #t))))))
3718 (home-page "https://github.com/pyparsing/pyparsing")
3719 (synopsis "Python parsing class library")
3720 (description
3721 "The pyparsing module is an alternative approach to creating and
3722 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3723 of regular expressions. The pyparsing module provides a library of classes
3724 that client code uses to construct the grammar directly in Python code.")
3725 (license license:expat)))
3726
3727 (define-public python2-pyparsing
3728 (package-with-python2 python-pyparsing))
3729
3730 (define-public python-numpydoc
3731 (package
3732 (name "python-numpydoc")
3733 (version "0.8.0")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "numpydoc" version))
3738 (sha256
3739 (base32
3740 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3741 (build-system python-build-system)
3742 (propagated-inputs
3743 `(("python-sphinx" ,python-sphinx)))
3744 (native-inputs
3745 `(("python-nose" ,python-nose)))
3746 (home-page "https://pypi.python.org/pypi/numpydoc")
3747 (synopsis
3748 "Numpy's Sphinx extensions")
3749 (description
3750 "Sphinx extension to support docstrings in Numpy format.")
3751 (license license:bsd-2)))
3752
3753 (define-public python2-numpydoc
3754 (package-with-python2 python-numpydoc))
3755
3756 (define-public python-numexpr
3757 (package
3758 (name "python-numexpr")
3759 (version "2.6.5")
3760 (source
3761 (origin
3762 (method url-fetch)
3763 (uri (pypi-uri "numexpr" version))
3764 (sha256
3765 (base32
3766 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3767 (build-system python-build-system)
3768 (arguments `(#:tests? #f)) ; no tests included
3769 (propagated-inputs
3770 `(("python-numpy" ,python-numpy)))
3771 (home-page "https://github.com/pydata/numexpr")
3772 (synopsis "Fast numerical expression evaluator for NumPy")
3773 (description
3774 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3775 expressions that operate on arrays are accelerated and use less memory than
3776 doing the same calculation in Python. In addition, its multi-threaded
3777 capabilities can make use of all your cores, which may accelerate
3778 computations, most specially if they are not memory-bounded (e.g. those using
3779 transcendental functions).")
3780 (license license:expat)))
3781
3782 (define-public python2-numexpr
3783 (package-with-python2 python-numexpr))
3784
3785 (define-public python-cycler
3786 (package
3787 (name "python-cycler")
3788 (version "0.10.0")
3789 (source (origin
3790 (method url-fetch)
3791 (uri (pypi-uri "cycler" version))
3792 (sha256
3793 (base32
3794 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3795 (build-system python-build-system)
3796 (arguments
3797 ;; XXX: The current version requires 'coveralls' which we don't have.
3798 ;; Enable this for the next release which uses 'python-pytest'.
3799 '(#:tests? #f))
3800 (propagated-inputs
3801 `(("python-six" ,python-six)))
3802 (home-page "http://matplotlib.org/cycler/")
3803 (synopsis "Composable keyword argument iterator")
3804 (description
3805 "When using @code{matplotlib} and plotting more than one line, it is
3806 common to want to be able to want to be able to cycle over one or more artist
3807 styles; but the plotting logic can quickly become involved.
3808 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3809 @code{Cycler} class was developed.")
3810 (license license:bsd-3)))
3811
3812 (define-public python2-cycler
3813 (package-with-python2 python-cycler))
3814
3815 (define-public python-colorspacious
3816 (package
3817 (name "python-colorspacious")
3818 (version "1.1.0")
3819 (source
3820 (origin
3821 (method git-fetch)
3822 (uri (git-reference
3823 (url "https://github.com/njsmith/colorspacious.git")
3824 (commit (string-append "v" version))))
3825 (file-name (git-file-name name version))
3826 (sha256
3827 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3828 (build-system python-build-system)
3829 (propagated-inputs
3830 `(("python-numpy" ,python-numpy)))
3831 (native-inputs
3832 `(("python-nose" ,python-nose)))
3833 (arguments
3834 `(#:phases
3835 (modify-phases %standard-phases
3836 (replace 'check
3837 (lambda _
3838 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3839 (home-page "https://github.com/njsmith/colorspacious")
3840 (synopsis "Python library for colorspace conversions")
3841 (description "@code{colorspacious} is a Python library that lets you
3842 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3843 (license license:expat)))
3844
3845 (define-public python2-colorspacious
3846 (package-with-python2 python-colorspacious))
3847
3848 (define-public python-matplotlib
3849 (package
3850 (name "python-matplotlib")
3851 (version "2.2.3")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "matplotlib" version))
3856 (sha256
3857 (base32
3858 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3859 (build-system python-build-system)
3860 (propagated-inputs ; the following packages are all needed at run time
3861 `(("python-cycler" ,python-cycler)
3862 ("python-kiwisolver" ,python-kiwisolver)
3863 ("python-pyparsing" ,python-pyparsing)
3864 ("python-pygobject" ,python-pygobject)
3865 ("gobject-introspection" ,gobject-introspection)
3866 ("python-tkinter" ,python "tk")
3867 ("python-dateutil" ,python-dateutil)
3868 ("python-numpy" ,python-numpy)
3869 ("python-pillow" ,python-pillow)
3870 ("python-pytz" ,python-pytz)
3871 ("python-six" ,python-six)
3872 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3873 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3874 ;; object. For this reason we need to import both libraries.
3875 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3876 ("python-pycairo" ,python-pycairo)
3877 ("python-cairocffi" ,python-cairocffi)))
3878 (inputs
3879 `(("libpng" ,libpng)
3880 ("imagemagick" ,imagemagick)
3881 ("freetype" ,freetype)
3882 ("cairo" ,cairo)
3883 ("glib" ,glib)
3884 ;; FIXME: Add backends when available.
3885 ;("python-wxpython" ,python-wxpython)
3886 ("tcl" ,tcl)
3887 ("tk" ,tk)))
3888 (native-inputs
3889 `(("pkg-config" ,pkg-config)
3890 ("python-nose" ,python-nose)
3891 ("python-mock" ,python-mock)))
3892 (arguments
3893 `(#:phases
3894 (modify-phases %standard-phases
3895 (add-before 'build 'configure-environment
3896 (lambda* (#:key outputs inputs #:allow-other-keys)
3897 (let ((cairo (assoc-ref inputs "cairo")))
3898 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3899 ;; has not effect.
3900 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3901 (setenv "HOME" (getcwd))
3902 (call-with-output-file "setup.cfg"
3903 (lambda (port)
3904 (format port "[directories]~%
3905 basedirlist = ~a,~a~%
3906 [rc_options]~%
3907 backend = TkAgg~%"
3908 (assoc-ref inputs "tcl")
3909 (assoc-ref inputs "tk")))))
3910 #t)))))
3911 (home-page "http://matplotlib.org")
3912 (synopsis "2D plotting library for Python")
3913 (description
3914 "Matplotlib is a Python 2D plotting library which produces publication
3915 quality figures in a variety of hardcopy formats and interactive environments
3916 across platforms. Matplotlib can be used in Python scripts, the python and
3917 ipython shell, web application servers, and six graphical user interface
3918 toolkits.")
3919 (license license:psfl)
3920 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3921
3922 (define-public python2-matplotlib
3923 (let ((matplotlib (package-with-python2
3924 (strip-python2-variant python-matplotlib))))
3925 (package (inherit matplotlib)
3926 ;; Make sure to use special packages for Python 2 instead
3927 ;; of those automatically rewritten by package-with-python2.
3928 (propagated-inputs
3929 `(("python2-pycairo" ,python2-pycairo)
3930 ("python2-backports-functools-lru-cache"
3931 ,python2-backports-functools-lru-cache)
3932 ("python2-functools32" ,python2-functools32)
3933 ("python2-pygobject-2" ,python2-pygobject-2)
3934 ("python2-subprocess32" ,python2-subprocess32)
3935 ("python2-tkinter" ,python-2 "tk")
3936 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3937 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3938
3939 (define-public python-matplotlib-documentation
3940 (package
3941 (name "python-matplotlib-documentation")
3942 (version (package-version python-matplotlib))
3943 (source (package-source python-matplotlib))
3944 (build-system python-build-system)
3945 (native-inputs
3946 `(("python-matplotlib" ,python-matplotlib)
3947 ("python-colorspacious" ,python-colorspacious)
3948 ("python-sphinx" ,python-sphinx)
3949 ("python-sphinx-gallery" ,python-sphinx-gallery)
3950 ("python-numpydoc" ,python-numpydoc)
3951 ("python-ipython" ,python-ipython)
3952 ("python-ipykernel" ,python-ipykernel)
3953 ("python-mock" ,python-mock)
3954 ("graphviz" ,graphviz)
3955 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3956 texlive-latex-amsmath
3957 texlive-latex-enumitem
3958 texlive-latex-expdlist
3959 texlive-latex-geometry
3960 texlive-latex-preview
3961 texlive-latex-type1cm
3962 texlive-latex-ucs
3963
3964 texlive-generic-pdftex
3965
3966 texlive-fonts-amsfonts
3967 texlive-fonts-ec
3968 texlive-fonts-adobe-times
3969 texlive-fonts-txfonts)))
3970 ("texinfo" ,texinfo)
3971 ,@(package-native-inputs python-matplotlib)))
3972 (arguments
3973 `(#:tests? #f ; we're only generating documentation
3974 #:phases
3975 (modify-phases %standard-phases
3976 (replace 'build
3977 (lambda _
3978 (chdir "doc")
3979 (setenv "PYTHONPATH"
3980 (string-append (getenv "PYTHONPATH")
3981 ":" (getcwd) "/../examples/units"))
3982 (substitute* "conf.py"
3983 ;; Don't use git.
3984 (("^SHA = check_output.*")
3985 (string-append "SHA = \"" ,version "\"\n"))
3986 ;; Don't fetch intersphinx files from the Internet
3987 (("^explicit_order_folders" m)
3988 (string-append "intersphinx_mapping = {}\n" m))
3989 (("'sphinx.ext.intersphinx',") "")
3990 ;; Disable URL embedding which requires internet access.
3991 (("'https://docs.scipy.org/doc/numpy'") "None")
3992 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3993 (invoke "make"
3994 "SPHINXBUILD=sphinx-build"
3995 "SPHINXOPTS=" ; don't abort on warnings
3996 "html" "texinfo")))
3997 (replace 'install
3998 (lambda* (#:key inputs outputs #:allow-other-keys)
3999 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4000 (doc (string-append data "/doc/python-matplotlib-" ,version))
4001 (info (string-append data "/info"))
4002 (html (string-append doc "/html")))
4003 (mkdir-p html)
4004 (mkdir-p info)
4005 (copy-recursively "build/html" html)
4006 (symlink (string-append html "/_images")
4007 (string-append info "/matplotlib-figures"))
4008 (with-directory-excursion "build/texinfo"
4009 (substitute* "matplotlib.texi"
4010 (("@image\\{([^,]*)" all file)
4011 (string-append "@image{matplotlib-figures/" file)))
4012 (symlink (string-append html "/_images")
4013 "./matplotlib-figures")
4014 (invoke "makeinfo" "--no-split"
4015 "-o" "matplotlib.info" "matplotlib.texi"))
4016 (install-file "build/texinfo/matplotlib.info" info))
4017 #t)))))
4018 (home-page (package-home-page python-matplotlib))
4019 (synopsis "Documentation for the python-matplotlib package")
4020 (description (package-description python-matplotlib))
4021 (license (package-license python-matplotlib))))
4022
4023 (define-public python2-matplotlib-documentation
4024 (package-with-python2 python-matplotlib-documentation))
4025
4026 (define-public python-matplotlib-venn
4027 (package
4028 (name "python-matplotlib-venn")
4029 (version "0.11.5")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4034 (sha256
4035 (base32
4036 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4037 (build-system python-build-system)
4038 (arguments '(#:tests? #f)) ; tests are not included
4039 (propagated-inputs
4040 `(("python-matplotlib" ,python-matplotlib)
4041 ("python-numpy" ,python-numpy)
4042 ("python-scipy" ,python-scipy)))
4043 (native-inputs
4044 `(("unzip" ,unzip)))
4045 (home-page "https://github.com/konstantint/matplotlib-venn")
4046 (synopsis "Plot area-proportional Venn diagrams")
4047 (description
4048 "This package provides tools for plotting area-proportional two- and
4049 three-way Venn diagrams in @code{matplotlib}.")
4050 (license license:expat)))
4051
4052 (define-public python2-pysnptools
4053 (package
4054 (name "python2-pysnptools")
4055 (version "0.3.13")
4056 (source
4057 (origin
4058 (method url-fetch)
4059 (uri (pypi-uri "pysnptools" version))
4060 (sha256
4061 (base32
4062 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4063 (build-system python-build-system)
4064 (arguments
4065 `(#:python ,python-2 ; only Python 2.7 is supported
4066 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4067 (propagated-inputs
4068 `(("python2-numpy" ,python2-numpy)
4069 ("python2-scipy" ,python2-scipy)
4070 ("python2-pandas" ,python2-pandas)))
4071 (native-inputs
4072 `(("python2-cython" ,python2-cython)))
4073 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4074 (synopsis "Library for reading and manipulating genetic data")
4075 (description
4076 "PySnpTools is a library for reading and manipulating genetic data. It
4077 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4078 those files. It can also efficiently manipulate ranges of integers using set
4079 operators such as union, intersection, and difference.")
4080 (license license:asl2.0)))
4081
4082 (define-public python-scipy
4083 (package
4084 (name "python-scipy")
4085 (version "1.2.2")
4086 (source
4087 (origin
4088 (method url-fetch)
4089 (uri (pypi-uri "scipy" version))
4090 (sha256
4091 (base32
4092 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4093 (build-system python-build-system)
4094 (propagated-inputs
4095 `(("python-numpy" ,python-numpy)
4096 ("python-matplotlib" ,python-matplotlib)
4097 ("python-pyparsing" ,python-pyparsing)))
4098 (inputs
4099 `(("lapack" ,lapack)
4100 ("openblas" ,openblas)))
4101 (native-inputs
4102 `(("python-cython" ,python-cython)
4103 ("python-pytest" ,python-pytest)
4104 ("python-sphinx" ,python-sphinx)
4105 ("python-numpydoc" ,python-numpydoc)
4106 ("gfortran" ,gfortran)
4107 ("perl" ,perl)
4108 ("which" ,which)))
4109 (outputs '("out" "doc"))
4110 (arguments
4111 `(#:phases
4112 (modify-phases %standard-phases
4113 (add-after 'unpack 'disable-broken-tests
4114 (lambda _
4115 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4116 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4117 (string-append indent
4118 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4119 m)))
4120 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4121 (("^def test_parallel_threads\\(\\):" m)
4122 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4123 m)))
4124 #t))
4125 (add-before 'build 'configure-openblas
4126 (lambda* (#:key inputs #:allow-other-keys)
4127 (call-with-output-file "site.cfg"
4128 (lambda (port)
4129 (format port
4130 "[blas]
4131 libraries = openblas
4132 library_dirs = ~a/lib
4133 include_dirs = ~a/include
4134
4135 # backslash-n to make emacs happy
4136 \n[atlas]
4137 library_dirs = ~a/lib
4138 atlas_libs = openblas
4139 "
4140 (assoc-ref inputs "openblas")
4141 (assoc-ref inputs "openblas")
4142 (assoc-ref inputs "openblas"))))
4143 #t))
4144 (add-after 'install 'install-doc
4145 (lambda* (#:key inputs outputs #:allow-other-keys)
4146 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4147 (doc (string-append data "/doc/" ,name "-" ,version))
4148 (html (string-append doc "/html"))
4149 (pyver ,(string-append "PYVER=" (version-major+minor
4150 (package-version python))))
4151 ;; By default it tries to run sphinx-build through the Python
4152 ;; interpreter which won't work with our shell wrapper.
4153 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4154 ;; Make installed package available for building the
4155 ;; documentation
4156 (add-installed-pythonpath inputs outputs)
4157 (with-directory-excursion "doc"
4158 ;; Fix generation of images for mathematical expressions.
4159 (substitute* (find-files "source" "conf\\.py")
4160 (("pngmath_use_preview = True")
4161 "pngmath_use_preview = False"))
4162 (mkdir-p html)
4163 (invoke "make" "html" pyver sphinxbuild)
4164 (with-directory-excursion "build/html"
4165 (for-each (lambda (file)
4166 (let* ((dir (dirname file))
4167 (tgt-dir (string-append html "/" dir)))
4168 (install-file file html)))
4169 (find-files "." ".*")))))
4170 #t))
4171 ;; Tests can only be run after the library has been installed and not
4172 ;; within the source directory.
4173 (delete 'check)
4174 (add-after 'install 'check
4175 (lambda* (#:key inputs outputs #:allow-other-keys)
4176 (add-installed-pythonpath inputs outputs)
4177 (with-directory-excursion "/tmp"
4178 (invoke "python" "-c"
4179 "import scipy; scipy.test(verbose=2)")))))))
4180 (home-page "https://www.scipy.org/")
4181 (synopsis "The Scipy library provides efficient numerical routines")
4182 (description "The SciPy library is one of the core packages that make up
4183 the SciPy stack. It provides many user-friendly and efficient numerical
4184 routines such as routines for numerical integration and optimization.")
4185 (properties `((python2-variant . ,(delay python2-scipy))))
4186 (license license:bsd-3)))
4187
4188 (define-public python2-scipy
4189 (package-with-python2
4190 (strip-python2-variant python-scipy)))
4191
4192 (define-public python-socksipy-branch
4193 (package
4194 (name "python-socksipy-branch")
4195 (version "1.01")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "SocksiPy-branch" version))
4200 (sha256
4201 (base32
4202 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4203 (build-system python-build-system)
4204 (arguments
4205 `(#:tests? #f)) ; There are no tests
4206 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4207 (synopsis "Python SOCKS module")
4208 (description
4209 "SocksiPy - A Python SOCKS client module. It provides a
4210 socket-like interface that supports connections to any TCP
4211 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4212 The original version was developed by Dan Haim, this is a
4213 branch created by Mario Vilas to address some open issues,
4214 as the original project seems to have been abandoned circa 2007.")
4215 (license license:bsd-3)))
4216
4217 (define-public python2-socksipy-branch
4218 (package-with-python2 python-socksipy-branch))
4219
4220 (define-public python-pycodestyle
4221 (package
4222 (name "python-pycodestyle")
4223 (version "2.5.0")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (pypi-uri "pycodestyle" version))
4228 (sha256
4229 (base32
4230 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4231 (build-system python-build-system)
4232 (home-page "https://pycodestyle.readthedocs.io/")
4233 (synopsis "Python style guide checker")
4234 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4235 Python code against some of the style conventions in
4236 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4237 (license license:expat)))
4238
4239 (define-public python2-pycodestyle
4240 (package-with-python2 python-pycodestyle))
4241
4242 (define-public python-multidict
4243 (package
4244 (name "python-multidict")
4245 (version "4.2.0")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "multidict" version))
4250 (sha256
4251 (base32
4252 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4253 (build-system python-build-system)
4254 (native-inputs
4255 `(("python-pytest" ,python-pytest)
4256 ("python-pytest-runner" ,python-pytest-runner)))
4257 (home-page "https://github.com/aio-libs/multidict/")
4258 (synopsis "Multidict implementation")
4259 (description "Multidict is dict-like collection of key-value pairs
4260 where key might be occurred more than once in the container.")
4261 (license license:asl2.0)))
4262
4263 (define-public python-orderedmultidict
4264 (package
4265 (name "python-orderedmultidict")
4266 (version "0.7.11")
4267 (source
4268 (origin
4269 (method url-fetch)
4270 (uri (pypi-uri "orderedmultidict" version))
4271 (sha256
4272 (base32
4273 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4274 (build-system python-build-system)
4275 (arguments
4276 `(#:phases
4277 (modify-phases %standard-phases
4278 (add-after 'unpack 'fix-tests
4279 (lambda _
4280 ;; The package uses nosetest for running the tests.
4281 ;; Adding this initfile allows to run the test suite
4282 ;; without requiring nosetest.
4283 (with-output-to-file "tests/__init__.py" newline)
4284 #t)))))
4285 (propagated-inputs
4286 `(("python-six" ,python-six)))
4287 (native-inputs
4288 `(("python-pycodestyle" ,python-pycodestyle)))
4289 (home-page "https://github.com/gruns/orderedmultidict")
4290 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4291 (description "This package contains a library for ordered multivalue
4292 dictionaries. A multivalue dictionary is a dictionary that can store
4293 multiple values for the same key. An ordered multivalue dictionary is a
4294 multivalue dictionary that retains the order of insertions and deletions.")
4295 (license license:unlicense)))
4296
4297 (define-public python2-orderedmultidict
4298 (package-with-python2 python-orderedmultidict))
4299
4300 (define-public python-autopep8
4301 (package
4302 (name "python-autopep8")
4303 (version "1.3.5")
4304 (source
4305 (origin
4306 (method url-fetch)
4307 (uri (pypi-uri "autopep8" version))
4308 (sha256
4309 (base32
4310 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4311 (build-system python-build-system)
4312 (propagated-inputs
4313 `(("python-pycodestyle" ,python-pycodestyle)))
4314 (home-page "https://github.com/hhatto/autopep8")
4315 (synopsis "Format Python code according to the PEP 8 style guide")
4316 (description
4317 "@code{autopep8} automatically formats Python code to conform to
4318 the PEP 8 style guide. It uses the pycodestyle utility to determine
4319 what parts of the code needs to be formatted. @code{autopep8} is
4320 capable of fixing most of the formatting issues that can be reported
4321 by pycodestyle.")
4322 (license (license:non-copyleft
4323 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4324
4325 (define-public python2-autopep8
4326 (package-with-python2 python-autopep8))
4327
4328 (define-public python-distutils-extra
4329 (package
4330 (name "python-distutils-extra")
4331 (version "2.38")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4336 version "/+download/python-distutils-extra-"
4337 version ".tar.gz"))
4338 (sha256
4339 (base32
4340 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4341 (build-system python-build-system)
4342 (home-page "https://launchpad.net/python-distutils-extra/")
4343 (synopsis "Enhancements to Python's distutils")
4344 (description
4345 "The python-distutils-extra module enables you to easily integrate
4346 gettext support, themed icons, and scrollkeeper-based documentation into
4347 Python's distutils.")
4348 (license license:gpl2)))
4349
4350 (define-public python2-distutils-extra
4351 (package-with-python2 python-distutils-extra))
4352
4353 (define-public python2-elib.intl
4354 (package
4355 (name "python2-elib.intl")
4356 (version "0.0.3")
4357 (source
4358 (origin
4359 ;; This project doesn't tag releases or publish tarballs, so we take
4360 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4361 (method git-fetch)
4362 (uri (git-reference
4363 (url "https://github.com/dieterv/elib.intl.git")
4364 (commit "d09997cfef")))
4365 (file-name (string-append name "-" version "-checkout"))
4366 (sha256
4367 (base32
4368 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4369 (build-system python-build-system)
4370 (arguments
4371 ;; incompatible with Python 3 (exception syntax)
4372 `(#:python ,python-2
4373 #:tests? #f))
4374 (home-page "https://github.com/dieterv/elib.intl")
4375 (synopsis "Enhanced internationalization for Python")
4376 (description
4377 "The elib.intl module provides enhanced internationalization (I18N)
4378 services for your Python modules and applications.")
4379 (license license:lgpl3+)))
4380
4381 (define-public python-olefile
4382 (package
4383 (name "python-olefile")
4384 (version "0.46")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4389 "download/v" version "/olefile-" version ".tar.gz"))
4390 (file-name (string-append name "-" version ".tar.gz"))
4391 (sha256
4392 (base32
4393 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4394 (build-system python-build-system)
4395 (home-page "https://www.decalage.info/python/olefileio")
4396 (synopsis "Read and write Microsoft OLE2 files.")
4397 (description
4398 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4399 Storage or Compound Document, Microsoft Office). It is an improved version of
4400 the OleFileIO module from PIL, the Python Image Library.")
4401 (license license:bsd-3)))
4402
4403 (define-public python2-olefile
4404 (package-with-python2 python-olefile))
4405
4406 (define-public python-pillow
4407 (package
4408 (name "python-pillow")
4409 (version "6.1.0")
4410 (source
4411 (origin
4412 (method url-fetch)
4413 (uri (pypi-uri "Pillow" version))
4414 (sha256
4415 (base32
4416 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4417 (build-system python-build-system)
4418 (native-inputs
4419 `(("python-pytest" ,python-pytest)))
4420 (inputs
4421 `(("freetype" ,freetype)
4422 ("lcms" ,lcms)
4423 ("zlib" ,zlib)
4424 ("libjpeg" ,libjpeg)
4425 ("openjpeg" ,openjpeg)
4426 ("libtiff" ,libtiff)
4427 ("libwebp" ,libwebp)))
4428 (propagated-inputs
4429 `(("python-olefile" ,python-olefile)))
4430 (arguments
4431 `(#:phases
4432 (modify-phases %standard-phases
4433 (add-after 'unpack 'patch-ldconfig
4434 (lambda _
4435 (substitute* "setup.py"
4436 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4437 (delete 'check) ; We must run checks after python-pillow is installed.
4438 (add-after 'install 'check-installed
4439 (lambda* (#:key outputs inputs #:allow-other-keys)
4440 (begin
4441 (setenv "HOME" (getcwd))
4442 ;; Make installed package available for running the tests.
4443 (add-installed-pythonpath inputs outputs)
4444 (invoke "python" "selftest.py" "--installed")
4445 (invoke "python" "-m" "pytest" "-vv")))))))
4446 (home-page "https://python-pillow.org")
4447 (synopsis "Fork of the Python Imaging Library")
4448 (description
4449 "The Python Imaging Library adds image processing capabilities to your
4450 Python interpreter. This library provides extensive file format support, an
4451 efficient internal representation, and fairly powerful image processing
4452 capabilities. The core image library is designed for fast access to data
4453 stored in a few basic pixel formats. It should provide a solid foundation for
4454 a general image processing tool.")
4455 (license (license:x11-style
4456 "http://www.pythonware.com/products/pil/license.htm"
4457 "The PIL Software License"))))
4458
4459 (define-public python2-pillow
4460 (package-with-python2 python-pillow))
4461
4462 (define-public python-pycparser
4463 (package
4464 (name "python-pycparser")
4465 (version "2.19")
4466 (source
4467 (origin
4468 (method url-fetch)
4469 (uri (pypi-uri "pycparser" version))
4470 (sha256
4471 (base32
4472 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4473 (outputs '("out" "doc"))
4474 (build-system python-build-system)
4475 (native-inputs
4476 `(("pkg-config" ,pkg-config)))
4477 (arguments
4478 `(#:phases
4479 (modify-phases %standard-phases
4480 (replace 'check
4481 (lambda _
4482 (with-directory-excursion "tests"
4483 (invoke "python" "all_tests.py"))
4484 #t))
4485 (add-after 'install 'install-doc
4486 (lambda* (#:key outputs #:allow-other-keys)
4487 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4488 (doc (string-append data "/doc/" ,name "-" ,version))
4489 (examples (string-append doc "/examples")))
4490 (mkdir-p examples)
4491 (for-each (lambda (file)
4492 (copy-file (string-append "." file)
4493 (string-append doc file)))
4494 '("/README.rst" "/CHANGES" "/LICENSE"))
4495 (copy-recursively "examples" examples)
4496 #t))))))
4497 (home-page "https://github.com/eliben/pycparser")
4498 (synopsis "C parser in Python")
4499 (description
4500 "Pycparser is a complete parser of the C language, written in pure Python
4501 using the PLY parsing library. It parses C code into an AST and can serve as
4502 a front-end for C compilers or analysis tools.")
4503 (license license:bsd-3)))
4504
4505 (define-public python2-pycparser
4506 (package-with-python2 python-pycparser))
4507
4508 (define-public python-pywavelets
4509 (package
4510 (name "python-pywavelets")
4511 (version "1.0.1")
4512 (home-page "https://github.com/PyWavelets/pywt")
4513 (source (origin
4514 (method url-fetch)
4515 (uri (pypi-uri "PyWavelets" version))
4516 (sha256
4517 (base32
4518 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4519 (build-system python-build-system)
4520 (arguments
4521 '(#:modules ((ice-9 ftw)
4522 (srfi srfi-1)
4523 (srfi srfi-26)
4524 (guix build utils)
4525 (guix build python-build-system))
4526 #:phases (modify-phases %standard-phases
4527 (replace 'check
4528 (lambda _
4529 (let ((cwd (getcwd))
4530 (libdir (find (cut string-prefix? "lib." <>)
4531 (scandir "build"))))
4532 (with-directory-excursion (string-append cwd "/build/" libdir)
4533 (invoke "nosetests" "-v" "."))))))))
4534 (native-inputs
4535 `(("python-matplotlib" ,python-matplotlib) ;for tests
4536 ("python-nose" ,python-nose)))
4537 (propagated-inputs
4538 `(("python-numpy" ,python-numpy)))
4539 (synopsis "Wavelet transforms in Python")
4540 (description
4541 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4542 mathematical basis functions that are localized in both time and frequency.
4543 Wavelet transforms are time-frequency transforms employing wavelets. They are
4544 similar to Fourier transforms, the difference being that Fourier transforms are
4545 localized only in frequency instead of in time and frequency.")
4546 (license license:expat)))
4547
4548 (define-public python2-pywavelets
4549 (package-with-python2 python-pywavelets))
4550
4551 (define-public python-xcffib
4552 (package
4553 (name "python-xcffib")
4554 (version "0.6.0")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "xcffib" version))
4559 (sha256
4560 (base32
4561 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4562 (build-system python-build-system)
4563 (inputs
4564 `(("libxcb" ,libxcb)))
4565 (propagated-inputs
4566 `(("python-cffi" ,python-cffi) ; used at run time
4567 ("python-six" ,python-six)))
4568 (arguments
4569 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4570 #:tests? #f
4571 #:phases
4572 (modify-phases %standard-phases
4573 (add-after 'unpack 'fix-libxcb-path
4574 (lambda* (#:key inputs #:allow-other-keys)
4575 (let ((libxcb (assoc-ref inputs "libxcb")))
4576 (substitute* '("xcffib/__init__.py")
4577 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4578 #t)))
4579 (add-after 'install 'install-doc
4580 (lambda* (#:key outputs #:allow-other-keys)
4581 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4582 "/doc/" ,name "-" ,version)))
4583 (mkdir-p doc)
4584 (copy-file "README.md"
4585 (string-append doc "/README.md"))
4586 #t))))))
4587 (home-page "https://github.com/tych0/xcffib")
4588 (synopsis "XCB Python bindings")
4589 (description
4590 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4591 support for Python 3 and PyPy. It is based on cffi.")
4592 (license license:expat)))
4593
4594 (define-public python2-xcffib
4595 (package-with-python2 python-xcffib))
4596
4597 (define-public python-cairocffi
4598 (package
4599 (name "python-cairocffi")
4600 (version "0.9.0")
4601 (source
4602 (origin
4603 (method url-fetch)
4604 (uri (pypi-uri "cairocffi" version))
4605 (sha256
4606 (base32
4607 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4608 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4609 (build-system python-build-system)
4610 (outputs '("out" "doc"))
4611 (inputs
4612 `(("glib" ,glib)
4613 ("gtk+" ,gtk+)
4614 ("gdk-pixbuf" ,gdk-pixbuf)
4615 ("cairo" ,cairo)
4616 ("pango" ,pango)))
4617 (native-inputs
4618 `(("pkg-config" ,pkg-config)
4619 ("python-pytest" ,python-pytest)
4620 ("python-pytest-cov" ,python-pytest-cov)
4621 ("python-pytest-runner" ,python-pytest-runner)
4622 ("python-sphinx" ,python-sphinx)
4623 ("python-docutils" ,python-docutils)))
4624 (propagated-inputs
4625 `(("python-xcffib" ,python-xcffib))) ; used at run time
4626 (arguments
4627 `(#:phases
4628 (modify-phases %standard-phases
4629 (add-after 'unpack 'patch-paths
4630 (lambda* (#:key inputs outputs #:allow-other-keys)
4631 (substitute* (find-files "." "\\.py$")
4632 (("dlopen\\(ffi, 'cairo'")
4633 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4634 "/lib/libcairo.so.2'"))
4635 (("dlopen\\(ffi, 'gdk-3'")
4636 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4637 "/lib/libgtk-3.so.0'"))
4638 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4639 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4640 "/lib/libgdk_pixbuf-2.0.so.0'"))
4641 (("dlopen\\(ffi, 'glib-2.0'")
4642 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4643 "/lib/libglib-2.0.so.0'"))
4644 (("dlopen\\(ffi, 'gobject-2.0'")
4645 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4646 "/lib/libgobject-2.0.so.0'"))
4647 (("dlopen\\(ffi, 'pangocairo-1.0'")
4648 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4649 "/lib/libpangocairo-1.0.so.0'"))
4650 (("dlopen\\(ffi, 'pango-1.0'")
4651 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4652 "/lib/libpango-1.0.so.0'")))
4653 #t))
4654 (add-after 'install 'install-doc
4655 (lambda* (#:key inputs outputs #:allow-other-keys)
4656 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4657 (doc (string-append data "/doc/" ,name "-" ,version))
4658 (html (string-append doc "/html")))
4659 (setenv "LD_LIBRARY_PATH"
4660 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4661 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4662 (setenv "LANG" "en_US.UTF-8")
4663 (mkdir-p html)
4664 (for-each (lambda (file)
4665 (copy-file (string-append "." file)
4666 (string-append doc file)))
4667 '("/README.rst" "/CHANGES" "/LICENSE"))
4668 (system* "python" "setup.py" "build_sphinx")
4669 (copy-recursively "docs/_build/html" html)
4670 #t))))))
4671 (home-page "https://github.com/Kozea/cairocffi")
4672 (synopsis "Python bindings and object-oriented API for Cairo")
4673 (description
4674 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4675 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4676 graphics library with support for multiple backends including image buffers,
4677 PNG, PostScript, PDF, and SVG file output.")
4678 (license license:bsd-3)))
4679
4680 (define-public python2-cairocffi
4681 (package-with-python2 python-cairocffi))
4682
4683 (define-public python-decorator
4684 (package
4685 (name "python-decorator")
4686 (version "4.3.0")
4687 (source
4688 (origin
4689 (method url-fetch)
4690 (uri (pypi-uri "decorator" version))
4691 (sha256
4692 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4693 (build-system python-build-system)
4694 (home-page "https://pypi.python.org/pypi/decorator/")
4695 (synopsis "Python module to simplify usage of decorators")
4696 (description
4697 "The aim of the decorator module is to simplify the usage of decorators
4698 for the average programmer, and to popularize decorators usage giving examples
4699 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4700 etc. The core of this module is a decorator factory.")
4701 (license license:expat)))
4702
4703 (define-public python2-decorator
4704 (package-with-python2 python-decorator))
4705
4706 (define-public python-drmaa
4707 (package
4708 (name "python-drmaa")
4709 (version "0.7.7")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "drmaa" version))
4714 (sha256
4715 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4716 (build-system python-build-system)
4717 ;; The test suite requires libdrmaa which is provided by the cluster
4718 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4719 ;; should be set to the path of the libdrmaa library.
4720 (arguments '(#:tests? #f))
4721 (native-inputs
4722 `(("python-nose" ,python-nose)))
4723 (home-page "https://pypi.python.org/pypi/drmaa")
4724 (synopsis "Python bindings for the DRMAA library")
4725 (description
4726 "A Python package for Distributed Resource Management (DRM) job
4727 submission and control. This package is an implementation of the DRMAA 1.0
4728 Python language binding specification.")
4729 (license license:bsd-3)))
4730
4731 (define-public python2-drmaa
4732 (package-with-python2 python-drmaa))
4733
4734 (define-public python-grako
4735 (package
4736 (name "python-grako")
4737 (version "3.99.9")
4738 (source
4739 (origin
4740 (method url-fetch)
4741 (uri
4742 (pypi-uri "grako" version ".zip"))
4743 (sha256
4744 (base32
4745 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4746 (build-system python-build-system)
4747 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4748 (native-inputs
4749 `(("unzip" ,unzip)
4750 ("python-pytest" ,python-pytest)
4751 ("python-pytest-runner" ,python-pytest-runner)))
4752 (home-page "https://bitbucket.org/neogeny/grako")
4753 (synopsis "EBNF parser generator")
4754 (description
4755 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4756 memoizing PEG/Packrat parser in Python.")
4757 (license license:bsd-3)))
4758
4759 (define-public python2-grako
4760 (package-with-python2 python-grako))
4761
4762 (define-public python-gridmap
4763 (package
4764 (name "python-gridmap")
4765 (version "0.13.0")
4766 (source
4767 (origin
4768 (method git-fetch)
4769 (uri (git-reference
4770 (url "https://github.com/pygridtools/gridmap.git")
4771 (commit (string-append "v" version))))
4772 (file-name (git-file-name name version))
4773 (sha256
4774 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4775 (build-system python-build-system)
4776 (arguments
4777 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4778 (propagated-inputs
4779 `(("python-psutil" ,python-psutil)
4780 ("python-drmaa" ,python-drmaa)
4781 ("python-pyzmq" ,python-pyzmq)))
4782 (home-page "https://github.com/pygridtools/gridmap")
4783 (synopsis "Create jobs on a cluster directly from Python")
4784 (description
4785 "Gridmap is a Python package to allow you to easily create jobs on the
4786 cluster directly from Python. You can directly map Python functions onto the
4787 cluster without needing to write any wrapper code yourself.")
4788 (license license:gpl3+)))
4789
4790 (define-public python2-gridmap
4791 (package-with-python2 python-gridmap))
4792
4793 (define-public python-honcho
4794 (package
4795 (name "python-honcho")
4796 (version "1.0.1")
4797 (source
4798 (origin
4799 (method git-fetch)
4800 (uri (git-reference
4801 (url "https://github.com/nickstenning/honcho.git")
4802 (commit (string-append "v" version))))
4803 (file-name (git-file-name name version))
4804 (sha256
4805 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4806 (build-system python-build-system)
4807 (native-inputs
4808 `(("python-pytest" ,python-pytest)
4809 ("python-mock" ,python-mock)
4810 ("python-tox" ,python-tox)
4811 ("which" ,which))) ;for tests
4812 (propagated-inputs
4813 `(("python-jinja2" ,python-jinja2)))
4814 (arguments
4815 `(#:phases
4816 (modify-phases %standard-phases
4817 (delete 'check)
4818 (add-after 'install 'check
4819 (lambda* (#:key outputs inputs #:allow-other-keys)
4820 ;; fix honcho path in testsuite
4821 (substitute* "tests/conftest.py"
4822 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4823 "/bin/honcho" "'")))
4824 ;; It's easier to run tests after install.
4825 ;; Make installed package available for running the tests
4826 (add-installed-pythonpath inputs outputs)
4827 (invoke "py.test" "-v"))))))
4828 (home-page "https://github.com/nickstenning/honcho")
4829 (synopsis "Manage Procfile-based applications")
4830 (description
4831 "A Procfile is a file which describes how to run an application
4832 consisting of several processes. honcho starts all listed processes.
4833 The output of all running processes is collected by honcho and
4834 displayed.")
4835 (license license:expat)))
4836
4837 (define-public python2-honcho
4838 (package-with-python2 python-honcho))
4839
4840 (define-public python-pexpect
4841 (package
4842 (name "python-pexpect")
4843 (version "4.6.0")
4844 (source
4845 (origin
4846 (method url-fetch)
4847 (uri (pypi-uri "pexpect" version))
4848 (sha256
4849 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4850 (build-system python-build-system)
4851 (arguments
4852 `(#:phases
4853 (modify-phases %standard-phases
4854 (add-before 'check 'prepare-tests
4855 (lambda _
4856 (substitute* (find-files "tests")
4857 (("/bin/ls") (which "ls"))
4858 (("/bin/echo") (which "echo"))
4859 (("/bin/which") (which "which"))
4860 ;; Many tests try to use the /bin directory which
4861 ;; is not present in the build environment.
4862 ;; Use one that's non-empty and unlikely to change.
4863 (("/bin'") "/dev'"))
4864 ;; XXX: Socket connection test gets "Connection reset by peer".
4865 ;; Why does it not work? Delete for now.
4866 (delete-file "tests/test_socket.py")
4867 #t))
4868 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4869 (native-inputs
4870 `(("python-nose" ,python-nose)
4871 ("python-pytest" ,python-pytest)
4872 ("man-db" ,man-db)
4873 ("which" ,which)
4874 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4875 (propagated-inputs
4876 `(("python-ptyprocess" ,python-ptyprocess)))
4877 (home-page "http://pexpect.readthedocs.org/")
4878 (synopsis "Controlling interactive console applications")
4879 (description
4880 "Pexpect is a pure Python module for spawning child applications;
4881 controlling them; and responding to expected patterns in their output.
4882 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4883 child application and control it as if a human were typing commands.")
4884 (license license:isc)))
4885
4886 (define-public python2-pexpect
4887 (package-with-python2 python-pexpect))
4888
4889 (define-public python-setuptools-scm
4890 (package
4891 (name "python-setuptools-scm")
4892 (version "3.2.0")
4893 (source (origin
4894 (method url-fetch)
4895 (uri (pypi-uri "setuptools_scm" version))
4896 (sha256
4897 (base32
4898 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4899 (build-system python-build-system)
4900 (home-page "https://github.com/pypa/setuptools_scm/")
4901 (synopsis "Manage Python package versions in SCM metadata")
4902 (description
4903 "Setuptools_scm handles managing your Python package versions in
4904 @dfn{software configuration management} (SCM) metadata instead of declaring
4905 them as the version argument or in a SCM managed file.")
4906 (license license:expat)))
4907
4908 (define-public python2-setuptools-scm
4909 (package-with-python2 python-setuptools-scm))
4910
4911 (define-public python-pathlib2
4912 (package
4913 (name "python-pathlib2")
4914 (version "2.3.3")
4915 (source
4916 (origin
4917 (method url-fetch)
4918 (uri (pypi-uri "pathlib2" version))
4919 (sha256
4920 (base32
4921 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4922 (build-system python-build-system)
4923 (propagated-inputs
4924 `(("python-scandir" ,python-scandir)
4925 ("python-six" ,python-six)))
4926 (home-page "https://pypi.python.org/pypi/pathlib2/")
4927 (synopsis "Object-oriented file system paths")
4928 (description "The goal of pathlib2 is to provide a backport of the
4929 standard @code{pathlib} module which tracks the standard library module, so
4930 all the newest features of the standard @code{pathlib} can be used also on
4931 older Python versions.")
4932 (license license:expat)))
4933
4934 (define-public python-importlib-metadata
4935 (package
4936 (name "python-importlib-metadata")
4937 (version "0.18")
4938 (source
4939 (origin
4940 (method url-fetch)
4941 (uri (pypi-uri "importlib_metadata" version))
4942 (sha256
4943 (base32
4944 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4945 (build-system python-build-system)
4946 (propagated-inputs
4947 `(("python-configparser" ,python-configparser)
4948 ("python-contextlib2" ,python-contextlib2)
4949 ("python-docutils" ,python-docutils)
4950 ("python-pathlib2" ,python-pathlib2)
4951 ("python-rst.linker" ,python-rst.linker)
4952 ("python-zipp" ,python-zipp)))
4953 (native-inputs
4954 `(("python-setuptools-scm" ,python-setuptools-scm)
4955 ("python-sphinx" ,python-sphinx)))
4956 (home-page "https://importlib-metadata.readthedocs.io/")
4957 (synopsis "Read metadata from Python packages")
4958 (description
4959 "@code{importlib_metadata} is a library which provides an API for
4960 accessing an installed Python package's metadata, such as its entry points or
4961 its top-level name. This functionality intends to replace most uses of
4962 @code{pkg_resources} entry point API and metadata API. Along with
4963 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4964 need to use the older and less efficient @code{pkg_resources} package.")
4965 (license license:asl2.0)))
4966
4967 (define-public python-jaraco-packaging
4968 (package
4969 (name "python-jaraco-packaging")
4970 (version "6.1")
4971 (source
4972 (origin
4973 (method url-fetch)
4974 (uri (pypi-uri "jaraco.packaging" version))
4975 (sha256
4976 (base32
4977 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4978 (build-system python-build-system)
4979 (propagated-inputs
4980 `(("python-pytest" ,python-pytest)
4981 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4982 ("python-pytest-flake8" ,python-pytest-flake8)
4983 ("python-rst.linker" ,python-rst.linker)
4984 ("python-setuptools" ,python-setuptools)
4985 ("python-setuptools-scm" ,python-setuptools-scm)
4986 ("python-six" ,python-six)
4987 ("python-sphinx" ,python-sphinx)))
4988 (home-page "https://github.com/jaraco/jaraco.packaging")
4989 (synopsis "Tools to supplement packaging Python releases")
4990 (description
4991 "This package provides various tools to supplement packaging Python
4992 releases.")
4993 (license license:expat)))
4994
4995 (define-public python-pathpy
4996 (package
4997 (name "python-pathpy")
4998 (version "11.5.0")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "path.py" version))
5003 (sha256
5004 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5005 (outputs '("out" "doc"))
5006 (build-system python-build-system)
5007 (propagated-inputs
5008 `(("python-appdirs" ,python-appdirs)))
5009 (native-inputs
5010 `(("python-setuptools-scm" ,python-setuptools-scm)
5011 ("python-sphinx" ,python-sphinx)
5012 ("python-rst.linker" ,python-rst.linker)
5013 ("python-pytest" ,python-pytest)
5014 ("python-pytest-runner" ,python-pytest-runner)
5015 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5016 (arguments
5017 `(#:phases
5018 (modify-phases %standard-phases
5019 (add-after 'build 'build-doc
5020 (lambda _
5021 (setenv "LANG" "en_US.UTF-8")
5022 (invoke "python" "setup.py" "build_sphinx")))
5023 (add-after 'install 'install-doc
5024 (lambda* (#:key outputs #:allow-other-keys)
5025 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5026 (doc (string-append data "/doc/" ,name "-" ,version))
5027 (html (string-append doc "/html")))
5028 (mkdir-p html)
5029 (for-each (lambda (file)
5030 (copy-file file (string-append doc "/" file)))
5031 '("README.rst" "CHANGES.rst"))
5032 (copy-recursively "build/sphinx/html" html)
5033 #t)))
5034 (replace 'check
5035 (lambda _
5036 ;; The import time test aborts if an import takes longer than
5037 ;; 100ms. It may very well take a little longer than that.
5038 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5039 (home-page "https://github.com/jaraco/path.py")
5040 (synopsis "Python module wrapper for built-in os.path")
5041 (description
5042 "@code{path.py} implements path objects as first-class entities, allowing
5043 common operations on files to be invoked on those path objects directly.")
5044 (license license:expat)))
5045
5046 (define-public python2-pathpy
5047 (package-with-python2 python-pathpy))
5048
5049 (define-public python-simplegeneric
5050 (package
5051 (name "python-simplegeneric")
5052 (version "0.8.1")
5053 (source
5054 (origin
5055 (method url-fetch)
5056 (uri (pypi-uri "simplegeneric" version ".zip"))
5057 (sha256
5058 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5059 (build-system python-build-system)
5060 (native-inputs
5061 `(("unzip" ,unzip)))
5062 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5063 (synopsis "Python module for simple generic functions")
5064 (description
5065 "The simplegeneric module lets you define simple single-dispatch generic
5066 functions, akin to Python’s built-in generic functions like @code{len()},
5067 @code{iter()} and so on. However, instead of using specially-named methods,
5068 these generic functions use simple lookup tables, akin to those used by
5069 e.g. @code{pickle.dump()} and other generic functions found in the Python
5070 standard library.")
5071 (license license:zpl2.1)))
5072
5073 (define-public python2-simplegeneric
5074 (package-with-python2 python-simplegeneric))
5075
5076 (define-public python-ipython-genutils
5077 ;; TODO: This package is retired, check if can be removed, see description.
5078 (package
5079 (name "python-ipython-genutils")
5080 (version "0.1.0")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "ipython_genutils" version))
5085 (sha256
5086 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5087 (build-system python-build-system)
5088 (arguments `(#:tests? #f)) ; no tests
5089 (home-page "https://ipython.org")
5090 (synopsis "Vestigial utilities from IPython")
5091 (description
5092 "This package provides retired utilities from IPython. No packages
5093 outside IPython/Jupyter should depend on it.
5094
5095 This package shouldn't exist. It contains some common utilities shared by
5096 Jupyter and IPython projects during The Big Split. As soon as possible, those
5097 packages will remove their dependency on this, and this package will go
5098 away.")
5099 (license license:bsd-3)))
5100
5101 (define-public python2-ipython-genutils
5102 (package-with-python2 python-ipython-genutils))
5103
5104 (define-public python-traitlets
5105 (package
5106 (name "python-traitlets")
5107 (version "4.3.2")
5108 (source
5109 (origin
5110 (method url-fetch)
5111 (uri (pypi-uri "traitlets" version))
5112 (sha256
5113 (base32
5114 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5115 (build-system python-build-system)
5116 (arguments
5117 `(#:phases
5118 (modify-phases %standard-phases
5119 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5120 (propagated-inputs
5121 `(("python-ipython-genutils" ,python-ipython-genutils)
5122 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5123 (native-inputs
5124 `(("python-pytest" ,python-pytest)))
5125 (properties `((python2-variant . ,(delay python2-traitlets))))
5126 (home-page "https://ipython.org")
5127 (synopsis "Configuration system for Python applications")
5128 (description
5129 "Traitlets is a framework that lets Python classes have attributes with
5130 type checking, dynamically calculated default values, and ‘on change’
5131 callbacks. The package also includes a mechanism to use traitlets for
5132 configuration, loading values from files or from command line arguments. This
5133 is a distinct layer on top of traitlets, so you can use traitlets in your code
5134 without using the configuration machinery.")
5135 (license license:bsd-3)))
5136
5137 (define-public python2-traitlets
5138 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5139 (package
5140 (inherit traitlets)
5141 (propagated-inputs
5142 `(("python2-enum34" ,python2-enum34)
5143 ,@(package-propagated-inputs traitlets))))))
5144
5145 (define-public python-jupyter-core
5146 (package
5147 (name "python-jupyter-core")
5148 (version "4.4.0")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (string-append (pypi-uri "jupyter_core" version)))
5153 (sha256
5154 (base32
5155 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5156 (build-system python-build-system)
5157 ;; FIXME: not sure how to run the tests
5158 (arguments `(#:tests? #f))
5159 (propagated-inputs
5160 `(("python-traitlets" ,python-traitlets)))
5161 (home-page "http://jupyter.org/")
5162 (synopsis "Jupyter base package")
5163 (description
5164 "Jupyter core is the base package on which Jupyter projects rely.")
5165 (license license:bsd-3)))
5166
5167 (define-public python2-jupyter-core
5168 (package-with-python2 python-jupyter-core))
5169
5170 (define-public python-jupyter-client
5171 (package
5172 (name "python-jupyter-client")
5173 (version "5.2.4")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "jupyter_client" version))
5178 (sha256
5179 (base32
5180 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5181 (build-system python-build-system)
5182 ;; Tests fail because of missing native python kernel which I assume is
5183 ;; provided by the ipython package, which we cannot use because it would
5184 ;; cause a dependency cycle.
5185 (arguments
5186 `(#:tests? #f
5187
5188 #:phases (modify-phases %standard-phases
5189 (add-after 'unpack 'set-tool-file-names
5190 (lambda* (#:key inputs #:allow-other-keys)
5191 (let ((iproute (assoc-ref inputs "iproute")))
5192 (substitute* "jupyter_client/localinterfaces.py"
5193 (("'ip'")
5194 (string-append "'" iproute "/sbin/ip'")))
5195 #t))))))
5196 (inputs
5197 `(("iproute" ,iproute)))
5198 (propagated-inputs
5199 `(("python-pyzmq" ,python-pyzmq)
5200 ("python-traitlets" ,python-traitlets)
5201 ("python-jupyter-core" ,python-jupyter-core)))
5202 (home-page "http://jupyter.org/")
5203 (synopsis "Jupyter protocol implementation and client libraries")
5204 (description
5205 "The @code{jupyter_client} package contains the reference implementation
5206 of the Jupyter protocol. It also provides client and kernel management APIs
5207 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5208 installing @code{kernelspec}s for use with Jupyter frontends.")
5209 (license license:bsd-3)))
5210
5211 (define-public python2-jupyter-client
5212 (package-with-python2 python-jupyter-client))
5213
5214 (define-public python-ipykernel
5215 (package
5216 (name "python-ipykernel")
5217 (version "5.1.1")
5218 (source
5219 (origin
5220 (method url-fetch)
5221 (uri (pypi-uri "ipykernel" version))
5222 (sha256
5223 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5224 (build-system python-build-system)
5225 (arguments
5226 `(#:phases
5227 (modify-phases %standard-phases
5228 (replace 'check
5229 (lambda _
5230 (setenv "HOME" "/tmp")
5231 (invoke "pytest" "-v")
5232 #t))
5233 (add-after 'install 'set-python-file-name
5234 (lambda* (#:key outputs #:allow-other-keys)
5235 ;; Record the absolute file name of the 'python' executable in
5236 ;; 'kernel.json'.
5237 (let ((out (assoc-ref outputs "out")))
5238 (substitute* (string-append out "/share/jupyter"
5239 "/kernels/python3/kernel.json")
5240 (("\"python\"")
5241 (string-append "\"" (which "python") "\"")))
5242 #t))))))
5243 (propagated-inputs
5244 `(("python-ipython" ,python-ipython)
5245 ;; imported at runtime during connect
5246 ("python-jupyter-client" ,python-jupyter-client)))
5247 (native-inputs
5248 `(("python-pytest" ,python-pytest)
5249 ("python-nose" ,python-nose)))
5250 (home-page "https://ipython.org")
5251 (synopsis "IPython Kernel for Jupyter")
5252 (description
5253 "This package provides the IPython kernel for Jupyter.")
5254 (license license:bsd-3)))
5255
5256 ;; Version 5.1.1 and above no longer support Python 2.
5257 (define-public python2-ipykernel
5258 (package
5259 (name "python2-ipykernel")
5260 (version "5.1.0")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "ipykernel" version))
5265 (sha256
5266 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5267 (build-system python-build-system)
5268 (arguments
5269 `(#:python ,python-2
5270 #:phases
5271 (modify-phases %standard-phases
5272 (replace 'check
5273 (lambda _
5274 (setenv "HOME" "/tmp")
5275 (invoke "pytest" "-v")
5276 #t)))))
5277 (propagated-inputs
5278 `(("python2-ipython" ,python2-ipython)
5279 ;; imported at runtime during connect
5280 ("python2-jupyter-client" ,python2-jupyter-client)))
5281 (native-inputs
5282 `(("python2-pytest" ,python2-pytest)
5283 ("python2-nose" ,python2-nose)))
5284 (home-page "https://ipython.org")
5285 (synopsis "IPython Kernel for Jupyter")
5286 (description
5287 "This package provides the IPython kernel for Jupyter.")
5288 (license license:bsd-3)))
5289
5290 (define-public python-pari-jupyter
5291 (package
5292 (name "python-pari-jupyter")
5293 (version "1.3.2")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (pypi-uri "pari_jupyter" version))
5298 (sha256
5299 (base32
5300 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5301 (build-system python-build-system)
5302 (propagated-inputs
5303 `(("python-ipykernel" ,python-ipykernel)))
5304 (inputs
5305 `(("pari-gp" ,pari-gp)
5306 ("readline" ,readline)))
5307 (arguments
5308 `(#:tests? #f)) ; no test suite
5309 (home-page
5310 "https://github.com/jdemeyer/pari_jupyter")
5311 (synopsis "A Jupyter kernel for PARI/GP")
5312 (description "The package provides a PARI/GP kernel for Jupyter.")
5313 (license license:gpl3+)))
5314
5315 (define-public python-backcall
5316 (package
5317 (name "python-backcall")
5318 (version "0.1.0")
5319 (source
5320 (origin
5321 (method url-fetch)
5322 (uri (pypi-uri "backcall" version))
5323 (sha256
5324 (base32
5325 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5326 (build-system python-build-system)
5327 (home-page "https://github.com/takluyver/backcall/")
5328 (synopsis "Specifications for callback functions passed in to an API")
5329 (description
5330 "If your code lets other people supply callback functions, it's important
5331 to specify the function signature you expect, and check that functions support
5332 that. Adding extra parameters later would break other peoples code unless
5333 you're careful. The @code{backcall} package provides a way of specifying the
5334 callback signature using a prototype function.")
5335 (license license:bsd-3)))
5336
5337 ;; This is the latest release of the LTS version of ipython with support for
5338 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5339 ;; dropped support for Python 2.7.
5340 (define-public python2-ipython
5341 (package
5342 (name "python2-ipython")
5343 (version "5.8.0")
5344 (source
5345 (origin
5346 (method url-fetch)
5347 (uri (pypi-uri "ipython" version ".tar.gz"))
5348 (sha256
5349 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5350 (build-system python-build-system)
5351 (propagated-inputs
5352 `(("python2-backports-shutil-get-terminal-size"
5353 ,python2-backports-shutil-get-terminal-size)
5354 ("python2-pathlib2" ,python2-pathlib2)
5355 ("python2-pyzmq" ,python2-pyzmq)
5356 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5357 ("python2-terminado" ,python2-terminado)
5358 ("python2-matplotlib" ,python2-matplotlib)
5359 ("python2-numpy" ,python2-numpy)
5360 ("python2-numpydoc" ,python2-numpydoc)
5361 ("python2-jinja2" ,python2-jinja2)
5362 ("python2-mistune" ,python2-mistune)
5363 ("python2-pexpect" ,python2-pexpect)
5364 ("python2-pickleshare" ,python2-pickleshare)
5365 ("python2-simplegeneric" ,python2-simplegeneric)
5366 ("python2-jsonschema" ,python2-jsonschema)
5367 ("python2-traitlets" ,python2-traitlets)
5368 ("python2-nbformat" ,python2-nbformat)
5369 ("python2-pygments" ,python2-pygments)))
5370 (inputs
5371 `(("readline" ,readline)
5372 ("which" ,which)))
5373 (native-inputs
5374 `(("graphviz" ,graphviz)
5375 ("pkg-config" ,pkg-config)
5376 ("python2-requests" ,python2-requests) ;; for tests
5377 ("python2-testpath" ,python2-testpath)
5378 ("python2-mock" ,python2-mock)
5379 ("python2-nose" ,python2-nose)))
5380 (arguments
5381 `(#:python ,python-2
5382 #:phases
5383 (modify-phases %standard-phases
5384 (add-before 'check 'delete-broken-tests
5385 (lambda* (#:key inputs #:allow-other-keys)
5386 ;; These tests throw errors for unknown reasons.
5387 (delete-file "IPython/core/tests/test_profile.py")
5388 (delete-file "IPython/core/tests/test_interactiveshell.py")
5389 (delete-file "IPython/core/tests/test_magic.py")
5390 #t)))))
5391 (home-page "https://ipython.org")
5392 (synopsis "IPython is a tool for interactive computing in Python")
5393 (description
5394 "IPython provides a rich architecture for interactive computing with:
5395 Powerful interactive shells, a browser-based notebook, support for interactive
5396 data visualization, embeddable interpreters and tools for parallel
5397 computing.")
5398 (license license:bsd-3)))
5399
5400 (define-public python-ipython
5401 (package
5402 (name "python-ipython")
5403 (version "7.5.0")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (pypi-uri "ipython" version ".tar.gz"))
5408 (sha256
5409 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5410 (build-system python-build-system)
5411 (propagated-inputs
5412 `(("python-backcall" ,python-backcall)
5413 ("python-pyzmq" ,python-pyzmq)
5414 ("python-prompt-toolkit" ,python-prompt-toolkit)
5415 ("python-terminado" ,python-terminado)
5416 ("python-matplotlib" ,python-matplotlib)
5417 ("python-numpy" ,python-numpy)
5418 ("python-numpydoc" ,python-numpydoc)
5419 ("python-jedi" ,python-jedi)
5420 ("python-jinja2" ,python-jinja2)
5421 ("python-mistune" ,python-mistune)
5422 ("python-pexpect" ,python-pexpect)
5423 ("python-pickleshare" ,python-pickleshare)
5424 ("python-simplegeneric" ,python-simplegeneric)
5425 ("python-jsonschema" ,python-jsonschema)
5426 ("python-traitlets" ,python-traitlets)
5427 ("python-nbformat" ,python-nbformat)
5428 ("python-pygments" ,python-pygments)))
5429 (inputs
5430 `(("readline" ,readline)
5431 ("which" ,which)))
5432 (native-inputs
5433 `(("graphviz" ,graphviz)
5434 ("pkg-config" ,pkg-config)
5435 ("python-requests" ,python-requests) ;; for tests
5436 ("python-testpath" ,python-testpath)
5437 ("python-nose" ,python-nose)))
5438 (arguments
5439 `(#:phases
5440 (modify-phases %standard-phases
5441 ;; Tests can only be run after the library has been installed and not
5442 ;; within the source directory.
5443 (delete 'check)
5444 (add-after 'install 'check
5445 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5446 (if tests?
5447 (begin
5448 ;; Make installed package available for running the tests
5449 (add-installed-pythonpath inputs outputs)
5450 (setenv "HOME" "/tmp/") ;; required by a test
5451 ;; We only test the core because one of the other tests
5452 ;; tries to import ipykernel.
5453 (invoke "python" "IPython/testing/iptest.py"
5454 "-v" "IPython/core/tests"))
5455 #t)))
5456 (add-before 'check 'fix-tests
5457 (lambda* (#:key inputs #:allow-other-keys)
5458 (substitute* "./IPython/utils/_process_posix.py"
5459 (("/usr/bin/env', 'which") (which "which")))
5460 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5461 (("#!/usr/bin/env python")
5462 (string-append "#!" (which "python"))))
5463 ;; This test introduces a circular dependency on ipykernel
5464 ;; (which depends on ipython).
5465 (delete-file "IPython/core/tests/test_display.py")
5466 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5467 (delete-file "IPython/core/tests/test_interactiveshell.py")
5468 #t)))))
5469 (home-page "https://ipython.org")
5470 (synopsis "IPython is a tool for interactive computing in Python")
5471 (description
5472 "IPython provides a rich architecture for interactive computing with:
5473 Powerful interactive shells, a browser-based notebook, support for interactive
5474 data visualization, embeddable interpreters and tools for parallel
5475 computing.")
5476 (license license:bsd-3)))
5477
5478 (define-public python-ipython-documentation
5479 (package
5480 (inherit python-ipython)
5481 (name "python-ipython-documentation")
5482 (version (package-version python-ipython))
5483 (arguments
5484 `(#:phases
5485 (modify-phases %standard-phases
5486 (delete 'build)
5487 (delete 'check)
5488 (replace 'install
5489 (lambda* (#:key outputs #:allow-other-keys)
5490 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5491 (doc (string-append data "/doc/" ,name "-" ,version))
5492 (html (string-append doc "/html"))
5493 (man1 (string-append data "/man/man1"))
5494 (info (string-append data "/info"))
5495 (examples (string-append doc "/examples"))
5496 (python-arg (string-append "PYTHON=" (which "python"))))
5497 (setenv "LANG" "en_US.utf8")
5498 (with-directory-excursion "docs"
5499 ;; FIXME: pdf fails to build
5500 ;;(system* "make" "pdf" "PAPER=a4")
5501 (system* "make" python-arg "html")
5502 ;; FIXME: the generated texi file contains ^@^@, which trips
5503 ;; up the parser.
5504 ;; (system* "make" python-arg "info")
5505 )
5506 (copy-recursively "docs/man" man1)
5507 (copy-recursively "examples" examples)
5508 (copy-recursively "docs/build/html" html)
5509 ;; (copy-file "docs/build/latex/ipython.pdf"
5510 ;; (string-append doc "/ipython.pdf"))
5511 (mkdir-p info)
5512 ;; (copy-file "docs/build/texinfo/ipython.info"
5513 ;; (string-append info "/ipython.info"))
5514 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5515 #t)))))
5516 (inputs
5517 `(("python-ipython" ,python-ipython)
5518 ("python-ipykernel" ,python-ipykernel)))
5519 (native-inputs
5520 `(("python-sphinx" ,python-sphinx)
5521 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5522 ;; FIXME: It's possible that a smaller union would work just as well.
5523 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5524 texlive-fonts-ec
5525 texlive-generic-ifxetex
5526 texlive-generic-pdftex
5527 texlive-latex-amsfonts
5528 texlive-latex-capt-of
5529 texlive-latex-cmap
5530 texlive-latex-environ
5531 texlive-latex-eqparbox
5532 texlive-latex-etoolbox
5533 texlive-latex-expdlist
5534 texlive-latex-fancyhdr
5535 texlive-latex-fancyvrb
5536 texlive-latex-fncychap
5537 texlive-latex-float
5538 texlive-latex-framed
5539 texlive-latex-geometry
5540 texlive-latex-graphics
5541 texlive-latex-hyperref
5542 texlive-latex-mdwtools
5543 texlive-latex-multirow
5544 texlive-latex-needspace
5545 texlive-latex-oberdiek
5546 texlive-latex-parskip
5547 texlive-latex-preview
5548 texlive-latex-tabulary
5549 texlive-latex-threeparttable
5550 texlive-latex-titlesec
5551 texlive-latex-trimspaces
5552 texlive-latex-ucs
5553 texlive-latex-upquote
5554 texlive-latex-url
5555 texlive-latex-varwidth
5556 texlive-latex-wrapfig)))
5557 ("texinfo" ,texinfo)))))
5558
5559 (define-public python-urwid
5560 (package
5561 (name "python-urwid")
5562 (version "2.0.1")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "urwid" version))
5567 (sha256
5568 (base32
5569 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5570 (build-system python-build-system)
5571 (home-page "http://urwid.org")
5572 (synopsis "Console user interface library for Python")
5573 (description
5574 "Urwid is a curses-based UI/widget library for Python. It includes many
5575 features useful for text console applications.")
5576 (license license:lgpl2.1+)))
5577
5578 (define-public python2-urwid
5579 (package-with-python2 python-urwid))
5580
5581 (define-public python-urwidtrees
5582 (package
5583 (name "python-urwidtrees")
5584 (version "1.0.2")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 ;; package author intends on distributing via github rather than pypi:
5589 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5590 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5591 version ".tar.gz"))
5592 (file-name (string-append name "-" version ".tar.gz"))
5593 (sha256
5594 (base32
5595 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5596 (build-system python-build-system)
5597 (arguments
5598 '(#:tests? #f)) ; no tests
5599 (propagated-inputs `(("python-urwid" ,python-urwid)))
5600 (home-page "https://github.com/pazz/urwidtrees")
5601 (synopsis "Tree widgets for urwid")
5602 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5603 toolkit. Use it to build trees of widgets.")
5604 (license license:gpl3+)))
5605
5606 (define-public python2-urwidtrees
5607 (package-with-python2 python-urwidtrees))
5608
5609 (define-public python-ua-parser
5610 (package
5611 (name "python-ua-parser")
5612 (version "0.8.0")
5613 (source
5614 (origin
5615 (method url-fetch)
5616 (uri (pypi-uri "ua-parser" version))
5617 (sha256
5618 (base32
5619 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5620 (build-system python-build-system)
5621 (arguments
5622 `(#:tests? #f)) ;no test suite in release
5623 (native-inputs
5624 `(("python-pyyaml" ,python-pyyaml)))
5625 (home-page "https://github.com/ua-parser/uap-python")
5626 (synopsis "User agent parser")
5627 (description
5628 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5629 (license license:asl2.0)))
5630
5631 (define-public python2-ua-parser
5632 (package-with-python2 python-ua-parser))
5633
5634 (define-public python-user-agents
5635 (package
5636 (name "python-user-agents")
5637 (version "1.1.0")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 (uri (pypi-uri "user-agents" version))
5642 (sha256
5643 (base32
5644 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5645 (build-system python-build-system)
5646 (arguments
5647 `(#:tests? #f)) ;missing devices.json test file in release
5648 (propagated-inputs
5649 `(("python-ua-parser" ,python-ua-parser)))
5650 (home-page "https://github.com/selwin/python-user-agents")
5651 (synopsis "User Agent strings parsing library")
5652 (description
5653 "A library to identify devices (phones, tablets) and their capabilities by
5654 parsing (browser/HTTP) user agent strings.")
5655 (license license:expat)))
5656
5657 (define-public python2-user-agents
5658 (package-with-python2 python-user-agents))
5659
5660 (define-public python-dbus
5661 (package
5662 (name "python-dbus")
5663 (version "1.2.8")
5664 (source
5665 (origin
5666 (method url-fetch)
5667 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5668 "dbus-python-" version ".tar.gz"))
5669 (sha256
5670 (base32
5671 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5672 (build-system gnu-build-system)
5673 (arguments
5674 '(#:phases
5675 (modify-phases %standard-phases
5676 (add-before
5677 'check 'pre-check
5678 (lambda _
5679 ;; XXX: For the missing '/etc/machine-id'.
5680 (substitute* "test/run-test.sh"
5681 (("DBUS_FATAL_WARNINGS=1")
5682 "DBUS_FATAL_WARNINGS=0"))
5683 #t)))))
5684 (native-inputs
5685 `(("pkg-config" ,pkg-config)))
5686 (inputs
5687 `(("python" ,python-wrapper)
5688 ("dbus-glib" ,dbus-glib)))
5689 (synopsis "Python bindings for D-bus")
5690 (description "python-dbus provides bindings for libdbus, the reference
5691 implementation of D-Bus.")
5692 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5693 (license license:expat)))
5694
5695 (define-public python2-dbus
5696 (package (inherit python-dbus)
5697 (name "python2-dbus")
5698 (inputs `(("python" ,python-2)
5699 ,@(alist-delete "python"
5700 (package-inputs python-dbus)
5701 equal?)))
5702 ;; FIXME: on Python 2, the test_utf8 fails with:
5703 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5704 (arguments `(#:tests? #f))))
5705
5706 (define-public python-notify2
5707 (package
5708 (name "python-notify2")
5709 (version "0.3.1")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (pypi-uri "notify2" version))
5714 (sha256
5715 (base32
5716 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5717 (build-system python-build-system)
5718 (arguments `(#:tests? #f)) ; tests depend on system state
5719 (native-inputs
5720 `(("python-dbus" ,python-dbus)))
5721 (home-page "https://bitbucket.org/takluyver/pynotify2")
5722 (synopsis "Python interface to D-Bus notifications")
5723 (description
5724 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5725 It is a reimplementation of pynotify in pure Python, and an alternative to
5726 the GObject Introspection bindings to libnotify for non-GTK applications.")
5727 (license (list license:bsd-2
5728 license:lgpl2.1+))))
5729
5730 (define-public python2-notify2
5731 (package-with-python2 python-notify2))
5732
5733 (define-public python-lxml
5734 (package
5735 (name "python-lxml")
5736 (version "4.2.5")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "lxml" version))
5741 (sha256
5742 (base32
5743 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5744 (build-system python-build-system)
5745 (inputs
5746 `(("libxml2" ,libxml2)
5747 ("libxslt" ,libxslt)))
5748 (home-page "http://lxml.de/")
5749 (synopsis
5750 "Python XML processing library")
5751 (description
5752 "The lxml XML toolkit is a Pythonic binding for the C libraries
5753 libxml2 and libxslt.")
5754 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5755
5756 (define-public python2-lxml
5757 (package-with-python2 python-lxml))
5758
5759 ;; beautifulsoup4 has a totally different namespace than 3.x,
5760 ;; and pypi seems to put it under its own name, so I guess we should too
5761 (define-public python-beautifulsoup4
5762 (package
5763 (name "python-beautifulsoup4")
5764 (version "4.7.1")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "beautifulsoup4" version))
5769 (sha256
5770 (base32
5771 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5772 (build-system python-build-system)
5773 (arguments
5774 `(#:phases
5775 (modify-phases %standard-phases
5776 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5777 ;; must use this conversion script when building with Python 3. The
5778 ;; conversion script also runs the tests.
5779 ;; For more information, see the file 'convert-py3k' in the source
5780 ;; distribution.
5781 (replace 'check
5782 (lambda _ (invoke "./convert-py3k"))))))
5783 (propagated-inputs
5784 `(("python-soupsieve" ,python-soupsieve)))
5785 (home-page
5786 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5787 (synopsis
5788 "Python screen-scraping library")
5789 (description
5790 "Beautiful Soup is a Python library designed for rapidly setting up
5791 screen-scraping projects. It offers Pythonic idioms for navigating,
5792 searching, and modifying a parse tree, providing a toolkit for
5793 dissecting a document and extracting what you need. It automatically
5794 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5795 (license license:expat)
5796 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5797
5798 (define-public python2-beautifulsoup4
5799 (package
5800 (inherit (package-with-python2
5801 (strip-python2-variant python-beautifulsoup4)))
5802 (arguments `(#:python ,python-2))))
5803
5804 (define-public python-soupsieve
5805 (package
5806 (name "python-soupsieve")
5807 (version "1.9.2")
5808 (source
5809 (origin
5810 (method url-fetch)
5811 (uri (pypi-uri "soupsieve" version))
5812 (sha256
5813 (base32
5814 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5815 (build-system python-build-system)
5816 (arguments `(#:tests? #f))
5817 ;;XXX: 2 tests fail currently despite claming they were to be
5818 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5819 ;;don't want to create a circular dependency.
5820 (home-page "https://github.com/facelessuser/soupsieve")
5821 (synopsis "CSS selector library")
5822 (description
5823 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5824 Soup 4. It aims to provide selecting, matching, and filtering using modern
5825 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5826 specifications up through the latest CSS level 4 drafts and beyond (though
5827 some are not yet implemented).")
5828 (properties `((python2-variant . ,(delay python2-soupsieve))))
5829 (license license:expat)))
5830
5831 (define-public python2-soupsieve
5832 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5833 (package
5834 (inherit base)
5835 (propagated-inputs
5836 `(("python2-backports-functools-lru-cache"
5837 ,python2-backports-functools-lru-cache)
5838 ,@(package-propagated-inputs base))))))
5839
5840 (define-public python-netifaces
5841 (package
5842 (name "python-netifaces")
5843 (version "0.10.7")
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (pypi-uri "netifaces" version))
5848 (sha256
5849 (base32
5850 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5851 (build-system python-build-system)
5852 (home-page "https://github.com/al45tair/netifaces")
5853 (synopsis
5854 "Python module for portable network interface information")
5855 (description
5856 "Netifaces is a Python module providing information on network
5857 interfaces in an easy and portable manner.")
5858 (license license:expat)))
5859
5860 (define-public python2-netifaces
5861 (package-with-python2 python-netifaces))
5862
5863 (define-public python-networkx
5864 (package
5865 (name "python-networkx")
5866 (version "2.2")
5867 (source
5868 (origin
5869 (method url-fetch)
5870 (uri (pypi-uri "networkx" version ".zip"))
5871 (sha256
5872 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5873 (build-system python-build-system)
5874 ;; python-decorator is needed at runtime.
5875 (propagated-inputs
5876 `(("python-decorator" ,python-decorator)))
5877 (native-inputs
5878 `(("python-nose" ,python-nose)
5879 ("unzip" ,unzip)))
5880 (home-page "https://networkx.github.io/")
5881 (synopsis "Python module for creating and manipulating graphs and networks")
5882 (description
5883 "NetworkX is a Python package for the creation, manipulation, and study
5884 of the structure, dynamics, and functions of complex networks.")
5885 (license license:bsd-3)))
5886
5887 (define-public python2-networkx
5888 (package-with-python2 python-networkx))
5889
5890 (define-public python-datrie
5891 (package
5892 (name "python-datrie")
5893 (version "0.8")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "datrie" version))
5898 (sha256
5899 (base32
5900 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5901 (build-system python-build-system)
5902 (native-inputs
5903 `(("python-cython" ,python-cython)
5904 ("python-hypothesis" ,python-hypothesis)
5905 ("python-pytest" ,python-pytest)
5906 ("python-pytest-runner" ,python-pytest-runner)))
5907 (home-page "https://github.com/kmike/datrie")
5908 (synopsis "Fast, efficiently stored trie for Python")
5909 (description
5910 "This package provides a fast, efficiently stored trie implementation for
5911 Python.")
5912 (license license:lgpl2.1+)))
5913
5914 (define-public snakemake
5915 (package
5916 (name "snakemake")
5917 (version "5.2.4")
5918 (source
5919 (origin
5920 (method url-fetch)
5921 (uri (pypi-uri "snakemake" version))
5922 (sha256
5923 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5924 (build-system python-build-system)
5925 (arguments
5926 ;; TODO: Package missing test dependencies.
5927 '(#:tests? #f
5928 #:phases
5929 (modify-phases %standard-phases
5930 ;; For cluster execution Snakemake will call Python. Since there is
5931 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5932 ;; this by calling the snakemake wrapper instead.
5933 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5934 (lambda* (#:key outputs #:allow-other-keys)
5935 (substitute* "snakemake/executors.py"
5936 (("\\{sys.executable\\} -m snakemake")
5937 (string-append (assoc-ref outputs "out")
5938 "/bin/snakemake")))
5939 #t)))))
5940 (propagated-inputs
5941 `(("python-gitpython" ,python-gitpython)
5942 ("python-wrapt" ,python-wrapt)
5943 ("python-requests" ,python-requests)
5944 ("python-appdirs" ,python-appdirs)
5945 ("python-configargparse" ,python-configargparse)
5946 ("python-datrie" ,python-datrie)
5947 ("python-docutils" ,python-docutils)
5948 ("python-jinja2" ,python-jinja2)
5949 ("python-jsonschema" ,python-jsonschema)
5950 ("python-networkx" ,python-networkx)
5951 ("python-pyyaml" ,python-pyyaml)
5952 ("python-ratelimiter" ,python-ratelimiter)))
5953 (home-page "https://snakemake.readthedocs.io")
5954 (synopsis "Python-based execution environment for make-like workflows")
5955 (description
5956 "Snakemake aims to reduce the complexity of creating workflows by
5957 providing a clean and modern domain specific specification language (DSL) in
5958 Python style, together with a fast and comfortable execution environment.")
5959 (license license:expat)))
5960
5961 ;; This is currently needed for the pigx-* packages.
5962 (define-public snakemake-4
5963 (package (inherit snakemake)
5964 (version "4.4.0")
5965 (source
5966 (origin
5967 (method url-fetch)
5968 (uri (pypi-uri "snakemake" version))
5969 (sha256
5970 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5971 (propagated-inputs
5972 `(("python-wrapt" ,python-wrapt)
5973 ("python-requests" ,python-requests)
5974 ("python-appdirs" ,python-appdirs)
5975 ("python-configargparse" ,python-configargparse)
5976 ("python-pyyaml" ,python-pyyaml)
5977 ("python-ratelimiter" ,python-ratelimiter)))))
5978
5979 (define-public python-pyqrcode
5980 (package
5981 (name "python-pyqrcode")
5982 (version "1.2.1")
5983 (source
5984 (origin
5985 (method url-fetch)
5986 (uri (pypi-uri "PyQRCode" version))
5987 (sha256
5988 (base32
5989 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5990 (build-system python-build-system)
5991 (home-page
5992 "https://github.com/mnooner256/pyqrcode")
5993 (synopsis "QR code generator")
5994 (description
5995 "Pyqrcode is a QR code generator written purely in Python with
5996 SVG, EPS, PNG and terminal output.")
5997 (license license:bsd-3)))
5998
5999 (define-public python-seaborn
6000 (package
6001 (name "python-seaborn")
6002 (version "0.9.0")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "seaborn" version))
6007 (sha256
6008 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6009 (build-system python-build-system)
6010 (arguments
6011 `(#:phases
6012 (modify-phases %standard-phases
6013 (add-before 'check 'start-xserver
6014 (lambda* (#:key inputs #:allow-other-keys)
6015 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6016 ;; There must be a running X server and make check doesn't
6017 ;; start one. Therefore we must do it.
6018 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6019 (setenv "DISPLAY" ":1")
6020 #t)))
6021 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6022 (propagated-inputs
6023 `(("python-pandas" ,python-pandas)
6024 ("python-matplotlib" ,python-matplotlib)
6025 ("python-numpy" ,python-numpy)
6026 ("python-scipy" ,python-scipy)))
6027 (native-inputs
6028 `(("python-pytest" ,python-pytest)
6029 ("xorg-server" ,xorg-server)))
6030 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6031 (synopsis "Statistical data visualization")
6032 (description
6033 "Seaborn is a library for making attractive and informative statistical
6034 graphics in Python. It is built on top of matplotlib and tightly integrated
6035 with the PyData stack, including support for numpy and pandas data structures
6036 and statistical routines from scipy and statsmodels.")
6037 (license license:bsd-3)))
6038
6039 (define-public python2-seaborn
6040 (package-with-python2 python-seaborn))
6041
6042 (define-public python-mpmath
6043 (package
6044 (name "python-mpmath")
6045 (version "0.19")
6046 (source (origin
6047 (method url-fetch)
6048 (uri (string-append "http://mpmath.org/files/mpmath-"
6049 version ".tar.gz"))
6050 (sha256
6051 (base32
6052 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6053 (build-system python-build-system)
6054 (arguments
6055 '(#:phases
6056 (modify-phases %standard-phases
6057 (replace 'check
6058 (lambda _
6059 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6060 (home-page "http://mpmath.org")
6061 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6062 (description
6063 "@code{mpmath} can be used as an arbitrary-precision substitute for
6064 Python's float/complex types and math/cmath modules, but also does much
6065 more advanced mathematics.")
6066 (license license:bsd-3)))
6067
6068 (define-public python2-mpmath
6069 (package-with-python2 python-mpmath))
6070
6071 (define-public python-bigfloat
6072 (package
6073 (name "python-bigfloat")
6074 (version "0.3.0")
6075 (source
6076 (origin
6077 (method url-fetch)
6078 (uri (pypi-uri "bigfloat" version))
6079 (sha256
6080 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6081 (build-system python-build-system)
6082 (inputs
6083 `(("mpfr" ,mpfr)))
6084 (home-page "https://github.com/mdickinson/bigfloat")
6085 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6086 (description
6087 "This package provides a Python interface to the MPFR library for
6088 multiprecision arithmetic.")
6089 (license license:lgpl3+)))
6090
6091 (define-public python2-bigfloat
6092 (package-with-python2 python-bigfloat))
6093
6094 (define-public python-sympy
6095 (package
6096 (name "python-sympy")
6097 (version "1.1.1")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (string-append
6102 "https://github.com/sympy/sympy/releases/download/sympy-"
6103 version "/sympy-" version ".tar.gz"))
6104 (sha256
6105 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6106 (build-system python-build-system)
6107 (arguments
6108 `(#:phases
6109 (modify-phases %standard-phases
6110 ;; Run the core tests after installation. By default it would run
6111 ;; *all* tests, which take a very long time to complete and are known
6112 ;; to be flaky.
6113 (delete 'check)
6114 (add-after 'install 'check
6115 (lambda* (#:key outputs #:allow-other-keys)
6116 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6117 #t)))))
6118 (propagated-inputs
6119 `(("python-mpmath" ,python-mpmath)))
6120 (home-page "http://www.sympy.org/")
6121 (synopsis "Python library for symbolic mathematics")
6122 (description
6123 "SymPy is a Python library for symbolic mathematics. It aims to become a
6124 full-featured computer algebra system (CAS) while keeping the code as simple
6125 as possible in order to be comprehensible and easily extensible.")
6126 (license license:bsd-3)))
6127
6128 (define-public python2-sympy
6129 (package
6130 (inherit (package-with-python2 python-sympy))
6131 (arguments
6132 `(#:phases
6133 (modify-phases %standard-phases
6134 ;; Run the core tests after installation. By default it would run
6135 ;; *all* tests, which take a very long time to complete and are known
6136 ;; to be flaky.
6137 (delete 'check)
6138 (add-after 'install 'check
6139 (lambda* (#:key outputs #:allow-other-keys)
6140 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6141 #t)))))))
6142
6143 (define-public python-q
6144 (package
6145 (name "python-q")
6146 (version "2.6")
6147 (source
6148 (origin
6149 (method url-fetch)
6150 (uri (pypi-uri "q" version))
6151 (sha256
6152 (base32
6153 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6154 (build-system python-build-system)
6155 (home-page "https://github.com/zestyping/q")
6156 (synopsis "Quick-and-dirty debugging output for tired programmers")
6157 (description
6158 "q is a Python module for \"print\" style of debugging Python code. It
6159 provides convenient short API for print out of values, tracebacks, and
6160 falling into the Python interpreter.")
6161 (license license:asl2.0)))
6162
6163 (define-public python2-q
6164 (package-with-python2 python-q))
6165
6166 (define-public python2-xlib
6167 (package
6168 (name "python2-xlib")
6169 (version "0.14")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6173 "/" version "/"
6174 "python-xlib-" version ".tar.gz"))
6175 (sha256
6176 (base32
6177 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6178 (build-system python-build-system)
6179 (arguments
6180 `(#:python ,python-2 ;Python 2 only
6181 #:tests? #f)) ;no tests
6182 (home-page "http://python-xlib.sourceforge.net/")
6183 (synopsis "Python X11 client library")
6184 (description
6185 "The Python X Library is intended to be a fully functional X client
6186 library for Python programs. It is useful to implement low-level X clients.
6187 It is written entirely in Python.")
6188 (license license:gpl2+)))
6189
6190 (define-public python-singledispatch
6191 (package
6192 (name "python-singledispatch")
6193 (version "3.4.0.3")
6194 (source
6195 (origin
6196 (method url-fetch)
6197 (uri (pypi-uri "singledispatch" version))
6198 (sha256
6199 (base32
6200 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6201 (build-system python-build-system)
6202 (native-inputs
6203 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6204 (home-page
6205 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6206 (synopsis "Backport of singledispatch feature from Python 3.4")
6207 (description
6208 "This library brings functools.singledispatch from Python 3.4 to Python
6209 2.6-3.3.")
6210 (license license:expat)))
6211
6212 (define-public python2-singledispatch
6213 (package-with-python2 python-singledispatch))
6214
6215 ;; the python- version can be removed with python-3.5
6216 (define-public python-backports-abc
6217 (package
6218 (name "python-backports-abc")
6219 (version "0.5")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (pypi-uri "backports_abc" version))
6224 (sha256
6225 (base32
6226 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6227 (build-system python-build-system)
6228 (home-page "https://github.com/cython/backports_abc")
6229 (synopsis "Backport of additions to the 'collections.abc' module")
6230 (description
6231 "Python-backports-abc provides a backport of additions to the
6232 @code{collections.abc} module in Python-3.5.")
6233 (license license:psfl)))
6234
6235 (define-public python2-backports-abc
6236 (package-with-python2 python-backports-abc))
6237
6238 (define-public python-backports-csv
6239 (package
6240 (name "python-backports-csv")
6241 (version "1.0.5")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (pypi-uri "backports.csv" version))
6246 (sha256
6247 (base32
6248 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6249 (build-system python-build-system)
6250 (home-page "https://github.com/ryanhiebert/backports.csv")
6251 (synopsis "Backport of Python 3's csv module for Python 2")
6252 (description
6253 "Provides a backport of Python 3's @code{csv} module for parsing
6254 comma separated values. The API of the @code{csv} module in Python 2
6255 is drastically different from the @code{csv} module in Python 3.
6256 This is due, for the most part, to the difference between str in
6257 Python 2 and Python 3.")
6258 (license license:psfl)))
6259
6260 (define-public python2-backports-csv
6261 (package-with-python2 python-backports-csv))
6262
6263 (define-public python2-backports-shutil-get-terminal-size
6264 (package
6265 (name "python2-backports-shutil-get-terminal-size")
6266 (version "1.0.0")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6271 (sha256
6272 (base32
6273 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6274 (build-system python-build-system)
6275 (arguments
6276 `(#:python ,python-2
6277 #:phases
6278 (modify-phases %standard-phases
6279 (replace 'check
6280 (lambda _
6281 (invoke "py.test" "-v"))))))
6282 (native-inputs
6283 `(("python2-pytest" ,python2-pytest)))
6284 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6285 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6286 (description
6287 "This package provides a backport of the @code{get_terminal_size
6288 function} from Python 3.3's @code{shutil}.
6289 Unlike the original version it is written in pure Python rather than C,
6290 so it might be a tiny bit slower.")
6291 (license license:expat)))
6292
6293 (define-public python-waf
6294 (package
6295 (name "python-waf")
6296 (version "2.0.11")
6297 (source (origin
6298 (method url-fetch)
6299 (uri (string-append "https://waf.io/"
6300 "waf-" version ".tar.bz2"))
6301 (sha256
6302 (base32
6303 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6304 (build-system python-build-system)
6305 (arguments
6306 '(#:phases
6307 (modify-phases %standard-phases
6308 (replace 'build
6309 (lambda _
6310 (invoke "python" "waf-light" "configure" "build")))
6311 (replace 'check
6312 (lambda _
6313 (invoke "python" "waf" "--version")))
6314 (replace 'install
6315 (lambda* (#:key outputs #:allow-other-keys)
6316 (let ((out (assoc-ref outputs "out")))
6317 (install-file "waf" (string-append out "/bin")))
6318 #t))
6319 ;; waf breaks when it is wrapped.
6320 (delete 'wrap))))
6321 (home-page "https://waf.io/")
6322 (synopsis "Python-based build system")
6323 (description
6324 "Waf is a Python-based framework for configuring, compiling and installing
6325 applications.")
6326 (license license:bsd-3)))
6327
6328 (define-public python2-waf
6329 (package-with-python2 python-waf))
6330
6331 (define-public python-pyzmq
6332 (package
6333 (name "python-pyzmq")
6334 (version "17.1.2")
6335 (source
6336 (origin
6337 (method url-fetch)
6338 (uri (pypi-uri "pyzmq" version))
6339 (sha256
6340 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6341 (build-system python-build-system)
6342 (arguments
6343 `(#:configure-flags
6344 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6345 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6346 ;; --inplace' for 'python setup.py test' to work.
6347 #:tests? #f))
6348 (inputs
6349 `(("zeromq" ,zeromq)))
6350 (native-inputs
6351 `(("pkg-config" ,pkg-config)
6352 ("python-nose" ,python-nose)))
6353 (home-page "https://github.com/zeromq/pyzmq")
6354 (synopsis "Python bindings for 0MQ")
6355 (description
6356 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6357 (license license:bsd-4)))
6358
6359 (define-public python2-pyzmq
6360 (package-with-python2 python-pyzmq))
6361
6362 (define-public python-pep8
6363 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6364 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6365 ;; some dependents' test suites, and nothing more.
6366 (package
6367 (name "python-pep8")
6368 (version "1.7.0")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "pep8" version))
6373 (sha256
6374 (base32
6375 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6376 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6377 (build-system python-build-system)
6378 (home-page "https://pep8.readthedocs.org/")
6379 (synopsis "Python style guide checker")
6380 (description
6381 "This tools checks Python code against some of the style conventions in
6382 PEP 8.")
6383 (license license:expat)))
6384
6385 (define-public python2-pep8
6386 (package-with-python2 python-pep8))
6387
6388 (define-public python-pyflakes
6389 (package
6390 (name "python-pyflakes")
6391 (version "2.1.1")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "pyflakes" version))
6396 (sha256
6397 (base32
6398 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6399 (build-system python-build-system)
6400 (home-page
6401 "https://github.com/pyflakes/pyflakes")
6402 (synopsis "Passive checker of Python programs")
6403 (description
6404 "Pyflakes statically checks Python source code for common errors.")
6405 (license license:expat)))
6406
6407 (define-public python2-pyflakes
6408 (package-with-python2 python-pyflakes))
6409
6410 (define-public python-mccabe
6411 (package
6412 (name "python-mccabe")
6413 (version "0.6.1")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "mccabe" version))
6418 (sha256
6419 (base32
6420 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6421 (build-system python-build-system)
6422 (native-inputs
6423 `(("python-pytest" ,python-pytest-bootstrap)
6424 ("python-pytest-runner" ,python-pytest-runner)))
6425 (home-page "https://github.com/flintwork/mccabe")
6426 (synopsis "McCabe checker, plugin for flake8")
6427 (description
6428 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6429 complexity of Python source code.")
6430 (license license:expat)))
6431
6432 (define-public python2-mccabe
6433 (package-with-python2 python-mccabe))
6434
6435 (define-public python-mccabe-0.2.1
6436 (package (inherit python-mccabe)
6437 (version "0.2.1")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "mccabe" version))
6442 (sha256
6443 (base32
6444 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6445
6446 (define-public python2-mccabe-0.2.1
6447 (package-with-python2 python-mccabe-0.2.1))
6448
6449 ;; Flake8 2.4.1 requires an older version of pep8.
6450 ;; This should be removed ASAP.
6451 (define-public python-pep8-1.5.7
6452 (package (inherit python-pep8)
6453 (version "1.5.7")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "pep8" version))
6458 (sha256
6459 (base32
6460 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6461 (arguments
6462 ;; XXX Tests not compatible with Python 3.5.
6463 '(#:tests? #f))))
6464
6465 (define-public python2-pep8-1.5.7
6466 (package-with-python2 python-pep8-1.5.7))
6467
6468 ;; Flake8 2.4.1 requires an older version of pyflakes.
6469 ;; This should be removed ASAP.
6470 (define-public python-pyflakes-0.8.1
6471 (package (inherit python-pyflakes)
6472 (version "0.8.1")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "pyflakes" version))
6477 (sha256
6478 (base32
6479 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6480 (arguments
6481 ;; XXX Tests not compatible with Python 3.5.
6482 '(#:tests? #f))))
6483
6484 (define-public python2-pyflakes-0.8.1
6485 (package-with-python2 python-pyflakes-0.8.1))
6486
6487 (define-public python-flake8
6488 (package
6489 (name "python-flake8")
6490 (version "3.7.7")
6491 (source (origin
6492 (method url-fetch)
6493 (uri (pypi-uri "flake8" version))
6494 (sha256
6495 (base32
6496 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6497 (build-system python-build-system)
6498 (arguments
6499 `(#:phases
6500 (modify-phases %standard-phases
6501 (delete 'check)
6502 (add-after 'install 'check
6503 (lambda* (#:key inputs outputs #:allow-other-keys)
6504 (add-installed-pythonpath inputs outputs)
6505 (invoke "pytest" "-v")
6506 #t)))))
6507 (propagated-inputs
6508 `(("python-pycodestyle" ,python-pycodestyle)
6509 ("python-entrypoints" ,python-entrypoints)
6510 ("python-pyflakes" ,python-pyflakes)
6511 ("python-mccabe" ,python-mccabe)))
6512 (native-inputs
6513 `(("python-mock" ,python-mock)
6514 ("python-pytest" ,python-pytest-bootstrap)
6515 ("python-pytest-runner" ,python-pytest-runner)))
6516 (home-page "https://gitlab.com/pycqa/flake8")
6517 (synopsis
6518 "The modular source code checker: pep8, pyflakes and co")
6519 (description
6520 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6521 (properties `((python2-variant . ,(delay python2-flake8))))
6522 (license license:expat)))
6523
6524 (define-public python2-flake8
6525 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6526 (package (inherit base)
6527 (propagated-inputs
6528 `(("python2-configparser" ,python2-configparser)
6529 ("python2-enum34" ,python2-enum34)
6530 ("python2-typing" ,python2-typing)
6531 ,@(package-propagated-inputs base))))))
6532
6533 ;; python-hacking requires flake8 <2.6.0.
6534 (define-public python-flake8-2.5
6535 (package
6536 (inherit python-flake8)
6537 (version "2.5.5")
6538 (source (origin
6539 (method url-fetch)
6540 (uri (pypi-uri "flake8" version))
6541 (sha256
6542 (base32
6543 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6544 (propagated-inputs
6545 `(("python-pep8" ,python-pep8)
6546 ,@(package-propagated-inputs python-flake8)))
6547 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6548
6549 (define-public python2-flake8-2.5
6550 (package
6551 (inherit python2-flake8)
6552 (version (package-version python-flake8-2.5))
6553 (source (origin
6554 (inherit (package-source python-flake8-2.5))))
6555 (propagated-inputs
6556 `(("python2-pep8" ,python2-pep8)
6557 ,@(package-propagated-inputs python2-flake8)))))
6558
6559 (define-public python-flake8-polyfill
6560 (package
6561 (name "python-flake8-polyfill")
6562 (version "1.0.2")
6563 (source
6564 (origin
6565 (method url-fetch)
6566 (uri (pypi-uri "flake8-polyfill" version))
6567 (sha256
6568 (base32
6569 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6570 (build-system python-build-system)
6571 (arguments
6572 '(#:phases
6573 (modify-phases %standard-phases
6574 (replace 'check
6575 (lambda _
6576 ;; Be compatible with Pytest 4:
6577 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6578 (substitute* "setup.cfg"
6579 (("\\[pytest\\]")
6580 "[tool:pytest]"))
6581
6582 (setenv "PYTHONPATH"
6583 (string-append (getcwd) "/build/lib:"
6584 (getenv "PYTHONPATH")))
6585 (invoke "py.test" "-v"))))))
6586 (native-inputs
6587 `(("python-flake8" ,python-flake8)
6588 ("python-mock" ,python-mock)
6589 ("python-pep8" ,python-pep8)
6590 ("python-pycodestyle" ,python-pycodestyle)
6591 ("python-pytest" ,python-pytest)))
6592 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6593 (synopsis "Polyfill package for Flake8 plugins")
6594 (description
6595 "This package that provides some compatibility helpers for Flake8
6596 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6597 (license license:expat)))
6598
6599 (define-public python2-flake8-polyfill
6600 (package-with-python2 python-flake8-polyfill))
6601
6602 (define-public python-mistune
6603 (package
6604 (name "python-mistune")
6605 (version "0.8.4")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (pypi-uri "mistune" version))
6610 (sha256
6611 (base32
6612 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6613 (build-system python-build-system)
6614 (native-inputs
6615 `(("python-nose" ,python-nose)
6616 ("python-cython" ,python-cython)))
6617 (home-page "https://github.com/lepture/mistune")
6618 (synopsis "Markdown parser in pure Python")
6619 (description "This package provides a fast markdown parser in pure
6620 Python.")
6621 (license license:bsd-3)))
6622
6623 (define-public python2-mistune
6624 (package-with-python2 python-mistune))
6625
6626 (define-public python-markdown
6627 (package
6628 (name "python-markdown")
6629 (version "3.1.1")
6630 (source
6631 (origin
6632 (method url-fetch)
6633 (uri (pypi-uri "Markdown" version))
6634 (sha256
6635 (base32
6636 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6637 (build-system python-build-system)
6638 (native-inputs
6639 `(("python-nose" ,python-nose)
6640 ("python-pyyaml" ,python-pyyaml)))
6641 (home-page "https://python-markdown.github.io/")
6642 (synopsis "Python implementation of Markdown")
6643 (description
6644 "This package provides a Python implementation of John Gruber's
6645 Markdown. The library features international input, various Markdown
6646 extensions, and several HTML output formats. A command line wrapper
6647 markdown_py is also provided to convert Markdown files to HTML.")
6648 (license license:bsd-3)))
6649
6650 (define-public python2-markdown
6651 (package-with-python2 python-markdown))
6652
6653 (define-public python-ptyprocess
6654 (package
6655 (name "python-ptyprocess")
6656 (version "0.5.2")
6657 (source
6658 (origin
6659 (method url-fetch)
6660 (uri (pypi-uri "ptyprocess" version))
6661 (sha256
6662 (base32
6663 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6664 (build-system python-build-system)
6665 (native-inputs
6666 `(("python-nose" ,python-nose)))
6667 (arguments
6668 `(#:phases
6669 (modify-phases %standard-phases
6670 (replace 'check
6671 (lambda _ (invoke "nosetests"))))))
6672 (home-page "https://github.com/pexpect/ptyprocess")
6673 (synopsis "Run a subprocess in a pseudo terminal")
6674 (description
6675 "This package provides a Python library used to launch a subprocess in a
6676 pseudo terminal (pty), and interact with both the process and its pty.")
6677 (license license:isc)))
6678
6679 (define-public python2-ptyprocess
6680 (package-with-python2 python-ptyprocess))
6681
6682 (define-public python-cram
6683 (package
6684 (name "python-cram")
6685 (version "0.7")
6686 (home-page "https://bitheap.org/cram/")
6687 (source (origin
6688 (method url-fetch)
6689 (uri (list (string-append home-page "cram-"
6690 version ".tar.gz")
6691 (pypi-uri "cram" version)))
6692 (sha256
6693 (base32
6694 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6695 (arguments
6696 '(#:phases
6697 (modify-phases %standard-phases
6698 (add-after 'unpack 'patch-source
6699 (lambda _
6700 (substitute* (find-files "cram" ".*\\.py$")
6701 ;; Replace default shell path.
6702 (("/bin/sh") (which "sh")))
6703 (substitute* (find-files "tests" ".*\\.t$")
6704 (("md5") "md5sum")
6705 (("/bin/bash") (which "bash"))
6706 (("/bin/sh") (which "sh")))
6707 (substitute* "cram/_test.py"
6708 ;; This hack works around a bug triggered by substituting
6709 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6710 ;; "cram -h", which breaks the output at 80 characters. This
6711 ;; causes the line showing the default shell to break into two
6712 ;; lines, but the test expects a single line...
6713 (("env\\['COLUMNS'\\] = '80'")
6714 "env['COLUMNS'] = '160'"))
6715
6716 (substitute* "Makefile"
6717 ;; Recent versions of python-coverage have caused the test
6718 ;; coverage to decrease (as of version 0.7). Allow that.
6719 (("--fail-under=100")
6720 "--fail-under=90"))
6721
6722 #t))
6723 (replace 'check
6724 ;; The test phase uses the built library and executable.
6725 (lambda* (#:key inputs outputs #:allow-other-keys)
6726 (add-installed-pythonpath inputs outputs)
6727 (setenv "PATH" (string-append (getenv "PATH") ":"
6728 (assoc-ref outputs "out") "/bin"))
6729 (invoke "make" "test"))))))
6730 (build-system python-build-system)
6731 (native-inputs
6732 `(("python-coverage" ,python-coverage)
6733 ("which" ,which)))
6734 (synopsis "Simple testing framework for command line applications")
6735 (description
6736 "Cram is a functional testing framework for command line applications.
6737 Cram tests look like snippets of interactive shell sessions. Cram runs each
6738 command and compares the command output in the test with the command’s actual
6739 output.")
6740 (license license:gpl2+)))
6741
6742 (define-public python2-cram
6743 (package-with-python2 python-cram))
6744
6745 (define-public python-straight-plugin
6746 (package
6747 (name "python-straight-plugin")
6748 (version "1.4.1")
6749 (source
6750 (origin
6751 (method url-fetch)
6752 (uri (pypi-uri "straight.plugin" version))
6753 (sha256
6754 (base32
6755 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6756 (build-system python-build-system)
6757 (home-page "https://github.com/ironfroggy/straight.plugin")
6758 (synopsis "Simple namespaced plugin facility")
6759 (description "Straight Plugin provides a type of plugin you can create from
6760 almost any existing Python modules, and an easy way for outside developers to
6761 add functionality and customization to your projects with their own plugins.")
6762 (license license:expat)))
6763
6764 (define-public python2-straight-plugin
6765 (package-with-python2 python-straight-plugin))
6766
6767 (define-public python-fonttools
6768 (package
6769 (name "python-fonttools")
6770 (version "3.38.0")
6771 (source (origin
6772 (method url-fetch)
6773 (uri (pypi-uri "fonttools" version ".zip"))
6774 (sha256
6775 (base32
6776 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6777 (build-system python-build-system)
6778 (native-inputs
6779 `(("unzip" ,unzip)
6780 ("python-pytest" ,python-pytest)
6781 ("python-pytest-runner" ,python-pytest-runner)))
6782 (home-page "https://github.com/behdad/fonttools")
6783 (synopsis "Tools to manipulate font files")
6784 (description
6785 "FontTools/TTX is a library to manipulate font files from Python. It
6786 supports reading and writing of TrueType/OpenType fonts, reading and writing
6787 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6788 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6789 from an XML-based format.")
6790 (license license:expat)))
6791
6792 (define-public python2-fonttools
6793 (package-with-python2 python-fonttools))
6794
6795 (define-public python-ly
6796 (package
6797 (name "python-ly")
6798 (version "0.9.5")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (pypi-uri name version))
6803 (sha256
6804 (base32
6805 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6806 (build-system python-build-system)
6807 (arguments
6808 ;; FIXME: Some tests need network access.
6809 '(#:tests? #f))
6810 (synopsis "Tool and library for manipulating LilyPond files")
6811 (description "This package provides a Python library to parse, manipulate
6812 or create documents in LilyPond format. A command line program ly is also
6813 provided that can be used to do various manipulations with LilyPond files.")
6814 (home-page "https://pypi.python.org/pypi/python-ly")
6815 (license license:gpl2+)))
6816
6817 (define-public python-appdirs
6818 (package
6819 (name "python-appdirs")
6820 (version "1.4.3")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "appdirs" version))
6825 (sha256
6826 (base32
6827 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6828 (build-system python-build-system)
6829 (home-page "https://github.com/ActiveState/appdirs")
6830 (synopsis
6831 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6832 (description
6833 "This module provides a portable way of finding out where user data
6834 should be stored on various operating systems.")
6835 (license license:expat)))
6836
6837 (define-public python2-appdirs
6838 (package-with-python2 python-appdirs))
6839
6840 (define-public python-llfuse
6841 (package
6842 (name "python-llfuse")
6843 (version "1.3.5")
6844 (source (origin
6845 (method url-fetch)
6846 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6847 (sha256
6848 (base32
6849 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6850 (build-system python-build-system)
6851 (inputs
6852 `(("fuse" ,fuse)
6853 ("attr" ,attr)))
6854 (native-inputs
6855 `(("pkg-config" ,pkg-config)))
6856 (synopsis "Python bindings for FUSE")
6857 (description
6858 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6859 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6860 (license license:lgpl2.0+)
6861 (properties `((python2-variant . ,(delay python2-llfuse))))))
6862
6863 (define-public python2-llfuse
6864 (package (inherit (package-with-python2
6865 (strip-python2-variant python-llfuse)))
6866 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6867
6868 ;; For attic-0.16
6869 (define-public python-llfuse-0.41
6870 (package (inherit python-llfuse)
6871 (version "0.41.1")
6872 (source (origin
6873 (method url-fetch)
6874 (uri (string-append
6875 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6876 "llfuse-" version ".tar.bz2"))
6877 (sha256
6878 (base32
6879 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6880 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6881 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6882 (license (list license:expat license:lgpl2.0+))))
6883
6884 (define-public python-msgpack
6885 (package
6886 (name "python-msgpack")
6887 (version "0.5.6")
6888 (source (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "msgpack" version))
6891 (sha256
6892 (base32
6893 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6894 (build-system python-build-system)
6895 (arguments
6896 `(#:modules ((guix build utils)
6897 (guix build python-build-system)
6898 (ice-9 ftw)
6899 (srfi srfi-1)
6900 (srfi srfi-26))
6901 #:phases
6902 (modify-phases %standard-phases
6903 (replace 'check
6904 (lambda _
6905 (let ((cwd (getcwd)))
6906 (setenv "PYTHONPATH"
6907 (string-append cwd "/build/"
6908 (find (cut string-prefix? "lib" <>)
6909 (scandir (string-append cwd "/build")))
6910 ":"
6911 (getenv "PYTHONPATH")))
6912 (invoke "pytest" "-v" "test")))))))
6913 (native-inputs
6914 `(("python-pytest" ,python-pytest)))
6915 (synopsis "MessagePack (de)serializer")
6916 (description "MessagePack is a fast, compact binary serialization format,
6917 suitable for similar data to JSON. This package provides CPython bindings for
6918 reading and writing MessagePack data.")
6919 (home-page "https://pypi.python.org/pypi/msgpack/")
6920 (license license:asl2.0)))
6921
6922 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6923 ;; release 0.5. Some packages like borg still call it by the old name for now.
6924 ;; <https://bugs.gnu.org/30662>
6925 (define-public python-msgpack-transitional
6926 (package
6927 (inherit python-msgpack)
6928 (name "python-msgpack-transitional")
6929 (arguments
6930 (substitute-keyword-arguments (package-arguments python-msgpack)
6931 ((#:phases phases)
6932 `(modify-phases ,phases
6933 (add-after 'unpack 'configure-transitional
6934 (lambda _
6935 ;; Keep using the old name.
6936 (substitute* "setup.py"
6937 (("TRANSITIONAL = False")
6938 "TRANSITIONAL = 1"))
6939 #t))))))))
6940
6941 (define-public python2-msgpack
6942 (package-with-python2 python-msgpack))
6943
6944 (define-public python-netaddr
6945 (package
6946 (name "python-netaddr")
6947 (version "0.7.19")
6948 (source
6949 (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "netaddr" version))
6952 (sha256
6953 (base32
6954 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6955 (build-system python-build-system)
6956 (arguments `(#:tests? #f)) ;; No tests.
6957 (home-page "https://github.com/drkjam/netaddr/")
6958 (synopsis "Pythonic manipulation of network addresses")
6959 (description
6960 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6961 and MAC network addresses.")
6962 (license license:bsd-3)))
6963
6964 (define-public python2-netaddr
6965 (package-with-python2 python-netaddr))
6966
6967 (define-public python2-pyroute2
6968 (package
6969 (name "python2-pyroute2")
6970 (version "0.5.6")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri "pyroute2" version))
6975 (sha256
6976 (base32
6977 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6978 (build-system python-build-system)
6979 (arguments
6980 `(#:python ,python-2)) ;Python 3.x is not supported
6981 (home-page "https://github.com/svinota/pyroute2")
6982 (synopsis "Python netlink library")
6983 (description
6984 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6985 Supported netlink families and protocols include:
6986 @itemize
6987 @item rtnl, network settings - addresses, routes, traffic controls
6988 @item nfnetlink - netfilter API: ipset, nftables, ...
6989 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6990 @item devlink - manage and monitor devlink-enabled hardware
6991 @item generic - generic netlink families
6992 @itemize
6993 @item nl80211 - wireless functions API (basic support)
6994 @item taskstats - extended process statistics
6995 @item acpi_events - ACPI events monitoring
6996 @item thermal_events - thermal events monitoring
6997 @item VFS_DQUOT - disk quota events monitoring
6998 @end itemize
6999 @end itemize")
7000 (license license:gpl2+)))
7001
7002 (define-public python-wrapt
7003 (package
7004 (name "python-wrapt")
7005 (version "1.11.1")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "wrapt" version))
7010 (sha256
7011 (base32
7012 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
7013 (build-system python-build-system)
7014 (arguments
7015 ;; Tests are not included in the tarball, they are only available in the
7016 ;; git repository.
7017 `(#:tests? #f))
7018 (home-page "https://github.com/GrahamDumpleton/wrapt")
7019 (synopsis "Module for decorators, wrappers and monkey patching")
7020 (description
7021 "The aim of the wrapt module is to provide a transparent object proxy for
7022 Python, which can be used as the basis for the construction of function
7023 wrappers and decorator functions.")
7024 (license license:bsd-2)))
7025
7026 (define-public python2-wrapt
7027 (package-with-python2 python-wrapt))
7028
7029 (define-public python-xlrd
7030 (package
7031 (name "python-xlrd")
7032 (version "1.0.0")
7033 (source (origin
7034 (method url-fetch)
7035 (uri (pypi-uri "xlrd" version))
7036 (sha256
7037 (base32
7038 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7039 (build-system python-build-system)
7040 (arguments
7041 `(#:phases
7042 (modify-phases %standard-phases
7043 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7044 ;; run tests instead for now.
7045 (replace 'check (lambda _ (invoke "nosetests"))))))
7046 (native-inputs `(("python-nose" ,python-nose)))
7047 (home-page "http://www.python-excel.org/")
7048 (synopsis "Library for extracting data from Excel files")
7049 (description "This package provides a library to extract data from
7050 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7051 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7052 Unicode-aware. It is not intended as an end-user tool.")
7053 (license license:bsd-3)))
7054
7055 (define-public python2-xlrd
7056 (package-with-python2 python-xlrd))
7057
7058 (define-public python-prettytable
7059 (package
7060 (name "python-prettytable")
7061 (version "0.7.2")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7066 (sha256
7067 (base32
7068 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7069 (build-system python-build-system)
7070 (home-page "http://code.google.com/p/prettytable/")
7071 (synopsis "Display tabular data in an ASCII table format")
7072 (description
7073 "A library designed to represent tabular data in visually appealing ASCII
7074 tables. PrettyTable allows for selection of which columns are to be printed,
7075 independent alignment of columns (left or right justified or centred) and
7076 printing of sub-tables by specifying a row range.")
7077 (license license:bsd-3)))
7078
7079 (define-public python2-prettytable
7080 (package-with-python2 python-prettytable))
7081
7082 (define-public python-tables
7083 (package
7084 (name "python-tables")
7085 (version "3.4.4")
7086 (source
7087 (origin
7088 (method url-fetch)
7089 (uri (pypi-uri "tables" version))
7090 (sha256
7091 (base32
7092 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7093 (modules '((guix build utils)))
7094 (snippet
7095 '(begin
7096 ;; Remove pre-compiled .pyc files from source.
7097 (for-each delete-file-recursively
7098 (find-files "." "__pycache__" #:directories? #t))
7099 (for-each delete-file (find-files "." "\\.pyc$"))
7100 #t))))
7101 (build-system python-build-system)
7102 (arguments
7103 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7104 ;; or "check", so we must override the build and check phases.
7105 #:phases
7106 (modify-phases %standard-phases
7107 (add-after 'unpack 'use-gcc
7108 (lambda _
7109 (substitute* "setup.py"
7110 (("compiler = new_compiler\\(\\)" line)
7111 (string-append line
7112 "\ncompiler.set_executables(compiler='gcc',"
7113 "compiler_so='gcc',"
7114 "linker_exe='gcc',"
7115 "linker_so='gcc -shared')")))
7116 #t))
7117 (replace 'build
7118 (lambda* (#:key inputs #:allow-other-keys)
7119 (invoke "python" "setup.py" "build"
7120 (string-append "--hdf5="
7121 (assoc-ref inputs "hdf5")))))
7122 (replace 'check
7123 (lambda* (#:key inputs #:allow-other-keys)
7124 (invoke "python" "setup.py" "check"
7125 (string-append "--hdf5="
7126 (assoc-ref inputs "hdf5"))))))))
7127 (propagated-inputs
7128 `(("python-numexpr" ,python-numexpr)
7129 ("python-numpy" ,python-numpy)))
7130 (native-inputs
7131 `(("python-cython" ,python-cython)
7132 ("pkg-config" ,pkg-config)))
7133 (inputs
7134 `(("hdf5" ,hdf5)
7135 ("bzip2" ,bzip2)
7136 ("zlib" ,zlib)))
7137 (home-page "http://www.pytables.org/")
7138 (synopsis "Hierarchical datasets for Python")
7139 (description "PyTables is a package for managing hierarchical datasets and
7140 designed to efficiently cope with extremely large amounts of data.")
7141 (license license:bsd-3)))
7142
7143 (define-public python2-tables
7144 (package-with-python2 python-tables))
7145
7146 (define-public python-pyasn1
7147 (package
7148 (name "python-pyasn1")
7149 (version "0.4.3")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "pyasn1" version))
7154 (sha256
7155 (base32
7156 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7157 (build-system python-build-system)
7158 (home-page "http://pyasn1.sourceforge.net/")
7159 (synopsis "ASN.1 types and codecs")
7160 (description
7161 "This is an implementation of ASN.1 types and codecs in Python. It is
7162 suitable for a wide range of protocols based on the ASN.1 specification.")
7163 (license license:bsd-2)))
7164
7165 (define-public python2-pyasn1
7166 (package-with-python2 python-pyasn1))
7167
7168 (define-public python-pyasn1-modules
7169 (package
7170 (name "python-pyasn1-modules")
7171 (version "0.2.2")
7172 (source
7173 (origin
7174 (method url-fetch)
7175 (uri (pypi-uri "pyasn1-modules" version))
7176 (sha256
7177 (base32
7178 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7179 (build-system python-build-system)
7180 (propagated-inputs
7181 `(("python-pyasn1" ,python-pyasn1)))
7182 (home-page "https://sourceforge.net/projects/pyasn1/")
7183 (synopsis "ASN.1 codec implementations")
7184 (description
7185 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7186 implementations of ASN.1-based codecs and protocols.")
7187 (license license:bsd-3)))
7188
7189 (define-public python2-pyasn1-modules
7190 (package-with-python2 python-pyasn1-modules))
7191
7192 (define-public python-ipaddress
7193 (package
7194 (name "python-ipaddress")
7195 (version "1.0.22")
7196 (source (origin
7197 (method url-fetch)
7198 (uri (pypi-uri "ipaddress" version))
7199 (sha256
7200 (base32
7201 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7202 (build-system python-build-system)
7203 (home-page "https://github.com/phihag/ipaddress")
7204 (synopsis "IP address manipulation library")
7205 (description
7206 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7207 in Python. This library is used to create, poke at, and manipulate IPv4 and
7208 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7209 module to older versions of Python.")
7210 (license license:psfl)))
7211
7212 (define-public python2-ipaddress
7213 (package-with-python2 python-ipaddress))
7214
7215 (define-public python2-ipaddr
7216 (package
7217 (name "python2-ipaddr")
7218 (version "2.1.11")
7219 (source
7220 (origin
7221 (method url-fetch)
7222 (uri (pypi-uri "ipaddr" version))
7223 (sha256
7224 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7225 (build-system python-build-system)
7226 (arguments
7227 `(#:python ,python-2 ;version 2 only
7228 #:phases
7229 (modify-phases %standard-phases
7230 (replace 'check
7231 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7232 (home-page "https://github.com/google/ipaddr-py")
7233 (synopsis "IP address manipulation library")
7234 (description
7235 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7236 IPv6 addresses and networks.
7237
7238 For new implementations you may prefer to use the standard module
7239 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7240 versions of Python.")
7241 (license license:asl2.0)))
7242
7243 (define-public python-idna
7244 (package
7245 (name "python-idna")
7246 (version "2.8")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "idna" version))
7251 (sha256
7252 (base32
7253 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7254 (build-system python-build-system)
7255 (home-page "https://github.com/kjd/idna")
7256 (synopsis "Internationalized domain names in applications")
7257 (description
7258 "This is a library to support the Internationalised Domain Names in
7259 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7260 protocol is often referred to as “IDNA2008” and can produce different results
7261 from the earlier standard from 2003. The library is also intended to act as a
7262 suitable drop-in replacement for the “encodings.idna” module that comes with
7263 the Python standard library but currently only supports the older 2003
7264 specification.")
7265 (license license:bsd-4)))
7266
7267 (define-public python-idna-2.7
7268 (package (inherit python-idna)
7269 (version "2.7")
7270 (source (origin
7271 (method url-fetch)
7272 (uri (pypi-uri "idna" version))
7273 (sha256
7274 (base32
7275 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7276
7277
7278 (define-public python2-idna
7279 (package-with-python2 python-idna))
7280
7281 (define-public python-idna-ssl
7282 (package
7283 (name "python-idna-ssl")
7284 (version "1.0.1")
7285 (source
7286 (origin
7287 (method url-fetch)
7288 (uri (pypi-uri "idna-ssl" version))
7289 (sha256
7290 (base32
7291 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7292 (build-system python-build-system)
7293 (arguments
7294 `(#:tests? #f)) ;circular dependency with python-aiohttp
7295 (home-page "https://github.com/aio-libs/idna-ssl")
7296 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7297 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7298 domains support.")
7299 (license license:expat)))
7300
7301 (define-public python-pretend
7302 (package
7303 (name "python-pretend")
7304 (version "1.0.9")
7305 (source
7306 (origin
7307 (method url-fetch)
7308 (uri (pypi-uri "pretend" version))
7309 (sha256
7310 (base32
7311 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7312 (build-system python-build-system)
7313 (home-page "https://github.com/alex/pretend")
7314 (synopsis "Library for stubbing in Python")
7315 (description
7316 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7317 technique for writing tests. You may hear the term mixed up with mocks,
7318 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7319 responses, rather than doing any computation.")
7320 (license license:bsd-3)))
7321
7322 (define-public python2-pretend
7323 (package-with-python2 python-pretend))
7324
7325 (define-public python-pip
7326 (package
7327 (name "python-pip")
7328 (version "18.1")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "pip" version))
7333 (sha256
7334 (base32
7335 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7336 (build-system python-build-system)
7337 (arguments
7338 '(#:tests? #f)) ; there are no tests in the pypi archive.
7339 (home-page "https://pip.pypa.io/")
7340 (synopsis "Package manager for Python software")
7341 (description
7342 "Pip is a package manager for Python software, that finds packages on the
7343 Python Package Index (PyPI).")
7344 (license license:expat)))
7345
7346 (define-public python2-pip
7347 (package-with-python2 python-pip))
7348
7349 (define-public python-tlsh
7350 (package
7351 (name "python-tlsh")
7352 (version "3.4.5")
7353 (home-page "https://github.com/trendmicro/tlsh")
7354 (source
7355 (origin
7356 (method git-fetch)
7357 (uri (git-reference
7358 (url "https://github.com/trendmicro/tlsh.git")
7359 (commit (string-append "v" version))))
7360 (file-name (git-file-name name version))
7361 (sha256
7362 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7363 (build-system cmake-build-system)
7364 (arguments
7365 '(#:out-of-source? #f
7366 #:phases (modify-phases %standard-phases
7367 (replace
7368 'install
7369 (lambda* (#:key outputs #:allow-other-keys)
7370 ;; Build and install the Python bindings. The underlying
7371 ;; C++ library is apparently not meant to be installed.
7372 (let ((out (assoc-ref outputs "out")))
7373 (with-directory-excursion "py_ext"
7374 (and (system* "python" "setup.py" "build")
7375 (system* "python" "setup.py" "install"
7376 (string-append "--prefix=" out))))))))))
7377 (inputs `(("python" ,python-wrapper))) ;for the bindings
7378 (synopsis "Fuzzy matching library for Python")
7379 (description
7380 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7381 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7382 value which can be used for similarity comparisons. Similar objects have
7383 similar hash values, which allows for the detection of similar objects by
7384 comparing their hash values. The byte stream should have a sufficient amount
7385 of complexity; for example, a byte stream of identical bytes will not generate
7386 a hash value.")
7387 (license license:asl2.0)))
7388
7389 (define-public python2-tlsh
7390 (package
7391 (inherit python-tlsh)
7392 (name "python2-tlsh")
7393 (inputs `(("python" ,python-2)))))
7394
7395 (define-public python-termcolor
7396 (package
7397 (name "python-termcolor")
7398 (version "1.1.0")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (pypi-uri "termcolor" version))
7403 (sha256
7404 (base32
7405 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7406 (build-system python-build-system)
7407 (arguments
7408 ;; There are no tests.
7409 `(#:tests? #f))
7410 (home-page "https://pypi.python.org/pypi/termcolor")
7411 (synopsis "ANSII Color formatting for terminal output")
7412 (description
7413 "This package provides ANSII Color formatting for output in terminals.")
7414 (license license:expat)))
7415
7416 (define-public python2-termcolor
7417 (package-with-python2 python-termcolor))
7418
7419 (define-public python-libarchive-c
7420 (package
7421 (name "python-libarchive-c")
7422 (version "2.8")
7423 (source (origin
7424 (method url-fetch)
7425 (uri (pypi-uri "libarchive-c" version))
7426 (sha256
7427 (base32
7428 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7429 (build-system python-build-system)
7430 (arguments
7431 '(#:phases (modify-phases %standard-phases
7432 (add-before
7433 'build 'reference-libarchive
7434 (lambda* (#:key inputs #:allow-other-keys)
7435 ;; Retain the absolute file name of libarchive.so.
7436 (let ((libarchive (assoc-ref inputs "libarchive")))
7437 (substitute* "libarchive/ffi.py"
7438 (("find_library\\('archive'\\)")
7439 (string-append "'" libarchive
7440 "/lib/libarchive.so'"))))))
7441 (replace 'check
7442 (lambda _ (invoke "pytest" "-vv"))))))
7443 (native-inputs
7444 `(("python-mock" ,python-mock)
7445 ("python-pytest" ,python-pytest)))
7446 (inputs
7447 `(("libarchive" ,libarchive)))
7448 (home-page "https://github.com/Changaco/python-libarchive-c")
7449 (synopsis "Python interface to libarchive")
7450 (description
7451 "This package provides Python bindings to libarchive, a C library to
7452 access possibly compressed archives in many different formats. It uses
7453 Python's @code{ctypes} foreign function interface (FFI).")
7454 (license license:lgpl2.0+)))
7455
7456 (define-public python2-libarchive-c
7457 (package-with-python2 python-libarchive-c))
7458
7459 (define-public python-file
7460 (package
7461 (inherit file)
7462 (name "python-file")
7463 (build-system python-build-system)
7464 (arguments
7465 '(#:tests? #f ;no tests
7466 #:configure-flags '("--single-version-externally-managed" "--root=/")
7467 #:phases (modify-phases %standard-phases
7468 (add-before 'build 'change-directory
7469 (lambda _
7470 (chdir "python")
7471 #t))
7472 (add-before 'build 'set-library-file-name
7473 (lambda* (#:key inputs #:allow-other-keys)
7474 (let ((file (assoc-ref inputs "file")))
7475 (substitute* "magic.py"
7476 (("find_library\\('magic'\\)")
7477 (string-append "'" file "/lib/libmagic.so'")))
7478 #t))))))
7479 (inputs `(("file" ,file)))
7480 (native-inputs (if (%current-target-system)
7481 `(("self" ,this-package))
7482 '()))
7483 (synopsis "Python bindings to the libmagic file type guesser. Note that
7484 this module and the python-magic module both provide a \"magic.py\" file;
7485 these two modules, which are different and were developed separately, both
7486 serve the same purpose: provide Python bindings for libmagic.")))
7487
7488 (define-public python2-file
7489 (package-with-python2 python-file))
7490
7491 (define-public python-debian
7492 (package
7493 (name "python-debian")
7494 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7495 (version "0.1.28")
7496 (source
7497 (origin
7498 (method url-fetch)
7499 (uri (pypi-uri name version))
7500 (sha256
7501 (base32
7502 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7503 (build-system python-build-system)
7504 (propagated-inputs
7505 `(("python-six" ,python-six)))
7506 (synopsis "Debian package related modules")
7507 (description
7508 ;; XXX: Use @enumerate instead of @itemize to work around
7509 ;; <http://bugs.gnu.org/21772>.
7510 "This package provides Python modules that abstract many formats of
7511 Debian-related files, such as:
7512
7513 @enumerate
7514 @item Debtags information;
7515 @item @file{debian/changelog} files;
7516 @item packages files, pdiffs;
7517 @item control files of single or multiple RFC822-style paragraphs---e.g.
7518 @file{debian/control}, @file{.changes}, @file{.dsc};
7519 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7520 contained files and meta-information.
7521 @end enumerate\n")
7522
7523 ;; Modules are either GPLv2+ or GPLv3+.
7524 (license license:gpl3+)))
7525
7526 (define-public python2-debian
7527 (package-with-python2 python-debian))
7528
7529 (define-public python-nbformat
7530 (package
7531 (name "python-nbformat")
7532 (version "4.4.0")
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "nbformat" version))
7537 (sha256
7538 (base32
7539 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7540 (build-system python-build-system)
7541 (arguments `(#:tests? #f)) ; no test target
7542 (propagated-inputs
7543 `(("python-ipython-genutils" ,python-ipython-genutils)
7544 ("python-jsonschema" ,python-jsonschema)
7545 ("python-jupyter-core" ,python-jupyter-core)
7546 ("python-traitlets" ,python-traitlets)))
7547 (home-page "http://jupyter.org")
7548 (synopsis "Jupyter Notebook format")
7549 (description "This package provides the reference implementation of the
7550 Jupyter Notebook format and Python APIs for working with notebooks.")
7551 (license license:bsd-3)))
7552
7553 (define-public python2-nbformat
7554 (package-with-python2 python-nbformat))
7555
7556 (define-public python-bleach
7557 (package
7558 (name "python-bleach")
7559 (version "1.4.3")
7560 (source
7561 (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "bleach" version))
7564 (sha256
7565 (base32
7566 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7567 (build-system python-build-system)
7568 (propagated-inputs
7569 `(("python-html5lib" ,python-html5lib-0.9)
7570 ("python-six" ,python-six)))
7571 (native-inputs
7572 `(("python-nose" ,python-nose)))
7573 (home-page "https://github.com/jsocol/bleach")
7574 (synopsis "Whitelist-based HTML-sanitizing tool")
7575 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7576 (license license:asl2.0)))
7577
7578 (define-public python2-bleach
7579 (package-with-python2 python-bleach))
7580
7581 (define-public python-entrypoints
7582 (package
7583 (name "python-entrypoints")
7584 (version "0.3")
7585 (source
7586 (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "entrypoints" version))
7589 (sha256
7590 (base32
7591 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7592 (build-system python-build-system)
7593 ;; The package does not come with a setup.py file, so we have to generate
7594 ;; one ourselves.
7595 (arguments
7596 `(#:tests? #f
7597 #:phases
7598 (modify-phases %standard-phases
7599 (add-after 'unpack 'create-setup.py
7600 (lambda _
7601 (call-with-output-file "setup.py"
7602 (lambda (port)
7603 (format port "\
7604 from setuptools import setup
7605 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7606 " ,version))))))))
7607 (home-page "https://github.com/takluyver/entrypoints")
7608 (synopsis "Discover and load entry points from installed Python packages")
7609 (description "Entry points are a way for Python packages to advertise
7610 objects with some common interface. The most common examples are
7611 @code{console_scripts} entry points, which define shell commands by
7612 identifying a Python function to run. The @code{entrypoints} module contains
7613 functions to find and load entry points.")
7614 (license license:expat)))
7615
7616 (define-public python2-entrypoints
7617 (package-with-python2 python-entrypoints))
7618
7619 (define-public python-nbconvert
7620 (package
7621 (name "python-nbconvert")
7622 (version "5.0.0b1")
7623 (source
7624 (origin
7625 (method url-fetch)
7626 (uri (pypi-uri "nbconvert" version))
7627 (sha256
7628 (base32
7629 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7630 (build-system python-build-system)
7631 (arguments
7632 `(;; The "bdist_egg" target is disabled by default, causing the installation
7633 ;; to fail.
7634 #:configure-flags (list "bdist_egg")
7635 ;; FIXME: 5 failures, 40 errors.
7636 #:tests? #f))
7637 ;; #:phases
7638 ;; (modify-phases %standard-phases
7639 ;; (replace 'check
7640 ;; (lambda _
7641 ;; (zero? (system* "py.test" "-v")))))
7642 (native-inputs
7643 `(("python-pytest" ,python-pytest)))
7644 (propagated-inputs
7645 `(("python-bleach" ,python-bleach)
7646 ("python-entrypoints" ,python-entrypoints)
7647 ("python-jinja2" ,python-jinja2)
7648 ("python-jupyter-core" ,python-jupyter-core)
7649 ("python-mistune" ,python-mistune)
7650 ("python-nbformat" ,python-nbformat)
7651 ("python-pygments" ,python-pygments)
7652 ("python-traitlets" ,python-traitlets)))
7653 (home-page "http://jupyter.org")
7654 (synopsis "Converting Jupyter Notebooks")
7655 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7656 notebooks to various other formats via Jinja templates. It allows you to
7657 convert an @code{.ipynb} notebook file into various static formats including:
7658
7659 @enumerate
7660 @item HTML
7661 @item LaTeX
7662 @item PDF
7663 @item Reveal JS
7664 @item Markdown (md)
7665 @item ReStructured Text (rst)
7666 @item executable script
7667 @end enumerate\n")
7668 (license license:bsd-3)))
7669
7670 (define-public python2-nbconvert
7671 (package-with-python2 python-nbconvert))
7672
7673 (define-public python-notebook
7674 (package
7675 (name "python-notebook")
7676 (version "5.7.4")
7677 (source (origin
7678 (method url-fetch)
7679 (uri (pypi-uri "notebook" version))
7680 (sha256
7681 (base32
7682 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7683 (build-system python-build-system)
7684 (arguments
7685 `(#:phases
7686 (modify-phases %standard-phases
7687 (replace 'check
7688 (lambda _
7689 ;; These tests require a browser
7690 (delete-file-recursively "notebook/tests/selenium")
7691 ;; Some tests need HOME
7692 (setenv "HOME" "/tmp")
7693 ;; This file contains "warningfilters", which are not supported
7694 ;; by this version of nose.
7695 (delete-file "setup.cfg")
7696 (with-directory-excursion "/tmp"
7697 (invoke "nosetests" "-v"))
7698 #t)))))
7699 (propagated-inputs
7700 `(("python-jupyter-core" ,python-jupyter-core)
7701 ("python-nbformat" ,python-nbformat)
7702 ("python-nbconvert" ,python-nbconvert)
7703 ("python-prometheus-client" ,python-prometheus-client)
7704 ("python-send2trash" ,python-send2trash)
7705 ("python-terminado" ,python-terminado)))
7706 (native-inputs
7707 `(("python-nose" ,python-nose)
7708 ("python-sphinx" ,python-sphinx)
7709 ("python-requests" ,python-requests)))
7710 (home-page "http://jupyter.org/")
7711 (synopsis "Web-based notebook environment for interactive computing")
7712 (description
7713 "The Jupyter HTML notebook is a web-based notebook environment for
7714 interactive computing.")
7715 (properties `((python2-variant . ,(delay python2-notebook))))
7716 (license license:bsd-3)))
7717
7718 (define-public python2-notebook
7719 (let ((base (package-with-python2
7720 (strip-python2-variant python-notebook))))
7721 (package (inherit base)
7722 (native-inputs
7723 `(("python2-mock" ,python2-mock)
7724 ,@(package-native-inputs base)))
7725 (arguments
7726 (substitute-keyword-arguments (package-arguments base)
7727 ((#:phases phases)
7728 `(modify-phases ,phases
7729 (add-before 'check 'disable-test-case
7730 ;; The test requires network access to localhost. Curiously it
7731 ;; fails with Python 2 only. Simply make the test-case return
7732 ;; immediately.
7733 (lambda _
7734 (substitute*
7735 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7736 (("formats = self.nbconvert_api") "return #")))))))))))
7737
7738 (define-public python-widgetsnbextension
7739 (package
7740 (name "python-widgetsnbextension")
7741 (version "3.4.2")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (pypi-uri "widgetsnbextension" version))
7746 (sha256
7747 (base32
7748 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7749 (build-system python-build-system)
7750 (propagated-inputs
7751 `(("python-ipykernel" ,python-ipykernel)
7752 ("python-notebook" ,python-notebook)))
7753 (native-inputs
7754 `(("python-certifi" ,python-certifi)
7755 ("python-nose" ,python-nose)))
7756 (home-page "https://ipython.org")
7757 (synopsis "IPython HTML widgets for Jupyter")
7758 (description "This package provides interactive HTML widgets for Jupyter
7759 notebooks.")
7760 (license license:bsd-3)))
7761
7762 (define-public python2-widgetsnbextension
7763 (package-with-python2 python-widgetsnbextension))
7764
7765 (define-public python-ipywidgets
7766 (package
7767 (name "python-ipywidgets")
7768 (version "5.2.2")
7769 (source
7770 (origin
7771 (method url-fetch)
7772 (uri (pypi-uri "ipywidgets" version))
7773 (sha256
7774 (base32
7775 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7776 (build-system python-build-system)
7777 (propagated-inputs
7778 `(("python-ipython" ,python-ipython)
7779 ("python-traitlets" ,python-traitlets)
7780 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7781 (native-inputs
7782 `(("python-nose" ,python-nose)
7783 ("python-pytest" ,python-pytest)))
7784 (home-page "https://ipython.org")
7785 (synopsis "IPython HTML widgets for Jupyter")
7786 (description "Ipywidgets are interactive HTML widgets for Jupyter
7787 notebooks and the IPython kernel. Notebooks come alive when interactive
7788 widgets are used. Users gain control of their data and can visualize changes
7789 in the data.")
7790 (license license:bsd-3)))
7791
7792 (define-public python2-ipywidgets
7793 (package-with-python2 python-ipywidgets))
7794
7795 (define-public python-jupyter-console
7796 (package
7797 (name "python-jupyter-console")
7798 (version "6.0.0")
7799 (source
7800 (origin
7801 (method url-fetch)
7802 (uri (pypi-uri "jupyter_console" version))
7803 (sha256
7804 (base32
7805 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7806 (build-system python-build-system)
7807 (propagated-inputs
7808 `(("python-ipykernel" ,python-ipykernel)
7809 ("python-jupyter-client" ,python-jupyter-client)
7810 ("python-prompt-toolkit" ,python-prompt-toolkit)
7811 ("python-pygments" ,python-pygments)))
7812 (native-inputs
7813 `(("python-nose" ,python-nose)))
7814 (home-page "https://jupyter.org")
7815 (synopsis "Jupyter terminal console")
7816 (description "This package provides a terminal-based console frontend for
7817 Jupyter kernels. It also allows for console-based interaction with non-Python
7818 Jupyter kernels such as IJulia and IRKernel.")
7819 (license license:bsd-3)))
7820
7821 (define-public python2-jupyter-console
7822 (package
7823 (name "python2-jupyter-console")
7824 (version "5.2.0")
7825 (source
7826 (origin
7827 (method url-fetch)
7828 (uri (pypi-uri "jupyter_console" version))
7829 (sha256
7830 (base32
7831 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7832 (build-system python-build-system)
7833 ;; Tests only run in an TTY.
7834 (arguments `(#:tests? #f))
7835 (propagated-inputs
7836 `(("python2-ipykernel" ,python2-ipykernel)
7837 ("python2-jupyter-client" ,python2-jupyter-client)
7838 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7839 ("python2-pygments" ,python2-pygments)))
7840 (native-inputs
7841 `(("python2-nose" ,python2-nose)))
7842 (home-page "https://jupyter.org")
7843 (synopsis "Jupyter terminal console")
7844 (description "This package provides a terminal-based console frontend for
7845 Jupyter kernels. It also allows for console-based interaction with non-Python
7846 Jupyter kernels such as IJulia and IRKernel.")
7847 (license license:bsd-3)))
7848
7849 ;; The python-ipython and python-jupyter-console require each other. To get
7850 ;; the functionality in both packages working, strip down the
7851 ;; python-jupyter-console package when using it as an input to python-ipython.
7852 (define python-jupyter-console-minimal
7853 (package
7854 (inherit python-jupyter-console)
7855 (name "python-jupyter-console-minimal")
7856 (arguments
7857 (substitute-keyword-arguments
7858 (package-arguments python-jupyter-console)
7859 ((#:phases phases)
7860 `(modify-phases ,phases
7861 (add-after 'install 'delete-bin
7862 (lambda* (#:key outputs #:allow-other-keys)
7863 ;; Delete the bin files, to avoid conflicts in profiles
7864 ;; where python-ipython and python-jupyter-console are
7865 ;; both present.
7866 (delete-file-recursively
7867 (string-append
7868 (assoc-ref outputs "out") "/bin"))))))))
7869 ;; Remove the python-ipython propagated input, to avoid the cycle
7870 (propagated-inputs
7871 (alist-delete
7872 "python-ipython"
7873 (package-propagated-inputs python-jupyter-console)))))
7874
7875 (define-public python-qtconsole
7876 (package
7877 (name "python-qtconsole")
7878 (version "4.4.3")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "qtconsole" version))
7883 (sha256
7884 (base32
7885 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7886 (build-system python-build-system)
7887 (arguments
7888 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7889 ;; but we only have the LTS version 5.x. This means that there might be
7890 ;; runtime errors, but since this is a dependency of the Jupyter package,
7891 ;; and Jupyter can be used without the qtconsole we can overlook this for
7892 ;; now.
7893 `(#:tests? #f
7894 #:phases
7895 (modify-phases %standard-phases
7896 (add-before 'check 'pre-check
7897 (lambda _
7898 (setenv "QT_QPA_PLATFORM" "offscreen")
7899 #t)))))
7900 (propagated-inputs
7901 `(("python-ipykernel" ,python-ipykernel)
7902 ("python-ipython" ,python-ipython)))
7903 (native-inputs
7904 `(("python-pytest" ,python-pytest)))
7905 (home-page "http://jupyter.org")
7906 (synopsis "Jupyter Qt console")
7907 (description "This package provides a Qt-based console for Jupyter with
7908 support for rich media output.")
7909 (license license:bsd-3)))
7910
7911 (define-public jupyter
7912 (package
7913 (name "jupyter")
7914 (version "1.0.0")
7915 (source
7916 (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "jupyter" version))
7919 (sha256
7920 (base32
7921 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7922 (build-system python-build-system)
7923 (arguments '(#:tests? #f)) ; there are none.
7924 (propagated-inputs
7925 `(("python-ipykernel" ,python-ipykernel)
7926 ("python-ipywidgets" ,python-ipywidgets)
7927 ("python-jupyter-console" ,python-jupyter-console)
7928 ("python-nbconvert" ,python-nbconvert)
7929 ("python-notebook" ,python-notebook)
7930 ("python-qtconsole" ,python-qtconsole)))
7931 (native-search-paths
7932 (list (search-path-specification
7933 (variable "JUPYTER_PATH")
7934 (files '("share/jupyter")))))
7935 (home-page "https://jupyter.org")
7936 (synopsis "Web application for interactive documents")
7937 (description
7938 "The Jupyter Notebook is a web application that allows you to create and
7939 share documents that contain live code, equations, visualizations and
7940 explanatory text. Uses include: data cleaning and transformation, numerical
7941 simulation, statistical modeling, machine learning and much more.")
7942 (license license:bsd-3)))
7943
7944 (define-public python-chardet
7945 (package
7946 (name "python-chardet")
7947 (version "3.0.4")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "chardet" version))
7952 (sha256
7953 (base32
7954 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7955 (native-inputs
7956 `(("python-hypothesis" ,python-hypothesis)
7957 ("python-pytest" ,python-pytest)
7958 ("python-pytest-runner" ,python-pytest-runner)))
7959 (build-system python-build-system)
7960 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7961 (arguments `(#:tests? #f))
7962 (home-page "https://github.com/chardet/chardet")
7963 (synopsis "Universal encoding detector for Python 2 and 3")
7964 (description
7965 "This package provides @code{chardet}, a Python module that can
7966 automatically detect a wide range of file encodings.")
7967 (license license:lgpl2.1+)))
7968
7969 (define-public python2-chardet
7970 (package-with-python2 python-chardet))
7971
7972 (define-public python-docopt
7973 (package
7974 (name "python-docopt")
7975 (version "0.6.2")
7976 (source
7977 (origin
7978 (method url-fetch)
7979 ;; The release on PyPI does not include tests.
7980 (uri (string-append
7981 "https://github.com/docopt/docopt/archive/"
7982 version ".tar.gz"))
7983 (file-name (string-append name "-" version ".tar.gz"))
7984 (sha256
7985 (base32
7986 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7987 (build-system python-build-system)
7988 (native-inputs
7989 `(("python-pytest" ,python-pytest)))
7990 (arguments
7991 `(#:phases
7992 (modify-phases %standard-phases
7993 (replace 'check
7994 (lambda _ (invoke "py.test"))))))
7995 (home-page "http://docopt.org")
7996 (synopsis "Command-line interface description language for Python")
7997 (description "This library allows the user to define a command-line
7998 interface from a program's help message rather than specifying it
7999 programmatically with command-line parsers like @code{getopt} and
8000 @code{argparse}.")
8001 (license license:expat)))
8002
8003 (define-public python2-docopt
8004 (package-with-python2 python-docopt))
8005
8006 (define-public python-pythondialog
8007 (package
8008 (name "python-pythondialog")
8009 (version "3.4.0")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "pythondialog" version))
8014 (sha256
8015 (base32
8016 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8017 (build-system python-build-system)
8018 (arguments
8019 `(#:phases
8020 (modify-phases %standard-phases
8021 (add-after 'unpack 'patch-path
8022 (lambda* (#:key inputs #:allow-other-keys)
8023 (let* ((dialog (assoc-ref inputs "dialog")))
8024 ;; Since this library really wants to grovel the search path, we
8025 ;; must hardcode dialog's store path into it.
8026 (substitute* "dialog.py"
8027 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8028 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8029 #t))))
8030 #:tests? #f)) ; no test suite
8031 (propagated-inputs
8032 `(("dialog" ,dialog)))
8033 (home-page "http://pythondialog.sourceforge.net/")
8034 (synopsis "Python interface to the UNIX dialog utility")
8035 (description "A Python wrapper for the dialog utility. Its purpose is to
8036 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8037 This allows one to make simple text-mode user interfaces on Unix-like systems")
8038 (license license:lgpl2.1)
8039 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8040
8041 (define-public python2-pythondialog
8042 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8043 (package
8044 (inherit base)
8045 (version (package-version python-pythondialog))
8046 (source (origin
8047 (method url-fetch)
8048 (uri (pypi-uri "python2-pythondialog" version))
8049 (sha256
8050 (base32
8051 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8052
8053 (define-public python-configobj
8054 (package
8055 (name "python-configobj")
8056 (version "5.0.6")
8057 (source (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "configobj" version))
8060 (sha256
8061 (base32
8062 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8063 ;; Patch setup.py so it looks for python-setuptools, which is
8064 ;; required to parse the keyword 'install_requires' in setup.py.
8065 (patches (search-patches "python-configobj-setuptools.patch"))))
8066 (build-system python-build-system)
8067 (propagated-inputs
8068 `(("python-six" ,python-six)))
8069 (synopsis "Config file reading, writing and validation")
8070 (description "ConfigObj is a simple but powerful config file reader and
8071 writer: an ini file round tripper. Its main feature is that it is very easy to
8072 use, with a straightforward programmer’s interface and a simple syntax for
8073 config files.")
8074 (home-page "https://github.com/DiffSK/configobj")
8075 (license license:bsd-3)))
8076
8077 (define-public python2-configobj
8078 (package-with-python2 python-configobj))
8079
8080 (define-public python-configargparse
8081 (package
8082 (name "python-configargparse")
8083 (version "0.14.0")
8084 (source (origin
8085 (method url-fetch)
8086 (uri (pypi-uri "ConfigArgParse" version))
8087 (sha256
8088 (base32
8089 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8090 (build-system python-build-system)
8091 (native-inputs
8092 `(("python-pyyaml" ,python-pyyaml)))
8093 (arguments
8094 `(#:phases
8095 (modify-phases %standard-phases
8096 (replace 'check
8097 (lambda _
8098 ;; Bypass setuptools-shim because one test relies on "setup.py"
8099 ;; being the first argument passed to the python call.
8100 ;;
8101 ;; NOTE: Many tests do not run because they rely on Python's
8102 ;; built-in test.test_argparse, but we remove the unit tests from
8103 ;; our Python installation.
8104 (invoke "python" "setup.py" "test"))))))
8105 (synopsis "Replacement for argparse")
8106 (description "A drop-in replacement for argparse that allows options to also
8107 be set via config files and/or environment variables.")
8108 (home-page "https://github.com/bw2/ConfigArgParse")
8109 (license license:expat)))
8110
8111 (define-public python2-configargparse
8112 (package-with-python2 python-configargparse))
8113
8114 (define-public python-argparse-manpage
8115 (package
8116 (name "python-argparse-manpage")
8117 (version "1.1")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "argparse-manpage" version))
8122 (sha256
8123 (base32
8124 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8125 (build-system python-build-system)
8126 (home-page "https://github.com/praiskup/argparse-manpage")
8127 (synopsis "Build manual page from Python's ArgumentParser object")
8128 (description
8129 "This package provides tools to build manual pages from Python's
8130 @code{ArgumentParser} object.")
8131 (license license:asl2.0)))
8132
8133 (define-public python-contextlib2
8134 (package
8135 (name "python-contextlib2")
8136 (version "0.5.5")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "contextlib2" version))
8141 (sha256
8142 (base32
8143 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8144 (build-system python-build-system)
8145 (home-page "http://contextlib2.readthedocs.org/")
8146 (synopsis "Tools for decorators and context managers")
8147 (description "This module is primarily a backport of the Python
8148 3.2 contextlib to earlier Python versions. Like contextlib, it
8149 provides utilities for common tasks involving decorators and context
8150 managers. It also contains additional features that are not part of
8151 the standard library.")
8152 (license license:psfl)))
8153
8154 (define-public python2-contextlib2
8155 (package
8156 (name "python2-contextlib2")
8157 (version "0.5.5")
8158 (source
8159 (origin
8160 (method url-fetch)
8161 (uri (pypi-uri "contextlib2" version))
8162 (sha256
8163 (base32
8164 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8165 (build-system python-build-system)
8166 (arguments
8167 `(#:python ,python-2
8168 #:phases
8169 (modify-phases %standard-phases
8170 (replace 'check
8171 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8172 (native-inputs
8173 `(("python2-unittest2" ,python2-unittest2)))
8174 (home-page "http://contextlib2.readthedocs.org/")
8175 (synopsis "Tools for decorators and context managers")
8176 (description "This module is primarily a backport of the Python
8177 3.2 contextlib to earlier Python versions. Like contextlib, it
8178 provides utilities for common tasks involving decorators and context
8179 managers. It also contains additional features that are not part of
8180 the standard library.")
8181 (license license:psfl)))
8182
8183 (define-public python-texttable
8184 (package
8185 (name "python-texttable")
8186 (version "0.9.1")
8187 (source
8188 (origin
8189 (method url-fetch)
8190 (uri (pypi-uri "texttable" version))
8191 (sha256
8192 (base32
8193 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8194 (build-system python-build-system)
8195 (arguments '(#:tests? #f)) ; no tests
8196 (home-page "https://github.com/foutaise/texttable/")
8197 (synopsis "Python module for creating simple ASCII tables")
8198 (description "Texttable is a Python module for creating simple ASCII
8199 tables.")
8200 (license license:lgpl2.1+)))
8201
8202 (define-public python2-texttable
8203 (package-with-python2 python-texttable))
8204
8205 (define-public python-atomicwrites
8206 (package
8207 (name "python-atomicwrites")
8208 (version "1.3.0")
8209 (source (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "atomicwrites" version))
8212 (sha256
8213 (base32
8214 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8215 (build-system python-build-system)
8216 (synopsis "Atomic file writes in Python")
8217 (description "Library for atomic file writes using platform dependent tools
8218 for atomic file system operations.")
8219 (home-page "https://github.com/untitaker/python-atomicwrites")
8220 (license license:expat)))
8221
8222 (define-public python2-atomicwrites
8223 (package-with-python2 python-atomicwrites))
8224
8225 (define-public python-click-threading
8226 (package
8227 (name "python-click-threading")
8228 (version "0.4.4")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "click-threading" version))
8232 (sha256
8233 (base32
8234 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8235 (build-system python-build-system)
8236 (propagated-inputs
8237 `(("python-click" ,python-click)))
8238 (synopsis "Utilities for multithreading in Click")
8239 (description "This package provides utilities for multithreading in Click
8240 applications.")
8241 (home-page "https://github.com/click-contrib/click-threading")
8242 (license license:expat)))
8243
8244 (define-public python-click-log
8245 (package
8246 (name "python-click-log")
8247 (version "0.3.2")
8248 (source (origin
8249 (method url-fetch)
8250 (uri (pypi-uri "click-log" version))
8251 (sha256
8252 (base32
8253 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8254 (build-system python-build-system)
8255 (propagated-inputs
8256 `(("python-click" ,python-click)))
8257 (synopsis "Logging for click applications")
8258 (description "This package provides a Python library for logging Click
8259 applications.")
8260 (home-page "https://github.com/click-contrib/click-log")
8261 (license license:expat)))
8262
8263 (define-public python-apipkg
8264 (package
8265 (name "python-apipkg")
8266 (version "1.4")
8267 (source (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "apipkg" version))
8270 (sha256
8271 (base32
8272 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8273 (build-system python-build-system)
8274 (native-inputs
8275 `(("python-pytest" ,python-pytest)))
8276 (synopsis "Namespace control and lazy-import mechanism")
8277 (description "With apipkg you can control the exported namespace of a Python
8278 package and greatly reduce the number of imports for your users. It is a small
8279 pure Python module that works on virtually all Python versions.")
8280 (home-page "https://github.com/pytest-dev/apipkg")
8281 (license license:expat)))
8282
8283 (define-public python2-apipkg
8284 (package-with-python2 python-apipkg))
8285
8286 (define-public python-execnet
8287 (package
8288 (name "python-execnet")
8289 (version "1.4.1")
8290 (source (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "execnet" version))
8293 (sha256
8294 (base32
8295 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8296 (build-system python-build-system)
8297 (arguments
8298 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8299 ;; The two test failures are caused by the lack of an `ssh` executable.
8300 ;; The test suite can be run with pytest after the 'install' phase.
8301 #:tests? #f))
8302 (native-inputs
8303 `(("python-pytest" ,python-pytest)
8304 ("python-setuptools-scm" ,python-setuptools-scm)))
8305 (propagated-inputs
8306 `(("python-apipkg" ,python-apipkg)))
8307 (synopsis "Rapid multi-Python deployment")
8308 (description "Execnet provides a share-nothing model with
8309 channel-send/receive communication for distributing execution across many
8310 Python interpreters across version, platform and network barriers. It has a
8311 minimal and fast API targeting the following uses:
8312 @enumerate
8313 @item distribute tasks to (many) local or remote CPUs
8314 @item write and deploy hybrid multi-process applications
8315 @item write scripts to administer multiple environments
8316 @end enumerate")
8317 (home-page "http://codespeak.net/execnet/")
8318 (license license:expat)))
8319
8320 (define-public python2-execnet
8321 (package-with-python2 python-execnet))
8322
8323 (define-public python-icalendar
8324 (package
8325 (name "python-icalendar")
8326 (version "4.0.3")
8327 (source (origin
8328 (method url-fetch)
8329 (uri (pypi-uri "icalendar" version))
8330 (sha256
8331 (base32
8332 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8333 (build-system python-build-system)
8334 (propagated-inputs
8335 `(("python-dateutil" ,python-dateutil)
8336 ("python-pytz" ,python-pytz)))
8337 (synopsis "Python library for parsing iCalendar files")
8338 (description "The icalendar package is a parser/generator of iCalendar
8339 files for use with Python.")
8340 (home-page "https://github.com/collective/icalendar")
8341 (license license:bsd-2)))
8342
8343 (define-public python-args
8344 (package
8345 (name "python-args")
8346 (version "0.1.0")
8347 (source (origin
8348 (method url-fetch)
8349 (uri (pypi-uri "args" version))
8350 (sha256
8351 (base32
8352 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8353 (build-system python-build-system)
8354 (home-page "https://github.com/kennethreitz/args")
8355 (synopsis "Command-line argument parser")
8356 (description
8357 "This library provides a Python module to parse command-line arguments.")
8358 (license license:bsd-3)))
8359
8360 (define-public python2-args
8361 (package-with-python2 python-args))
8362
8363 (define-public python-clint
8364 (package
8365 (name "python-clint")
8366 (version "0.5.1")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (pypi-uri "clint" version))
8370 (sha256
8371 (base32
8372 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8373 (build-system python-build-system)
8374 (arguments
8375 '(#:phases
8376 (modify-phases %standard-phases
8377 (replace 'check
8378 (lambda _ (invoke "py.test" "-v"))))))
8379 (native-inputs
8380 `(("python-pytest" ,python-pytest)))
8381 (propagated-inputs
8382 `(("python-args" ,python-args)))
8383 (home-page "https://github.com/kennethreitz/clint")
8384 (synopsis "Command-line interface tools")
8385 (description
8386 "Clint is a Python module filled with a set of tools for developing
8387 command-line applications, including tools for colored and indented
8388 output, progress bar display, and pipes.")
8389 (license license:isc)))
8390
8391 (define-public python2-clint
8392 (package-with-python2 python-clint))
8393
8394 (define-public python-rply
8395 (package
8396 (name "python-rply")
8397 (version "0.7.5")
8398 (source (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "rply" version))
8401 (sha256
8402 (base32
8403 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8404 (build-system python-build-system)
8405 (propagated-inputs
8406 `(("python-appdirs" ,python-appdirs)))
8407 (home-page "https://github.com/alex/rply")
8408 (synopsis "Parser generator for Python")
8409 (description
8410 "This package provides a pure Python based parser generator, that also
8411 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8412 with a new public API, and RPython support.")
8413 (license license:bsd-3)))
8414
8415 (define-public python2-rply
8416 (package-with-python2 python-rply))
8417
8418 (define-public python-hy
8419 (package
8420 (name "python-hy")
8421 (version "0.13.0")
8422 (source (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "hy" version))
8425 (sha256
8426 (base32
8427 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8428 (build-system python-build-system)
8429 (arguments
8430 '(#:phases
8431 (modify-phases %standard-phases
8432 (replace 'check
8433 (lambda _
8434 ;; Tests require write access to HOME.
8435 (setenv "HOME" "/tmp")
8436 (invoke "nosetests"))))))
8437 (native-inputs
8438 `(("python-coverage" ,python-coverage)
8439 ("python-nose" ,python-nose)))
8440 (propagated-inputs
8441 `(("python-astor" ,python-astor)
8442 ("python-clint" ,python-clint)
8443 ("python-rply" ,python-rply)))
8444 (home-page "http://hylang.org/")
8445 (synopsis "Lisp frontend to Python")
8446 (description
8447 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8448 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8449 Python at your fingertips, in Lisp form.")
8450 (license license:expat)))
8451
8452 (define-public python2-hy
8453 (package-with-python2 python-hy))
8454
8455 (define-public python2-functools32
8456 (package
8457 (name "python2-functools32")
8458 (version "3.2.3-2")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "functools32" version))
8463 (sha256
8464 (base32
8465 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8466 (build-system python-build-system)
8467 (arguments
8468 `(#:python ,python-2
8469 #:tests? #f)) ; no test target
8470 (home-page "https://github.com/MiCHiLU/python-functools32")
8471 (synopsis
8472 "Backport of the functools module from Python 3.2.3")
8473 (description
8474 "This package is a backport of the @code{functools} module from Python
8475 3.2.3 for use with older versions of Python and PyPy.")
8476 (license license:expat)))
8477
8478 (define-public python2-subprocess32
8479 (package
8480 (name "python2-subprocess32")
8481 (version "3.2.7")
8482 (source (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "subprocess32" version))
8485 (sha256
8486 (base32
8487 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8488 (patches
8489 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8490 (build-system python-build-system)
8491 (arguments
8492 `(#:python ,python-2
8493 ;; The test suite fails with Python > 2.7.13:
8494 ;; import test.support
8495 ;; ImportError: No module named support
8496 #:tests? #f
8497 #:phases
8498 (modify-phases %standard-phases
8499 (add-after 'unpack 'patch-/bin/sh
8500 (lambda _
8501 (substitute* '("subprocess32.py"
8502 "test_subprocess32.py")
8503 (("/bin/sh") (which "sh")))
8504 #t)))))
8505 (home-page "https://github.com/google/python-subprocess32")
8506 (synopsis "Backport of the subprocess module from Python 3.2")
8507 (description
8508 "This is a backport of the @code{subprocess} standard library module
8509 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8510 new features. On POSIX systems it is guaranteed to be reliable when used
8511 in threaded applications. It includes timeout support from Python 3.3 but
8512 otherwise matches 3.2’s API.")
8513 (license license:psfl)))
8514
8515 (define-public python2-futures
8516 (package
8517 (name "python2-futures")
8518 (version "3.2.0")
8519 (source
8520 (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "futures" version))
8523 (sha256
8524 (base32
8525 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8526 (build-system python-build-system)
8527 (arguments
8528 `(#:python ,python-2
8529 #:phases
8530 (modify-phases %standard-phases
8531 (replace 'check
8532 (lambda _
8533 (invoke "python" "test_futures.py")
8534 #t)))))
8535 (home-page "https://github.com/agronholm/pythonfutures")
8536 (synopsis
8537 "Backport of the concurrent.futures package from Python 3.2")
8538 (description
8539 "The concurrent.futures module provides a high-level interface for
8540 asynchronously executing callables. This package backports the
8541 concurrent.futures package from Python 3.2")
8542 (license license:bsd-3)))
8543
8544 (define-public python-promise
8545 (package
8546 (name "python-promise")
8547 (version "0.4.2")
8548 (source
8549 (origin
8550 (method url-fetch)
8551 (uri (pypi-uri "promise" version))
8552 (sha256
8553 (base32
8554 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8555 (build-system python-build-system)
8556 ;; Tests wants python-futures, which is a python2 only program, and
8557 ;; can't be found by python-promise at test time.
8558 (arguments `(#:tests? #f))
8559 (home-page "https://github.com/syrusakbary/promise")
8560 (synopsis "Promises/A+ implementation for Python")
8561 (description
8562 "Promises/A+ implementation for Python")
8563 (properties `((python2-variant . ,(delay python2-promise))))
8564 (license license:expat)))
8565
8566 (define-public python2-promise
8567 (let ((promise (package-with-python2
8568 (strip-python2-variant python-promise))))
8569 (package (inherit promise)
8570 (arguments (substitute-keyword-arguments (package-arguments promise)
8571 ((#:tests? _) #t)))
8572 (native-inputs
8573 `(("python2-futures" ,python2-futures)
8574 ("python2-pytest" ,python2-pytest)
8575 ,@(package-native-inputs promise))))))
8576
8577 (define-public python-progressbar33
8578 (package
8579 (name "python-progressbar33")
8580 (version "2.4")
8581 (source
8582 (origin
8583 (method url-fetch)
8584 (uri (pypi-uri "progressbar33" version))
8585 (sha256
8586 (base32
8587 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8588 (build-system python-build-system)
8589 (home-page "http://github.com/germangh/python-progressbar")
8590 (synopsis "Text progress bar library for Python")
8591 (description
8592 "This package provides a text progress bar library for Python. This
8593 version only differs from the original @code{progressbar} package in that it
8594 uses relative package imports instead of absolute imports, which is necessary
8595 for the module to work under Python 3.3.")
8596 ;; Either or both of these licenses may be selected.
8597 (license (list license:lgpl2.1+ license:bsd-3))))
8598
8599 (define-public python-colorama
8600 (package
8601 (name "python-colorama")
8602 (version "0.3.9")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "colorama" version))
8607 (sha256
8608 (base32
8609 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8610 (build-system python-build-system)
8611 (synopsis "Colored terminal text rendering for Python")
8612 (description "Colorama is a Python library for rendering colored terminal
8613 text.")
8614 (home-page "https://pypi.python.org/pypi/colorama")
8615 (license license:bsd-3)))
8616
8617 (define-public python2-colorama
8618 (package-with-python2 python-colorama))
8619
8620 (define-public python-rsa
8621 (package
8622 (name "python-rsa")
8623 (version "3.4.2")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "rsa" version))
8628 (sha256
8629 (base32
8630 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8631 (build-system python-build-system)
8632 (propagated-inputs
8633 `(("python-pyasn1" ,python-pyasn1)))
8634 (synopsis "Pure-Python RSA implementation")
8635 (description "Python-RSA is a pure-Python RSA implementation. It supports
8636 encryption and decryption, signing and verifying signatures, and key
8637 generation according to PKCS#1 version 1.5. It can be used as a Python
8638 library as well as on the command line.")
8639 (home-page "https://stuvel.eu/rsa")
8640 (license license:asl2.0)))
8641
8642 (define-public python2-rsa
8643 (package-with-python2 python-rsa))
8644
8645 (define-public python-pluggy
8646 (package
8647 (name "python-pluggy")
8648 (version "0.11.0")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "pluggy" version))
8653 (sha256
8654 (base32
8655 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8656 (build-system python-build-system)
8657 (native-inputs
8658 `(("python-setuptools-scm" ,python-setuptools-scm)))
8659 (synopsis "Plugin and hook calling mechanism for Python")
8660 (description "Pluggy is an extraction of the plugin manager as used by
8661 Pytest but stripped of Pytest specific details.")
8662 (home-page "https://pypi.python.org/pypi/pluggy")
8663 (license license:expat)))
8664
8665 (define-public python2-pluggy
8666 (package-with-python2 python-pluggy))
8667
8668 (define-public python-tox
8669 (package
8670 (name "python-tox")
8671 (version "2.8.1")
8672 (source
8673 (origin
8674 (method url-fetch)
8675 (uri (pypi-uri "tox" version))
8676 (sha256
8677 (base32
8678 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8679 (build-system python-build-system)
8680 (arguments
8681 ;; FIXME: Tests require pytest-timeout, which itself requires
8682 ;; pytest>=2.8.0 for installation.
8683 '(#:tests? #f))
8684 (propagated-inputs
8685 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8686 ("python-py" ,python-py)
8687 ("python-virtualenv" ,python-virtualenv)))
8688 (native-inputs
8689 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8690 ("python-pytest" ,python-pytest) ; >= 2.3.5
8691 ("python-setuptools-scm" ,python-setuptools-scm)))
8692 (home-page "http://tox.testrun.org/")
8693 (synopsis "Virtualenv-based automation of test activities")
8694 (description "Tox is a generic virtualenv management and test command line
8695 tool. It can be used to check that a package installs correctly with
8696 different Python versions and interpreters, or run tests in each type of
8697 supported environment, or act as a frontend to continuous integration
8698 servers.")
8699 (license license:expat)))
8700
8701 (define-public python2-tox
8702 (package-with-python2 python-tox))
8703
8704 (define-public python-jmespath
8705 (package
8706 (name "python-jmespath")
8707 (version "0.9.3")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "jmespath" version))
8712 (sha256
8713 (base32
8714 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8715 (build-system python-build-system)
8716 (native-inputs
8717 `(("python-nose" ,python-nose)))
8718 (synopsis "JSON Matching Expressions")
8719 (description "JMESPath (pronounced “james path”) is a Python library that
8720 allows one to declaratively specify how to extract elements from a JSON
8721 document.")
8722 (home-page "https://github.com/jmespath/jmespath.py")
8723 (license license:expat)))
8724
8725 (define-public python2-jmespath
8726 (package-with-python2 python-jmespath))
8727
8728 (define-public python-botocore
8729 (package
8730 (name "python-botocore")
8731 (version "1.12.149")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "botocore" version))
8736 (sha256
8737 (base32
8738 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8739 (build-system python-build-system)
8740 (arguments
8741 ;; FIXME: Many tests are failing.
8742 '(#:tests? #f))
8743 (propagated-inputs
8744 `(("python-dateutil" ,python-dateutil)
8745 ("python-docutils" ,python-docutils)
8746 ("python-jmespath" ,python-jmespath)))
8747 (native-inputs
8748 `(("python-mock" ,python-mock)
8749 ("python-nose" ,python-nose)
8750 ("behave" ,behave)
8751 ("python-tox" ,python-tox)
8752 ("python-urllib3" ,python-urllib3)
8753 ("python-wheel" ,python-wheel)))
8754 (home-page "https://github.com/boto/botocore")
8755 (synopsis "Low-level interface to AWS")
8756 (description "Botocore is a Python library that provides a low-level
8757 interface to the Amazon Web Services (AWS) API.")
8758 (license license:asl2.0)))
8759
8760 (define-public python2-botocore
8761 (package-with-python2 python-botocore))
8762
8763 (define-public python-xdo
8764 (package
8765 (name "python-xdo")
8766 (version "0.3")
8767 (source (origin
8768 (method url-fetch)
8769 (uri (string-append
8770 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8771 "python-xdo_" version ".orig.tar.gz"))
8772 (sha256
8773 (base32
8774 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8775 (build-system python-build-system)
8776 (arguments
8777 '(#:phases
8778 (modify-phases %standard-phases
8779 (add-before 'install 'patch-libxdo-path
8780 ;; Hardcode the path of dynamically loaded libxdo library.
8781 (lambda* (#:key inputs #:allow-other-keys)
8782 (let ((libxdo (string-append
8783 (assoc-ref inputs "xdotool")
8784 "/lib/libxdo.so")))
8785 (substitute* "xdo/_xdo.py"
8786 (("find_library\\(\"xdo\"\\)")
8787 (simple-format #f "\"~a\"" libxdo)))
8788 #t))))
8789 #:tests? #f)) ; no tests provided
8790 (propagated-inputs
8791 `(("python-six" ,python-six)))
8792 (inputs
8793 `(("xdotool" ,xdotool)
8794 ("libX11" ,libx11)))
8795 (home-page "https://tracker.debian.org/pkg/python-xdo")
8796 (synopsis "Python library for simulating X11 keyboard/mouse input")
8797 (description "Provides bindings to libxdo for manipulating X11 via simulated
8798 input. (Note that this is mostly a legacy library; you may wish to look at
8799 python-xdo for newer bindings.)")
8800 (license license:bsd-3)))
8801
8802 (define-public python2-xdo
8803 (package-with-python2 python-xdo))
8804
8805 (define-public python-mako
8806 (package
8807 (name "python-mako")
8808 (version "1.0.13")
8809 (source
8810 (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "Mako" version))
8813 (sha256
8814 (base32
8815 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8816 (build-system python-build-system)
8817 (propagated-inputs
8818 `(("python-markupsafe" ,python-markupsafe)))
8819 (native-inputs
8820 `(("python-mock" ,python-mock)
8821 ("python-nose" ,python-nose)
8822 ("python-pytest" ,python-pytest)))
8823 (home-page "https://www.makotemplates.org/")
8824 (synopsis "Templating language for Python")
8825 (description "Mako is a templating language for Python that compiles
8826 templates into Python modules.")
8827 (license license:expat)))
8828
8829 (define-public python2-mako
8830 (package-with-python2 python-mako))
8831
8832 (define-public python-waitress
8833 (package
8834 (name "python-waitress")
8835 (version "1.1.0")
8836 (source
8837 (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "waitress" version))
8840 (patches (search-patches "python-waitress-fix-tests.patch"))
8841 (sha256
8842 (base32
8843 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8844 (build-system python-build-system)
8845 (home-page "https://github.com/Pylons/waitress")
8846 (synopsis "Waitress WSGI server")
8847 (description "Waitress is meant to be a production-quality pure-Python WSGI
8848 server with very acceptable performance.")
8849 (license license:zpl2.1)))
8850
8851 (define-public python2-waitress
8852 (package-with-python2 python-waitress))
8853
8854 (define-public python-pyquery
8855 (package
8856 (name "python-pyquery")
8857 (version "1.2.17")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (pypi-uri "pyquery" version))
8862 (sha256
8863 (base32
8864 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8865 (build-system python-build-system)
8866 (native-inputs
8867 `(("python-webob" ,python-webob)
8868 ("python-webtest" ,python-webtest)))
8869 (propagated-inputs
8870 `(("python-lxml" ,python-lxml)
8871 ("python-cssselect" ,python-cssselect)))
8872 (home-page "https://github.com/gawel/pyquery")
8873 (synopsis "Make jQuery-like queries on xml documents")
8874 (description "pyquery allows you to make jQuery queries on xml documents.
8875 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8876 fast xml and html manipulation.")
8877 (license license:bsd-3)))
8878
8879 (define-public python-anyjson
8880 (package
8881 (name "python-anyjson")
8882 (version "0.3.3")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "anyjson" version))
8887 (sha256
8888 (base32
8889 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8890 (build-system python-build-system)
8891 (arguments
8892 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8893 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8894 ;; whatever) so this transformation needs to be done before the tests
8895 ;; can be run. Maybe we could add a build step to transform beforehand
8896 ;; but it could be annoying/difficult.
8897 ;; We can enable tests for the Python 2 version, though, and do below.
8898 #:tests? #f))
8899 (home-page "https://bitbucket.org/runeh/anyjson/")
8900 (synopsis
8901 "Wraps best available JSON implementation in a common interface")
8902 (description
8903 "Anyjson loads whichever is the fastest JSON module installed
8904 and provides a uniform API regardless of which JSON implementation is used.")
8905 (license license:bsd-3)
8906 (properties `((python2-variant . ,(delay python2-anyjson))))))
8907
8908 (define-public python2-anyjson
8909 (let ((anyjson (package-with-python2
8910 (strip-python2-variant python-anyjson))))
8911 (package
8912 (inherit anyjson)
8913 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8914 #:tests? #t
8915 ,@(package-arguments anyjson)))
8916 (native-inputs `(("python2-nose" ,python2-nose))))))
8917
8918 (define-public python-amqp
8919 (package
8920 (name "python-amqp")
8921 (version "2.3.2")
8922 (source
8923 (origin
8924 (method url-fetch)
8925 (uri (pypi-uri "amqp" version))
8926 (sha256
8927 (base32
8928 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8929 (build-system python-build-system)
8930 (native-inputs
8931 `(("python-case" ,python-case)
8932 ("python-pytest-sugar" ,python-pytest-sugar)
8933 ("python-mock" ,python-mock)))
8934 (propagated-inputs
8935 `(("python-vine" ,python-vine)))
8936 (home-page "https://github.com/celery/py-amqp")
8937 (synopsis
8938 "Low-level AMQP client for Python (fork of amqplib)")
8939 (description
8940 "This is a fork of amqplib which was originally written by Barry Pederson.
8941 It is maintained by the Celery project, and used by kombu as a pure python
8942 alternative when librabbitmq is not available.")
8943 (license license:lgpl2.1+)
8944 (properties `((python2-variant . ,(delay python2-amqp))))))
8945
8946 (define-public python2-amqp
8947 (let ((amqp (package-with-python2
8948 (strip-python2-variant python-amqp))))
8949 (package
8950 (inherit amqp)
8951 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8952 ;; unmaintained. Weirdly, does not do this on the python 3
8953 ;; version?
8954 #:tests? #f
8955 ,@(package-arguments amqp))))))
8956
8957 (define-public python-txamqp
8958 (package
8959 (name "python-txamqp")
8960 (version "0.8.2")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "txAMQP" version))
8965 (sha256
8966 (base32
8967 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8968 (build-system python-build-system)
8969 (propagated-inputs
8970 `(("python-six" ,python-six)
8971 ("python-twisted" ,python-twisted)))
8972 (home-page "https://github.com/txamqp/txamqp")
8973 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8974 (description
8975 "This package provides a Python library for communicating with AMQP peers
8976 and brokers using the asynchronous networking framework Twisted. It contains
8977 all the necessary code to connect, send and receive messages to/from an
8978 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8979 also includes support for using Thrift RPC over AMQP in Twisted
8980 applications.")
8981 (license license:asl2.0)))
8982
8983 (define-public python2-txamqp
8984 (package-with-python2 python-txamqp))
8985
8986 (define-public python-kombu
8987 (package
8988 (name "python-kombu")
8989 (version "4.2.2")
8990 (source
8991 (origin
8992 (method url-fetch)
8993 (uri (pypi-uri "kombu" version))
8994 (sha256
8995 (base32
8996 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8997 (build-system python-build-system)
8998 (native-inputs
8999 `(("python-mock" ,python-mock)
9000 ("python-case" ,python-case)
9001 ("python-pyro4" ,python-pyro4)
9002 ("python-pytest-sugar" ,python-pytest-sugar)
9003 ("python-pytz" ,python-pytz)))
9004 (propagated-inputs
9005 `(("python-anyjson" ,python-anyjson)
9006 ("python-amqp" ,python-amqp)
9007 ("python-redis" ,python-redis)))
9008 (home-page "https://kombu.readthedocs.io")
9009 (synopsis "Message passing library for Python")
9010 (description "The aim of Kombu is to make messaging in Python as easy as
9011 possible by providing an idiomatic high-level interface for the AMQ protocol,
9012 and also provide proven and tested solutions to common messaging problems.
9013 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9014 message orientation, queuing, routing, reliability and security, for which the
9015 RabbitMQ messaging server is the most popular implementation.")
9016 (license license:bsd-3)
9017 (properties `((python2-variant . ,(delay python2-kombu))))))
9018
9019 (define-public python2-kombu
9020 (let ((kombu (package-with-python2
9021 (strip-python2-variant python-kombu))))
9022 (package
9023 (inherit kombu)
9024 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9025 ;; It works fine on the python3 variant.
9026 #:tests? #f
9027 ,@(package-arguments kombu)))
9028 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9029 ,@(package-native-inputs kombu))))))
9030
9031 (define-public python-billiard
9032 (package
9033 (name "python-billiard")
9034 (version "3.5.0.5")
9035 (source
9036 (origin
9037 (method url-fetch)
9038 (uri (pypi-uri "billiard" version))
9039 (sha256
9040 (base32
9041 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9042 (build-system python-build-system)
9043 (native-inputs
9044 `(("python-case" ,python-case)
9045 ("python-pytest" ,python-pytest)))
9046 (home-page "https://github.com/celery/billiard")
9047 (synopsis
9048 "Python multiprocessing fork with improvements and bugfixes")
9049 (description
9050 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9051 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9052 pyprocessing package. This standalone variant is intended to be compatible with
9053 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9054 (license license:bsd-3)
9055 (properties `((python2-variant . ,(delay python2-billiard))))))
9056
9057 (define-public python2-billiard
9058 (let ((billiard (package-with-python2
9059 (strip-python2-variant python-billiard))))
9060 (package
9061 (inherit billiard)
9062 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9063 ("python2-mock" ,python2-mock)
9064 ,@(package-native-inputs billiard))))))
9065
9066 (define-public python-celery
9067 (package
9068 (name "python-celery")
9069 (version "4.2.1")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "celery" version))
9074 (sha256
9075 (base32
9076 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9077 (build-system python-build-system)
9078 (arguments
9079 '(;; TODO The tests fail with Python 3.7
9080 ;; https://github.com/celery/celery/issues/4849
9081 #:tests? #f
9082 #:phases
9083 (modify-phases %standard-phases
9084 (add-after 'unpack 'patch-requirements
9085 (lambda _
9086 (substitute* "requirements/test.txt"
9087 (("pytest>=3\\.0,<3\\.3")
9088 "pytest>=3.0"))
9089 #t)))))
9090 (native-inputs
9091 `(("python-case" ,python-case)
9092 ("python-pytest" ,python-pytest)))
9093 (propagated-inputs
9094 `(("python-pytz" ,python-pytz)
9095 ("python-billiard" ,python-billiard)
9096 ("python-kombu" ,python-kombu)))
9097 (home-page "https://celeryproject.org")
9098 (synopsis "Distributed Task Queue")
9099 (description "Celery is an asynchronous task queue/job queue based on
9100 distributed message passing. It is focused on real-time operation, but
9101 supports scheduling as well. The execution units, called tasks, are executed
9102 concurrently on a single or more worker servers using multiprocessing,
9103 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9104 synchronously (wait until ready).")
9105 (license license:bsd-3)
9106 (properties `((python2-variant . ,(delay python2-celery))))))
9107
9108 (define-public python2-celery
9109 (let ((celery (package-with-python2
9110 (strip-python2-variant python-celery))))
9111 (package
9112 (inherit celery)
9113 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9114 ("python2-mock" ,python2-mock)
9115 ,@(package-native-inputs celery))))))
9116
9117 (define-public python-translitcodec
9118 (package
9119 (name "python-translitcodec")
9120 (version "0.4.0")
9121 (source
9122 (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "translitcodec" version))
9125 (sha256
9126 (base32
9127 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9128 (build-system python-build-system)
9129 (arguments
9130 `(#:tests? #f)) ; no tests provided
9131 (home-page
9132 "https://github.com/claudep/translitcodec")
9133 (synopsis
9134 "Unicode to 8-bit charset transliteration codec")
9135 (description
9136 "This package contains codecs for transliterating ISO 10646 texts into
9137 best-effort representations using smaller coded character sets (ASCII,
9138 ISO 8859, etc.).")
9139 (license license:expat)))
9140
9141 (define-public python2-translitcodec
9142 (package-with-python2 python-translitcodec))
9143
9144 (define-public python-editor
9145 (package
9146 (name "python-editor")
9147 (version "0.5")
9148 (source
9149 (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "python-editor" version))
9152 (sha256
9153 (base32
9154 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9155 (build-system python-build-system)
9156 (home-page
9157 "https://github.com/fmoo/python-editor")
9158 (synopsis
9159 "Programmatically open an editor, capture the result")
9160 (description
9161 "python-editor is a library that provides the editor module for
9162 programmatically interfacing with your system's $EDITOR.")
9163 (license license:asl2.0)))
9164
9165 (define-public python2-editor
9166 (package-with-python2 python-editor))
9167
9168 (define-public python-vobject
9169 (package
9170 (name "python-vobject")
9171 (version "0.9.5")
9172 (source (origin
9173 (method url-fetch)
9174 (uri (pypi-uri "vobject" version))
9175 (sha256
9176 (base32
9177 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9178 (build-system python-build-system)
9179 (arguments
9180 '(;; The test suite relies on some non-portable Windows interfaces.
9181 #:tests? #f))
9182 (propagated-inputs
9183 `(("python-dateutil" ,python-dateutil)
9184 ("python-pyicu" ,python-pyicu)))
9185 (synopsis "Parse and generate vCard and vCalendar files")
9186 (description "Vobject is intended to be a full featured Python package for
9187 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9188 are supported and well tested. vCard 3.0 files are supported, and all data
9189 should be imported, but only a few components are understood in a sophisticated
9190 way.")
9191 (home-page "http://eventable.github.io/vobject/")
9192 (license license:asl2.0)))
9193
9194 (define-public python2-vobject
9195 (package-with-python2 python-vobject))
9196
9197 (define-public python-munkres
9198 (package
9199 (name "python-munkres")
9200 (version "1.0.8")
9201 (source (origin
9202 (method url-fetch)
9203 (uri (pypi-uri "munkres" version))
9204 (sha256
9205 (base32
9206 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9207 (build-system python-build-system)
9208 (arguments
9209 '(#:tests? #f)) ; no test suite
9210 (home-page "http://software.clapper.org/munkres/")
9211 (synopsis "Implementation of the Munkres algorithm")
9212 (description "The Munkres module provides an implementation of the Munkres
9213 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9214 useful for solving the Assignment Problem.")
9215 (license license:bsd-3)))
9216
9217 (define-public python2-munkres
9218 (package-with-python2 python-munkres))
9219
9220 (define-public python-whoosh
9221 (package
9222 (name "python-whoosh")
9223 (version "2.7.4")
9224 (source
9225 (origin
9226 (method url-fetch)
9227 (uri (pypi-uri "Whoosh" version))
9228 (sha256
9229 (base32
9230 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9231 (build-system python-build-system)
9232 (native-inputs
9233 `(("python-pytest" ,python-pytest)))
9234 (home-page "https://bitbucket.org/mchaput/whoosh")
9235 (synopsis "Full text indexing, search, and spell checking library")
9236 (description
9237 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9238 checking library.")
9239 (license license:bsd-2)))
9240
9241 (define-public python2-whoosh
9242 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9243 (package (inherit whoosh)
9244 (propagated-inputs
9245 `(("python2-backport-ssl-match-hostname"
9246 ,python2-backport-ssl-match-hostname)
9247 ,@(package-propagated-inputs whoosh))))))
9248
9249 (define-public python-pathlib
9250 (package
9251 (name "python-pathlib")
9252 (version "1.0.1")
9253 (source (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "pathlib" version))
9256 (sha256
9257 (base32
9258 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9259 (build-system python-build-system)
9260 ;; The tests depend on the internal "test" module, which does not provide
9261 ;; a stable interface.
9262 (arguments `(#:tests? #f))
9263 (home-page "https://pathlib.readthedocs.org/")
9264 (synopsis "Object-oriented file system paths")
9265 (description "Pathlib offers a set of classes to handle file system paths.
9266 It offers the following advantages over using string objects:
9267
9268 @enumerate
9269 @item No more cumbersome use of os and os.path functions. Everything can
9270 be done easily through operators, attribute accesses, and method calls.
9271 @item Embodies the semantics of different path types. For example,
9272 comparing Windows paths ignores casing.
9273 @item Well-defined semantics, eliminating any inconsistencies or
9274 ambiguities (forward vs. backward slashes, etc.).
9275 @end enumerate
9276
9277 Note: In Python 3.4, pathlib is now part of the standard library. For other
9278 Python versions please consider python-pathlib2 instead, which tracks the
9279 standard library module. This module (python-pathlib) isn't maintained
9280 anymore.")
9281 (license license:expat)))
9282
9283 (define-public python2-pathlib
9284 (package-with-python2 python-pathlib))
9285
9286 (define-public python2-pathlib2
9287 (package
9288 (name "python2-pathlib2")
9289 (version "2.3.3")
9290 (source (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "pathlib2" version))
9293 (sha256
9294 (base32
9295 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9296 (build-system python-build-system)
9297 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9298 ;; version is 3.4 which already includes this package as part of the
9299 ;; standard library.
9300 (arguments
9301 `(#:python ,python-2))
9302 (propagated-inputs
9303 `(("python2-scandir" ,python2-scandir)
9304 ("python2-six" ,python2-six)))
9305 (home-page "https://pypi.python.org/pypi/pathlib2/")
9306 (synopsis "Object-oriented file system paths - backport of standard
9307 pathlib module")
9308 (description "The goal of pathlib2 is to provide a backport of standard
9309 pathlib module which tracks the standard library module, so all the newest
9310 features of the standard pathlib can be used also on older Python versions.
9311
9312 Pathlib offers a set of classes to handle file system paths. It offers the
9313 following advantages over using string objects:
9314
9315 @enumerate
9316 @item No more cumbersome use of os and os.path functions. Everything can
9317 be done easily through operators, attribute accesses, and method calls.
9318 @item Embodies the semantics of different path types. For example,
9319 comparing Windows paths ignores casing.
9320 @item Well-defined semantics, eliminating any inconsistencies or
9321 ambiguities (forward vs. backward slashes, etc.).
9322 @end enumerate")
9323 (license license:expat)))
9324
9325 (define-public python2-pathlib2-bootstrap
9326 (hidden-package
9327 (package
9328 (inherit python2-pathlib2)
9329 (name "python2-pathlib2-bootstrap")
9330 (propagated-inputs
9331 `(("python2-scandir" ,python2-scandir)
9332 ("python2-six" ,python2-six-bootstrap))))))
9333
9334 (define-public python-jellyfish
9335 (package
9336 (name "python-jellyfish")
9337 (version "0.5.6")
9338 (source (origin
9339 (method url-fetch)
9340 (uri (pypi-uri "jellyfish" version))
9341 (sha256
9342 (base32
9343 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9344 (build-system python-build-system)
9345 (native-inputs
9346 `(("python-pytest" ,python-pytest)))
9347 (home-page "https://github.com/jamesturk/jellyfish")
9348 (synopsis "Approximate and phonetic matching of strings")
9349 (description "Jellyfish uses a variety of string comparison and phonetic
9350 encoding algorithms to do fuzzy string matching.")
9351 (license license:bsd-2)
9352 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9353
9354 (define-public python2-jellyfish
9355 (let ((jellyfish (package-with-python2
9356 (strip-python2-variant python-jellyfish))))
9357 (package (inherit jellyfish)
9358 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9359 ,@(package-native-inputs jellyfish))))))
9360
9361 (define-public python2-unicodecsv
9362 (package
9363 (name "python2-unicodecsv")
9364 (version "0.14.1")
9365 (source (origin
9366 (method url-fetch)
9367 ;; The test suite is not included in the PyPi release.
9368 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9369 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9370 "archive/" version ".tar.gz"))
9371 (file-name (string-append name "-" version ".tar.gz"))
9372 (sha256
9373 (base32
9374 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9375 (build-system python-build-system)
9376 (arguments
9377 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9378 #:python ,python-2))
9379 (native-inputs
9380 `(("python2-unittest2" ,python2-unittest2)))
9381 (home-page "https://github.com/jdunck/python-unicodecsv")
9382 (synopsis "Unicode CSV module for Python 2")
9383 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9384 module, adding support for Unicode strings.")
9385 (license license:bsd-2)))
9386
9387 (define-public python-rarfile
9388 (package
9389 (name "python-rarfile")
9390 (version "2.8")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "rarfile" version))
9394 (sha256
9395 (base32
9396 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9397 (build-system python-build-system)
9398 (arguments
9399 '(#:phases
9400 (modify-phases %standard-phases
9401 (replace 'check
9402 ;; Many tests fail, but the installation proceeds.
9403 (lambda _ (invoke "make" "-C" "test" "test"))))))
9404 (native-inputs
9405 `(("which" ,which))) ; required for tests
9406 (propagated-inputs
9407 `(("libarchive" ,libarchive)))
9408 (home-page "https://github.com/markokr/rarfile")
9409 (synopsis "RAR archive reader for Python")
9410 (description "This is Python module for RAR archive reading. The interface
9411 is made as zipfile like as possible.")
9412 (license license:isc)))
9413
9414 (define-public python2-rarfile
9415 (package-with-python2 python-rarfile))
9416
9417 (define-public python-magic
9418 (package
9419 (name "python-magic")
9420 (version "0.4.15")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "python-magic" version))
9425 (sha256
9426 (base32
9427 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9428 (file-name (string-append name "-" version "-checkout"))))
9429 (build-system python-build-system)
9430 (arguments
9431 ;; The tests are unreliable, so don't run them. The tests fail
9432 ;; under Python3 because they were written for Python2 and
9433 ;; contain import statements that do not work in Python3. One of
9434 ;; the tests fails under Python2 because its assertions are
9435 ;; overly stringent; it relies on comparing output strings which
9436 ;; are brittle and can change depending on the version of
9437 ;; libmagic being used and the system on which the test is
9438 ;; running. In my case, under GuixSD 0.10.0, only one test
9439 ;; failed, and it seems to have failed only because the version
9440 ;; of libmagic that is packaged in Guix outputs a slightly
9441 ;; different (but not wrong) string than the one that the test
9442 ;; expected.
9443 '(#:tests? #f
9444 #:phases (modify-phases %standard-phases
9445 ;; Replace a specific method call with a hard-coded
9446 ;; path to the necessary libmagic.so file in the
9447 ;; store. If we don't do this, then the method call
9448 ;; will fail to find the libmagic.so file, which in
9449 ;; turn will cause any application using
9450 ;; python-magic to fail.
9451 (add-before 'build 'hard-code-path-to-libmagic
9452 (lambda* (#:key inputs #:allow-other-keys)
9453 (let ((file (assoc-ref inputs "file")))
9454 (substitute* "magic.py"
9455 (("ctypes.util.find_library\\('magic'\\)")
9456 (string-append "'" file "/lib/libmagic.so'")))
9457 #t)))
9458 (add-before 'install 'disable-egg-compression
9459 (lambda _
9460 (let ((port (open-file "setup.cfg" "a")))
9461 (display "\n[easy_install]\nzip_ok = 0\n"
9462 port)
9463 (close-port port)
9464 #t))))))
9465 (inputs
9466 ;; python-magic needs to be able to find libmagic.so.
9467 `(("file" ,file)))
9468 (home-page
9469 "https://github.com/ahupp/python-magic")
9470 (synopsis
9471 "File type identification using libmagic")
9472 (description
9473 "This module uses ctypes to access the libmagic file type
9474 identification library. It makes use of the local magic database and
9475 supports both textual and MIME-type output. Note that this module and
9476 the python-file module both provide a \"magic.py\" file; these two
9477 modules, which are different and were developed separately, both serve
9478 the same purpose: to provide Python bindings for libmagic.")
9479 (license license:expat)))
9480
9481 (define-public python2-magic
9482 (package-with-python2 python-magic))
9483
9484 (define-public python2-s3cmd
9485 (package
9486 (name "python2-s3cmd")
9487 (version "1.6.1")
9488 (source
9489 (origin
9490 (method url-fetch)
9491 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9492 "s3cmd-" version ".tar.gz"))
9493 (sha256
9494 (base32
9495 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9496 (build-system python-build-system)
9497 (arguments
9498 ;; s3cmd is written for python2 only and contains no tests.
9499 `(#:python ,python-2
9500 #:tests? #f))
9501 (propagated-inputs
9502 `(("python2-dateutil" ,python2-dateutil)
9503 ;; The python-file package also provides a magic.py module.
9504 ;; This is an unfortunate state of affairs; however, s3cmd
9505 ;; fails to install if it cannot find specifically the
9506 ;; python-magic package. Thus we include it, instead of using
9507 ;; python-file. Ironically, s3cmd sometimes works better
9508 ;; without libmagic bindings at all:
9509 ;; https://github.com/s3tools/s3cmd/issues/198
9510 ("python2-magic" ,python2-magic)))
9511 (home-page "http://s3tools.org/s3cmd")
9512 (synopsis "Command line tool for S3-compatible storage services")
9513 (description
9514 "S3cmd is a command line tool for uploading, retrieving and managing data
9515 in storage services that are compatible with the Amazon Simple Storage
9516 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9517 GnuPG encryption, and more. It also supports management of Amazon's
9518 CloudFront content delivery network.")
9519 (license license:gpl2+)))
9520
9521 (define-public python-pkgconfig
9522 (package
9523 (name "python-pkgconfig")
9524 (version "1.3.1")
9525 (source
9526 (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "pkgconfig" version))
9529 (sha256
9530 (base32
9531 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9532 (build-system python-build-system)
9533 (native-inputs
9534 `(("python-nose" ,python-nose)))
9535 (inputs
9536 `(("pkg-config" ,pkg-config)))
9537 (arguments
9538 `(#:phases
9539 (modify-phases %standard-phases
9540 (add-before 'build 'patch
9541 ;; Hard-code the path to pkg-config.
9542 (lambda _
9543 (substitute* "pkgconfig/pkgconfig.py"
9544 (("cmd = 'pkg-config")
9545 (string-append "cmd = '" (which "pkg-config"))))
9546 #t))
9547 (replace 'check
9548 (lambda _
9549 (invoke "nosetests" "test.py"))))))
9550 (home-page "https://github.com/matze/pkgconfig")
9551 (synopsis "Python interface for pkg-config")
9552 (description "This module provides a Python interface to pkg-config. It
9553 can be used to find all pkg-config packages, check if a package exists,
9554 check if a package meets certain version requirements, query CFLAGS and
9555 LDFLAGS and parse the output to build extensions with setup.py.")
9556 (license license:expat)))
9557
9558 (define-public python2-pkgconfig
9559 (package-with-python2 python-pkgconfig))
9560
9561 (define-public python-bz2file
9562 (package
9563 (name "python-bz2file")
9564 (version "0.98")
9565 (source
9566 (origin
9567 (method url-fetch)
9568 (uri (pypi-uri "bz2file" version))
9569 (sha256
9570 (base32
9571 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9572 (build-system python-build-system)
9573 (arguments
9574 `(#:tests? #f)) ; Tests use deprecated python modules.
9575 (home-page "https://github.com/nvawda/bz2file")
9576 (synopsis "Read and write bzip2-compressed files")
9577 (description
9578 "Bz2file is a Python library for reading and writing bzip2-compressed
9579 files. It contains a drop-in replacement for the I/O interface in the
9580 standard library's @code{bz2} module, including features from the latest
9581 development version of CPython that are not available in older releases.")
9582 (license license:asl2.0)))
9583
9584 (define-public python2-bz2file
9585 (package-with-python2 python-bz2file))
9586
9587 (define-public python-future
9588 (package
9589 (name "python-future")
9590 (version "0.17.1")
9591 (source
9592 (origin
9593 (method url-fetch)
9594 (uri (pypi-uri "future" version))
9595 (sha256
9596 (base32
9597 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9598 (build-system python-build-system)
9599 ;; Many tests connect to the network or are otherwise flawed.
9600 ;; https://github.com/PythonCharmers/python-future/issues/210
9601 (arguments
9602 `(#:tests? #f))
9603 (home-page "http://python-future.org")
9604 (synopsis "Single-source support for Python 3 and 2")
9605 (description
9606 "@code{python-future} is the missing compatibility layer between Python 2 and
9607 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9608 to support both Python 2 and Python 3 with minimal overhead.")
9609 (license license:expat)))
9610
9611 (define-public python2-future
9612 (package-with-python2 python-future))
9613
9614 (define-public python-cysignals
9615 (package
9616 (name "python-cysignals")
9617 (version "1.9.0")
9618 (source
9619 (origin
9620 (method url-fetch)
9621 (uri (pypi-uri "cysignals" version))
9622 (sha256
9623 (base32
9624 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9625 (build-system python-build-system)
9626 (native-inputs
9627 `(("python-cython" ,python-cython)
9628 ("python-sphinx" ,python-sphinx)))
9629 (inputs
9630 `(("pari-gp" ,pari-gp)))
9631 (arguments
9632 `(#:modules ((guix build python-build-system)
9633 ((guix build gnu-build-system) #:prefix gnu:)
9634 (guix build utils))
9635 ;; FIXME: Tests are executed after installation and currently fail
9636 ;; when not installing into standard locations; the author is working
9637 ;; on a fix.
9638 #:tests? #f
9639 #:phases
9640 (modify-phases %standard-phases
9641 (add-before
9642 'build 'configure
9643 (assoc-ref gnu:%standard-phases 'configure)))))
9644 (home-page
9645 "https://github.com/sagemath/cysignals")
9646 (synopsis
9647 "Handling of interrupts and signals for Cython")
9648 (description
9649 "The cysignals package provides mechanisms to handle interrupts (and
9650 other signals and errors) in Cython code, using two related approaches,
9651 for mixed Cython/Python code or external C libraries and pure Cython code,
9652 respectively.")
9653 (license license:lgpl3+)))
9654
9655 (define-public python2-cysignals
9656 (package-with-python2 python-cysignals))
9657
9658 (define-public python2-shedskin
9659 (package
9660 (name "python2-shedskin")
9661 (version "0.9.4")
9662 (source
9663 (origin
9664 (method url-fetch)
9665 (uri (string-append "https://github.com/shedskin/shedskin/"
9666 "releases/download/v" version
9667 "/shedskin-" version ".tgz"))
9668 (sha256
9669 (base32
9670 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9671 (build-system python-build-system)
9672 (arguments
9673 `(#:python ,python-2
9674 #:phases (modify-phases %standard-phases
9675 (add-after 'unpack 'fix-resulting-include-libs
9676 (lambda* (#:key inputs #:allow-other-keys)
9677 (let ((libgc (assoc-ref inputs "libgc"))
9678 (pcre (assoc-ref inputs "pcre")))
9679 (substitute* "shedskin/makefile.py"
9680 (("variable == 'CCFLAGS':[ ]*")
9681 (string-append "variable == 'CCFLAGS':\n"
9682 " line += ' -I " pcre "/include"
9683 " -I " libgc "/include'"))
9684 (("variable == 'LFLAGS':[ ]*")
9685 (string-append "variable == 'LFLAGS':\n"
9686 " line += ' -L" pcre "/lib"
9687 " -L " libgc "/lib'")))
9688 #t))))))
9689 (inputs `(("pcre" ,pcre)
9690 ("libgc" ,libgc)))
9691 (home-page "https://shedskin.github.io/")
9692 (synopsis "Experimental Python-2 to C++ Compiler")
9693 (description (string-append "This is an experimental compiler for a subset of
9694 Python. It generates C++ code and a Makefile."))
9695 (license (list license:gpl3 license:bsd-3 license:expat))))
9696
9697 (define-public python2-rope
9698 (package
9699 (name "python2-rope")
9700 (version "0.11.0")
9701 (source
9702 (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "rope" version))
9705 (sha256
9706 (base32
9707 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9708 (arguments
9709 ;; Rope has only partial python3 support, see `python-rope'
9710 `(#:python ,python-2))
9711 (build-system python-build-system)
9712 (native-inputs
9713 `(("python2-unittest2" ,python2-unittest2)))
9714 (home-page "https://github.com/python-rope/rope")
9715 (synopsis "Refactoring library for Python")
9716 (description "Rope is a refactoring library for Python. It facilitates
9717 the renaming, moving and extracting of attributes, functions, modules, fields
9718 and parameters in Python 2 source code. These refactorings can also be applied
9719 to occurrences in strings and comments.")
9720 (license license:gpl2)))
9721
9722 (define-public python-rope
9723 (package
9724 (inherit python2-rope)
9725 (name "python-rope")
9726 (arguments `(#:python ,python-wrapper
9727 ;; XXX: Only partial python3 support, results in some failing
9728 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9729 #:tests? #f))
9730 (properties `((python2-variant . ,(delay python2-rope))))))
9731
9732 (define-public python-py3status
9733 (package
9734 (name "python-py3status")
9735 (version "3.16")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "py3status" version))
9740 (sha256
9741 (base32
9742 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9743 (build-system python-build-system)
9744 (inputs
9745 `(("file" ,file)))
9746 (arguments
9747 '(#:phases
9748 (modify-phases %standard-phases
9749 ;; 'file' is used for detection of configuration file encoding
9750 ;; let's make link the dependency to particular input
9751 (add-before 'build 'patch-file-path
9752 (lambda* (#:key inputs #:allow-other-keys)
9753 (let ((file-path (assoc-ref inputs "file")))
9754 (substitute* "py3status/parse_config.py"
9755 (("\\['file', '-b'")
9756 (string-append "['" file-path "/bin/file', '-b'")))
9757 #t))))
9758 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9759 (home-page "https://github.com/ultrabug/py3status")
9760 (synopsis "Extensible i3status wrapper written in Python")
9761 (description "py3status is an i3status wrapper which extends i3status
9762 functionality in a modular way, allowing you to extend your panel with your
9763 own code, responding to click events and updating clock every second.")
9764 (license license:bsd-3)))
9765
9766 (define-public python-tblib
9767 (package
9768 (name "python-tblib")
9769 (version "1.3.2")
9770 (source (origin
9771 (method url-fetch)
9772 (uri (pypi-uri "tblib" version))
9773 (sha256 (base32
9774 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9775 (build-system python-build-system)
9776 (arguments
9777 `(#:phases
9778 (modify-phases %standard-phases
9779 (add-before 'check 'adjust-tests
9780 (lambda _
9781 (when (which "python3")
9782 ;; Adjust the example output to match that of Python 3.7:
9783 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9784 (substitute* "README.rst"
9785 (("Exception\\('fail',") "Exception('fail'"))
9786 #t)))
9787 (replace 'check
9788 (lambda _
9789 ;; Upstream runs tests after installation and the package itself
9790 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9791 ;; found.
9792 (setenv "PYTHONPATH"
9793 (string-append (getcwd) "/build/lib:"
9794 (getenv "PYTHONPATH")))
9795 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9796 (native-inputs
9797 `(("python-pytest" ,python-pytest)
9798 ("python-six" ,python-six)))
9799 (home-page "https://github.com/ionelmc/python-tblib")
9800 (synopsis "Traceback serialization library")
9801 (description
9802 "Traceback serialization allows you to:
9803
9804 @enumerate
9805 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9806 different processes. This allows better error handling when running code over
9807 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9808
9809 @item Parse traceback strings and raise with the parsed tracebacks.
9810 @end enumerate\n")
9811 (license license:bsd-3)))
9812
9813 (define-public python2-tblib
9814 (package-with-python2 python-tblib))
9815
9816 (define-public python-greenlet
9817 (package
9818 (name "python-greenlet")
9819 (version "0.4.15")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "greenlet" version))
9823 (sha256
9824 (base32
9825 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9826 (build-system python-build-system)
9827 (home-page "https://greenlet.readthedocs.io/")
9828 (synopsis "Lightweight in-process concurrent programming")
9829 (description
9830 "Greenlet package is a spin-off of Stackless, a version of CPython
9831 that supports micro-threads called \"tasklets\". Tasklets run
9832 pseudo-concurrently (typically in a single or a few OS-level threads) and
9833 are synchronized with data exchanges on \"channels\".")
9834 (license (list license:psfl license:expat))))
9835
9836 (define-public python2-greenlet
9837 (package-with-python2 python-greenlet))
9838
9839 (define-public python-objgraph
9840 (package
9841 (name "python-objgraph")
9842 (version "3.4.0")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "objgraph" version))
9847 (sha256
9848 (base32
9849 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9850 (build-system python-build-system)
9851 (propagated-inputs
9852 `(("python-graphviz" ,python-graphviz)))
9853 (native-inputs
9854 `(("python-mock" ,python-mock)
9855 ("graphviz" ,graphviz)))
9856 (home-page "https://mg.pov.lt/objgraph/")
9857 (synopsis "Draw Python object reference graphs with graphviz")
9858 (description
9859 "This package provides tools to draw Python object reference graphs with
9860 graphviz.")
9861 (license license:expat)))
9862
9863 (define-public python-gevent
9864 (package
9865 (name "python-gevent")
9866 (version "1.3.7")
9867 (source (origin
9868 (method url-fetch)
9869 (uri (pypi-uri "gevent" version))
9870 (sha256
9871 (base32
9872 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9873 (modules '((guix build utils)))
9874 (snippet
9875 '(begin
9876 ;; unbunding libev and c-ares
9877 (delete-file-recursively "deps")
9878 #t))))
9879 (build-system python-build-system)
9880 (arguments
9881 `(#:modules ((ice-9 ftw)
9882 (ice-9 match)
9883 (srfi srfi-26)
9884 (guix build utils)
9885 (guix build python-build-system))
9886 #:phases (modify-phases %standard-phases
9887 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9888 (lambda _
9889 (substitute* "src/gevent/subprocess.py"
9890 (("/bin/sh") (which "sh")))
9891 (for-each (lambda (file)
9892 (substitute* file
9893 (("/bin/sh") (which "sh"))
9894 (("/bin/true") (which "true"))))
9895 (find-files "src/greentest" "\\.py$"))
9896 #t))
9897 (add-before 'build 'do-not-use-bundled-sources
9898 (lambda* (#:key inputs #:allow-other-keys)
9899 (setenv "CONFIG_SHELL" (which "bash"))
9900 (setenv "LIBEV_EMBED" "false")
9901 (setenv "CARES_EMBED" "false")
9902 (setenv "EMBED" "false")
9903
9904 ;; Prevent building bundled libev.
9905 (substitute* "setup.py"
9906 (("run_make=_BUILDING")
9907 "run_make=False"))
9908
9909 (let ((greenlet (string-append
9910 (assoc-ref inputs "python-greenlet")
9911 "/include")))
9912 (match (scandir greenlet
9913 (lambda (item)
9914 (string-prefix? "python" item)))
9915 ((python)
9916 (setenv "C_INCLUDE_PATH"
9917 (string-append greenlet "/" python)))))
9918 #t))
9919 (add-before 'check 'skip-timer-test
9920 (lambda _
9921 ;; XXX: Skip 'TestTimerResolution', which appears to be
9922 ;; unreliable.
9923 (substitute* "src/greentest/test__core_timer.py"
9924 (("not greentest.RUNNING_ON_CI") "False"))
9925 #t))
9926 (replace 'check
9927 (lambda _
9928 ;; Make sure the build directory is on PYTHONPATH.
9929 (setenv "PYTHONPATH"
9930 (string-append
9931 (getenv "PYTHONPATH") ":"
9932 (getcwd) "/build/"
9933 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9934 (with-directory-excursion "src/greentest"
9935 ;; XXX: Many tests require network access. Instead we only
9936 ;; run known-good tests. Unfortunately we cannot use
9937 ;; recursion here since this directory also contains
9938 ;; Python-version-specific subfolders.
9939 (apply invoke "python" "testrunner.py" "--config"
9940 "known_failures.py"
9941 (scandir "." (cut regexp-exec
9942 (make-regexp "test_+(subprocess|core)")
9943 <>)))))))))
9944 (propagated-inputs
9945 `(("python-greenlet" ,python-greenlet)
9946 ("python-objgraph" ,python-objgraph)))
9947 (native-inputs
9948 `(("python-six" ,python-six)))
9949 (inputs
9950 `(("c-ares" ,c-ares)
9951 ("libev" ,libev)))
9952 (home-page "http://www.gevent.org/")
9953 (synopsis "Coroutine-based network library")
9954 (description
9955 "gevent is a coroutine-based Python networking library that uses greenlet
9956 to provide a high-level synchronous API on top of the libev event loop.")
9957 (license license:expat)
9958 (properties `((python2-variant . ,(delay python2-gevent))))))
9959
9960 (define-public python2-gevent
9961 (let ((base (package-with-python2
9962 (strip-python2-variant python-gevent))))
9963 (package
9964 (inherit base)
9965 (native-inputs `(,@(package-native-inputs python-gevent)
9966 ("python-mock" ,python2-mock))))))
9967
9968 (define-public python-fastimport
9969 (package
9970 (name "python-fastimport")
9971 (version "0.9.6")
9972 (source
9973 (origin
9974 (method url-fetch)
9975 (uri (pypi-uri "fastimport" version))
9976 (sha256
9977 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9978 (build-system python-build-system)
9979 (home-page "https://github.com/jelmer/python-fastimport")
9980 (synopsis "VCS fastimport parser and generator in Python")
9981 (description "This package provides a parser for and generator of the Git
9982 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9983 format.")
9984 (license license:gpl2+)))
9985
9986 (define-public python2-fastimport
9987 (package-with-python2 python-fastimport))
9988
9989 (define-public python-twisted
9990 (package
9991 (name "python-twisted")
9992 (version "19.2.1")
9993 (source (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9996 (sha256
9997 (base32
9998 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9999 (build-system python-build-system)
10000 (arguments
10001 '(#:tests? #f)) ; FIXME: some tests fail
10002 (propagated-inputs
10003 `(("python-zope-interface" ,python-zope-interface)
10004 ("python-pyhamcrest" ,python-pyhamcrest)
10005 ("python-incremental" ,python-incremental)
10006 ("python-hyperlink" ,python-hyperlink)
10007 ("python-constantly" ,python-constantly)
10008 ("python-automat" ,python-automat)))
10009 (home-page "https://twistedmatrix.com/")
10010 (synopsis "Asynchronous networking framework written in Python")
10011 (description
10012 "Twisted is an extensible framework for Python programming, with special
10013 focus on event-based network programming and multiprotocol integration.")
10014 (license license:expat)))
10015
10016 (define-public python2-twisted
10017 (package-with-python2 python-twisted))
10018
10019 (define-public python-pika
10020 (package
10021 (name "python-pika")
10022 (version "0.12.0")
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "pika" version))
10027 (sha256
10028 (base32
10029 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10030 (build-system python-build-system)
10031 (native-inputs
10032 `(("python-pyev" ,python-pyev)
10033 ("python-tornado" ,python-tornado)
10034 ("python-twisted" ,python-twisted)))
10035 (home-page "https://pika.readthedocs.org")
10036 (synopsis "Pure Python AMQP Client Library")
10037 (description
10038 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10039 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10040 network support library.")
10041 (license license:bsd-3)))
10042
10043 (define-public python2-pika
10044 (package-with-python2 python-pika))
10045
10046 (define-public python-ply
10047 (package
10048 (name "python-ply")
10049 (version "3.10")
10050 (source
10051 (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "ply" version))
10054 (sha256
10055 (base32
10056 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10057 (build-system python-build-system)
10058 (home-page "http://www.dabeaz.com/ply/")
10059 (synopsis "Python Lex & Yacc")
10060 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10061 It uses LR parsing and does extensive error checking.")
10062 (license license:bsd-3)))
10063
10064 (define-public python2-ply
10065 (package-with-python2 python-ply))
10066
10067 (define-public python-tabulate
10068 (package
10069 (name "python-tabulate")
10070 (version "0.7.7")
10071 (source (origin
10072 (method url-fetch)
10073 (uri (pypi-uri "tabulate" version))
10074 (sha256
10075 (base32
10076 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10077 (build-system python-build-system)
10078 (arguments
10079 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10080 ;; and the latest release is not tagged in the upstream repository.
10081 '(#:tests? #f))
10082 (home-page "https://bitbucket.org/astanin/python-tabulate")
10083 (synopsis "Pretty-print tabular data")
10084 (description
10085 "Tabulate is a library and command-line utility to pretty-print tabular
10086 data in Python.")
10087 (license license:expat)))
10088
10089 (define-public python2-tabulate
10090 (package-with-python2 python-tabulate))
10091
10092 (define-public python-kazoo
10093 (package
10094 (name "python-kazoo")
10095 (version "2.4.0")
10096 (source
10097 (origin
10098 (method url-fetch)
10099 (uri (pypi-uri "kazoo" version))
10100 (sha256
10101 (base32
10102 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10103 (build-system python-build-system)
10104 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10105 (propagated-inputs
10106 `(("python-six" ,python-six)))
10107 (home-page "https://kazoo.readthedocs.org")
10108 (synopsis "High-level Zookeeper client library")
10109 (description
10110 "Kazoo is a Python client library for the Apache Zookeeper distributed
10111 application service. It is designed to be easy to use and to avoid common
10112 programming errors.")
10113 (license license:asl2.0)))
10114
10115 (define-public python2-kazoo
10116 (package-with-python2 python-kazoo))
10117
10118 (define-public python-pykafka
10119 (package
10120 (name "python-pykafka")
10121 (version "2.4.0")
10122 (source (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "pykafka" version))
10125 (sha256
10126 (base32
10127 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10128 (build-system python-build-system)
10129 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10130 (propagated-inputs
10131 `(("python-gevent" ,python-gevent)
10132 ("python-kazoo" ,python-kazoo)
10133 ("python-tabulate" ,python-tabulate)))
10134 (inputs
10135 `(("librdkafka" ,librdkafka)))
10136 (home-page "https://pykafka.readthedocs.io/")
10137 (synopsis "Apache Kafka client for Python")
10138 (description
10139 "PyKafka is a client for the Apache Kafka distributed messaging system.
10140 It includes Python implementations of Kafka producers and consumers, which
10141 are optionally backed by a C extension built on librdkafka.")
10142 (license license:asl2.0)))
10143
10144 (define-public python2-pykafka
10145 (package-with-python2 python-pykafka))
10146
10147 (define-public python-wcwidth
10148 (package
10149 (name "python-wcwidth")
10150 (version "0.1.7")
10151 (source
10152 (origin
10153 (method url-fetch)
10154 (uri (pypi-uri "wcwidth" version))
10155 (sha256
10156 (base32
10157 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10158 (build-system python-build-system)
10159 (home-page "https://github.com/jquast/wcwidth")
10160 (synopsis "Measure number of terminal column cells of wide-character codes")
10161 (description "Wcwidth measures the number of terminal column cells of
10162 wide-character codes. It is useful for those implementing a terminal emulator,
10163 or programs that carefully produce output to be interpreted by one. It is a
10164 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10165 specified in POSIX.1-2001 and POSIX.1-2008.")
10166 (license license:expat)))
10167
10168 (define-public python2-wcwidth
10169 (package-with-python2 python-wcwidth))
10170
10171 (define-public python2-jsonrpclib
10172 (package
10173 (name "python2-jsonrpclib")
10174 (version "0.1.7")
10175 (source (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "jsonrpclib" version))
10178 (sha256
10179 (base32
10180 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10181 (build-system python-build-system)
10182 (arguments
10183 `(#:tests? #f
10184 #:python ,python-2))
10185 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10186 (synopsis "Implementation of JSON-RPC specification for Python")
10187 (description
10188 "This library is an implementation of the JSON-RPC specification.
10189 It supports both the original 1.0 specification, as well as the
10190 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10191 etc.")
10192 (license license:asl2.0)))
10193
10194 (define-public python-chai
10195 (package
10196 (name "python-chai")
10197 (version "1.1.2")
10198 (source (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "chai" version))
10201 (sha256
10202 (base32
10203 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10204 (build-system python-build-system)
10205 (home-page "https://github.com/agoragames/chai")
10206 (synopsis "Mocking framework for Python")
10207 (description
10208 "Chai provides an api for mocking, stubbing and spying your python
10209 objects, patterned after the Mocha library for Ruby.")
10210 (license license:bsd-3)))
10211
10212 (define-public python2-chai
10213 (package-with-python2 python-chai))
10214
10215 (define-public python-inflection
10216 (package
10217 (name "python-inflection")
10218 (version "0.3.1")
10219 (source
10220 (origin (method url-fetch)
10221 (uri (pypi-uri "inflection" version))
10222 (sha256
10223 (base32
10224 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10225 (build-system python-build-system)
10226 (native-inputs
10227 `(("python-pytest" ,python-pytest)))
10228 (home-page "https://github.com/jpvanhal/inflection")
10229 (synopsis "Python string transformation library")
10230 (description
10231 "Inflection is a string transformation library. It singularizes
10232 and pluralizes English words, and transforms strings from CamelCase to
10233 underscored string.")
10234 (license license:expat)))
10235
10236 (define-public python2-inflection
10237 (package-with-python2 python-inflection))
10238
10239 (define-public python-pylev
10240 (package
10241 (name "python-pylev")
10242 (version "1.3.0")
10243 (source (origin
10244 (method url-fetch)
10245 (uri (pypi-uri "pylev" version))
10246 (sha256
10247 (base32
10248 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10249 (build-system python-build-system)
10250 (home-page "https://github.com/toastdriven/pylev")
10251 (synopsis "Levenshtein distance implementation in Python")
10252 (description "Pure Python Levenshtein implementation, based off the
10253 Wikipedia code samples at
10254 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10255 (license license:bsd-3)))
10256
10257 (define-public python2-pylev
10258 (package-with-python2 python-pylev))
10259
10260 (define-public python-cleo
10261 (package
10262 (name "python-cleo")
10263 (version "0.6.1")
10264 (source (origin
10265 (method url-fetch)
10266 (uri (pypi-uri "cleo" version))
10267 (sha256
10268 (base32
10269 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10270 (build-system python-build-system)
10271 (native-inputs
10272 `(;; For testing
10273 ("python-mock" ,python-mock)
10274 ("python-pytest-mock" ,python-pytest-mock)
10275 ("python-pytest" ,python-pytest)))
10276 (propagated-inputs
10277 `(("python-backpack" ,python-backpack)
10278 ("python-pastel" ,python-pastel)
10279 ("python-pylev" ,python-pylev)))
10280 (home-page "https://github.com/sdispater/cleo")
10281 (synopsis "Command-line arguments library for Python")
10282 (description
10283 "Cleo allows you to create command-line commands with signature in
10284 docstring and colored output.")
10285 (license license:expat)))
10286
10287 (define-public python2-cleo
10288 (package-with-python2 python-cleo))
10289
10290 (define-public python-lazy-object-proxy
10291 (package
10292 (name "python-lazy-object-proxy")
10293 (version "1.3.1")
10294 (source (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "lazy-object-proxy" version))
10297 (sha256
10298 (base32
10299 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10300 (build-system python-build-system)
10301 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10302 (synopsis "Lazy object proxy for python")
10303 (description
10304 "Lazy object proxy is an object that wraps a callable but defers the call
10305 until the object is actually required, and caches the result of said call.")
10306 (license license:bsd-2)))
10307
10308 (define-public python2-lazy-object-proxy
10309 (package-with-python2 python-lazy-object-proxy))
10310
10311 (define-public python-dnspython
10312 (package
10313 (name "python-dnspython")
10314 (version "1.15.0")
10315 (source (origin
10316 (method url-fetch)
10317 (uri (string-append "http://www.dnspython.org/kits/"
10318 version "/dnspython-" version ".tar.gz"))
10319 (sha256
10320 (base32
10321 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10322 (build-system python-build-system)
10323 (arguments '(#:tests? #f)) ; XXX: requires internet access
10324 (home-page "http://www.dnspython.org")
10325 (synopsis "DNS toolkit for Python")
10326 (description
10327 "dnspython is a DNS toolkit for Python. It supports almost all record
10328 types. It can be used for queries, zone transfers, and dynamic updates.
10329 It supports TSIG authenticated messages and EDNS0.")
10330 (license license:expat)))
10331
10332 (define-public python2-dnspython
10333 (package-with-python2 python-dnspython))
10334
10335 (define-public python-email-validator
10336 (package
10337 (name "python-email-validator")
10338 (version "1.0.2")
10339 (source
10340 (origin (method url-fetch)
10341 (uri (pypi-uri "email_validator" version))
10342 (sha256
10343 (base32
10344 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10345 (build-system python-build-system)
10346 (arguments
10347 '(#:phases
10348 (modify-phases %standard-phases
10349 (add-before 'build 'use-dnspython
10350 (lambda _
10351 (substitute* "setup.py"
10352 (("dnspython3") "dnspython"))
10353 #t)))))
10354 (propagated-inputs
10355 `(("python-dnspython" ,python-dnspython)
10356 ("python-idna" ,python-idna)))
10357 (home-page "https://github.com/JoshData/python-email-validator")
10358 (synopsis "Email address validation library for Python")
10359 (description
10360 "This library validates email address syntax and deliverability.")
10361 (license license:cc0)))
10362
10363 (define-public python2-email-validator
10364 (package-with-python2 python-email-validator))
10365
10366 (define-public python-ukpostcodeparser
10367 (package
10368 (name "python-ukpostcodeparser")
10369 (version "1.0.3")
10370 (source (origin
10371 (method url-fetch)
10372 (uri (pypi-uri "UkPostcodeParser" version))
10373 (sha256
10374 (base32
10375 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10376 (build-system python-build-system)
10377 (home-page "https://github.com/hamstah/ukpostcodeparser")
10378 (synopsis "UK Postcode parser for Python")
10379 (description
10380 "This library provides the @code{parse_uk_postcode} function for
10381 parsing UK postcodes.")
10382 (license license:expat)))
10383
10384 (define-public python2-ukpostcodeparser
10385 (package-with-python2 python-ukpostcodeparser))
10386
10387 (define-public python-faker
10388 (package
10389 (name "python-faker")
10390 (version "0.7.9")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "Faker" version))
10394 (sha256
10395 (base32
10396 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10397 (patches
10398 (search-patches "python-faker-fix-build-32bit.patch"))
10399 (modules '((guix build utils)))
10400 (snippet
10401 '(begin
10402 (for-each delete-file (find-files "." "\\.pyc$"))
10403 #t))))
10404 (build-system python-build-system)
10405 (arguments
10406 '(#:phases
10407 (modify-phases %standard-phases
10408 (replace 'check
10409 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10410 (native-inputs
10411 `(;; For testing
10412 ("python-email-validator" ,python-email-validator)
10413 ("python-mock" ,python-mock)
10414 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10415 (propagated-inputs
10416 `(("python-dateutil" ,python-dateutil)
10417 ("python-six" ,python-six)))
10418 (home-page "https://github.com/joke2k/faker")
10419 (synopsis "Python package that generates fake data")
10420 (description
10421 "Faker is a Python package that generates fake data such as names,
10422 addresses, and phone numbers.")
10423 (license license:expat)
10424 (properties `((python2-variant . ,(delay python2-faker))))))
10425
10426 (define-public python2-faker
10427 (let ((base (package-with-python2 (strip-python2-variant
10428 python-faker))))
10429 (package
10430 (inherit base)
10431 (propagated-inputs
10432 `(("python2-ipaddress" ,python2-ipaddress)
10433 ,@(package-propagated-inputs base))))))
10434
10435 (define-public python-pyaml
10436 (package
10437 (name "python-pyaml")
10438 (version "18.11.0")
10439 (source (origin
10440 (method url-fetch)
10441 (uri (pypi-uri "pyaml" version))
10442 (sha256
10443 (base32
10444 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10445 (build-system python-build-system)
10446 (native-inputs
10447 `(("python-unidecode" ,python-unidecode)))
10448 (propagated-inputs
10449 `(("python-pyyaml" ,python-pyyaml)))
10450 (home-page "https://github.com/mk-fg/pretty-yaml")
10451 (synopsis "YAML pretty-print library for Python")
10452 (description
10453 "pyaml is a PyYAML based python module to produce pretty and readable
10454 YAML-serialized data.")
10455 (license license:wtfpl2)))
10456
10457 (define-public python2-pyaml
10458 (package-with-python2 python-pyaml))
10459
10460 (define-public python-backpack
10461 (package
10462 (name "python-backpack")
10463 (version "0.1")
10464 (source
10465 (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "backpack" version))
10468 (sha256
10469 (base32
10470 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10471 (build-system python-build-system)
10472 (native-inputs
10473 `(("python-pytest" ,python-pytest)
10474 ("python-nose" ,python-nose)))
10475 (propagated-inputs
10476 `(("python-simplejson" ,python-simplejson)))
10477 (home-page "https://github.com/sdispater/backpack")
10478 (synopsis "Utilities for working with Python collections")
10479 (description "Backpack provides some useful utilities for working with
10480 collections of data.")
10481 (license license:expat)))
10482
10483 (define-public python2-backpack
10484 (package-with-python2 python-backpack))
10485
10486 (define-public python-prompt-toolkit
10487 (package
10488 (name "python-prompt-toolkit")
10489 (version "2.0.7")
10490 (source
10491 (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10494 (sha256
10495 (base32
10496 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10497 (build-system python-build-system)
10498 (arguments
10499 `(#:phases
10500 (modify-phases %standard-phases
10501 (delete 'check)
10502 (add-after 'install 'post-install-check
10503 (lambda* (#:key inputs outputs #:allow-other-keys)
10504 ;; HOME is needed for the test
10505 ;; "test_pathcompleter_can_expanduser".
10506 (setenv "HOME" "/tmp")
10507 (add-installed-pythonpath inputs outputs)
10508 (invoke "py.test"))))))
10509 (propagated-inputs
10510 `(("python-wcwidth" ,python-wcwidth)
10511 ("python-six" ,python-six)
10512 ("python-pygments" ,python-pygments)))
10513 (native-inputs
10514 `(("python-pytest" ,python-pytest)))
10515 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10516 (synopsis "Library for building command line interfaces in Python")
10517 (description
10518 "Prompt-Toolkit is a library for building interactive command line
10519 interfaces in Python. It's like GNU Readline but it also features syntax
10520 highlighting while typing, out-of-the-box multi-line input editing, advanced
10521 code completion, incremental search, support for Chinese double-width
10522 characters, mouse support, and auto suggestions.")
10523 (license license:bsd-3)))
10524
10525 (define-public python2-prompt-toolkit
10526 (package-with-python2 python-prompt-toolkit))
10527
10528 (define-public python-prompt-toolkit-1
10529 (package (inherit python-prompt-toolkit)
10530 (version "1.0.15")
10531 (source
10532 (origin
10533 (method url-fetch)
10534 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10535 (sha256
10536 (base32
10537 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10538
10539 (define-public python2-prompt-toolkit-1
10540 (package-with-python2 python-prompt-toolkit-1))
10541
10542 (define-public python-jedi
10543 (package
10544 (name "python-jedi")
10545 (version "0.13.3")
10546 (source
10547 (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "jedi" version))
10550 (sha256
10551 (base32
10552 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10553 (build-system python-build-system)
10554 (arguments
10555 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10556 ;; https://github.com/davidhalter/jedi/issues/1263)
10557 #:tests? #f
10558 #:phases
10559 (modify-phases %standard-phases
10560 (replace 'check
10561 (lambda* (#:key tests? #:allow-other-keys)
10562 (when tests?
10563 (invoke "py.test" "-vv")))))))
10564 (native-inputs
10565 `(("python-pytest" ,python-pytest)
10566 ("python-docopt" ,python-docopt)))
10567 (propagated-inputs
10568 `(("python-parso" ,python-parso)))
10569 (home-page "https://github.com/davidhalter/jedi")
10570 (synopsis "Autocompletion and static analysis library for Python")
10571 (description
10572 "Jedi is a static analysis tool for Python that can be used in Integrated
10573 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10574 on a deeper level than many other static analysis frameworks for Python.
10575
10576 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10577 well.")
10578 (license license:expat)))
10579
10580 (define-public python2-jedi
10581 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10582 (package
10583 (inherit base)
10584 (arguments (substitute-keyword-arguments (package-arguments base)
10585 ((#:tests? _) #t))))))
10586
10587 (define-public ptpython
10588 (package
10589 (name "ptpython")
10590 (version "0.34")
10591 (source (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "ptpython" version))
10594 (sha256
10595 (base32
10596 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10597 (build-system python-build-system)
10598 (arguments
10599 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10600 (propagated-inputs
10601 `(("python-docopt" ,python-docopt)
10602 ("python-jedi" ,python-jedi)
10603 ("python-prompt-toolkit" ,python-prompt-toolkit)
10604 ("python-pygments" ,python-pygments)))
10605 (home-page "https://github.com/jonathanslenders/ptpython")
10606 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10607 (description
10608 "ptpython is a Python read-eval-print loop with IDE-like features.
10609 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10610 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10611 etc.")
10612 (license license:bsd-3)
10613 (properties `((python2-variant . ,(delay ptpython-2))))))
10614
10615 (define-public ptpython-2
10616 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10617 (package
10618 (inherit base)
10619 (name "ptpython2"))))
10620
10621 (define-public python-stem
10622 (package
10623 (name "python-stem")
10624 (version "1.7.1")
10625 (source
10626 (origin
10627 (method url-fetch)
10628 (uri (pypi-uri "stem" version))
10629 (sha256
10630 (base32
10631 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10632 (build-system python-build-system)
10633 (arguments
10634 `(#:phases
10635 (modify-phases %standard-phases
10636 (replace 'check
10637 (lambda _
10638 (invoke "./run_tests.py" "--unit")
10639 #t)))))
10640 (native-inputs
10641 `(("python-mock" ,python-mock)
10642 ("python-pycodestyle" ,python-pycodestyle)
10643 ("python-pyflakes" ,python-pyflakes)))
10644 (home-page "https://stem.torproject.org/")
10645 (synopsis
10646 "Python controller library that allows applications to interact with Tor")
10647 (description
10648 "Stem is a Python controller library for Tor. With it you can use Tor's
10649 control protocol to script against the Tor process and read descriptor data
10650 relays publish about themselves.")
10651 (license license:lgpl3)))
10652
10653 (define-public python2-stem
10654 (package-with-python2 python-stem))
10655
10656 (define-public python-pyserial
10657 (package
10658 (name "python-pyserial")
10659 (version "3.1.1")
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (pypi-uri "pyserial" version))
10664 (sha256
10665 (base32
10666 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10667 (build-system python-build-system)
10668 (arguments
10669 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10670 ;; #:phases
10671 ;; (modify-phases %standard-phases
10672 ;; (replace 'check
10673 ;; (lambda _
10674 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10675 (home-page
10676 "https://github.com/pyserial/pyserial")
10677 (synopsis "Python Serial Port Bindings")
10678 (description "@code{pyserial} provide serial port bindings for Python. It
10679 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10680 and/or Xon/Xoff. The port is accessed in RAW mode.")
10681 (license license:bsd-3)))
10682
10683 (define-public python2-pyserial
10684 (package-with-python2 python-pyserial))
10685
10686 (define-public python-kivy
10687 (package
10688 (name "python-kivy")
10689 (version "1.10.1")
10690 (source
10691 (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "Kivy" version))
10694 (file-name (string-append name "-" version ".tar.gz"))
10695 (sha256
10696 (base32
10697 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10698 (build-system python-build-system)
10699 (arguments
10700 `(#:tests? #f ; Tests require many optional packages
10701 #:phases
10702 (modify-phases %standard-phases
10703 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10704 (lambda* (#:key inputs #:allow-other-keys)
10705 (setenv "KIVY_SDL2_PATH"
10706 (string-append (assoc-ref inputs "sdl-union")
10707 "/include/SDL2"))
10708 #t)))))
10709 (native-inputs
10710 `(("git" ,git)
10711 ("pkg-config" ,pkg-config)
10712 ("python-cython" ,python-cython)))
10713 (inputs
10714 `(("gstreamer" ,gstreamer)
10715 ("mesa" ,mesa)
10716 ("sdl-union"
10717 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10718 (home-page "http://kivy.org")
10719 (synopsis
10720 "Multitouch application framework")
10721 (description
10722 "A software library for rapid development of
10723 hardware-accelerated multitouch applications.")
10724 (license license:expat)))
10725
10726 (define-public python2-kivy
10727 (package-with-python2 python-kivy))
10728
10729 (define-public python-kivy-next
10730 (deprecated-package "python-kivy-next" python-kivy))
10731
10732 (define-public python2-kivy-next
10733 (deprecated-package "python2-kivy-next" python2-kivy))
10734
10735 (define-public python-binaryornot
10736 (package
10737 (name "python-binaryornot")
10738 (version "0.4.4")
10739 (source (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "binaryornot" version))
10742 (sha256
10743 (base32
10744 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10745 (build-system python-build-system)
10746 (propagated-inputs
10747 `(("python-chardet" ,python-chardet)
10748 ("python-hypothesis" ,python-hypothesis)))
10749 (home-page "https://github.com/audreyr/binaryornot")
10750 (synopsis "Package to check if a file is binary or text")
10751 (description "Ultra-lightweight pure Python package to check if a file is
10752 binary or text.")
10753 (license license:bsd-3)
10754 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10755
10756 (define-public python2-binaryornot
10757 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10758 (package (inherit base)
10759 (propagated-inputs
10760 `(("python2-enum34" ,python2-enum34)
10761 ,@(package-propagated-inputs base))))))
10762
10763 (define-public python-nltk
10764 (package
10765 (name "python-nltk")
10766 (version "3.2.1")
10767 (source (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "nltk" version))
10770 (sha256
10771 (base32
10772 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10773 (build-system python-build-system)
10774 (arguments
10775 '(;; The tests require some extra resources to be downloaded.
10776 ;; TODO Try packaging these resources.
10777 #:tests? #f))
10778 (home-page "http://nltk.org/")
10779 (synopsis "Natural Language Toolkit")
10780 (description "It provides interfaces to over 50 corpora and lexical
10781 resources such as WordNet, along with a suite of text processing libraries
10782 for classification, tokenization, stemming, tagging, parsing, and semantic
10783 reasoning, wrappers for natural language processing libraries.")
10784 (license license:asl2.0)))
10785
10786 (define-public python2-nltk
10787 (package-with-python2 python-nltk))
10788
10789 (define-public python-pymongo
10790 (package
10791 (name "python-pymongo")
10792 (version "3.7.2")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "pymongo" version))
10796 (sha256
10797 (base32
10798 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10799 (build-system python-build-system)
10800 (propagated-inputs
10801 `(("python-certifi" ,python-certifi)))
10802 (home-page "https://github.com/mongodb/mongo-python-driver")
10803 (synopsis "Python driver for MongoDB")
10804 (description "Python driver for MongoDB.")
10805 (license license:asl2.0)))
10806
10807 (define-public python2-pymongo
10808 (package-with-python2 python-pymongo))
10809
10810 (define-public python-consul
10811 (package
10812 (name "python-consul")
10813 (version "0.6.1")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "python-consul" version))
10818 (sha256
10819 (base32
10820 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10821 (build-system python-build-system)
10822 (arguments
10823 '(#:tests? #f)) ; The tests are not distributed
10824 (propagated-inputs
10825 `(("python-requests" ,python-requests)
10826 ("python-six" ,python-six)))
10827 (home-page "https://github.com/cablehead/python-consul")
10828 (synopsis "Python client for Consul")
10829 (description
10830 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10831 discovery, monitoring and configuration.")
10832 (license license:expat)))
10833
10834 (define-public python2-consul
10835 (package-with-python2 python-consul))
10836
10837 (define-public python-schematics
10838 (package
10839 (name "python-schematics")
10840 (version "1.1.1")
10841 (source
10842 (origin
10843 (method git-fetch)
10844 (uri (git-reference
10845 (url "https://github.com/schematics/schematics.git")
10846 (commit (string-append "v" version))))
10847 (file-name (git-file-name name version))
10848 (sha256
10849 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10850 (build-system python-build-system)
10851 (propagated-inputs
10852 `(("python-six" ,python-six)))
10853 (arguments
10854 ;; The tests require a bunch of not very nice packages with fixed
10855 ;; version requirements (e.g. python-coveralls).
10856 `(#:tests? #f))
10857 (home-page "https://github.com/schematics/schematics")
10858 (synopsis "Python Data Structures for Humans")
10859 (description "Python Data Structures for Humans.")
10860 (license license:bsd-3)))
10861
10862 (define-public python2-schematics
10863 (package-with-python2 python-schematics))
10864
10865 (define-public python-odfpy
10866 (package
10867 (name "python-odfpy")
10868 (version "1.3.3")
10869 (source (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "odfpy" version))
10872 (sha256
10873 (base32
10874 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10875 (arguments
10876 `(#:modules ((srfi srfi-1)
10877 (guix build python-build-system)
10878 (guix build utils))
10879 #:phases
10880 (modify-phases %standard-phases
10881 (replace 'check
10882 ;; The test runner invokes python2 and python3 for test*.py.
10883 ;; To avoid having both in inputs, we replicate it here.
10884 (lambda _
10885 (for-each (lambda (test-file) (invoke "python" test-file))
10886 (find-files "tests" "^test.*\\.py$"))
10887 #t)))))
10888 (build-system python-build-system)
10889 (home-page "https://github.com/eea/odfpy")
10890 (synopsis "Python API and tools to manipulate OpenDocument files")
10891 (description "Collection of libraries and utility programs written in
10892 Python to manipulate OpenDocument 1.2 files.")
10893 (license
10894 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10895 ;; number of files with other licenses.
10896 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10897
10898 (define-public python2-odfpy
10899 (package-with-python2 python-odfpy))
10900
10901 (define-public python-natsort
10902 (package
10903 (name "python-natsort")
10904 (version "5.4.1")
10905 (source (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "natsort" version))
10908 (sha256
10909 (base32
10910 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10911 (build-system python-build-system)
10912 (arguments
10913 `(#:modules ((guix build utils)
10914 (guix build python-build-system)
10915 (srfi srfi-1)
10916 (srfi srfi-26)
10917 (ice-9 ftw))
10918 #:phases
10919 (modify-phases %standard-phases
10920 (add-before 'check 'set-cachedir
10921 ;; Tests require write access to $HOME by default
10922 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10923 (replace 'check
10924 (lambda _
10925 (let ((cwd (getcwd)))
10926 (setenv "PYTHONPATH"
10927 (string-append
10928 cwd "/build/"
10929 (find (cut string-prefix? "lib" <>)
10930 (scandir (string-append cwd "/build")))
10931 ":"
10932 (getenv "PYTHONPATH")))
10933 (invoke "pytest" "-v")))))))
10934 (native-inputs
10935 `(("python-hypothesis" ,python-hypothesis)
10936 ("python-pytest-cov" ,python-pytest-cov)
10937 ("python-pytest-mock" ,python-pytest-mock)
10938 ("python-pytest" ,python-pytest)))
10939 (propagated-inputs ; TODO: Add python-fastnumbers.
10940 `(("python-pyicu" ,python-pyicu)))
10941 (home-page "https://github.com/SethMMorton/natsort")
10942 (synopsis "Natural sorting for python and shell")
10943 (description
10944 "Natsort lets you apply natural sorting on lists instead of
10945 lexicographical. If you use the built-in @code{sorted} method in python
10946 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10947 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10948 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10949 identifies numbers and sorts them separately from strings. It can also sort
10950 version numbers, real numbers, mixed types and more, and comes with a shell
10951 command @command{natsort} that exposes this functionality in the command line.")
10952 (license license:expat)
10953 (properties `((python2-variant . ,(delay python2-natsort))))))
10954
10955 (define-public python2-natsort
10956 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10957 (package (inherit base)
10958 (native-inputs
10959 `(("python2-pathlib" ,python2-pathlib)
10960 ,@(package-native-inputs base))))))
10961
10962 (define-public python-glances
10963 (package
10964 (name "python-glances")
10965 (version "3.0.2")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "Glances" version))
10970 (sha256
10971 (base32
10972 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10973 (build-system python-build-system)
10974 (propagated-inputs
10975 `(("python-psutil" ,python-psutil)))
10976 (home-page
10977 "https://github.com/nicolargo/glances")
10978 (synopsis
10979 "A cross-platform curses-based monitoring tool")
10980 (description
10981 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10982 Glances uses the PsUtil library to get information from your system. It monitors
10983 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10984 (license license:lgpl3+)))
10985
10986 (define-public python2-glances
10987 (package-with-python2 python-glances))
10988
10989 (define-public python-graphql-core
10990 (package
10991 (name "python-graphql-core")
10992 (version "0.5.3")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "graphql-core" version))
10997 (sha256
10998 (base32
10999 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11000 (build-system python-build-system)
11001 (arguments
11002 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11003 #:phases
11004 (modify-phases %standard-phases
11005 (add-after 'unpack 'patch-hardcoded-version
11006 (lambda _ (substitute*
11007 "setup.py"
11008 (("'gevent==1.1rc1'") "'gevent'"))
11009 #t)))))
11010 (native-inputs
11011 `(("python-gevent" ,python-gevent)
11012 ("python-mock" ,python-mock)
11013 ("python-pytest-mock" ,python-pytest-mock)))
11014 (propagated-inputs
11015 `(("python-promise" ,python-promise)
11016 ("python-six" ,python-six)))
11017 (home-page "https://github.com/graphql-python/graphql-core")
11018 (synopsis "GraphQL implementation for Python")
11019 (description
11020 "GraphQL implementation for Python. GraphQL is a data query language and
11021 runtime designed and used to request and deliver data to mobile and web apps.
11022 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11023 to Python.")
11024 (license license:expat)))
11025
11026 (define-public python2-graphql-core
11027 (package-with-python2 python-graphql-core))
11028
11029 (define-public python-graphql-relay
11030 (package
11031 (name "python-graphql-relay")
11032 (version "0.4.5")
11033 (source
11034 (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "graphql-relay" version))
11037 (sha256
11038 (base32
11039 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11040 (build-system python-build-system)
11041 (arguments
11042 '(#:tests? #f)) ; The tests are not distributed
11043 (propagated-inputs
11044 `(("python-graphql-core" ,python-graphql-core)
11045 ("python-promise" ,python-promise)
11046 ("python-six" ,python-six)))
11047 (home-page "https://github.com/graphql-python/graphql-relay-py")
11048 (synopsis "Relay implementation for Python")
11049 (description
11050 "This is a library to allow the easy creation of Relay-compliant servers
11051 using the GraphQL Python reference implementation of a GraphQL server. It
11052 should be noted that the code is a exact port of the original
11053 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11054 from Facebook.")
11055 (license license:expat)))
11056
11057 (define-public python2-graphql-relay
11058 (package-with-python2 python-graphql-relay))
11059
11060 (define-public python-graphene
11061 (package
11062 (name "python-graphene")
11063 (version "0.10.2")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "graphene" version))
11068 (sha256
11069 (base32
11070 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11071 (build-system python-build-system)
11072 (propagated-inputs
11073 `(("python-graphql-core" ,python-graphql-core)
11074 ("python-graphql-relay" ,python-graphql-relay)
11075 ("python-iso8601" ,python-iso8601)
11076 ("python-promise" ,python-promise)
11077 ("python-six" ,python-six)))
11078 (arguments
11079 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11080 (home-page "http://graphene-python.org/")
11081 (synopsis "GraphQL Framework for Python")
11082 (description
11083 "Graphene is a Python library for building GraphQL schemas/types.
11084 A GraphQL schema describes your data model, and provides a GraphQL server
11085 with an associated set of resolve methods that know how to fetch data.")
11086 (properties `((python2-variant . ,(delay python2-graphene))))
11087 (license license:expat)))
11088
11089 (define-public python2-graphene
11090 (let ((base (package-with-python2
11091 (strip-python2-variant python-graphene))))
11092 (package (inherit base)
11093 (native-inputs
11094 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11095 ,@(package-native-inputs base))))))
11096
11097 (define-public python-nautilus
11098 (package
11099 (name "python-nautilus")
11100 (version "0.4.9")
11101 (source
11102 (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "nautilus" version))
11105 (sha256
11106 (base32
11107 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11108 (build-system python-build-system)
11109 (arguments `(#:tests? #f)) ; fails to import test modules
11110 (propagated-inputs
11111 `(("python-bcrypt" ,python-bcrypt)
11112 ("python-click" ,python-click)
11113 ("python-consul" ,python-consul)
11114 ("python-graphene" ,python-graphene)
11115 ("python-jinja2" ,python-jinja2)
11116 ("python-peewee" ,python-peewee)
11117 ("python-pika" ,python-pika)
11118 ("python-tornado" ,python-tornado)
11119 ("python-wtforms" ,python-wtforms)))
11120 (native-inputs
11121 `(("python-nose2" ,python-nose2)))
11122 (home-page "https://github.com/AlecAivazis/nautilus")
11123 (synopsis "Library for creating microservice applications")
11124 (description
11125 "Nautilus is a framework for flux based microservices that looks to
11126 provide extendible implementations of common aspects of a cloud so that you can
11127 focus on building massively scalable web applications.")
11128 (license license:expat)))
11129
11130 (define-public python-snowballstemmer
11131 (package
11132 (name "python-snowballstemmer")
11133 (version "1.2.1")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "snowballstemmer" version))
11137 (sha256
11138 (base32
11139 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11140 (build-system python-build-system)
11141 (arguments
11142 `(;; No tests exist
11143 #:tests? #f))
11144 (home-page "https://github.com/shibukawa/snowball_py")
11145 (synopsis "Snowball stemming library collection for Python")
11146 (description "This package provides 16 word stemmer algorithms generated
11147 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11148 English stemmer.")
11149 (license license:bsd-3)))
11150
11151 (define-public python2-snowballstemmer
11152 (package-with-python2 python-snowballstemmer))
11153
11154 (define-public python-setproctitle
11155 (package
11156 (name "python-setproctitle")
11157 (version "1.1.10")
11158 (source
11159 (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "setproctitle" version))
11162 (sha256
11163 (base32
11164 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11165 (build-system python-build-system)
11166 (arguments
11167 '(#:phases
11168 (modify-phases %standard-phases
11169 (add-before 'check 'patch-Makefile
11170 ;; Stricly this is only required for the python2 variant.
11171 ;; But adding a phase in an inherited package seems to be
11172 ;; cumbersum. So we patch even for python3.
11173 (lambda _
11174 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11175 (when nose
11176 (substitute* "Makefile"
11177 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11178 (string-append nose "/bin/nosetests "))))
11179 #t)))
11180 (replace 'check
11181 (lambda _
11182 (setenv "PYTHON" (or (which "python3") (which "python")))
11183 (setenv "PYCONFIG" (or (which "python3-config")
11184 (which "python-config")))
11185 (setenv "CC" "gcc")
11186 ;; No need to extend PYTHONPATH to find the built package, since
11187 ;; the Makefile will build anyway
11188 (invoke "make" "check"))))))
11189 (native-inputs
11190 `(("procps" ,procps))) ; required for tests
11191 (home-page
11192 "https://github.com/dvarrazzo/py-setproctitle")
11193 (synopsis
11194 "Setproctitle implementation for Python to customize the process title")
11195 (description "The library allows a process to change its title (as displayed
11196 by system tools such as ps and top).
11197
11198 Changing the title is mostly useful in multi-process systems, for
11199 example when a master process is forked: changing the children's title
11200 allows to identify the task each process is busy with. The technique
11201 is used by PostgreSQL and the OpenSSH Server for example.")
11202 (license license:bsd-3)
11203 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11204
11205 (define-public python2-setproctitle
11206 (let ((base (package-with-python2
11207 (strip-python2-variant python-setproctitle))))
11208 (package
11209 (inherit base)
11210 (native-inputs `(("python2-nose" ,python2-nose)
11211 ,@(package-native-inputs base))))))
11212
11213 (define-public python-validictory
11214 (package
11215 (name "python-validictory")
11216 (version "1.0.1")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (pypi-uri "validictory" version))
11221 (sha256
11222 (base32
11223 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11224 (build-system python-build-system)
11225 (arguments
11226 '(#:phases
11227 (modify-phases %standard-phases
11228 (add-after 'unpack 'bootstrap
11229 ;; Move the tests out of the package directory to avoid
11230 ;; packaging them.
11231 (lambda* _
11232 (rename-file "validictory/tests" "tests")
11233 (delete-file "tests/__init__.py")))
11234 (replace 'check
11235 (lambda _
11236 ;; Extend PYTHONPATH so the built package will be found.
11237 (setenv "PYTHONPATH"
11238 (string-append (getcwd) "/build/lib:"
11239 (getenv "PYTHONPATH")))
11240 (invoke "py.test" "-vv" ))))))
11241 (native-inputs
11242 `(("python-pytest" ,python-pytest)))
11243 (home-page
11244 "https://github.com/jamesturk/validictory")
11245 (synopsis "General purpose Python data validator")
11246 (description "It allows validation of arbitrary Python data structures.
11247
11248 The schema format is based on the JSON Schema
11249 proposal (http://json-schema.org), so combined with json the library is also
11250 useful as a validator for JSON data.")
11251 (license license:expat)))
11252
11253 (define-public python2-validictory
11254 (package-with-python2 python-validictory))
11255
11256 (define-public python-pyelftools
11257 (package
11258 (name "python-pyelftools")
11259 (version "0.25")
11260 (source
11261 (origin
11262 (method url-fetch)
11263 (uri (pypi-uri "pyelftools" version))
11264 (sha256
11265 (base32
11266 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11267 (build-system python-build-system)
11268 (arguments
11269 `(#:phases
11270 (modify-phases %standard-phases
11271 (add-before 'check 'set-pythonpath
11272 (lambda _
11273 (setenv "PYTHONPATH"
11274 (string-append
11275 (getcwd) "/test/"
11276 ":" (getenv "PYTHONPATH")))
11277 #t)))))
11278 (home-page
11279 "https://github.com/eliben/pyelftools")
11280 (synopsis
11281 "Analyze binary and library file information")
11282 (description "This Python library provides interfaces for parsing and
11283 analyzing two binary and library file formats; the Executable and Linking
11284 Format (ELF), and debugging information in the Debugging With Attributed
11285 Record Format (DWARF).")
11286 (license license:public-domain)))
11287
11288 (define-public python-pyev
11289 (package
11290 (name "python-pyev")
11291 (version "0.9.0")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (pypi-uri "pyev" version))
11296 (sha256
11297 (base32
11298 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11299 (build-system python-build-system)
11300 (arguments
11301 `(#:tests? #f ; no test suite
11302 #:phases
11303 (modify-phases %standard-phases
11304 (add-after 'unpack 'patch
11305 (lambda* (#:key inputs #:allow-other-keys)
11306 (let ((libev (string-append (assoc-ref inputs "libev")
11307 "/lib/libev.so.4")))
11308 (substitute* "setup.py"
11309 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11310 (string-append "libev_dll_name = \"" libev "\"")))))))))
11311 (inputs
11312 `(("libev" ,libev)))
11313 (home-page "http://pythonhosted.org/pyev/")
11314 (synopsis "Python libev interface")
11315 (description "Pyev provides a Python interface to libev.")
11316 (license license:gpl3)))
11317
11318 (define-public python2-pyev
11319 (package-with-python2 python-pyev))
11320
11321 (define-public python-imagesize
11322 (package
11323 (name "python-imagesize")
11324 (version "1.1.0")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "imagesize" version))
11329 (sha256
11330 (base32
11331 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11332 (build-system python-build-system)
11333 (home-page "https://github.com/shibukawa/imagesize_py")
11334 (synopsis "Gets image size of files in various formats in Python")
11335 (description
11336 "This package allows determination of image size from
11337 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11338 (license license:expat)))
11339
11340 (define-public python2-imagesize
11341 (package-with-python2 python-imagesize))
11342
11343 (define-public python-termstyle
11344 (package
11345 (name "python-termstyle")
11346 (version "0.1.11")
11347 (source
11348 (origin
11349 (method url-fetch)
11350 (uri (pypi-uri "termstyle" version))
11351 (sha256
11352 (base32
11353 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11354 (build-system python-build-system)
11355 (arguments
11356 '(#:phases
11357 (modify-phases %standard-phases
11358 (replace 'check
11359 (lambda _
11360 (invoke "python" "test3.py"))))))
11361 (home-page "https://github.com/gfxmonk/termstyle")
11362 (synopsis "Console text coloring for Python")
11363 (description "This package provides console text coloring for Python.")
11364 (license license:bsd-3)))
11365
11366 (define-public python-argcomplete
11367 (package
11368 (name "python-argcomplete")
11369 (version "1.7.0")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "argcomplete" version))
11374 (sha256
11375 (base32
11376 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11377 (build-system python-build-system)
11378 (native-inputs
11379 `(("python-pexpect" ,python-pexpect)
11380 ("tcsh" ,tcsh)
11381 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11382 (home-page "https://github.com/kislyuk/argcomplete")
11383 (synopsis "Shell tab completion for Python argparse")
11384 (description "argcomplete provides extensible command line tab completion
11385 of arguments and options for Python scripts using @code{argparse}. It's
11386 particularly useful for programs with many options or sub-parsers that can
11387 dynamically suggest completions; for example, when browsing resources over the
11388 network.")
11389 (license license:asl2.0)))
11390
11391 (define-public python2-argcomplete
11392 (package-with-python2 python-argcomplete))
11393
11394 (define-public python-xopen
11395 (package
11396 (name "python-xopen")
11397 (version "0.5.0")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "xopen" version))
11402 (sha256
11403 (base32
11404 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11405 (build-system python-build-system)
11406 (propagated-inputs
11407 `(("python-setuptools-scm" ,python-setuptools-scm)))
11408 (home-page "https://github.com/marcelm/xopen/")
11409 (synopsis "Open compressed files transparently")
11410 (description "This module provides an @code{xopen} function that works like
11411 Python's built-in @code{open} function, but can also deal with compressed files.
11412 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11413 recognized by their file extensions. The focus is on being as efficient as
11414 possible on all supported Python versions.")
11415 (license license:expat)))
11416
11417 (define-public python2-xopen
11418 (let ((base (package-with-python2
11419 (strip-python2-variant python-xopen))))
11420 (package
11421 (inherit base)
11422 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11423 ,@(package-propagated-inputs base))))))
11424
11425 (define-public python-cheetah
11426 (package
11427 (name "python-cheetah")
11428 (version "3.1.0")
11429 (source
11430 (origin
11431 (method url-fetch)
11432 (uri (pypi-uri "Cheetah3" version))
11433 (sha256
11434 (base32
11435 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11436 (build-system python-build-system)
11437 (arguments
11438 `(#:modules ((guix build utils)
11439 (guix build python-build-system)
11440 (ice-9 ftw)
11441 (srfi srfi-1)
11442 (srfi srfi-26))
11443 #:phases (modify-phases %standard-phases
11444 (add-after 'unpack 'use-absolute-python
11445 (lambda _
11446 (substitute* "Cheetah/CheetahWrapper.py"
11447 (("#!/usr/bin/env python")
11448 (string-append "#!" (which "python"))))
11449 #t))
11450 (replace 'check
11451 (lambda _
11452 (let ((cwd (getcwd)))
11453 (setenv "PYTHONPATH"
11454 (string-append
11455 cwd "/build/"
11456 (find (cut string-prefix? "lib" <>)
11457 (scandir (string-append cwd "/build")))
11458 ":" (getenv "PYTHONPATH")))
11459 (setenv "PATH"
11460 (string-append (getenv "PATH")
11461 ":" cwd "/bin"))
11462 (setenv "TMPDIR" "/tmp")
11463
11464 (substitute* "Cheetah/Tests/Test.py"
11465 (("unittest.TextTestRunner\\(\\)")
11466 "unittest.TextTestRunner(verbosity=2)"))
11467
11468 (invoke "python" "Cheetah/Tests/Test.py")))))))
11469 (propagated-inputs
11470 `(("python-markdown" ,python-markdown))) ;optional
11471 (home-page "http://cheetahtemplate.org/")
11472 (synopsis "Template engine")
11473 (description "Cheetah is a text-based template engine and Python code
11474 generator.
11475
11476 Cheetah can be used as a standalone templating utility or referenced as
11477 a library from other Python applications. It has many potential uses,
11478 but web developers looking for a viable alternative to ASP, JSP, PHP and
11479 PSP are expected to be its principle user group.
11480
11481 Features:
11482 @enumerate
11483 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11484 text-based format.
11485 @item Cleanly separates content, graphic design, and program code.
11486 @item Blends the power and flexibility of Python with a simple template language
11487 that non-programmers can understand.
11488 @item Gives template writers full access to any Python data structure, module,
11489 function, object, or method in their templates.
11490 @item Makes code reuse easy by providing an object-orientated interface to
11491 templates that is accessible from Python code or other Cheetah templates.
11492 One template can subclass another and selectively reimplement sections of it.
11493 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11494 improve the performance of a dynamic website.
11495 @item Compiles templates into optimized, yet readable, Python code.
11496 @end enumerate")
11497 (license (license:x11-style "file://LICENSE"))))
11498
11499 (define-public python2-cheetah
11500 (package-with-python2 python-cheetah))
11501
11502 (define-public python-dulwich
11503 (package
11504 (name "python-dulwich")
11505 (version "0.18.6")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (list (string-append "https://www.dulwich.io/releases/"
11510 "dulwich-" version ".tar.gz")
11511 (pypi-uri "dulwich" version)))
11512 (sha256
11513 (base32
11514 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11515 (build-system python-build-system)
11516 (arguments
11517 `(#:phases
11518 (modify-phases %standard-phases
11519 (add-before 'check 'fix-tests
11520 (lambda* (#:key inputs #:allow-other-keys)
11521 ;; The tests use Popen with a custom environment which doesn't
11522 ;; include PATH.
11523 (substitute* "dulwich/tests/compat/utils.py"
11524 (("'git'") (string-append "'"
11525 (which "git")
11526 "'")))
11527 (substitute* '("dulwich/tests/test_repository.py"
11528 "dulwich/tests/test_hooks.py")
11529 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11530 (setenv "TEST_RUNNER" "unittest")
11531 (setenv "PYTHONHASHSEED" "random")
11532 #t)))))
11533 (propagated-inputs
11534 `(("python-fastimport" ,python-fastimport)))
11535 (native-inputs
11536 `(("python-mock" ,python-mock)
11537 ("python-geventhttpclient" ,python-geventhttpclient)
11538 ("git" ,git)))
11539 (home-page "https://www.dulwich.io/")
11540 (synopsis "Git implementation in Python")
11541 (description "Dulwich is an implementation of the Git file formats and
11542 protocols written in pure Python.")
11543 ;; Can be used with either license.
11544 (license (list license:asl2.0 license:gpl2+))))
11545
11546 (define-public python2-dulwich
11547 (package-with-python2 python-dulwich))
11548
11549 (define-public python-pbkdf2
11550 (package
11551 (name "python-pbkdf2")
11552 (version "1.3")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "pbkdf2" version))
11557 (sha256
11558 (base32
11559 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11560 (build-system python-build-system)
11561 (arguments
11562 '(#:phases
11563 (modify-phases %standard-phases
11564 (replace 'check
11565 (lambda _
11566 (setenv "PYTHONPATH"
11567 (string-append (getcwd) "/build/lib:"
11568 (getenv "PYTHONPATH")))
11569 (invoke "python" "test/test_pbkdf2.py"))))))
11570 (propagated-inputs
11571 `(("python-pycrypto" ,python-pycrypto))) ; optional
11572 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11573 (synopsis "Password-based key derivation")
11574 (description "This module implements the password-based key derivation
11575 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11576
11577 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11578 is part of the RSA Public Key Cryptography Standards series. The provided
11579 implementation takes a password or a passphrase and a salt value (and
11580 optionally a iteration count, a digest module, and a MAC module) and provides
11581 a file-like object from which an arbitrarly-sized key can be read.")
11582 (license license:expat)))
11583
11584 (define-public python2-pbkdf2
11585 (package-with-python2 python-pbkdf2))
11586
11587 (define-public python-qrcode
11588 (package
11589 (name "python-qrcode")
11590 (version "6.1")
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "qrcode" version))
11595 (sha256
11596 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11597 (build-system python-build-system)
11598 (arguments
11599 ;; FIXME: Tests require packaging 'pymaging'.
11600 '(#:tests? #f))
11601 (propagated-inputs
11602 `(("python-lxml" ,python-lxml) ; for SVG output
11603 ("python-pillow" ,python-pillow) ; for PNG output
11604 ("python-six" ,python-six)))
11605 (home-page "https://github.com/lincolnloop/python-qrcode")
11606 (synopsis "QR Code image generator")
11607 (description "This package provides a pure Python QR Code generator
11608 module. It uses the Python Imaging Library (PIL) to allow for the generation
11609 of QR Codes.
11610
11611 In addition this package provides a command line tool to generate QR codes and
11612 either write these QR codes to a file or do the output as ascii art at the
11613 console.")
11614 (license license:bsd-3)))
11615
11616 (define-public python2-qrcode
11617 (package-with-python2 python-qrcode))
11618
11619 (define-public python-rst2ansi
11620 (package
11621 (name "python-rst2ansi")
11622 (version "0.1.5")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "rst2ansi" version))
11627 (sha256
11628 (base32
11629 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11630 (build-system python-build-system)
11631 (propagated-inputs
11632 `(("python-docutils" ,python-docutils)))
11633 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11634 (synopsis "Convert RST to ANSI-decorated console output")
11635 (description
11636 "Python module dedicated to rendering RST (reStructuredText) documents
11637 to ansi-escaped strings suitable for display in a terminal.")
11638 (license license:expat)))
11639
11640 (define-public python-ansi2html
11641 (package
11642 (name "python-ansi2html")
11643 (version "1.2.0")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (pypi-uri "ansi2html" version))
11648 (sha256
11649 (base32
11650 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11651 (build-system python-build-system)
11652 (native-inputs
11653 `(("python-mock" ,python-mock)
11654 ("python-nose" ,python-nose)))
11655 (propagated-inputs
11656 `(("python-six" ,python-six)))
11657 (home-page "https://github.com/ralphbean/ansi2html")
11658 (synopsis "Convert ANSI-decorated console output to HTML")
11659 (description
11660 "@command{ansi2html} is a Python library and command line utility for
11661 convering text with ANSI color codes to HTML or LaTeX.")
11662 (license license:gpl3+)))
11663
11664 (define-public python2-ansi2html
11665 (package-with-python2 python-ansi2html))
11666
11667 (define-public python-ddt
11668 (package
11669 (name "python-ddt")
11670 (version "1.1.3")
11671 (source
11672 (origin
11673 (method url-fetch)
11674 (uri (pypi-uri "ddt" version))
11675 (sha256
11676 (base32
11677 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11678 (build-system python-build-system)
11679 (native-inputs
11680 `(("python-mock" ,python-mock)
11681 ("python-nose" ,python-nose)))
11682 (propagated-inputs
11683 `(("python-six" ,python-six)
11684 ("python-pyyaml" ,python-pyyaml)))
11685 (home-page "https://github.com/txels/ddt")
11686 (synopsis "Data-Driven Tests")
11687 (description
11688 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11689 running it with different test data, and make it appear as multiple test
11690 cases.")
11691 (license license:expat)))
11692
11693 (define-public python2-ddt
11694 (package-with-python2 python-ddt))
11695
11696 (define-public python-pycountry
11697 (package
11698 (name "python-pycountry")
11699 (version "18.5.26")
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "pycountry" version))
11704 (sha256
11705 (base32
11706 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11707 (build-system python-build-system)
11708 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11709 (synopsis "ISO databases for languages, countries, currencies, etc.")
11710 (description
11711 "@code{pycountry} provides the ISO databases for the standards:
11712 @enumerate
11713 @item 639-3 (Languages)
11714 @item 3166 (Countries)
11715 @item 3166-3 (Deleted Countries)
11716 @item 3166-2 (Subdivisions of countries)
11717 @item 4217 (Currencies)
11718 @item 15924 (Scripts)
11719 @end enumerate
11720 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11721 through a Python API.")
11722 (license license:lgpl2.1+)))
11723
11724 (define-public python2-pycountry
11725 (package-with-python2 python-pycountry))
11726
11727 (define-public python-pycosat
11728 (package
11729 (name "python-pycosat")
11730 (version "0.6.1")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "pycosat" version))
11735 (sha256
11736 (base32
11737 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11738 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11739 (build-system python-build-system)
11740 (home-page "https://github.com/ContinuumIO/pycosat")
11741 (synopsis "Bindings to picosat (a SAT solver)")
11742 (description
11743 "This package provides efficient Python bindings to @code{picosat} on
11744 the C level. When importing pycosat, the @code{picosat} solver becomes part
11745 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11746 Problem} (SAT) solver.")
11747 (license license:expat)))
11748
11749 (define-public python2-pycosat
11750 (package-with-python2 python-pycosat))
11751
11752 (define-public python2-ruamel.ordereddict
11753 (package
11754 (name "python2-ruamel.ordereddict")
11755 (version "0.4.9")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "ruamel.ordereddict" version))
11760 (sha256
11761 (base32
11762 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11763 (build-system python-build-system)
11764 (arguments
11765 `(#:python ,python-2
11766 #:phases
11767 (modify-phases %standard-phases
11768 (delete 'check)
11769 (add-after 'install 'check
11770 (lambda* (#:key inputs outputs #:allow-other-keys)
11771 (add-installed-pythonpath inputs outputs)
11772 (invoke "python" "test/testordereddict.py"))))))
11773 (home-page "https://bitbucket.org/ruamel/ordereddict")
11774 (synopsis "Version of dict that keeps keys in insertion order")
11775 (description
11776 "This is an implementation of an ordered dictionary with @dfn{Key
11777 Insertion Order} (KIO: updates of values do not affect the position of the
11778 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11779 removed and put at the back). The standard library module @code{OrderedDict},
11780 implemented later, implements a subset of @code{ordereddict} functionality.
11781 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11782 Order} (KSO, no sorting function can be specified, but a transform can be
11783 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11784 (license license:expat)))
11785
11786 (define-public python-pypeg2
11787 (package
11788 (name "python-pypeg2")
11789 (version "2.15.2")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "pyPEG2" version))
11794 (sha256
11795 (base32
11796 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11797 (build-system python-build-system)
11798 (propagated-inputs `(("python-lxml" ,python-lxml)))
11799 (arguments
11800 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11801 '(#:tests? #f))
11802 (home-page "https://fdik.org/pyPEG/")
11803 (synopsis "Parsering Expression Grammars in Python")
11804 (description "PyPEG is an intrinsic parser interpreter framework for
11805 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11806 parse many formal languages.")
11807 (license license:gpl2)))
11808
11809 (define-public python-incremental
11810 (package
11811 (name "python-incremental")
11812 (version "17.5.0")
11813 (source
11814 (origin
11815 (method url-fetch)
11816 (uri (pypi-uri "incremental" version))
11817 (sha256
11818 (base32
11819 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11820 (build-system python-build-system)
11821 (home-page "https://github.com/hawkowl/incremental")
11822 (synopsis "Library for versioning Python projects")
11823 (description "Incremental is a small library that versions your Python
11824 projects.")
11825 (license license:expat)))
11826
11827 (define-public python2-incremental
11828 (package-with-python2 python-incremental))
11829
11830 (define-public python-invoke
11831 (package
11832 (name "python-invoke")
11833 (home-page "http://www.pyinvoke.org/")
11834 (version "1.1.0")
11835 (source (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "invoke" version))
11838 (sha256
11839 (base32
11840 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11841 (build-system python-build-system)
11842 (arguments
11843 ;; XXX: Requires many dependencies that are not yet in Guix.
11844 `(#:tests? #f))
11845 (synopsis "Pythonic task execution")
11846 (description
11847 "Invoke is a Python task execution tool and library, drawing inspiration
11848 from various sources to arrive at a powerful and clean feature set. It is
11849 evolved from the Fabric project, but focuses on local and abstract concerns
11850 instead of servers and network commands.")
11851 (license license:bsd-3)))
11852
11853 (define-public python2-invoke
11854 (package-with-python2 python-invoke))
11855
11856 (define-public python-automat
11857 (package
11858 (name "python-automat")
11859 (version "0.7.0")
11860 (source (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "Automat" version))
11863 (sha256
11864 (base32
11865 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11866 (build-system python-build-system)
11867 ;; We disable the tests because they require python-twisted, while
11868 ;; python-twisted depends on python-automat. Twisted is optional, but the
11869 ;; tests fail if it is not available. Also see
11870 ;; <https://github.com/glyph/automat/issues/71>.
11871 (arguments '(#:tests? #f))
11872 (native-inputs
11873 `(("python-m2r" ,python-m2r)
11874 ("python-setuptools-scm" ,python-setuptools-scm)
11875 ("python-graphviz" ,python-graphviz)))
11876 (propagated-inputs
11877 `(("python-six" ,python-six)
11878 ("python-attrs" ,python-attrs)))
11879 (home-page "https://github.com/glyph/Automat")
11880 (synopsis "Self-service finite-state machines")
11881 (description "Automat is a library for concise, idiomatic Python
11882 expression of finite-state automata (particularly deterministic finite-state
11883 transducers).")
11884 (license license:expat)))
11885
11886 (define-public python2-automat
11887 (package-with-python2 python-automat))
11888
11889 (define-public python-m2r
11890 (package
11891 (name "python-m2r")
11892 (version "0.2.1")
11893 (source (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "m2r" version))
11896 (sha256
11897 (base32
11898 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11899 (build-system python-build-system)
11900 (propagated-inputs
11901 `(("python-docutils" ,python-docutils)
11902 ("python-mistune" ,python-mistune)))
11903 (native-inputs
11904 `(("python-pygments" ,python-pygments)
11905 ("python-mock" ,python-mock)))
11906 (home-page "https://github.com/miyakogi/m2r")
11907 (synopsis "Markdown to reStructuredText converter")
11908 (description "M2R converts a markdown file including reST markups to valid
11909 reST format.")
11910 (license license:expat)))
11911
11912 (define-public python2-m2r
11913 (package-with-python2 python-m2r))
11914
11915 (define-public python-constantly
11916 (package
11917 (name "python-constantly")
11918 (version "15.1.0")
11919 (source (origin
11920 (method url-fetch)
11921 (uri (pypi-uri "constantly" version))
11922 (sha256
11923 (base32
11924 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11925 (build-system python-build-system)
11926 (home-page "https://github.com/twisted/constantly")
11927 (synopsis "Symbolic constants in Python")
11928 (description "Constantly is a Python library that provides symbolic
11929 constant support. It includes collections and constants with text, numeric,
11930 and bit flag values.")
11931 (license license:expat)))
11932
11933 (define-public python2-constantly
11934 (package-with-python2 python-constantly))
11935
11936 (define-public python-attrs
11937 (package
11938 (name "python-attrs")
11939 (version "19.1.0")
11940 (source (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "attrs" version))
11943 (sha256
11944 (base32
11945 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11946 (build-system python-build-system)
11947 (arguments
11948 `(#:modules ((guix build utils)
11949 (guix build python-build-system)
11950 (ice-9 ftw)
11951 (srfi srfi-1)
11952 (srfi srfi-26))
11953 #:phases (modify-phases %standard-phases
11954 (replace 'check
11955 (lambda _
11956 (let ((cwd (getcwd)))
11957 (setenv "PYTHONPATH"
11958 (string-append
11959 cwd "/build/"
11960 (find (cut string-prefix? "lib" <>)
11961 (scandir (string-append cwd "/build")))
11962 ":"
11963 (getenv "PYTHONPATH")))
11964 (invoke "python" "-m" "pytest")))))))
11965 (native-inputs
11966 `(("python-coverage" ,python-coverage)
11967 ("python-hypothesis" ,python-hypothesis)
11968 ("python-pympler" ,python-pympler)
11969 ("python-pytest" ,python-pytest)
11970 ("python-six" ,python-six)
11971 ("python-sphinx" ,python-sphinx)
11972 ("python-zope-interface" ,python-zope-interface)))
11973 (home-page "https://github.com/python-attrs/attrs/")
11974 (synopsis "Attributes without boilerplate")
11975 (description "@code{attrs} is a Python package with class decorators that
11976 ease the chores of implementing the most common attribute-related object
11977 protocols.")
11978 (license license:expat)))
11979
11980 (define-public python2-attrs
11981 (package-with-python2 python-attrs))
11982
11983 (define-public python-attrs-bootstrap
11984 (package
11985 (inherit python-attrs)
11986 (name "python-attrs-bootstrap")
11987 (native-inputs `())
11988 (arguments `(#:tests? #f))))
11989
11990 (define-public python2-attrs-bootstrap
11991 (package-with-python2 python-attrs-bootstrap))
11992
11993 (define-public python2-cliapp
11994 (package
11995 (name "python2-cliapp")
11996 (version "1.20180812.1")
11997 (source
11998 (origin
11999 (method url-fetch)
12000 (uri (string-append
12001 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12002 version ".tar.gz"))
12003 (sha256
12004 (base32
12005 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12006 (build-system python-build-system)
12007 (arguments
12008 `(#:python ,python-2
12009 #:phases
12010 (modify-phases %standard-phases
12011 ;; check phase needs to be run before the build phase. If not,
12012 ;; coverage-test-runner looks for tests for the built source files,
12013 ;; and fails.
12014 (delete 'check)
12015 (add-before 'build 'check
12016 (lambda _
12017 ;; Disable python3 tests
12018 (substitute* "check"
12019 (("python3") "# python3"))
12020 (invoke "./check"))))))
12021 (native-inputs
12022 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12023 ("python2-pep8" ,python2-pep8)))
12024 (propagated-inputs
12025 `(("python2-pyaml" ,python2-pyaml)))
12026 (home-page "https://liw.fi/cliapp/")
12027 (synopsis "Python framework for command line programs")
12028 (description "@code{python2-cliapp} is a python framework for
12029 command line programs. It contains the typical stuff such programs
12030 need to do, such as parsing the command line for options, and
12031 iterating over input files.")
12032 (license license:gpl2+)))
12033
12034 (define-public python2-ttystatus
12035 (package
12036 (name "python2-ttystatus")
12037 (version "0.36")
12038 (source
12039 (origin
12040 (method url-fetch)
12041 (uri (string-append
12042 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12043 version ".tar.gz"))
12044 (sha256
12045 (base32
12046 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12047 (build-system python-build-system)
12048 (native-inputs
12049 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12050 ("python2-pep8" ,python2-pep8)))
12051 (arguments
12052 `(#:python ,python-2
12053 #:phases
12054 (modify-phases %standard-phases
12055 ;; check phase needs to be run before the build phase. If not,
12056 ;; coverage-test-runner looks for tests for the built source files,
12057 ;; and fails.
12058 (delete 'check)
12059 (add-before 'build 'check
12060 (lambda _ (invoke "make" "check"))))))
12061 (home-page "https://liw.fi/ttystatus/")
12062 (synopsis "Python library for showing progress reporting and
12063 status updates on terminals")
12064 (description "@code{python2-ttystatus} is a python library for
12065 showing progress reporting and status updates on terminals, for
12066 command line programs. Output is automatically adapted to the width
12067 of the terminal: truncated if it does not fit, and resized if the
12068 terminal size changes.")
12069 (license license:gpl3+)))
12070
12071 (define-public python2-tracing
12072 (package
12073 (name "python2-tracing")
12074 (version "0.10")
12075 (source
12076 (origin
12077 (method url-fetch)
12078 (uri (string-append
12079 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12080 version ".tar.gz"))
12081 (sha256
12082 (base32
12083 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12084 (build-system python-build-system)
12085 (arguments
12086 `(#:python ,python-2))
12087 (home-page "https://liw.fi/tracing/")
12088 (synopsis "Python debug logging helper")
12089 (description "@code{python2-tracing} is a python library for
12090 logging debug messages. It provides a way to turn debugging messages
12091 on and off, based on the filename they occur in. It is much faster
12092 than using @code{logging.Filter} to accomplish the same thing, which
12093 matters when code is run in production mode. The actual logging still
12094 happens using the @code{logging} library.")
12095 (license license:gpl3+)))
12096
12097 (define-public python2-larch
12098 (package
12099 (name "python2-larch")
12100 (version "1.20151025")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (string-append
12105 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12106 version ".tar.gz"))
12107 (patches (search-patches
12108 "python2-larch-coverage-4.0a6-compatibility.patch"))
12109 (sha256
12110 (base32
12111 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12112 (build-system python-build-system)
12113 (arguments
12114 `(#:python ,python-2
12115 #:phases
12116 (modify-phases %standard-phases
12117 ;; check phase needs to be run before the build phase. If not,
12118 ;; coverage-test-runner looks for tests for the built source files,
12119 ;; and fails.
12120 (delete 'check)
12121 (add-before 'build 'check
12122 (lambda _ (invoke "make" "check"))))))
12123 (native-inputs
12124 `(("cmdtest" ,cmdtest)
12125 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12126 (propagated-inputs
12127 `(("python2-tracing" ,python2-tracing)))
12128 (home-page "https://liw.fi/larch/")
12129 (synopsis "Python copy-on-write B-tree library")
12130 (description "@code{python2-larch} is an implementation of
12131 particular kind of B-tree, based on research by Ohad Rodeh. See
12132 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12133 on the data structure.
12134
12135 The distinctive feature of this B-tree is that a node is never
12136 (conceptually) modified. Instead, all updates are done by
12137 copy-on-write. This makes it easy to clone a tree, and modify only the
12138 clone, while other processes access the original tree.")
12139 (license license:gpl3+)))
12140
12141 (define-public python-astroid
12142 (package
12143 (name "python-astroid")
12144 (version "2.1.0")
12145 (source
12146 (origin
12147 (method url-fetch)
12148 (uri (pypi-uri "astroid" version))
12149 (sha256
12150 (base32
12151 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12152 (build-system python-build-system)
12153 (propagated-inputs
12154 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12155 ("python-six" ,python-six)
12156 ("python-wrapt" ,python-wrapt)))
12157 (native-inputs
12158 `(("python-dateutil" ,python-dateutil)
12159 ("python-nose" ,python-nose)
12160 ("python-pytest" ,python-pytest)
12161 ("python-pytest-runner" ,python-pytest-runner)))
12162 (arguments
12163 `(#:phases
12164 (modify-phases %standard-phases
12165 (add-after 'unpack 'remove-spurious-test
12166 (lambda _
12167 ;; This can be removed after upgrading from python-3.7
12168 ;; https://github.com/PyCQA/astroid/issues/593
12169 ;; https://bugs.python.org/issue34056
12170 (delete-file "astroid/tests/unittest_modutils.py")
12171 #t))
12172 (replace 'check
12173 (lambda _
12174 (invoke "pytest" "astroid"))))))
12175 (home-page "https://github.com/PyCQA/astroid")
12176 (synopsis "Common base representation of python source code for pylint and
12177 other projects")
12178 (description "@code{python-astroid} provides a common base representation
12179 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12180
12181 It provides a compatible representation which comes from the _ast module. It
12182 rebuilds the tree generated by the builtin _ast module by recursively walking
12183 down the AST and building an extended ast. The new node classes have
12184 additional methods and attributes for different usages. They include some
12185 support for static inference and local name scopes. Furthermore, astroid
12186 builds partial trees by inspecting living objects.")
12187 (license license:lgpl2.1+)
12188 (properties `((python2-variant . ,(delay python2-astroid))))))
12189
12190 (define-public python2-astroid
12191 (let ((base (package-with-python2
12192 (strip-python2-variant python-astroid))))
12193 (package (inherit base)
12194 ;; Version 2.x removes python2 support.
12195 (version "1.6.5")
12196 (source
12197 (origin
12198 (method url-fetch)
12199 (uri (pypi-uri "astroid" version))
12200 (sha256
12201 (base32
12202 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12203 (arguments
12204 (substitute-keyword-arguments (package-arguments base)
12205 ((#:phases phases)
12206 `(modify-phases ,phases
12207 (add-after 'unpack 'remove-spurious-test
12208 (lambda _
12209 ;; https://github.com/PyCQA/astroid/issues/276
12210 (delete-file "astroid/tests/unittest_brain.py")
12211 #t))
12212 (replace 'check
12213 (lambda _
12214 (invoke"python" "-m" "unittest" "discover"
12215 "-p" "unittest*.py")))))))
12216 (native-inputs `())
12217 (propagated-inputs
12218 `(("python2-backports-functools-lru-cache"
12219 ,python2-backports-functools-lru-cache)
12220 ("python2-enum34" ,python2-enum34)
12221 ("python2-singledispatch" ,python2-singledispatch)
12222 ,@(package-propagated-inputs base))))))
12223
12224 (define-public python-isort
12225 (package
12226 (name "python-isort")
12227 (version "4.3.4")
12228 (source
12229 (origin
12230 (method git-fetch)
12231 (uri (git-reference
12232 ;; Tests pass only from the Github sources
12233 (url "https://github.com/timothycrosley/isort")
12234 (commit version)))
12235 (file-name (git-file-name name version))
12236 (sha256
12237 (base32
12238 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12239 (build-system python-build-system)
12240 (native-inputs
12241 `(("python-mock" ,python-mock)
12242 ("python-pytest" ,python-pytest)))
12243 (home-page "https://github.com/timothycrosley/isort")
12244 (synopsis "Python utility/library to sort python imports")
12245 (description "@code{python-isort} is a python utility/library to sort
12246 imports alphabetically, and automatically separated into sections. It
12247 provides a command line utility, a python library and plugins for various
12248 editors.")
12249 (license license:expat)
12250 (properties `((python2-variant . ,(delay python2-isort))))))
12251
12252 (define-public python2-isort
12253 (let ((base (package-with-python2
12254 (strip-python2-variant python-isort))))
12255 (package (inherit base)
12256 (native-inputs
12257 `(("python2-futures" ,python2-futures)
12258 ,@(package-native-inputs base))))))
12259
12260 (define-public python2-backports-functools-lru-cache
12261 (package
12262 (name "python2-backports-functools-lru-cache")
12263 (version "1.5")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 ;; only the pypi tarballs contain the necessary metadata
12268 (uri (pypi-uri "backports.functools_lru_cache" version))
12269 (sha256
12270 (base32
12271 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12272 (build-system python-build-system)
12273 (native-inputs
12274 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12275 (arguments
12276 `(#:python ,python-2))
12277 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12278 (synopsis "Backport of functools.lru_cache from Python 3.3")
12279 (description "@code{python2-backports-functools-lru-cache} is a backport
12280 of @code{functools.lru_cache} from python 3.3.")
12281 (license license:expat)))
12282
12283 (define-public python-configparser
12284 (package
12285 (name "python-configparser")
12286 (version "3.7.1")
12287 (source
12288 (origin
12289 (method url-fetch)
12290 (uri (pypi-uri "configparser" version))
12291 (sha256
12292 (base32
12293 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12294 (build-system python-build-system)
12295 (home-page "https://github.com/jaraco/configparser/")
12296 (synopsis "Backport of configparser from python 3.5")
12297 (description "@code{python-configparser} is a backport of
12298 @code{configparser} from Python 3.5 so that it can be used directly
12299 in other versions.")
12300 (license license:expat)))
12301
12302 (define-public python2-configparser
12303 (package-with-python2 python-configparser))
12304
12305 (define-public python-mando
12306 (package
12307 (name "python-mando")
12308 (version "0.6.4")
12309 (source (origin
12310 (method url-fetch)
12311 (uri (pypi-uri "mando" version))
12312 (sha256
12313 (base32
12314 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12315 (build-system python-build-system)
12316 (propagated-inputs
12317 `(("python-rst2ansi" ,python-rst2ansi)
12318 ("python-six" ,python-six)))
12319 (native-inputs
12320 `(("python-pytest" ,python-pytest)))
12321 (home-page "https://mando.readthedocs.org/")
12322 (synopsis
12323 "Wrapper around argparse, allowing creation of complete CLI applications")
12324 (description
12325 "This package is a wrapper around argparse, allowing you to write complete CLI
12326 applications in seconds while maintaining all the flexibility.")
12327 (license license:expat)))
12328
12329 (define-public python2-mando
12330 (package-with-python2 python-mando))
12331
12332 (define-public python2-argparse
12333 (package
12334 (name "python2-argparse")
12335 (version "1.4.0")
12336 (source
12337 (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "argparse" version))
12340 (sha256
12341 (base32
12342 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12343 (build-system python-build-system)
12344 (arguments
12345 `(#:python ,python-2))
12346 (home-page "https://github.com/ThomasWaldmann/argparse/")
12347 (synopsis "Python command-line parsing library")
12348 (description
12349 "This package is mostly for people who want to have @code{argparse} on
12350 older Pythons because it was not part of the standard library back then.")
12351 (license license:psfl)))
12352
12353 (define-public python-fudge
12354 (package
12355 (name "python-fudge")
12356 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12357 ;; package, which is currently the only use of this package.
12358 (version "0.9.6")
12359 (source
12360 (origin
12361 (method url-fetch)
12362 (uri (pypi-uri "fudge" version))
12363 (sha256
12364 (base32
12365 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12366 (build-system python-build-system)
12367 (arguments
12368 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12369 (home-page "https://github.com/fudge-py/fudge")
12370 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12371 (description
12372 "Fudge is a Python module for using fake objects (mocks and stubs) to
12373 test real ones.
12374
12375 In readable Python code, you declare the methods available on your fake object
12376 and how they should be called. Then you inject that into your application and
12377 start testing. This declarative approach means you don’t have to record and
12378 playback actions and you don’t have to inspect your fakes after running code.
12379 If the fake object was used incorrectly then you’ll see an informative
12380 exception message with a traceback that points to the culprit.")
12381 (license license:expat)))
12382
12383 (define-public python2-fudge
12384 (package-with-python2 python-fudge))
12385
12386 (define-public python-mwclient
12387 (package
12388 (name "python-mwclient")
12389 (version "0.8.4")
12390 (source
12391 (origin
12392 (method url-fetch)
12393 ;; The PyPI version wouldn't contain tests.
12394 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12395 "v" version ".tar.gz"))
12396 (file-name (string-append name "-" version ".tar.gz"))
12397 (sha256
12398 (base32
12399 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12400 (build-system python-build-system)
12401 (propagated-inputs
12402 `(("python-requests" ,python-requests)
12403 ("python-requests-oauthlib"
12404 ,python-requests-oauthlib)
12405 ("python-six" ,python-six)))
12406 (native-inputs
12407 `(("python-mock" ,python-mock)
12408 ("python-pytest" ,python-pytest)
12409 ("python-pytest-pep8" ,python-pytest-pep8)
12410 ("python-pytest-cache" ,python-pytest-cache)
12411 ("python-pytest-cov" ,python-pytest-cov)
12412 ("python-responses" ,python-responses)))
12413 (home-page "https://github.com/btongminh/mwclient")
12414 (synopsis "MediaWiki API client")
12415 (description "This package provides a MediaWiki API client.")
12416 (license license:expat)))
12417
12418 (define-public python2-mwclient
12419 (package-with-python2 python-mwclient))
12420
12421 (define-public python-utils
12422 (package
12423 (name "python-utils")
12424 (version "2.1.0")
12425 (source (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "python-utils" version))
12428 (sha256
12429 (base32
12430 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12431 (build-system python-build-system)
12432 (native-inputs
12433 `(("pytest-runner" ,python-pytest-runner)
12434 ("pytest" ,python-pytest)
12435 ("six" ,python-six)))
12436 (home-page "https://github.com/WoLpH/python-utils")
12437 (synopsis "Convenient utilities not included with the standard Python install")
12438 (description
12439 "Python Utils is a collection of small Python functions and classes which
12440 make common patterns shorter and easier.")
12441 (license license:bsd-2)))
12442
12443 (define-public python2-utils
12444 (package-with-python2 python-utils))
12445
12446 (define-public python-diff-match-patch
12447 (package
12448 (name "python-diff-match-patch")
12449 (version "20121119")
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (pypi-uri "diff-match-patch" version))
12454 (sha256
12455 (base32
12456 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12457 (build-system python-build-system)
12458 (home-page "https://code.google.com/p/google-diff-match-patch")
12459 (synopsis "Synchronize plain text")
12460 (description "Diff Match and Patch libraries offer robust algorithms to
12461 perform the operations required for synchronizing plain text.")
12462 (license license:asl2.0)))
12463
12464 (define-public python2-diff-match-patch
12465 (package-with-python2 python-diff-match-patch))
12466
12467 (define-public python-dirsync
12468 (package
12469 (name "python-dirsync")
12470 (version "2.2.3")
12471 (source
12472 (origin
12473 (method url-fetch)
12474 (uri (pypi-uri "dirsync" version))
12475 (sha256
12476 (base32
12477 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12478 (build-system python-build-system)
12479 (propagated-inputs
12480 `(("six" ,python-six)))
12481 (home-page "https://bitbucket.org/tkhyn/dirsync")
12482 (synopsis "Advanced directory tree synchronisation tool")
12483 (description "Advanced directory tree synchronisation tool.")
12484 (license license:expat)))
12485
12486 (define-public python2-dirsync
12487 (package-with-python2 python-dirsync))
12488
12489 (define-public python-levenshtein
12490 (package
12491 (name "python-levenshtein")
12492 (version "0.12.0")
12493 (source
12494 (origin
12495 (method url-fetch)
12496 (uri (pypi-uri "python-Levenshtein" version))
12497 (sha256
12498 (base32
12499 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12500 (build-system python-build-system)
12501 (home-page "https://github.com/ztane/python-Levenshtein")
12502 (synopsis "Fast computation of Levenshtein distance and string similarity")
12503 (description
12504 "The Levenshtein Python C extension module contains functions for fast computation of
12505 @enumerate
12506 @item Levenshtein (edit) distance, and edit operations
12507 @item string similarity
12508 @item approximate median strings, and generally string averaging
12509 @item string sequence and set similarity
12510 @end enumerate
12511 It supports both normal and Unicode strings.")
12512 (license license:gpl2+)))
12513
12514 (define-public python2-levenshtein
12515 (package-with-python2 python-levenshtein))
12516
12517 (define-public python-scandir
12518 (package
12519 (name "python-scandir")
12520 (version "1.9.0")
12521 (source
12522 (origin
12523 (method url-fetch)
12524 (uri (pypi-uri "scandir" version))
12525 (sha256
12526 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12527 (build-system python-build-system)
12528 (arguments
12529 `(#:phases (modify-phases %standard-phases
12530 (replace 'check
12531 (lambda _
12532 (invoke "python" "test/run_tests.py"))))))
12533 (home-page "https://github.com/benhoyt/scandir")
12534 (synopsis "Directory iteration function")
12535 (description
12536 "Directory iteration function like os.listdir(), except that instead of
12537 returning a list of bare filenames, it yields DirEntry objects that include
12538 file type and stat information along with the name. Using scandir() increases
12539 the speed of os.walk() by 2-20 times (depending on the platform and file
12540 system) by avoiding unnecessary calls to os.stat() in most cases.
12541
12542 This package is part of the Python standard library since version 3.5.")
12543 (license license:bsd-3)))
12544
12545 (define-public python2-scandir
12546 (package-with-python2 python-scandir))
12547
12548 (define-public python2-stemming
12549 (package
12550 (name "python2-stemming")
12551 (version "1.0.1")
12552 (source
12553 (origin
12554 (method url-fetch)
12555 (uri (pypi-uri "stemming" version))
12556 (sha256
12557 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12558 (build-system python-build-system)
12559 (arguments
12560 `(#:python ,python-2))
12561 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12562 (synopsis "Python implementations of various stemming algorithms")
12563 (description
12564 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12565 stemming algorithms for English. These implementations are straightforward and
12566 efficient, unlike some Python versions of the same algorithms available on the
12567 Web. This package is an extraction of the stemming code included in the Whoosh
12568 search engine.")
12569 (license license:public-domain)))
12570
12571 (define-public python-factory-boy
12572 (package
12573 (name "python-factory-boy")
12574 (version "2.8.1")
12575 (source
12576 (origin
12577 (method url-fetch)
12578 (uri (pypi-uri "factory_boy" version))
12579 (sha256
12580 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12581 (build-system python-build-system)
12582 (arguments
12583 ;; Tests are not included in the tarball.
12584 `(#:tests? #f))
12585 (propagated-inputs
12586 `(("faker" ,python-faker)))
12587 (home-page "https://github.com/benhoyt/scandir")
12588 (synopsis "Versatile test fixtures replacement")
12589 (description
12590 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12591
12592 As a fixtures replacement tool, it aims to replace static, hard to maintain
12593 fixtures with easy-to-use factories for complex object.
12594
12595 Instead of building an exhaustive test setup with every possible combination
12596 of corner cases, factory_boy allows you to use objects customized for the
12597 current test, while only declaring the test-specific fields")
12598 (license license:expat)))
12599
12600 (define-public python2-factory-boy
12601 (package-with-python2 python-factory-boy))
12602
12603 (define-public python-translate-toolkit
12604 (package
12605 (name "python-translate-toolkit")
12606 (version "2.1.0")
12607 (source
12608 (origin
12609 (method url-fetch)
12610 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12611 (sha256
12612 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12613 (build-system python-build-system)
12614 (native-inputs
12615 `(("python-pytest" ,python-pytest)
12616 ("python-sphinx" ,python-sphinx)))
12617 (propagated-inputs
12618 `(("python-babel" ,python-babel)
12619 ("python-beautifulsoup4" ,python-beautifulsoup4)
12620 ("python-chardet" ,python-chardet)
12621 ("python-diff-match-patch" ,python-diff-match-patch)
12622 ("python-levenshtein" ,python-levenshtein)
12623 ("python-lxml" ,python-lxml)
12624 ("python-six" ,python-six)
12625 ("python-vobject" ,python-vobject)
12626 ("python-pyyaml" ,python-pyyaml)))
12627 (arguments
12628 ;; TODO: tests are not run, because they end with
12629 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12630 ;; 'parse_funcs'
12631 ;; during test setup.
12632 `(#:tests? #f))
12633 (home-page "https://toolkit.translatehouse.org")
12634 (synopsis "Tools and API for translation and localization engineering")
12635 (description
12636 "Tools and API for translation and localization engineering. It contains
12637 several utilities, as well as an API for building localization tools.")
12638 (license license:gpl2+)))
12639
12640 (define-public python2-translate-toolkit
12641 (package-with-python2 python-translate-toolkit))
12642
12643 (define-public python-packaging
12644 (package
12645 (name "python-packaging")
12646 (version "19.0")
12647 (source
12648 (origin
12649 (method url-fetch)
12650 (uri (pypi-uri "packaging" version))
12651 (sha256
12652 (base32
12653 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12654 (build-system python-build-system)
12655 (arguments
12656 `(#:phases (modify-phases %standard-phases
12657 (replace 'check
12658 (lambda _ (invoke "py.test" "-vv"))))))
12659 (native-inputs
12660 `(("python-pretend" ,python-pretend)
12661 ("python-pytest" ,python-pytest)))
12662 (propagated-inputs
12663 `(("python-pyparsing" ,python-pyparsing)
12664 ("python-six" ,python-six)))
12665 (home-page "https://github.com/pypa/packaging")
12666 (synopsis "Core utilities for Python packages")
12667 (description "Packaging is a Python module for dealing with Python packages.
12668 It offers an interface for working with package versions, names, and dependency
12669 information.")
12670 ;; From 'LICENSE': This software is made available under the terms of
12671 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12672 ;; Contributions to this software is made under the terms of *both* these
12673 ;; licenses.
12674 (license (list license:asl2.0 license:bsd-2))))
12675
12676 (define-public python2-packaging
12677 (package-with-python2 python-packaging))
12678
12679 (define-public python-relatorio
12680 (package
12681 (name "python-relatorio")
12682 (version "0.8.0")
12683 (source
12684 (origin
12685 (method url-fetch)
12686 (uri (pypi-uri "relatorio" version))
12687 (sha256
12688 (base32
12689 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12690 (build-system python-build-system)
12691 (propagated-inputs
12692 `(("python-lxml" ,python-lxml)
12693 ("python-genshi" ,python-genshi)))
12694 (native-inputs
12695 `(("python-magic" ,python-magic)))
12696 (home-page "https://relatorio.tryton.org/")
12697 (synopsis "Templating library able to output ODT and PDF files")
12698 (description "Relatorio is a templating library which provides a way to
12699 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12700 for more filetypes can be easily added by creating plugins for them.")
12701 (license license:gpl3+)))
12702
12703 (define-public python2-relatorio
12704 (package-with-python2 python-relatorio))
12705
12706 (define-public python-radon
12707 (package
12708 (name "python-radon")
12709 (version "2.2.0")
12710 (source
12711 (origin
12712 (method url-fetch)
12713 (uri (pypi-uri "radon" version))
12714 (sha256
12715 (base32
12716 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12717 (build-system python-build-system)
12718 (arguments
12719 `(#:phases (modify-phases %standard-phases
12720 (replace 'check
12721 (lambda _
12722 (invoke "python" "radon/tests/run.py"))))))
12723 (propagated-inputs
12724 `(("python-colorama" ,python-colorama)
12725 ("python-flake8-polyfill" ,python-flake8-polyfill)
12726 ("python-mando" ,python-mando)))
12727 (native-inputs
12728 `(("python-pytest" ,python-pytest)
12729 ("python-pytest-mock" ,python-pytest-mock)))
12730 (home-page "https://radon.readthedocs.org/")
12731 (synopsis "Code Metrics in Python")
12732 (description "Radon is a Python tool which computes various code metrics.
12733 Supported metrics are:
12734 @itemize @bullet
12735 @item raw metrics: SLOC, comment lines, blank lines, &c.
12736 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12737 @item Halstead metrics (all of them)
12738 @item the Maintainability Index (a Visual Studio metric)
12739 @end itemize")
12740 (license license:expat)))
12741
12742 (define-public python2-radon
12743 (package-with-python2 python-radon))
12744
12745 (define-public python-sure
12746 (package
12747 (name "python-sure")
12748 (version "1.4.11")
12749 (source
12750 (origin
12751 (method url-fetch)
12752 (uri (pypi-uri "sure" version))
12753 (sha256
12754 (base32
12755 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12756 (build-system python-build-system)
12757 (propagated-inputs
12758 `(("python-mock" ,python-mock)
12759 ("python-six" ,python-six)))
12760 (native-inputs
12761 `(("python-nose" ,python-nose)))
12762 (home-page "https://github.com/gabrielfalcao/sure")
12763 (synopsis "Automated testing library in python for python")
12764 (description
12765 "Sure is a python library that leverages a DSL for writing assertions.
12766 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12767 (license license:gpl3+)))
12768
12769 (define-public python2-sure
12770 (package-with-python2 python-sure))
12771
12772 (define-public python2-couleur
12773 ;; This package does not seem to support python3 at all, hence,
12774 ;; only the python2 variant definition is provided.
12775 (package
12776 (name "python2-couleur")
12777 (version "0.6.2")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "couleur" version))
12782 (sha256
12783 (base32
12784 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12785 (build-system python-build-system)
12786 (arguments
12787 `(#:python ,python-2))
12788 (home-page "https://github.com/gabrielfalcao/couleur")
12789 (synopsis
12790 "ANSI terminal tool for python, colored shell and other handy fancy features")
12791 (description
12792 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12793 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12794 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12795 ;; https://github.com/gabrielfalcao/couleur/issues/11
12796 (license license:lgpl3+)))
12797
12798 (define-public python-misaka
12799 (package
12800 (name "python-misaka")
12801 (version "2.1.1")
12802 (source
12803 (origin
12804 (method url-fetch)
12805 (uri (pypi-uri "misaka" version))
12806 (sha256
12807 (base32
12808 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12809 (build-system python-build-system)
12810 (arguments
12811 `(;; Line 37 of setup.py calls self.run_command('develop')
12812 ;; in the 'check' phase. This command seems to be trying
12813 ;; to write to
12814 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12815 ;; for which it does not have the permission to write.
12816 #:tests? #f))
12817 (propagated-inputs
12818 `(("python-cffi" ,python-cffi)))
12819 (home-page "https://github.com/FSX/misaka")
12820 (synopsis "Python binding for Hoedown")
12821 (description
12822 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12823 library written in C. It features a fast HTML renderer and functionality to make custom
12824 renderers (e.g. man pages or LaTeX).")
12825 (license license:expat)))
12826
12827 (define-public python2-misaka
12828 (package-with-python2 python-misaka))
12829
12830 (define-public python2-steadymark
12831 ;; This is forced into being a python2 only variant
12832 ;; due to its dependence on couleur that has no support
12833 ;; for python3
12834 (package
12835 (name "python2-steadymark")
12836 (version "0.7.3")
12837 (source
12838 (origin
12839 (method url-fetch)
12840 (uri (pypi-uri "steadymark" version))
12841 (sha256
12842 (base32
12843 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12844 (build-system python-build-system)
12845 (native-inputs
12846 `(("python-couleur" ,python2-couleur)
12847 ("python-sure" ,python2-sure)
12848 ("python-misaka" ,python2-misaka)))
12849 (arguments
12850 `(#:python ,python-2
12851 #:phases
12852 (modify-phases %standard-phases
12853 (add-before 'build 'patch-setup-py
12854 (lambda _
12855 ;; Update requirements from dependency==version
12856 ;; to dependency>=version
12857 (substitute* "setup.py"
12858 (("==") ">="))
12859 #t)))))
12860 (home-page "https://github.com/gabrielfalcao/steadymark")
12861 (synopsis "Markdown-based test runner for python")
12862 (description
12863 "@code{Steadymark} allows documentation to be written in github-flavoured
12864 markdown. The documentation may contain snippets of code surrounded by python
12865 code blocks and @code{Steadymark} will find these snippets and run them, making
12866 sure that there are no old malfunctional examples in the documentation examples.")
12867 (license license:expat)))
12868
12869 (define-public python-jsonpointer
12870 (package
12871 (name "python-jsonpointer")
12872 (version "1.10")
12873 (source
12874 (origin
12875 (method url-fetch)
12876 (uri (pypi-uri "jsonpointer" version))
12877 (sha256
12878 (base32
12879 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12880 (build-system python-build-system)
12881 (home-page "https://github.com/stefankoegl/python-json-pointer")
12882 (synopsis "Identify specific nodes in a JSON document")
12883 (description "@code{jsonpointer} allows you to access specific nodes
12884 by path in a JSON document (see RFC 6901).")
12885 (license license:bsd-3)))
12886
12887 (define-public python2-jsonpointer
12888 (package-with-python2 python-jsonpointer))
12889
12890 (define-public python-jsonpatch
12891 (package
12892 (name "python-jsonpatch")
12893 (version "1.16")
12894 (source
12895 (origin
12896 (method url-fetch)
12897 ;; pypi version lacks tests.js
12898 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12899 "archive/v" version ".tar.gz"))
12900 (file-name (string-append name "-" version ".tar.gz"))
12901 (sha256
12902 (base32
12903 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12904 (build-system python-build-system)
12905 (native-inputs
12906 `(("python-jsonpointer" ,python-jsonpointer)))
12907 (home-page "https://github.com/stefankoegl/python-json-patch")
12908 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12909 (description "@code{jsonpatch} is a library and program that allows
12910 applying JSON Patches according to RFC 6902.")
12911 (license license:bsd-3)))
12912
12913 (define-public python2-jsonpatch
12914 (package-with-python2 python-jsonpatch))
12915
12916 (define-public python-jsonpatch-0.4
12917 (package (inherit python-jsonpatch)
12918 (name "python-jsonpatch")
12919 (version "0.4")
12920 (source
12921 (origin
12922 (method url-fetch)
12923 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12924 "archive/v" version ".tar.gz"))
12925 (file-name (string-append name "-" version ".tar.gz"))
12926 (sha256
12927 (base32
12928 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12929
12930 (define-public python2-jsonpatch-0.4
12931 (package-with-python2 python-jsonpatch-0.4))
12932
12933 (define-public python-rfc3986
12934 (package
12935 (name "python-rfc3986")
12936 (version "1.1.0")
12937 (source (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "rfc3986" version))
12940 (sha256
12941 (base32
12942 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12943 (build-system python-build-system)
12944 (arguments
12945 `(#:modules ((guix build utils)
12946 (guix build python-build-system)
12947 (ice-9 ftw)
12948 (srfi srfi-1)
12949 (srfi srfi-26))
12950 #:phases
12951 (modify-phases %standard-phases
12952 (replace 'check
12953 (lambda _
12954 (let ((cwd (getcwd)))
12955 (setenv "PYTHONPATH"
12956 (string-append cwd "/build/"
12957 (find (cut string-prefix? "lib" <>)
12958 (scandir (string-append cwd "/build")))
12959 ":"
12960 (getenv "PYTHONPATH")))
12961 (invoke "pytest" "-v")))))))
12962 (native-inputs
12963 `(("python-pytest" ,python-pytest)))
12964 (home-page "https://rfc3986.readthedocs.io/")
12965 (synopsis "Parse and validate URI references")
12966 (description
12967 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12968 validation and authority parsing. This module also supports RFC@tie{}6874
12969 which adds support for zone identifiers to IPv6 addresses.")
12970 (license license:asl2.0)))
12971
12972 (define-public python2-rfc3986
12973 (package-with-python2 python-rfc3986))
12974
12975 (define-public python-rfc3987
12976 (package
12977 (name "python-rfc3987")
12978 (version "1.3.7")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "rfc3987" version))
12983 (sha256
12984 (base32
12985 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12986 (build-system python-build-system)
12987 (home-page "https://pypi.python.org/pypi/rfc3987")
12988 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12989 (description "@code{rfc3987} provides routines for parsing and
12990 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12991 (license license:gpl3+)))
12992
12993 (define-public python2-rfc3987
12994 (package-with-python2 python-rfc3987))
12995
12996 (define-public python-validate-email
12997 (package
12998 (name "python-validate-email")
12999 (version "1.3")
13000 (source
13001 (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "validate_email" version))
13004 (sha256
13005 (base32
13006 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13007 (build-system python-build-system)
13008 (home-page "https://github.com/syrusakbary/validate_email")
13009 (synopsis "Verifies if an email address is valid and really exists")
13010 (description "@code{validate_email} can be used to verify if an email
13011 address is valid and really exists.")
13012 (license license:lgpl3+)))
13013
13014 (define-public python2-validate-email
13015 (package-with-python2 python-validate-email))
13016
13017 (define-public python-flex
13018 (package
13019 (name "python-flex")
13020 (version "6.10.0")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "flex" version))
13025 (sha256
13026 (base32
13027 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13028 (build-system python-build-system)
13029 (propagated-inputs
13030 `(("python-click" ,python-click)
13031 ("python-iso8601" ,python-iso8601)
13032 ("python-jsonpointer" ,python-jsonpointer)
13033 ("python-pyyaml" ,python-pyyaml)
13034 ("python-requests" ,python-requests)
13035 ("python-rfc3987" ,python-rfc3987)
13036 ("python-six" ,python-six)
13037 ("python-validate-email" ,python-validate-email)))
13038 (home-page "https://github.com/pipermerriam/flex")
13039 (synopsis "Validates Swagger schemata")
13040 (description "@code{flex} can be used to validate Swagger schemata.")
13041 (license license:bsd-3)))
13042
13043 (define-public python2-flex
13044 (package-with-python2 python-flex))
13045
13046 (define-public python-marshmallow
13047 (package
13048 (name "python-marshmallow")
13049 (version "3.0.0b14")
13050 (source
13051 (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "marshmallow" version))
13054 (sha256
13055 (base32
13056 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13057 (build-system python-build-system)
13058 (propagated-inputs
13059 `(("python-dateutil" ,python-dateutil)
13060 ("python-simplejson" ,python-simplejson)))
13061 (native-inputs
13062 `(("python-pytest" ,python-pytest)
13063 ("python-pytz" ,python-pytz)))
13064 (home-page "https://github.com/marshmallow-code/marshmallow")
13065 (synopsis "Convert complex datatypes to and from native
13066 Python datatypes.")
13067 (description "@code{marshmallow} provides a library for converting
13068 complex datatypes to and from native Python datatypes.")
13069 (license license:expat)))
13070
13071 (define-public python2-marshmallow
13072 (package-with-python2 python-marshmallow))
13073
13074 (define-public python-apispec
13075 (package
13076 (name "python-apispec")
13077 (version "0.25.3")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "apispec" version))
13082 (sha256
13083 (base32
13084 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13085 (build-system python-build-system)
13086 (propagated-inputs
13087 `(("python-pyyaml" ,python-pyyaml)))
13088 (native-inputs
13089 `(("python-pytest" ,python-pytest)
13090 ("python-flask" ,python-flask)
13091 ("python-marshmallow" ,python-marshmallow)
13092 ("python-tornado" ,python-tornado)
13093 ("python-bottle" ,python-bottle)
13094 ("python-mock" ,python-mock)))
13095 (home-page "https://github.com/marshmallow-code/apispec")
13096 (synopsis "Swagger 2.0 API specification generator")
13097 (description "@code{python-apispec} is a pluggable API specification
13098 generator. Currently supports the OpenAPI specification (f.k.a.
13099 Swagger 2.0).")
13100 (license license:expat)))
13101
13102 (define-public python2-apispec
13103 (package-with-python2 python-apispec))
13104
13105 (define-public python-flasgger
13106 (package
13107 (name "python-flasgger")
13108 (version "0.6.3")
13109 (source
13110 (origin
13111 (method git-fetch)
13112 (uri (git-reference
13113 (url "https://github.com/rochacbruno/flasgger.git")
13114 (commit version)))
13115 (file-name (git-file-name name version))
13116 (sha256
13117 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13118 (build-system python-build-system)
13119 (arguments
13120 `(#:phases
13121 (modify-phases %standard-phases
13122 (replace 'check
13123 (lambda* (#:key inputs outputs #:allow-other-keys)
13124 (substitute* "Makefile"
13125 (("flake8 flasgger --ignore=F403")
13126 "flake8 flasgger --ignore=E731,F403"))
13127 (setenv "PYTHONPATH" (string-append (getcwd)
13128 ":"
13129 (getenv "PYTHONPATH")))
13130 (invoke "py.test"))))))
13131 (propagated-inputs
13132 `(("python-flask" ,python-flask)
13133 ("python-pyyaml" ,python-pyyaml)
13134 ("python-jsonschema" ,python-jsonschema)
13135 ("python-mistune" ,python-mistune)
13136 ("python-six" ,python-six)))
13137 (native-inputs
13138 `(("python-decorator" ,python-decorator)
13139 ("python-flake8" ,python-flake8)
13140 ("python-flask-restful" ,python-flask-restful)
13141 ("python-flex" ,python-flex)
13142 ("python-pytest" ,python-pytest)
13143 ("python-pytest-cov" ,python-pytest-cov)
13144 ("python-marshmallow" ,python-marshmallow)
13145 ("python-apispec" ,python-apispec)))
13146 (home-page "https://github.com/rochacbruno/flasgger/")
13147 (synopsis "Extract Swagger specs from your Flask project")
13148 (description "@code{python-flasgger} allows extracting Swagger specs
13149 from your Flask project. It is a fork of Flask-Swagger.")
13150 (license license:expat)))
13151
13152 (define-public python2-flasgger
13153 (package-with-python2 python-flasgger))
13154
13155 (define-public python-swagger-spec-validator
13156 (package
13157 (name "python-swagger-spec-validator")
13158 (version "2.4.3")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "swagger-spec-validator" version))
13163 (sha256
13164 (base32
13165 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13166 (build-system python-build-system)
13167 (propagated-inputs
13168 `(("python-jsonschema" ,python-jsonschema)
13169 ("python-pyyaml" ,python-pyyaml)
13170 ("python-six" ,python-six)))
13171 (home-page
13172 "https://github.com/Yelp/swagger_spec_validator")
13173 (synopsis "Validation of Swagger specifications")
13174 (description "@code{swagger_spec_validator} provides a library for
13175 validating Swagger API specifications.")
13176 (license license:asl2.0)))
13177
13178 (define-public python2-swagger-spec-validator
13179 (package-with-python2 python-swagger-spec-validator))
13180
13181 (define-public python-apache-libcloud
13182 (package
13183 (name "python-apache-libcloud")
13184 (version "2.4.0")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "apache-libcloud" version))
13189 (sha256
13190 (base32
13191 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13192 (build-system python-build-system)
13193 (arguments
13194 `(#:phases
13195 (modify-phases %standard-phases
13196 (add-after 'unpack 'patch-ssh
13197 (lambda* (#:key inputs #:allow-other-keys)
13198 (substitute* "libcloud/compute/ssh.py"
13199 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13200 "/bin/ssh" "'")))
13201 #t))
13202 (add-after 'unpack 'patch-tests
13203 (lambda _
13204 (substitute* "./libcloud/test/test_file_fixtures.py"
13205 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13206 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13207 return (httplib.OK,
13208 \"1234abcd\",
13209 {\"test\": \"value\"},
13210 httplib.responses[httplib.OK])
13211 def _ascii"))
13212 (substitute* "libcloud/test/compute/test_ssh_client.py"
13213 (("class ShellOutSSHClientTests")
13214 "@unittest.skip(\"Guix container doesn't have ssh service\")
13215 class ShellOutSSHClientTests")
13216 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13217 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13218 (("'.xF0', '.x90', '.x8D', '.x88'")
13219 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13220 #t))
13221 (add-before 'check 'copy-secret
13222 (lambda _
13223 (copy-file "libcloud/test/secrets.py-dist"
13224 "libcloud/test/secrets.py")
13225 #t)))))
13226 (inputs
13227 `(("openssh" ,openssh)))
13228 (propagated-inputs
13229 `(("python-paramiko" ,python-paramiko)
13230 ("python-requests" ,python-requests)))
13231 (native-inputs
13232 `(("python-lockfile" ,python-lockfile)
13233 ("python-mock" ,python-mock)
13234 ("python-pytest" ,python-pytest)
13235 ("python-pytest-runner" ,python-pytest-runner)
13236 ("python-requests-mock" ,python-requests-mock)))
13237 (home-page "https://libcloud.apache.org/")
13238 (synopsis "Unified Cloud API")
13239 (description "@code{libcloud} is a Python library for interacting with
13240 many of the popular cloud service providers using a unified API.")
13241 (license license:asl2.0)))
13242
13243 (define-public python2-apache-libcloud
13244 (package-with-python2 python-apache-libcloud))
13245
13246 (define-public python-smmap2
13247 (package
13248 (name "python-smmap2")
13249 (version "2.0.3")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (pypi-uri "smmap2" version))
13254 (sha256
13255 (base32
13256 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13257 (build-system python-build-system)
13258 (native-inputs
13259 `(("python-nosexcover" ,python-nosexcover)))
13260 (home-page "https://github.com/Byron/smmap")
13261 (synopsis "Python sliding window memory map manager")
13262 (description "@code{smmap2} is a pure Python implementation of a sliding
13263 window memory map manager.")
13264 (license license:bsd-3)))
13265
13266 (define-public python2-smmap2
13267 (package-with-python2 python-smmap2))
13268
13269 (define-public python-regex
13270 (package
13271 (name "python-regex")
13272 (version "2019.04.14")
13273 (source (origin
13274 (method url-fetch)
13275 (uri (pypi-uri "regex" version))
13276 (sha256
13277 (base32
13278 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13279 ;; TODO: Fix and enable regex_test.py tests that complain about the
13280 ;; test.support module not existing.
13281 (build-system python-build-system)
13282 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13283 (synopsis "Alternative regular expression module")
13284 (description "This regular expression implementation is backwards-
13285 compatible with the standard @code{re} module, but offers additional
13286 functionality like full case-folding for case-insensitive matches in Unicode.")
13287 (license license:psfl)))
13288
13289 (define-public python2-regex
13290 (package-with-python2 python-regex))
13291
13292 (define-public python2-pyopengl
13293 (package
13294 (name "python2-pyopengl")
13295 (version "3.1.0")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (pypi-uri "PyOpenGL" version))
13300 (sha256
13301 (base32
13302 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13303 (arguments
13304 `(#:python ,python-2))
13305 (build-system python-build-system)
13306 (home-page "http://pyopengl.sourceforge.net")
13307 (synopsis "Standard OpenGL bindings for Python")
13308 (description
13309 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13310 related APIs. The binding is created using the standard @code{ctypes}
13311 library.")
13312 (license license:bsd-3)))
13313
13314 (define-public python2-pyopengl-accelerate
13315 (package
13316 (inherit python2-pyopengl)
13317 (name "python2-pyopengl-accelerate")
13318 (version "3.1.0")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 (uri (pypi-uri "PyOpenGL-accelerate" version))
13323 (sha256
13324 (base32
13325 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13326 (synopsis "Acceleration code for PyOpenGL")
13327 (description
13328 "This is the Cython-coded accelerator module for PyOpenGL.")))
13329
13330 (define-public python-rencode
13331 (package
13332 (name "python-rencode")
13333 (version "1.0.5")
13334 (source
13335 (origin
13336 (method url-fetch)
13337 (uri (pypi-uri "rencode" version))
13338 (sha256
13339 (base32
13340 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13341 (build-system python-build-system)
13342 (arguments
13343 `(#:phases
13344 (modify-phases %standard-phases
13345 (add-before 'check 'delete-bogus-test
13346 ;; This test requires /home/aresch/Downloads, which is not provided by
13347 ;; the build environment.
13348 (lambda _
13349 (delete-file "rencode/t.py")
13350 #t)))))
13351 (native-inputs `(("pkg-config" ,pkg-config)
13352 ("python-cython" ,python-cython)))
13353 (home-page "https://github.com/aresch/rencode")
13354 (synopsis "Serialization of heterogeneous data structures")
13355 (description
13356 "The @code{rencode} module is a data structure serialization library,
13357 similar to @code{bencode} from the BitTorrent project. For complex,
13358 heterogeneous data structures with many small elements, r-encoding stake up
13359 significantly less space than b-encodings. This version of rencode is a
13360 complete rewrite in Cython to attempt to increase the performance over the
13361 pure Python module.")
13362 (license license:bsd-3)))
13363
13364 (define-public python2-rencode
13365 (package-with-python2 python-rencode))
13366
13367 (define-public python-xenon
13368 (package
13369 (name "python-xenon")
13370 (version "0.5.4")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "xenon" version))
13375 (sha256
13376 (base32
13377 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13378 (build-system python-build-system)
13379 (native-inputs
13380 `(("python-pyyaml" ,python-pyyaml)
13381 ("python-radon" ,python-radon)
13382 ("python-requests" ,python-requests)
13383 ("python-flake8" ,python-flake8)
13384 ("python-tox" ,python-tox)))
13385 (arguments
13386 `(#:phases
13387 (modify-phases %standard-phases
13388 (add-before 'build 'patch-test-requirements
13389 (lambda _
13390 ;; Remove httpretty dependency for tests.
13391 (substitute* "setup.py"
13392 (("httpretty") ""))
13393 #t)))))
13394 (home-page "https://xenon.readthedocs.org/")
13395 (synopsis "Monitor code metrics for Python on your CI server")
13396 (description
13397 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13398 Ideally, @code{xenon} is run every time code is committed. Through command
13399 line options, various thresholds can be set for the complexity of code. It
13400 will fail (i.e. it will exit with a non-zero exit code) when any of these
13401 requirements is not met.")
13402 (license license:expat)))
13403
13404 (define-public python2-xenon
13405 (package-with-python2 python-xenon))
13406
13407 (define-public python-pysocks
13408 (package
13409 (name "python-pysocks")
13410 (version "1.7.0")
13411 (source
13412 (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "PySocks" version))
13415 (sha256
13416 (base32
13417 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13418 (build-system python-build-system)
13419 (arguments `(#:tests? #f))
13420 (home-page "https://github.com/Anorov/PySocks")
13421 (synopsis "SOCKS client module")
13422 (description "@code{pysocks} is an updated and semi-actively maintained
13423 version of @code{SocksiPy} with bug fixes and extra features.")
13424 (license license:bsd-3)))
13425
13426 (define-public python2-pysocks
13427 (package-with-python2 python-pysocks))
13428
13429 (define-public python-pydiff
13430 (package
13431 (name "python-pydiff")
13432 (version "0.2")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "pydiff" version))
13437 (sha256
13438 (base32
13439 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13440 (build-system python-build-system)
13441 (home-page "https://github.com/myint/pydiff")
13442 (synopsis "Library to diff two Python files at the bytecode level")
13443 (description
13444 "@code{pydiff} makes it easy to look for actual code changes while
13445 ignoring formatting changes.")
13446 (license license:expat)))
13447
13448 (define-public python2-pydiff
13449 (package-with-python2 python-pydiff))
13450
13451 (define-public python-tqdm
13452 (package
13453 (name "python-tqdm")
13454 (version "4.19.6")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "tqdm" version))
13459 (sha256
13460 (base32
13461 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13462 (build-system python-build-system)
13463 (native-inputs
13464 `(("python-flake8" ,python-flake8)
13465 ("python-nose" ,python-nose)
13466 ("python-coverage" ,python-coverage)))
13467 (home-page "https://github.com/tqdm/tqdm")
13468 (synopsis "Fast, extensible progress meter")
13469 (description
13470 "Make loops show a progress bar on the console by just wrapping any
13471 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13472 design and layout.")
13473 (license (list license:mpl2.0 license:expat))))
13474
13475 (define-public python2-tqdm
13476 (package-with-python2 python-tqdm))
13477
13478 (define-public python-pkginfo
13479 (package
13480 (name "python-pkginfo")
13481 (version "1.4.2")
13482 (source
13483 (origin
13484 (method url-fetch)
13485 (uri (pypi-uri "pkginfo" version))
13486 (sha256
13487 (base32
13488 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13489 (build-system python-build-system)
13490 (arguments
13491 ;; The tests are broken upstream.
13492 '(#:tests? #f))
13493 (home-page
13494 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13495 (synopsis
13496 "Query metadatdata from sdists, bdists, and installed packages")
13497 (description
13498 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13499 source distriubtion (an sdist) or a binary distribution (e.g., created by
13500 running bdist_egg). It can also query the EGG-INFO directory of an installed
13501 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13502 created by running @code{python setup.py develop}).")
13503 (license license:expat)))
13504
13505 (define-public python2-pkginfo
13506 (package-with-python2 python-pkginfo))
13507
13508 (define-public python-twine
13509 (package
13510 (name "python-twine")
13511 (version "1.9.1")
13512 (source
13513 (origin
13514 (method url-fetch)
13515 (uri (pypi-uri "twine" version))
13516 (sha256
13517 (base32
13518 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13519 (build-system python-build-system)
13520 (propagated-inputs
13521 `(("python-tqdm" ,python-tqdm)
13522 ("python-pkginfo" ,python-pkginfo)
13523 ("python-requests" ,python-requests)
13524 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13525 (home-page "https://github.com/pypa/twine")
13526 (synopsis "Collection of utilities for interacting with PyPI")
13527 (description
13528 "@code{twine} currently supports registering projects and uploading
13529 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13530 their files and supports any packaging format (including wheels).")
13531 (license license:asl2.0)))
13532
13533 (define-public python2-twine
13534 (package-with-python2 python-twine))
13535
13536 (define-public python-linecache2
13537 (package
13538 (name "python-linecache2")
13539 (version "1.0.0")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "linecache2" version))
13544 (sha256
13545 (base32
13546 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13547 (build-system python-build-system)
13548 (arguments
13549 `(;; The tests depend on unittest2, and our version is a bit too old.
13550 #:tests? #f))
13551 (native-inputs
13552 `(("python-pbr" ,python-pbr-minimal)))
13553 (home-page
13554 "https://github.com/testing-cabal/linecache2")
13555 (synopsis "Backports of the linecache module")
13556 (description
13557 "The linecache module allows one to get any line from any file, while
13558 attempting to optimize internally, using a cache, the common case where many
13559 lines are read from a single file.")
13560 (license license:psfl)))
13561
13562 (define-public python2-linecache2
13563 (package-with-python2 python-linecache2))
13564
13565 (define-public python-traceback2
13566 (package
13567 (name "python-traceback2")
13568 (version "1.4.0")
13569 (source
13570 (origin
13571 (method url-fetch)
13572 (uri (pypi-uri "traceback2" version))
13573 (sha256
13574 (base32
13575 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13576 (build-system python-build-system)
13577 (arguments
13578 `(;; python-traceback2 and python-unittest2 depend on one another.
13579 #:tests? #f))
13580 (native-inputs
13581 `(("python-pbr" ,python-pbr-minimal)))
13582 (propagated-inputs
13583 `(("python-linecache2" ,python-linecache2)))
13584 (home-page
13585 "https://github.com/testing-cabal/traceback2")
13586 (synopsis "Backports of the traceback module")
13587 (description
13588 "This module provides a standard interface to extract, format and print
13589 stack traces of Python programs. It exactly mimics the behavior of the Python
13590 interpreter when it prints a stack trace.")
13591 (license license:psfl)))
13592
13593 (define-public python2-traceback2
13594 (package-with-python2 python-traceback2))
13595
13596 (define-public python-ratelimiter
13597 (package
13598 (name "python-ratelimiter")
13599 (version "1.2.0")
13600 (source
13601 (origin
13602 (method url-fetch)
13603 (uri (pypi-uri "ratelimiter" version))
13604 (sha256
13605 (base32
13606 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13607 (build-system python-build-system)
13608 (arguments
13609 '(#:tests? #f)) ; There are no tests in the pypi archive.
13610 (home-page "https://github.com/RazerM/ratelimiter")
13611 (synopsis "Simple rate limiting object")
13612 (description
13613 "The @code{ratelimiter} module ensures that an operation will not be
13614 executed more than a given number of times during a given period.")
13615 (license license:asl2.0)))
13616
13617 (define-public python2-ratelimiter
13618 (package-with-python2 python-ratelimiter))
13619
13620 (define-public python-dukpy
13621 (package
13622 (name "python-dukpy")
13623 (version "0.3")
13624 (source
13625 (origin
13626 (method git-fetch)
13627 (uri (git-reference
13628 (url "https://github.com/kovidgoyal/dukpy.git")
13629 (commit (string-append "v" version))))
13630 (file-name (git-file-name name version))
13631 (sha256
13632 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13633 (build-system python-build-system)
13634 (home-page "https://github.com/kovidgoyal/dukpy")
13635 (synopsis "Run JavaScript in python")
13636 (description
13637 "dukpy is a JavaScript runtime environment for Python using the duktape
13638 embeddable JavaScript engine.")
13639 ;; Dukpy is licensed under MIT like the embedded duktape library,
13640 ;; with 'errors.c' as GPL3.
13641 (license (list license:expat license:gpl3))))
13642
13643 (define-public python2-dukpy
13644 (package-with-python2 python-dukpy))
13645
13646 (define-public python-jsonrpclib-pelix
13647 (package
13648 (name "python-jsonrpclib-pelix")
13649 (version "0.3.2")
13650 (source
13651 (origin
13652 (method url-fetch)
13653 (uri (pypi-uri "jsonrpclib-pelix" version))
13654 (sha256
13655 (base32
13656 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13657 (build-system python-build-system)
13658 (arguments
13659 `(#:tests? #f)) ; no tests in PyPI tarball
13660 (home-page "https://github.com/tcalmant/jsonrpclib/")
13661 (synopsis "JSON-RPC 2.0 client library for Python")
13662 (description
13663 "This library implements the JSON-RPC v2.0
13664 specification (backwards-compatible) as a client library for Python. This
13665 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13666 services.")
13667 (license license:asl2.0)))
13668
13669 (define-public python2-jsonrpclib-pelix
13670 (package-with-python2 python-jsonrpclib-pelix))
13671
13672 (define-public python-setuptools-scm-git-archive
13673 (package
13674 (name "python-setuptools-scm-git-archive")
13675 (version "1.0")
13676 (source
13677 (origin
13678 (method url-fetch)
13679 (uri (pypi-uri "setuptools_scm_git_archive" version))
13680 (sha256
13681 (base32
13682 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13683 (build-system python-build-system)
13684 (native-inputs
13685 `(("python-pytest" ,python-pytest)))
13686 (propagated-inputs
13687 `(("python-setuptools-scm" ,python-setuptools-scm)))
13688 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13689 (synopsis "Setuptools_scm plugin for git archives")
13690 (description
13691 "The setuptools_scm_git_archive package is a plugin to
13692 setuptools_scm, which supports obtaining versions from git archives that
13693 belong to tagged versions.")
13694 (license license:expat)))
13695
13696 (define-public python2-setuptools-scm-git-archive
13697 (package-with-python2 python-setuptools-scm-git-archive))
13698
13699 (define-public python-setuptools-git
13700 (package
13701 (name "python-setuptools-git")
13702 (version "1.2")
13703 (source
13704 (origin
13705 (method url-fetch)
13706 (uri (pypi-uri "setuptools-git" version))
13707 (sha256
13708 (base32
13709 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13710 (build-system python-build-system)
13711 (arguments
13712 `(#:phases
13713 (modify-phases %standard-phases
13714 ;; This is needed for tests.
13715 (add-after 'unpack 'configure-git
13716 (lambda _
13717 (setenv "HOME" "/tmp")
13718 (invoke "git" "config" "--global" "user.email" "guix")
13719 (invoke "git" "config" "--global" "user.name" "guix")
13720 #t)))))
13721 (native-inputs
13722 `(("git" ,git-minimal)))
13723 (home-page "https://github.com/msabramo/setuptools-git")
13724 (synopsis "Setuptools revision control system plugin for Git")
13725 (description
13726 "This package provides a plugin for Setuptools for revision control with
13727 Git.")
13728 (license license:bsd-3)))
13729
13730 (define-public python-pyclipper
13731 (package
13732 (name "python-pyclipper")
13733 (version "1.1.0.post1")
13734 (source
13735 (origin
13736 (method url-fetch)
13737 (uri (pypi-uri "pyclipper" version ".zip"))
13738 (sha256
13739 (base32
13740 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13741 (modules '((guix build utils)))
13742 (snippet
13743 '(begin
13744 ;; This file is generated by Cython.
13745 (delete-file "pyclipper/pyclipper.cpp") #t))))
13746 (build-system python-build-system)
13747 (arguments
13748 `(#:phases
13749 (modify-phases %standard-phases
13750 (add-before 'build 'cythonize-sources
13751 (lambda _
13752 (with-directory-excursion "pyclipper"
13753 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13754 (propagated-inputs
13755 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13756 (native-inputs
13757 `(("python-cython" ,python-cython)
13758 ("python-pytest" ,python-pytest)
13759 ("python-pytest-runner" ,python-pytest-runner)
13760 ("python-unittest2" ,python-unittest2)
13761 ("unzip" ,unzip)))
13762 (home-page "https://github.com/greginvm/pyclipper")
13763 (synopsis "Wrapper for Angus Johnson's Clipper library")
13764 (description
13765 "Pyclipper is a Cython wrapper for the C++ translation of the
13766 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13767 (license license:expat)))
13768
13769 (define-public python2-pyclipper
13770 (package-with-python2 python-pyclipper))
13771
13772 (define-public python2-booleanoperations
13773 (package
13774 (name "python2-booleanoperations")
13775 (version "0.7.1")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (pypi-uri "booleanOperations" version ".zip"))
13780 (sha256
13781 (base32
13782 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13783 (build-system python-build-system)
13784 (arguments
13785 `(#:python ,python-2))
13786 (native-inputs
13787 `(("unzip" ,unzip)
13788 ("python2-pytest" ,python2-pytest)
13789 ("python2-pytest-runner" ,python2-pytest-runner)))
13790 (propagated-inputs
13791 `(("python-fonttools" ,python2-fonttools)
13792 ("python-pyclipper" ,python2-pyclipper)
13793 ("python-ufolib" ,python2-ufolib)))
13794 (home-page "https://github.com/typemytype/booleanOperations")
13795 (synopsis "Boolean operations on paths")
13796 (description
13797 "BooleanOperations provides a Python library that enables
13798 boolean operations on paths.")
13799 (license license:expat)))
13800
13801 (define-public python-tempdir
13802 (package
13803 (name "python-tempdir")
13804 (version "0.7.1")
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (pypi-uri "tempdir" version))
13809 (sha256
13810 (base32
13811 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13812 (build-system python-build-system)
13813 (home-page "https://pypi.org/project/tempdir/")
13814 (arguments
13815 ;; the package has no tests
13816 '(#:tests? #f))
13817 (synopsis "Python library for managing temporary directories")
13818 (description
13819 "This library manages temporary directories that are automatically
13820 deleted with all their contents when they are no longer needed. It is
13821 particularly convenient for use in tests.")
13822 (license license:expat)))
13823
13824 (define-public python2-tempdir
13825 (package-with-python2 python-tempdir))
13826
13827 (define-public python-activepapers
13828 (package
13829 (name "python-activepapers")
13830 (version "0.2.2")
13831 (source
13832 (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "ActivePapers.Py" version))
13835 (sha256
13836 (base32
13837 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13838 (build-system python-build-system)
13839 (arguments
13840 `(#:modules ((ice-9 ftw)
13841 (srfi srfi-1)
13842 (guix build utils)
13843 (guix build python-build-system))
13844
13845 #:phases
13846 (modify-phases %standard-phases
13847 (add-after 'unpack 'delete-python2-code
13848 (lambda _
13849 (for-each delete-file
13850 '("lib/activepapers/builtins2.py"
13851 "lib/activepapers/standardlib2.py"
13852 "lib/activepapers/utility2.py"))))
13853 (replace 'check
13854 (lambda _
13855 ;; Deactivate the test cases that download files
13856 (setenv "NO_NETWORK_ACCESS" "1")
13857 ;; For some strange reason, some tests fail if nosetests runs all
13858 ;; test modules in a single execution. They pass if each test
13859 ;; module is run individually.
13860 (for-each (lambda (filename)
13861 (invoke "nosetests"
13862 (string-append "tests/" filename)))
13863 (scandir "tests"
13864 (lambda (filename)
13865 (string-suffix? ".py" filename)))))))))
13866 (native-inputs
13867 `(("python-tempdir" ,python-tempdir)
13868 ("python-nose" ,python-nose)))
13869 (propagated-inputs
13870 `(("python-h5py" ,python-h5py)))
13871 (home-page "http://www.activepapers.org/")
13872 (synopsis "Executable papers for scientific computing")
13873 (description
13874 "ActivePapers is a tool for working with executable papers, which
13875 combine data, code, and documentation in single-file packages,
13876 suitable for publication as supplementary material or on repositories
13877 such as figshare or Zenodo.")
13878 (properties `((python2-variant . ,(delay python2-activepapers))))
13879 (license license:bsd-3)))
13880
13881 (define-public python2-activepapers
13882 (let ((base (package-with-python2
13883 (strip-python2-variant python-activepapers))))
13884 (package
13885 (inherit base)
13886 (arguments
13887 (substitute-keyword-arguments (package-arguments base)
13888 ((#:phases phases)
13889 `(modify-phases ,phases
13890 (delete 'delete-python2-code)
13891 (add-after 'unpack 'delete-python3-code
13892 (lambda _
13893 (for-each delete-file
13894 '("lib/activepapers/builtins3.py"
13895 "lib/activepapers/standardlib3.py"
13896 "lib/activepapers/utility3.py")))))))))))
13897
13898 (define-public python-semver
13899 (package
13900 (name "python-semver")
13901 (version "2.7.9")
13902 (source
13903 (origin
13904 (method url-fetch)
13905 (uri (pypi-uri "semver" version))
13906 (sha256
13907 (base32
13908 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13909 (build-system python-build-system)
13910 (arguments
13911 `(#:phases
13912 (modify-phases %standard-phases
13913 (add-after 'unpack 'patch-test-requirements
13914 (lambda _
13915 (substitute* "setup.py"
13916 ;; Our Python is new enough.
13917 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13918 #t)))))
13919 (native-inputs
13920 `(("python-tox" ,python-tox)
13921 ("python-virtualenv" ,python-virtualenv)))
13922 (home-page "https://github.com/k-bx/python-semver")
13923 (synopsis "Python helper for Semantic Versioning")
13924 (description "This package provides a Python library for
13925 @url{Semantic Versioning, http://semver.org/}.")
13926 (license license:bsd-3)))
13927
13928 (define-public python2-semver
13929 (package-with-python2 python-semver))
13930
13931 (define-public python-pyro4
13932 (package
13933 (name "python-pyro4")
13934 (version "4.75")
13935 (source
13936 (origin
13937 (method url-fetch)
13938 (uri (pypi-uri "Pyro4" version))
13939 (sha256
13940 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13941 (build-system python-build-system)
13942 (propagated-inputs
13943 `(("python-serpent" ,python-serpent)))
13944 (home-page "https://pyro4.readthedocs.io")
13945 (synopsis "Distributed object middleware for Python")
13946 (description
13947 "Pyro enables you to build applications in which objects can talk to each
13948 other over the network. You can just use normal Python method calls to call
13949 objects on other machines, also known as remote procedure calls (RPC).")
13950 (license license:expat)))
13951
13952 (define-public python2-pyro
13953 (package
13954 (name "python2-pyro")
13955 (version "3.16")
13956 (source
13957 (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "Pyro" version))
13960 (file-name (string-append "Pyro-" version ".tar.gz"))
13961 (sha256
13962 (base32
13963 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13964 (build-system python-build-system)
13965 (arguments
13966 ;; Pyro is not compatible with Python 3
13967 `(#:python ,python-2
13968 ;; Pyro has no test cases for automatic execution
13969 #:tests? #f))
13970 (home-page "http://pythonhosted.org/Pyro/")
13971 (synopsis "Distributed object manager for Python")
13972 (description "Pyro is a Distributed Object Technology system
13973 written in Python that is designed to be easy to use. It resembles
13974 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13975 which is a system and language independent Distributed Object Technology
13976 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13977 longer maintained. New projects should use Pyro4 instead, which
13978 is the new Pyro version that is actively developed.")
13979 (license license:expat)))
13980
13981 (define-public python2-scientific
13982 (package
13983 (name "python2-scientific")
13984 (version "2.9.4")
13985 (source
13986 (origin
13987 (method url-fetch)
13988 (uri (string-append "https://bitbucket.org/khinsen/"
13989 "scientificpython/downloads/ScientificPython-"
13990 version ".tar.gz"))
13991 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13992 (sha256
13993 (base32
13994 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13995 (build-system python-build-system)
13996 (inputs
13997 `(("netcdf" ,netcdf)))
13998 (propagated-inputs
13999 `(("python-numpy" ,python2-numpy-1.8)
14000 ("python-pyro" ,python2-pyro)))
14001 (arguments
14002 ;; ScientificPython is not compatible with Python 3
14003 `(#:python ,python-2
14004 #:tests? #f ; No test suite
14005 #:phases
14006 (modify-phases %standard-phases
14007 (replace 'build
14008 (lambda* (#:key inputs #:allow-other-keys)
14009 (invoke "python" "setup.py" "build"
14010 (string-append "--netcdf_prefix="
14011 (assoc-ref inputs "netcdf"))))))))
14012 (home-page "https://bitbucket.org/khinsen/scientificpython")
14013 (synopsis "Python modules for scientific computing")
14014 (description "ScientificPython is a collection of Python modules that are
14015 useful for scientific computing. Most modules are rather general (Geometry,
14016 physical units, automatic derivatives, ...) whereas others are more
14017 domain-specific (e.g. netCDF and PDB support). The library is currently
14018 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14019 (license license:cecill-c)))
14020
14021 (define-public python2-mmtk
14022 (package
14023 (name "python2-mmtk")
14024 (version "2.7.11")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (string-append "https://bitbucket.org/khinsen/"
14029 "mmtk/downloads/MMTK-" version ".tar.gz"))
14030 (file-name (string-append "MMTK-" version ".tar.gz"))
14031 (sha256
14032 (base32
14033 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14034 (build-system python-build-system)
14035 (native-inputs
14036 `(("netcdf" ,netcdf)))
14037 (propagated-inputs
14038 `(("python-scientific" ,python2-scientific)
14039 ("python-tkinter" ,python-2 "tk")))
14040 (arguments
14041 `(#:python ,python-2
14042 #:tests? #f
14043 #:phases
14044 (modify-phases %standard-phases
14045 (add-before 'build 'includes-from-scientific
14046 (lambda* (#:key inputs #:allow-other-keys)
14047 (mkdir-p "Include/Scientific")
14048 (copy-recursively
14049 (string-append
14050 (assoc-ref inputs "python-scientific")
14051 "/include/python2.7/Scientific")
14052 "Include/Scientific"))))))
14053 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14054 (synopsis "Python library for molecular simulation")
14055 (description "MMTK is a library for molecular simulations with an emphasis
14056 on biomolecules. It provides widely used methods such as Molecular Dynamics
14057 and normal mode analysis, but also basic routines for implementing new methods
14058 for simulation and analysis. The library is currently not actively maintained
14059 and works only with Python 2 and NumPy < 1.9.")
14060 (license license:cecill-c)))
14061
14062 (define-public python-phonenumbers
14063 (package
14064 (name "python-phonenumbers")
14065 (version "8.9.1")
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "phonenumbers" version))
14070 (sha256
14071 (base32
14072 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14073 (build-system python-build-system)
14074 (home-page
14075 "https://github.com/daviddrysdale/python-phonenumbers")
14076 (synopsis
14077 "Python library for dealing with international phone numbers")
14078 (description
14079 "This package provides a Python port of Google's libphonenumber library.")
14080 (license license:asl2.0)))
14081
14082 (define-public python2-phonenumbers
14083 (package-with-python2 python-phonenumbers))
14084
14085 (define-public python-send2trash
14086 (package
14087 (name "python-send2trash")
14088 (version "1.5.0")
14089 (source
14090 (origin (method git-fetch)
14091 ;; Source tarball on PyPI doesn't include tests.
14092 (uri (git-reference
14093 (url "https://github.com/hsoft/send2trash.git")
14094 (commit version)))
14095 (file-name (git-file-name name version))
14096 (sha256
14097 (base32
14098 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14099 (build-system python-build-system)
14100 (arguments
14101 '(#:phases
14102 (modify-phases %standard-phases
14103 (add-before 'check 'pre-check
14104 (lambda _
14105 (mkdir-p "/tmp/foo")
14106 (setenv "HOME" "/tmp/foo")
14107 #t)))))
14108 (home-page "https://github.com/hsoft/send2trash")
14109 (synopsis "Send files to the user's @file{~/Trash} directory")
14110 (description "This package provides a Python library to send files to the
14111 user's @file{~/Trash} directory.")
14112 (properties `((python2-variant . ,(delay python2-send2trash))))
14113 (license license:bsd-3)))
14114
14115 (define-public python2-send2trash
14116 (package
14117 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14118 (arguments
14119 (substitute-keyword-arguments (package-arguments python-send2trash)
14120 ((#:phases phases)
14121 `(modify-phases ,phases
14122 (add-before 'check 'setenv
14123 (lambda _
14124 (setenv "PYTHONPATH"
14125 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14126 #t))))))))
14127
14128 (define-public python-yapf
14129 (package
14130 (name "python-yapf")
14131 (version "0.24.0")
14132 (source
14133 (origin
14134 (method url-fetch)
14135 (uri (pypi-uri "yapf" version))
14136 (sha256
14137 (base32
14138 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14139 (build-system python-build-system)
14140 (home-page "https://github.com/google/yapf")
14141 (synopsis "Formatter for Python code")
14142 (description "YAPF is a formatter for Python code. It's based off of
14143 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14144 takes the code and reformats it to the best formatting that conforms to the
14145 style guide, even if the original code didn't violate the style guide.")
14146 (license license:asl2.0)))
14147
14148 (define-public python2-yapf
14149 (package-with-python2 python-yapf))
14150
14151 (define-public python-gyp
14152 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14153 (revision "0"))
14154 (package
14155 (name "python-gyp")
14156 ;; Google does not release versions,
14157 ;; based on second most recent commit date.
14158 (version (git-version "0.0.0" revision commit))
14159 (source
14160 (origin
14161 ;; Google does not release tarballs,
14162 ;; git checkout is needed.
14163 (method git-fetch)
14164 (uri (git-reference
14165 (url "https://chromium.googlesource.com/external/gyp")
14166 (commit commit)))
14167 (file-name (git-file-name name version))
14168 (sha256
14169 (base32
14170 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14171 (build-system python-build-system)
14172 (home-page "https://gyp.gsrc.io/")
14173 (synopsis "GYP is a Meta-Build system")
14174 (description
14175 "GYP builds build systems for large, cross platform applications.
14176 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14177 files, and Makefiles.")
14178 (license license:bsd-3))))
14179
14180 (define-public python2-gyp
14181 (package-with-python2 python-gyp))
14182
14183 (define-public python-whatever
14184 (package
14185 (name "python-whatever")
14186 (version "0.5")
14187 (source
14188 (origin
14189 (method url-fetch)
14190 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14191 ".tar.gz"))
14192 (sha256
14193 (base32
14194 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14195 (file-name (string-append name "-" version ".tar.gz"))))
14196 (build-system python-build-system)
14197 (arguments
14198 `(#:phases
14199 (modify-phases %standard-phases
14200 (replace 'check
14201 (lambda _
14202 (invoke "py.test"))))))
14203 (native-inputs
14204 `(("python-pytest" ,python-pytest)))
14205 (home-page "http://github.com/Suor/whatever")
14206 (synopsis "Make anonymous functions by partial application of operators")
14207 (description "@code{whatever} provides an easy way to make anonymous
14208 functions by partial application of operators.")
14209 (license license:bsd-3)))
14210
14211 (define-public python2-whatever
14212 (package-with-python2 python-whatever))
14213
14214 (define-public python-funcy
14215 (package
14216 (name "python-funcy")
14217 (version "1.11")
14218 (source
14219 (origin
14220 (method git-fetch)
14221 (uri (git-reference
14222 (url "https://github.com/Suor/funcy.git")
14223 (commit version)))
14224 (sha256
14225 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14226 (file-name (git-file-name name version))))
14227 (build-system python-build-system)
14228 (arguments
14229 `(#:phases
14230 (modify-phases %standard-phases
14231 (replace 'check
14232 (lambda _
14233 (invoke "py.test"))))))
14234 (native-inputs
14235 `(("python-pytest" ,python-pytest)
14236 ("python-whatever" ,python-whatever)))
14237 (home-page "http://github.com/Suor/funcy")
14238 (synopsis "Functional tools")
14239 (description "@code{funcy} is a library that provides functional tools.
14240 Examples are:
14241 @enumerate
14242 @item merge - Merges collections of the same type
14243 @item walk - Type-preserving map
14244 @item select - Selects a part of a collection
14245 @item take - Takes the first n items of a collection
14246 @item first - Takes the first item of a collection
14247 @item remove - Predicated-removes items of a collection
14248 @item concat - Concatenates two collections
14249 @item flatten - Flattens a collection with subcollections
14250 @item distinct - Returns only distinct items
14251 @item split - Predicated-splits a collection
14252 @item split_at - Splits a collection at a given item
14253 @item group_by - Groups items by group
14254 @item pairwise - Pairs off adjacent items
14255 @item partial - Partially-applies a function
14256 @item curry - Curries a function
14257 @item compose - Composes functions
14258 @item complement - Complements a predicate
14259 @item all_fn - \"all\" with predicate
14260 @end enumerate")
14261 (license license:bsd-3)))
14262
14263 (define-public python2-funcy
14264 (package-with-python2 python-funcy))
14265
14266 (define-public python-isoweek
14267 (package
14268 (name "python-isoweek")
14269 (version "1.3.3")
14270 (source
14271 (origin
14272 (method url-fetch)
14273 (uri (pypi-uri "isoweek" version))
14274 (sha256
14275 (base32
14276 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14277 (build-system python-build-system)
14278 (home-page "https://github.com/gisle/isoweek")
14279 (synopsis "Objects representing a week")
14280 (description "The @code{isoweek} module provide the class Week that
14281 implements the week definition of ISO 8601. This standard also defines
14282 a notation for identifying weeks; yyyyWww (where the W is a literal).
14283 Week instances stringify to this form.")
14284 (license license:bsd-3)))
14285
14286 (define-public python2-isoweek
14287 (package-with-python2 python-isoweek))
14288
14289 (define-public python-tokenize-rt
14290 (package
14291 (name "python-tokenize-rt")
14292 (version "2.0.1")
14293 (source
14294 (origin
14295 (method url-fetch)
14296 (uri (pypi-uri "tokenize-rt" version))
14297 (sha256
14298 (base32
14299 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14300 (build-system python-build-system)
14301 (home-page "https://github.com/asottile/tokenize-rt")
14302 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14303 (description
14304 "This Python library is a wrapper around @code{tokenize} from the Python
14305 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14306 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14307 and @code{tokens_to_src} to roundtrip.")
14308 (license license:expat)))
14309
14310 (define-public python-future-fstrings
14311 (package
14312 (name "python-future-fstrings")
14313 (version "0.4.1")
14314 (source
14315 (origin
14316 (method url-fetch)
14317 (uri (pypi-uri "future_fstrings" version))
14318 (sha256
14319 (base32
14320 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14321 (build-system python-build-system)
14322 (propagated-inputs
14323 `(("python-tokenize-rt" ,python-tokenize-rt)))
14324 (home-page "https://github.com/asottile/future-fstrings")
14325 (synopsis "Backport of fstrings to Python < 3.6")
14326 (description
14327 "This package provides a UTF-8 compatible encoding
14328 @code{future_fstrings}, which performs source manipulation. It decodes the
14329 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14330 @code{f} strings.")
14331 (license license:expat)))
14332
14333 (define-public python-typed-ast
14334 (package
14335 (name "python-typed-ast")
14336 (version "1.3.5")
14337 (source
14338 (origin
14339 (method url-fetch)
14340 (uri (pypi-uri "typed-ast" version))
14341 (sha256
14342 (base32
14343 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14344 (build-system python-build-system)
14345 (arguments
14346 `(#:modules ((guix build utils)
14347 (guix build python-build-system)
14348 (ice-9 ftw)
14349 (srfi srfi-1)
14350 (srfi srfi-26))
14351 #:phases
14352 (modify-phases %standard-phases
14353 (replace 'check
14354 (lambda _
14355 (let ((cwd (getcwd)))
14356 (setenv "PYTHONPATH"
14357 (string-append cwd "/build/"
14358 (find (cut string-prefix? "lib" <>)
14359 (scandir (string-append cwd "/build")))
14360 ":"
14361 (getenv "PYTHONPATH"))))
14362 (invoke "pytest")
14363 #t)))))
14364 (native-inputs `(("python-pytest" ,python-pytest)))
14365 (home-page "https://github.com/python/typed_ast")
14366 (synopsis "Fork of Python @code{ast} modules with type comment support")
14367 (description "This package provides a parser similar to the standard
14368 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14369 include PEP 484 type comments and are independent of the version of Python
14370 under which they are run. The @code{typed_ast} parsers produce the standard
14371 Python AST (plus type comments), and are both fast and correct, as they are
14372 based on the CPython 2.7 and 3.7 parsers.")
14373 ;; See the file "LICENSE" for the details.
14374 (license (list license:psfl
14375 license:asl2.0
14376 license:expat)))) ;ast27/Parser/spark.py
14377
14378 (define-public python-typing
14379 (package
14380 (name "python-typing")
14381 (version "3.6.6")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "typing" version))
14386 (sha256
14387 (base32
14388 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14389 (build-system python-build-system)
14390 (home-page "https://docs.python.org/3/library/typing.html")
14391 (synopsis "Type hints for Python")
14392 (description "This is a backport of the standard library @code{typing}
14393 module to Python versions older than 3.5. Typing defines a standard notation
14394 for Python function and variable type annotations. The notation can be used
14395 for documenting code in a concise, standard format, and it has been designed
14396 to also be used by static and runtime type checkers, static analyzers, IDEs
14397 and other tools.")
14398 (license license:psfl)))
14399
14400 (define-public python2-typing
14401 (package-with-python2 python-typing))
14402
14403 (define-public python-typing-extensions
14404 (package
14405 (name "python-typing-extensions")
14406 (version "3.7.2")
14407 (source
14408 (origin
14409 (method url-fetch)
14410 (uri (pypi-uri "typing_extensions" version))
14411 (sha256
14412 (base32
14413 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14414 (build-system python-build-system)
14415 (home-page
14416 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14417 (synopsis "Experimental type hints for Python")
14418 (description
14419 "The typing_extensions module contains additional @code{typing} hints not
14420 yet present in the of the @code{typing} standard library.
14421 Included are implementations of:
14422 @enumerate
14423 @item ClassVar
14424 @item ContextManager
14425 @item Counter
14426 @item DefaultDict
14427 @item Deque
14428 @item NewType
14429 @item NoReturn
14430 @item overload
14431 @item Protocol
14432 @item runtime
14433 @item Text
14434 @item Type
14435 @item TYPE_CHECKING
14436 @item AsyncGenerator
14437 @end enumerate\n")
14438 (license license:psfl)))
14439
14440 (define-public bpython
14441 (package
14442 (name "bpython")
14443 (version "0.17.1")
14444 (source
14445 (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "bpython" version))
14448 (sha256
14449 (base32
14450 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14451 (build-system python-build-system)
14452 (arguments
14453 `(#:phases
14454 (modify-phases %standard-phases
14455 (add-after 'unpack 'remove-failing-test
14456 (lambda _
14457 ;; Remove failing test. FIXME: make it pass
14458 (delete-file "bpython/test/test_args.py")
14459 #t))
14460 (add-after 'wrap 'add-aliases
14461 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14462 (lambda* (#:key outputs #:allow-other-keys)
14463 (let ((out (assoc-ref outputs "out")))
14464 (for-each
14465 (lambda (old new)
14466 (symlink old (string-append out "/bin/" new)))
14467 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14468 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14469 #t)))))
14470 (propagated-inputs
14471 `(("python-pygments" ,python-pygments)
14472 ("python-requests" ,python-requests)
14473 ("python-babel" ,python-babel) ; optional, for internationalization
14474 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14475 ("python-greenlet" ,python-greenlet)
14476 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14477 ("python-six" ,python-six)))
14478 (native-inputs
14479 `(("python-sphinx" ,python-sphinx)
14480 ("python-mock" ,python-mock)))
14481 (home-page "https://bpython-interpreter.org/")
14482 (synopsis "Fancy interface to the Python interpreter")
14483 (description "Bpython is a fancy interface to the Python
14484 interpreter. bpython's main features are
14485
14486 @enumerate
14487 @item in-line syntax highlighting,
14488 @item readline-like autocomplete with suggestions displayed as you type,
14489 @item expected parameter list for any Python function,
14490 @item \"rewind\" function to pop the last line of code from memory and
14491 re-evaluate,
14492 @item send the code you've entered off to a pastebin,
14493 @item save the code you've entered to a file, and
14494 @item auto-indentation.
14495 @end enumerate")
14496 (license license:expat)))
14497
14498 (define-public bpython2
14499 (let ((base (package-with-python2
14500 (strip-python2-variant bpython))))
14501 (package (inherit base)
14502 (name "bpython2")
14503 (arguments
14504 `(#:python ,python-2
14505 #:phases
14506 (modify-phases %standard-phases
14507 (add-after 'unpack 'remove-failing-test
14508 (lambda _
14509 ;; Remove failing test. FIXME: make it pass
14510 (delete-file "bpython/test/test_args.py")
14511 ;; Disable failing test-cases (renaming inhibits they are
14512 ;; discovered)
14513 (substitute* "bpython/test/test_curtsies_repl.py"
14514 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14515 (string-append a "xxx_off_" b))
14516 (("^(\\s*def )(test_complex\\W)" _ a b)
14517 (string-append a "xxx_off_" b)))
14518 #t))
14519 (add-before 'build 'rename-scripts
14520 ;; rename the scripts to bypthon2, bpdb2, etc.
14521 (lambda _
14522 (substitute* "setup.py"
14523 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14524 (string-append name "2" rest "\n"))
14525 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14526 (string-append name "2" (or sub "") rest "\n")))
14527 #t))))))))
14528
14529 (define-public python-pyinotify
14530 (package
14531 (name "python-pyinotify")
14532 (version "0.9.6")
14533 (source (origin
14534 (method url-fetch)
14535 (uri (pypi-uri "pyinotify" version))
14536 (sha256
14537 (base32
14538 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14539 (build-system python-build-system)
14540 (arguments `(#:tests? #f)) ;no tests
14541 (home-page "https://github.com/seb-m/pyinotify")
14542 (synopsis "Python library for monitoring inotify events")
14543 (description
14544 "@code{pyinotify} provides a Python interface for monitoring
14545 file system events on Linux.")
14546 (license license:expat)))
14547
14548 (define-public python2-pyinotify
14549 (package-with-python2 python-pyinotify))
14550
14551 ;; Ada parser uses this version.
14552 (define-public python2-quex-0.67.3
14553 (package
14554 (name "python2-quex")
14555 (version "0.67.3")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14560 (version-major+minor version)
14561 "/quex-" version ".zip"))
14562 (sha256
14563 (base32
14564 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14565 (build-system python-build-system)
14566 (native-inputs
14567 `(("unzip" ,unzip)))
14568 (arguments
14569 `(#:python ,python-2
14570 #:tests? #f
14571 #:phases
14572 (modify-phases %standard-phases
14573 (delete 'configure)
14574 (delete 'build)
14575 (replace 'install
14576 (lambda* (#:key outputs #:allow-other-keys)
14577 (let* ((out (assoc-ref outputs "out"))
14578 (share/quex (string-append out "/share/quex"))
14579 (bin (string-append out "/bin")))
14580 (copy-recursively "." share/quex)
14581 (mkdir-p bin)
14582 (symlink (string-append share/quex "/quex-exe.py")
14583 (string-append bin "/quex"))
14584 #t))))))
14585 (native-search-paths
14586 (list (search-path-specification
14587 (variable "QUEX_PATH")
14588 (files '("share/quex")))))
14589 (home-page "http://quex.sourceforge.net/")
14590 (synopsis "Lexical analyzer generator in Python")
14591 (description "@code{quex} is a lexical analyzer generator in Python.")
14592 (license license:lgpl2.1+))) ; Non-military
14593
14594 (define-public python2-quex
14595 (package (inherit python2-quex-0.67.3)
14596 (name "python2-quex")
14597 (version "0.68.1")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14602 (sha256
14603 (base32
14604 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14605 (file-name (string-append name "-" version ".tar.gz"))))))
14606
14607 (define-public python-more-itertools
14608 (package
14609 (name "python-more-itertools")
14610 (version "7.1.0")
14611 (source
14612 (origin
14613 (method url-fetch)
14614 (uri (pypi-uri "more-itertools" version))
14615 (sha256
14616 (base32
14617 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14618 (build-system python-build-system)
14619 (home-page "https://github.com/erikrose/more-itertools")
14620 (synopsis "More routines for operating on iterables, beyond itertools")
14621 (description "Python's built-in @code{itertools} module implements a
14622 number of iterator building blocks inspired by constructs from APL, Haskell,
14623 and SML. @code{more-itertools} includes additional building blocks for
14624 working with iterables.")
14625 (properties `((python2-variant . ,(delay python2-more-itertools))))
14626 (license license:expat)))
14627
14628 ;; The 5.x series are the last versions supporting Python 2.7.
14629 (define-public python2-more-itertools
14630 (package
14631 (inherit python-more-itertools)
14632 (name "python2-more-itertools")
14633 (version "5.0.0")
14634 (source (origin
14635 (method url-fetch)
14636 (uri (pypi-uri "more-itertools" version))
14637 (sha256
14638 (base32
14639 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14640 (arguments
14641 `(#:python ,python2-minimal))
14642 (propagated-inputs
14643 `(("python2-six" ,python2-six-bootstrap)))))
14644
14645 (define-public python-latexcodec
14646 (package
14647 (name "python-latexcodec")
14648 (version "1.0.6")
14649 (source
14650 (origin
14651 (method url-fetch)
14652 (uri (pypi-uri "latexcodec" version))
14653 (sha256
14654 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14655 (build-system python-build-system)
14656 (inputs
14657 `(("python-six" ,python-six)))
14658 (home-page "https://readthedocs.org/projects/latexcodec/")
14659 (synopsis "Work with LaTeX code in Python")
14660 (description "Lexer and codec to work with LaTeX code in Python.")
14661 (license license:expat)))
14662
14663 (define-public python-pybtex
14664 (package
14665 (name "python-pybtex")
14666 (version "0.21")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "pybtex" version))
14671 (sha256
14672 (base32
14673 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14674 (build-system python-build-system)
14675 (native-inputs
14676 `(("python-nose" ,python-nose)))
14677 (inputs
14678 `(("python-latexcodec" ,python-latexcodec)
14679 ("python-pyyaml" ,python-pyyaml)
14680 ("python-six" ,python-six)))
14681 (arguments
14682 `(#:test-target "nosetests"))
14683 (home-page "https://pybtex.org/")
14684 (synopsis "BibTeX-compatible bibliography processor")
14685 (description "Pybtex is a BibTeX-compatible bibliography processor written
14686 in Python. You can simply type pybtex instead of bibtex.")
14687 (license license:expat)))
14688
14689 (define-public python-onetimepass
14690 (package
14691 (name "python-onetimepass")
14692 (version "1.0.1")
14693 (source
14694 (origin
14695 (method url-fetch)
14696 (uri (pypi-uri "onetimepass" version))
14697 (sha256
14698 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14699 (build-system python-build-system)
14700 (propagated-inputs `(("python-six" ,python-six)))
14701 (home-page "https://github.com/tadeck/onetimepass/")
14702 (synopsis "One-time password library")
14703 (description "Python one-time password library for HMAC-based (HOTP) and
14704 time-based (TOTP) passwords.")
14705 (license license:expat)))
14706
14707 (define-public python-parso
14708 (package
14709 (name "python-parso")
14710 (version "0.3.1")
14711 (source
14712 (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "parso" version))
14715 (sha256
14716 (base32
14717 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14718 (native-inputs
14719 `(("python-pytest" ,python-pytest)))
14720 (build-system python-build-system)
14721 (home-page "https://github.com/davidhalter/parso")
14722 (synopsis "Python Parser")
14723 (description "Parso is a Python parser that supports error recovery and
14724 round-trip parsing for different Python versions (in multiple Python versions).
14725 Parso is also able to list multiple syntax errors in your Python file.")
14726 (license license:expat)))
14727
14728 (define-public python2-parso
14729 (package-with-python2 python-parso))
14730
14731 (define-public python-async-generator
14732 (package
14733 (name "python-async-generator")
14734 (version "1.10")
14735 (source
14736 (origin
14737 (method url-fetch)
14738 (uri (pypi-uri "async_generator" version))
14739 (sha256
14740 (base32
14741 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14742 (build-system python-build-system)
14743 (native-inputs
14744 `(("python-pytest" ,python-pytest)))
14745 (home-page "https://github.com/python-trio/async_generator")
14746 (synopsis "Async generators and context managers for Python 3.5+")
14747 (description "@code{async_generator} back-ports Python 3.6's native async
14748 generators and Python 3.7's context managers into Python 3.5.")
14749 ;; Dual licensed.
14750 (license (list license:expat license:asl2.0))))
14751
14752 (define-public python-async-timeout
14753 (package
14754 (name "python-async-timeout")
14755 (version "3.0.1")
14756 (source
14757 (origin
14758 (method url-fetch)
14759 (uri (pypi-uri "async-timeout" version))
14760 (sha256
14761 (base32
14762 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14763 (build-system python-build-system)
14764 (home-page "https://github.com/aio-libs/async_timeout/")
14765 (synopsis "Timeout context manager for asyncio programs")
14766 (description "@code{async-timeout} provides a timeout timeout context
14767 manager compatible with @code{asyncio}.")
14768 (license license:asl2.0)))
14769
14770 (define-public python-glob2
14771 (package
14772 (name "python-glob2")
14773 (version "0.6")
14774 (source
14775 (origin
14776 (method git-fetch)
14777 (uri (git-reference
14778 (url "https://github.com/miracle2k/python-glob2.git")
14779 (commit version)))
14780 (file-name (git-file-name name version))
14781 (sha256
14782 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14783 (build-system python-build-system)
14784 (home-page "https://github.com/miracle2k/python-glob2/")
14785 (synopsis "Extended Version of the python buildin glob module")
14786 (description "This is an extended version of the Python
14787 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14788 adds:
14789
14790 @itemize
14791 @item The ability to capture the text matched by glob patterns, and return
14792 those matches alongside the file names.
14793 @item A recursive @code{**} globbing syntax, akin for example to the
14794 @code{globstar} option of Bash.
14795 @item The ability to replace the file system functions used, in order to glob
14796 on virtual file systems.
14797 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14798 @end itemize
14799
14800 Glob2 currently based on the glob code from Python 3.3.1.")
14801 (license license:bsd-2)))
14802
14803 (define-public python2-glob2
14804 (package-with-python2 python-glob2))
14805
14806 (define-public python-gipc
14807 (package
14808 (name "python-gipc")
14809 (version "0.6.0")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "gipc" version ".zip"))
14814 (sha256
14815 (base32
14816 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14817 (build-system python-build-system)
14818 (native-inputs
14819 `(("unzip" ,unzip)))
14820 (propagated-inputs
14821 `(("python-gevent" ,python-gevent)))
14822 (home-page "http://gehrcke.de/gipc")
14823 (synopsis "Child process management in the context of gevent")
14824 (description "Usage of Python's multiprocessing package in a
14825 gevent-powered application may raise problems. With @code{gipc},
14826 process-based child processes can safely be created anywhere within a
14827 gevent-powered application.")
14828 (license license:expat)))
14829
14830 (define-public python2-gipc
14831 (package-with-python2 python-gipc))
14832
14833 (define-public python-fusepy
14834 (package
14835 (name "python-fusepy")
14836 (version "2.0.4")
14837 (source
14838 (origin
14839 (method url-fetch)
14840 (uri (pypi-uri "fusepy" version))
14841 (sha256
14842 (base32
14843 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14844 (build-system python-build-system)
14845 (arguments
14846 `(#:phases
14847 (modify-phases %standard-phases
14848 (add-before 'build 'set-library-file-name
14849 (lambda* (#:key inputs #:allow-other-keys)
14850 (let ((fuse (assoc-ref inputs "fuse")))
14851 (substitute* "fuse.py"
14852 (("find_library\\('fuse'\\)")
14853 (string-append "'" fuse "/lib/libfuse.so'")))
14854 #t))))))
14855 (propagated-inputs
14856 `(("fuse" ,fuse)))
14857 (home-page "https://github.com/fusepy/fusepy")
14858 (synopsis "Simple ctypes bindings for FUSE")
14859 (description "Python module that provides a simple interface to FUSE and
14860 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14861 (license license:isc)))
14862
14863 (define-public python2-fusepy
14864 (package-with-python2 python-fusepy))
14865
14866 (define-public python2-gdrivefs
14867 (package
14868 (name "python2-gdrivefs")
14869 (version "0.14.9")
14870 (source
14871 (origin
14872 (method url-fetch)
14873 (uri (pypi-uri "gdrivefs" version))
14874 (sha256
14875 (base32
14876 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14877 (build-system python-build-system)
14878 (arguments
14879 `(#:python ,python-2
14880 #:phases
14881 (modify-phases %standard-phases
14882 (add-before 'build 'patch-setup-py
14883 (lambda _
14884 ;; Update requirements from dependency==version
14885 ;; to dependency>=version
14886 (substitute* "gdrivefs/resources/requirements.txt"
14887 (("==") ">="))
14888 #t)))))
14889 (native-inputs
14890 `(("python2-gipc" ,python2-gipc)
14891 ("python2-gevent" ,python2-gevent)
14892 ("python2-greenlet" ,python2-greenlet)
14893 ("python2-httplib2" ,python2-httplib2)
14894 ("python2-uritemplate" ,python2-uritemplate)
14895 ("python2-oauth2client" ,python2-oauth2client)
14896 ("python2-six" ,python2-six)))
14897 (propagated-inputs
14898 `(("python2-dateutil" ,python2-dateutil)
14899 ("python2-fusepy" ,python2-fusepy)
14900 ("python2-google-api-client" ,python2-google-api-client)))
14901 (home-page "https://github.com/dsoprea/GDriveFS")
14902 (synopsis "Mount Google Drive as a local file system")
14903 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14904 under Python 2.7.")
14905 (license license:gpl2)))
14906
14907 (define-public pybind11
14908 (package
14909 (name "pybind11")
14910 (version "2.3.0")
14911 (source (origin
14912 (method git-fetch)
14913 (uri (git-reference
14914 (url "https://github.com/pybind/pybind11.git")
14915 (commit (string-append "v" version))))
14916 (sha256
14917 (base32
14918 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
14919 (file-name (git-file-name name version))))
14920 (build-system cmake-build-system)
14921 (native-inputs
14922 `(("python" ,python)
14923 ("python-pytest" ,python-pytest)))
14924 (arguments
14925 `(#:test-target "check"))
14926 (home-page "https://github.com/pybind/pybind11/")
14927 (synopsis "Seamless operability between C++11 and Python")
14928 (description "pybind11 is a lightweight header-only library that exposes
14929 C++ types in Python and vice versa, mainly to create Python bindings of
14930 existing C++ code. Its goals and syntax are similar to the excellent
14931 Boost.Python library by David Abrahams: to minimize boilerplate code in
14932 traditional extension modules by inferring type information using compile-time
14933 introspection.")
14934 (license license:expat)))
14935
14936 (define-public python-fasteners
14937 (package
14938 (name "python-fasteners")
14939 (version "0.14.1")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "fasteners" version))
14944 (sha256
14945 (base32
14946 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14947 (build-system python-build-system)
14948 (propagated-inputs
14949 `(("python-monotonic" ,python-monotonic)
14950 ("python-six" ,python-six)
14951 ("python-testtools" ,python-testtools)))
14952 (home-page "https://github.com/harlowja/fasteners")
14953 (synopsis "Python package that provides useful locks")
14954 (description
14955 "This package provides a Python program that provides following locks:
14956
14957 @itemize
14958 @item Locking decorator
14959 @item Reader-writer locks
14960 @item Inter-process locks
14961 @item Generic helpers
14962 @end itemize\n")
14963 (properties `((python2-variant . ,(delay python2-fasteners))))
14964 (license license:asl2.0)))
14965
14966 (define-public python2-fasteners
14967 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14968 (package
14969 (inherit base)
14970 (propagated-inputs
14971 `(("python2-futures" ,python2-futures)
14972 ,@(package-propagated-inputs base))))))
14973
14974 (define-public python-requests-file
14975 (package
14976 (name "python-requests-file")
14977 (version "1.4.3")
14978 (source
14979 (origin
14980 (method url-fetch)
14981 (uri (pypi-uri "requests-file" version))
14982 (sha256
14983 (base32
14984 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14985 (build-system python-build-system)
14986 (propagated-inputs
14987 `(("python-requests" ,python-requests)
14988 ("python-six" ,python-six)))
14989 (home-page
14990 "https://github.com/dashea/requests-file")
14991 (synopsis "File transport adapter for Requests")
14992 (description
14993 "Requests-File is a transport adapter for use with the Requests Python
14994 library to allow local file system access via @code{file://} URLs.")
14995 (license license:asl2.0)))
14996
14997 (define-public python2-requests-file
14998 (package-with-python2 python-requests-file))
14999
15000 (define-public python-tldextract
15001 (package
15002 (name "python-tldextract")
15003 (version "2.2.0")
15004 (source
15005 (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "tldextract" version))
15008 (sha256
15009 (base32
15010 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15011 (build-system python-build-system)
15012 (native-inputs
15013 `(("python-pytest" ,python-pytest)
15014 ("python-responses" ,python-responses)))
15015 (propagated-inputs
15016 `(("python-idna" ,python-idna)
15017 ("python-requests" ,python-requests)
15018 ("python-requests-file" ,python-requests-file)))
15019 (home-page
15020 "https://github.com/john-kurkowski/tldextract")
15021 (synopsis
15022 "Separate the TLD from the registered domain and subdomains of a URL")
15023 (description
15024 "TLDExtract accurately separates the TLD from the registered domain and
15025 subdomains of a URL, using the Public Suffix List. By default, this includes
15026 the public ICANN TLDs and their exceptions. It can optionally support the
15027 Public Suffix List's private domains as well.")
15028 (license license:bsd-3)))
15029
15030 (define-public python2-tldextract
15031 (package-with-python2 python-tldextract))
15032
15033 (define-public python-pynamecheap
15034 (package
15035 (name "python-pynamecheap")
15036 (version "0.0.3")
15037 (source
15038 (origin
15039 (method url-fetch)
15040 (uri (pypi-uri "PyNamecheap" version))
15041 (sha256
15042 (base32
15043 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15044 (build-system python-build-system)
15045 (propagated-inputs
15046 `(("python-requests" ,python-requests)))
15047 (home-page
15048 "https://github.com/Bemmu/PyNamecheap")
15049 (synopsis
15050 "Namecheap API client in Python")
15051 (description
15052 "PyNamecheap is a Namecheap API client in Python.")
15053 (license license:expat)))
15054
15055 (define-public python2-pynamecheap
15056 (package-with-python2 python-pynamecheap))
15057
15058 (define-public python-dns-lexicon
15059 (package
15060 (name "python-dns-lexicon")
15061 (version "2.4.0")
15062 (source
15063 (origin
15064 (method url-fetch)
15065 (uri (pypi-uri "dns-lexicon" version))
15066 (sha256
15067 (base32
15068 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15069 (build-system python-build-system)
15070 (arguments
15071 `(#:tests? #f)) ;requires internet access
15072 (propagated-inputs
15073 `(("python-future" ,python-future)
15074 ("python-pynamecheap" ,python-pynamecheap)
15075 ("python-requests" ,python-requests)
15076 ("python-tldextract" ,python-tldextract)
15077 ("python-urllib3" ,python-urllib3)))
15078 (home-page "https://github.com/AnalogJ/lexicon")
15079 (synopsis
15080 "Manipulate DNS records on various DNS providers")
15081 (description
15082 "Lexicon provides a way to manipulate DNS records on multiple DNS
15083 providers in a standardized way. It has a CLI but it can also be used as a
15084 Python library. It was designed to be used in automation, specifically with
15085 Let's Encrypt.")
15086 (license license:expat)))
15087
15088 (define-public python2-dns-lexicon
15089 (package-with-python2 python-dns-lexicon))
15090
15091 (define-public python-commandlines
15092 (package
15093 (name "python-commandlines")
15094 (version "0.4.1")
15095 (source
15096 (origin
15097 (method url-fetch)
15098 (uri (pypi-uri "commandlines" version))
15099 (sha256
15100 (base32
15101 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15102 (build-system python-build-system)
15103 (home-page "https://github.com/chrissimpkins/commandlines")
15104 (synopsis "Command line argument to object parsing library")
15105 (description
15106 "@code{Commandlines} is a Python library for command line application
15107 development that supports command line argument parsing, command string
15108 validation testing and application logic.")
15109 (license license:expat)))
15110
15111 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15112 ;; python-numba. They have a very unflexible relationship.
15113 (define-public python-numba
15114 (package
15115 (name "python-numba")
15116 (version "0.42.0")
15117 (source
15118 (origin
15119 (method url-fetch)
15120 (uri (pypi-uri "numba" version))
15121 (sha256
15122 (base32
15123 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15124 (build-system python-build-system)
15125 (arguments
15126 `(#:modules ((guix build utils)
15127 (guix build python-build-system)
15128 (ice-9 ftw)
15129 (srfi srfi-1)
15130 (srfi srfi-26))
15131 #:phases
15132 (modify-phases %standard-phases
15133 (add-after 'unpack 'disable-proprietary-features
15134 (lambda _
15135 (setenv "NUMBA_DISABLE_HSA" "1")
15136 (setenv "NUMBA_DISABLE_CUDA" "1")
15137 #t))
15138 (add-after 'unpack 'remove-failing-tests
15139 (lambda _
15140 ;; FIXME: these tests fail for unknown reasons:
15141 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15142 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15143 (substitute* "numba/tests/test_dispatcher.py"
15144 (("def test(_non_writable_pycache)" _ m)
15145 (string-append "def guix_skip" m))
15146 (("def test(_non_creatable_pycache)" _ m)
15147 (string-append "def guix_skip" m))
15148 (("def test(_frozen)" _ m)
15149 (string-append "def guix_skip" m)))
15150
15151 ;; These tests fail because we don't run the tests from the build
15152 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15153 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15154 (substitute* "numba/tests/test_pycc.py"
15155 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15156 (string-append "def guix_skip" m)))
15157 #t))
15158 (replace 'check
15159 (lambda _
15160 (let ((cwd (getcwd)))
15161 (setenv "PYTHONPATH"
15162 (string-append cwd "/build/"
15163 (find (cut string-prefix? "lib" <>)
15164 (scandir (string-append cwd "/build")))
15165 ":"
15166 (getenv "PYTHONPATH")))
15167 ;; Something is wrong with the PYTHONPATH when running the
15168 ;; tests from the build directory, as it complains about not being
15169 ;; able to import certain modules.
15170 (with-directory-excursion "/tmp"
15171 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15172 #t)))))
15173 (propagated-inputs
15174 `(("python-llvmlite" ,python-llvmlite)
15175 ("python-numpy" ,python-numpy)
15176 ("python-singledispatch" ,python-singledispatch)))
15177 ;; Needed for tests.
15178 (inputs
15179 `(("python-jinja2" ,python-jinja2)
15180 ("python-pygments" ,python-pygments)))
15181 (home-page "https://numba.pydata.org")
15182 (synopsis "Compile Python code using LLVM")
15183 (description "Numba gives you the power to speed up your applications with
15184 high performance functions written directly in Python. With a few
15185 annotations, array-oriented and math-heavy Python code can be just-in-time
15186 compiled to native machine instructions, similar in performance to C, C++ and
15187 Fortran, without having to switch languages or Python interpreters.
15188
15189 Numba works by generating optimized machine code using the LLVM compiler
15190 infrastructure at import time, runtime, or statically (using the included pycc
15191 tool).")
15192 (license license:bsd-3)))
15193
15194 (define-public python-anndata
15195 (package
15196 (name "python-anndata")
15197 (version "0.6.18")
15198 (source
15199 (origin
15200 (method url-fetch)
15201 (uri (pypi-uri "anndata" version))
15202 (sha256
15203 (base32
15204 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15205 (build-system python-build-system)
15206 (propagated-inputs
15207 `(("python-h5py" ,python-h5py)
15208 ("python-natsort" ,python-natsort)
15209 ("python-pandas" ,python-pandas)
15210 ("python-scipy" ,python-scipy)))
15211 (home-page "https://github.com/theislab/anndata")
15212 (synopsis "Annotated data for data analysis pipelines")
15213 (description "Anndata is a package for simple (functional) high-level APIs
15214 for data analysis pipelines. In this context, it provides an efficient,
15215 scalable way of keeping track of data together with learned annotations and
15216 reduces the code overhead typically encountered when using a mostly
15217 object-oriented library such as @code{scikit-learn}.")
15218 (license license:bsd-3)))
15219
15220 (define-public python-dill
15221 (package
15222 (name "python-dill")
15223 (version "0.2.9")
15224 (source
15225 (origin
15226 (method url-fetch)
15227 (uri (pypi-uri "dill" version))
15228 (sha256
15229 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15230 (build-system python-build-system)
15231 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15232 (arguments '(#:tests? #f))
15233 (home-page "https://pypi.org/project/dill")
15234 (synopsis "Serialize all of Python")
15235 (description "Dill extends Python's @code{pickle} module for serializing
15236 and de-serializing Python objects to the majority of the built-in Python
15237 types. Dill provides the user the same interface as the @code{pickle} module,
15238 and also includes some additional features. In addition to pickling Python
15239 objects, @code{dill} provides the ability to save the state of an interpreter
15240 session in a single command. Hence, it would be feasible to save a
15241 interpreter session, close the interpreter, ship the pickled file to another
15242 computer, open a new interpreter, unpickle the session and thus continue from
15243 the saved state of the original interpreter session.")
15244 (license license:bsd-3)))
15245
15246 (define-public python-multiprocess
15247 (package
15248 (name "python-multiprocess")
15249 (version "0.70.6.1")
15250 (source
15251 (origin
15252 (method url-fetch)
15253 (uri (pypi-uri "multiprocess" version))
15254 (sha256
15255 (base32
15256 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15257 (build-system python-build-system)
15258 (propagated-inputs
15259 `(("python-dill" ,python-dill)))
15260 (home-page "https://pypi.org/project/multiprocess")
15261 (synopsis "Multiprocessing and multithreading in Python")
15262 (description
15263 "This package is a fork of the multiprocessing Python package, a package
15264 which supports the spawning of processes using the API of the standard
15265 library's @code{threading} module.")
15266 (license license:bsd-3)))
15267
15268 (define-public python-toolz
15269 (package
15270 (name "python-toolz")
15271 (version "0.9.0")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "toolz" version))
15276 (sha256
15277 (base32
15278 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15279 (build-system python-build-system)
15280 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15281 ;; unregistered loader type"
15282 (arguments '(#:tests? #f))
15283 (home-page "https://github.com/pytoolz/toolz/")
15284 (synopsis "List processing tools and functional utilities")
15285 (description
15286 "This package provides a set of utility functions for iterators,
15287 functions, and dictionaries.")
15288 (license license:bsd-3)))
15289
15290 (define-public python2-toolz
15291 (package-with-python2 python-toolz))
15292
15293 (define-public python-cytoolz
15294 (package
15295 (name "python-cytoolz")
15296 (version "0.9.0.1")
15297 (source
15298 (origin
15299 (method url-fetch)
15300 (uri (pypi-uri "cytoolz" version))
15301 (sha256
15302 (base32
15303 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15304 (build-system python-build-system)
15305 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15306 ;; 'exceptions'"
15307 (arguments '(#:tests? #f))
15308 (propagated-inputs
15309 `(("python-toolz" ,python-toolz)))
15310 (native-inputs
15311 `(("python-cython" ,python-cython)))
15312 (home-page "https://github.com/pytoolz/cytoolz")
15313 (synopsis "High performance functional utilities")
15314 (description
15315 "The cytoolz package implements the same API as provided by toolz. The
15316 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15317 that is accessible to other projects developed in Cython.")
15318 (license license:bsd-3)))
15319
15320 (define-public python-sortedcontainers
15321 (package
15322 (name "python-sortedcontainers")
15323 (version "2.0.4")
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (pypi-uri "sortedcontainers" version))
15328 (sha256
15329 (base32
15330 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15331 (build-system python-build-system)
15332 (native-inputs
15333 `(("python-tox" ,python-tox)))
15334 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15335 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15336 (description
15337 "This package provides a sorted collections library, written in
15338 pure-Python.")
15339 (license license:asl2.0)))
15340
15341 (define-public python-cloudpickle
15342 (package
15343 (name "python-cloudpickle")
15344 (version "0.6.1")
15345 (source
15346 (origin
15347 (method url-fetch)
15348 (uri (pypi-uri "cloudpickle" version))
15349 (sha256
15350 (base32
15351 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15352 (build-system python-build-system)
15353 ;; FIXME: there are 5 errors in 122 tests:
15354 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15355 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15356 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15357 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15358 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15359 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15360 (arguments '(#:tests? #f))
15361 (native-inputs
15362 `(("python-pytest" ,python-pytest)
15363 ("python-mock" ,python-mock)
15364 ("python-tornado" ,python-tornado)))
15365 (home-page "https://github.com/cloudpipe/cloudpickle")
15366 (synopsis "Extended pickling support for Python objects")
15367 (description
15368 "Cloudpickle makes it possible to serialize Python constructs not
15369 supported by the default pickle module from the Python standard library. It
15370 is especially useful for cluster computing where Python expressions are
15371 shipped over the network to execute on remote hosts, possibly close to the
15372 data.")
15373 (license license:bsd-3)))
15374
15375 (define-public python2-cloudpickle
15376 (package-with-python2 python-cloudpickle))
15377
15378 (define-public python-locket
15379 (package
15380 (name "python-locket")
15381 (version "0.2.0")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "locket" version))
15386 (sha256
15387 (base32
15388 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15389 (build-system python-build-system)
15390 (home-page "https://github.com/mwilliamson/locket.py")
15391 (synopsis "File-based locks for Python")
15392 (description
15393 "Locket implements a lock that can be used by multiple processes provided
15394 they use the same path.")
15395 (license license:bsd-2)))
15396
15397 (define-public python2-locket
15398 (package-with-python2 python-locket))
15399
15400 (define-public python-blosc
15401 (package
15402 (name "python-blosc")
15403 (version "1.5.1")
15404 (source
15405 (origin
15406 (method url-fetch)
15407 (uri (pypi-uri "blosc" version))
15408 (sha256
15409 (base32
15410 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15411 (build-system python-build-system)
15412 ;; FIXME: all tests pass, but then this error is printed:
15413 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15414 (arguments '(#:tests? #f))
15415 (propagated-inputs
15416 `(("python-numpy" ,python-numpy)))
15417 (home-page "https://github.com/blosc/python-blosc")
15418 (synopsis "Python wrapper for the Blosc data compressor library")
15419 (description "Blosc is a high performance compressor optimized for binary
15420 data. It has been designed to transmit data to the processor cache faster
15421 than the traditional, non-compressed, direct memory fetch approach via a
15422 @code{memcpy()} system call.
15423
15424 Blosc works well for compressing numerical arrays that contains data with
15425 relatively low entropy, like sparse data, time series, grids with
15426 regular-spaced values, etc.
15427
15428 This Python package wraps the Blosc library.")
15429 (license license:bsd-3)))
15430
15431 (define-public python2-blosc
15432 (package-with-python2 python-blosc))
15433
15434 (define-public python-partd
15435 (package
15436 (name "python-partd")
15437 (version "0.3.9")
15438 (source
15439 (origin
15440 (method url-fetch)
15441 (uri (pypi-uri "partd" version))
15442 (sha256
15443 (base32
15444 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15445 (build-system python-build-system)
15446 (propagated-inputs
15447 `(("python-blosc" ,python-blosc)
15448 ("python-locket" ,python-locket)
15449 ("python-numpy" ,python-numpy)
15450 ("python-pandas" ,python-pandas)
15451 ("python-pyzmq" ,python-pyzmq)
15452 ("python-toolz" ,python-toolz)))
15453 (home-page "https://github.com/dask/partd/")
15454 (synopsis "Appendable key-value storage")
15455 (description "Partd stores key-value pairs. Values are raw bytes. We
15456 append on old values. Partd excels at shuffling operations.")
15457 (license license:bsd-3)))
15458
15459 (define-public python2-partd
15460 (package-with-python2 python-partd))
15461
15462 (define-public python-dask
15463 (package
15464 (name "python-dask")
15465 (version "1.2.2")
15466 (source
15467 (origin
15468 (method url-fetch)
15469 (uri (pypi-uri "dask" version))
15470 (sha256
15471 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15472 (build-system python-build-system)
15473 ;; A single test out of 5000+ fails. This test is marked as xfail when
15474 ;; pytest-xdist is used.
15475 (arguments
15476 `(#:phases
15477 (modify-phases %standard-phases
15478 (add-after 'unpack 'disable-broken-test
15479 (lambda _
15480 (substitute* "dask/tests/test_threaded.py"
15481 (("def test_interrupt\\(\\)" m)
15482 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15483 m)))
15484 (when (which "python2")
15485 ;; This test fails with recent Pandas:
15486 ;; <https://github.com/dask/dask/issues/3794>.
15487 (substitute* "dask/dataframe/tests/test_dataframe.py"
15488 (("def test_info\\(\\)" m)
15489 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15490 m))))
15491 #t))
15492 (replace 'check
15493 (lambda _ (invoke "pytest" "-vv"))))))
15494 (propagated-inputs
15495 `(("python-cloudpickle" ,python-cloudpickle)
15496 ("python-numpy" ,python-numpy)
15497 ("python-pandas" ,python-pandas)
15498 ("python-partd" ,python-partd)
15499 ("python-toolz" ,python-toolz)
15500 ("python-pyyaml" ,python-pyyaml)))
15501 (native-inputs
15502 `(("python-pytest" ,python-pytest)
15503 ("python-pytest-runner" ,python-pytest-runner)))
15504 (home-page "https://github.com/dask/dask/")
15505 (synopsis "Parallel computing with task scheduling")
15506 (description
15507 "Dask is a flexible parallel computing library for analytics. It
15508 consists of two components: dynamic task scheduling optimized for computation,
15509 and large data collections like parallel arrays, dataframes, and lists that
15510 extend common interfaces like NumPy, Pandas, or Python iterators to
15511 larger-than-memory or distributed environments. These parallel collections
15512 run on top of the dynamic task schedulers. ")
15513 (license license:bsd-3)))
15514
15515 (define-public python2-dask
15516 (package-with-python2 python-dask))
15517
15518 (define-public python-ilinkedlist
15519 (package
15520 (name "python-ilinkedlist")
15521 (version "0.4.0")
15522 (source
15523 (origin
15524 (method url-fetch)
15525 (uri (pypi-uri "ilinkedlist" version))
15526 (sha256
15527 (base32
15528 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15529 (build-system python-build-system)
15530 (native-inputs `(("python-pytest" ,python-pytest)))
15531 (inputs `(("python" ,python)))
15532 (home-page "https://github.com/luther9/ilinkedlist-py")
15533 (synopsis "Immutable linked list library")
15534 (description
15535 "This is a implementation of immutable linked lists for Python. It
15536 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15537 Since a linked list is treated as immutable, it is hashable, and its length
15538 can be retrieved in constant time. Some of the terminology is inspired by
15539 LISP. It is possible to create an improper list by creating a @code{Pair}
15540 with a non-list @code{cdr}.")
15541 (license license:gpl3+)))
15542
15543 (define-public python-readlike
15544 (package
15545 (name "python-readlike")
15546 (version "0.1.3")
15547 (source
15548 (origin
15549 (method url-fetch)
15550 (uri (pypi-uri "readlike" version))
15551 (sha256
15552 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15553 (build-system python-build-system)
15554 (home-page "https://github.com/jangler/readlike")
15555 (synopsis "GNU Readline-like line editing module")
15556 (description
15557 "This Python module provides line editing functions similar to the default
15558 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15559 @code{readline} package, this one allows access to those capabilties in settings
15560 outside of a standard command-line interface. It is especially well-suited to
15561 interfacing with Urwid, due to a shared syntax for describing key inputs.
15562
15563 Currently, all stateless Readline commands are implemented. Yanking and history
15564 are not supported.")
15565 (license license:expat)))
15566
15567 (define-public python2-readlike
15568 (package-with-python2 python-readlike))
15569
15570 (define-public python-reparser
15571 (package
15572 (name "python-reparser")
15573 (version "1.4.3")
15574 (source
15575 (origin
15576 (method url-fetch)
15577 (uri (pypi-uri "ReParser" version))
15578 (sha256
15579 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15580 (build-system python-build-system)
15581 (home-page "https://github.com/xmikos/reparser")
15582 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15583 (description
15584 "This Python library provides a simple lexer/parser for inline markup based
15585 on regular expressions.")
15586 (license license:expat)))
15587
15588 (define-public python2-reparser
15589 (let ((reparser (package-with-python2
15590 (strip-python2-variant python-reparser))))
15591 (package (inherit reparser)
15592 (propagated-inputs
15593 `(("python2-enum34" ,python2-enum34)
15594 ,@(package-propagated-inputs reparser))))))
15595
15596 (define-public python-precis-i18n
15597 (package
15598 (name "python-precis-i18n")
15599 (version "1.0.0")
15600 (source
15601 (origin
15602 (method url-fetch)
15603 (uri (pypi-uri "precis_i18n" version))
15604 (sha256
15605 (base32
15606 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15607 (build-system python-build-system)
15608 (home-page "https://github.com/byllyfish/precis_i18n")
15609 (synopsis "Implementation of the PRECIS framework")
15610 (description
15611 "This module implements the PRECIS Framework as described in RFC 8264,
15612 RFC 8265 and RFC 8266.")
15613 (license license:expat)))
15614
15615 (define-public python-absl-py
15616 (package
15617 (name "python-absl-py")
15618 (version "0.6.1")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "absl-py" version))
15623 (sha256
15624 (base32
15625 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15626 (build-system python-build-system)
15627 (propagated-inputs
15628 `(("python-six" ,python-six)))
15629 (home-page "https://github.com/abseil/abseil-py")
15630 (synopsis "Abseil Python common libraries")
15631 (description
15632 "This package provides the Abseil Python Common Libraries, a collection
15633 of Python libraries for building Python applications.")
15634 (license license:asl2.0)))
15635
15636 (define-public python-astor
15637 (package
15638 (name "python-astor")
15639 (version "0.7.1")
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (pypi-uri "astor" version))
15644 (sha256
15645 (base32
15646 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15647 (build-system python-build-system)
15648 ;; FIXME: There are two errors and two test failures.
15649 (arguments `(#:tests? #f))
15650 (home-page "https://github.com/berkerpeksag/astor")
15651 (synopsis "Read and write Python ASTs")
15652 (description "Astor is designed to allow easy manipulation of Python
15653 source via the Abstract Syntax Tree.")
15654 (license license:bsd-3)))
15655
15656 (define-public python2-astor
15657 (package-with-python2 python-astor))
15658
15659 (define-public python-grpcio
15660 (package
15661 (name "python-grpcio")
15662 (version "1.17.1")
15663 (source
15664 (origin
15665 (method url-fetch)
15666 (uri (pypi-uri "grpcio" version))
15667 (sha256
15668 (base32
15669 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15670 (build-system python-build-system)
15671 (propagated-inputs
15672 `(("python-six" ,python-six)))
15673 (home-page "https://grpc.io")
15674 (synopsis "HTTP/2-based RPC framework")
15675 (description "This package provides a Python library for communicating
15676 with the HTTP/2-based RPC framework gRPC.")
15677 (license license:asl2.0)))
15678
15679 (define-public python-astunparse
15680 (package
15681 (name "python-astunparse")
15682 (version "1.6.2")
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "astunparse" version))
15687 (sha256
15688 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15689 (build-system python-build-system)
15690 (arguments '(#:tests? #f)) ; there are none
15691 (propagated-inputs
15692 `(("python-six" ,python-six)
15693 ("python-wheel" ,python-wheel)))
15694 (home-page "https://github.com/simonpercivall/astunparse")
15695 (synopsis "AST unparser for Python")
15696 (description "This package provides an AST unparser for Python. It is a
15697 factored out version of @code{unparse} found in the Python source
15698 distribution.")
15699 (license license:bsd-3)))
15700
15701 (define-public python-gast
15702 (package
15703 (name "python-gast")
15704 (version "0.2.2")
15705 (source
15706 (origin
15707 (method url-fetch)
15708 (uri (pypi-uri "gast" version))
15709 (sha256
15710 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15711 (build-system python-build-system)
15712 (propagated-inputs
15713 `(("python-astunparse" ,python-astunparse)))
15714 (home-page "https://pypi.org/project/gast/")
15715 (synopsis "Generic Python AST that abstracts the underlying Python version")
15716 (description
15717 "GAST provides a compatibility layer between the AST of various Python
15718 versions, as produced by @code{ast.parse} from the standard @code{ast}
15719 module.")
15720 (license license:bsd-3)))
15721
15722 (define-public python-wikidata
15723 (package
15724 (name "python-wikidata")
15725 (version "0.6.1")
15726 (source
15727 (origin
15728 (method url-fetch)
15729 (uri (pypi-uri "Wikidata" version))
15730 (sha256
15731 (base32
15732 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15733 (build-system python-build-system)
15734 (propagated-inputs
15735 `(("python-babel" ,python-babel)))
15736 (home-page "https://github.com/dahlia/wikidata")
15737 (synopsis "Wikidata client library")
15738 (description
15739 "This package provides a Python interface to
15740 @url{https://www.wikidata.org/, Wikidata}.")
15741 (properties '((upstream-name . "Wikidata")))
15742 (license license:gpl3+)))
15743
15744 (define-public python-doctest-ignore-unicode
15745 (package
15746 (name "python-doctest-ignore-unicode")
15747 (version "0.1.2")
15748 (source
15749 (origin
15750 (method url-fetch)
15751 (uri (pypi-uri "doctest-ignore-unicode" version))
15752 (sha256
15753 (base32
15754 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15755 (build-system python-build-system)
15756 (native-inputs
15757 `(("python-nose" ,python-nose)))
15758 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15759 (synopsis "Ignore Unicode literal prefixes in doctests")
15760 (description
15761 "This package adds support for a flag to ignore Unicode literal prefixes
15762 in doctests.")
15763 (license license:asl2.0)))
15764
15765 (define-public python-attr
15766 (package
15767 (name "python-attr")
15768 (version "0.3.1")
15769 (source
15770 (origin
15771 (method url-fetch)
15772 (uri (pypi-uri "attr" version))
15773 (sha256
15774 (base32
15775 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15776 (build-system python-build-system)
15777 (home-page "https://github.com/denis-ryzhkov/attr")
15778 (synopsis "Decorator for attributes of target function or class")
15779 (description "Simple decorator to set attributes of target function or
15780 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15781 (license license:expat)))
15782
15783 (define-public python-construct
15784 (package
15785 (name "python-construct")
15786 (version "2.9.45")
15787 (source
15788 (origin
15789 (method url-fetch)
15790 (uri (pypi-uri "construct" version))
15791 (sha256
15792 (base32
15793 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15794 (build-system python-build-system)
15795 (arguments
15796 `(#:tests? #f)) ; No tests exist.
15797 (propagated-inputs
15798 `(("python-extras" ,python-extras)
15799 ("python-arrow" ,python-arrow)
15800 ("python-numpy" ,python-numpy)
15801 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15802 (home-page "http://construct.readthedocs.io")
15803 (synopsis "Declarative and symmetrical parser and builder for binary data")
15804 (description
15805 "This package provides both simple, atomic constructs (such as
15806 integers of various sizes), as well as composite ones which allow you
15807 form hierarchical and sequential structures of increasing complexity.
15808 It features bit and byte granularity, easy debugging and testing, an
15809 easy-to-extend subclass system, and lots of primitive constructs to
15810 make your work easier.")
15811 (license license:expat)))
15812
15813 (define-public python-humanize
15814 (package
15815 (name "python-humanize")
15816 (version "0.5.1")
15817 (source
15818 (origin
15819 (method url-fetch)
15820 (uri (pypi-uri "humanize" version))
15821 (sha256
15822 (base32
15823 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15824 (arguments
15825 '(#:tests? #f)) ; tests not in pypi archive
15826 (build-system python-build-system)
15827 (home-page "https://github.com/jmoiron/humanize")
15828 (synopsis "Print numerical information in a human-readable form")
15829 (description "This package provides a Python module that displays numbers
15830 and dates in \"human readable\" forms. For example, it would display
15831 \"12345591313\" as \"12.3 billion\".")
15832 (license license:expat)))
15833
15834 (define-public python-txaio
15835 (package
15836 (name "python-txaio")
15837 (version "18.8.1")
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "txaio" version))
15842 (sha256
15843 (base32
15844 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15845 (build-system python-build-system)
15846 (propagated-inputs
15847 `(("python-twisted" ,python-twisted)
15848 ("python-six" ,python-six)))
15849 (home-page "https://github.com/crossbario/txaio")
15850 (synopsis "Compatibility layer between Python asyncio and Twisted")
15851 (description "Txaio provides a compatibility layer between the Python
15852 @code{asyncio} module and @code{Twisted}.")
15853 (license license:expat)))
15854
15855 (define-public python-toolshed
15856 (package
15857 (name "python-toolshed")
15858 (version "0.4.6")
15859 (source
15860 (origin
15861 (method url-fetch)
15862 (uri (pypi-uri "toolshed" version))
15863 (sha256
15864 (base32
15865 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15866 (build-system python-build-system)
15867 (native-inputs
15868 `(("python-nose" ,python-nose)))
15869 (home-page "https://github.com/brentp/toolshed/")
15870 (synopsis "Collection of modules and functions for working with data")
15871 (description "This is a collection of well-tested, simple modules and
15872 functions that aim to reduce boilerplate when working with data.")
15873 (license license:bsd-2)))
15874
15875 (define-public python-annoy
15876 (package
15877 (name "python-annoy")
15878 (version "1.15.1")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "annoy" version))
15883 (sha256
15884 (base32
15885 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15886 (build-system python-build-system)
15887 (native-inputs
15888 `(("python-nose" ,python-nose)))
15889 (home-page "https://github.com/spotify/annoy/")
15890 (synopsis "Approximate nearest neighbors library")
15891 (description
15892 "Annoy is a C++ library with Python bindings to search for points in
15893 space that are close to a given query point. It also creates large read-only
15894 file-based data structures that are @code{mmap}ped into memory so that many
15895 processes may share the same data.")
15896 (license license:asl2.0)))
15897
15898 (define-public python-pylzma
15899 (package
15900 (name "python-pylzma")
15901 (version "0.5.0")
15902 (source
15903 (origin
15904 (method url-fetch)
15905 (uri (pypi-uri "pylzma" version))
15906 (sha256
15907 (base32
15908 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15909 (build-system python-build-system)
15910 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15911 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15912 (description "This package provides Python bindings for the LZMA library
15913 by Igor Pavlov.")
15914 (license license:lgpl2.1+)))
15915
15916 (define-public python2-pylzma
15917 (package-with-python2 python-pylzma))
15918
15919 (define-public python2-zeroconf
15920 (package
15921 (name "python2-zeroconf")
15922
15923 ;; This is the last version that supports Python 2.x.
15924 (version "0.19.1")
15925 (source
15926 (origin
15927 (method url-fetch)
15928 (uri (pypi-uri "zeroconf" version))
15929 (sha256
15930 (base32
15931 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15932 (build-system python-build-system)
15933 (arguments
15934 `(#:python ,python-2
15935 #:phases
15936 (modify-phases %standard-phases
15937 (add-after 'unpack 'patch-requires
15938 (lambda* (#:key inputs #:allow-other-keys)
15939 (substitute* "setup.py"
15940 (("enum-compat")
15941 "enum34"))
15942 #t)))))
15943 (native-inputs
15944 `(("python2-six" ,python2-six)
15945 ("python2-enum32" ,python2-enum34)
15946 ("python2-netifaces" ,python2-netifaces)
15947 ("python2-typing" ,python2-typing)))
15948 (home-page "https://github.com/jstasiak/python-zeroconf")
15949 (synopsis "Pure Python mDNS service discovery")
15950 (description
15951 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15952 compatible).")
15953 (license license:lgpl2.1+)))
15954
15955 (define-public python-bsddb3
15956 (package
15957 (name "python-bsddb3")
15958 (version "6.2.6")
15959 (source
15960 (origin
15961 (method url-fetch)
15962 (uri (pypi-uri "bsddb3" version))
15963 (sha256
15964 (base32
15965 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15966 (build-system python-build-system)
15967 (inputs
15968 `(("bdb" ,bdb)))
15969 (arguments
15970 '(#:phases
15971 (modify-phases %standard-phases
15972 (add-after 'unpack 'configure-locations
15973 (lambda* (#:key inputs #:allow-other-keys)
15974 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15975 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15976 #t))
15977 (replace 'check
15978 (lambda _
15979 (invoke "python3" "test3.py" "-v"))))))
15980 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15981 (synopsis "Python bindings for Oracle Berkeley DB")
15982 (description
15983 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15984 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15985 Transaction objects, and each of these is exposed as a Python type in the
15986 bsddb3.db module. The database objects can use various access methods: btree,
15987 hash, recno, and queue. Complete support of Berkeley DB distributed
15988 transactions. Complete support for Berkeley DB Replication Manager.
15989 Complete support for Berkeley DB Base Replication. Support for RPC.")
15990 (license license:bsd-3)))
15991
15992 (define-public python-dbfread
15993 (package
15994 (name "python-dbfread")
15995 (version "2.0.7")
15996 (source (origin
15997 (method url-fetch)
15998 (uri (pypi-uri "dbfread" version))
15999 (sha256
16000 (base32
16001 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16002 (build-system python-build-system)
16003 (native-inputs
16004 `(("python-pytest" ,python-pytest)))
16005 (home-page "https://dbfread.readthedocs.io")
16006 (synopsis "Read DBF Files with Python")
16007 (description
16008 "This library reads DBF files and returns the data as native Python data
16009 types for further processing. It is primarily intended for batch jobs and
16010 one-off scripts.")
16011 (license license:expat)))
16012
16013 (define-public python-cached-property
16014 (package
16015 (name "python-cached-property")
16016 (version "1.5.1")
16017 (source
16018 (origin
16019 (method url-fetch)
16020 (uri (pypi-uri "cached-property" version))
16021 (sha256
16022 (base32
16023 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16024 (build-system python-build-system)
16025 (arguments
16026 `(#:phases
16027 (modify-phases %standard-phases
16028 ;; https://github.com/pydanny/cached-property/issues/131
16029 ;; recent versions of freezegun break one test
16030 (add-after 'unpack 'disable-broken-test
16031 (lambda _
16032 (substitute* "tests/test_cached_property.py"
16033 (("def test_threads_ttl_expiry\\(self\\)" m)
16034 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16035 " " m)))
16036 #t)))))
16037 (native-inputs
16038 `(("python-freezegun" ,python-freezegun)))
16039 (home-page
16040 "https://github.com/pydanny/cached-property")
16041 (synopsis
16042 "Decorator for caching properties in classes")
16043 (description
16044 "This package provides a decorator which makes caching
16045 time-or-computationally-expensive properties quick and easy and works in Python
16046 2 or 3.")
16047 (license license:bsd-3)))