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>
68 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
163 (define-public python-psutil
165 (name "python-psutil")
170 (uri (pypi-uri "psutil" version))
173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
174 (build-system python-build-system)
176 ;; FIXME: some tests does not return and times out.
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
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)))
191 (define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
199 (define-public python-shapely
201 (name "python-shapely")
202 (version "1.6.4.post2")
206 (uri (pypi-uri "Shapely" version))
209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
210 (build-system python-build-system)
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
219 `(("python-numpy" ,python-numpy)))
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"))))
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)))
242 (define-public python-shortuuid
244 (name "python-shortuuid")
249 (uri (pypi-uri "shortuuid" version))
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
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)))
264 (define-public python-logwrap
266 (name "python-logwrap")
271 (uri (pypi-uri "logwrap" version ".zip"))
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
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)))
291 (define-public python2-shapely
292 (package-with-python2 python-shapely))
294 (define-public python-clyent
296 (name "python-clyent")
301 (uri (pypi-uri "clyent" version))
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
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)))
314 (define-public python2-clyent
315 (package-with-python2 python-clyent))
317 (define-public python-babel
319 (name "python-babel")
324 (uri (pypi-uri "Babel" version))
327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
328 (build-system python-build-system)
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
333 `(("python-pytz" ,python-pytz)))
335 `(#:phases (modify-phases %standard-phases
338 (invoke "pytest" "-vv" "-k"
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/")
347 "Tools for internationalizing Python applications")
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,
354 (license license:bsd-3)))
356 (define-public python2-babel
357 (package-with-python2 python-babel))
359 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
360 (define-public python2-babel-2.6
362 (inherit python2-babel)
366 (uri (pypi-uri "Babel" version))
369 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
371 (define-public python2-backport-ssl-match-hostname
373 (name "python2-backport-ssl-match-hostname")
378 (uri (pypi-uri "backports.ssl_match_hostname" version))
381 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
382 (build-system python-build-system)
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")
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)))
395 (define-public python-hdf4
402 (uri (pypi-uri name version))
405 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
406 (build-system python-build-system)
407 (native-inputs `(("nose" ,python-nose)))
408 (propagated-inputs `(("numpy" ,python-numpy)))
415 (modify-phases %standard-phases
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=.*") ""))
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")
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)))
437 (define-public python2-hdf4
438 (package-with-python2 python-hdf4))
440 (define-public python-h5py
447 (uri (pypi-uri "h5py" version))
450 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
451 (build-system python-build-system)
453 `(#:tests? #f ; no test target
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" "']")))
469 `(("python-six" ,python-six)
470 ("python-numpy" ,python-numpy)))
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")
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
484 (license license:bsd-3)))
486 (define-public python2-h5py
487 (package-with-python2 python-h5py))
489 (define-public python-sh
496 (uri (pypi-uri "sh" version))
499 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
500 (build-system python-build-system)
503 (modify-phases %standard-phases
506 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
507 (setenv "HOME" "/tmp")
508 (invoke "python" "sh.py" "test"))))))
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)))
517 (define-public python2-sh
518 (package-with-python2 python-sh))
520 (define-public python-cftime
522 (name "python-cftime")
527 (uri (pypi-uri "cftime" version))
530 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
531 (build-system python-build-system)
533 `(("python-numpy" ,python-numpy)))
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")
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
545 (license (list license:isc license:gpl3+))))
547 (define-public python-netcdf4
549 (name "python-netcdf4")
554 (uri (pypi-uri "netCDF4" version))
557 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
558 (build-system python-build-system)
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"))
567 `(("python-cython" ,python-cython)))
569 `(("python-numpy" ,python-numpy)
570 ("python-cftime" ,python-cftime)))
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))))
588 (define-public python2-netcdf4
589 (package-with-python2 python-netcdf4))
591 (define-public python-lockfile
593 (name "python-lockfile")
598 (uri (pypi-uri "lockfile" version))
601 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
602 (build-system python-build-system)
603 (arguments '(#:test-target "check"))
605 `(("python-pbr" ,python-pbr)))
606 (home-page "https://launchpad.net/pylockfile")
607 (synopsis "Platform-independent file locking module")
609 "The lockfile package exports a LockFile class which provides a simple
610 API for locking files.")
611 (license license:expat)))
613 (define-public python2-lockfile
614 (package-with-python2 python-lockfile))
616 (define-public python-semantic-version
618 (name "python-semantic-version")
623 (uri (pypi-uri "semantic_version" version))
626 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
627 (build-system python-build-system)
629 `(#:tests? #f)) ; PyPI tarball lacks tests
630 (home-page "https://github.com/rbarrois/python-semanticversion")
631 (synopsis "Semantic versioning module for Python")
633 "The @code{semantic_version} class is a small library for handling
634 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
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)))
641 (define-public python2-semantic-version
642 (package-with-python2 python-semantic-version))
644 (define-public python-serpent
646 (name "python-serpent")
651 (uri (pypi-uri "serpent" version))
653 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
654 (build-system python-build-system)
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")
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.
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)))
670 (define-public python-setuptools
672 (name "python-setuptools")
677 (uri (pypi-uri "setuptools" version ".zip"))
680 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
681 (modules '((guix build utils)))
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$"))
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.
694 (home-page "https://pypi.python.org/pypi/setuptools")
696 "Library designed to facilitate packaging Python projects")
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,
703 project installation,
704 platform-specific details,
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
713 (define-public python2-setuptools
714 (package-with-python2 python-setuptools))
716 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
717 (define-public python-setuptools-for-tensorflow
720 (inherit python-setuptools)
723 (inherit (package-source python-setuptools))
724 (uri (pypi-uri "setuptools" version ".zip"))
727 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
729 (define-public python-uniseg
731 (name "python-uniseg")
736 (uri (pypi-uri "uniseg" version ".zip"))
739 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
740 (build-system python-build-system)
742 '(#:tests? #f)) ; The test suite requires network access.
746 "https://bitbucket.org/emptypage/uniseg-python")
748 "Python library to determine Unicode text segmentations")
750 "Uniseg is a Python package used to determine Unicode text segmentations.
751 Supported segmentations include:
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)
760 (license license:expat)))
762 (define-public python2-uniseg
763 (package-with-python2 python-uniseg))
765 (define-public python-humanfriendly
767 (name "python-humanfriendly")
772 (uri (pypi-uri "humanfriendly" version))
775 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
776 (build-system python-build-system)
778 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
781 `(("python-monotonic" ,python-monotonic)))
782 (home-page "https://humanfriendly.readthedocs.io")
783 (synopsis "Human-friendly input and output in Python")
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
790 (license license:expat)))
792 (define-public python2-humanfriendly
793 (package-with-python2 python-humanfriendly))
795 (define-public python-capturer
797 (name "python-capturer")
802 (uri (pypi-uri "capturer" version))
805 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
806 (build-system python-build-system)
810 `(("python-humanfriendly" ,python-humanfriendly)))
811 (home-page "https://capturer.readthedocs.io")
812 (synopsis "Capture stdout and stderr streams of the current process")
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)))
820 (define-public python2-capturer
821 (package-with-python2 python-capturer))
823 (define-public python-case
830 (uri (pypi-uri "case" version))
833 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
834 (build-system python-build-system)
836 `(("python-mock" ,python-mock)
837 ("python-nose" ,python-nose)
838 ("python-six" ,python-six)
839 ("python-unittest2" ,python-unittest2)))
841 `(("python-coverage" ,python-coverage)))
842 (home-page "https://github.com/celery/case")
843 (synopsis "Unittest utilities and convenience methods")
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)))
849 (define-public python-verboselogs
851 (name "python-verboselogs")
856 (uri (pypi-uri "verboselogs" version))
859 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
860 (build-system python-build-system)
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")
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)))
872 (define-public python2-verboselogs
873 (package-with-python2 python-verboselogs))
875 (define-public python-coloredlogs
877 (name "python-coloredlogs")
882 (uri (pypi-uri "coloredlogs" version))
885 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
886 (build-system python-build-system)
888 `(;Tests require some updated modules
891 `(("python-capturer" ,python-capturer)))
892 (home-page "https://coloredlogs.readthedocs.io")
893 (synopsis "Colored stream handler for Python's logging module")
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
899 (license license:expat)))
901 (define-public python2-coloredlogs
902 (package-with-python2 python-coloredlogs))
904 (define-public python-et-xmlfile
906 (name "python-et-xmlfile")
911 (uri (pypi-uri "et_xmlfile" version))
914 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
915 (build-system python-build-system)
917 `(#:phases (modify-phases %standard-phases
920 (invoke "pytest"))))))
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
929 (license license:expat)))
931 (define-public python2-et-xmlfile
932 (package-with-python2 python-et-xmlfile))
934 (define-public python-openpyxl
936 (name "python-openpyxl")
940 ;; We use the upstream repository, as the tests are not included in the
944 (url "https://bitbucket.org/openpyxl/openpyxl")
945 (changeset version)))
946 (file-name (string-append name "-" version "-checkout"))
948 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
949 (build-system python-build-system)
951 `(#:phases (modify-phases %standard-phases
954 (invoke "pytest"))))))
956 ;; For the test suite.
957 `(("python-lxml" ,python-lxml)
958 ("python-pillow" ,python-pillow)
959 ("python-pytest" ,python-pytest)))
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)
968 (license license:expat)))
970 (define-public python-eventlet
972 (name "python-eventlet")
977 (uri (pypi-uri "eventlet" version))
980 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
981 (build-system python-build-system)
983 `(("python-greenlet" ,python-greenlet)))
985 ;; TODO: Requires unpackaged 'enum-compat'.
987 (home-page "http://eventlet.net")
988 (synopsis "Concurrent networking library for Python")
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)))
999 (define-public python2-eventlet
1000 (let ((base (package-with-python2
1001 (strip-python2-variant python-eventlet))))
1002 (package (inherit base)
1004 `(("python2-enum34" ,python2-enum34)
1005 ,@(package-propagated-inputs base))))))
1007 (define-public python-six
1014 (uri (pypi-uri "six" version))
1017 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1018 (build-system python-build-system)
1021 (modify-phases %standard-phases
1024 (invoke "py.test" "-v"))))))
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")
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)))
1038 (define-public python2-six
1039 (package-with-python2 python-six))
1041 (define-public python-six-bootstrap
1043 (inherit python-six)
1044 (name "python-six-bootstrap")
1046 (arguments `(#:tests? #f))))
1048 (define-public python2-six-bootstrap
1049 (package-with-python2 python-six-bootstrap))
1051 (define-public python-schedule
1053 (name "python-schedule")
1058 (uri (pypi-uri "schedule" version))
1061 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1062 (build-system python-build-system)
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")
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)))
1075 (define-public python2-schedule
1076 (package-with-python2 python-schedule))
1078 (define-public python-pandas
1080 (name "python-pandas")
1085 (uri (pypi-uri "pandas" version))
1087 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1088 (build-system python-build-system)
1090 `(#:modules ((guix build utils)
1091 (guix build python-build-system)
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"))))
1104 (let ((build-directory
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
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"))))))))
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)))
1133 `(("which" ,which)))
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")
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)))
1152 (define-public python2-pandas
1153 (package-with-python2 python-pandas))
1155 (define-public python2-mechanize
1157 (name "python2-mechanize")
1162 (uri (pypi-uri "mechanize" version))
1165 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1166 (build-system python-build-system)
1168 `(#:python ,python-2 ; apparently incompatible with Python 3
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'
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/")
1179 "Stateful programmatic web browsing in Python")
1181 "Mechanize implements stateful programmatic web browsing in Python,
1182 after Andy Lester’s Perl module WWW::Mechanize.")
1183 (license (license:non-copyleft
1185 "See COPYING in the distribution."))))
1188 (define-public python-simplejson
1190 (name "python-simplejson")
1195 (uri (pypi-uri "simplejson" version))
1198 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1199 (build-system python-build-system)
1200 (home-page "http://simplejson.readthedocs.org/en/latest/")
1202 "Json library for Python")
1204 "JSON (JavaScript Object Notation) is a subset of JavaScript
1205 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
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
1214 (license license:x11)))
1216 (define-public python2-simplejson
1217 (package-with-python2 python-simplejson))
1220 (define-public python-pyicu
1222 (name "python-pyicu")
1227 (uri (pypi-uri "PyICU" version))
1230 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1231 (build-system python-build-system)
1233 `(("icu4c" ,icu4c)))
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")
1240 "PyICU is a python extension wrapping the ICU C++ API.")
1241 (properties `((python2-variant . ,(delay python2-pyicu))))
1242 (license license:x11)))
1244 (define-public python2-pyicu
1245 (let ((base (package-with-python2
1246 (strip-python2-variant python-pyicu))))
1250 `(,@(package-arguments base)
1252 (modify-phases %standard-phases
1253 (add-before 'check 'delete-failing-test
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")
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.
1264 (name "python2-dogtail")
1268 (uri (pypi-uri "dogtail" version))
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")
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+)))
1285 (define-public python-empy
1287 (name "python-empy")
1291 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1295 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1296 (build-system python-build-system)
1298 `(#:tests? #f)) ; python2 only
1299 (home-page "http://www.alcyone.com/software/empy/")
1300 (synopsis "Templating system for Python")
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
1313 (license license:lgpl2.1+)))
1315 (define-public python2-empy
1316 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1319 (arguments `(,@(package-arguments base)
1322 (define-public python2-element-tree
1324 (name "python2-element-tree")
1329 "http://effbot.org/media/downloads/elementtree-"
1330 version "-20050316.tar.gz"))
1333 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1334 (build-system python-build-system)
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")
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\"."))))
1346 (define-public python2-pybugz
1348 (name "python2-pybugz")
1353 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1357 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1358 (patches (search-patches "pybugz-stty.patch"
1359 "pybugz-encode-error.patch"))))
1360 (build-system python-build-system)
1362 `(#:python ,python-2 ; SyntaxError with Python 3
1363 #:tests? #f)) ; no 'test' sub-command
1365 `(("element-tree" ,python2-element-tree)))
1366 (synopsis "Python and command-line interface to Bugzilla")
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
1371 (home-page "http://www.liquidx.net/pybugz/")
1372 (license license:gpl2)))
1374 (define-public python2-enum
1376 (name "python2-enum")
1380 (uri (pypi-uri "enum" version))
1383 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1384 (build-system python-build-system)
1386 `(#:python ,python-2))
1387 (home-page "http://pypi.python.org/pypi/enum/")
1388 (synopsis "Robust enumerated type support in Python")
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
1393 ;; Choice of either license.
1394 (license (list license:gpl3+ license:psfl))))
1396 (define-public python-enum34
1398 (name "python-enum34")
1403 (uri (pypi-uri "enum34" version))
1406 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1407 (build-system python-build-system)
1408 (home-page "https://pypi.python.org/pypi/enum34")
1409 (synopsis "Backported Python 3.4 Enum")
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)))
1415 (define-public python2-enum34
1416 (package-with-python2 python-enum34))
1418 (define-public python-parse-type
1420 (name "python-parse-type")
1425 (uri (pypi-uri "parse_type" version))
1428 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1429 (build-system python-build-system)
1431 `(("python-six" ,python-six)
1432 ("python-parse" ,python-parse)))
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")
1439 "Parse_type extends the python parse module.")
1441 `((python2-variant . ,(delay python2-parse-type))))
1442 (license license:bsd-3)))
1444 (define-public python2-parse-type
1445 (let ((base (package-with-python2
1446 (strip-python2-variant python-parse-type))))
1447 (package (inherit base)
1449 `(("python2-enum34" ,python2-enum34)
1450 ,@(package-propagated-inputs base))))))
1452 (define-public python-parse
1454 (name "python-parse")
1459 (uri (pypi-uri "parse" version))
1462 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1463 (build-system python-build-system)
1466 (modify-phases %standard-phases
1468 (lambda _ (invoke "python" "test_parse.py"))))))
1469 (home-page "https://github.com/r1chardj0n3s/parse")
1470 (synopsis "Parse strings")
1472 "Parse strings using a specification based on the Python @code{format()}
1474 (license license:x11)))
1476 (define-public python-polib
1478 (name "python-polib")
1482 (uri (pypi-uri "polib" version))
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
1492 (license license:expat)))
1494 (define-public python2-polib
1495 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1498 (arguments `(,@(package-arguments base)
1499 ;; Tests don't work with python2.
1502 (define-public scons
1509 (url "https://github.com/SCons/scons.git")
1511 (file-name (git-file-name name version))
1514 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1515 (build-system python-build-system)
1517 `(#:use-setuptools? #f ; still relies on distutils
1518 #:tests? #f ; no 'python setup.py test' command
1520 (modify-phases %standard-phases
1521 (add-before 'build 'bootstrap
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")
1532 (home-page "http://scons.org/")
1533 (synopsis "Software construction tool written in Python")
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
1540 (license license:x11)))
1542 (define-public scons-python2
1544 (inherit (package-with-python2 scons))
1545 (name "scons-python2")))
1547 (define-public python-extras
1549 (name "python-extras")
1554 (uri (pypi-uri "extras" version))
1557 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1558 (build-system python-build-system)
1560 ;; FIXME: Circular dependency on testtools.
1562 (home-page "https://github.com/testing-cabal/extras")
1563 (synopsis "Useful extensions to the Python standard library")
1565 "Extras is a set of extensions to the Python standard library.")
1566 (license license:expat)))
1568 (define-public python2-extras
1569 (package-with-python2 python-extras))
1571 (define-public python-mimeparse
1573 (name "python-mimeparse")
1578 (uri (pypi-uri "python-mimeparse" version))
1581 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1582 (build-system python-build-system)
1585 (modify-phases %standard-phases
1588 (invoke "./mimeparse_test.py"))))))
1590 "https://github.com/dbtsai/python-mimeparse")
1591 (synopsis "Python library for parsing MIME types")
1593 "Mimeparse provides basic functions for parsing MIME type names and
1594 matching them against a list of media-ranges.")
1595 (license license:expat)))
1597 (define-public python2-mimeparse
1598 (package-with-python2 python-mimeparse))
1600 (define-public python-miniboa
1602 (name "python-miniboa")
1607 (uri (pypi-uri "miniboa" version))
1610 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1611 (build-system python-build-system)
1612 (home-page "https://github.com/shmup/miniboa")
1613 (synopsis "Simple, single-threaded Telnet server")
1615 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1617 (license license:asl2.0)))
1619 (define-public python2-miniboa
1620 (package-with-python2 python-miniboa))
1622 (define-public python-pafy
1624 (name "python-pafy")
1629 (uri (pypi-uri "pafy" version))
1632 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1633 (build-system python-build-system)
1635 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
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")
1643 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1644 (license license:lgpl3+)))
1646 (define-public python2-funcsigs
1648 (name "python2-funcsigs")
1652 (uri (pypi-uri "funcsigs" version))
1655 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1656 (build-system python-build-system)
1658 `(#:python ,python-2))
1660 `(("python2-unittest2" ,python2-unittest2)))
1661 (home-page "http://funcsigs.readthedocs.org")
1662 (synopsis "Python function signatures from PEP362")
1664 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1665 (license license:asl2.0)))
1667 (define-public python2-funcsigs-bootstrap
1669 (inherit python2-funcsigs)
1670 (name "python2-funcsigs-bootstrap")
1674 ,@(package-arguments python2-funcsigs)))))
1676 (define-public python-py
1683 (uri (pypi-uri "py" version))
1686 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1687 (build-system python-build-system)
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?"
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")
1699 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1700 code introspection, and logging.")
1701 (license license:expat)))
1703 (define-public python2-py
1704 (package-with-python2 python-py))
1706 ;; Recent versions of python-fixtures and python-testrepository need
1707 ;; python-pbr for packaging, which itself needs these two packages for
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
1718 (name "python-pbr-minimal")
1723 (uri (pypi-uri "pbr" version))
1726 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1727 (build-system python-build-system)
1730 (home-page "http://docs.openstack.org/developer/pbr/")
1731 (synopsis "Minimal build of python-pbr used for bootstrapping")
1733 "Used only for bootstrapping python2-pbr, you should not need this.")
1734 (license license:asl2.0)))
1736 (define-public python2-pbr-minimal
1737 (package-with-python2 python-pbr-minimal))
1739 (define-public python-pbr
1741 (inherit python-pbr-minimal)
1744 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1746 `(("git" ,git))) ;; pbr actually uses the "git" binary.
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")
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.
1766 (define-public python2-pbr
1767 (package-with-python2 python-pbr))
1769 (define-public python-pyrsistent
1771 (name "python-pyrsistent")
1773 (home-page "https://github.com/tobgu/pyrsistent")
1776 (uri (pypi-uri "pyrsistent" version))
1779 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1780 (build-system python-build-system)
1782 `(("python-hypothesis" ,python-hypothesis)
1783 ("python-pytest" ,python-pytest)
1784 ("python-pytest-runner" ,python-pytest-runner)))
1786 `(("python-six" ,python-six)))
1787 (synopsis "Persistent data structures for Python")
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.
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)))
1797 (define-public python2-pyrsistent
1798 (package-with-python2 python-pyrsistent))
1800 (define-public python-exif-read
1802 (name "python-exif-read")
1806 (uri (pypi-uri "ExifRead" version))
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")
1815 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1817 (license license:bsd-3)))
1819 (define-public python2-exif-read
1820 (package-with-python2 python-exif-read))
1822 (define-public python-pyld
1824 (name "python-pyld")
1828 (uri (pypi-uri "PyLD" version))
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")
1836 "PyLD is an implementation of the JSON-LD specification.")
1837 (license license:bsd-3)))
1839 (define-public python2-pyld
1840 (package-with-python2 python-pyld))
1842 (define-public python-click
1844 (name "python-click")
1849 (uri (pypi-uri "click" version))
1852 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1853 (build-system python-build-system)
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"
1863 (string-append "'" glibc "/bin/locale'"))))
1867 (invoke "python" "-m" "pytest"))))))
1869 `(("python-pytest" ,python-pytest)))
1870 (home-page "https://palletsprojects.com/p/click/")
1871 (synopsis "Command line library for Python")
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)))
1879 (define-public python2-click
1880 (package-with-python2 python-click))
1882 (define-public python-wheel
1884 (name "python-wheel")
1889 (uri (pypi-uri "wheel" version))
1892 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1893 (build-system python-build-system)
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")
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))))))
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))))))
1917 (define-public python-vcversioner
1919 (name "python-vcversioner")
1920 (version "2.16.0.0")
1924 (uri (pypi-uri "vcversioner" version))
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
1933 (home-page "https://github.com/habnabit/vcversioner")
1934 (license license:isc)))
1936 (define-public python2-vcversioner
1937 (package-with-python2 python-vcversioner))
1939 (define-public python-jdcal
1941 (name "python-jdcal")
1946 (uri (pypi-uri "jdcal" version))
1949 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1950 (build-system python-build-system)
1952 `(#:phases (modify-phases %standard-phases
1955 (invoke "pytest"))))))
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)))
1964 (define-public python2-jdcal
1965 (package-with-python2 python-jdcal))
1967 (define-public python-jsonschema
1969 (name "python-jsonschema")
1973 (uri (pypi-uri "jsonschema" version))
1976 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1977 (build-system python-build-system)
1980 (modify-phases %standard-phases
1983 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1984 (invoke "trial" "jsonschema"))))))
1986 `(("python-setuptools_scm" ,python-setuptools-scm)
1987 ("python-twisted" ,python-twisted)))
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")
1995 "Jsonschema is an implementation of JSON Schema for Python.")
1996 (license license:expat)
1997 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1999 (define-public python2-jsonschema
2000 (let ((jsonschema (package-with-python2
2001 (strip-python2-variant python-jsonschema))))
2002 (package (inherit jsonschema)
2004 `(("python2-functools32" ,python2-functools32)
2005 ,@(package-propagated-inputs jsonschema))))))
2007 ;; This old version is still required by docker-compose as of 1.24.0.
2008 (define-public python-jsonschema-2.6
2010 (name "python-jsonschema")
2014 (uri (pypi-uri "jsonschema" version))
2017 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2018 (build-system python-build-system)
2021 (modify-phases %standard-phases
2022 (replace 'check (lambda _ (invoke "nosetests"))))))
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")
2029 "Jsonschema is an implementation of JSON Schema for Python.")
2030 (license license:expat)
2031 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2033 (define-public python-schema
2035 (name "python-schema")
2040 (uri (pypi-uri "schema" version))
2043 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2044 (build-system python-build-system)
2046 `(("python-pytest" ,python-pytest)))
2047 (home-page "https://github.com/keleshev/schema")
2048 (synopsis "Simple data validation library")
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)))
2056 (define-public python2-schema
2057 (package-with-python2 python-schema))
2059 (define-public python-schema-0.5
2060 (package (inherit python-schema)
2065 (uri (pypi-uri "schema" version))
2068 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2070 (define-public python2-schema-0.5
2071 (package-with-python2 python-schema-0.5))
2073 (define-public python-kitchen
2075 (name "python-kitchen")
2080 (uri (pypi-uri "kitchen" version))
2083 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2084 (build-system python-build-system)
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:
2098 (define-public python2-kitchen
2099 (package-with-python2 python-kitchen))
2101 (define-public python-unidecode
2103 (name "python-unidecode")
2107 (uri (pypi-uri "Unidecode" version))
2110 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2111 (build-system python-build-system)
2112 (home-page "https://pypi.python.org/pypi/Unidecode")
2113 (synopsis "ASCII transliterations of Unicode text")
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+)))
2122 (define-public python2-unidecode
2123 (package-with-python2 python-unidecode))
2125 (define-public python-pyjwt
2127 (name "python-pyjwt")
2132 (uri (pypi-uri "PyJWT" version))
2135 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2136 (modules '((guix build utils)))
2139 (for-each delete-file-recursively
2140 (find-files "." "\\.pyc$"))
2142 (build-system python-build-system)
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")
2150 "PyJWT is a JSON Web Token implementation written in Python.")
2151 (license license:expat)))
2153 (define-public python2-pyjwt
2154 (package-with-python2 python-pyjwt))
2156 (define-public python-pykka
2158 (name "python-pykka")
2163 (uri (pypi-uri "Pykka" version))
2166 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2167 (build-system python-build-system)
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")
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)))
2182 (define-public python2-pykka
2183 (package-with-python2 python-pykka))
2185 (define-public python-pymsgbox
2187 (name "python-pymsgbox")
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))
2199 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2201 ;; Circular dependency to run tests:
2202 ;; Tests need pyautogui, which depends on pymsgbox.
2204 (build-system python-build-system)
2205 (home-page "https://github.com/asweigart/PyMsgBox")
2206 (synopsis "Python module for JavaScript-like message boxes")
2208 "PyMsgBox is a simple, cross-platform, pure Python module for
2209 JavaScript-like message boxes. Types of dialog boxes include:
2217 (license license:bsd-3)))
2219 (define-public python-pympler
2221 (name "python-pympler")
2222 (home-page "https://pythonhosted.org/Pympler/")
2226 (uri (pypi-uri "Pympler" version))
2229 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2230 (build-system python-build-system)
2232 `(#:phases (modify-phases %standard-phases
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")
2240 "Pympler is a development tool to measure, monitor and analyze
2241 the memory behavior of Python objects in a running Python application.
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
2248 A web profiling frontend exposes process statistics, garbage
2249 visualisation and class tracker statistics.")
2250 (license license:asl2.0)))
2252 (define-public python2-pympler
2253 (package-with-python2 python-pympler))
2255 (define-public python-itsdangerous
2257 (name "python-itsdangerous")
2262 (uri (pypi-uri "itsdangerous" version))
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")
2270 "Itsdangerous provides various helpers to pass trusted data to untrusted
2271 environments and back.")
2272 (license license:bsd-3)))
2274 (define-public python2-itsdangerous
2275 (package-with-python2 python-itsdangerous))
2277 (define-public python-pyyaml
2279 (name "python-pyyaml")
2284 (uri (pypi-uri "PyYAML" version))
2287 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2288 (build-system python-build-system)
2290 `(("libyaml" ,libyaml)))
2291 (home-page "http://pyyaml.org/wiki/PyYAML")
2292 (synopsis "YAML parser and emitter for Python")
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
2299 (license license:expat)))
2301 (define-public python2-pyyaml
2302 (package-with-python2 python-pyyaml))
2304 (define-public python-vine
2306 (name "python-vine")
2311 (uri (pypi-uri "vine" version))
2314 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2315 (build-system python-build-system)
2317 `(("python-pytest" ,python-pytest)
2318 ("python-case" ,python-case)))
2319 (home-page "https://github.com/celery/vine")
2320 (synopsis "Promises for Python")
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)))
2328 (define-public python-virtualenv
2330 (name "python-virtualenv")
2335 (uri (pypi-uri "virtualenv" version))
2338 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2339 (build-system python-build-system)
2342 (modify-phases %standard-phases
2343 (add-before 'check 'disable-failing-test
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"))
2351 `(("python-mock" ,python-mock)
2352 ("python-pytest" ,python-pytest)))
2353 (home-page "https://virtualenv.pypa.io/")
2354 (synopsis "Virtual Python environment builder")
2356 "Virtualenv is a tool to create isolated Python environments.")
2357 (license license:expat)))
2359 (define-public python2-virtualenv
2360 (package-with-python2 python-virtualenv))
2362 (define-public python-markupsafe
2364 (name "python-markupsafe")
2369 (uri (pypi-uri "MarkupSafe" version))
2372 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2373 (build-system python-build-system)
2375 `(#:modules ((ice-9 ftw)
2379 (guix build python-build-system))
2380 #:phases (modify-phases %standard-phases
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")))))))
2391 `(("python-pytest" ,python-pytest)))
2392 (home-page "https://github.com/mitsuhiko/markupsafe")
2393 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2395 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2397 (license license:bsd-3)))
2399 (define-public python2-markupsafe
2400 (package-with-python2 python-markupsafe))
2402 (define-public python-jinja2
2404 (name "python-jinja2")
2409 (uri (pypi-uri "Jinja2" version))
2412 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2413 (build-system python-build-system)
2415 `(("python-markupsafe" ,python-markupsafe)))
2416 (home-page "http://jinja.pocoo.org/")
2417 (synopsis "Python template engine")
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)))
2423 (define-public python2-jinja2
2424 (package-with-python2 python-jinja2))
2426 (define-public python-pystache
2428 (name "python-pystache")
2432 (uri (pypi-uri "pystache" version))
2435 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2436 (build-system python-build-system)
2438 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2439 (home-page "http://defunkt.io/pystache/")
2440 (synopsis "Python logic-less template engine")
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))))))
2447 (define-public python2-pystache
2448 (package (inherit (package-with-python2
2449 (strip-python2-variant python-pystache)))
2451 `(#:python ,python-2
2453 (modify-phases %standard-phases
2456 (invoke "python" "test_pystache.py"))))))))
2458 (define-public python-joblib
2460 (name "python-joblib")
2464 (uri (pypi-uri "joblib" version))
2467 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2468 (build-system python-build-system)
2471 (modify-phases %standard-phases
2473 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2475 `(("python-pytest" ,python-pytest)))
2476 (home-page "https://joblib.readthedocs.io/")
2477 (synopsis "Using Python functions as pipeline jobs")
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)))
2485 (define-public python2-joblib
2486 (package-with-python2 python-joblib))
2488 (define-public python-daemon
2490 (name "python-daemon")
2495 (uri (pypi-uri "python-daemon" version))
2498 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2499 (build-system python-build-system)
2502 (modify-phases %standard-phases
2503 (add-before 'check 'disable-tests
2505 ;; FIXME: Determine why test fails
2506 (substitute* "test/test_daemon.py"
2507 (("test_detaches_process_context")
2508 "skip_test_detaches_process_context"))
2511 `(("python-lockfile" ,python-lockfile)))
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.
2523 This library provides a @code{DaemonContext} class that manages the following
2524 important tasks for becoming a daemon process:
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.
2536 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2537 (license (list license:asl2.0 license:gpl3+))))
2539 (define-public python-docutils
2541 (name "python-docutils")
2546 (uri (pypi-uri "docutils" version))
2549 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2550 (build-system python-build-system)
2552 '(#:tests? #f)) ; no setup.py test command
2553 (home-page "http://docutils.sourceforge.net/")
2554 (synopsis "Python Documentation Utilities")
2556 "Docutils is a modular system for processing documentation into useful
2557 formats, such as HTML, XML, and LaTeX. For input Docutils supports
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+))))
2563 (define-public python2-docutils
2564 (package-with-python2 python-docutils))
2566 (define-public python-pygments
2568 (name "python-pygments")
2573 (uri (pypi-uri "Pygments" version))
2576 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2577 (build-system python-build-system)
2579 ;; FIXME: Tests require sphinx, which depends on this.
2581 (home-page "http://pygments.org/")
2582 (synopsis "Syntax highlighting")
2584 "Pygments is a syntax highlighting package written in Python.")
2585 (license license:bsd-2)))
2587 (define-public python2-pygments
2588 (package-with-python2 python-pygments))
2590 (define-public python-bumpversion
2592 (name "python-bumpversion")
2597 (uri (pypi-uri "bumpversion" version))
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)))
2608 (define-public python-deprecated
2610 (name "python-deprecated")
2616 (url "https://github.com/tantale/deprecated.git")
2617 (commit (string-append "v" version))))
2618 (file-name (git-file-name name version))
2621 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2622 (build-system python-build-system)
2624 `(#:phases (modify-phases %standard-phases
2627 (invoke "pytest"))))))
2629 `(("python-wrapt" ,python-wrapt)))
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)))
2642 (define-public python-pygithub
2644 (name "python-pygithub")
2647 ;; We fetch from the Git repo because there are no tests in the PyPI
2652 (url "https://github.com/PyGithub/PyGithub.git")
2653 (commit (string-append "v" version))))
2654 (file-name (git-file-name name version))
2657 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2658 (build-system python-build-system)
2660 `(#:phases (modify-phases %standard-phases
2661 ;; Some tests rely on the network.
2662 (add-after 'unpack 'disable-failing-tests
2664 (substitute* "tests/Issue142.py"
2665 (("testDecodeJson") "disabled_testDecodeJson"))
2667 (add-before 'check 'prepare-for-tests
2669 (for-each (lambda (f)
2671 (find-files "./tests"))
2672 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2673 (setenv "PYTHONPATH"
2674 (string-append "./tests:" (getenv "PYTHONPATH")))
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+)))
2688 (define-public python-rellu
2690 (name "python-rellu")
2695 (uri (pypi-uri "rellu" version))
2698 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2699 (build-system python-build-system)
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)))
2711 (define-public python-robotframework
2713 (name "python-robotframework")
2715 ;; There are no tests in the PyPI archive.
2720 (url "https://github.com/robotframework/robotframework.git")
2721 (commit (string-append "v" version))))
2722 (file-name (git-file-name name version))
2724 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2725 (patches (search-patches
2726 "python-robotframework-honor-source-date-epoch.patch"))))
2727 (build-system python-build-system)
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")
2737 (copy-recursively "doc/libraries"
2738 (string-append doc "/libraries"))
2742 (invoke "python" "utest/run.py"))))))
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)))
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
2760 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2763 (name "python-robotframework-lint")
2764 (version (git-version "0.9.0" revision commit))
2769 (url "https://github.com/boakley/robotframework-lint.git")
2771 (file-name (git-file-name name version))
2774 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2775 (build-system python-build-system)
2778 (modify-phases %standard-phases
2781 (invoke "python" "-m" "robot" "-A"
2782 "tests/conf/default.args" "tests"))))))
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))))
2791 (define-public python-robotframework-sshlibrary
2793 (name "python-robotframework-sshlibrary")
2795 ;; There are no tests in the PyPI archive.
2800 (url "https://github.com/robotframework/SSHLibrary.git")
2801 (commit (string-append "v" version))))
2802 (file-name (git-file-name name version))
2805 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2806 (build-system python-build-system)
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")
2818 (for-each delete-file (find-files "docs" "\\.rst"))
2819 (copy-recursively "docs" doc)
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"))))))
2828 `(("python-robotframework" ,python-robotframework)
2829 ("python-paramiko" ,python-paramiko)
2830 ("python-scp" ,python-scp)))
2832 `(("openssh" ,openssh)
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:
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.
2850 (license license:asl2.0)))
2852 (define-public python-scp
2859 (uri (pypi-uri "scp" version))
2862 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2863 (build-system python-build-system)
2865 '(#:tests? #f)) ;tests require an SSH server
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+)))
2875 (define-public python-rst.linker
2877 (name "python-rst.linker")
2882 (uri (pypi-uri "rst.linker" version))
2885 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2886 (build-system python-build-system)
2888 `(("python-dateutil" ,python-dateutil)
2889 ("python-six" ,python-six)))
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)))
2902 (define-public python2-rst.linker
2903 (package-with-python2 python-rst.linker))
2905 (define-public python-feedgenerator
2907 (name "python-feedgenerator")
2912 (uri (pypi-uri "feedgenerator" version))
2915 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2916 (modules '((guix build utils)))
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$"))
2924 (build-system python-build-system)
2926 `(("python-pytz" ,python-pytz)
2927 ("python-six" ,python-six)))
2928 (home-page "https://github.com/getpelican/feedgenerator")
2930 "Standalone version of Django's Atom/RSS feed generator")
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)))
2936 (define-public python2-feedgenerator
2937 (package-with-python2 python-feedgenerator))
2939 (define-public python-toml
2941 (name "python-toml")
2946 (uri (pypi-uri "toml" version))
2949 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2950 (build-system python-build-system)
2952 `(#:tests? #f)) ;no tests suite in release
2953 (home-page "https://github.com/uiri/toml")
2954 (synopsis "Library for TOML")
2956 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2957 Language (TOML) configuration files.")
2958 (license license:expat)))
2960 (define-public python-jsonrpc-server
2962 (name "python-jsonrpc-server")
2967 (uri (pypi-uri "python-jsonrpc-server" version))
2970 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2971 (build-system python-build-system)
2973 `(("python-future" ,python-future)
2974 ("python-mock" ,python-mock)
2975 ("python-pytest" ,python-pytest)))
2977 "https://github.com/palantir/python-jsonrpc-server")
2978 (synopsis "JSON RPC 2.0 server library")
2980 "This package provides a JSON RPC 2.0 server library for Python.")
2981 (license license:expat)))
2983 (define-public python-pydocstyle
2985 (name "python-pydocstyle")
2990 (uri (pypi-uri "pydocstyle" version))
2993 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2994 (build-system python-build-system)
2996 `(("python-six" ,python-six)
2997 ("python-snowballstemmer" ,python-snowballstemmer)))
2999 "https://github.com/PyCQA/pydocstyle/")
3000 (synopsis "Python docstring style checker")
3002 "This package provides a style checker for the Python Language
3004 (license license:expat)))
3006 (define-public python-language-server
3008 (name "python-language-server")
3013 (uri (pypi-uri "python-language-server" version))
3016 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3017 (build-system python-build-system)
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")
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)))
3039 (define-public python-black
3041 (name "python-black")
3046 (uri (pypi-uri "black" version))
3049 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3050 (build-system python-build-system)
3053 (modify-phases %standard-phases
3054 (add-after 'patch-source-shebangs 'patch-extra-shebangs
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)
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)))
3074 (define-public python-blinker
3076 (name "python-blinker")
3081 (uri (pypi-uri "blinker" version))
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")
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)))
3093 (define-public python2-blinker
3094 (package-with-python2 python-blinker))
3096 (define-public pelican
3103 (uri (pypi-uri "pelican" version))
3106 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3107 (build-system python-build-system)
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/")
3121 `(;; XXX Requires a lot more packages to do unit tests :P
3123 #:phases (modify-phases %standard-phases
3125 'install 'adjust-requires
3126 ;; Since feedgenerator is installed from git, it doesn't
3127 ;; conform to the version requirements.
3129 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3130 ;; version requirement so setuptools doesn't get confused.
3132 (substitute* "setup.py"
3133 (("['\"]feedgenerator.*?['\"]")
3134 "'feedgenerator'")))))))
3135 (synopsis "Python-based static site publishing system")
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+)))
3142 (define-public mallard-ducktype
3144 (name "mallard-ducktype")
3149 ;; git-reference because a proper source tarball is not available
3150 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3152 (url "https://github.com/projectmallard/mallard-ducktype.git")
3154 (file-name (git-file-name name version))
3157 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3158 (build-system python-build-system)
3161 (modify-phases %standard-phases
3164 (with-directory-excursion "tests"
3165 (invoke "sh" "runtests")))))))
3166 (home-page "http://projectmallard.org")
3167 (synopsis "Convert Ducktype to Mallard documentation markup")
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)))
3175 (define-public python-scikit-image
3177 (name "python-scikit-image")
3182 (uri (pypi-uri "scikit-image" version))
3184 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3185 (build-system python-build-system)
3187 ;; TODO: Some tests require running X11 server. Disable them?
3189 ;; See DEPENDS.txt for the list of build and run time requiremnts
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)))
3201 `(("python-cython" ,python-cython)))
3202 (home-page "http://scikit-image.org/")
3203 (synopsis "Image processing in Python")
3205 "Scikit-image is a collection of algorithms for image processing.")
3206 (license license:bsd-3)))
3208 (define-public python2-scikit-image
3209 (package-with-python2 python-scikit-image))
3211 (define-public python-cython
3213 (name "python-cython")
3218 (uri (pypi-uri "Cython" version))
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
3226 `(("python" ,python)))
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))
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: ===
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
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)))))
3253 ;; Disable compiler optimizations to greatly reduce the running
3254 ;; time of the test suite.
3255 (setenv "CFLAGS" "-O0")
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))))))
3267 (define-public python2-cython
3268 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3271 (name "python2-cython")
3273 `(("python-2" ,python-2))) ;this is not automatically changed
3275 (substitute-keyword-arguments (package-arguments base)
3277 `(modify-phases ,phases
3278 (add-before 'check 'adjust-test_embed
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.
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).
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\\)")
3302 ;; The RPython toolchain currently does not support Python 3.
3303 (define-public python2-rpython
3305 (name "python2-rpython")
3310 (uri (pypi-uri "rpython" version))
3313 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3314 (build-system python-build-system)
3315 (arguments `(#:python ,python-2))
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)))
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
3329 (name "python-numpy")
3335 "https://github.com/numpy/numpy/releases/download/v"
3336 version "/numpy-" version ".tar.gz"))
3339 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3340 (build-system python-build-system)
3342 `(("openblas" ,openblas)
3343 ("lapack" ,lapack)))
3345 `(("python-cython" ,python-cython)
3346 ("python-pytest" ,python-pytest)
3347 ("gfortran" ,gfortran)))
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"
3357 libraries = openblas
3358 library_dirs = ~a/lib
3359 include_dirs = ~a/include
3361 # backslash-n to make emacs happy
3363 lapack_libs = lapack
3364 library_dirs = ~a/lib
3365 include_dirs = ~a/include
3367 (assoc-ref inputs "openblas")
3368 (assoc-ref inputs "openblas")
3369 (assoc-ref inputs "lapack")
3370 (assoc-ref inputs "lapack"))))
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')"))
3384 ;; Tests can only be run after the library has been installed and not
3385 ;; within the source directory.
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
3404 (license license:bsd-3)))
3406 (define-public python2-numpy
3407 (package-with-python2 python-numpy))
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
3412 (define-public python2-numpy-1.8
3413 (package (inherit python2-numpy)
3419 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3420 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3423 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3425 (substitute-keyword-arguments (package-arguments python2-numpy)
3427 `(modify-phases ,phases
3428 (replace 'configure-blas-lapack
3429 (lambda* (#:key inputs #:allow-other-keys)
3430 (call-with-output-file "site.cfg"
3434 libraries = openblas,lapack
3435 library_dirs = ~a/lib:~a/lib
3436 include_dirs = ~a/include:~a/include
3438 (assoc-ref inputs "openblas")
3439 (assoc-ref inputs "lapack")
3440 (assoc-ref inputs "openblas")
3441 (assoc-ref inputs "lapack"))))
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
3452 (license license:bsd-3)))
3454 (define-public python-munch
3456 (name "python-munch")
3461 (uri (pypi-uri "munch" version))
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
3470 (license license:expat)))
3472 (define-public python2-munch
3473 (package-with-python2 python-munch))
3475 (define-public python-colormath
3477 (name "python-colormath")
3482 (uri (pypi-uri "colormath" version))
3485 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3486 (build-system python-build-system)
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")
3493 "This is a Python library for color math and conversions.")
3494 (license license:bsd-3)))
3496 (define-public python2-colormath
3497 (package-with-python2 python-colormath))
3499 (define-public python-spectra
3501 (name "python-spectra")
3506 (uri (pypi-uri "spectra" version))
3509 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3510 (build-system python-build-system)
3513 (modify-phases %standard-phases
3515 (lambda _ (invoke "nosetests" "-v"))))))
3517 `(("python-colormath" ,python-colormath)))
3519 `(("python-nose" ,python-nose)))
3520 (home-page "https://github.com/jsvine/spectra")
3521 (synopsis "Color scales and color conversion")
3523 "This package provides a Python library intended to make color math,
3524 color scales, and color space conversion easy. It has support for:
3529 @item Color blending
3530 @item Brightening/darkening colors
3531 @item Saturating/desaturating colors
3532 @item Conversion to/from multiple color spaces.
3534 (license license:expat)))
3536 (define-public python2-spectra
3537 (package-with-python2 python-spectra))
3539 (define-public python-numpy-documentation
3541 (name "python-numpy-documentation")
3542 (version (package-version python-numpy))
3543 (source (package-source python-numpy))
3544 (build-system python-build-system)
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
3554 texlive-generic-ifxetex
3555 texlive-generic-pdftex
3556 texlive-latex-amsfonts
3557 texlive-latex-capt-of
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
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
3582 texlive-latex-upquote
3584 texlive-latex-varwidth
3585 texlive-latex-wrapfig)))
3586 ("texinfo" ,texinfo)
3588 ("scipy-sphinx-theme"
3589 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3592 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3593 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3596 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3597 ,@(package-native-inputs python-numpy)))
3599 `(#:tests? #f ; we're only generating the documentation
3601 (modify-phases %standard-phases
3604 (lambda* (#:key inputs outputs #:allow-other-keys)
3605 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
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=")))
3615 ;; FIXME: this is needed to for texlive-union to generate
3616 ;; fonts, which are not found.
3617 (setenv "HOME" "/tmp")
3619 (with-directory-excursion "doc"
3620 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
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)
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)
3641 (install-file file html)))
3642 (find-files "." ".*")))))
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))))
3649 (define-public python2-numpy-documentation
3650 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3652 (inherit numpy-documentation)
3653 (native-inputs `(("python2-functools32" ,python2-functools32)
3654 ,@(package-native-inputs numpy-documentation))))))
3656 (define-public python-pygit2
3658 (name "python-pygit2")
3663 (uri (pypi-uri "pygit2" version))
3665 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3666 (build-system python-build-system)
3668 '(#:tests? #f)) ; tests don't run correctly in our environment
3670 `(("python-six" ,python-six)
3671 ("python-cffi" ,python-cffi)
3672 ("libgit2" ,libgit2)
3673 ("python-tox" ,python-tox)))
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)))
3683 (define-public python2-pygit2
3684 (package-with-python2 python-pygit2))
3686 (define-public python-pyparsing
3688 (name "python-pyparsing")
3693 (uri (pypi-uri "pyparsing" version))
3695 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3696 (build-system python-build-system)
3697 (outputs '("out" "doc"))
3699 `(#:tests? #f ; no test target
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")))
3713 (install-file file tgt))
3714 (find-files dir ".*")))
3715 (list "docs" "htmldoc" "examples")
3716 (list doc html-doc examples))
3718 (home-page "https://github.com/pyparsing/pyparsing")
3719 (synopsis "Python parsing class library")
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)))
3727 (define-public python2-pyparsing
3728 (package-with-python2 python-pyparsing))
3730 (define-public python-numpydoc
3732 (name "python-numpydoc")
3737 (uri (pypi-uri "numpydoc" version))
3740 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3741 (build-system python-build-system)
3743 `(("python-sphinx" ,python-sphinx)))
3745 `(("python-nose" ,python-nose)))
3746 (home-page "https://pypi.python.org/pypi/numpydoc")
3748 "Numpy's Sphinx extensions")
3750 "Sphinx extension to support docstrings in Numpy format.")
3751 (license license:bsd-2)))
3753 (define-public python2-numpydoc
3754 (package-with-python2 python-numpydoc))
3756 (define-public python-numexpr
3758 (name "python-numexpr")
3763 (uri (pypi-uri "numexpr" version))
3766 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3767 (build-system python-build-system)
3768 (arguments `(#:tests? #f)) ; no tests included
3770 `(("python-numpy" ,python-numpy)))
3771 (home-page "https://github.com/pydata/numexpr")
3772 (synopsis "Fast numerical expression evaluator for NumPy")
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)))
3782 (define-public python2-numexpr
3783 (package-with-python2 python-numexpr))
3785 (define-public python-cycler
3787 (name "python-cycler")
3791 (uri (pypi-uri "cycler" version))
3794 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3795 (build-system python-build-system)
3797 ;; XXX: The current version requires 'coveralls' which we don't have.
3798 ;; Enable this for the next release which uses 'python-pytest'.
3801 `(("python-six" ,python-six)))
3802 (home-page "http://matplotlib.org/cycler/")
3803 (synopsis "Composable keyword argument iterator")
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)))
3812 (define-public python2-cycler
3813 (package-with-python2 python-cycler))
3815 (define-public python-colorspacious
3817 (name "python-colorspacious")
3823 (url "https://github.com/njsmith/colorspacious.git")
3824 (commit (string-append "v" version))))
3825 (file-name (git-file-name name version))
3827 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3828 (build-system python-build-system)
3830 `(("python-numpy" ,python-numpy)))
3832 `(("python-nose" ,python-nose)))
3835 (modify-phases %standard-phases
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)))
3845 (define-public python2-colorspacious
3846 (package-with-python2 python-colorspacious))
3848 (define-public python-matplotlib
3850 (name "python-matplotlib")
3855 (uri (pypi-uri "matplotlib" version))
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)))
3879 `(("libpng" ,libpng)
3880 ("imagemagick" ,imagemagick)
3881 ("freetype" ,freetype)
3884 ;; FIXME: Add backends when available.
3885 ;("python-wxpython" ,python-wxpython)
3889 `(("pkg-config" ,pkg-config)
3890 ("python-nose" ,python-nose)
3891 ("python-mock" ,python-mock)))
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'
3900 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3901 (setenv "HOME" (getcwd))
3902 (call-with-output-file "setup.cfg"
3904 (format port "[directories]~%
3905 basedirlist = ~a,~a~%
3908 (assoc-ref inputs "tcl")
3909 (assoc-ref inputs "tk")))))
3911 (home-page "http://matplotlib.org")
3912 (synopsis "2D plotting library for Python")
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
3919 (license license:psfl)
3920 (properties `((python2-variant . ,(delay python2-matplotlib))))))
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.
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")))))))
3939 (define-public python-matplotlib-documentation
3941 (name "python-matplotlib-documentation")
3942 (version (package-version python-matplotlib))
3943 (source (package-source python-matplotlib))
3944 (build-system python-build-system)
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
3964 texlive-generic-pdftex
3966 texlive-fonts-amsfonts
3968 texlive-fonts-adobe-times
3969 texlive-fonts-txfonts)))
3970 ("texinfo" ,texinfo)
3971 ,@(package-native-inputs python-matplotlib)))
3973 `(#:tests? #f ; we're only generating documentation
3975 (modify-phases %standard-phases
3979 (setenv "PYTHONPATH"
3980 (string-append (getenv "PYTHONPATH")
3981 ":" (getcwd) "/../examples/units"))
3982 (substitute* "conf.py"
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"))
3994 "SPHINXBUILD=sphinx-build"
3995 "SPHINXOPTS=" ; don't abort on warnings
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")))
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))
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))))
4023 (define-public python2-matplotlib-documentation
4024 (package-with-python2 python-matplotlib-documentation))
4026 (define-public python-matplotlib-venn
4028 (name "python-matplotlib-venn")
4033 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4036 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4037 (build-system python-build-system)
4038 (arguments '(#:tests? #f)) ; tests are not included
4040 `(("python-matplotlib" ,python-matplotlib)
4041 ("python-numpy" ,python-numpy)
4042 ("python-scipy" ,python-scipy)))
4044 `(("unzip" ,unzip)))
4045 (home-page "https://github.com/konstantint/matplotlib-venn")
4046 (synopsis "Plot area-proportional Venn diagrams")
4048 "This package provides tools for plotting area-proportional two- and
4049 three-way Venn diagrams in @code{matplotlib}.")
4050 (license license:expat)))
4052 (define-public python2-pysnptools
4054 (name "python2-pysnptools")
4059 (uri (pypi-uri "pysnptools" version))
4062 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4063 (build-system python-build-system)
4065 `(#:python ,python-2 ; only Python 2.7 is supported
4066 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4068 `(("python2-numpy" ,python2-numpy)
4069 ("python2-scipy" ,python2-scipy)
4070 ("python2-pandas" ,python2-pandas)))
4072 `(("python2-cython" ,python2-cython)))
4073 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4074 (synopsis "Library for reading and manipulating genetic data")
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)))
4082 (define-public python-scipy
4084 (name "python-scipy")
4089 (uri (pypi-uri "scipy" version))
4092 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4093 (build-system python-build-system)
4095 `(("python-numpy" ,python-numpy)
4096 ("python-matplotlib" ,python-matplotlib)
4097 ("python-pyparsing" ,python-pyparsing)))
4099 `(("lapack" ,lapack)
4100 ("openblas" ,openblas)))
4102 `(("python-cython" ,python-cython)
4103 ("python-pytest" ,python-pytest)
4104 ("python-sphinx" ,python-sphinx)
4105 ("python-numpydoc" ,python-numpydoc)
4106 ("gfortran" ,gfortran)
4109 (outputs '("out" "doc"))
4112 (modify-phases %standard-phases
4113 (add-after 'unpack 'disable-broken-tests
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"
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"
4125 (add-before 'build 'configure-openblas
4126 (lambda* (#:key inputs #:allow-other-keys)
4127 (call-with-output-file "site.cfg"
4131 libraries = openblas
4132 library_dirs = ~a/lib
4133 include_dirs = ~a/include
4135 # backslash-n to make emacs happy
4137 library_dirs = ~a/lib
4138 atlas_libs = openblas
4140 (assoc-ref inputs "openblas")
4141 (assoc-ref inputs "openblas")
4142 (assoc-ref inputs "openblas"))))
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
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"))
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 "." ".*")))))
4171 ;; Tests can only be run after the library has been installed and not
4172 ;; within the source directory.
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)))
4188 (define-public python2-scipy
4189 (package-with-python2
4190 (strip-python2-variant python-scipy)))
4192 (define-public python-socksipy-branch
4194 (name "python-socksipy-branch")
4199 (uri (pypi-uri "SocksiPy-branch" version))
4202 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4203 (build-system python-build-system)
4205 `(#:tests? #f)) ; There are no tests
4206 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4207 (synopsis "Python SOCKS module")
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)))
4217 (define-public python2-socksipy-branch
4218 (package-with-python2 python-socksipy-branch))
4220 (define-public python-pycodestyle
4222 (name "python-pycodestyle")
4227 (uri (pypi-uri "pycodestyle" version))
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)))
4239 (define-public python2-pycodestyle
4240 (package-with-python2 python-pycodestyle))
4242 (define-public python-multidict
4244 (name "python-multidict")
4249 (uri (pypi-uri "multidict" version))
4252 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4253 (build-system python-build-system)
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)))
4263 (define-public python-orderedmultidict
4265 (name "python-orderedmultidict")
4270 (uri (pypi-uri "orderedmultidict" version))
4273 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4274 (build-system python-build-system)
4277 (modify-phases %standard-phases
4278 (add-after 'unpack 'fix-tests
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)
4286 `(("python-six" ,python-six)))
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)))
4297 (define-public python2-orderedmultidict
4298 (package-with-python2 python-orderedmultidict))
4300 (define-public python-autopep8
4302 (name "python-autopep8")
4307 (uri (pypi-uri "autopep8" version))
4310 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4311 (build-system python-build-system)
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")
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
4322 (license (license:non-copyleft
4323 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4325 (define-public python2-autopep8
4326 (package-with-python2 python-autopep8))
4328 (define-public python-distutils-extra
4330 (name "python-distutils-extra")
4335 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4336 version "/+download/python-distutils-extra-"
4340 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4341 (build-system python-build-system)
4342 (home-page "https://launchpad.net/python-distutils-extra/")
4343 (synopsis "Enhancements to Python's distutils")
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)))
4350 (define-public python2-distutils-extra
4351 (package-with-python2 python-distutils-extra))
4353 (define-public python2-elib.intl
4355 (name "python2-elib.intl")
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.
4363 (url "https://github.com/dieterv/elib.intl.git")
4364 (commit "d09997cfef")))
4365 (file-name (string-append name "-" version "-checkout"))
4368 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4369 (build-system python-build-system)
4371 ;; incompatible with Python 3 (exception syntax)
4372 `(#:python ,python-2
4374 (home-page "https://github.com/dieterv/elib.intl")
4375 (synopsis "Enhanced internationalization for Python")
4377 "The elib.intl module provides enhanced internationalization (I18N)
4378 services for your Python modules and applications.")
4379 (license license:lgpl3+)))
4381 (define-public python-olefile
4383 (name "python-olefile")
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"))
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.")
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)))
4403 (define-public python2-olefile
4404 (package-with-python2 python-olefile))
4406 (define-public python-pillow
4408 (name "python-pillow")
4413 (uri (pypi-uri "Pillow" version))
4416 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4417 (build-system python-build-system)
4419 `(("python-pytest" ,python-pytest)))
4421 `(("freetype" ,freetype)
4424 ("libjpeg" ,libjpeg)
4425 ("openjpeg" ,openjpeg)
4426 ("libtiff" ,libtiff)
4427 ("libwebp" ,libwebp)))
4429 `(("python-olefile" ,python-olefile)))
4432 (modify-phases %standard-phases
4433 (add-after 'unpack 'patch-ldconfig
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)
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")
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"))))
4459 (define-public python2-pillow
4460 (package-with-python2 python-pillow))
4462 (define-public python-pycparser
4464 (name "python-pycparser")
4469 (uri (pypi-uri "pycparser" version))
4472 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4473 (outputs '("out" "doc"))
4474 (build-system python-build-system)
4476 `(("pkg-config" ,pkg-config)))
4479 (modify-phases %standard-phases
4482 (with-directory-excursion "tests"
4483 (invoke "python" "all_tests.py"))
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")))
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)
4497 (home-page "https://github.com/eliben/pycparser")
4498 (synopsis "C parser in Python")
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)))
4505 (define-public python2-pycparser
4506 (package-with-python2 python-pycparser))
4508 (define-public python-pywavelets
4510 (name "python-pywavelets")
4512 (home-page "https://github.com/PyWavelets/pywt")
4515 (uri (pypi-uri "PyWavelets" version))
4518 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4519 (build-system python-build-system)
4521 '(#:modules ((ice-9 ftw)
4525 (guix build python-build-system))
4526 #:phases (modify-phases %standard-phases
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" "."))))))))
4535 `(("python-matplotlib" ,python-matplotlib) ;for tests
4536 ("python-nose" ,python-nose)))
4538 `(("python-numpy" ,python-numpy)))
4539 (synopsis "Wavelet transforms in Python")
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)))
4548 (define-public python2-pywavelets
4549 (package-with-python2 python-pywavelets))
4551 (define-public python-xcffib
4553 (name "python-xcffib")
4558 (uri (pypi-uri "xcffib" version))
4561 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4562 (build-system python-build-system)
4564 `(("libxcb" ,libxcb)))
4566 `(("python-cffi" ,python-cffi) ; used at run time
4567 ("python-six" ,python-six)))
4569 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
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/")))
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)))
4584 (copy-file "README.md"
4585 (string-append doc "/README.md"))
4587 (home-page "https://github.com/tych0/xcffib")
4588 (synopsis "XCB Python bindings")
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)))
4594 (define-public python2-xcffib
4595 (package-with-python2 python-xcffib))
4597 (define-public python-cairocffi
4599 (name "python-cairocffi")
4604 (uri (pypi-uri "cairocffi" version))
4607 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4608 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4609 (build-system python-build-system)
4610 (outputs '("out" "doc"))
4614 ("gdk-pixbuf" ,gdk-pixbuf)
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)))
4625 `(("python-xcffib" ,python-xcffib))) ; used at run time
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'")))
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")
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)
4671 (home-page "https://github.com/Kozea/cairocffi")
4672 (synopsis "Python bindings and object-oriented API for Cairo")
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)))
4680 (define-public python2-cairocffi
4681 (package-with-python2 python-cairocffi))
4683 (define-public python-decorator
4685 (name "python-decorator")
4690 (uri (pypi-uri "decorator" version))
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")
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)))
4703 (define-public python2-decorator
4704 (package-with-python2 python-decorator))
4706 (define-public python-drmaa
4708 (name "python-drmaa")
4713 (uri (pypi-uri "drmaa" version))
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))
4722 `(("python-nose" ,python-nose)))
4723 (home-page "https://pypi.python.org/pypi/drmaa")
4724 (synopsis "Python bindings for the DRMAA library")
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)))
4731 (define-public python2-drmaa
4732 (package-with-python2 python-drmaa))
4734 (define-public python-grako
4736 (name "python-grako")
4742 (pypi-uri "grako" version ".zip"))
4745 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4746 (build-system python-build-system)
4747 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
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")
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)))
4759 (define-public python2-grako
4760 (package-with-python2 python-grako))
4762 (define-public python-gridmap
4764 (name "python-gridmap")
4770 (url "https://github.com/pygridtools/gridmap.git")
4771 (commit (string-append "v" version))))
4772 (file-name (git-file-name name version))
4774 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4775 (build-system python-build-system)
4777 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
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")
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+)))
4790 (define-public python2-gridmap
4791 (package-with-python2 python-gridmap))
4793 (define-public python-honcho
4795 (name "python-honcho")
4801 (url "https://github.com/nickstenning/honcho.git")
4802 (commit (string-append "v" version))))
4803 (file-name (git-file-name name version))
4805 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4806 (build-system python-build-system)
4808 `(("python-pytest" ,python-pytest)
4809 ("python-mock" ,python-mock)
4810 ("python-tox" ,python-tox)
4811 ("which" ,which))) ;for tests
4813 `(("python-jinja2" ,python-jinja2)))
4816 (modify-phases %standard-phases
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")
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
4835 (license license:expat)))
4837 (define-public python2-honcho
4838 (package-with-python2 python-honcho))
4840 (define-public python-pexpect
4842 (name "python-pexpect")
4847 (uri (pypi-uri "pexpect" version))
4849 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4850 (build-system python-build-system)
4853 (modify-phases %standard-phases
4854 (add-before 'check 'prepare-tests
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")
4868 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4870 `(("python-nose" ,python-nose)
4871 ("python-pytest" ,python-pytest)
4874 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4876 `(("python-ptyprocess" ,python-ptyprocess)))
4877 (home-page "http://pexpect.readthedocs.org/")
4878 (synopsis "Controlling interactive console applications")
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)))
4886 (define-public python2-pexpect
4887 (package-with-python2 python-pexpect))
4889 (define-public python-setuptools-scm
4891 (name "python-setuptools-scm")
4895 (uri (pypi-uri "setuptools_scm" version))
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")
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)))
4908 (define-public python2-setuptools-scm
4909 (package-with-python2 python-setuptools-scm))
4911 (define-public python-pathlib2
4913 (name "python-pathlib2")
4918 (uri (pypi-uri "pathlib2" version))
4921 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4922 (build-system python-build-system)
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)))
4934 (define-public python-importlib-metadata
4936 (name "python-importlib-metadata")
4941 (uri (pypi-uri "importlib_metadata" version))
4944 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4945 (build-system python-build-system)
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)))
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")
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)))
4967 (define-public python-jaraco-packaging
4969 (name "python-jaraco-packaging")
4974 (uri (pypi-uri "jaraco.packaging" version))
4977 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4978 (build-system python-build-system)
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")
4991 "This package provides various tools to supplement packaging Python
4993 (license license:expat)))
4995 (define-public python-pathpy
4997 (name "python-pathpy")
5002 (uri (pypi-uri "path.py" version))
5004 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5005 (outputs '("out" "doc"))
5006 (build-system python-build-system)
5008 `(("python-appdirs" ,python-appdirs)))
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)))
5018 (modify-phases %standard-phases
5019 (add-after 'build 'build-doc
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")))
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)
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")
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)))
5046 (define-public python2-pathpy
5047 (package-with-python2 python-pathpy))
5049 (define-public python-simplegeneric
5051 (name "python-simplegeneric")
5056 (uri (pypi-uri "simplegeneric" version ".zip"))
5058 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5059 (build-system python-build-system)
5061 `(("unzip" ,unzip)))
5062 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5063 (synopsis "Python module for simple generic functions")
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
5071 (license license:zpl2.1)))
5073 (define-public python2-simplegeneric
5074 (package-with-python2 python-simplegeneric))
5076 (define-public python-ipython-genutils
5077 ;; TODO: This package is retired, check if can be removed, see description.
5079 (name "python-ipython-genutils")
5084 (uri (pypi-uri "ipython_genutils" version))
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")
5092 "This package provides retired utilities from IPython. No packages
5093 outside IPython/Jupyter should depend on it.
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
5099 (license license:bsd-3)))
5101 (define-public python2-ipython-genutils
5102 (package-with-python2 python-ipython-genutils))
5104 (define-public python-traitlets
5106 (name "python-traitlets")
5111 (uri (pypi-uri "traitlets" version))
5114 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5115 (build-system python-build-system)
5118 (modify-phases %standard-phases
5119 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5121 `(("python-ipython-genutils" ,python-ipython-genutils)
5122 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
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")
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)))
5137 (define-public python2-traitlets
5138 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5142 `(("python2-enum34" ,python2-enum34)
5143 ,@(package-propagated-inputs traitlets))))))
5145 (define-public python-jupyter-core
5147 (name "python-jupyter-core")
5152 (uri (string-append (pypi-uri "jupyter_core" version)))
5155 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5156 (build-system python-build-system)
5157 ;; FIXME: not sure how to run the tests
5158 (arguments `(#:tests? #f))
5160 `(("python-traitlets" ,python-traitlets)))
5161 (home-page "http://jupyter.org/")
5162 (synopsis "Jupyter base package")
5164 "Jupyter core is the base package on which Jupyter projects rely.")
5165 (license license:bsd-3)))
5167 (define-public python2-jupyter-core
5168 (package-with-python2 python-jupyter-core))
5170 (define-public python-jupyter-client
5172 (name "python-jupyter-client")
5177 (uri (pypi-uri "jupyter_client" version))
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.
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"
5194 (string-append "'" iproute "/sbin/ip'")))
5197 `(("iproute" ,iproute)))
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")
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)))
5211 (define-public python2-jupyter-client
5212 (package-with-python2 python-jupyter-client))
5214 (define-public python-ipykernel
5216 (name "python-ipykernel")
5221 (uri (pypi-uri "ipykernel" version))
5223 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5224 (build-system python-build-system)
5227 (modify-phases %standard-phases
5230 (setenv "HOME" "/tmp")
5231 (invoke "pytest" "-v")
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
5237 (let ((out (assoc-ref outputs "out")))
5238 (substitute* (string-append out "/share/jupyter"
5239 "/kernels/python3/kernel.json")
5241 (string-append "\"" (which "python") "\"")))
5244 `(("python-ipython" ,python-ipython)
5245 ;; imported at runtime during connect
5246 ("python-jupyter-client" ,python-jupyter-client)))
5248 `(("python-pytest" ,python-pytest)
5249 ("python-nose" ,python-nose)))
5250 (home-page "https://ipython.org")
5251 (synopsis "IPython Kernel for Jupyter")
5253 "This package provides the IPython kernel for Jupyter.")
5254 (license license:bsd-3)))
5256 ;; Version 5.1.1 and above no longer support Python 2.
5257 (define-public python2-ipykernel
5259 (name "python2-ipykernel")
5264 (uri (pypi-uri "ipykernel" version))
5266 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5267 (build-system python-build-system)
5269 `(#:python ,python-2
5271 (modify-phases %standard-phases
5274 (setenv "HOME" "/tmp")
5275 (invoke "pytest" "-v")
5278 `(("python2-ipython" ,python2-ipython)
5279 ;; imported at runtime during connect
5280 ("python2-jupyter-client" ,python2-jupyter-client)))
5282 `(("python2-pytest" ,python2-pytest)
5283 ("python2-nose" ,python2-nose)))
5284 (home-page "https://ipython.org")
5285 (synopsis "IPython Kernel for Jupyter")
5287 "This package provides the IPython kernel for Jupyter.")
5288 (license license:bsd-3)))
5290 (define-public python-pari-jupyter
5292 (name "python-pari-jupyter")
5297 (uri (pypi-uri "pari_jupyter" version))
5300 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5301 (build-system python-build-system)
5303 `(("python-ipykernel" ,python-ipykernel)))
5305 `(("pari-gp" ,pari-gp)
5306 ("readline" ,readline)))
5308 `(#:tests? #f)) ; no test suite
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+)))
5315 (define-public python-backcall
5317 (name "python-backcall")
5322 (uri (pypi-uri "backcall" version))
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")
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)))
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
5342 (name "python2-ipython")
5347 (uri (pypi-uri "ipython" version ".tar.gz"))
5349 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5350 (build-system python-build-system)
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)))
5371 `(("readline" ,readline)
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)))
5381 `(#:python ,python-2
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")
5391 (home-page "https://ipython.org")
5392 (synopsis "IPython is a tool for interactive computing in Python")
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
5398 (license license:bsd-3)))
5400 (define-public python-ipython
5402 (name "python-ipython")
5407 (uri (pypi-uri "ipython" version ".tar.gz"))
5409 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5410 (build-system python-build-system)
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)))
5430 `(("readline" ,readline)
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)))
5440 (modify-phases %standard-phases
5441 ;; Tests can only be run after the library has been installed and not
5442 ;; within the source directory.
5444 (add-after 'install 'check
5445 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
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"))
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")
5469 (home-page "https://ipython.org")
5470 (synopsis "IPython is a tool for interactive computing in Python")
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
5476 (license license:bsd-3)))
5478 (define-public python-ipython-documentation
5480 (inherit python-ipython)
5481 (name "python-ipython-documentation")
5482 (version (package-version python-ipython))
5485 (modify-phases %standard-phases
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
5504 ;; (system* "make" python-arg "info")
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"))
5512 ;; (copy-file "docs/build/texinfo/ipython.info"
5513 ;; (string-append info "/ipython.info"))
5514 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5517 `(("python-ipython" ,python-ipython)
5518 ("python-ipykernel" ,python-ipykernel)))
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
5525 texlive-generic-ifxetex
5526 texlive-generic-pdftex
5527 texlive-latex-amsfonts
5528 texlive-latex-capt-of
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
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
5553 texlive-latex-upquote
5555 texlive-latex-varwidth
5556 texlive-latex-wrapfig)))
5557 ("texinfo" ,texinfo)))))
5559 (define-public python-urwid
5561 (name "python-urwid")
5566 (uri (pypi-uri "urwid" version))
5569 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5570 (build-system python-build-system)
5571 (home-page "http://urwid.org")
5572 (synopsis "Console user interface library for Python")
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+)))
5578 (define-public python2-urwid
5579 (package-with-python2 python-urwid))
5581 (define-public python-urwidtrees
5583 (name "python-urwidtrees")
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/"
5592 (file-name (string-append name "-" version ".tar.gz"))
5595 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5596 (build-system python-build-system)
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+)))
5606 (define-public python2-urwidtrees
5607 (package-with-python2 python-urwidtrees))
5609 (define-public python-ua-parser
5611 (name "python-ua-parser")
5616 (uri (pypi-uri "ua-parser" version))
5619 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5620 (build-system python-build-system)
5622 `(#:tests? #f)) ;no test suite in release
5624 `(("python-pyyaml" ,python-pyyaml)))
5625 (home-page "https://github.com/ua-parser/uap-python")
5626 (synopsis "User agent parser")
5628 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5629 (license license:asl2.0)))
5631 (define-public python2-ua-parser
5632 (package-with-python2 python-ua-parser))
5634 (define-public python-user-agents
5636 (name "python-user-agents")
5641 (uri (pypi-uri "user-agents" version))
5644 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5645 (build-system python-build-system)
5647 `(#:tests? #f)) ;missing devices.json test file in release
5649 `(("python-ua-parser" ,python-ua-parser)))
5650 (home-page "https://github.com/selwin/python-user-agents")
5651 (synopsis "User Agent strings parsing library")
5653 "A library to identify devices (phones, tablets) and their capabilities by
5654 parsing (browser/HTTP) user agent strings.")
5655 (license license:expat)))
5657 (define-public python2-user-agents
5658 (package-with-python2 python-user-agents))
5660 (define-public python-dbus
5662 (name "python-dbus")
5667 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5668 "dbus-python-" version ".tar.gz"))
5671 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5672 (build-system gnu-build-system)
5675 (modify-phases %standard-phases
5679 ;; XXX: For the missing '/etc/machine-id'.
5680 (substitute* "test/run-test.sh"
5681 (("DBUS_FATAL_WARNINGS=1")
5682 "DBUS_FATAL_WARNINGS=0"))
5685 `(("pkg-config" ,pkg-config)))
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)))
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)
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))))
5706 (define-public python-notify2
5708 (name "python-notify2")
5713 (uri (pypi-uri "notify2" version))
5716 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5717 (build-system python-build-system)
5718 (arguments `(#:tests? #f)) ; tests depend on system state
5720 `(("python-dbus" ,python-dbus)))
5721 (home-page "https://bitbucket.org/takluyver/pynotify2")
5722 (synopsis "Python interface to D-Bus notifications")
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+))))
5730 (define-public python2-notify2
5731 (package-with-python2 python-notify2))
5733 (define-public python-lxml
5735 (name "python-lxml")
5740 (uri (pypi-uri "lxml" version))
5743 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5744 (build-system python-build-system)
5746 `(("libxml2" ,libxml2)
5747 ("libxslt" ,libxslt)))
5748 (home-page "http://lxml.de/")
5750 "Python XML processing library")
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
5756 (define-public python2-lxml
5757 (package-with-python2 python-lxml))
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
5763 (name "python-beautifulsoup4")
5768 (uri (pypi-uri "beautifulsoup4" version))
5771 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5772 (build-system python-build-system)
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
5782 (lambda _ (invoke "./convert-py3k"))))))
5784 `(("python-soupsieve" ,python-soupsieve)))
5786 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5788 "Python screen-scraping library")
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))))))
5798 (define-public python2-beautifulsoup4
5800 (inherit (package-with-python2
5801 (strip-python2-variant python-beautifulsoup4)))
5802 (arguments `(#:python ,python-2))))
5804 (define-public python-soupsieve
5806 (name "python-soupsieve")
5811 (uri (pypi-uri "soupsieve" version))
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")
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)))
5831 (define-public python2-soupsieve
5832 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5836 `(("python2-backports-functools-lru-cache"
5837 ,python2-backports-functools-lru-cache)
5838 ,@(package-propagated-inputs base))))))
5840 (define-public python-netifaces
5842 (name "python-netifaces")
5847 (uri (pypi-uri "netifaces" version))
5850 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5851 (build-system python-build-system)
5852 (home-page "https://github.com/al45tair/netifaces")
5854 "Python module for portable network interface information")
5856 "Netifaces is a Python module providing information on network
5857 interfaces in an easy and portable manner.")
5858 (license license:expat)))
5860 (define-public python2-netifaces
5861 (package-with-python2 python-netifaces))
5863 (define-public python-networkx
5865 (name "python-networkx")
5870 (uri (pypi-uri "networkx" version ".zip"))
5872 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5873 (build-system python-build-system)
5874 ;; python-decorator is needed at runtime.
5876 `(("python-decorator" ,python-decorator)))
5878 `(("python-nose" ,python-nose)
5880 (home-page "https://networkx.github.io/")
5881 (synopsis "Python module for creating and manipulating graphs and networks")
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)))
5887 (define-public python2-networkx
5888 (package-with-python2 python-networkx))
5890 (define-public python-datrie
5892 (name "python-datrie")
5897 (uri (pypi-uri "datrie" version))
5900 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5901 (build-system python-build-system)
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")
5910 "This package provides a fast, efficiently stored trie implementation for
5912 (license license:lgpl2.1+)))
5914 (define-public snakemake
5921 (uri (pypi-uri "snakemake" version))
5923 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5924 (build-system python-build-system)
5926 ;; TODO: Package missing test dependencies.
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")
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")
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)))
5961 ;; This is currently needed for the pigx-* packages.
5962 (define-public snakemake-4
5963 (package (inherit snakemake)
5968 (uri (pypi-uri "snakemake" version))
5970 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
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)))))
5979 (define-public python-pyqrcode
5981 (name "python-pyqrcode")
5986 (uri (pypi-uri "PyQRCode" version))
5989 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5990 (build-system python-build-system)
5992 "https://github.com/mnooner256/pyqrcode")
5993 (synopsis "QR code generator")
5995 "Pyqrcode is a QR code generator written purely in Python with
5996 SVG, EPS, PNG and terminal output.")
5997 (license license:bsd-3)))
5999 (define-public python-seaborn
6001 (name "python-seaborn")
6006 (uri (pypi-uri "seaborn" version))
6008 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6009 (build-system python-build-system)
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")
6021 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6023 `(("python-pandas" ,python-pandas)
6024 ("python-matplotlib" ,python-matplotlib)
6025 ("python-numpy" ,python-numpy)
6026 ("python-scipy" ,python-scipy)))
6028 `(("python-pytest" ,python-pytest)
6029 ("xorg-server" ,xorg-server)))
6030 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6031 (synopsis "Statistical data visualization")
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)))
6039 (define-public python2-seaborn
6040 (package-with-python2 python-seaborn))
6042 (define-public python-mpmath
6044 (name "python-mpmath")
6048 (uri (string-append "http://mpmath.org/files/mpmath-"
6052 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6053 (build-system python-build-system)
6056 (modify-phases %standard-phases
6059 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6060 (home-page "http://mpmath.org")
6061 (synopsis "Arbitrary-precision floating-point arithmetic in python")
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)))
6068 (define-public python2-mpmath
6069 (package-with-python2 python-mpmath))
6071 (define-public python-bigfloat
6073 (name "python-bigfloat")
6078 (uri (pypi-uri "bigfloat" version))
6080 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6081 (build-system python-build-system)
6084 (home-page "https://github.com/mdickinson/bigfloat")
6085 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6087 "This package provides a Python interface to the MPFR library for
6088 multiprecision arithmetic.")
6089 (license license:lgpl3+)))
6091 (define-public python2-bigfloat
6092 (package-with-python2 python-bigfloat))
6094 (define-public python-sympy
6096 (name "python-sympy")
6102 "https://github.com/sympy/sympy/releases/download/sympy-"
6103 version "/sympy-" version ".tar.gz"))
6105 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6106 (build-system python-build-system)
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
6114 (add-after 'install 'check
6115 (lambda* (#:key outputs #:allow-other-keys)
6116 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6119 `(("python-mpmath" ,python-mpmath)))
6120 (home-page "http://www.sympy.org/")
6121 (synopsis "Python library for symbolic mathematics")
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)))
6128 (define-public python2-sympy
6130 (inherit (package-with-python2 python-sympy))
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
6138 (add-after 'install 'check
6139 (lambda* (#:key outputs #:allow-other-keys)
6140 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6143 (define-public python-q
6150 (uri (pypi-uri "q" version))
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")
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)))
6163 (define-public python2-q
6164 (package-with-python2 python-q))
6166 (define-public python2-xlib
6168 (name "python2-xlib")
6172 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6174 "python-xlib-" version ".tar.gz"))
6177 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6178 (build-system python-build-system)
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")
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+)))
6190 (define-public python-singledispatch
6192 (name "python-singledispatch")
6197 (uri (pypi-uri "singledispatch" version))
6200 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6201 (build-system python-build-system)
6203 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6205 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6206 (synopsis "Backport of singledispatch feature from Python 3.4")
6208 "This library brings functools.singledispatch from Python 3.4 to Python
6210 (license license:expat)))
6212 (define-public python2-singledispatch
6213 (package-with-python2 python-singledispatch))
6215 ;; the python- version can be removed with python-3.5
6216 (define-public python-backports-abc
6218 (name "python-backports-abc")
6223 (uri (pypi-uri "backports_abc" version))
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")
6231 "Python-backports-abc provides a backport of additions to the
6232 @code{collections.abc} module in Python-3.5.")
6233 (license license:psfl)))
6235 (define-public python2-backports-abc
6236 (package-with-python2 python-backports-abc))
6238 (define-public python-backports-csv
6240 (name "python-backports-csv")
6245 (uri (pypi-uri "backports.csv" version))
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")
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)))
6260 (define-public python2-backports-csv
6261 (package-with-python2 python-backports-csv))
6263 (define-public python2-backports-shutil-get-terminal-size
6265 (name "python2-backports-shutil-get-terminal-size")
6270 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6273 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6274 (build-system python-build-system)
6276 `(#:python ,python-2
6278 (modify-phases %standard-phases
6281 (invoke "py.test" "-v"))))))
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}")
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)))
6293 (define-public python-waf
6299 (uri (string-append "https://waf.io/"
6300 "waf-" version ".tar.bz2"))
6303 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6304 (build-system python-build-system)
6307 (modify-phases %standard-phases
6310 (invoke "python" "waf-light" "configure" "build")))
6313 (invoke "python" "waf" "--version")))
6315 (lambda* (#:key outputs #:allow-other-keys)
6316 (let ((out (assoc-ref outputs "out")))
6317 (install-file "waf" (string-append out "/bin")))
6319 ;; waf breaks when it is wrapped.
6321 (home-page "https://waf.io/")
6322 (synopsis "Python-based build system")
6324 "Waf is a Python-based framework for configuring, compiling and installing
6326 (license license:bsd-3)))
6328 (define-public python2-waf
6329 (package-with-python2 python-waf))
6331 (define-public python-pyzmq
6333 (name "python-pyzmq")
6338 (uri (pypi-uri "pyzmq" version))
6340 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6341 (build-system python-build-system)
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.
6349 `(("zeromq" ,zeromq)))
6351 `(("pkg-config" ,pkg-config)
6352 ("python-nose" ,python-nose)))
6353 (home-page "https://github.com/zeromq/pyzmq")
6354 (synopsis "Python bindings for 0MQ")
6356 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6357 (license license:bsd-4)))
6359 (define-public python2-pyzmq
6360 (package-with-python2 python-pyzmq))
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.
6367 (name "python-pep8")
6372 (uri (pypi-uri "pep8" version))
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")
6381 "This tools checks Python code against some of the style conventions in
6383 (license license:expat)))
6385 (define-public python2-pep8
6386 (package-with-python2 python-pep8))
6388 (define-public python-pyflakes
6390 (name "python-pyflakes")
6395 (uri (pypi-uri "pyflakes" version))
6398 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6399 (build-system python-build-system)
6401 "https://github.com/pyflakes/pyflakes")
6402 (synopsis "Passive checker of Python programs")
6404 "Pyflakes statically checks Python source code for common errors.")
6405 (license license:expat)))
6407 (define-public python2-pyflakes
6408 (package-with-python2 python-pyflakes))
6410 (define-public python-mccabe
6412 (name "python-mccabe")
6417 (uri (pypi-uri "mccabe" version))
6420 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6421 (build-system python-build-system)
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")
6428 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6429 complexity of Python source code.")
6430 (license license:expat)))
6432 (define-public python2-mccabe
6433 (package-with-python2 python-mccabe))
6435 (define-public python-mccabe-0.2.1
6436 (package (inherit python-mccabe)
6441 (uri (pypi-uri "mccabe" version))
6444 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6446 (define-public python2-mccabe-0.2.1
6447 (package-with-python2 python-mccabe-0.2.1))
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)
6457 (uri (pypi-uri "pep8" version))
6460 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6462 ;; XXX Tests not compatible with Python 3.5.
6465 (define-public python2-pep8-1.5.7
6466 (package-with-python2 python-pep8-1.5.7))
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)
6476 (uri (pypi-uri "pyflakes" version))
6479 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6481 ;; XXX Tests not compatible with Python 3.5.
6484 (define-public python2-pyflakes-0.8.1
6485 (package-with-python2 python-pyflakes-0.8.1))
6487 (define-public python-flake8
6489 (name "python-flake8")
6493 (uri (pypi-uri "flake8" version))
6496 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6497 (build-system python-build-system)
6500 (modify-phases %standard-phases
6502 (add-after 'install 'check
6503 (lambda* (#:key inputs outputs #:allow-other-keys)
6504 (add-installed-pythonpath inputs outputs)
6505 (invoke "pytest" "-v")
6508 `(("python-pycodestyle" ,python-pycodestyle)
6509 ("python-entrypoints" ,python-entrypoints)
6510 ("python-pyflakes" ,python-pyflakes)
6511 ("python-mccabe" ,python-mccabe)))
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")
6518 "The modular source code checker: pep8, pyflakes and co")
6520 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6521 (properties `((python2-variant . ,(delay python2-flake8))))
6522 (license license:expat)))
6524 (define-public python2-flake8
6525 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6526 (package (inherit base)
6528 `(("python2-configparser" ,python2-configparser)
6529 ("python2-enum34" ,python2-enum34)
6530 ("python2-typing" ,python2-typing)
6531 ,@(package-propagated-inputs base))))))
6533 ;; python-hacking requires flake8 <2.6.0.
6534 (define-public python-flake8-2.5
6536 (inherit python-flake8)
6540 (uri (pypi-uri "flake8" version))
6543 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6545 `(("python-pep8" ,python-pep8)
6546 ,@(package-propagated-inputs python-flake8)))
6547 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6549 (define-public python2-flake8-2.5
6551 (inherit python2-flake8)
6552 (version (package-version python-flake8-2.5))
6554 (inherit (package-source python-flake8-2.5))))
6556 `(("python2-pep8" ,python2-pep8)
6557 ,@(package-propagated-inputs python2-flake8)))))
6559 (define-public python-flake8-polyfill
6561 (name "python-flake8-polyfill")
6566 (uri (pypi-uri "flake8-polyfill" version))
6569 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6570 (build-system python-build-system)
6573 (modify-phases %standard-phases
6576 ;; Be compatible with Pytest 4:
6577 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6578 (substitute* "setup.cfg"
6582 (setenv "PYTHONPATH"
6583 (string-append (getcwd) "/build/lib:"
6584 (getenv "PYTHONPATH")))
6585 (invoke "py.test" "-v"))))))
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")
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)))
6599 (define-public python2-flake8-polyfill
6600 (package-with-python2 python-flake8-polyfill))
6602 (define-public python-mistune
6604 (name "python-mistune")
6609 (uri (pypi-uri "mistune" version))
6612 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6613 (build-system python-build-system)
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
6621 (license license:bsd-3)))
6623 (define-public python2-mistune
6624 (package-with-python2 python-mistune))
6626 (define-public python-markdown
6628 (name "python-markdown")
6633 (uri (pypi-uri "Markdown" version))
6636 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6637 (build-system python-build-system)
6639 `(("python-nose" ,python-nose)
6640 ("python-pyyaml" ,python-pyyaml)))
6641 (home-page "https://python-markdown.github.io/")
6642 (synopsis "Python implementation of Markdown")
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)))
6650 (define-public python2-markdown
6651 (package-with-python2 python-markdown))
6653 (define-public python-ptyprocess
6655 (name "python-ptyprocess")
6660 (uri (pypi-uri "ptyprocess" version))
6663 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6664 (build-system python-build-system)
6666 `(("python-nose" ,python-nose)))
6669 (modify-phases %standard-phases
6671 (lambda _ (invoke "nosetests"))))))
6672 (home-page "https://github.com/pexpect/ptyprocess")
6673 (synopsis "Run a subprocess in a pseudo terminal")
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)))
6679 (define-public python2-ptyprocess
6680 (package-with-python2 python-ptyprocess))
6682 (define-public python-cram
6684 (name "python-cram")
6686 (home-page "https://bitheap.org/cram/")
6689 (uri (list (string-append home-page "cram-"
6691 (pypi-uri "cram" version)))
6694 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6697 (modify-phases %standard-phases
6698 (add-after 'unpack 'patch-source
6700 (substitute* (find-files "cram" ".*\\.py$")
6701 ;; Replace default shell path.
6702 (("/bin/sh") (which "sh")))
6703 (substitute* (find-files "tests" ".*\\.t$")
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'"))
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")
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)
6732 `(("python-coverage" ,python-coverage)
6734 (synopsis "Simple testing framework for command line applications")
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
6740 (license license:gpl2+)))
6742 (define-public python2-cram
6743 (package-with-python2 python-cram))
6745 (define-public python-straight-plugin
6747 (name "python-straight-plugin")
6752 (uri (pypi-uri "straight.plugin" version))
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)))
6764 (define-public python2-straight-plugin
6765 (package-with-python2 python-straight-plugin))
6767 (define-public python-fonttools
6769 (name "python-fonttools")
6773 (uri (pypi-uri "fonttools" version ".zip"))
6776 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6777 (build-system python-build-system)
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")
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)))
6792 (define-public python2-fonttools
6793 (package-with-python2 python-fonttools))
6795 (define-public python-ly
6802 (uri (pypi-uri name version))
6805 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6806 (build-system python-build-system)
6808 ;; FIXME: Some tests need network access.
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+)))
6817 (define-public python-appdirs
6819 (name "python-appdirs")
6824 (uri (pypi-uri "appdirs" version))
6827 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6828 (build-system python-build-system)
6829 (home-page "https://github.com/ActiveState/appdirs")
6831 "Determine platform-specific dirs, e.g. a \"user data dir\"")
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)))
6837 (define-public python2-appdirs
6838 (package-with-python2 python-appdirs))
6840 (define-public python-llfuse
6842 (name "python-llfuse")
6846 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6849 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6850 (build-system python-build-system)
6855 `(("pkg-config" ,pkg-config)))
6856 (synopsis "Python bindings for FUSE")
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))))))
6863 (define-public python2-llfuse
6864 (package (inherit (package-with-python2
6865 (strip-python2-variant python-llfuse)))
6866 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6869 (define-public python-llfuse-0.41
6870 (package (inherit python-llfuse)
6875 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6876 "llfuse-" version ".tar.bz2"))
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+))))
6884 (define-public python-msgpack
6886 (name "python-msgpack")
6890 (uri (pypi-uri "msgpack" version))
6893 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6894 (build-system python-build-system)
6896 `(#:modules ((guix build utils)
6897 (guix build python-build-system)
6902 (modify-phases %standard-phases
6905 (let ((cwd (getcwd)))
6906 (setenv "PYTHONPATH"
6907 (string-append cwd "/build/"
6908 (find (cut string-prefix? "lib" <>)
6909 (scandir (string-append cwd "/build")))
6911 (getenv "PYTHONPATH")))
6912 (invoke "pytest" "-v" "test")))))))
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)))
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
6927 (inherit python-msgpack)
6928 (name "python-msgpack-transitional")
6930 (substitute-keyword-arguments (package-arguments python-msgpack)
6932 `(modify-phases ,phases
6933 (add-after 'unpack 'configure-transitional
6935 ;; Keep using the old name.
6936 (substitute* "setup.py"
6937 (("TRANSITIONAL = False")
6938 "TRANSITIONAL = 1"))
6941 (define-public python2-msgpack
6942 (package-with-python2 python-msgpack))
6944 (define-public python-netaddr
6946 (name "python-netaddr")
6951 (uri (pypi-uri "netaddr" version))
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")
6960 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6961 and MAC network addresses.")
6962 (license license:bsd-3)))
6964 (define-public python2-netaddr
6965 (package-with-python2 python-netaddr))
6967 (define-public python2-pyroute2
6969 (name "python2-pyroute2")
6974 (uri (pypi-uri "pyroute2" version))
6977 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6978 (build-system python-build-system)
6980 `(#:python ,python-2)) ;Python 3.x is not supported
6981 (home-page "https://github.com/svinota/pyroute2")
6982 (synopsis "Python netlink library")
6984 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6985 Supported netlink families and protocols include:
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
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
7000 (license license:gpl2+)))
7002 (define-public python-wrapt
7004 (name "python-wrapt")
7009 (uri (pypi-uri "wrapt" version))
7012 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
7013 (build-system python-build-system)
7015 ;; Tests are not included in the tarball, they are only available in the
7018 (home-page "https://github.com/GrahamDumpleton/wrapt")
7019 (synopsis "Module for decorators, wrappers and monkey patching")
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)))
7026 (define-public python2-wrapt
7027 (package-with-python2 python-wrapt))
7029 (define-public python-xlrd
7031 (name "python-xlrd")
7035 (uri (pypi-uri "xlrd" version))
7038 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7039 (build-system python-build-system)
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)))
7055 (define-public python2-xlrd
7056 (package-with-python2 python-xlrd))
7058 (define-public python-prettytable
7060 (name "python-prettytable")
7065 (uri (pypi-uri "prettytable" version ".tar.bz2"))
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")
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)))
7079 (define-public python2-prettytable
7080 (package-with-python2 python-prettytable))
7082 (define-public python-tables
7084 (name "python-tables")
7089 (uri (pypi-uri "tables" version))
7092 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7093 (modules '((guix build utils)))
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$"))
7101 (build-system python-build-system)
7103 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7104 ;; or "check", so we must override the build and check phases.
7106 (modify-phases %standard-phases
7107 (add-after 'unpack 'use-gcc
7109 (substitute* "setup.py"
7110 (("compiler = new_compiler\\(\\)" line)
7112 "\ncompiler.set_executables(compiler='gcc',"
7113 "compiler_so='gcc',"
7115 "linker_so='gcc -shared')")))
7118 (lambda* (#:key inputs #:allow-other-keys)
7119 (invoke "python" "setup.py" "build"
7120 (string-append "--hdf5="
7121 (assoc-ref inputs "hdf5")))))
7123 (lambda* (#:key inputs #:allow-other-keys)
7124 (invoke "python" "setup.py" "check"
7125 (string-append "--hdf5="
7126 (assoc-ref inputs "hdf5"))))))))
7128 `(("python-numexpr" ,python-numexpr)
7129 ("python-numpy" ,python-numpy)))
7131 `(("python-cython" ,python-cython)
7132 ("pkg-config" ,pkg-config)))
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)))
7143 (define-public python2-tables
7144 (package-with-python2 python-tables))
7146 (define-public python-pyasn1
7148 (name "python-pyasn1")
7153 (uri (pypi-uri "pyasn1" version))
7156 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7157 (build-system python-build-system)
7158 (home-page "http://pyasn1.sourceforge.net/")
7159 (synopsis "ASN.1 types and codecs")
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)))
7165 (define-public python2-pyasn1
7166 (package-with-python2 python-pyasn1))
7168 (define-public python-pyasn1-modules
7170 (name "python-pyasn1-modules")
7175 (uri (pypi-uri "pyasn1-modules" version))
7178 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7179 (build-system python-build-system)
7181 `(("python-pyasn1" ,python-pyasn1)))
7182 (home-page "https://sourceforge.net/projects/pyasn1/")
7183 (synopsis "ASN.1 codec implementations")
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)))
7189 (define-public python2-pyasn1-modules
7190 (package-with-python2 python-pyasn1-modules))
7192 (define-public python-ipaddress
7194 (name "python-ipaddress")
7198 (uri (pypi-uri "ipaddress" version))
7201 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7202 (build-system python-build-system)
7203 (home-page "https://github.com/phihag/ipaddress")
7204 (synopsis "IP address manipulation library")
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)))
7212 (define-public python2-ipaddress
7213 (package-with-python2 python-ipaddress))
7215 (define-public python2-ipaddr
7217 (name "python2-ipaddr")
7222 (uri (pypi-uri "ipaddr" version))
7224 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7225 (build-system python-build-system)
7227 `(#:python ,python-2 ;version 2 only
7229 (modify-phases %standard-phases
7231 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7232 (home-page "https://github.com/google/ipaddr-py")
7233 (synopsis "IP address manipulation library")
7235 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7236 IPv6 addresses and networks.
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)))
7243 (define-public python-idna
7245 (name "python-idna")
7250 (uri (pypi-uri "idna" version))
7253 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7254 (build-system python-build-system)
7255 (home-page "https://github.com/kjd/idna")
7256 (synopsis "Internationalized domain names in applications")
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
7265 (license license:bsd-4)))
7267 (define-public python-idna-2.7
7268 (package (inherit python-idna)
7272 (uri (pypi-uri "idna" version))
7275 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7278 (define-public python2-idna
7279 (package-with-python2 python-idna))
7281 (define-public python-idna-ssl
7283 (name "python-idna-ssl")
7288 (uri (pypi-uri "idna-ssl" version))
7291 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7292 (build-system python-build-system)
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)
7299 (license license:expat)))
7301 (define-public python-pretend
7303 (name "python-pretend")
7308 (uri (pypi-uri "pretend" version))
7311 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7312 (build-system python-build-system)
7313 (home-page "https://github.com/alex/pretend")
7314 (synopsis "Library for stubbing in Python")
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)))
7322 (define-public python2-pretend
7323 (package-with-python2 python-pretend))
7325 (define-public python-pip
7332 (uri (pypi-uri "pip" version))
7335 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7336 (build-system python-build-system)
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")
7342 "Pip is a package manager for Python software, that finds packages on the
7343 Python Package Index (PyPI).")
7344 (license license:expat)))
7346 (define-public python2-pip
7347 (package-with-python2 python-pip))
7349 (define-public python-tlsh
7351 (name "python-tlsh")
7353 (home-page "https://github.com/trendmicro/tlsh")
7358 (url "https://github.com/trendmicro/tlsh.git")
7359 (commit (string-append "v" version))))
7360 (file-name (git-file-name name version))
7362 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7363 (build-system cmake-build-system)
7365 '(#:out-of-source? #f
7366 #:phases (modify-phases %standard-phases
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")
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
7387 (license license:asl2.0)))
7389 (define-public python2-tlsh
7391 (inherit python-tlsh)
7392 (name "python2-tlsh")
7393 (inputs `(("python" ,python-2)))))
7395 (define-public python-termcolor
7397 (name "python-termcolor")
7402 (uri (pypi-uri "termcolor" version))
7405 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7406 (build-system python-build-system)
7408 ;; There are no tests.
7410 (home-page "https://pypi.python.org/pypi/termcolor")
7411 (synopsis "ANSII Color formatting for terminal output")
7413 "This package provides ANSII Color formatting for output in terminals.")
7414 (license license:expat)))
7416 (define-public python2-termcolor
7417 (package-with-python2 python-termcolor))
7419 (define-public python-libarchive-c
7421 (name "python-libarchive-c")
7425 (uri (pypi-uri "libarchive-c" version))
7428 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7429 (build-system python-build-system)
7431 '(#:phases (modify-phases %standard-phases
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'"))))))
7442 (lambda _ (invoke "pytest" "-vv"))))))
7444 `(("python-mock" ,python-mock)
7445 ("python-pytest" ,python-pytest)))
7447 `(("libarchive" ,libarchive)))
7448 (home-page "https://github.com/Changaco/python-libarchive-c")
7449 (synopsis "Python interface to libarchive")
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+)))
7456 (define-public python2-libarchive-c
7457 (package-with-python2 python-libarchive-c))
7459 (define-public python-file
7462 (name "python-file")
7463 (build-system python-build-system)
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
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'")))
7479 (inputs `(("file" ,file)))
7480 (native-inputs (if (%current-target-system)
7481 `(("self" ,this-package))
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.")))
7488 (define-public python2-file
7489 (package-with-python2 python-file))
7491 (define-public python-debian
7493 (name "python-debian")
7494 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7499 (uri (pypi-uri name version))
7502 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7503 (build-system python-build-system)
7505 `(("python-six" ,python-six)))
7506 (synopsis "Debian package related modules")
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:
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.
7523 ;; Modules are either GPLv2+ or GPLv3+.
7524 (license license:gpl3+)))
7526 (define-public python2-debian
7527 (package-with-python2 python-debian))
7529 (define-public python-nbformat
7531 (name "python-nbformat")
7536 (uri (pypi-uri "nbformat" version))
7539 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7540 (build-system python-build-system)
7541 (arguments `(#:tests? #f)) ; no test target
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)))
7553 (define-public python2-nbformat
7554 (package-with-python2 python-nbformat))
7556 (define-public python-bleach
7558 (name "python-bleach")
7563 (uri (pypi-uri "bleach" version))
7566 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7567 (build-system python-build-system)
7569 `(("python-html5lib" ,python-html5lib-0.9)
7570 ("python-six" ,python-six)))
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)))
7578 (define-public python2-bleach
7579 (package-with-python2 python-bleach))
7581 (define-public python-entrypoints
7583 (name "python-entrypoints")
7588 (uri (pypi-uri "entrypoints" version))
7591 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7592 (build-system python-build-system)
7593 ;; The package does not come with a setup.py file, so we have to generate
7598 (modify-phases %standard-phases
7599 (add-after 'unpack 'create-setup.py
7601 (call-with-output-file "setup.py"
7604 from setuptools import setup
7605 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
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)))
7616 (define-public python2-entrypoints
7617 (package-with-python2 python-entrypoints))
7619 (define-public python-nbconvert
7621 (name "python-nbconvert")
7626 (uri (pypi-uri "nbconvert" version))
7629 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7630 (build-system python-build-system)
7632 `(;; The "bdist_egg" target is disabled by default, causing the installation
7634 #:configure-flags (list "bdist_egg")
7635 ;; FIXME: 5 failures, 40 errors.
7638 ;; (modify-phases %standard-phases
7641 ;; (zero? (system* "py.test" "-v")))))
7643 `(("python-pytest" ,python-pytest)))
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:
7665 @item ReStructured Text (rst)
7666 @item executable script
7668 (license license:bsd-3)))
7670 (define-public python2-nbconvert
7671 (package-with-python2 python-nbconvert))
7673 (define-public python-notebook
7675 (name "python-notebook")
7679 (uri (pypi-uri "notebook" version))
7682 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7683 (build-system python-build-system)
7686 (modify-phases %standard-phases
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"))
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)))
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")
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)))
7718 (define-public python2-notebook
7719 (let ((base (package-with-python2
7720 (strip-python2-variant python-notebook))))
7721 (package (inherit base)
7723 `(("python2-mock" ,python2-mock)
7724 ,@(package-native-inputs base)))
7726 (substitute-keyword-arguments (package-arguments base)
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
7735 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7736 (("formats = self.nbconvert_api") "return #")))))))))))
7738 (define-public python-widgetsnbextension
7740 (name "python-widgetsnbextension")
7745 (uri (pypi-uri "widgetsnbextension" version))
7748 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7749 (build-system python-build-system)
7751 `(("python-ipykernel" ,python-ipykernel)
7752 ("python-notebook" ,python-notebook)))
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
7760 (license license:bsd-3)))
7762 (define-public python2-widgetsnbextension
7763 (package-with-python2 python-widgetsnbextension))
7765 (define-public python-ipywidgets
7767 (name "python-ipywidgets")
7772 (uri (pypi-uri "ipywidgets" version))
7775 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7776 (build-system python-build-system)
7778 `(("python-ipython" ,python-ipython)
7779 ("python-traitlets" ,python-traitlets)
7780 ("python-widgetsnbextension" ,python-widgetsnbextension)))
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
7790 (license license:bsd-3)))
7792 (define-public python2-ipywidgets
7793 (package-with-python2 python-ipywidgets))
7795 (define-public python-jupyter-console
7797 (name "python-jupyter-console")
7802 (uri (pypi-uri "jupyter_console" version))
7805 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7806 (build-system python-build-system)
7808 `(("python-ipykernel" ,python-ipykernel)
7809 ("python-jupyter-client" ,python-jupyter-client)
7810 ("python-prompt-toolkit" ,python-prompt-toolkit)
7811 ("python-pygments" ,python-pygments)))
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)))
7821 (define-public python2-jupyter-console
7823 (name "python2-jupyter-console")
7828 (uri (pypi-uri "jupyter_console" version))
7831 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7832 (build-system python-build-system)
7833 ;; Tests only run in an TTY.
7834 (arguments `(#:tests? #f))
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)))
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)))
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
7854 (inherit python-jupyter-console)
7855 (name "python-jupyter-console-minimal")
7857 (substitute-keyword-arguments
7858 (package-arguments python-jupyter-console)
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
7866 (delete-file-recursively
7868 (assoc-ref outputs "out") "/bin"))))))))
7869 ;; Remove the python-ipython propagated input, to avoid the cycle
7873 (package-propagated-inputs python-jupyter-console)))))
7875 (define-public python-qtconsole
7877 (name "python-qtconsole")
7882 (uri (pypi-uri "qtconsole" version))
7885 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7886 (build-system python-build-system)
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
7895 (modify-phases %standard-phases
7896 (add-before 'check 'pre-check
7898 (setenv "QT_QPA_PLATFORM" "offscreen")
7901 `(("python-ipykernel" ,python-ipykernel)
7902 ("python-ipython" ,python-ipython)))
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)))
7911 (define-public jupyter
7918 (uri (pypi-uri "jupyter" version))
7921 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7922 (build-system python-build-system)
7923 (arguments '(#:tests? #f)) ; there are none.
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")
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)))
7944 (define-public python-chardet
7946 (name "python-chardet")
7951 (uri (pypi-uri "chardet" version))
7954 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
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")
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+)))
7969 (define-public python2-chardet
7970 (package-with-python2 python-chardet))
7972 (define-public python-docopt
7974 (name "python-docopt")
7979 ;; The release on PyPI does not include tests.
7981 "https://github.com/docopt/docopt/archive/"
7983 (file-name (string-append name "-" version ".tar.gz"))
7986 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7987 (build-system python-build-system)
7989 `(("python-pytest" ,python-pytest)))
7992 (modify-phases %standard-phases
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
8001 (license license:expat)))
8003 (define-public python2-docopt
8004 (package-with-python2 python-docopt))
8006 (define-public python-pythondialog
8008 (name "python-pythondialog")
8013 (uri (pypi-uri "pythondialog" version))
8016 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8017 (build-system python-build-system)
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\"")))
8030 #:tests? #f)) ; no test suite
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))))))
8041 (define-public python2-pythondialog
8042 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8045 (version (package-version python-pythondialog))
8048 (uri (pypi-uri "python2-pythondialog" version))
8051 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8053 (define-public python-configobj
8055 (name "python-configobj")
8059 (uri (pypi-uri "configobj" version))
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)
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
8074 (home-page "https://github.com/DiffSK/configobj")
8075 (license license:bsd-3)))
8077 (define-public python2-configobj
8078 (package-with-python2 python-configobj))
8080 (define-public python-configargparse
8082 (name "python-configargparse")
8086 (uri (pypi-uri "ConfigArgParse" version))
8089 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8090 (build-system python-build-system)
8092 `(("python-pyyaml" ,python-pyyaml)))
8095 (modify-phases %standard-phases
8098 ;; Bypass setuptools-shim because one test relies on "setup.py"
8099 ;; being the first argument passed to the python call.
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)))
8111 (define-public python2-configargparse
8112 (package-with-python2 python-configargparse))
8114 (define-public python-argparse-manpage
8116 (name "python-argparse-manpage")
8121 (uri (pypi-uri "argparse-manpage" version))
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")
8129 "This package provides tools to build manual pages from Python's
8130 @code{ArgumentParser} object.")
8131 (license license:asl2.0)))
8133 (define-public python-contextlib2
8135 (name "python-contextlib2")
8140 (uri (pypi-uri "contextlib2" version))
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)))
8154 (define-public python2-contextlib2
8156 (name "python2-contextlib2")
8161 (uri (pypi-uri "contextlib2" version))
8164 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8165 (build-system python-build-system)
8167 `(#:python ,python-2
8169 (modify-phases %standard-phases
8171 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
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)))
8183 (define-public python-texttable
8185 (name "python-texttable")
8190 (uri (pypi-uri "texttable" version))
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
8200 (license license:lgpl2.1+)))
8202 (define-public python2-texttable
8203 (package-with-python2 python-texttable))
8205 (define-public python-atomicwrites
8207 (name "python-atomicwrites")
8211 (uri (pypi-uri "atomicwrites" version))
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)))
8222 (define-public python2-atomicwrites
8223 (package-with-python2 python-atomicwrites))
8225 (define-public python-click-threading
8227 (name "python-click-threading")
8231 (uri (pypi-uri "click-threading" version))
8234 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8235 (build-system python-build-system)
8237 `(("python-click" ,python-click)))
8238 (synopsis "Utilities for multithreading in Click")
8239 (description "This package provides utilities for multithreading in Click
8241 (home-page "https://github.com/click-contrib/click-threading")
8242 (license license:expat)))
8244 (define-public python-click-log
8246 (name "python-click-log")
8250 (uri (pypi-uri "click-log" version))
8253 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8254 (build-system python-build-system)
8256 `(("python-click" ,python-click)))
8257 (synopsis "Logging for click applications")
8258 (description "This package provides a Python library for logging Click
8260 (home-page "https://github.com/click-contrib/click-log")
8261 (license license:expat)))
8263 (define-public python-apipkg
8265 (name "python-apipkg")
8269 (uri (pypi-uri "apipkg" version))
8272 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8273 (build-system python-build-system)
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)))
8283 (define-public python2-apipkg
8284 (package-with-python2 python-apipkg))
8286 (define-public python-execnet
8288 (name "python-execnet")
8292 (uri (pypi-uri "execnet" version))
8295 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8296 (build-system python-build-system)
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.
8303 `(("python-pytest" ,python-pytest)
8304 ("python-setuptools-scm" ,python-setuptools-scm)))
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:
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
8317 (home-page "http://codespeak.net/execnet/")
8318 (license license:expat)))
8320 (define-public python2-execnet
8321 (package-with-python2 python-execnet))
8323 (define-public python-icalendar
8325 (name "python-icalendar")
8329 (uri (pypi-uri "icalendar" version))
8332 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8333 (build-system python-build-system)
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)))
8343 (define-public python-args
8345 (name "python-args")
8349 (uri (pypi-uri "args" version))
8352 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8353 (build-system python-build-system)
8354 (home-page "https://github.com/kennethreitz/args")
8355 (synopsis "Command-line argument parser")
8357 "This library provides a Python module to parse command-line arguments.")
8358 (license license:bsd-3)))
8360 (define-public python2-args
8361 (package-with-python2 python-args))
8363 (define-public python-clint
8365 (name "python-clint")
8369 (uri (pypi-uri "clint" version))
8372 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8373 (build-system python-build-system)
8376 (modify-phases %standard-phases
8378 (lambda _ (invoke "py.test" "-v"))))))
8380 `(("python-pytest" ,python-pytest)))
8382 `(("python-args" ,python-args)))
8383 (home-page "https://github.com/kennethreitz/clint")
8384 (synopsis "Command-line interface tools")
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)))
8391 (define-public python2-clint
8392 (package-with-python2 python-clint))
8394 (define-public python-rply
8396 (name "python-rply")
8400 (uri (pypi-uri "rply" version))
8403 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8404 (build-system python-build-system)
8406 `(("python-appdirs" ,python-appdirs)))
8407 (home-page "https://github.com/alex/rply")
8408 (synopsis "Parser generator for Python")
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)))
8415 (define-public python2-rply
8416 (package-with-python2 python-rply))
8418 (define-public python-hy
8424 (uri (pypi-uri "hy" version))
8427 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8428 (build-system python-build-system)
8431 (modify-phases %standard-phases
8434 ;; Tests require write access to HOME.
8435 (setenv "HOME" "/tmp")
8436 (invoke "nosetests"))))))
8438 `(("python-coverage" ,python-coverage)
8439 ("python-nose" ,python-nose)))
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")
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)))
8452 (define-public python2-hy
8453 (package-with-python2 python-hy))
8455 (define-public python2-functools32
8457 (name "python2-functools32")
8462 (uri (pypi-uri "functools32" version))
8465 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8466 (build-system python-build-system)
8468 `(#:python ,python-2
8469 #:tests? #f)) ; no test target
8470 (home-page "https://github.com/MiCHiLU/python-functools32")
8472 "Backport of the functools module from Python 3.2.3")
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)))
8478 (define-public python2-subprocess32
8480 (name "python2-subprocess32")
8484 (uri (pypi-uri "subprocess32" version))
8487 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8489 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8490 (build-system python-build-system)
8492 `(#:python ,python-2
8493 ;; The test suite fails with Python > 2.7.13:
8494 ;; import test.support
8495 ;; ImportError: No module named support
8498 (modify-phases %standard-phases
8499 (add-after 'unpack 'patch-/bin/sh
8501 (substitute* '("subprocess32.py"
8502 "test_subprocess32.py")
8503 (("/bin/sh") (which "sh")))
8505 (home-page "https://github.com/google/python-subprocess32")
8506 (synopsis "Backport of the subprocess module from Python 3.2")
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)))
8515 (define-public python2-futures
8517 (name "python2-futures")
8522 (uri (pypi-uri "futures" version))
8525 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8526 (build-system python-build-system)
8528 `(#:python ,python-2
8530 (modify-phases %standard-phases
8533 (invoke "python" "test_futures.py")
8535 (home-page "https://github.com/agronholm/pythonfutures")
8537 "Backport of the concurrent.futures package from Python 3.2")
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)))
8544 (define-public python-promise
8546 (name "python-promise")
8551 (uri (pypi-uri "promise" version))
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")
8562 "Promises/A+ implementation for Python")
8563 (properties `((python2-variant . ,(delay python2-promise))))
8564 (license license:expat)))
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)
8573 `(("python2-futures" ,python2-futures)
8574 ("python2-pytest" ,python2-pytest)
8575 ,@(package-native-inputs promise))))))
8577 (define-public python-progressbar33
8579 (name "python-progressbar33")
8584 (uri (pypi-uri "progressbar33" version))
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")
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))))
8599 (define-public python-colorama
8601 (name "python-colorama")
8606 (uri (pypi-uri "colorama" version))
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
8614 (home-page "https://pypi.python.org/pypi/colorama")
8615 (license license:bsd-3)))
8617 (define-public python2-colorama
8618 (package-with-python2 python-colorama))
8620 (define-public python-rsa
8627 (uri (pypi-uri "rsa" version))
8630 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8631 (build-system python-build-system)
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)))
8642 (define-public python2-rsa
8643 (package-with-python2 python-rsa))
8645 (define-public python-pluggy
8647 (name "python-pluggy")
8652 (uri (pypi-uri "pluggy" version))
8655 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8656 (build-system python-build-system)
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)))
8665 (define-public python2-pluggy
8666 (package-with-python2 python-pluggy))
8668 (define-public python-tox
8675 (uri (pypi-uri "tox" version))
8678 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8679 (build-system python-build-system)
8681 ;; FIXME: Tests require pytest-timeout, which itself requires
8682 ;; pytest>=2.8.0 for installation.
8685 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8686 ("python-py" ,python-py)
8687 ("python-virtualenv" ,python-virtualenv)))
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
8699 (license license:expat)))
8701 (define-public python2-tox
8702 (package-with-python2 python-tox))
8704 (define-public python-jmespath
8706 (name "python-jmespath")
8711 (uri (pypi-uri "jmespath" version))
8714 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8715 (build-system python-build-system)
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
8722 (home-page "https://github.com/jmespath/jmespath.py")
8723 (license license:expat)))
8725 (define-public python2-jmespath
8726 (package-with-python2 python-jmespath))
8728 (define-public python-botocore
8730 (name "python-botocore")
8731 (version "1.12.149")
8735 (uri (pypi-uri "botocore" version))
8738 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8739 (build-system python-build-system)
8741 ;; FIXME: Many tests are failing.
8744 `(("python-dateutil" ,python-dateutil)
8745 ("python-docutils" ,python-docutils)
8746 ("python-jmespath" ,python-jmespath)))
8748 `(("python-mock" ,python-mock)
8749 ("python-nose" ,python-nose)
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)))
8760 (define-public python2-botocore
8761 (package-with-python2 python-botocore))
8763 (define-public python-xdo
8770 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8771 "python-xdo_" version ".orig.tar.gz"))
8774 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8775 (build-system python-build-system)
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")
8785 (substitute* "xdo/_xdo.py"
8786 (("find_library\\(\"xdo\"\\)")
8787 (simple-format #f "\"~a\"" libxdo)))
8789 #:tests? #f)) ; no tests provided
8791 `(("python-six" ,python-six)))
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)))
8802 (define-public python2-xdo
8803 (package-with-python2 python-xdo))
8805 (define-public python-mako
8807 (name "python-mako")
8812 (uri (pypi-uri "Mako" version))
8815 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8816 (build-system python-build-system)
8818 `(("python-markupsafe" ,python-markupsafe)))
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)))
8829 (define-public python2-mako
8830 (package-with-python2 python-mako))
8832 (define-public python-waitress
8834 (name "python-waitress")
8839 (uri (pypi-uri "waitress" version))
8840 (patches (search-patches "python-waitress-fix-tests.patch"))
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)))
8851 (define-public python2-waitress
8852 (package-with-python2 python-waitress))
8854 (define-public python-pyquery
8856 (name "python-pyquery")
8861 (uri (pypi-uri "pyquery" version))
8864 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8865 (build-system python-build-system)
8867 `(("python-webob" ,python-webob)
8868 ("python-webtest" ,python-webtest)))
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)))
8879 (define-public python-anyjson
8881 (name "python-anyjson")
8886 (uri (pypi-uri "anyjson" version))
8889 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8890 (build-system python-build-system)
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.
8899 (home-page "https://bitbucket.org/runeh/anyjson/")
8901 "Wraps best available JSON implementation in a common interface")
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))))))
8908 (define-public python2-anyjson
8909 (let ((anyjson (package-with-python2
8910 (strip-python2-variant python-anyjson))))
8913 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8915 ,@(package-arguments anyjson)))
8916 (native-inputs `(("python2-nose" ,python2-nose))))))
8918 (define-public python-amqp
8920 (name "python-amqp")
8925 (uri (pypi-uri "amqp" version))
8928 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8929 (build-system python-build-system)
8931 `(("python-case" ,python-case)
8932 ("python-pytest-sugar" ,python-pytest-sugar)
8933 ("python-mock" ,python-mock)))
8935 `(("python-vine" ,python-vine)))
8936 (home-page "https://github.com/celery/py-amqp")
8938 "Low-level AMQP client for Python (fork of amqplib)")
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))))))
8946 (define-public python2-amqp
8947 (let ((amqp (package-with-python2
8948 (strip-python2-variant python-amqp))))
8951 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8952 ;; unmaintained. Weirdly, does not do this on the python 3
8955 ,@(package-arguments amqp))))))
8957 (define-public python-txamqp
8959 (name "python-txamqp")
8964 (uri (pypi-uri "txAMQP" version))
8967 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8968 (build-system python-build-system)
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")
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
8981 (license license:asl2.0)))
8983 (define-public python2-txamqp
8984 (package-with-python2 python-txamqp))
8986 (define-public python-kombu
8988 (name "python-kombu")
8993 (uri (pypi-uri "kombu" version))
8996 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8997 (build-system python-build-system)
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)))
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))))))
9019 (define-public python2-kombu
9020 (let ((kombu (package-with-python2
9021 (strip-python2-variant python-kombu))))
9024 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9025 ;; It works fine on the python3 variant.
9027 ,@(package-arguments kombu)))
9028 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9029 ,@(package-native-inputs kombu))))))
9031 (define-public python-billiard
9033 (name "python-billiard")
9038 (uri (pypi-uri "billiard" version))
9041 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9042 (build-system python-build-system)
9044 `(("python-case" ,python-case)
9045 ("python-pytest" ,python-pytest)))
9046 (home-page "https://github.com/celery/billiard")
9048 "Python multiprocessing fork with improvements and bugfixes")
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))))))
9057 (define-public python2-billiard
9058 (let ((billiard (package-with-python2
9059 (strip-python2-variant python-billiard))))
9062 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9063 ("python2-mock" ,python2-mock)
9064 ,@(package-native-inputs billiard))))))
9066 (define-public python-celery
9068 (name "python-celery")
9073 (uri (pypi-uri "celery" version))
9076 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9077 (build-system python-build-system)
9079 '(;; TODO The tests fail with Python 3.7
9080 ;; https://github.com/celery/celery/issues/4849
9083 (modify-phases %standard-phases
9084 (add-after 'unpack 'patch-requirements
9086 (substitute* "requirements/test.txt"
9087 (("pytest>=3\\.0,<3\\.3")
9091 `(("python-case" ,python-case)
9092 ("python-pytest" ,python-pytest)))
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))))))
9108 (define-public python2-celery
9109 (let ((celery (package-with-python2
9110 (strip-python2-variant python-celery))))
9113 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9114 ("python2-mock" ,python2-mock)
9115 ,@(package-native-inputs celery))))))
9117 (define-public python-translitcodec
9119 (name "python-translitcodec")
9124 (uri (pypi-uri "translitcodec" version))
9127 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9128 (build-system python-build-system)
9130 `(#:tests? #f)) ; no tests provided
9132 "https://github.com/claudep/translitcodec")
9134 "Unicode to 8-bit charset transliteration codec")
9136 "This package contains codecs for transliterating ISO 10646 texts into
9137 best-effort representations using smaller coded character sets (ASCII,
9139 (license license:expat)))
9141 (define-public python2-translitcodec
9142 (package-with-python2 python-translitcodec))
9144 (define-public python-editor
9146 (name "python-editor")
9151 (uri (pypi-uri "python-editor" version))
9154 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9155 (build-system python-build-system)
9157 "https://github.com/fmoo/python-editor")
9159 "Programmatically open an editor, capture the result")
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)))
9165 (define-public python2-editor
9166 (package-with-python2 python-editor))
9168 (define-public python-vobject
9170 (name "python-vobject")
9174 (uri (pypi-uri "vobject" version))
9177 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9178 (build-system python-build-system)
9180 '(;; The test suite relies on some non-portable Windows interfaces.
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
9191 (home-page "http://eventable.github.io/vobject/")
9192 (license license:asl2.0)))
9194 (define-public python2-vobject
9195 (package-with-python2 python-vobject))
9197 (define-public python-munkres
9199 (name "python-munkres")
9203 (uri (pypi-uri "munkres" version))
9206 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9207 (build-system python-build-system)
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)))
9217 (define-public python2-munkres
9218 (package-with-python2 python-munkres))
9220 (define-public python-whoosh
9222 (name "python-whoosh")
9227 (uri (pypi-uri "Whoosh" version))
9230 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9231 (build-system python-build-system)
9233 `(("python-pytest" ,python-pytest)))
9234 (home-page "https://bitbucket.org/mchaput/whoosh")
9235 (synopsis "Full text indexing, search, and spell checking library")
9237 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9239 (license license:bsd-2)))
9241 (define-public python2-whoosh
9242 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9243 (package (inherit whoosh)
9245 `(("python2-backport-ssl-match-hostname"
9246 ,python2-backport-ssl-match-hostname)
9247 ,@(package-propagated-inputs whoosh))))))
9249 (define-public python-pathlib
9251 (name "python-pathlib")
9255 (uri (pypi-uri "pathlib" version))
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:
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.).
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
9281 (license license:expat)))
9283 (define-public python2-pathlib
9284 (package-with-python2 python-pathlib))
9286 (define-public python2-pathlib2
9288 (name "python2-pathlib2")
9292 (uri (pypi-uri "pathlib2" version))
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.
9301 `(#:python ,python-2))
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
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.
9312 Pathlib offers a set of classes to handle file system paths. It offers the
9313 following advantages over using string objects:
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.).
9323 (license license:expat)))
9325 (define-public python2-pathlib2-bootstrap
9328 (inherit python2-pathlib2)
9329 (name "python2-pathlib2-bootstrap")
9331 `(("python2-scandir" ,python2-scandir)
9332 ("python2-six" ,python2-six-bootstrap))))))
9334 (define-public python-jellyfish
9336 (name "python-jellyfish")
9340 (uri (pypi-uri "jellyfish" version))
9343 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9344 (build-system python-build-system)
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))))))
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))))))
9361 (define-public python2-unicodecsv
9363 (name "python2-unicodecsv")
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"))
9374 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9375 (build-system python-build-system)
9377 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9378 #:python ,python-2))
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)))
9387 (define-public python-rarfile
9389 (name "python-rarfile")
9393 (uri (pypi-uri "rarfile" version))
9396 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9397 (build-system python-build-system)
9400 (modify-phases %standard-phases
9402 ;; Many tests fail, but the installation proceeds.
9403 (lambda _ (invoke "make" "-C" "test" "test"))))))
9405 `(("which" ,which))) ; required for tests
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)))
9414 (define-public python2-rarfile
9415 (package-with-python2 python-rarfile))
9417 (define-public python-magic
9419 (name "python-magic")
9424 (uri (pypi-uri "python-magic" version))
9427 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9428 (file-name (string-append name "-" version "-checkout"))))
9429 (build-system python-build-system)
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
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'")))
9458 (add-before 'install 'disable-egg-compression
9460 (let ((port (open-file "setup.cfg" "a")))
9461 (display "\n[easy_install]\nzip_ok = 0\n"
9466 ;; python-magic needs to be able to find libmagic.so.
9469 "https://github.com/ahupp/python-magic")
9471 "File type identification using libmagic")
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)))
9481 (define-public python2-magic
9482 (package-with-python2 python-magic))
9484 (define-public python2-s3cmd
9486 (name "python2-s3cmd")
9491 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9492 "s3cmd-" version ".tar.gz"))
9495 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9496 (build-system python-build-system)
9498 ;; s3cmd is written for python2 only and contains no tests.
9499 `(#:python ,python-2
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")
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+)))
9521 (define-public python-pkgconfig
9523 (name "python-pkgconfig")
9528 (uri (pypi-uri "pkgconfig" version))
9531 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9532 (build-system python-build-system)
9534 `(("python-nose" ,python-nose)))
9536 `(("pkg-config" ,pkg-config)))
9539 (modify-phases %standard-phases
9540 (add-before 'build 'patch
9541 ;; Hard-code the path to pkg-config.
9543 (substitute* "pkgconfig/pkgconfig.py"
9544 (("cmd = 'pkg-config")
9545 (string-append "cmd = '" (which "pkg-config"))))
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)))
9558 (define-public python2-pkgconfig
9559 (package-with-python2 python-pkgconfig))
9561 (define-public python-bz2file
9563 (name "python-bz2file")
9568 (uri (pypi-uri "bz2file" version))
9571 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9572 (build-system python-build-system)
9574 `(#:tests? #f)) ; Tests use deprecated python modules.
9575 (home-page "https://github.com/nvawda/bz2file")
9576 (synopsis "Read and write bzip2-compressed files")
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)))
9584 (define-public python2-bz2file
9585 (package-with-python2 python-bz2file))
9587 (define-public python-future
9589 (name "python-future")
9594 (uri (pypi-uri "future" version))
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
9603 (home-page "http://python-future.org")
9604 (synopsis "Single-source support for Python 3 and 2")
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)))
9611 (define-public python2-future
9612 (package-with-python2 python-future))
9614 (define-public python-cysignals
9616 (name "python-cysignals")
9621 (uri (pypi-uri "cysignals" version))
9624 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9625 (build-system python-build-system)
9627 `(("python-cython" ,python-cython)
9628 ("python-sphinx" ,python-sphinx)))
9630 `(("pari-gp" ,pari-gp)))
9632 `(#:modules ((guix build python-build-system)
9633 ((guix build gnu-build-system) #:prefix gnu:)
9635 ;; FIXME: Tests are executed after installation and currently fail
9636 ;; when not installing into standard locations; the author is working
9640 (modify-phases %standard-phases
9643 (assoc-ref gnu:%standard-phases 'configure)))))
9645 "https://github.com/sagemath/cysignals")
9647 "Handling of interrupts and signals for Cython")
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,
9653 (license license:lgpl3+)))
9655 (define-public python2-cysignals
9656 (package-with-python2 python-cysignals))
9658 (define-public python2-shedskin
9660 (name "python2-shedskin")
9665 (uri (string-append "https://github.com/shedskin/shedskin/"
9666 "releases/download/v" version
9667 "/shedskin-" version ".tgz"))
9670 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9671 (build-system python-build-system)
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'")))
9689 (inputs `(("pcre" ,pcre)
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))))
9697 (define-public python2-rope
9699 (name "python2-rope")
9704 (uri (pypi-uri "rope" version))
9707 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9709 ;; Rope has only partial python3 support, see `python-rope'
9710 `(#:python ,python-2))
9711 (build-system python-build-system)
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)))
9722 (define-public python-rope
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>.
9730 (properties `((python2-variant . ,(delay python2-rope))))))
9732 (define-public python-py3status
9734 (name "python-py3status")
9739 (uri (pypi-uri "py3status" version))
9742 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9743 (build-system python-build-system)
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'")))
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)))
9766 (define-public python-tblib
9768 (name "python-tblib")
9772 (uri (pypi-uri "tblib" version))
9774 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9775 (build-system python-build-system)
9778 (modify-phases %standard-phases
9779 (add-before 'check 'adjust-tests
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'"))
9789 ;; Upstream runs tests after installation and the package itself
9790 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9792 (setenv "PYTHONPATH"
9793 (string-append (getcwd) "/build/lib:"
9794 (getenv "PYTHONPATH")))
9795 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9797 `(("python-pytest" ,python-pytest)
9798 ("python-six" ,python-six)))
9799 (home-page "https://github.com/ionelmc/python-tblib")
9800 (synopsis "Traceback serialization library")
9802 "Traceback serialization allows you to:
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).
9809 @item Parse traceback strings and raise with the parsed tracebacks.
9811 (license license:bsd-3)))
9813 (define-public python2-tblib
9814 (package-with-python2 python-tblib))
9816 (define-public python-greenlet
9818 (name "python-greenlet")
9822 (uri (pypi-uri "greenlet" version))
9825 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9826 (build-system python-build-system)
9827 (home-page "https://greenlet.readthedocs.io/")
9828 (synopsis "Lightweight in-process concurrent programming")
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))))
9836 (define-public python2-greenlet
9837 (package-with-python2 python-greenlet))
9839 (define-public python-objgraph
9841 (name "python-objgraph")
9846 (uri (pypi-uri "objgraph" version))
9849 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9850 (build-system python-build-system)
9852 `(("python-graphviz" ,python-graphviz)))
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")
9859 "This package provides tools to draw Python object reference graphs with
9861 (license license:expat)))
9863 (define-public python-gevent
9865 (name "python-gevent")
9869 (uri (pypi-uri "gevent" version))
9872 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9873 (modules '((guix build utils)))
9876 ;; unbunding libev and c-ares
9877 (delete-file-recursively "deps")
9879 (build-system python-build-system)
9881 `(#:modules ((ice-9 ftw)
9885 (guix build python-build-system))
9886 #:phases (modify-phases %standard-phases
9887 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9889 (substitute* "src/gevent/subprocess.py"
9890 (("/bin/sh") (which "sh")))
9891 (for-each (lambda (file)
9893 (("/bin/sh") (which "sh"))
9894 (("/bin/true") (which "true"))))
9895 (find-files "src/greentest" "\\.py$"))
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")
9904 ;; Prevent building bundled libev.
9905 (substitute* "setup.py"
9906 (("run_make=_BUILDING")
9909 (let ((greenlet (string-append
9910 (assoc-ref inputs "python-greenlet")
9912 (match (scandir greenlet
9914 (string-prefix? "python" item)))
9916 (setenv "C_INCLUDE_PATH"
9917 (string-append greenlet "/" python)))))
9919 (add-before 'check 'skip-timer-test
9921 ;; XXX: Skip 'TestTimerResolution', which appears to be
9923 (substitute* "src/greentest/test__core_timer.py"
9924 (("not greentest.RUNNING_ON_CI") "False"))
9928 ;; Make sure the build directory is on PYTHONPATH.
9929 (setenv "PYTHONPATH"
9931 (getenv "PYTHONPATH") ":"
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"
9941 (scandir "." (cut regexp-exec
9942 (make-regexp "test_+(subprocess|core)")
9945 `(("python-greenlet" ,python-greenlet)
9946 ("python-objgraph" ,python-objgraph)))
9948 `(("python-six" ,python-six)))
9950 `(("c-ares" ,c-ares)
9952 (home-page "http://www.gevent.org/")
9953 (synopsis "Coroutine-based network library")
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))))))
9960 (define-public python2-gevent
9961 (let ((base (package-with-python2
9962 (strip-python2-variant python-gevent))))
9965 (native-inputs `(,@(package-native-inputs python-gevent)
9966 ("python-mock" ,python2-mock))))))
9968 (define-public python-fastimport
9970 (name "python-fastimport")
9975 (uri (pypi-uri "fastimport" version))
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}
9984 (license license:gpl2+)))
9986 (define-public python2-fastimport
9987 (package-with-python2 python-fastimport))
9989 (define-public python-twisted
9991 (name "python-twisted")
9995 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9998 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9999 (build-system python-build-system)
10001 '(#:tests? #f)) ; FIXME: some tests fail
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")
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)))
10016 (define-public python2-twisted
10017 (package-with-python2 python-twisted))
10019 (define-public python-pika
10021 (name "python-pika")
10026 (uri (pypi-uri "pika" version))
10029 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10030 (build-system python-build-system)
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")
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)))
10043 (define-public python2-pika
10044 (package-with-python2 python-pika))
10046 (define-public python-ply
10048 (name "python-ply")
10053 (uri (pypi-uri "ply" version))
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)))
10064 (define-public python2-ply
10065 (package-with-python2 python-ply))
10067 (define-public python-tabulate
10069 (name "python-tabulate")
10073 (uri (pypi-uri "tabulate" version))
10076 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10077 (build-system python-build-system)
10079 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10080 ;; and the latest release is not tagged in the upstream repository.
10082 (home-page "https://bitbucket.org/astanin/python-tabulate")
10083 (synopsis "Pretty-print tabular data")
10085 "Tabulate is a library and command-line utility to pretty-print tabular
10087 (license license:expat)))
10089 (define-public python2-tabulate
10090 (package-with-python2 python-tabulate))
10092 (define-public python-kazoo
10094 (name "python-kazoo")
10099 (uri (pypi-uri "kazoo" version))
10102 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10103 (build-system python-build-system)
10104 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10106 `(("python-six" ,python-six)))
10107 (home-page "https://kazoo.readthedocs.org")
10108 (synopsis "High-level Zookeeper client library")
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)))
10115 (define-public python2-kazoo
10116 (package-with-python2 python-kazoo))
10118 (define-public python-pykafka
10120 (name "python-pykafka")
10124 (uri (pypi-uri "pykafka" version))
10127 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10128 (build-system python-build-system)
10129 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10131 `(("python-gevent" ,python-gevent)
10132 ("python-kazoo" ,python-kazoo)
10133 ("python-tabulate" ,python-tabulate)))
10135 `(("librdkafka" ,librdkafka)))
10136 (home-page "https://pykafka.readthedocs.io/")
10137 (synopsis "Apache Kafka client for Python")
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)))
10144 (define-public python2-pykafka
10145 (package-with-python2 python-pykafka))
10147 (define-public python-wcwidth
10149 (name "python-wcwidth")
10154 (uri (pypi-uri "wcwidth" version))
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)))
10168 (define-public python2-wcwidth
10169 (package-with-python2 python-wcwidth))
10171 (define-public python2-jsonrpclib
10173 (name "python2-jsonrpclib")
10177 (uri (pypi-uri "jsonrpclib" version))
10180 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10181 (build-system python-build-system)
10184 #:python ,python-2))
10185 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10186 (synopsis "Implementation of JSON-RPC specification for Python")
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,
10192 (license license:asl2.0)))
10194 (define-public python-chai
10196 (name "python-chai")
10200 (uri (pypi-uri "chai" version))
10203 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10204 (build-system python-build-system)
10205 (home-page "https://github.com/agoragames/chai")
10206 (synopsis "Mocking framework for Python")
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)))
10212 (define-public python2-chai
10213 (package-with-python2 python-chai))
10215 (define-public python-inflection
10217 (name "python-inflection")
10220 (origin (method url-fetch)
10221 (uri (pypi-uri "inflection" version))
10224 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10225 (build-system python-build-system)
10227 `(("python-pytest" ,python-pytest)))
10228 (home-page "https://github.com/jpvanhal/inflection")
10229 (synopsis "Python string transformation library")
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)))
10236 (define-public python2-inflection
10237 (package-with-python2 python-inflection))
10239 (define-public python-pylev
10241 (name "python-pylev")
10245 (uri (pypi-uri "pylev" version))
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)))
10257 (define-public python2-pylev
10258 (package-with-python2 python-pylev))
10260 (define-public python-cleo
10262 (name "python-cleo")
10266 (uri (pypi-uri "cleo" version))
10269 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10270 (build-system python-build-system)
10273 ("python-mock" ,python-mock)
10274 ("python-pytest-mock" ,python-pytest-mock)
10275 ("python-pytest" ,python-pytest)))
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")
10283 "Cleo allows you to create command-line commands with signature in
10284 docstring and colored output.")
10285 (license license:expat)))
10287 (define-public python2-cleo
10288 (package-with-python2 python-cleo))
10290 (define-public python-lazy-object-proxy
10292 (name "python-lazy-object-proxy")
10296 (uri (pypi-uri "lazy-object-proxy" version))
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")
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)))
10308 (define-public python2-lazy-object-proxy
10309 (package-with-python2 python-lazy-object-proxy))
10311 (define-public python-dnspython
10313 (name "python-dnspython")
10317 (uri (string-append "http://www.dnspython.org/kits/"
10318 version "/dnspython-" version ".tar.gz"))
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")
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)))
10332 (define-public python2-dnspython
10333 (package-with-python2 python-dnspython))
10335 (define-public python-email-validator
10337 (name "python-email-validator")
10340 (origin (method url-fetch)
10341 (uri (pypi-uri "email_validator" version))
10344 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10345 (build-system python-build-system)
10348 (modify-phases %standard-phases
10349 (add-before 'build 'use-dnspython
10351 (substitute* "setup.py"
10352 (("dnspython3") "dnspython"))
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")
10360 "This library validates email address syntax and deliverability.")
10361 (license license:cc0)))
10363 (define-public python2-email-validator
10364 (package-with-python2 python-email-validator))
10366 (define-public python-ukpostcodeparser
10368 (name "python-ukpostcodeparser")
10372 (uri (pypi-uri "UkPostcodeParser" version))
10375 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10376 (build-system python-build-system)
10377 (home-page "https://github.com/hamstah/ukpostcodeparser")
10378 (synopsis "UK Postcode parser for Python")
10380 "This library provides the @code{parse_uk_postcode} function for
10381 parsing UK postcodes.")
10382 (license license:expat)))
10384 (define-public python2-ukpostcodeparser
10385 (package-with-python2 python-ukpostcodeparser))
10387 (define-public python-faker
10389 (name "python-faker")
10393 (uri (pypi-uri "Faker" version))
10396 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10398 (search-patches "python-faker-fix-build-32bit.patch"))
10399 (modules '((guix build utils)))
10402 (for-each delete-file (find-files "." "\\.pyc$"))
10404 (build-system python-build-system)
10407 (modify-phases %standard-phases
10409 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10412 ("python-email-validator" ,python-email-validator)
10413 ("python-mock" ,python-mock)
10414 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
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")
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))))))
10426 (define-public python2-faker
10427 (let ((base (package-with-python2 (strip-python2-variant
10432 `(("python2-ipaddress" ,python2-ipaddress)
10433 ,@(package-propagated-inputs base))))))
10435 (define-public python-pyaml
10437 (name "python-pyaml")
10438 (version "18.11.0")
10441 (uri (pypi-uri "pyaml" version))
10444 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10445 (build-system python-build-system)
10447 `(("python-unidecode" ,python-unidecode)))
10449 `(("python-pyyaml" ,python-pyyaml)))
10450 (home-page "https://github.com/mk-fg/pretty-yaml")
10451 (synopsis "YAML pretty-print library for Python")
10453 "pyaml is a PyYAML based python module to produce pretty and readable
10454 YAML-serialized data.")
10455 (license license:wtfpl2)))
10457 (define-public python2-pyaml
10458 (package-with-python2 python-pyaml))
10460 (define-public python-backpack
10462 (name "python-backpack")
10467 (uri (pypi-uri "backpack" version))
10470 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10471 (build-system python-build-system)
10473 `(("python-pytest" ,python-pytest)
10474 ("python-nose" ,python-nose)))
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)))
10483 (define-public python2-backpack
10484 (package-with-python2 python-backpack))
10486 (define-public python-prompt-toolkit
10488 (name "python-prompt-toolkit")
10493 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10496 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10497 (build-system python-build-system)
10500 (modify-phases %standard-phases
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"))))))
10510 `(("python-wcwidth" ,python-wcwidth)
10511 ("python-six" ,python-six)
10512 ("python-pygments" ,python-pygments)))
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")
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)))
10525 (define-public python2-prompt-toolkit
10526 (package-with-python2 python-prompt-toolkit))
10528 (define-public python-prompt-toolkit-1
10529 (package (inherit python-prompt-toolkit)
10534 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10537 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10539 (define-public python2-prompt-toolkit-1
10540 (package-with-python2 python-prompt-toolkit-1))
10542 (define-public python-jedi
10544 (name "python-jedi")
10549 (uri (pypi-uri "jedi" version))
10552 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10553 (build-system python-build-system)
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)
10559 (modify-phases %standard-phases
10561 (lambda* (#:key tests? #:allow-other-keys)
10563 (invoke "py.test" "-vv")))))))
10565 `(("python-pytest" ,python-pytest)
10566 ("python-docopt" ,python-docopt)))
10568 `(("python-parso" ,python-parso)))
10569 (home-page "https://github.com/davidhalter/jedi")
10570 (synopsis "Autocompletion and static analysis library for Python")
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.
10576 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10578 (license license:expat)))
10580 (define-public python2-jedi
10581 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10584 (arguments (substitute-keyword-arguments (package-arguments base)
10585 ((#:tests? _) #t))))))
10587 (define-public ptpython
10593 (uri (pypi-uri "ptpython" version))
10596 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10597 (build-system python-build-system)
10599 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
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")
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
10612 (license license:bsd-3)
10613 (properties `((python2-variant . ,(delay ptpython-2))))))
10615 (define-public ptpython-2
10616 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10619 (name "ptpython2"))))
10621 (define-public python-stem
10623 (name "python-stem")
10628 (uri (pypi-uri "stem" version))
10631 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10632 (build-system python-build-system)
10635 (modify-phases %standard-phases
10638 (invoke "./run_tests.py" "--unit")
10641 `(("python-mock" ,python-mock)
10642 ("python-pycodestyle" ,python-pycodestyle)
10643 ("python-pyflakes" ,python-pyflakes)))
10644 (home-page "https://stem.torproject.org/")
10646 "Python controller library that allows applications to interact with Tor")
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)))
10653 (define-public python2-stem
10654 (package-with-python2 python-stem))
10656 (define-public python-pyserial
10658 (name "python-pyserial")
10663 (uri (pypi-uri "pyserial" version))
10666 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10667 (build-system python-build-system)
10669 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10671 ;; (modify-phases %standard-phases
10674 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
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)))
10683 (define-public python2-pyserial
10684 (package-with-python2 python-pyserial))
10686 (define-public python-kivy
10688 (name "python-kivy")
10693 (uri (pypi-uri "Kivy" version))
10694 (file-name (string-append name "-" version ".tar.gz"))
10697 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10698 (build-system python-build-system)
10700 `(#:tests? #f ; Tests require many optional packages
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")
10711 ("pkg-config" ,pkg-config)
10712 ("python-cython" ,python-cython)))
10714 `(("gstreamer" ,gstreamer)
10717 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10718 (home-page "http://kivy.org")
10720 "Multitouch application framework")
10722 "A software library for rapid development of
10723 hardware-accelerated multitouch applications.")
10724 (license license:expat)))
10726 (define-public python2-kivy
10727 (package-with-python2 python-kivy))
10729 (define-public python-kivy-next
10730 (deprecated-package "python-kivy-next" python-kivy))
10732 (define-public python2-kivy-next
10733 (deprecated-package "python2-kivy-next" python2-kivy))
10735 (define-public python-binaryornot
10737 (name "python-binaryornot")
10741 (uri (pypi-uri "binaryornot" version))
10744 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10745 (build-system python-build-system)
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
10753 (license license:bsd-3)
10754 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10756 (define-public python2-binaryornot
10757 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10758 (package (inherit base)
10760 `(("python2-enum34" ,python2-enum34)
10761 ,@(package-propagated-inputs base))))))
10763 (define-public python-nltk
10765 (name "python-nltk")
10769 (uri (pypi-uri "nltk" version))
10772 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10773 (build-system python-build-system)
10775 '(;; The tests require some extra resources to be downloaded.
10776 ;; TODO Try packaging these resources.
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)))
10786 (define-public python2-nltk
10787 (package-with-python2 python-nltk))
10789 (define-public python-pymongo
10791 (name "python-pymongo")
10795 (uri (pypi-uri "pymongo" version))
10798 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10799 (build-system python-build-system)
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)))
10807 (define-public python2-pymongo
10808 (package-with-python2 python-pymongo))
10810 (define-public python-consul
10812 (name "python-consul")
10817 (uri (pypi-uri "python-consul" version))
10820 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10821 (build-system python-build-system)
10823 '(#:tests? #f)) ; The tests are not distributed
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")
10830 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10831 discovery, monitoring and configuration.")
10832 (license license:expat)))
10834 (define-public python2-consul
10835 (package-with-python2 python-consul))
10837 (define-public python-schematics
10839 (name "python-schematics")
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))
10849 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10850 (build-system python-build-system)
10852 `(("python-six" ,python-six)))
10854 ;; The tests require a bunch of not very nice packages with fixed
10855 ;; version requirements (e.g. python-coveralls).
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)))
10862 (define-public python2-schematics
10863 (package-with-python2 python-schematics))
10865 (define-public python-odfpy
10867 (name "python-odfpy")
10871 (uri (pypi-uri "odfpy" version))
10874 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10876 `(#:modules ((srfi srfi-1)
10877 (guix build python-build-system)
10878 (guix build utils))
10880 (modify-phases %standard-phases
10882 ;; The test runner invokes python2 and python3 for test*.py.
10883 ;; To avoid having both in inputs, we replicate it here.
10885 (for-each (lambda (test-file) (invoke "python" test-file))
10886 (find-files "tests" "^test.*\\.py$"))
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.")
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))))
10898 (define-public python2-odfpy
10899 (package-with-python2 python-odfpy))
10901 (define-public python-natsort
10903 (name "python-natsort")
10907 (uri (pypi-uri "natsort" version))
10910 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10911 (build-system python-build-system)
10913 `(#:modules ((guix build utils)
10914 (guix build python-build-system)
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))
10925 (let ((cwd (getcwd)))
10926 (setenv "PYTHONPATH"
10929 (find (cut string-prefix? "lib" <>)
10930 (scandir (string-append cwd "/build")))
10932 (getenv "PYTHONPATH")))
10933 (invoke "pytest" "-v")))))))
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")
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))))))
10955 (define-public python2-natsort
10956 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10957 (package (inherit base)
10959 `(("python2-pathlib" ,python2-pathlib)
10960 ,@(package-native-inputs base))))))
10962 (define-public python-glances
10964 (name "python-glances")
10969 (uri (pypi-uri "Glances" version))
10972 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10973 (build-system python-build-system)
10975 `(("python-psutil" ,python-psutil)))
10977 "https://github.com/nicolargo/glances")
10979 "A cross-platform curses-based monitoring tool")
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+)))
10986 (define-public python2-glances
10987 (package-with-python2 python-glances))
10989 (define-public python-graphql-core
10991 (name "python-graphql-core")
10996 (uri (pypi-uri "graphql-core" version))
10999 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11000 (build-system python-build-system)
11002 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11004 (modify-phases %standard-phases
11005 (add-after 'unpack 'patch-hardcoded-version
11006 (lambda _ (substitute*
11008 (("'gevent==1.1rc1'") "'gevent'"))
11011 `(("python-gevent" ,python-gevent)
11012 ("python-mock" ,python-mock)
11013 ("python-pytest-mock" ,python-pytest-mock)))
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")
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}
11024 (license license:expat)))
11026 (define-public python2-graphql-core
11027 (package-with-python2 python-graphql-core))
11029 (define-public python-graphql-relay
11031 (name "python-graphql-relay")
11036 (uri (pypi-uri "graphql-relay" version))
11039 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11040 (build-system python-build-system)
11042 '(#:tests? #f)) ; The tests are not distributed
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")
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}
11055 (license license:expat)))
11057 (define-public python2-graphql-relay
11058 (package-with-python2 python-graphql-relay))
11060 (define-public python-graphene
11062 (name "python-graphene")
11067 (uri (pypi-uri "graphene" version))
11070 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11071 (build-system python-build-system)
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)))
11079 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11080 (home-page "http://graphene-python.org/")
11081 (synopsis "GraphQL Framework for Python")
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)))
11089 (define-public python2-graphene
11090 (let ((base (package-with-python2
11091 (strip-python2-variant python-graphene))))
11092 (package (inherit base)
11094 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11095 ,@(package-native-inputs base))))))
11097 (define-public python-nautilus
11099 (name "python-nautilus")
11104 (uri (pypi-uri "nautilus" version))
11107 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11108 (build-system python-build-system)
11109 (arguments `(#:tests? #f)) ; fails to import test modules
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)))
11121 `(("python-nose2" ,python-nose2)))
11122 (home-page "https://github.com/AlecAivazis/nautilus")
11123 (synopsis "Library for creating microservice applications")
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)))
11130 (define-public python-snowballstemmer
11132 (name "python-snowballstemmer")
11136 (uri (pypi-uri "snowballstemmer" version))
11139 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11140 (build-system python-build-system)
11142 `(;; No tests exist
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
11149 (license license:bsd-3)))
11151 (define-public python2-snowballstemmer
11152 (package-with-python2 python-snowballstemmer))
11154 (define-public python-setproctitle
11156 (name "python-setproctitle")
11161 (uri (pypi-uri "setproctitle" version))
11164 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11165 (build-system python-build-system)
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.
11174 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11176 (substitute* "Makefile"
11177 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11178 (string-append nose "/bin/nosetests "))))
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"))))))
11190 `(("procps" ,procps))) ; required for tests
11192 "https://github.com/dvarrazzo/py-setproctitle")
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).
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))))))
11205 (define-public python2-setproctitle
11206 (let ((base (package-with-python2
11207 (strip-python2-variant python-setproctitle))))
11210 (native-inputs `(("python2-nose" ,python2-nose)
11211 ,@(package-native-inputs base))))))
11213 (define-public python-validictory
11215 (name "python-validictory")
11220 (uri (pypi-uri "validictory" version))
11223 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11224 (build-system python-build-system)
11227 (modify-phases %standard-phases
11228 (add-after 'unpack 'bootstrap
11229 ;; Move the tests out of the package directory to avoid
11232 (rename-file "validictory/tests" "tests")
11233 (delete-file "tests/__init__.py")))
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" ))))))
11242 `(("python-pytest" ,python-pytest)))
11244 "https://github.com/jamesturk/validictory")
11245 (synopsis "General purpose Python data validator")
11246 (description "It allows validation of arbitrary Python data structures.
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)))
11253 (define-public python2-validictory
11254 (package-with-python2 python-validictory))
11256 (define-public python-pyelftools
11258 (name "python-pyelftools")
11263 (uri (pypi-uri "pyelftools" version))
11266 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11267 (build-system python-build-system)
11270 (modify-phases %standard-phases
11271 (add-before 'check 'set-pythonpath
11273 (setenv "PYTHONPATH"
11276 ":" (getenv "PYTHONPATH")))
11279 "https://github.com/eliben/pyelftools")
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)))
11288 (define-public python-pyev
11290 (name "python-pyev")
11295 (uri (pypi-uri "pyev" version))
11298 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11299 (build-system python-build-system)
11301 `(#:tests? #f ; no test suite
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 "\"")))))))))
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)))
11318 (define-public python2-pyev
11319 (package-with-python2 python-pyev))
11321 (define-public python-imagesize
11323 (name "python-imagesize")
11328 (uri (pypi-uri "imagesize" version))
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")
11336 "This package allows determination of image size from
11337 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11338 (license license:expat)))
11340 (define-public python2-imagesize
11341 (package-with-python2 python-imagesize))
11343 (define-public python-termstyle
11345 (name "python-termstyle")
11350 (uri (pypi-uri "termstyle" version))
11353 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11354 (build-system python-build-system)
11357 (modify-phases %standard-phases
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)))
11366 (define-public python-argcomplete
11368 (name "python-argcomplete")
11373 (uri (pypi-uri "argcomplete" version))
11376 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11377 (build-system python-build-system)
11379 `(("python-pexpect" ,python-pexpect)
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
11389 (license license:asl2.0)))
11391 (define-public python2-argcomplete
11392 (package-with-python2 python-argcomplete))
11394 (define-public python-xopen
11396 (name "python-xopen")
11401 (uri (pypi-uri "xopen" version))
11404 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11405 (build-system python-build-system)
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)))
11417 (define-public python2-xopen
11418 (let ((base (package-with-python2
11419 (strip-python2-variant python-xopen))))
11422 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11423 ,@(package-propagated-inputs base))))))
11425 (define-public python-cheetah
11427 (name "python-cheetah")
11432 (uri (pypi-uri "Cheetah3" version))
11435 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11436 (build-system python-build-system)
11438 `(#:modules ((guix build utils)
11439 (guix build python-build-system)
11443 #:phases (modify-phases %standard-phases
11444 (add-after 'unpack 'use-absolute-python
11446 (substitute* "Cheetah/CheetahWrapper.py"
11447 (("#!/usr/bin/env python")
11448 (string-append "#!" (which "python"))))
11452 (let ((cwd (getcwd)))
11453 (setenv "PYTHONPATH"
11456 (find (cut string-prefix? "lib" <>)
11457 (scandir (string-append cwd "/build")))
11458 ":" (getenv "PYTHONPATH")))
11460 (string-append (getenv "PATH")
11462 (setenv "TMPDIR" "/tmp")
11464 (substitute* "Cheetah/Tests/Test.py"
11465 (("unittest.TextTestRunner\\(\\)")
11466 "unittest.TextTestRunner(verbosity=2)"))
11468 (invoke "python" "Cheetah/Tests/Test.py")))))))
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
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.
11483 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
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.
11497 (license (license:x11-style "file://LICENSE"))))
11499 (define-public python2-cheetah
11500 (package-with-python2 python-cheetah))
11502 (define-public python-dulwich
11504 (name "python-dulwich")
11509 (uri (list (string-append "https://www.dulwich.io/releases/"
11510 "dulwich-" version ".tar.gz")
11511 (pypi-uri "dulwich" version)))
11514 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11515 (build-system python-build-system)
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
11523 (substitute* "dulwich/tests/compat/utils.py"
11524 (("'git'") (string-append "'"
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")
11534 `(("python-fastimport" ,python-fastimport)))
11536 `(("python-mock" ,python-mock)
11537 ("python-geventhttpclient" ,python-geventhttpclient)
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+))))
11546 (define-public python2-dulwich
11547 (package-with-python2 python-dulwich))
11549 (define-public python-pbkdf2
11551 (name "python-pbkdf2")
11556 (uri (pypi-uri "pbkdf2" version))
11559 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11560 (build-system python-build-system)
11563 (modify-phases %standard-phases
11566 (setenv "PYTHONPATH"
11567 (string-append (getcwd) "/build/lib:"
11568 (getenv "PYTHONPATH")))
11569 (invoke "python" "test/test_pbkdf2.py"))))))
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.
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)))
11584 (define-public python2-pbkdf2
11585 (package-with-python2 python-pbkdf2))
11587 (define-public python-qrcode
11589 (name "python-qrcode")
11594 (uri (pypi-uri "qrcode" version))
11596 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11597 (build-system python-build-system)
11599 ;; FIXME: Tests require packaging 'pymaging'.
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
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
11614 (license license:bsd-3)))
11616 (define-public python2-qrcode
11617 (package-with-python2 python-qrcode))
11619 (define-public python-rst2ansi
11621 (name "python-rst2ansi")
11626 (uri (pypi-uri "rst2ansi" version))
11629 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11630 (build-system python-build-system)
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")
11636 "Python module dedicated to rendering RST (reStructuredText) documents
11637 to ansi-escaped strings suitable for display in a terminal.")
11638 (license license:expat)))
11640 (define-public python-ansi2html
11642 (name "python-ansi2html")
11647 (uri (pypi-uri "ansi2html" version))
11650 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11651 (build-system python-build-system)
11653 `(("python-mock" ,python-mock)
11654 ("python-nose" ,python-nose)))
11656 `(("python-six" ,python-six)))
11657 (home-page "https://github.com/ralphbean/ansi2html")
11658 (synopsis "Convert ANSI-decorated console output to HTML")
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+)))
11664 (define-public python2-ansi2html
11665 (package-with-python2 python-ansi2html))
11667 (define-public python-ddt
11669 (name "python-ddt")
11674 (uri (pypi-uri "ddt" version))
11677 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11678 (build-system python-build-system)
11680 `(("python-mock" ,python-mock)
11681 ("python-nose" ,python-nose)))
11683 `(("python-six" ,python-six)
11684 ("python-pyyaml" ,python-pyyaml)))
11685 (home-page "https://github.com/txels/ddt")
11686 (synopsis "Data-Driven Tests")
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
11691 (license license:expat)))
11693 (define-public python2-ddt
11694 (package-with-python2 python-ddt))
11696 (define-public python-pycountry
11698 (name "python-pycountry")
11699 (version "18.5.26")
11703 (uri (pypi-uri "pycountry" version))
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.")
11711 "@code{pycountry} provides the ISO databases for the standards:
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)
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+)))
11724 (define-public python2-pycountry
11725 (package-with-python2 python-pycountry))
11727 (define-public python-pycosat
11729 (name "python-pycosat")
11734 (uri (pypi-uri "pycosat" version))
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)")
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)))
11749 (define-public python2-pycosat
11750 (package-with-python2 python-pycosat))
11752 (define-public python2-ruamel.ordereddict
11754 (name "python2-ruamel.ordereddict")
11759 (uri (pypi-uri "ruamel.ordereddict" version))
11762 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11763 (build-system python-build-system)
11765 `(#:python ,python-2
11767 (modify-phases %standard-phases
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")
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)))
11786 (define-public python-pypeg2
11788 (name "python-pypeg2")
11793 (uri (pypi-uri "pyPEG2" version))
11796 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11797 (build-system python-build-system)
11798 (propagated-inputs `(("python-lxml" ,python-lxml)))
11800 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
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)))
11809 (define-public python-incremental
11811 (name "python-incremental")
11816 (uri (pypi-uri "incremental" version))
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
11825 (license license:expat)))
11827 (define-public python2-incremental
11828 (package-with-python2 python-incremental))
11830 (define-public python-invoke
11832 (name "python-invoke")
11833 (home-page "http://www.pyinvoke.org/")
11837 (uri (pypi-uri "invoke" version))
11840 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11841 (build-system python-build-system)
11843 ;; XXX: Requires many dependencies that are not yet in Guix.
11845 (synopsis "Pythonic task execution")
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)))
11853 (define-public python2-invoke
11854 (package-with-python2 python-invoke))
11856 (define-public python-automat
11858 (name "python-automat")
11862 (uri (pypi-uri "Automat" version))
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))
11873 `(("python-m2r" ,python-m2r)
11874 ("python-setuptools-scm" ,python-setuptools-scm)
11875 ("python-graphviz" ,python-graphviz)))
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
11884 (license license:expat)))
11886 (define-public python2-automat
11887 (package-with-python2 python-automat))
11889 (define-public python-m2r
11891 (name "python-m2r")
11895 (uri (pypi-uri "m2r" version))
11898 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11899 (build-system python-build-system)
11901 `(("python-docutils" ,python-docutils)
11902 ("python-mistune" ,python-mistune)))
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
11910 (license license:expat)))
11912 (define-public python2-m2r
11913 (package-with-python2 python-m2r))
11915 (define-public python-constantly
11917 (name "python-constantly")
11921 (uri (pypi-uri "constantly" version))
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)))
11933 (define-public python2-constantly
11934 (package-with-python2 python-constantly))
11936 (define-public python-attrs
11938 (name "python-attrs")
11942 (uri (pypi-uri "attrs" version))
11945 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11946 (build-system python-build-system)
11948 `(#:modules ((guix build utils)
11949 (guix build python-build-system)
11953 #:phases (modify-phases %standard-phases
11956 (let ((cwd (getcwd)))
11957 (setenv "PYTHONPATH"
11960 (find (cut string-prefix? "lib" <>)
11961 (scandir (string-append cwd "/build")))
11963 (getenv "PYTHONPATH")))
11964 (invoke "python" "-m" "pytest")))))))
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
11978 (license license:expat)))
11980 (define-public python2-attrs
11981 (package-with-python2 python-attrs))
11983 (define-public python-attrs-bootstrap
11985 (inherit python-attrs)
11986 (name "python-attrs-bootstrap")
11987 (native-inputs `())
11988 (arguments `(#:tests? #f))))
11990 (define-public python2-attrs-bootstrap
11991 (package-with-python2 python-attrs-bootstrap))
11993 (define-public python2-cliapp
11995 (name "python2-cliapp")
11996 (version "1.20180812.1")
12000 (uri (string-append
12001 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12002 version ".tar.gz"))
12005 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12006 (build-system python-build-system)
12008 `(#:python ,python-2
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,
12015 (add-before 'build 'check
12017 ;; Disable python3 tests
12018 (substitute* "check"
12019 (("python3") "# python3"))
12020 (invoke "./check"))))))
12022 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12023 ("python2-pep8" ,python2-pep8)))
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+)))
12034 (define-public python2-ttystatus
12036 (name "python2-ttystatus")
12041 (uri (string-append
12042 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12043 version ".tar.gz"))
12046 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12047 (build-system python-build-system)
12049 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12050 ("python2-pep8" ,python2-pep8)))
12052 `(#:python ,python-2
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,
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+)))
12071 (define-public python2-tracing
12073 (name "python2-tracing")
12078 (uri (string-append
12079 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12080 version ".tar.gz"))
12083 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12084 (build-system python-build-system)
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+)))
12097 (define-public python2-larch
12099 (name "python2-larch")
12100 (version "1.20151025")
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"))
12111 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12112 (build-system python-build-system)
12114 `(#:python ,python-2
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,
12121 (add-before 'build 'check
12122 (lambda _ (invoke "make" "check"))))))
12124 `(("cmdtest" ,cmdtest)
12125 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
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.
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+)))
12141 (define-public python-astroid
12143 (name "python-astroid")
12148 (uri (pypi-uri "astroid" version))
12151 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12152 (build-system python-build-system)
12154 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12155 ("python-six" ,python-six)
12156 ("python-wrapt" ,python-wrapt)))
12158 `(("python-dateutil" ,python-dateutil)
12159 ("python-nose" ,python-nose)
12160 ("python-pytest" ,python-pytest)
12161 ("python-pytest-runner" ,python-pytest-runner)))
12164 (modify-phases %standard-phases
12165 (add-after 'unpack 'remove-spurious-test
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")
12174 (invoke "pytest" "astroid"))))))
12175 (home-page "https://github.com/PyCQA/astroid")
12176 (synopsis "Common base representation of python source code for pylint and
12178 (description "@code{python-astroid} provides a common base representation
12179 of python source code for projects such as pychecker, pyreverse, pylint, etc.
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))))))
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.
12199 (uri (pypi-uri "astroid" version))
12202 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12204 (substitute-keyword-arguments (package-arguments base)
12206 `(modify-phases ,phases
12207 (add-after 'unpack 'remove-spurious-test
12209 ;; https://github.com/PyCQA/astroid/issues/276
12210 (delete-file "astroid/tests/unittest_brain.py")
12214 (invoke"python" "-m" "unittest" "discover"
12215 "-p" "unittest*.py")))))))
12216 (native-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))))))
12224 (define-public python-isort
12226 (name "python-isort")
12231 (uri (git-reference
12232 ;; Tests pass only from the Github sources
12233 (url "https://github.com/timothycrosley/isort")
12235 (file-name (git-file-name name version))
12238 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12239 (build-system python-build-system)
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
12249 (license license:expat)
12250 (properties `((python2-variant . ,(delay python2-isort))))))
12252 (define-public python2-isort
12253 (let ((base (package-with-python2
12254 (strip-python2-variant python-isort))))
12255 (package (inherit base)
12257 `(("python2-futures" ,python2-futures)
12258 ,@(package-native-inputs base))))))
12260 (define-public python2-backports-functools-lru-cache
12262 (name "python2-backports-functools-lru-cache")
12267 ;; only the pypi tarballs contain the necessary metadata
12268 (uri (pypi-uri "backports.functools_lru_cache" version))
12271 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12272 (build-system python-build-system)
12274 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
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)))
12283 (define-public python-configparser
12285 (name "python-configparser")
12290 (uri (pypi-uri "configparser" version))
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)))
12302 (define-public python2-configparser
12303 (package-with-python2 python-configparser))
12305 (define-public python-mando
12307 (name "python-mando")
12311 (uri (pypi-uri "mando" version))
12314 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12315 (build-system python-build-system)
12317 `(("python-rst2ansi" ,python-rst2ansi)
12318 ("python-six" ,python-six)))
12320 `(("python-pytest" ,python-pytest)))
12321 (home-page "https://mando.readthedocs.org/")
12323 "Wrapper around argparse, allowing creation of complete CLI applications")
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)))
12329 (define-public python2-mando
12330 (package-with-python2 python-mando))
12332 (define-public python2-argparse
12334 (name "python2-argparse")
12339 (uri (pypi-uri "argparse" version))
12342 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12343 (build-system python-build-system)
12345 `(#:python ,python-2))
12346 (home-page "https://github.com/ThomasWaldmann/argparse/")
12347 (synopsis "Python command-line parsing library")
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)))
12353 (define-public python-fudge
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.
12362 (uri (pypi-uri "fudge" version))
12365 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12366 (build-system python-build-system)
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")
12372 "Fudge is a Python module for using fake objects (mocks and stubs) to
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)))
12383 (define-public python2-fudge
12384 (package-with-python2 python-fudge))
12386 (define-public python-mwclient
12388 (name "python-mwclient")
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"))
12399 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12400 (build-system python-build-system)
12402 `(("python-requests" ,python-requests)
12403 ("python-requests-oauthlib"
12404 ,python-requests-oauthlib)
12405 ("python-six" ,python-six)))
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)))
12418 (define-public python2-mwclient
12419 (package-with-python2 python-mwclient))
12421 (define-public python-utils
12423 (name "python-utils")
12427 (uri (pypi-uri "python-utils" version))
12430 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12431 (build-system python-build-system)
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")
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)))
12443 (define-public python2-utils
12444 (package-with-python2 python-utils))
12446 (define-public python-diff-match-patch
12448 (name "python-diff-match-patch")
12449 (version "20121119")
12453 (uri (pypi-uri "diff-match-patch" version))
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)))
12464 (define-public python2-diff-match-patch
12465 (package-with-python2 python-diff-match-patch))
12467 (define-public python-dirsync
12469 (name "python-dirsync")
12474 (uri (pypi-uri "dirsync" version))
12477 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12478 (build-system python-build-system)
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)))
12486 (define-public python2-dirsync
12487 (package-with-python2 python-dirsync))
12489 (define-public python-levenshtein
12491 (name "python-levenshtein")
12496 (uri (pypi-uri "python-Levenshtein" version))
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")
12504 "The Levenshtein Python C extension module contains functions for fast computation of
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
12511 It supports both normal and Unicode strings.")
12512 (license license:gpl2+)))
12514 (define-public python2-levenshtein
12515 (package-with-python2 python-levenshtein))
12517 (define-public python-scandir
12519 (name "python-scandir")
12524 (uri (pypi-uri "scandir" version))
12526 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12527 (build-system python-build-system)
12529 `(#:phases (modify-phases %standard-phases
12532 (invoke "python" "test/run_tests.py"))))))
12533 (home-page "https://github.com/benhoyt/scandir")
12534 (synopsis "Directory iteration function")
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.
12542 This package is part of the Python standard library since version 3.5.")
12543 (license license:bsd-3)))
12545 (define-public python2-scandir
12546 (package-with-python2 python-scandir))
12548 (define-public python2-stemming
12550 (name "python2-stemming")
12555 (uri (pypi-uri "stemming" version))
12557 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12558 (build-system python-build-system)
12560 `(#:python ,python-2))
12561 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12562 (synopsis "Python implementations of various stemming algorithms")
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
12569 (license license:public-domain)))
12571 (define-public python-factory-boy
12573 (name "python-factory-boy")
12578 (uri (pypi-uri "factory_boy" version))
12580 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12581 (build-system python-build-system)
12583 ;; Tests are not included in the tarball.
12586 `(("faker" ,python-faker)))
12587 (home-page "https://github.com/benhoyt/scandir")
12588 (synopsis "Versatile test fixtures replacement")
12590 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12592 As a fixtures replacement tool, it aims to replace static, hard to maintain
12593 fixtures with easy-to-use factories for complex object.
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)))
12600 (define-public python2-factory-boy
12601 (package-with-python2 python-factory-boy))
12603 (define-public python-translate-toolkit
12605 (name "python-translate-toolkit")
12610 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12612 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12613 (build-system python-build-system)
12615 `(("python-pytest" ,python-pytest)
12616 ("python-sphinx" ,python-sphinx)))
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)))
12628 ;; TODO: tests are not run, because they end with
12629 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12631 ;; during test setup.
12633 (home-page "https://toolkit.translatehouse.org")
12634 (synopsis "Tools and API for translation and localization engineering")
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+)))
12640 (define-public python2-translate-toolkit
12641 (package-with-python2 python-translate-toolkit))
12643 (define-public python-packaging
12645 (name "python-packaging")
12650 (uri (pypi-uri "packaging" version))
12653 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12654 (build-system python-build-system)
12656 `(#:phases (modify-phases %standard-phases
12658 (lambda _ (invoke "py.test" "-vv"))))))
12660 `(("python-pretend" ,python-pretend)
12661 ("python-pytest" ,python-pytest)))
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
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
12674 (license (list license:asl2.0 license:bsd-2))))
12676 (define-public python2-packaging
12677 (package-with-python2 python-packaging))
12679 (define-public python-relatorio
12681 (name "python-relatorio")
12686 (uri (pypi-uri "relatorio" version))
12689 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12690 (build-system python-build-system)
12692 `(("python-lxml" ,python-lxml)
12693 ("python-genshi" ,python-genshi)))
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+)))
12703 (define-public python2-relatorio
12704 (package-with-python2 python-relatorio))
12706 (define-public python-radon
12708 (name "python-radon")
12713 (uri (pypi-uri "radon" version))
12716 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12717 (build-system python-build-system)
12719 `(#:phases (modify-phases %standard-phases
12722 (invoke "python" "radon/tests/run.py"))))))
12724 `(("python-colorama" ,python-colorama)
12725 ("python-flake8-polyfill" ,python-flake8-polyfill)
12726 ("python-mando" ,python-mando)))
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:
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)
12740 (license license:expat)))
12742 (define-public python2-radon
12743 (package-with-python2 python-radon))
12745 (define-public python-sure
12747 (name "python-sure")
12752 (uri (pypi-uri "sure" version))
12755 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12756 (build-system python-build-system)
12758 `(("python-mock" ,python-mock)
12759 ("python-six" ,python-six)))
12761 `(("python-nose" ,python-nose)))
12762 (home-page "https://github.com/gabrielfalcao/sure")
12763 (synopsis "Automated testing library in python for python")
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+)))
12769 (define-public python2-sure
12770 (package-with-python2 python-sure))
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.
12776 (name "python2-couleur")
12781 (uri (pypi-uri "couleur" version))
12784 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12785 (build-system python-build-system)
12787 `(#:python ,python-2))
12788 (home-page "https://github.com/gabrielfalcao/couleur")
12790 "ANSI terminal tool for python, colored shell and other handy fancy features")
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+)))
12798 (define-public python-misaka
12800 (name "python-misaka")
12805 (uri (pypi-uri "misaka" version))
12808 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12809 (build-system python-build-system)
12811 `(;; Line 37 of setup.py calls self.run_command('develop')
12812 ;; in the 'check' phase. This command seems to be trying
12814 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12815 ;; for which it does not have the permission to write.
12818 `(("python-cffi" ,python-cffi)))
12819 (home-page "https://github.com/FSX/misaka")
12820 (synopsis "Python binding for Hoedown")
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)))
12827 (define-public python2-misaka
12828 (package-with-python2 python-misaka))
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
12835 (name "python2-steadymark")
12840 (uri (pypi-uri "steadymark" version))
12843 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12844 (build-system python-build-system)
12846 `(("python-couleur" ,python2-couleur)
12847 ("python-sure" ,python2-sure)
12848 ("python-misaka" ,python2-misaka)))
12850 `(#:python ,python-2
12852 (modify-phases %standard-phases
12853 (add-before 'build 'patch-setup-py
12855 ;; Update requirements from dependency==version
12856 ;; to dependency>=version
12857 (substitute* "setup.py"
12860 (home-page "https://github.com/gabrielfalcao/steadymark")
12861 (synopsis "Markdown-based test runner for python")
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)))
12869 (define-public python-jsonpointer
12871 (name "python-jsonpointer")
12876 (uri (pypi-uri "jsonpointer" version))
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)))
12887 (define-public python2-jsonpointer
12888 (package-with-python2 python-jsonpointer))
12890 (define-public python-jsonpatch
12892 (name "python-jsonpatch")
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"))
12903 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12904 (build-system python-build-system)
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)))
12913 (define-public python2-jsonpatch
12914 (package-with-python2 python-jsonpatch))
12916 (define-public python-jsonpatch-0.4
12917 (package (inherit python-jsonpatch)
12918 (name "python-jsonpatch")
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"))
12928 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12930 (define-public python2-jsonpatch-0.4
12931 (package-with-python2 python-jsonpatch-0.4))
12933 (define-public python-rfc3986
12935 (name "python-rfc3986")
12939 (uri (pypi-uri "rfc3986" version))
12942 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12943 (build-system python-build-system)
12945 `(#:modules ((guix build utils)
12946 (guix build python-build-system)
12951 (modify-phases %standard-phases
12954 (let ((cwd (getcwd)))
12955 (setenv "PYTHONPATH"
12956 (string-append cwd "/build/"
12957 (find (cut string-prefix? "lib" <>)
12958 (scandir (string-append cwd "/build")))
12960 (getenv "PYTHONPATH")))
12961 (invoke "pytest" "-v")))))))
12963 `(("python-pytest" ,python-pytest)))
12964 (home-page "https://rfc3986.readthedocs.io/")
12965 (synopsis "Parse and validate URI references")
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)))
12972 (define-public python2-rfc3986
12973 (package-with-python2 python-rfc3986))
12975 (define-public python-rfc3987
12977 (name "python-rfc3987")
12982 (uri (pypi-uri "rfc3987" version))
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+)))
12993 (define-public python2-rfc3987
12994 (package-with-python2 python-rfc3987))
12996 (define-public python-validate-email
12998 (name "python-validate-email")
13003 (uri (pypi-uri "validate_email" version))
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+)))
13014 (define-public python2-validate-email
13015 (package-with-python2 python-validate-email))
13017 (define-public python-flex
13019 (name "python-flex")
13024 (uri (pypi-uri "flex" version))
13027 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13028 (build-system python-build-system)
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)))
13043 (define-public python2-flex
13044 (package-with-python2 python-flex))
13046 (define-public python-marshmallow
13048 (name "python-marshmallow")
13049 (version "3.0.0b14")
13053 (uri (pypi-uri "marshmallow" version))
13056 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13057 (build-system python-build-system)
13059 `(("python-dateutil" ,python-dateutil)
13060 ("python-simplejson" ,python-simplejson)))
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)))
13071 (define-public python2-marshmallow
13072 (package-with-python2 python-marshmallow))
13074 (define-public python-apispec
13076 (name "python-apispec")
13081 (uri (pypi-uri "apispec" version))
13084 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13085 (build-system python-build-system)
13087 `(("python-pyyaml" ,python-pyyaml)))
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.
13100 (license license:expat)))
13102 (define-public python2-apispec
13103 (package-with-python2 python-apispec))
13105 (define-public python-flasgger
13107 (name "python-flasgger")
13112 (uri (git-reference
13113 (url "https://github.com/rochacbruno/flasgger.git")
13115 (file-name (git-file-name name version))
13117 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13118 (build-system python-build-system)
13121 (modify-phases %standard-phases
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)
13129 (getenv "PYTHONPATH")))
13130 (invoke "py.test"))))))
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)))
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)))
13152 (define-public python2-flasgger
13153 (package-with-python2 python-flasgger))
13155 (define-public python-swagger-spec-validator
13157 (name "python-swagger-spec-validator")
13162 (uri (pypi-uri "swagger-spec-validator" version))
13165 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13166 (build-system python-build-system)
13168 `(("python-jsonschema" ,python-jsonschema)
13169 ("python-pyyaml" ,python-pyyaml)
13170 ("python-six" ,python-six)))
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)))
13178 (define-public python2-swagger-spec-validator
13179 (package-with-python2 python-swagger-spec-validator))
13181 (define-public python-apache-libcloud
13183 (name "python-apache-libcloud")
13188 (uri (pypi-uri "apache-libcloud" version))
13191 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13192 (build-system python-build-system)
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")
13202 (add-after 'unpack 'patch-tests
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,
13209 {\"test\": \"value\"},
13210 httplib.responses[httplib.OK])
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'"))
13221 (add-before 'check 'copy-secret
13223 (copy-file "libcloud/test/secrets.py-dist"
13224 "libcloud/test/secrets.py")
13227 `(("openssh" ,openssh)))
13229 `(("python-paramiko" ,python-paramiko)
13230 ("python-requests" ,python-requests)))
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)))
13243 (define-public python2-apache-libcloud
13244 (package-with-python2 python-apache-libcloud))
13246 (define-public python-smmap2
13248 (name "python-smmap2")
13253 (uri (pypi-uri "smmap2" version))
13256 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13257 (build-system python-build-system)
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)))
13266 (define-public python2-smmap2
13267 (package-with-python2 python-smmap2))
13269 (define-public python-regex
13271 (name "python-regex")
13272 (version "2019.04.14")
13275 (uri (pypi-uri "regex" version))
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)))
13289 (define-public python2-regex
13290 (package-with-python2 python-regex))
13292 (define-public python2-pyopengl
13294 (name "python2-pyopengl")
13299 (uri (pypi-uri "PyOpenGL" version))
13302 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13304 `(#:python ,python-2))
13305 (build-system python-build-system)
13306 (home-page "http://pyopengl.sourceforge.net")
13307 (synopsis "Standard OpenGL bindings for Python")
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}
13312 (license license:bsd-3)))
13314 (define-public python2-pyopengl-accelerate
13316 (inherit python2-pyopengl)
13317 (name "python2-pyopengl-accelerate")
13322 (uri (pypi-uri "PyOpenGL-accelerate" version))
13325 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13326 (synopsis "Acceleration code for PyOpenGL")
13328 "This is the Cython-coded accelerator module for PyOpenGL.")))
13330 (define-public python-rencode
13332 (name "python-rencode")
13337 (uri (pypi-uri "rencode" version))
13340 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13341 (build-system python-build-system)
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.
13349 (delete-file "rencode/t.py")
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")
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)))
13364 (define-public python2-rencode
13365 (package-with-python2 python-rencode))
13367 (define-public python-xenon
13369 (name "python-xenon")
13374 (uri (pypi-uri "xenon" version))
13377 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13378 (build-system python-build-system)
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)))
13387 (modify-phases %standard-phases
13388 (add-before 'build 'patch-test-requirements
13390 ;; Remove httpretty dependency for tests.
13391 (substitute* "setup.py"
13392 (("httpretty") ""))
13394 (home-page "https://xenon.readthedocs.org/")
13395 (synopsis "Monitor code metrics for Python on your CI server")
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)))
13404 (define-public python2-xenon
13405 (package-with-python2 python-xenon))
13407 (define-public python-pysocks
13409 (name "python-pysocks")
13414 (uri (pypi-uri "PySocks" version))
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)))
13426 (define-public python2-pysocks
13427 (package-with-python2 python-pysocks))
13429 (define-public python-pydiff
13431 (name "python-pydiff")
13436 (uri (pypi-uri "pydiff" version))
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")
13444 "@code{pydiff} makes it easy to look for actual code changes while
13445 ignoring formatting changes.")
13446 (license license:expat)))
13448 (define-public python2-pydiff
13449 (package-with-python2 python-pydiff))
13451 (define-public python-tqdm
13453 (name "python-tqdm")
13458 (uri (pypi-uri "tqdm" version))
13461 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13462 (build-system python-build-system)
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")
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))))
13475 (define-public python2-tqdm
13476 (package-with-python2 python-tqdm))
13478 (define-public python-pkginfo
13480 (name "python-pkginfo")
13485 (uri (pypi-uri "pkginfo" version))
13488 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13489 (build-system python-build-system)
13491 ;; The tests are broken upstream.
13494 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13496 "Query metadatdata from sdists, bdists, and installed packages")
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)))
13505 (define-public python2-pkginfo
13506 (package-with-python2 python-pkginfo))
13508 (define-public python-twine
13510 (name "python-twine")
13515 (uri (pypi-uri "twine" version))
13518 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13519 (build-system python-build-system)
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")
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)))
13533 (define-public python2-twine
13534 (package-with-python2 python-twine))
13536 (define-public python-linecache2
13538 (name "python-linecache2")
13543 (uri (pypi-uri "linecache2" version))
13546 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13547 (build-system python-build-system)
13549 `(;; The tests depend on unittest2, and our version is a bit too old.
13552 `(("python-pbr" ,python-pbr-minimal)))
13554 "https://github.com/testing-cabal/linecache2")
13555 (synopsis "Backports of the linecache module")
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)))
13562 (define-public python2-linecache2
13563 (package-with-python2 python-linecache2))
13565 (define-public python-traceback2
13567 (name "python-traceback2")
13572 (uri (pypi-uri "traceback2" version))
13575 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13576 (build-system python-build-system)
13578 `(;; python-traceback2 and python-unittest2 depend on one another.
13581 `(("python-pbr" ,python-pbr-minimal)))
13583 `(("python-linecache2" ,python-linecache2)))
13585 "https://github.com/testing-cabal/traceback2")
13586 (synopsis "Backports of the traceback module")
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)))
13593 (define-public python2-traceback2
13594 (package-with-python2 python-traceback2))
13596 (define-public python-ratelimiter
13598 (name "python-ratelimiter")
13603 (uri (pypi-uri "ratelimiter" version))
13606 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13607 (build-system python-build-system)
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")
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)))
13617 (define-public python2-ratelimiter
13618 (package-with-python2 python-ratelimiter))
13620 (define-public python-dukpy
13622 (name "python-dukpy")
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))
13632 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13633 (build-system python-build-system)
13634 (home-page "https://github.com/kovidgoyal/dukpy")
13635 (synopsis "Run JavaScript in python")
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))))
13643 (define-public python2-dukpy
13644 (package-with-python2 python-dukpy))
13646 (define-public python-jsonrpclib-pelix
13648 (name "python-jsonrpclib-pelix")
13653 (uri (pypi-uri "jsonrpclib-pelix" version))
13656 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13657 (build-system python-build-system)
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")
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
13667 (license license:asl2.0)))
13669 (define-public python2-jsonrpclib-pelix
13670 (package-with-python2 python-jsonrpclib-pelix))
13672 (define-public python-setuptools-scm-git-archive
13674 (name "python-setuptools-scm-git-archive")
13679 (uri (pypi-uri "setuptools_scm_git_archive" version))
13682 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13683 (build-system python-build-system)
13685 `(("python-pytest" ,python-pytest)))
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")
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)))
13696 (define-public python2-setuptools-scm-git-archive
13697 (package-with-python2 python-setuptools-scm-git-archive))
13699 (define-public python-setuptools-git
13701 (name "python-setuptools-git")
13706 (uri (pypi-uri "setuptools-git" version))
13709 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13710 (build-system python-build-system)
13713 (modify-phases %standard-phases
13714 ;; This is needed for tests.
13715 (add-after 'unpack 'configure-git
13717 (setenv "HOME" "/tmp")
13718 (invoke "git" "config" "--global" "user.email" "guix")
13719 (invoke "git" "config" "--global" "user.name" "guix")
13722 `(("git" ,git-minimal)))
13723 (home-page "https://github.com/msabramo/setuptools-git")
13724 (synopsis "Setuptools revision control system plugin for Git")
13726 "This package provides a plugin for Setuptools for revision control with
13728 (license license:bsd-3)))
13730 (define-public python-pyclipper
13732 (name "python-pyclipper")
13733 (version "1.1.0.post1")
13737 (uri (pypi-uri "pyclipper" version ".zip"))
13740 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13741 (modules '((guix build utils)))
13744 ;; This file is generated by Cython.
13745 (delete-file "pyclipper/pyclipper.cpp") #t))))
13746 (build-system python-build-system)
13749 (modify-phases %standard-phases
13750 (add-before 'build 'cythonize-sources
13752 (with-directory-excursion "pyclipper"
13753 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13755 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13757 `(("python-cython" ,python-cython)
13758 ("python-pytest" ,python-pytest)
13759 ("python-pytest-runner" ,python-pytest-runner)
13760 ("python-unittest2" ,python-unittest2)
13762 (home-page "https://github.com/greginvm/pyclipper")
13763 (synopsis "Wrapper for Angus Johnson's Clipper library")
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)))
13769 (define-public python2-pyclipper
13770 (package-with-python2 python-pyclipper))
13772 (define-public python2-booleanoperations
13774 (name "python2-booleanoperations")
13779 (uri (pypi-uri "booleanOperations" version ".zip"))
13782 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13783 (build-system python-build-system)
13785 `(#:python ,python-2))
13788 ("python2-pytest" ,python2-pytest)
13789 ("python2-pytest-runner" ,python2-pytest-runner)))
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")
13797 "BooleanOperations provides a Python library that enables
13798 boolean operations on paths.")
13799 (license license:expat)))
13801 (define-public python-tempdir
13803 (name "python-tempdir")
13808 (uri (pypi-uri "tempdir" version))
13811 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13812 (build-system python-build-system)
13813 (home-page "https://pypi.org/project/tempdir/")
13815 ;; the package has no tests
13817 (synopsis "Python library for managing temporary directories")
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)))
13824 (define-public python2-tempdir
13825 (package-with-python2 python-tempdir))
13827 (define-public python-activepapers
13829 (name "python-activepapers")
13834 (uri (pypi-uri "ActivePapers.Py" version))
13837 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13838 (build-system python-build-system)
13840 `(#:modules ((ice-9 ftw)
13843 (guix build python-build-system))
13846 (modify-phases %standard-phases
13847 (add-after 'unpack 'delete-python2-code
13849 (for-each delete-file
13850 '("lib/activepapers/builtins2.py"
13851 "lib/activepapers/standardlib2.py"
13852 "lib/activepapers/utility2.py"))))
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)))
13865 (string-suffix? ".py" filename)))))))))
13867 `(("python-tempdir" ,python-tempdir)
13868 ("python-nose" ,python-nose)))
13870 `(("python-h5py" ,python-h5py)))
13871 (home-page "http://www.activepapers.org/")
13872 (synopsis "Executable papers for scientific computing")
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)))
13881 (define-public python2-activepapers
13882 (let ((base (package-with-python2
13883 (strip-python2-variant python-activepapers))))
13887 (substitute-keyword-arguments (package-arguments base)
13889 `(modify-phases ,phases
13890 (delete 'delete-python2-code)
13891 (add-after 'unpack 'delete-python3-code
13893 (for-each delete-file
13894 '("lib/activepapers/builtins3.py"
13895 "lib/activepapers/standardlib3.py"
13896 "lib/activepapers/utility3.py")))))))))))
13898 (define-public python-semver
13900 (name "python-semver")
13905 (uri (pypi-uri "semver" version))
13908 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13909 (build-system python-build-system)
13912 (modify-phases %standard-phases
13913 (add-after 'unpack 'patch-test-requirements
13915 (substitute* "setup.py"
13916 ;; Our Python is new enough.
13917 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
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)))
13928 (define-public python2-semver
13929 (package-with-python2 python-semver))
13931 (define-public python-pyro4
13933 (name "python-pyro4")
13938 (uri (pypi-uri "Pyro4" version))
13940 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13941 (build-system python-build-system)
13943 `(("python-serpent" ,python-serpent)))
13944 (home-page "https://pyro4.readthedocs.io")
13945 (synopsis "Distributed object middleware for Python")
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)))
13952 (define-public python2-pyro
13954 (name "python2-pyro")
13959 (uri (pypi-uri "Pyro" version))
13960 (file-name (string-append "Pyro-" version ".tar.gz"))
13963 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13964 (build-system python-build-system)
13966 ;; Pyro is not compatible with Python 3
13967 `(#:python ,python-2
13968 ;; Pyro has no test cases for automatic execution
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)))
13981 (define-public python2-scientific
13983 (name "python2-scientific")
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"))
13994 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13995 (build-system python-build-system)
13997 `(("netcdf" ,netcdf)))
13999 `(("python-numpy" ,python2-numpy-1.8)
14000 ("python-pyro" ,python2-pyro)))
14002 ;; ScientificPython is not compatible with Python 3
14003 `(#:python ,python-2
14004 #:tests? #f ; No test suite
14006 (modify-phases %standard-phases
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)))
14021 (define-public python2-mmtk
14023 (name "python2-mmtk")
14028 (uri (string-append "https://bitbucket.org/khinsen/"
14029 "mmtk/downloads/MMTK-" version ".tar.gz"))
14030 (file-name (string-append "MMTK-" version ".tar.gz"))
14033 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14034 (build-system python-build-system)
14036 `(("netcdf" ,netcdf)))
14038 `(("python-scientific" ,python2-scientific)
14039 ("python-tkinter" ,python-2 "tk")))
14041 `(#:python ,python-2
14044 (modify-phases %standard-phases
14045 (add-before 'build 'includes-from-scientific
14046 (lambda* (#:key inputs #:allow-other-keys)
14047 (mkdir-p "Include/Scientific")
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)))
14062 (define-public python-phonenumbers
14064 (name "python-phonenumbers")
14069 (uri (pypi-uri "phonenumbers" version))
14072 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14073 (build-system python-build-system)
14075 "https://github.com/daviddrysdale/python-phonenumbers")
14077 "Python library for dealing with international phone numbers")
14079 "This package provides a Python port of Google's libphonenumber library.")
14080 (license license:asl2.0)))
14082 (define-public python2-phonenumbers
14083 (package-with-python2 python-phonenumbers))
14085 (define-public python-send2trash
14087 (name "python-send2trash")
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")
14095 (file-name (git-file-name name version))
14098 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14099 (build-system python-build-system)
14102 (modify-phases %standard-phases
14103 (add-before 'check 'pre-check
14105 (mkdir-p "/tmp/foo")
14106 (setenv "HOME" "/tmp/foo")
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)))
14115 (define-public python2-send2trash
14117 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14119 (substitute-keyword-arguments (package-arguments python-send2trash)
14121 `(modify-phases ,phases
14122 (add-before 'check 'setenv
14124 (setenv "PYTHONPATH"
14125 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14128 (define-public python-yapf
14130 (name "python-yapf")
14135 (uri (pypi-uri "yapf" version))
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)))
14148 (define-public python2-yapf
14149 (package-with-python2 python-yapf))
14151 (define-public python-gyp
14152 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
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))
14161 ;; Google does not release tarballs,
14162 ;; git checkout is needed.
14164 (uri (git-reference
14165 (url "https://chromium.googlesource.com/external/gyp")
14167 (file-name (git-file-name name version))
14170 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14171 (build-system python-build-system)
14172 (home-page "https://gyp.gsrc.io/")
14173 (synopsis "GYP is a Meta-Build system")
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))))
14180 (define-public python2-gyp
14181 (package-with-python2 python-gyp))
14183 (define-public python-whatever
14185 (name "python-whatever")
14190 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14194 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14195 (file-name (string-append name "-" version ".tar.gz"))))
14196 (build-system python-build-system)
14199 (modify-phases %standard-phases
14202 (invoke "py.test"))))))
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)))
14211 (define-public python2-whatever
14212 (package-with-python2 python-whatever))
14214 (define-public python-funcy
14216 (name "python-funcy")
14221 (uri (git-reference
14222 (url "https://github.com/Suor/funcy.git")
14225 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14226 (file-name (git-file-name name version))))
14227 (build-system python-build-system)
14230 (modify-phases %standard-phases
14233 (invoke "py.test"))))))
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.
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
14261 (license license:bsd-3)))
14263 (define-public python2-funcy
14264 (package-with-python2 python-funcy))
14266 (define-public python-isoweek
14268 (name "python-isoweek")
14273 (uri (pypi-uri "isoweek" version))
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)))
14286 (define-public python2-isoweek
14287 (package-with-python2 python-isoweek))
14289 (define-public python-tokenize-rt
14291 (name "python-tokenize-rt")
14296 (uri (pypi-uri "tokenize-rt" version))
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.")
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)))
14310 (define-public python-future-fstrings
14312 (name "python-future-fstrings")
14317 (uri (pypi-uri "future_fstrings" version))
14320 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14321 (build-system python-build-system)
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")
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)))
14333 (define-public python-typed-ast
14335 (name "python-typed-ast")
14340 (uri (pypi-uri "typed-ast" version))
14343 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14344 (build-system python-build-system)
14346 `(#:modules ((guix build utils)
14347 (guix build python-build-system)
14352 (modify-phases %standard-phases
14355 (let ((cwd (getcwd)))
14356 (setenv "PYTHONPATH"
14357 (string-append cwd "/build/"
14358 (find (cut string-prefix? "lib" <>)
14359 (scandir (string-append cwd "/build")))
14361 (getenv "PYTHONPATH"))))
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
14376 license:expat)))) ;ast27/Parser/spark.py
14378 (define-public python-typing
14380 (name "python-typing")
14385 (uri (pypi-uri "typing" version))
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
14398 (license license:psfl)))
14400 (define-public python2-typing
14401 (package-with-python2 python-typing))
14403 (define-public python-typing-extensions
14405 (name "python-typing-extensions")
14410 (uri (pypi-uri "typing_extensions" version))
14413 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14414 (build-system python-build-system)
14416 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14417 (synopsis "Experimental type hints for Python")
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:
14424 @item ContextManager
14435 @item TYPE_CHECKING
14436 @item AsyncGenerator
14438 (license license:psfl)))
14440 (define-public bpython
14447 (uri (pypi-uri "bpython" version))
14450 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14451 (build-system python-build-system)
14454 (modify-phases %standard-phases
14455 (add-after 'unpack 'remove-failing-test
14457 ;; Remove failing test. FIXME: make it pass
14458 (delete-file "bpython/test/test_args.py")
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")))
14466 (symlink old (string-append out "/bin/" new)))
14467 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14468 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
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)))
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
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
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.
14496 (license license:expat)))
14498 (define-public bpython2
14499 (let ((base (package-with-python2
14500 (strip-python2-variant bpython))))
14501 (package (inherit base)
14504 `(#:python ,python-2
14506 (modify-phases %standard-phases
14507 (add-after 'unpack 'remove-failing-test
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
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)))
14519 (add-before 'build 'rename-scripts
14520 ;; rename the scripts to bypthon2, bpdb2, etc.
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")))
14529 (define-public python-pyinotify
14531 (name "python-pyinotify")
14535 (uri (pypi-uri "pyinotify" version))
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")
14544 "@code{pyinotify} provides a Python interface for monitoring
14545 file system events on Linux.")
14546 (license license:expat)))
14548 (define-public python2-pyinotify
14549 (package-with-python2 python-pyinotify))
14551 ;; Ada parser uses this version.
14552 (define-public python2-quex-0.67.3
14554 (name "python2-quex")
14559 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14560 (version-major+minor version)
14561 "/quex-" version ".zip"))
14564 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14565 (build-system python-build-system)
14567 `(("unzip" ,unzip)))
14569 `(#:python ,python-2
14572 (modify-phases %standard-phases
14573 (delete 'configure)
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)
14582 (symlink (string-append share/quex "/quex-exe.py")
14583 (string-append bin "/quex"))
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
14594 (define-public python2-quex
14595 (package (inherit python2-quex-0.67.3)
14596 (name "python2-quex")
14601 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14604 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14605 (file-name (string-append name "-" version ".tar.gz"))))))
14607 (define-public python-more-itertools
14609 (name "python-more-itertools")
14614 (uri (pypi-uri "more-itertools" version))
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)))
14628 ;; The 5.x series are the last versions supporting Python 2.7.
14629 (define-public python2-more-itertools
14631 (inherit python-more-itertools)
14632 (name "python2-more-itertools")
14636 (uri (pypi-uri "more-itertools" version))
14639 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14641 `(#:python ,python2-minimal))
14643 `(("python2-six" ,python2-six-bootstrap)))))
14645 (define-public python-latexcodec
14647 (name "python-latexcodec")
14652 (uri (pypi-uri "latexcodec" version))
14654 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14655 (build-system python-build-system)
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)))
14663 (define-public python-pybtex
14665 (name "python-pybtex")
14670 (uri (pypi-uri "pybtex" version))
14673 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14674 (build-system python-build-system)
14676 `(("python-nose" ,python-nose)))
14678 `(("python-latexcodec" ,python-latexcodec)
14679 ("python-pyyaml" ,python-pyyaml)
14680 ("python-six" ,python-six)))
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)))
14689 (define-public python-onetimepass
14691 (name "python-onetimepass")
14696 (uri (pypi-uri "onetimepass" version))
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)))
14707 (define-public python-parso
14709 (name "python-parso")
14714 (uri (pypi-uri "parso" version))
14717 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
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)))
14728 (define-public python2-parso
14729 (package-with-python2 python-parso))
14731 (define-public python-async-generator
14733 (name "python-async-generator")
14738 (uri (pypi-uri "async_generator" version))
14741 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14742 (build-system python-build-system)
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.")
14750 (license (list license:expat license:asl2.0))))
14752 (define-public python-async-timeout
14754 (name "python-async-timeout")
14759 (uri (pypi-uri "async-timeout" version))
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)))
14770 (define-public python-glob2
14772 (name "python-glob2")
14777 (uri (git-reference
14778 (url "https://github.com/miracle2k/python-glob2.git")
14780 (file-name (git-file-name name version))
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
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).
14800 Glob2 currently based on the glob code from Python 3.3.1.")
14801 (license license:bsd-2)))
14803 (define-public python2-glob2
14804 (package-with-python2 python-glob2))
14806 (define-public python-gipc
14808 (name "python-gipc")
14813 (uri (pypi-uri "gipc" version ".zip"))
14816 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14817 (build-system python-build-system)
14819 `(("unzip" ,unzip)))
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)))
14830 (define-public python2-gipc
14831 (package-with-python2 python-gipc))
14833 (define-public python-fusepy
14835 (name "python-fusepy")
14840 (uri (pypi-uri "fusepy" version))
14843 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14844 (build-system python-build-system)
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'")))
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)))
14863 (define-public python2-fusepy
14864 (package-with-python2 python-fusepy))
14866 (define-public python2-gdrivefs
14868 (name "python2-gdrivefs")
14873 (uri (pypi-uri "gdrivefs" version))
14876 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14877 (build-system python-build-system)
14879 `(#:python ,python-2
14881 (modify-phases %standard-phases
14882 (add-before 'build 'patch-setup-py
14884 ;; Update requirements from dependency==version
14885 ;; to dependency>=version
14886 (substitute* "gdrivefs/resources/requirements.txt"
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)))
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)))
14907 (define-public pybind11
14913 (uri (git-reference
14914 (url "https://github.com/pybind/pybind11.git")
14915 (commit (string-append "v" version))))
14918 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
14919 (file-name (git-file-name name version))))
14920 (build-system cmake-build-system)
14922 `(("python" ,python)
14923 ("python-pytest" ,python-pytest)))
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
14934 (license license:expat)))
14936 (define-public python-fasteners
14938 (name "python-fasteners")
14943 (uri (pypi-uri "fasteners" version))
14946 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14947 (build-system python-build-system)
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")
14955 "This package provides a Python program that provides following locks:
14958 @item Locking decorator
14959 @item Reader-writer locks
14960 @item Inter-process locks
14961 @item Generic helpers
14963 (properties `((python2-variant . ,(delay python2-fasteners))))
14964 (license license:asl2.0)))
14966 (define-public python2-fasteners
14967 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14971 `(("python2-futures" ,python2-futures)
14972 ,@(package-propagated-inputs base))))))
14974 (define-public python-requests-file
14976 (name "python-requests-file")
14981 (uri (pypi-uri "requests-file" version))
14984 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14985 (build-system python-build-system)
14987 `(("python-requests" ,python-requests)
14988 ("python-six" ,python-six)))
14990 "https://github.com/dashea/requests-file")
14991 (synopsis "File transport adapter for Requests")
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)))
14997 (define-public python2-requests-file
14998 (package-with-python2 python-requests-file))
15000 (define-public python-tldextract
15002 (name "python-tldextract")
15007 (uri (pypi-uri "tldextract" version))
15010 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15011 (build-system python-build-system)
15013 `(("python-pytest" ,python-pytest)
15014 ("python-responses" ,python-responses)))
15016 `(("python-idna" ,python-idna)
15017 ("python-requests" ,python-requests)
15018 ("python-requests-file" ,python-requests-file)))
15020 "https://github.com/john-kurkowski/tldextract")
15022 "Separate the TLD from the registered domain and subdomains of a URL")
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)))
15030 (define-public python2-tldextract
15031 (package-with-python2 python-tldextract))
15033 (define-public python-pynamecheap
15035 (name "python-pynamecheap")
15040 (uri (pypi-uri "PyNamecheap" version))
15043 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15044 (build-system python-build-system)
15046 `(("python-requests" ,python-requests)))
15048 "https://github.com/Bemmu/PyNamecheap")
15050 "Namecheap API client in Python")
15052 "PyNamecheap is a Namecheap API client in Python.")
15053 (license license:expat)))
15055 (define-public python2-pynamecheap
15056 (package-with-python2 python-pynamecheap))
15058 (define-public python-dns-lexicon
15060 (name "python-dns-lexicon")
15065 (uri (pypi-uri "dns-lexicon" version))
15068 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15069 (build-system python-build-system)
15071 `(#:tests? #f)) ;requires internet access
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")
15080 "Manipulate DNS records on various DNS providers")
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
15086 (license license:expat)))
15088 (define-public python2-dns-lexicon
15089 (package-with-python2 python-dns-lexicon))
15091 (define-public python-commandlines
15093 (name "python-commandlines")
15098 (uri (pypi-uri "commandlines" version))
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")
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)))
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
15115 (name "python-numba")
15120 (uri (pypi-uri "numba" version))
15123 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15124 (build-system python-build-system)
15126 `(#:modules ((guix build utils)
15127 (guix build python-build-system)
15132 (modify-phases %standard-phases
15133 (add-after 'unpack 'disable-proprietary-features
15135 (setenv "NUMBA_DISABLE_HSA" "1")
15136 (setenv "NUMBA_DISABLE_CUDA" "1")
15138 (add-after 'unpack 'remove-failing-tests
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)))
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)))
15160 (let ((cwd (getcwd)))
15161 (setenv "PYTHONPATH"
15162 (string-append cwd "/build/"
15163 (find (cut string-prefix? "lib" <>)
15164 (scandir (string-append cwd "/build")))
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")))
15174 `(("python-llvmlite" ,python-llvmlite)
15175 ("python-numpy" ,python-numpy)
15176 ("python-singledispatch" ,python-singledispatch)))
15177 ;; Needed for tests.
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.
15189 Numba works by generating optimized machine code using the LLVM compiler
15190 infrastructure at import time, runtime, or statically (using the included pycc
15192 (license license:bsd-3)))
15194 (define-public python-anndata
15196 (name "python-anndata")
15201 (uri (pypi-uri "anndata" version))
15204 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15205 (build-system python-build-system)
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)))
15220 (define-public python-dill
15222 (name "python-dill")
15227 (uri (pypi-uri "dill" version))
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)))
15246 (define-public python-multiprocess
15248 (name "python-multiprocess")
15249 (version "0.70.6.1")
15253 (uri (pypi-uri "multiprocess" version))
15256 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15257 (build-system python-build-system)
15259 `(("python-dill" ,python-dill)))
15260 (home-page "https://pypi.org/project/multiprocess")
15261 (synopsis "Multiprocessing and multithreading in Python")
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)))
15268 (define-public python-toolz
15270 (name "python-toolz")
15275 (uri (pypi-uri "toolz" version))
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")
15286 "This package provides a set of utility functions for iterators,
15287 functions, and dictionaries.")
15288 (license license:bsd-3)))
15290 (define-public python2-toolz
15291 (package-with-python2 python-toolz))
15293 (define-public python-cytoolz
15295 (name "python-cytoolz")
15296 (version "0.9.0.1")
15300 (uri (pypi-uri "cytoolz" version))
15303 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15304 (build-system python-build-system)
15305 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15307 (arguments '(#:tests? #f))
15309 `(("python-toolz" ,python-toolz)))
15311 `(("python-cython" ,python-cython)))
15312 (home-page "https://github.com/pytoolz/cytoolz")
15313 (synopsis "High performance functional utilities")
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)))
15320 (define-public python-sortedcontainers
15322 (name "python-sortedcontainers")
15327 (uri (pypi-uri "sortedcontainers" version))
15330 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15331 (build-system python-build-system)
15333 `(("python-tox" ,python-tox)))
15334 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15335 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15337 "This package provides a sorted collections library, written in
15339 (license license:asl2.0)))
15341 (define-public python-cloudpickle
15343 (name "python-cloudpickle")
15348 (uri (pypi-uri "cloudpickle" version))
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))
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")
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
15373 (license license:bsd-3)))
15375 (define-public python2-cloudpickle
15376 (package-with-python2 python-cloudpickle))
15378 (define-public python-locket
15380 (name "python-locket")
15385 (uri (pypi-uri "locket" version))
15388 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15389 (build-system python-build-system)
15390 (home-page "https://github.com/mwilliamson/locket.py")
15391 (synopsis "File-based locks for Python")
15393 "Locket implements a lock that can be used by multiple processes provided
15394 they use the same path.")
15395 (license license:bsd-2)))
15397 (define-public python2-locket
15398 (package-with-python2 python-locket))
15400 (define-public python-blosc
15402 (name "python-blosc")
15407 (uri (pypi-uri "blosc" version))
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))
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.
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.
15428 This Python package wraps the Blosc library.")
15429 (license license:bsd-3)))
15431 (define-public python2-blosc
15432 (package-with-python2 python-blosc))
15434 (define-public python-partd
15436 (name "python-partd")
15441 (uri (pypi-uri "partd" version))
15444 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15445 (build-system python-build-system)
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)))
15459 (define-public python2-partd
15460 (package-with-python2 python-partd))
15462 (define-public python-dask
15464 (name "python-dask")
15469 (uri (pypi-uri "dask" version))
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.
15477 (modify-phases %standard-phases
15478 (add-after 'unpack 'disable-broken-test
15480 (substitute* "dask/tests/test_threaded.py"
15481 (("def test_interrupt\\(\\)" m)
15482 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
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"
15493 (lambda _ (invoke "pytest" "-vv"))))))
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)))
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")
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)))
15515 (define-public python2-dask
15516 (package-with-python2 python-dask))
15518 (define-public python-ilinkedlist
15520 (name "python-ilinkedlist")
15525 (uri (pypi-uri "ilinkedlist" version))
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")
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+)))
15543 (define-public python-readlike
15545 (name "python-readlike")
15550 (uri (pypi-uri "readlike" version))
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")
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.
15563 Currently, all stateless Readline commands are implemented. Yanking and history
15564 are not supported.")
15565 (license license:expat)))
15567 (define-public python2-readlike
15568 (package-with-python2 python-readlike))
15570 (define-public python-reparser
15572 (name "python-reparser")
15577 (uri (pypi-uri "ReParser" version))
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")
15584 "This Python library provides a simple lexer/parser for inline markup based
15585 on regular expressions.")
15586 (license license:expat)))
15588 (define-public python2-reparser
15589 (let ((reparser (package-with-python2
15590 (strip-python2-variant python-reparser))))
15591 (package (inherit reparser)
15593 `(("python2-enum34" ,python2-enum34)
15594 ,@(package-propagated-inputs reparser))))))
15596 (define-public python-precis-i18n
15598 (name "python-precis-i18n")
15603 (uri (pypi-uri "precis_i18n" version))
15606 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15607 (build-system python-build-system)
15608 (home-page "https://github.com/byllyfish/precis_i18n")
15609 (synopsis "Implementation of the PRECIS framework")
15611 "This module implements the PRECIS Framework as described in RFC 8264,
15612 RFC 8265 and RFC 8266.")
15613 (license license:expat)))
15615 (define-public python-absl-py
15617 (name "python-absl-py")
15622 (uri (pypi-uri "absl-py" version))
15625 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15626 (build-system python-build-system)
15628 `(("python-six" ,python-six)))
15629 (home-page "https://github.com/abseil/abseil-py")
15630 (synopsis "Abseil Python common libraries")
15632 "This package provides the Abseil Python Common Libraries, a collection
15633 of Python libraries for building Python applications.")
15634 (license license:asl2.0)))
15636 (define-public python-astor
15638 (name "python-astor")
15643 (uri (pypi-uri "astor" version))
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)))
15656 (define-public python2-astor
15657 (package-with-python2 python-astor))
15659 (define-public python-grpcio
15661 (name "python-grpcio")
15666 (uri (pypi-uri "grpcio" version))
15669 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15670 (build-system python-build-system)
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)))
15679 (define-public python-astunparse
15681 (name "python-astunparse")
15686 (uri (pypi-uri "astunparse" version))
15688 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15689 (build-system python-build-system)
15690 (arguments '(#:tests? #f)) ; there are none
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
15699 (license license:bsd-3)))
15701 (define-public python-gast
15703 (name "python-gast")
15708 (uri (pypi-uri "gast" version))
15710 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15711 (build-system python-build-system)
15713 `(("python-astunparse" ,python-astunparse)))
15714 (home-page "https://pypi.org/project/gast/")
15715 (synopsis "Generic Python AST that abstracts the underlying Python version")
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}
15720 (license license:bsd-3)))
15722 (define-public python-wikidata
15724 (name "python-wikidata")
15729 (uri (pypi-uri "Wikidata" version))
15732 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15733 (build-system python-build-system)
15735 `(("python-babel" ,python-babel)))
15736 (home-page "https://github.com/dahlia/wikidata")
15737 (synopsis "Wikidata client library")
15739 "This package provides a Python interface to
15740 @url{https://www.wikidata.org/, Wikidata}.")
15741 (properties '((upstream-name . "Wikidata")))
15742 (license license:gpl3+)))
15744 (define-public python-doctest-ignore-unicode
15746 (name "python-doctest-ignore-unicode")
15751 (uri (pypi-uri "doctest-ignore-unicode" version))
15754 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15755 (build-system python-build-system)
15757 `(("python-nose" ,python-nose)))
15758 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15759 (synopsis "Ignore Unicode literal prefixes in doctests")
15761 "This package adds support for a flag to ignore Unicode literal prefixes
15763 (license license:asl2.0)))
15765 (define-public python-attr
15767 (name "python-attr")
15772 (uri (pypi-uri "attr" version))
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)))
15783 (define-public python-construct
15785 (name "python-construct")
15790 (uri (pypi-uri "construct" version))
15793 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15794 (build-system python-build-system)
15796 `(#:tests? #f)) ; No tests exist.
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")
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)))
15813 (define-public python-humanize
15815 (name "python-humanize")
15820 (uri (pypi-uri "humanize" version))
15823 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
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)))
15834 (define-public python-txaio
15836 (name "python-txaio")
15841 (uri (pypi-uri "txaio" version))
15844 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15845 (build-system python-build-system)
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)))
15855 (define-public python-toolshed
15857 (name "python-toolshed")
15862 (uri (pypi-uri "toolshed" version))
15865 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15866 (build-system python-build-system)
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)))
15875 (define-public python-annoy
15877 (name "python-annoy")
15882 (uri (pypi-uri "annoy" version))
15885 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15886 (build-system python-build-system)
15888 `(("python-nose" ,python-nose)))
15889 (home-page "https://github.com/spotify/annoy/")
15890 (synopsis "Approximate nearest neighbors library")
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)))
15898 (define-public python-pylzma
15900 (name "python-pylzma")
15905 (uri (pypi-uri "pylzma" version))
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
15914 (license license:lgpl2.1+)))
15916 (define-public python2-pylzma
15917 (package-with-python2 python-pylzma))
15919 (define-public python2-zeroconf
15921 (name "python2-zeroconf")
15923 ;; This is the last version that supports Python 2.x.
15928 (uri (pypi-uri "zeroconf" version))
15931 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15932 (build-system python-build-system)
15934 `(#:python ,python-2
15936 (modify-phases %standard-phases
15937 (add-after 'unpack 'patch-requires
15938 (lambda* (#:key inputs #:allow-other-keys)
15939 (substitute* "setup.py"
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")
15951 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15953 (license license:lgpl2.1+)))
15955 (define-public python-bsddb3
15957 (name "python-bsddb3")
15962 (uri (pypi-uri "bsddb3" version))
15965 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15966 (build-system python-build-system)
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")
15979 (invoke "python3" "test3.py" "-v"))))))
15980 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15981 (synopsis "Python bindings for Oracle Berkeley DB")
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)))
15992 (define-public python-dbfread
15994 (name "python-dbfread")
15998 (uri (pypi-uri "dbfread" version))
16001 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16002 (build-system python-build-system)
16004 `(("python-pytest" ,python-pytest)))
16005 (home-page "https://dbfread.readthedocs.io")
16006 (synopsis "Read DBF Files with Python")
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
16011 (license license:expat)))
16013 (define-public python-cached-property
16015 (name "python-cached-property")
16020 (uri (pypi-uri "cached-property" version))
16023 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16024 (build-system python-build-system)
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
16032 (substitute* "tests/test_cached_property.py"
16033 (("def test_threads_ttl_expiry\\(self\\)" m)
16034 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16038 `(("python-freezegun" ,python-freezegun)))
16040 "https://github.com/pydanny/cached-property")
16042 "Decorator for caching properties in classes")
16044 "This package provides a decorator which makes caching
16045 time-or-computationally-expensive properties quick and easy and works in Python
16047 (license license:bsd-3)))