1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
69 ;;; This file is part of GNU Guix.
71 ;;; GNU Guix is free software; you can redistribute it and/or modify it
72 ;;; under the terms of the GNU General Public License as published by
73 ;;; the Free Software Foundation; either version 3 of the License, or (at
74 ;;; your option) any later version.
76 ;;; GNU Guix is distributed in the hope that it will be useful, but
77 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 ;;; GNU General Public License for more details.
81 ;;; You should have received a copy of the GNU General Public License
82 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
84 (define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages dbm)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
117 #:use-module (gnu packages monitoring)
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-check)
127 #:use-module (gnu packages python-compression)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sphinx)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
151 #:use-module (gnu packages serialization)
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
155 #:use-module (guix hg-download)
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
164 (define-public python-psutil
166 (name "python-psutil")
171 (uri (pypi-uri "psutil" version))
174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
175 (build-system python-build-system)
177 ;; FIXME: some tests does not return and times out.
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
182 "psutil (Python system and process utilities) is a library for retrieving
183 information on running processes and system utilization (CPU, memory, disks,
184 network) in Python. It is useful mainly for system monitoring, profiling and
185 limiting process resources and management of running processes. It implements
186 many functionalities offered by command line tools such as: ps, top, lsof,
187 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188 pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
192 (define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
200 (define-public python-shapely
202 (name "python-shapely")
203 (version "1.6.4.post2")
207 (uri (pypi-uri "Shapely" version))
210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
211 (build-system python-build-system)
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
220 `(("python-numpy" ,python-numpy)))
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240 planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
243 (define-public python-shortuuid
245 (name "python-shortuuid")
250 (uri (pypi-uri "shortuuid" version))
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262 module and then similar looking characters are removed.")
263 (license license:bsd-3)))
265 (define-public python-logwrap
267 (name "python-logwrap")
272 (uri (pypi-uri "logwrap" version ".zip"))
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289 and function call return values in a human-readable way.")
290 (license license:asl2.0)))
292 (define-public python2-shapely
293 (package-with-python2 python-shapely))
295 (define-public python-clyent
297 (name "python-clyent")
302 (uri (pypi-uri "clyent" version))
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
315 (define-public python2-clyent
316 (package-with-python2 python-clyent))
318 (define-public python-babel
320 (name "python-babel")
325 (uri (pypi-uri "Babel" version))
328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
329 (build-system python-build-system)
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
334 `(("python-pytz" ,python-pytz)))
336 `(#:phases (modify-phases %standard-phases
339 (invoke "pytest" "-vv" "-k"
341 ;; XXX: These tests fail when using Pytest 4.x and
342 ;; Babel 2.6.0. Try removing this for later versions.
343 "not test_no_inherit_metazone_marker_never_in_output"
344 " and not test_smoke_dates"
345 " and not test_smoke_numbers")))))))
346 (home-page "http://babel.pocoo.org/")
348 "Tools for internationalizing Python applications")
350 "Babel is composed of two major parts:
351 - tools to build and work with gettext message catalogs
352 - a Python interface to the CLDR (Common Locale Data Repository), providing
353 access to various locale display names, localized number and date formatting,
355 (license license:bsd-3)))
357 (define-public python2-babel
358 (package-with-python2 python-babel))
360 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
361 (define-public python2-babel-2.6
363 (inherit python2-babel)
367 (uri (pypi-uri "Babel" version))
370 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372 (define-public python2-backport-ssl-match-hostname
374 (name "python2-backport-ssl-match-hostname")
379 (uri (pypi-uri "backports.ssl_match_hostname" version))
382 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
383 (build-system python-build-system)
386 #:tests? #f)) ; no test target
387 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
388 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 "This backport brings the ssl.match_hostname() function to users of
391 earlier versions of Python. The function checks the hostname in the
392 certificate returned by the server to which a connection has been established,
393 and verifies that it matches the intended target hostname.")
394 (license license:psfl)))
396 (define-public python-hdf4
403 (uri (pypi-uri name version))
406 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
407 (build-system python-build-system)
408 (native-inputs `(("nose" ,python-nose)))
409 (propagated-inputs `(("numpy" ,python-numpy)))
416 (modify-phases %standard-phases
419 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
420 ;; on to import numpy. Somehow this works on their CI system.
421 ;; Let's just manage PYTHONPATH here instead.
422 (substitute* "runexamples.sh"
423 (("export PYTHONPATH=.*") ""))
425 (string-append (getcwd) ":"
426 (getenv "PYTHONPATH")))
427 (invoke "./runexamples.sh")
428 (invoke "nosetests" "-v"))))))
429 (home-page "https://github.com/fhs/python-hdf4")
430 (synopsis "Python interface to the NCSA HDF4 library")
432 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
433 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
434 NetCDF files can also be read and modified. Python-HDF4 is a fork of
435 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
436 (license license:expat)))
438 (define-public python2-hdf4
439 (package-with-python2 python-hdf4))
441 (define-public python-h5py
448 (uri (pypi-uri "h5py" version))
451 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
452 (build-system python-build-system)
454 `(#:tests? #f ; no test target
456 (modify-phases %standard-phases
457 (add-after 'unpack 'fix-hdf5-paths
458 (lambda* (#:key inputs #:allow-other-keys)
459 (let ((prefix (assoc-ref inputs "hdf5")))
460 (substitute* "setup_build.py"
461 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
462 (string-append "['" prefix "/lib" "']"))
463 (("'/opt/local/include', '/usr/local/include'")
464 (string-append "'" prefix "/include" "'")))
465 (substitute* "setup_configure.py"
466 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
467 (string-append "['" prefix "/lib" "']")))
470 `(("python-six" ,python-six)
471 ("python-numpy" ,python-numpy)))
475 `(("python-cython" ,python-cython)
476 ("python-pkgconfig" ,python-pkgconfig)))
477 (home-page "http://www.h5py.org/")
478 (synopsis "Read and write HDF5 files from Python")
480 "The h5py package provides both a high- and low-level interface to the
481 HDF5 library from Python. The low-level interface is intended to be a
482 complete wrapping of the HDF5 API, while the high-level component supports
483 access to HDF5 files, datasets and groups using established Python and NumPy
485 (license license:bsd-3)))
487 (define-public python2-h5py
488 (package-with-python2 python-h5py))
490 (define-public python-sh
497 (uri (pypi-uri "sh" version))
500 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
501 (build-system python-build-system)
504 (modify-phases %standard-phases
507 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
508 (setenv "HOME" "/tmp")
509 (invoke "python" "sh.py" "test"))))))
511 `(("python-coverage" ,python-coverage)))
512 (home-page "https://github.com/amoffat/sh")
513 (synopsis "Python subprocess replacement")
514 (description "This package provides a replacement for Python's
515 @code{subprocess} feature.")
516 (license license:expat)))
518 (define-public python2-sh
519 (package-with-python2 python-sh))
521 (define-public python-cftime
523 (name "python-cftime")
528 (uri (pypi-uri "cftime" version))
531 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
532 (build-system python-build-system)
534 `(("python-numpy" ,python-numpy)))
536 `(("python-coveralls" ,python-coveralls)
537 ("python-cython" ,python-cython)
538 ("python-pytest-cov" ,python-pytest-cov)))
539 (home-page "https://github.com/Unidata/cftime")
540 (synopsis "Library for time handling")
542 "This package provides time-handling functionality that used to be part
543 of the netcdf4 package before.")
544 ;; This package claims to include code under the GPLv3 but is released
546 (license (list license:isc license:gpl3+))))
548 (define-public python-netcdf4
550 (name "python-netcdf4")
555 (uri (pypi-uri "netCDF4" version))
558 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
559 (build-system python-build-system)
562 (modify-phases %standard-phases
563 (add-after 'unpack 'configure-locations
564 (lambda* (#:key inputs #:allow-other-keys)
565 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
568 `(("python-cython" ,python-cython)))
570 `(("python-numpy" ,python-numpy)
571 ("python-cftime" ,python-cftime)))
576 (home-page "https://github.com/Unidata/netcdf4-python")
577 (synopsis "Python/numpy interface to the netCDF library")
578 (description "Netcdf4-python is a Python interface to the netCDF C
579 library. netCDF version 4 has many features not found in earlier
580 versions of the library and is implemented on top of HDF5. This module
581 can read and write files in both the new netCDF 4 and the old netCDF 3
582 format, and can create files that are readable by HDF5 clients. The
583 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
584 to users of that module.")
585 ;; The software is mainly ISC, but includes some files covered
586 ;; by the Expat license.
587 (license (list license:isc license:expat))))
589 (define-public python2-netcdf4
590 (package-with-python2 python-netcdf4))
592 (define-public python-lockfile
594 (name "python-lockfile")
599 (uri (pypi-uri "lockfile" version))
602 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
603 (build-system python-build-system)
604 (arguments '(#:test-target "check"))
606 `(("python-pbr" ,python-pbr)))
607 (home-page "https://launchpad.net/pylockfile")
608 (synopsis "Platform-independent file locking module")
610 "The lockfile package exports a LockFile class which provides a simple
611 API for locking files.")
612 (license license:expat)))
614 (define-public python2-lockfile
615 (package-with-python2 python-lockfile))
617 (define-public python-semantic-version
619 (name "python-semantic-version")
624 (uri (pypi-uri "semantic_version" version))
627 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
628 (build-system python-build-system)
630 `(#:tests? #f)) ; PyPI tarball lacks tests
631 (home-page "https://github.com/rbarrois/python-semanticversion")
632 (synopsis "Semantic versioning module for Python")
634 "The @code{semantic_version} class is a small library for handling
635 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
637 It can compare versions, generate a new version that represents a bump in one of
638 the version levels, and check whether any given string is a proper semantic
639 version identifier.")
640 (license license:bsd-3)))
642 (define-public python2-semantic-version
643 (package-with-python2 python-semantic-version))
645 (define-public python-serpent
647 (name "python-serpent")
652 (uri (pypi-uri "serpent" version))
654 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
655 (build-system python-build-system)
657 `(("python-attrs" ,python-attrs)
658 ("python-pytz" ,python-pytz)))
659 (home-page "https://github.com/irmen/Serpent")
660 (synopsis "Serializer for literal Python expressions")
662 "Serpent provides @code{ast.literal_eval()}-compatible object tree
663 serialization. It serializes an object tree into bytes (an utf-8 encoded
664 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
665 to rebuild the original object tree.
667 Because only safe literals are encoded, it is safe to send serpent data to
668 other machines, such as over the network.")
669 (license license:expat)))
671 (define-public python-setuptools
673 (name "python-setuptools")
678 (uri (pypi-uri "setuptools" version ".zip"))
681 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
682 (modules '((guix build utils)))
685 ;; Remove included binaries which are used to build self-extracting
686 ;; installers for Windows.
687 ;; TODO: Find some way to build them ourself so we can include them.
688 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
690 (build-system python-build-system)
691 ;; FIXME: Tests require pytest, which itself relies on setuptools.
692 ;; One could bootstrap with an internal untested setuptools.
695 (home-page "https://pypi.python.org/pypi/setuptools")
697 "Library designed to facilitate packaging Python projects")
699 "Setuptools is a fully-featured, stable library designed to facilitate
700 packaging Python projects, where packaging includes:
701 Python package and module definitions,
702 distribution package metadata,
704 project installation,
705 platform-specific details,
707 ;; TODO: setuptools now bundles the following libraries:
708 ;; packaging, pyparsing, six and appdirs. How to unbundle?
709 (license (list license:psfl ; setuptools itself
710 license:expat ; six, appdirs, pyparsing
711 license:asl2.0 ; packaging is dual ASL2/BSD-2
714 (define-public python2-setuptools
715 (package-with-python2 python-setuptools))
717 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
718 (define-public python-setuptools-for-tensorflow
721 (inherit python-setuptools)
724 (inherit (package-source python-setuptools))
725 (uri (pypi-uri "setuptools" version ".zip"))
728 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
730 (define-public python-uniseg
732 (name "python-uniseg")
737 (uri (pypi-uri "uniseg" version ".zip"))
740 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
741 (build-system python-build-system)
743 '(#:tests? #f)) ; The test suite requires network access.
747 "https://bitbucket.org/emptypage/uniseg-python")
749 "Python library to determine Unicode text segmentations")
751 "Uniseg is a Python package used to determine Unicode text segmentations.
752 Supported segmentations include:
754 @item @dfn{Code point} (any value in the Unicode codespace)
755 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
756 multiple Unicode code points, e.g. \"G\" + acute-accent)
761 (license license:expat)))
763 (define-public python2-uniseg
764 (package-with-python2 python-uniseg))
766 (define-public python-humanfriendly
768 (name "python-humanfriendly")
773 (uri (pypi-uri "humanfriendly" version))
776 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
777 (build-system python-build-system)
779 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
782 `(("python-monotonic" ,python-monotonic)))
783 (home-page "https://humanfriendly.readthedocs.io")
784 (synopsis "Human-friendly input and output in Python")
786 "The functions and classes in @code{humanfriendly} can be used to make
787 text interfaces more user-friendly. It includes tools to parse and format
788 numbers, file sizes, and timespans, timers for long-running operations, menus
789 to allow the user to choose from a list of options, and terminal interaction
791 (license license:expat)))
793 (define-public python2-humanfriendly
794 (package-with-python2 python-humanfriendly))
796 (define-public python-capturer
798 (name "python-capturer")
803 (uri (pypi-uri "capturer" version))
806 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
807 (build-system python-build-system)
811 `(("python-humanfriendly" ,python-humanfriendly)))
812 (home-page "https://capturer.readthedocs.io")
813 (synopsis "Capture stdout and stderr streams of the current process")
815 "The capturer package makes it easy to capture the stdout and stderr
816 streams of the current process and subprocesses. Output can be relayed
817 to the terminal in real time but is also available to the Python program
818 for additional processing.")
819 (license license:expat)))
821 (define-public python2-capturer
822 (package-with-python2 python-capturer))
824 (define-public python-case
831 (uri (pypi-uri "case" version))
834 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
835 (build-system python-build-system)
837 `(("python-mock" ,python-mock)
838 ("python-nose" ,python-nose)
839 ("python-six" ,python-six)
840 ("python-unittest2" ,python-unittest2)))
842 `(("python-coverage" ,python-coverage)))
843 (home-page "https://github.com/celery/case")
844 (synopsis "Unittest utilities and convenience methods")
846 "The @code{case} package provides utilities on top of unittest, including
847 some helpful Python 2 compatibility convenience methods.")
848 (license license:bsd-3)))
850 (define-public python-verboselogs
852 (name "python-verboselogs")
857 (uri (pypi-uri "verboselogs" version))
860 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
861 (build-system python-build-system)
863 `(("python-mock" ,python-mock)
864 ("python-astroid" ,python-astroid)
865 ("python-pylint" ,python-pylint)))
866 (home-page "https://verboselogs.readthedocs.io")
867 (synopsis "Verbose logging level for Python's logging module")
869 "The @code{verboselogs} package extends Python's @code{logging} module to
870 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
871 (license license:expat)))
873 (define-public python2-verboselogs
874 (package-with-python2 python-verboselogs))
876 (define-public python-coloredlogs
878 (name "python-coloredlogs")
883 (uri (pypi-uri "coloredlogs" version))
886 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
887 (build-system python-build-system)
889 `(;Tests require some updated modules
892 `(("python-capturer" ,python-capturer)))
893 (home-page "https://coloredlogs.readthedocs.io")
894 (synopsis "Colored stream handler for Python's logging module")
896 "The @code{coloredlogs} package enables colored terminal output for
897 Python's logging module. The @code{ColoredFormatter} class inherits from
898 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
900 (license license:expat)))
902 (define-public python2-coloredlogs
903 (package-with-python2 python-coloredlogs))
905 (define-public python-et-xmlfile
907 (name "python-et-xmlfile")
912 (uri (pypi-uri "et_xmlfile" version))
915 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
916 (build-system python-build-system)
918 `(#:phases (modify-phases %standard-phases
921 (invoke "pytest"))))))
923 `(("python-pytest" ,python-pytest)
924 ("python-lxml" ,python-lxml))) ;used for the tests
925 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
926 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
927 (description "This Python library is based upon the @code{xmlfile} module
928 from @code{lxml}. It aims to provide a low memory, compatible implementation
930 (license license:expat)))
932 (define-public python2-et-xmlfile
933 (package-with-python2 python-et-xmlfile))
935 (define-public python-openpyxl
937 (name "python-openpyxl")
941 ;; We use the upstream repository, as the tests are not included in the
945 (url "https://bitbucket.org/openpyxl/openpyxl")
946 (changeset version)))
947 (file-name (string-append name "-" version "-checkout"))
949 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
950 (build-system python-build-system)
952 `(#:phases (modify-phases %standard-phases
955 (invoke "pytest"))))))
957 ;; For the test suite.
958 `(("python-lxml" ,python-lxml)
959 ("python-pillow" ,python-pillow)
960 ("python-pytest" ,python-pytest)))
962 `(("python-et-xmlfile" ,python-et-xmlfile)
963 ("python-jdcal" ,python-jdcal)))
964 (home-page "https://openpyxl.readthedocs.io")
965 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
966 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
967 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
969 (license license:expat)))
971 (define-public python-eventlet
973 (name "python-eventlet")
978 (uri (pypi-uri "eventlet" version))
981 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
982 (build-system python-build-system)
984 `(("python-greenlet" ,python-greenlet)))
986 ;; TODO: Requires unpackaged 'enum-compat'.
988 (home-page "http://eventlet.net")
989 (synopsis "Concurrent networking library for Python")
991 "Eventlet is a concurrent networking library for Python that
992 allows you to change how you run your code, not how you write it.
993 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
994 Coroutines ensure that the developer uses a blocking style of programming
995 that is similar to threading, but provide the benefits of non-blocking I/O.
996 The event dispatch is implicit, which means you can easily use @code{Eventlet}
997 from the Python interpreter, or as a small part of a larger application.")
998 (license license:expat)))
1000 (define-public python2-eventlet
1001 (let ((base (package-with-python2
1002 (strip-python2-variant python-eventlet))))
1003 (package (inherit base)
1005 `(("python2-enum34" ,python2-enum34)
1006 ,@(package-propagated-inputs base))))))
1008 (define-public python-six
1015 (uri (pypi-uri "six" version))
1018 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1019 (build-system python-build-system)
1022 (modify-phases %standard-phases
1025 (invoke "py.test" "-v"))))))
1027 `(("python-py" ,python-py)
1028 ("python-pytest" ,python-pytest-bootstrap)))
1029 (home-page "https://pypi.python.org/pypi/six/")
1030 (synopsis "Python 2 and 3 compatibility utilities")
1032 "Six is a Python 2 and 3 compatibility library. It provides utility
1033 functions for smoothing over the differences between the Python versions with
1034 the goal of writing Python code that is compatible on both Python versions.
1035 Six supports every Python version since 2.5. It is contained in only one
1036 Python file, so it can be easily copied into your project.")
1037 (license license:x11)))
1039 (define-public python2-six
1040 (package-with-python2 python-six))
1042 (define-public python-six-bootstrap
1044 (inherit python-six)
1045 (name "python-six-bootstrap")
1047 (arguments `(#:tests? #f))))
1049 (define-public python2-six-bootstrap
1050 (package-with-python2 python-six-bootstrap))
1052 (define-public python-schedule
1054 (name "python-schedule")
1059 (uri (pypi-uri "schedule" version))
1062 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1063 (build-system python-build-system)
1065 `(("python-pytest" ,python-pytest)
1066 ("python-mock" ,python-mock)))
1067 (home-page "https://github.com/dbader/schedule")
1068 (synopsis "Schedule periodic function calls in Python")
1070 "Schedule is an in-process scheduler for periodic jobs that uses the
1071 builder pattern for configuration. Schedule lets you run Python functions (or
1072 any other callable) periodically at pre-determined intervals using a simple,
1073 human-friendly syntax.")
1074 (license license:expat)))
1076 (define-public python2-schedule
1077 (package-with-python2 python-schedule))
1079 (define-public python-pandas
1081 (name "python-pandas")
1086 (uri (pypi-uri "pandas" version))
1088 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1089 (build-system python-build-system)
1091 `(#:modules ((guix build utils)
1092 (guix build python-build-system)
1095 #:phases (modify-phases %standard-phases
1096 (add-after 'unpack 'patch-which
1097 (lambda* (#:key inputs #:allow-other-keys)
1098 (let ((which (assoc-ref inputs "which")))
1099 (substitute* "pandas/io/clipboard/__init__.py"
1100 (("^CHECK_CMD = .*")
1101 (string-append "CHECK_CMD = \"" which "\"\n"))))
1105 (let ((build-directory
1108 (car (scandir "build"
1109 (cut string-prefix? "lib." <>))))))
1110 ;; Disable the "strict data files" option which causes
1111 ;; the build to error out if required data files are
1112 ;; not available (as is the case with PyPI archives).
1113 (substitute* "setup.cfg"
1114 (("addopts = --strict-data-files") "addopts = "))
1115 (with-directory-excursion build-directory
1116 ;; Delete tests that require "moto" which is not yet
1118 (for-each delete-file
1119 '("pandas/tests/io/conftest.py"
1120 "pandas/tests/io/json/test_compression.py"
1121 "pandas/tests/io/parser/test_network.py"
1122 "pandas/tests/io/test_parquet.py"))
1123 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1124 "--skip-network" "-k"
1125 ;; XXX: Due to the deleted tests above.
1126 "not test_read_s3_jsonl"))))))))
1128 `(("python-numpy" ,python-numpy)
1129 ("python-openpyxl" ,python-openpyxl)
1130 ("python-pytz" ,python-pytz)
1131 ("python-dateutil" ,python-dateutil)
1132 ("python-xlrd" ,python-xlrd)))
1134 `(("which" ,which)))
1136 `(("python-cython" ,python-cython)
1137 ("python-beautifulsoup4" ,python-beautifulsoup4)
1138 ("python-lxml" ,python-lxml)
1139 ("python-html5lib" ,python-html5lib)
1140 ("python-nose" ,python-nose)
1141 ("python-pytest" ,python-pytest)
1142 ("python-pytest-mock" ,python-pytest-mock)))
1143 (home-page "https://pandas.pydata.org")
1144 (synopsis "Data structures for data analysis, time series, and statistics")
1146 "Pandas is a Python package providing fast, flexible, and expressive data
1147 structures designed to make working with structured (tabular,
1148 multidimensional, potentially heterogeneous) and time series data both easy
1149 and intuitive. It aims to be the fundamental high-level building block for
1150 doing practical, real world data analysis in Python.")
1151 (license license:bsd-3)))
1153 (define-public python2-pandas
1154 (package-with-python2 python-pandas))
1156 (define-public python2-mechanize
1158 (name "python2-mechanize")
1163 (uri (pypi-uri "mechanize" version))
1166 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1167 (build-system python-build-system)
1169 `(#:python ,python-2 ; apparently incompatible with Python 3
1171 ;; test fails with message
1172 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1173 ;; (python-3.3.2) or
1174 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1176 ;; The source code is from March 2011 and probably not up-to-date
1177 ;; with respect to python unit tests.
1178 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1180 "Stateful programmatic web browsing in Python")
1182 "Mechanize implements stateful programmatic web browsing in Python,
1183 after Andy Lester’s Perl module WWW::Mechanize.")
1184 (license (license:non-copyleft
1186 "See COPYING in the distribution."))))
1189 (define-public python-simplejson
1191 (name "python-simplejson")
1196 (uri (pypi-uri "simplejson" version))
1199 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1200 (build-system python-build-system)
1201 (home-page "http://simplejson.readthedocs.org/en/latest/")
1203 "Json library for Python")
1205 "JSON (JavaScript Object Notation) is a subset of JavaScript
1206 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1209 Simplejson exposes an API familiar to users of the standard library marshal
1210 and pickle modules. It is the externally maintained version of the json
1211 library contained in Python 2.6, but maintains compatibility with Python 2.5
1212 and (currently) has significant performance advantages, even without using
1213 the optional C extension for speedups. Simplejson is also supported on
1215 (license license:x11)))
1217 (define-public python2-simplejson
1218 (package-with-python2 python-simplejson))
1221 (define-public python-pyicu
1223 (name "python-pyicu")
1228 (uri (pypi-uri "PyICU" version))
1231 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1232 (build-system python-build-system)
1234 `(("icu4c" ,icu4c)))
1236 `(("python-pytest" ,python-pytest)
1237 ("python-six" ,python-six)))
1238 (home-page "https://github.com/ovalhub/pyicu")
1239 (synopsis "Python extension wrapping the ICU C++ API")
1241 "PyICU is a python extension wrapping the ICU C++ API.")
1242 (properties `((python2-variant . ,(delay python2-pyicu))))
1243 (license license:x11)))
1245 (define-public python2-pyicu
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-pyicu))))
1251 `(,@(package-arguments base)
1253 (modify-phases %standard-phases
1254 (add-before 'check 'delete-failing-test
1256 ;; XXX: This fails due to Unicode issues unique to Python 2,
1257 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1258 (delete-file "test/test_Script.py")
1261 (define-public python2-dogtail
1262 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1263 ;; spaces in indentation" with Python 3.
1265 (name "python2-dogtail")
1269 (uri (pypi-uri "dogtail" version))
1272 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1273 (build-system python-build-system)
1274 (arguments `(#:python ,python-2
1275 #:tests? #f)) ; invalid command "test"
1276 ;; Currently no offical homepage.
1277 (home-page "https://pypi.python.org/pypi/dogtail/")
1278 (synopsis "GUI test tool and automation framework written in Python")
1280 "Dogtail is a GUI test tool and automation framework written in Python.
1281 It uses Accessibility (a11y) technologies to communicate with desktop
1282 applications. dogtail scripts are written in Python and executed like any
1283 other Python program.")
1284 (license license:gpl2+)))
1286 (define-public python-empy
1288 (name "python-empy")
1292 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1296 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1297 (build-system python-build-system)
1299 `(#:tests? #f)) ; python2 only
1300 (home-page "http://www.alcyone.com/software/empy/")
1301 (synopsis "Templating system for Python")
1303 "EmPy is a system for embedding Python expressions and statements in
1304 template text; it takes an EmPy source file, processes it, and produces
1305 output. This is accomplished via expansions, which are special signals to the
1306 EmPy system and are set off by a special prefix (by default the at sign, @@).
1307 EmPy can expand arbitrary Python expressions and statements in this way, as
1308 well as a variety of special forms. Textual data not explicitly delimited in
1309 this way is sent unaffected to the output, allowing Python to be used in
1310 effect as a markup language. Also supported are callbacks via hooks,
1311 recording and playback via diversions, and dynamic, chainable filters. The
1312 system is highly configurable via command line options and embedded
1314 (license license:lgpl2.1+)))
1316 (define-public python2-empy
1317 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1320 (arguments `(,@(package-arguments base)
1323 (define-public python2-element-tree
1325 (name "python2-element-tree")
1330 "http://effbot.org/media/downloads/elementtree-"
1331 version "-20050316.tar.gz"))
1334 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1335 (build-system python-build-system)
1337 `(#:python ,python-2 ; seems to be part of Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (synopsis "Toolkit for XML processing in Python")
1341 "ElementTree is a Python library supporting lightweight XML processing.")
1342 (home-page "http://effbot.org/zone/element-index.htm")
1343 (license (license:x11-style
1344 "http://docs.python.org/2/license.html"
1345 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1347 (define-public python2-pybugz
1349 (name "python2-pybugz")
1354 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1358 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1359 (patches (search-patches "pybugz-stty.patch"
1360 "pybugz-encode-error.patch"))))
1361 (build-system python-build-system)
1363 `(#:python ,python-2 ; SyntaxError with Python 3
1364 #:tests? #f)) ; no 'test' sub-command
1366 `(("element-tree" ,python2-element-tree)))
1367 (synopsis "Python and command-line interface to Bugzilla")
1369 "PyBugz is a Python library and command-line tool to query the Bugzilla
1370 bug tracking system. It is meant as an aid to speed up interaction with the
1372 (home-page "http://www.liquidx.net/pybugz/")
1373 (license license:gpl2)))
1375 (define-public python2-enum
1377 (name "python2-enum")
1381 (uri (pypi-uri "enum" version))
1384 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1385 (build-system python-build-system)
1387 `(#:python ,python-2))
1388 (home-page "http://pypi.python.org/pypi/enum/")
1389 (synopsis "Robust enumerated type support in Python")
1391 "This provides a module for robust enumerations in Python. It has
1392 been superseded by the Python standard library and is provided only for
1394 ;; Choice of either license.
1395 (license (list license:gpl3+ license:psfl))))
1397 (define-public python-enum34
1399 (name "python-enum34")
1404 (uri (pypi-uri "enum34" version))
1407 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1408 (build-system python-build-system)
1409 (home-page "https://pypi.python.org/pypi/enum34")
1410 (synopsis "Backported Python 3.4 Enum")
1412 "Enum34 is the new Python stdlib enum module available in Python 3.4
1413 backported for previous versions of Python from 2.4 to 3.3.")
1414 (license license:bsd-3)))
1416 (define-public python2-enum34
1417 (package-with-python2 python-enum34))
1419 (define-public python-parse-type
1421 (name "python-parse-type")
1426 (uri (pypi-uri "parse_type" version))
1429 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1430 (build-system python-build-system)
1432 `(("python-six" ,python-six)
1433 ("python-parse" ,python-parse)))
1435 `(("python-pytest" ,python-pytest)
1436 ("python-pytest-runner" ,python-pytest-runner)))
1437 (home-page "https://github.com/jenisys/parse_type")
1438 (synopsis "Extended parse module")
1440 "Parse_type extends the python parse module.")
1442 `((python2-variant . ,(delay python2-parse-type))))
1443 (license license:bsd-3)))
1445 (define-public python2-parse-type
1446 (let ((base (package-with-python2
1447 (strip-python2-variant python-parse-type))))
1448 (package (inherit base)
1450 `(("python2-enum34" ,python2-enum34)
1451 ,@(package-propagated-inputs base))))))
1453 (define-public python-parse
1455 (name "python-parse")
1460 (uri (pypi-uri "parse" version))
1463 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1464 (build-system python-build-system)
1467 (modify-phases %standard-phases
1469 (lambda _ (invoke "python" "test_parse.py"))))))
1470 (home-page "https://github.com/r1chardj0n3s/parse")
1471 (synopsis "Parse strings")
1473 "Parse strings using a specification based on the Python @code{format()}
1475 (license license:x11)))
1477 (define-public python-polib
1479 (name "python-polib")
1483 (uri (pypi-uri "polib" version))
1486 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1487 (build-system python-build-system)
1488 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1489 (synopsis "Manipulate, create and modify gettext files")
1490 (description "Polib can manipulate any gettext format (po, pot and mo)
1491 files. It can be used to create po files from scratch or to modify
1493 (license license:expat)))
1495 (define-public python2-polib
1496 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1499 (arguments `(,@(package-arguments base)
1500 ;; Tests don't work with python2.
1503 (define-public scons
1510 (url "https://github.com/SCons/scons.git")
1512 (file-name (git-file-name name version))
1515 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1516 (build-system python-build-system)
1518 `(#:use-setuptools? #f ; still relies on distutils
1519 #:tests? #f ; no 'python setup.py test' command
1521 (modify-phases %standard-phases
1522 (add-before 'build 'bootstrap
1524 (substitute* "src/engine/SCons/compat/__init__.py"
1525 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1526 "sys.modules[new] = __import__(old)"))
1527 (substitute* "src/engine/SCons/Platform/__init__.py"
1528 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1529 "mod = __import__(full_name)"))
1530 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1531 (chdir "build/scons")
1533 (home-page "http://scons.org/")
1534 (synopsis "Software construction tool written in Python")
1536 "SCons is a software construction tool. Think of SCons as an improved,
1537 cross-platform substitute for the classic Make utility with integrated
1538 functionality similar to autoconf/automake and compiler caches such as ccache.
1539 In short, SCons is an easier, more reliable and faster way to build
1541 (license license:x11)))
1543 (define-public scons-python2
1545 (inherit (package-with-python2 scons))
1546 (name "scons-python2")))
1548 (define-public python-extras
1550 (name "python-extras")
1555 (uri (pypi-uri "extras" version))
1558 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1559 (build-system python-build-system)
1561 ;; FIXME: Circular dependency on testtools.
1563 (home-page "https://github.com/testing-cabal/extras")
1564 (synopsis "Useful extensions to the Python standard library")
1566 "Extras is a set of extensions to the Python standard library.")
1567 (license license:expat)))
1569 (define-public python2-extras
1570 (package-with-python2 python-extras))
1572 (define-public python-mimeparse
1574 (name "python-mimeparse")
1579 (uri (pypi-uri "python-mimeparse" version))
1582 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1583 (build-system python-build-system)
1586 (modify-phases %standard-phases
1589 (invoke "./mimeparse_test.py"))))))
1591 "https://github.com/dbtsai/python-mimeparse")
1592 (synopsis "Python library for parsing MIME types")
1594 "Mimeparse provides basic functions for parsing MIME type names and
1595 matching them against a list of media-ranges.")
1596 (license license:expat)))
1598 (define-public python2-mimeparse
1599 (package-with-python2 python-mimeparse))
1601 (define-public python-miniboa
1603 (name "python-miniboa")
1608 (uri (pypi-uri "miniboa" version))
1611 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1612 (build-system python-build-system)
1613 (home-page "https://github.com/shmup/miniboa")
1614 (synopsis "Simple, single-threaded Telnet server")
1616 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1618 (license license:asl2.0)))
1620 (define-public python2-miniboa
1621 (package-with-python2 python-miniboa))
1623 (define-public python-pafy
1625 (name "python-pafy")
1630 (uri (pypi-uri "pafy" version))
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1647 (define-public python2-funcsigs
1649 (name "python2-funcsigs")
1653 (uri (pypi-uri "funcsigs" version))
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1659 `(#:python ,python-2))
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1668 (define-public python2-funcsigs-bootstrap
1670 (inherit python2-funcsigs)
1671 (name "python2-funcsigs-bootstrap")
1675 ,@(package-arguments python2-funcsigs)))))
1677 (define-public python-py
1684 (uri (pypi-uri "py" version))
1687 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1688 (build-system python-build-system)
1690 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1691 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1692 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1693 ;; Is this module globally installed?"
1696 `(("python-setuptools-scm" ,python-setuptools-scm)))
1697 (home-page "https://github.com/pytest-dev/py")
1698 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1700 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1701 code introspection, and logging.")
1702 (license license:expat)))
1704 (define-public python2-py
1705 (package-with-python2 python-py))
1707 ;; Recent versions of python-fixtures and python-testrepository need
1708 ;; python-pbr for packaging, which itself needs these two packages for
1710 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1711 ;; same source, just without any test dependencies and with tests disabled.
1712 ;; python-pbr-minmal is then used to package python-fixtures and
1713 ;; python-testrepository.
1714 ;; Strictly speaking we currently could remove the test-requirements from the
1715 ;; normal python-pbr package (and save this package) since test are disabled
1716 ;; there anyway. But this may change in future.
1717 (define-public python-pbr-minimal
1719 (name "python-pbr-minimal")
1724 (uri (pypi-uri "pbr" version))
1727 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1728 (build-system python-build-system)
1731 (home-page "http://docs.openstack.org/developer/pbr/")
1732 (synopsis "Minimal build of python-pbr used for bootstrapping")
1734 "Used only for bootstrapping python2-pbr, you should not need this.")
1735 (license license:asl2.0)))
1737 (define-public python2-pbr-minimal
1738 (package-with-python2 python-pbr-minimal))
1740 (define-public python-pbr
1742 (inherit python-pbr-minimal)
1745 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1747 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1749 `(("python-fixtures" ,python-fixtures-bootstrap)
1750 ;; discover, coverage, hacking, subunit
1751 ("python-mock" ,python-mock)
1752 ("python-six" ,python-six)
1753 ("python-sphinx" ,python-sphinx)
1754 ("python-testrepository" ,python-testrepository-bootstrap)
1755 ("python-testresources" ,python-testresources-bootstrap)
1756 ("python-testscenarios" ,python-testscenarios-bootstrap)
1757 ("python-testtools" ,python-testtools-bootstrap)
1758 ("python-virtualenv" ,python-virtualenv)))
1759 (synopsis "Enhance the default behavior of Python’s setuptools")
1761 "Python Build Reasonableness (PBR) is a library that injects some useful
1762 and sensible default behaviors into your setuptools run. It will set
1763 versions, process requirements files and generate AUTHORS and ChangeLog file
1764 from git information.
1767 (define-public python2-pbr
1768 (package-with-python2 python-pbr))
1770 (define-public python-pyrsistent
1772 (name "python-pyrsistent")
1774 (home-page "https://github.com/tobgu/pyrsistent")
1777 (uri (pypi-uri "pyrsistent" version))
1780 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1781 (build-system python-build-system)
1783 `(("python-hypothesis" ,python-hypothesis)
1784 ("python-pytest" ,python-pytest)
1785 ("python-pytest-runner" ,python-pytest-runner)))
1787 `(("python-six" ,python-six)))
1788 (synopsis "Persistent data structures for Python")
1790 "Pyrsistent is a number of persistent collections (by some referred to as
1791 functional data structures). Persistent in the sense that they are immutable.
1793 All methods on a data structure that would normally mutate it instead return a
1794 new copy of the structure containing the requested updates. The original
1795 structure is left untouched.")
1796 (license license:expat)))
1798 (define-public python2-pyrsistent
1799 (package-with-python2 python-pyrsistent))
1801 (define-public python-exif-read
1803 (name "python-exif-read")
1807 (uri (pypi-uri "ExifRead" version))
1810 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1811 (build-system python-build-system)
1812 (arguments `(#:tests? #f)) ; no tests
1813 (home-page "https://github.com/ianare/exif-py")
1814 (synopsis "Python library to extract EXIF data from image files")
1816 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1818 (license license:bsd-3)))
1820 (define-public python2-exif-read
1821 (package-with-python2 python-exif-read))
1823 (define-public python-pyld
1825 (name "python-pyld")
1829 (uri (pypi-uri "PyLD" version))
1832 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1833 (build-system python-build-system)
1834 (home-page "https://github.com/digitalbazaar/pyld")
1835 (synopsis "Python implementation of the JSON-LD specification")
1837 "PyLD is an implementation of the JSON-LD specification.")
1838 (license license:bsd-3)))
1840 (define-public python2-pyld
1841 (package-with-python2 python-pyld))
1843 (define-public python-click
1845 (name "python-click")
1850 (uri (pypi-uri "click" version))
1853 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1854 (build-system python-build-system)
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'fix-paths
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1861 "cross-libc" "libc"))))
1862 (substitute* "click/_unicodefun.py"
1864 (string-append "'" glibc "/bin/locale'"))))
1868 (invoke "python" "-m" "pytest"))))))
1870 `(("python-pytest" ,python-pytest)))
1871 (home-page "https://palletsprojects.com/p/click/")
1872 (synopsis "Command line library for Python")
1874 "Click is a Python package for creating command line interfaces in a
1875 composable way with as little code as necessary. Its name stands for
1876 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1877 with sensible defaults out of the box.")
1878 (license license:bsd-3)))
1880 (define-public python2-click
1881 (package-with-python2 python-click))
1883 (define-public python-wheel
1885 (name "python-wheel")
1890 (uri (pypi-uri "wheel" version))
1893 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1894 (build-system python-build-system)
1896 `(("python-jsonschema" ,python-jsonschema)
1897 ("python-pytest-cov" ,python-pytest-cov)))
1898 (home-page "https://bitbucket.org/pypa/wheel/")
1899 (synopsis "Format for built Python packages")
1901 "A wheel is a ZIP-format archive with a specially formatted filename and
1902 the @code{.whl} extension. It is designed to contain all the files for a PEP
1903 376 compatible install in a way that is very close to the on-disk format. Many
1904 packages will be properly installed with only the @code{Unpack} step and the
1905 unpacked archive preserves enough information to @code{Spread} (copy data and
1906 scripts to their final locations) at any later time. Wheel files can be
1907 installed with a newer @code{pip} or with wheel's own command line utility.")
1908 (license license:expat)
1909 (properties `((python2-variant . ,(delay python2-wheel))))))
1911 (define-public python2-wheel
1912 (let ((wheel (package-with-python2
1913 (strip-python2-variant python-wheel))))
1914 (package (inherit wheel)
1915 (native-inputs `(("python2-functools32" ,python2-functools32)
1916 ,@(package-native-inputs wheel))))))
1918 (define-public python-vcversioner
1920 (name "python-vcversioner")
1921 (version "2.16.0.0")
1925 (uri (pypi-uri "vcversioner" version))
1928 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1929 (build-system python-build-system)
1930 (synopsis "Python library for version number discovery")
1931 (description "Vcversioner is a Python library that inspects tagging
1932 information in a variety of version control systems in order to discover
1934 (home-page "https://github.com/habnabit/vcversioner")
1935 (license license:isc)))
1937 (define-public python2-vcversioner
1938 (package-with-python2 python-vcversioner))
1940 (define-public python-jdcal
1942 (name "python-jdcal")
1947 (uri (pypi-uri "jdcal" version))
1950 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1951 (build-system python-build-system)
1953 `(#:phases (modify-phases %standard-phases
1956 (invoke "pytest"))))))
1958 `(("python-pytest" ,python-pytest)))
1959 (home-page "https://github.com/phn/jdcal")
1960 (synopsis "Functions to convert between Julian dates Gregorian dates")
1961 (description "This Python library provides functions for converting
1962 between Julian dates and Gregorian dates.")
1963 (license license:bsd-2)))
1965 (define-public python2-jdcal
1966 (package-with-python2 python-jdcal))
1968 (define-public python-jsonschema
1970 (name "python-jsonschema")
1974 (uri (pypi-uri "jsonschema" version))
1977 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1978 (build-system python-build-system)
1981 (modify-phases %standard-phases
1984 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1985 (invoke "trial" "jsonschema"))))))
1987 `(("python-setuptools_scm" ,python-setuptools-scm)
1988 ("python-twisted" ,python-twisted)))
1990 `(("python-attrs" ,python-attrs)
1991 ("python-pyrsistent" ,python-pyrsistent)
1992 ("python-six" ,python-six)))
1993 (home-page "https://github.com/Julian/jsonschema")
1994 (synopsis "Implementation of JSON Schema for Python")
1996 "Jsonschema is an implementation of JSON Schema for Python.")
1997 (license license:expat)
1998 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2000 (define-public python2-jsonschema
2001 (let ((jsonschema (package-with-python2
2002 (strip-python2-variant python-jsonschema))))
2003 (package (inherit jsonschema)
2005 `(("python2-functools32" ,python2-functools32)
2006 ,@(package-propagated-inputs jsonschema))))))
2008 ;; This old version is still required by docker-compose as of 1.24.0.
2009 (define-public python-jsonschema-2.6
2011 (name "python-jsonschema")
2015 (uri (pypi-uri "jsonschema" version))
2018 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2019 (build-system python-build-system)
2022 (modify-phases %standard-phases
2023 (replace 'check (lambda _ (invoke "nosetests"))))))
2025 `(("python-nose" ,python-nose)
2026 ("python-vcversioner" ,python-vcversioner)))
2027 (home-page "https://github.com/Julian/jsonschema")
2028 (synopsis "Implementation of JSON Schema for Python")
2030 "Jsonschema is an implementation of JSON Schema for Python.")
2031 (license license:expat)
2032 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2034 (define-public python-schema
2036 (name "python-schema")
2041 (uri (pypi-uri "schema" version))
2044 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2045 (build-system python-build-system)
2047 `(("python-pytest" ,python-pytest)))
2048 (home-page "https://github.com/keleshev/schema")
2049 (synopsis "Simple data validation library")
2051 "@code{python-schema} is a library for validating Python data
2052 structures, such as those obtained from config-files, forms, external
2053 services or command-line parsing, converted from JSON/YAML (or
2054 something else) to Python data-types.")
2055 (license license:psfl)))
2057 (define-public python2-schema
2058 (package-with-python2 python-schema))
2060 (define-public python-schema-0.5
2061 (package (inherit python-schema)
2066 (uri (pypi-uri "schema" version))
2069 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2071 (define-public python2-schema-0.5
2072 (package-with-python2 python-schema-0.5))
2074 (define-public python-kitchen
2076 (name "python-kitchen")
2081 (uri (pypi-uri "kitchen" version))
2084 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2085 (build-system python-build-system)
2087 `(("python-chardet" ,python-chardet)))
2088 (home-page "https://github.com/fedora-infra/kitchen")
2089 (synopsis "Python API for snippets")
2090 (description "@code{kitchen} module provides a python API for all sorts of
2091 little useful snippets of code that everybody ends up writing for their projects
2092 but never seem big enough to build an independent release. Use kitchen and stop
2093 cutting and pasting that code over and over.")
2094 (license (list license:lgpl2.1+
2095 ;; subprocess.py, test_subprocess.py,
2096 ;; kitchen/pycompat25/defaultdict.py:
2099 (define-public python2-kitchen
2100 (package-with-python2 python-kitchen))
2102 (define-public python-unidecode
2104 (name "python-unidecode")
2108 (uri (pypi-uri "Unidecode" version))
2111 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2112 (build-system python-build-system)
2113 (home-page "https://pypi.python.org/pypi/Unidecode")
2114 (synopsis "ASCII transliterations of Unicode text")
2116 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2117 useful when integrating with legacy code that doesn't support Unicode, or for
2118 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2119 machine identifiers from human-readable Unicode strings that should still be
2120 somewhat intelligible.")
2121 (license license:gpl2+)))
2123 (define-public python2-unidecode
2124 (package-with-python2 python-unidecode))
2126 (define-public python-pyjwt
2128 (name "python-pyjwt")
2133 (uri (pypi-uri "PyJWT" version))
2136 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2137 (modules '((guix build utils)))
2140 (for-each delete-file-recursively
2141 (find-files "." "\\.pyc$"))
2143 (build-system python-build-system)
2145 `(("python-pytest" ,python-pytest)
2146 ("python-pytest-cov" ,python-pytest-cov)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/progrium/pyjwt")
2149 (synopsis "JSON Web Token implementation in Python")
2151 "PyJWT is a JSON Web Token implementation written in Python.")
2152 (license license:expat)))
2154 (define-public python2-pyjwt
2155 (package-with-python2 python-pyjwt))
2157 (define-public python-pykka
2159 (name "python-pykka")
2164 (uri (pypi-uri "Pykka" version))
2167 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2168 (build-system python-build-system)
2170 `(("python-mock" ,python-mock)
2171 ("python-nose" ,python-nose)
2172 ("python-gevent" ,python-gevent)
2173 ("python-eventlet" ,python-eventlet)))
2174 (home-page "https://www.pykka.org/")
2175 (synopsis "Pykka is a Python implementation of the actor model")
2177 "Pykka is a Python implementation of the actor model.
2178 The actor model introduces some simple rules to control the sharing
2179 of state and cooperation between execution units, which makes it
2180 easier to build concurrent applications.")
2181 (license license:asl2.0)))
2183 (define-public python2-pykka
2184 (package-with-python2 python-pykka))
2186 (define-public python-pymsgbox
2188 (name "python-pymsgbox")
2194 ;; LICENSE.txt is not present on pypi
2195 (url "https://github.com/asweigart/PyMsgBox")
2196 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2197 (file-name (git-file-name name version))
2200 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2202 ;; Circular dependency to run tests:
2203 ;; Tests need pyautogui, which depends on pymsgbox.
2205 (build-system python-build-system)
2206 (home-page "https://github.com/asweigart/PyMsgBox")
2207 (synopsis "Python module for JavaScript-like message boxes")
2209 "PyMsgBox is a simple, cross-platform, pure Python module for
2210 JavaScript-like message boxes. Types of dialog boxes include:
2218 (license license:bsd-3)))
2220 (define-public python-pympler
2222 (name "python-pympler")
2223 (home-page "https://pythonhosted.org/Pympler/")
2227 (uri (pypi-uri "Pympler" version))
2230 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2231 (build-system python-build-system)
2233 `(#:phases (modify-phases %standard-phases
2235 (add-after 'install 'check
2236 (lambda* (#:key inputs outputs #:allow-other-keys)
2237 (add-installed-pythonpath inputs outputs)
2238 (invoke "python" "setup.py" "test"))))))
2239 (synopsis "Measure, monitor and analyze memory behavior")
2241 "Pympler is a development tool to measure, monitor and analyze
2242 the memory behavior of Python objects in a running Python application.
2244 By pympling a Python application, detailed insight in the size and the
2245 lifetime of Python objects can be obtained. Undesirable or unexpected
2246 runtime behavior like memory bloat and other @samp{pymples} can easily
2249 A web profiling frontend exposes process statistics, garbage
2250 visualisation and class tracker statistics.")
2251 (license license:asl2.0)))
2253 (define-public python2-pympler
2254 (package-with-python2 python-pympler))
2256 (define-public python-itsdangerous
2258 (name "python-itsdangerous")
2263 (uri (pypi-uri "itsdangerous" version))
2266 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2267 (build-system python-build-system)
2268 (home-page "https://palletsprojects.com/p/itsdangerous/")
2269 (synopsis "Python library for passing data to/from untrusted environments")
2271 "Itsdangerous provides various helpers to pass trusted data to untrusted
2272 environments and back.")
2273 (license license:bsd-3)))
2275 (define-public python2-itsdangerous
2276 (package-with-python2 python-itsdangerous))
2278 (define-public python-pyyaml
2280 (name "python-pyyaml")
2285 (uri (pypi-uri "PyYAML" version))
2288 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2289 (build-system python-build-system)
2291 `(("libyaml" ,libyaml)))
2292 (home-page "http://pyyaml.org/wiki/PyYAML")
2293 (synopsis "YAML parser and emitter for Python")
2295 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2296 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2297 API, and sensible error messages. PyYAML supports standard YAML tags and
2298 provides Python-specific tags that allow to represent an arbitrary Python
2300 (license license:expat)))
2302 (define-public python2-pyyaml
2303 (package-with-python2 python-pyyaml))
2305 (define-public python-vine
2307 (name "python-vine")
2312 (uri (pypi-uri "vine" version))
2315 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2316 (build-system python-build-system)
2318 `(("python-pytest" ,python-pytest)
2319 ("python-case" ,python-case)))
2320 (home-page "https://github.com/celery/vine")
2321 (synopsis "Promises for Python")
2323 "@code{vine} provides a special implementation of promises in that it can
2324 be used both for \"promise of a value\" and lazy evaluation. The biggest
2325 upside for this is that everything in a promise can also be a promise,
2326 e.g. filters, callbacks and errbacks can all be promises.")
2327 (license license:bsd-3)))
2329 (define-public python-virtualenv
2331 (name "python-virtualenv")
2336 (uri (pypi-uri "virtualenv" version))
2339 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2340 (build-system python-build-system)
2343 (modify-phases %standard-phases
2344 (add-before 'check 'disable-failing-test
2346 ;; Disable failing test. See upstream bug report
2347 ;; https://github.com/pypa/virtualenv/issues/957
2348 (substitute* "tests/test_virtualenv.py"
2349 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2352 `(("python-mock" ,python-mock)
2353 ("python-pytest" ,python-pytest)))
2354 (home-page "https://virtualenv.pypa.io/")
2355 (synopsis "Virtual Python environment builder")
2357 "Virtualenv is a tool to create isolated Python environments.")
2358 (license license:expat)))
2360 (define-public python2-virtualenv
2361 (package-with-python2 python-virtualenv))
2363 (define-public python-markupsafe
2365 (name "python-markupsafe")
2370 (uri (pypi-uri "MarkupSafe" version))
2373 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2374 (build-system python-build-system)
2376 `(#:modules ((ice-9 ftw)
2380 (guix build python-build-system))
2381 #:phases (modify-phases %standard-phases
2384 (let ((cwd (getcwd))
2385 (libdir (find (cut string-prefix? "lib." <>)
2386 (scandir "build"))))
2387 (setenv "PYTHONPATH"
2388 (string-append cwd "/build/" libdir ":"
2389 (getenv "PYTHONPATH")))
2390 (invoke "pytest" "-vv")))))))
2392 `(("python-pytest" ,python-pytest)))
2393 (home-page "https://github.com/mitsuhiko/markupsafe")
2394 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2396 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2398 (license license:bsd-3)))
2400 (define-public python2-markupsafe
2401 (package-with-python2 python-markupsafe))
2403 (define-public python-jinja2
2405 (name "python-jinja2")
2410 (uri (pypi-uri "Jinja2" version))
2413 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2414 (build-system python-build-system)
2416 `(("python-markupsafe" ,python-markupsafe)))
2417 (home-page "http://jinja.pocoo.org/")
2418 (synopsis "Python template engine")
2420 "Jinja2 is a small but fast and easy to use stand-alone template engine
2421 written in pure Python.")
2422 (license license:bsd-3)))
2424 (define-public python2-jinja2
2425 (package-with-python2 python-jinja2))
2427 (define-public python-pystache
2429 (name "python-pystache")
2433 (uri (pypi-uri "pystache" version))
2436 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2437 (build-system python-build-system)
2439 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2440 (home-page "http://defunkt.io/pystache/")
2441 (synopsis "Python logic-less template engine")
2443 "Pystache is a Python implementation of the framework agnostic,
2444 logic-free templating system Mustache.")
2445 (license license:expat)
2446 (properties `((python2-variant . ,(delay python2-pystache))))))
2448 (define-public python2-pystache
2449 (package (inherit (package-with-python2
2450 (strip-python2-variant python-pystache)))
2452 `(#:python ,python-2
2454 (modify-phases %standard-phases
2457 (invoke "python" "test_pystache.py"))))))))
2459 (define-public python-joblib
2461 (name "python-joblib")
2465 (uri (pypi-uri "joblib" version))
2468 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2469 (build-system python-build-system)
2472 (modify-phases %standard-phases
2474 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2476 `(("python-pytest" ,python-pytest)))
2477 (home-page "https://joblib.readthedocs.io/")
2478 (synopsis "Using Python functions as pipeline jobs")
2480 "Joblib is a set of tools to provide lightweight pipelining in Python.
2481 In particular, joblib offers: transparent disk-caching of the output values
2482 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2483 logging and tracing of the execution.")
2484 (license license:bsd-3)))
2486 (define-public python2-joblib
2487 (package-with-python2 python-joblib))
2489 (define-public python-daemon
2491 (name "python-daemon")
2496 (uri (pypi-uri "python-daemon" version))
2499 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2500 (build-system python-build-system)
2503 (modify-phases %standard-phases
2504 (add-before 'check 'disable-tests
2506 ;; FIXME: Determine why test fails
2507 (substitute* "test/test_daemon.py"
2508 (("test_detaches_process_context")
2509 "skip_test_detaches_process_context"))
2512 `(("python-lockfile" ,python-lockfile)))
2514 `(("python-unittest2" ,python-unittest2)
2515 ("python-testtools" ,python-testtools)
2516 ("python-testscenarios" ,python-testscenarios)
2517 ("python-mock" ,python-mock)
2518 ("python-docutils" ,python-docutils)))
2519 (home-page "https://pagure.io/python-daemon/")
2520 (synopsis "Python library for making a Unix daemon process")
2521 (description "Python-daemon is a library that assists a Python program to
2522 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2524 This library provides a @code{DaemonContext} class that manages the following
2525 important tasks for becoming a daemon process:
2527 @item Detach the process into its own process group.
2528 @item Set process environment appropriate for running inside a chroot.
2529 @item Renounce suid and sgid privileges.
2530 @item Close all open file descriptors.
2531 @item Change the working directory, uid, gid, and umask.
2532 @item Set appropriate signal handlers.
2533 @item Open new file descriptors for stdin, stdout, and stderr.
2534 @item Manage a specified PID lock file.
2535 @item Register cleanup functions for at-exit processing.
2537 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2538 (license (list license:asl2.0 license:gpl3+))))
2540 (define-public python-docutils
2542 (name "python-docutils")
2547 (uri (pypi-uri "docutils" version))
2550 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2551 (build-system python-build-system)
2553 '(#:tests? #f)) ; no setup.py test command
2554 (home-page "http://docutils.sourceforge.net/")
2555 (synopsis "Python Documentation Utilities")
2557 "Docutils is a modular system for processing documentation into useful
2558 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2560 ;; Most of the source code is public domain, but some source files are
2561 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2562 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2564 (define-public python2-docutils
2565 (package-with-python2 python-docutils))
2567 (define-public python-pygments
2569 (name "python-pygments")
2574 (uri (pypi-uri "Pygments" version))
2577 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2578 (build-system python-build-system)
2580 ;; FIXME: Tests require sphinx, which depends on this.
2582 (home-page "http://pygments.org/")
2583 (synopsis "Syntax highlighting")
2585 "Pygments is a syntax highlighting package written in Python.")
2586 (license license:bsd-2)))
2588 (define-public python2-pygments
2589 (package-with-python2 python-pygments))
2591 (define-public python-bumpversion
2593 (name "python-bumpversion")
2598 (uri (pypi-uri "bumpversion" version))
2601 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2602 (build-system python-build-system)
2603 (home-page "https://github.com/peritus/bumpversion")
2604 (synopsis "Tool to bump software version")
2605 (description "This tool provides a command-line interface (CLI) to bump a
2606 software version simply.")
2607 (license license:expat)))
2609 (define-public python-deprecated
2611 (name "python-deprecated")
2617 (url "https://github.com/tantale/deprecated.git")
2618 (commit (string-append "v" version))))
2619 (file-name (git-file-name name version))
2622 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2623 (build-system python-build-system)
2625 `(#:phases (modify-phases %standard-phases
2628 (invoke "pytest"))))))
2630 `(("python-wrapt" ,python-wrapt)))
2632 `(("python-bumpversion" ,python-bumpversion)
2633 ("python-pytest" ,python-pytest)
2634 ("python-pytest-cov" ,python-pytest-cov)
2635 ("python-sphinx" ,python-sphinx)
2636 ("python-tox" ,python-tox)))
2637 (home-page "https://github.com/tantale/deprecated")
2638 (synopsis "Python decorator to deprecate classes, functions or methods")
2639 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2640 to deprecate classes, functions or methods.")
2641 (license license:expat)))
2643 (define-public python-pygithub
2645 (name "python-pygithub")
2648 ;; We fetch from the Git repo because there are no tests in the PyPI
2653 (url "https://github.com/PyGithub/PyGithub.git")
2654 (commit (string-append "v" version))))
2655 (file-name (git-file-name name version))
2658 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2659 (build-system python-build-system)
2661 `(#:phases (modify-phases %standard-phases
2662 ;; Some tests rely on the network.
2663 (add-after 'unpack 'disable-failing-tests
2665 (substitute* "tests/Issue142.py"
2666 (("testDecodeJson") "disabled_testDecodeJson"))
2668 (add-before 'check 'prepare-for-tests
2670 (for-each (lambda (f)
2672 (find-files "./tests"))
2673 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2674 (setenv "PYTHONPATH"
2675 (string-append "./tests:" (getenv "PYTHONPATH")))
2678 `(("python-deprecated" ,python-deprecated)
2679 ("python-pyjwt" ,python-pyjwt)
2680 ("python-requests" ,python-requests)))
2681 (native-inputs `(("python-httpretty" ,python-httpretty)))
2682 (home-page "https://pygithub.readthedocs.io/en/latest/")
2683 (synopsis "Python library for the GitHub API")
2684 (description "This library allows managing GitHub resources such as
2685 repositories, user profiles, and organizations in your Python applications,
2686 using version 3 of the GitHub application programming interface (API).")
2687 (license license:lgpl3+)))
2689 (define-public python-rellu
2691 (name "python-rellu")
2696 (uri (pypi-uri "rellu" version))
2699 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2700 (build-system python-build-system)
2702 `(("python-invoke" ,python-invoke)
2703 ("python-pygithub" ,python-pygithub)))
2704 (home-page "https://github.com/robotframework/rellu")
2705 (synopsis "Utilities to create PyPI releases")
2706 (description "This collection of utilities contains tooling and templates
2707 to assist in creating releases on GitHub and publishing them on PyPI. It is
2708 designed to be used by Robot Framework and tools and libraries in its
2709 ecosystem, but can naturally be used also by other projects.")
2710 (license license:asl2.0)))
2712 (define-public python-robotframework
2714 (name "python-robotframework")
2716 ;; There are no tests in the PyPI archive.
2721 (url "https://github.com/robotframework/robotframework.git")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2725 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2726 (patches (search-patches
2727 "python-robotframework-honor-source-date-epoch.patch"))))
2728 (build-system python-build-system)
2730 `(#:phases (modify-phases %standard-phases
2731 (add-before 'build 'build-and-install-doc
2732 (lambda* (#:key outputs #:allow-other-keys)
2733 (let* ((doc-output (assoc-ref outputs "doc"))
2734 (doc (string-append doc-output "/share/"
2735 ,name "-" ,version "/")))
2736 (invoke "invoke" "library-docs" "all")
2738 (copy-recursively "doc/libraries"
2739 (string-append doc "/libraries"))
2743 (invoke "python" "utest/run.py"))))))
2745 `(("python-invoke" ,python-invoke)
2746 ("python-rellu" ,python-rellu)
2747 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2748 (outputs '("out" "doc"))
2749 (home-page "https://robotframework.org")
2750 (synopsis "Generic automation framework")
2751 (description "Robot Framework is a generic automation framework for
2752 acceptance testing, acceptance test driven development (ATDD), and robotic
2753 process automation (RPA).")
2754 (license license:asl2.0)))
2756 (define-public python-robotframework-lint
2757 ;; There is no properly tagged release; the commit below seems to correspond
2758 ;; to the 0.9 stable release available from PyPI. The tests are not
2759 ;; included in the PyPI archive, so we fetch the sources from the upstream
2761 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2764 (name "python-robotframework-lint")
2765 (version (git-version "0.9.0" revision commit))
2770 (url "https://github.com/boakley/robotframework-lint.git")
2772 (file-name (git-file-name name version))
2775 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2776 (build-system python-build-system)
2779 (modify-phases %standard-phases
2782 (invoke "python" "-m" "robot" "-A"
2783 "tests/conf/default.args" "tests"))))))
2785 `(("python-robotframework" ,python-robotframework)))
2786 (home-page "https://github.com/boakley/robotframework-lint/")
2787 (synopsis "Static analysis tool (linter) for Robot Framework")
2788 (description "This package provides the @code{rflint} command-line
2789 utility, a static analysis tool (linter) for Robot Framework source files.")
2790 (license license:asl2.0))))
2792 (define-public python-robotframework-sshlibrary
2794 (name "python-robotframework-sshlibrary")
2796 ;; There are no tests in the PyPI archive.
2801 (url "https://github.com/robotframework/SSHLibrary.git")
2802 (commit (string-append "v" version))))
2803 (file-name (git-file-name name version))
2806 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2807 (build-system python-build-system)
2810 (modify-phases %standard-phases
2811 (add-before 'build 'build-and-install-doc
2812 (lambda* (#:key outputs #:allow-other-keys)
2813 (let* ((doc-output (assoc-ref outputs "doc"))
2814 (doc (string-append doc-output "/share/"
2815 ,name "-" ,version "/")))
2816 (invoke "chmod" "-R" "+w" "docs")
2817 (invoke "invoke" "kw-docs" "project-docs")
2819 (for-each delete-file (find-files "docs" "\\.rst"))
2820 (copy-recursively "docs" doc)
2824 ;; Some tests require an SSH server; we remove them.
2825 (delete-file "utest/test_client_api.py")
2826 (delete-file "utest/test_scp.py")
2827 (invoke "python" "utest/run.py"))))))
2829 `(("python-robotframework" ,python-robotframework)
2830 ("python-paramiko" ,python-paramiko)
2831 ("python-scp" ,python-scp)))
2833 `(("openssh" ,openssh)
2835 ;; To generate the documentation
2836 ("python-docutils" ,python-docutils)
2837 ("python-invoke" ,python-invoke)
2838 ("python-pygments" ,python-pygments)
2839 ("python-rellu" ,python-rellu)))
2840 (outputs '("out" "doc"))
2841 (home-page "https://github.com/robotframework/SSHLibrary")
2842 (synopsis "Robot Framework library for SSH and SFTP")
2843 (description "SSHLibrary is a Robot Framework library providing support
2844 for SSH and SFTP. It has the following main usages:
2846 @item Executing commands on the remote machine, either blocking or non-blocking.
2847 @item Writing and reading in an interactive shell.
2848 @item Transferring files and directories over SFTP.
2849 @item Ensuring that files and directories exist on the remote machine.
2851 (license license:asl2.0)))
2853 (define-public python-scp
2860 (uri (pypi-uri "scp" version))
2863 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2864 (build-system python-build-system)
2866 '(#:tests? #f)) ;tests require an SSH server
2868 `(("python-paramiko" ,python-paramiko)))
2869 (home-page "https://github.com/jbardin/scp.py")
2870 (synopsis "SCP protocol module for Python and Paramiko")
2871 (description "The scp module extends the Paramiko library to send and
2872 receive files via the SCP1 protocol, as implemented by the OpenSSH
2873 @command{scp} program.")
2874 (license license:gpl2+)))
2876 (define-public python-rst.linker
2878 (name "python-rst.linker")
2883 (uri (pypi-uri "rst.linker" version))
2886 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2887 (build-system python-build-system)
2889 `(("python-dateutil" ,python-dateutil)
2890 ("python-six" ,python-six)))
2892 `(("python-setuptools-scm" ,python-setuptools-scm)))
2893 ;; Test would require path.py, which would introduce a cyclic dependence.
2894 (arguments `(#:tests? #f))
2895 ;; Note: As of version 1.7 the documentation is not worth building.
2896 (home-page "https://github.com/jaraco/rst.linker")
2897 (synopsis "Sphinx plugin to add links and timestamps")
2898 (description "rst.linker allows to automatically replace text by a
2899 reStructuredText external reference or timestamps. It's primary purpose is to
2900 augment the changelog, but it can be used for other documents, too.")
2901 (license license:expat)))
2903 (define-public python2-rst.linker
2904 (package-with-python2 python-rst.linker))
2906 (define-public python-feedgenerator
2908 (name "python-feedgenerator")
2913 (uri (pypi-uri "feedgenerator" version))
2916 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2917 (modules '((guix build utils)))
2920 ;; Remove pre-compiled .pyc files from source.
2921 (for-each delete-file-recursively
2922 (find-files "." "__pycache__" #:directories? #t))
2923 (for-each delete-file (find-files "." "\\.pyc$"))
2925 (build-system python-build-system)
2927 `(("python-pytz" ,python-pytz)
2928 ("python-six" ,python-six)))
2929 (home-page "https://github.com/getpelican/feedgenerator")
2931 "Standalone version of Django's Atom/RSS feed generator")
2933 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2934 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2935 (license license:bsd-3)))
2937 (define-public python2-feedgenerator
2938 (package-with-python2 python-feedgenerator))
2940 (define-public python-toml
2942 (name "python-toml")
2947 (uri (pypi-uri "toml" version))
2950 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2951 (build-system python-build-system)
2953 `(#:tests? #f)) ;no tests suite in release
2954 (home-page "https://github.com/uiri/toml")
2955 (synopsis "Library for TOML")
2957 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2958 Language (TOML) configuration files.")
2959 (license license:expat)))
2961 (define-public python-jsonrpc-server
2963 (name "python-jsonrpc-server")
2968 (uri (pypi-uri "python-jsonrpc-server" version))
2971 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2972 (build-system python-build-system)
2974 `(("python-future" ,python-future)
2975 ("python-mock" ,python-mock)
2976 ("python-pytest" ,python-pytest)))
2978 "https://github.com/palantir/python-jsonrpc-server")
2979 (synopsis "JSON RPC 2.0 server library")
2981 "This package provides a JSON RPC 2.0 server library for Python.")
2982 (license license:expat)))
2984 (define-public python-pydocstyle
2986 (name "python-pydocstyle")
2991 (uri (pypi-uri "pydocstyle" version))
2994 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2995 (build-system python-build-system)
2997 `(("python-six" ,python-six)
2998 ("python-snowballstemmer" ,python-snowballstemmer)))
3000 "https://github.com/PyCQA/pydocstyle/")
3001 (synopsis "Python docstring style checker")
3003 "This package provides a style checker for the Python Language
3005 (license license:expat)))
3007 (define-public python-language-server
3009 (name "python-language-server")
3014 (uri (pypi-uri "python-language-server" version))
3017 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3018 (build-system python-build-system)
3020 `(("python-pluggy" ,python-pluggy)
3021 ("python-jsonrpc-server" ,python-jsonrpc-server)
3022 ("python-jedi" ,python-jedi)
3023 ("python-yapf" ,python-yapf)
3024 ("python-pyflakes" ,python-pyflakes)
3025 ("python-pydocstyle" ,python-pydocstyle)
3026 ("python-pycodestyle" ,python-pycodestyle)
3027 ("python-mccabe" ,python-mccabe)
3028 ("python-rope" ,python-rope)
3029 ("python-autopep8" ,python-autopep8)
3030 ("python-pylint" ,python-pylint)))
3031 (home-page "https://github.com/palantir/python-language-server")
3032 (synopsis "Python implementation of the Language Server Protocol")
3034 "The Python Language Server (pyls) is an implementation of the Python 3
3035 language specification for the Language Server Protocol (LSP). This tool is
3036 used in text editing environments to provide a complete and integrated
3037 feature-set for programming Python effectively.")
3038 (license license:expat)))
3040 (define-public python-black
3042 (name "python-black")
3047 (uri (pypi-uri "black" version))
3050 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3051 (build-system python-build-system)
3054 (modify-phases %standard-phases
3055 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3057 (let ((python3 (which "python3")))
3058 (substitute* '("tests/data/fmtonoff.py"
3059 "tests/data/string_prefixes.py"
3060 "tests/data/function.py")
3061 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3062 (string-append "#!" python3 (if (string? minor-version)
3066 `(("python-click" ,python-click)
3067 ("python-attrs" ,python-attrs)
3068 ("python-appdirs" ,python-appdirs)
3069 ("python-toml" ,python-toml)))
3070 (home-page "https://github.com/ambv/black")
3071 (synopsis "The uncompromising code formatter")
3072 (description "Black is the uncompromising Python code formatter.")
3073 (license license:expat)))
3075 (define-public python-blinker
3077 (name "python-blinker")
3082 (uri (pypi-uri "blinker" version))
3085 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3086 (build-system python-build-system)
3087 (home-page "http://pythonhosted.org/blinker/")
3088 (synopsis "Fast, simple object-to-object and broadcast signaling")
3090 "Blinker provides a fast dispatching system that allows any number of
3091 interested parties to subscribe to events, or \"signals\".")
3092 (license license:expat)))
3094 (define-public python2-blinker
3095 (package-with-python2 python-blinker))
3097 (define-public pelican
3104 (uri (pypi-uri "pelican" version))
3107 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3108 (build-system python-build-system)
3110 `(("python-feedgenerator" ,python-feedgenerator)
3111 ("python-jinja2" ,python-jinja2)
3112 ("python-pygments" ,python-pygments)
3113 ("python-docutils" ,python-docutils)
3114 ("python-pytz" ,python-pytz)
3115 ("python-blinker" ,python-blinker)
3116 ("python-unidecode" ,python-unidecode)
3117 ("python-six" ,python-six)
3118 ("python-dateutil" ,python-dateutil)
3119 ("python-markdown" ,python-markdown)))
3120 (home-page "https://getpelican.com/")
3122 `(;; XXX Requires a lot more packages to do unit tests :P
3124 #:phases (modify-phases %standard-phases
3126 'install 'adjust-requires
3127 ;; Since feedgenerator is installed from git, it doesn't
3128 ;; conform to the version requirements.
3130 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3131 ;; version requirement so setuptools doesn't get confused.
3133 (substitute* "setup.py"
3134 (("['\"]feedgenerator.*?['\"]")
3135 "'feedgenerator'")))))))
3136 (synopsis "Python-based static site publishing system")
3138 "Pelican is a tool to generate a static blog from reStructuredText,
3139 Markdown input files, and more. Pelican uses Jinja2 for templating
3140 and is very extensible.")
3141 (license license:agpl3+)))
3143 (define-public mallard-ducktype
3145 (name "mallard-ducktype")
3150 ;; git-reference because tests are not included in pypi source tarball
3151 ;; https://issues.guix.gnu.org/issue/36755#2
3153 (url "https://github.com/projectmallard/mallard-ducktype.git")
3155 (file-name (git-file-name name version))
3158 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3159 (build-system python-build-system)
3162 (modify-phases %standard-phases
3165 (with-directory-excursion "tests"
3166 (invoke "sh" "runtests")))))))
3167 (home-page "http://projectmallard.org")
3168 (synopsis "Convert Ducktype to Mallard documentation markup")
3170 "Ducktype is a lightweight syntax that can represent all the semantics
3171 of the Mallard XML documentation system. Ducktype files can be converted to
3172 Mallard using the @command{ducktype} tool. The yelp-tools package
3173 provides additional functionality on the produced Mallard documents.")
3174 (license license:expat)))
3176 (define-public python-scikit-image
3178 (name "python-scikit-image")
3183 (uri (pypi-uri "scikit-image" version))
3185 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3186 (build-system python-build-system)
3188 ;; TODO: Some tests require running X11 server. Disable them?
3190 ;; See DEPENDS.txt for the list of build and run time requiremnts
3192 `(("python-cloudpickle" ,python-cloudpickle)
3193 ("python-dask" ,python-dask)
3194 ("python-matplotlib" ,python-matplotlib)
3195 ("python-networkx" ,python-networkx)
3196 ("python-numpy" ,python-numpy)
3197 ("python-pillow" ,python-pillow)
3198 ("python-pywavelets" ,python-pywavelets)
3199 ("python-scipy" ,python-scipy)
3200 ("python-six" ,python-six)))
3202 `(("python-cython" ,python-cython)))
3203 (home-page "http://scikit-image.org/")
3204 (synopsis "Image processing in Python")
3206 "Scikit-image is a collection of algorithms for image processing.")
3207 (license license:bsd-3)))
3209 (define-public python2-scikit-image
3210 (package-with-python2 python-scikit-image))
3212 (define-public python-cython
3214 (name "python-cython")
3219 (uri (pypi-uri "Cython" version))
3222 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3223 (build-system python-build-system)
3224 ;; we need the full python package and not just the python-wrapper
3225 ;; because we need libpython3.3m.so
3227 `(("python" ,python)))
3230 (modify-phases %standard-phases
3231 (add-before 'check 'set-HOME
3232 ;; some tests require access to "$HOME/.cython"
3233 (lambda _ (setenv "HOME" "/tmp") #t))
3235 ;; FIXME: These tests started failing on armhf after the 0.28 update
3236 ;; (commit c69d11c5930), both with an error such as this:
3237 ;; compiling (cpp) and running dictcomp ...
3238 ;; === C/C++ compiler error output: ===
3240 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3241 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3242 ,@(if (target-arm32?)
3243 `((add-before 'check 'disable-failing-tests
3245 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3246 (for-each (lambda (test)
3247 (format disabled-tests "~a\n" test))
3248 '("memslice" "dictcomp"))
3249 (close-port disabled-tests)))))
3254 ;; Disable compiler optimizations to greatly reduce the running
3255 ;; time of the test suite.
3256 (setenv "CFLAGS" "-O0")
3258 (invoke "python" "runtests.py" "-vv"
3259 "-j" (number->string (parallel-job-count))))))))
3260 (home-page "https://cython.org/")
3261 (synopsis "C extensions for Python")
3262 (description "Cython is an optimising static compiler for both the Python
3263 programming language and the extended Cython programming language. It makes
3264 writing C extensions for Python as easy as Python itself.")
3265 (license license:asl2.0)
3266 (properties `((python2-variant . ,(delay python2-cython))))))
3268 (define-public python2-cython
3269 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3272 (name "python2-cython")
3274 `(("python-2" ,python-2))) ;this is not automatically changed
3276 (substitute-keyword-arguments (package-arguments base)
3278 `(modify-phases ,phases
3279 (add-before 'check 'adjust-test_embed
3281 (substitute* "runtests.py"
3282 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3283 ;; so it can give the right -L flag to GCC when embedding static
3284 ;; builds of Python. It is unaware that the Python "config"
3285 ;; directory (where the static library lives) was renamed in
3286 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3287 ;; which works fine, because that is where the shared library is.
3289 ;; It also appears to be unaware that the Makefile in Demos/embed
3290 ;; already unconditionally pass the static library location to GCC,
3291 ;; after checking sysconfig.get_config_var('LIBPL).
3293 ;; The effect is that the linker is unable to resolve libexpat
3294 ;; symbols when building for Python 2, because neither the Python 2
3295 ;; shared library nor Expat is available. To fix it, we can either
3296 ;; add Expat as an input and make it visible to the linker, or just
3297 ;; prevent it from overriding the Python shared library location.
3298 ;; The end result is identical, so we take the easy route.
3299 ((" or libname not in os\\.listdir\\(libdir\\)")
3303 ;; The RPython toolchain currently does not support Python 3.
3304 (define-public python2-rpython
3306 (name "python2-rpython")
3311 (uri (pypi-uri "rpython" version))
3314 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3315 (build-system python-build-system)
3316 (arguments `(#:python ,python-2))
3318 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3319 (home-page "https://rpython.readthedocs.org")
3320 (synopsis "Framework for implementing interpreters and virtual machines")
3321 (description "RPython is a translation and support framework for
3322 producing implementations of dynamic languages, emphasizing a clean separation
3323 between language specification and implementation aspects.")
3324 (license license:expat)))
3326 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3327 ;; python-scipy still build, as these three packages are often used together.
3328 (define-public python-numpy
3330 (name "python-numpy")
3336 "https://github.com/numpy/numpy/releases/download/v"
3337 version "/numpy-" version ".tar.gz"))
3340 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3341 (build-system python-build-system)
3343 `(("openblas" ,openblas)
3344 ("lapack" ,lapack)))
3346 `(("python-cython" ,python-cython)
3347 ("python-pytest" ,python-pytest)
3348 ("gfortran" ,gfortran)))
3351 (modify-phases %standard-phases
3352 (add-before 'build 'configure-blas-lapack
3353 (lambda* (#:key inputs #:allow-other-keys)
3354 (call-with-output-file "site.cfg"
3358 libraries = openblas
3359 library_dirs = ~a/lib
3360 include_dirs = ~a/include
3362 # backslash-n to make emacs happy
3364 lapack_libs = lapack
3365 library_dirs = ~a/lib
3366 include_dirs = ~a/include
3368 (assoc-ref inputs "openblas")
3369 (assoc-ref inputs "openblas")
3370 (assoc-ref inputs "lapack")
3371 (assoc-ref inputs "lapack"))))
3373 (add-before 'build 'fix-executable-paths
3374 (lambda* (#:key inputs #:allow-other-keys)
3375 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3376 ;; instead of /bin/sh.
3377 (substitute* "numpy/distutils/exec_command.py"
3378 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3379 (string-append match-start (assoc-ref inputs "bash") match-end)))
3380 ;; Use "gcc" executable, not "cc".
3381 (substitute* "numpy/distutils/system_info.py"
3382 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3383 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3385 ;; Tests can only be run after the library has been installed and not
3386 ;; within the source directory.
3388 (add-after 'install 'check
3389 (lambda* (#:key outputs inputs #:allow-other-keys)
3390 ;; Make installed package available for running the tests
3391 (add-installed-pythonpath inputs outputs)
3392 ;; Make sure "f2py" etc is found.
3393 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3394 ":" (getenv "PATH")))
3395 (with-directory-excursion "/tmp"
3396 (invoke "python" "-c"
3397 "import numpy; numpy.test(verbose=2)")))))))
3398 (home-page "http://www.numpy.org/")
3399 (synopsis "Fundamental package for scientific computing with Python")
3400 (description "NumPy is the fundamental package for scientific computing
3401 with Python. It contains among other things: a powerful N-dimensional array
3402 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3403 and Fortran code, useful linear algebra, Fourier transform, and random number
3405 (license license:bsd-3)))
3407 (define-public python2-numpy
3408 (package-with-python2 python-numpy))
3410 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3411 ;; interest only for legacy code going back to NumPy's predecessor
3413 (define-public python2-numpy-1.8
3414 (package (inherit python2-numpy)
3420 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3421 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3424 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3426 (substitute-keyword-arguments (package-arguments python2-numpy)
3428 `(modify-phases ,phases
3429 (replace 'configure-blas-lapack
3430 (lambda* (#:key inputs #:allow-other-keys)
3431 (call-with-output-file "site.cfg"
3435 libraries = openblas,lapack
3436 library_dirs = ~a/lib:~a/lib
3437 include_dirs = ~a/include:~a/include
3439 (assoc-ref inputs "openblas")
3440 (assoc-ref inputs "lapack")
3441 (assoc-ref inputs "openblas")
3442 (assoc-ref inputs "lapack"))))
3445 `(("python2-nose" ,python2-nose)))
3446 (description "NumPy is the fundamental package for scientific computing
3447 with Python. It contains among other things: a powerful N-dimensional array
3448 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3449 and Fortran code, useful linear algebra, Fourier transform, and random number
3450 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3451 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3453 (license license:bsd-3)))
3455 (define-public python-munch
3457 (name "python-munch")
3462 (uri (pypi-uri "munch" version))
3465 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3466 (build-system python-build-system)
3467 (home-page "https://github.com/Infinidat/munch")
3468 (synopsis "Dot-accessible dictionary")
3469 (description "Munch is a dot-accessible dictionary similar to JavaScript
3471 (license license:expat)))
3473 (define-public python2-munch
3474 (package-with-python2 python-munch))
3476 (define-public python-colormath
3478 (name "python-colormath")
3483 (uri (pypi-uri "colormath" version))
3486 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3487 (build-system python-build-system)
3489 `(("python-networkx" ,python-networkx)
3490 ("python-numpy" ,python-numpy)))
3491 (home-page "https://github.com/gtaylor/python-colormath")
3492 (synopsis "Color math and conversion library")
3494 "This is a Python library for color math and conversions.")
3495 (license license:bsd-3)))
3497 (define-public python2-colormath
3498 (package-with-python2 python-colormath))
3500 (define-public python-spectra
3502 (name "python-spectra")
3507 (uri (pypi-uri "spectra" version))
3510 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3511 (build-system python-build-system)
3514 (modify-phases %standard-phases
3516 (lambda _ (invoke "nosetests" "-v"))))))
3518 `(("python-colormath" ,python-colormath)))
3520 `(("python-nose" ,python-nose)))
3521 (home-page "https://github.com/jsvine/spectra")
3522 (synopsis "Color scales and color conversion")
3524 "This package provides a Python library intended to make color math,
3525 color scales, and color space conversion easy. It has support for:
3530 @item Color blending
3531 @item Brightening/darkening colors
3532 @item Saturating/desaturating colors
3533 @item Conversion to/from multiple color spaces.
3535 (license license:expat)))
3537 (define-public python2-spectra
3538 (package-with-python2 python-spectra))
3540 (define-public python-numpy-documentation
3542 (name "python-numpy-documentation")
3543 (version (package-version python-numpy))
3544 (source (package-source python-numpy))
3545 (build-system python-build-system)
3547 `(("python-matplotlib" ,python-matplotlib)
3548 ("python-numpy" ,python-numpy)
3549 ("pkg-config" ,pkg-config)
3550 ("python-sphinx" ,python-sphinx)
3551 ("python-numpydoc" ,python-numpydoc)
3552 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3554 texlive-generic-ifxetex
3555 texlive-generic-pdftex
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-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
3967 texlive-fonts-adobe-times
3968 texlive-fonts-txfonts)))
3969 ("texinfo" ,texinfo)
3970 ,@(package-native-inputs python-matplotlib)))
3972 `(#:tests? #f ; we're only generating documentation
3974 (modify-phases %standard-phases
3978 (setenv "PYTHONPATH"
3979 (string-append (getenv "PYTHONPATH")
3980 ":" (getcwd) "/../examples/units"))
3981 (substitute* "conf.py"
3983 (("^SHA = check_output.*")
3984 (string-append "SHA = \"" ,version "\"\n"))
3985 ;; Don't fetch intersphinx files from the Internet
3986 (("^explicit_order_folders" m)
3987 (string-append "intersphinx_mapping = {}\n" m))
3988 (("'sphinx.ext.intersphinx',") "")
3989 ;; Disable URL embedding which requires internet access.
3990 (("'https://docs.scipy.org/doc/numpy'") "None")
3991 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3993 "SPHINXBUILD=sphinx-build"
3994 "SPHINXOPTS=" ; don't abort on warnings
3997 (lambda* (#:key inputs outputs #:allow-other-keys)
3998 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3999 (doc (string-append data "/doc/python-matplotlib-" ,version))
4000 (info (string-append data "/info"))
4001 (html (string-append doc "/html")))
4004 (copy-recursively "build/html" html)
4005 (symlink (string-append html "/_images")
4006 (string-append info "/matplotlib-figures"))
4007 (with-directory-excursion "build/texinfo"
4008 (substitute* "matplotlib.texi"
4009 (("@image\\{([^,]*)" all file)
4010 (string-append "@image{matplotlib-figures/" file)))
4011 (symlink (string-append html "/_images")
4012 "./matplotlib-figures")
4013 (invoke "makeinfo" "--no-split"
4014 "-o" "matplotlib.info" "matplotlib.texi"))
4015 (install-file "build/texinfo/matplotlib.info" info))
4017 (home-page (package-home-page python-matplotlib))
4018 (synopsis "Documentation for the python-matplotlib package")
4019 (description (package-description python-matplotlib))
4020 (license (package-license python-matplotlib))))
4022 (define-public python2-matplotlib-documentation
4023 (package-with-python2 python-matplotlib-documentation))
4025 (define-public python-matplotlib-venn
4027 (name "python-matplotlib-venn")
4032 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4035 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4036 (build-system python-build-system)
4037 (arguments '(#:tests? #f)) ; tests are not included
4039 `(("python-matplotlib" ,python-matplotlib)
4040 ("python-numpy" ,python-numpy)
4041 ("python-scipy" ,python-scipy)))
4043 `(("unzip" ,unzip)))
4044 (home-page "https://github.com/konstantint/matplotlib-venn")
4045 (synopsis "Plot area-proportional Venn diagrams")
4047 "This package provides tools for plotting area-proportional two- and
4048 three-way Venn diagrams in @code{matplotlib}.")
4049 (license license:expat)))
4051 (define-public python2-pysnptools
4053 (name "python2-pysnptools")
4058 (uri (pypi-uri "pysnptools" version))
4061 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4062 (build-system python-build-system)
4064 `(#:python ,python-2 ; only Python 2.7 is supported
4065 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4067 `(("python2-numpy" ,python2-numpy)
4068 ("python2-scipy" ,python2-scipy)
4069 ("python2-pandas" ,python2-pandas)))
4071 `(("python2-cython" ,python2-cython)))
4072 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4073 (synopsis "Library for reading and manipulating genetic data")
4075 "PySnpTools is a library for reading and manipulating genetic data. It
4076 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4077 those files. It can also efficiently manipulate ranges of integers using set
4078 operators such as union, intersection, and difference.")
4079 (license license:asl2.0)))
4081 (define-public python-scipy
4083 (name "python-scipy")
4088 (uri (pypi-uri "scipy" version))
4091 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4092 (build-system python-build-system)
4094 `(("python-numpy" ,python-numpy)
4095 ("python-matplotlib" ,python-matplotlib)
4096 ("python-pyparsing" ,python-pyparsing)))
4098 `(("lapack" ,lapack)
4099 ("openblas" ,openblas)))
4101 `(("python-cython" ,python-cython)
4102 ("python-pytest" ,python-pytest)
4103 ("python-sphinx" ,python-sphinx)
4104 ("python-numpydoc" ,python-numpydoc)
4105 ("gfortran" ,gfortran)
4108 (outputs '("out" "doc"))
4111 (modify-phases %standard-phases
4112 (add-after 'unpack 'disable-broken-tests
4114 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4115 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4116 (string-append indent
4117 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4119 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4120 (("^def test_parallel_threads\\(\\):" m)
4121 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4124 (add-before 'build 'configure-openblas
4125 (lambda* (#:key inputs #:allow-other-keys)
4126 (call-with-output-file "site.cfg"
4130 libraries = openblas
4131 library_dirs = ~a/lib
4132 include_dirs = ~a/include
4134 # backslash-n to make emacs happy
4136 library_dirs = ~a/lib
4137 atlas_libs = openblas
4139 (assoc-ref inputs "openblas")
4140 (assoc-ref inputs "openblas")
4141 (assoc-ref inputs "openblas"))))
4143 (add-after 'install 'install-doc
4144 (lambda* (#:key inputs outputs #:allow-other-keys)
4145 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4146 (doc (string-append data "/doc/" ,name "-" ,version))
4147 (html (string-append doc "/html"))
4148 (pyver ,(string-append "PYVER=" (version-major+minor
4149 (package-version python))))
4150 ;; By default it tries to run sphinx-build through the Python
4151 ;; interpreter which won't work with our shell wrapper.
4152 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4153 ;; Make installed package available for building the
4155 (add-installed-pythonpath inputs outputs)
4156 (with-directory-excursion "doc"
4157 ;; Fix generation of images for mathematical expressions.
4158 (substitute* (find-files "source" "conf\\.py")
4159 (("pngmath_use_preview = True")
4160 "pngmath_use_preview = False"))
4162 (invoke "make" "html" pyver sphinxbuild)
4163 (with-directory-excursion "build/html"
4164 (for-each (lambda (file)
4165 (let* ((dir (dirname file))
4166 (tgt-dir (string-append html "/" dir)))
4167 (install-file file html)))
4168 (find-files "." ".*")))))
4170 ;; Tests can only be run after the library has been installed and not
4171 ;; within the source directory.
4173 (add-after 'install 'check
4174 (lambda* (#:key inputs outputs #:allow-other-keys)
4175 (add-installed-pythonpath inputs outputs)
4176 (with-directory-excursion "/tmp"
4177 (invoke "python" "-c"
4178 "import scipy; scipy.test(verbose=2)")))))))
4179 (home-page "https://www.scipy.org/")
4180 (synopsis "The Scipy library provides efficient numerical routines")
4181 (description "The SciPy library is one of the core packages that make up
4182 the SciPy stack. It provides many user-friendly and efficient numerical
4183 routines such as routines for numerical integration and optimization.")
4184 (properties `((python2-variant . ,(delay python2-scipy))))
4185 (license license:bsd-3)))
4187 (define-public python2-scipy
4188 (package-with-python2
4189 (strip-python2-variant python-scipy)))
4191 (define-public python-socksipy-branch
4193 (name "python-socksipy-branch")
4198 (uri (pypi-uri "SocksiPy-branch" version))
4201 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4202 (build-system python-build-system)
4204 `(#:tests? #f)) ; There are no tests
4205 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4206 (synopsis "Python SOCKS module")
4208 "SocksiPy - A Python SOCKS client module. It provides a
4209 socket-like interface that supports connections to any TCP
4210 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4211 The original version was developed by Dan Haim, this is a
4212 branch created by Mario Vilas to address some open issues,
4213 as the original project seems to have been abandoned circa 2007.")
4214 (license license:bsd-3)))
4216 (define-public python2-socksipy-branch
4217 (package-with-python2 python-socksipy-branch))
4219 (define-public python-pycodestyle
4221 (name "python-pycodestyle")
4226 (uri (pypi-uri "pycodestyle" version))
4229 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4230 (build-system python-build-system)
4231 (home-page "https://pycodestyle.readthedocs.io/")
4232 (synopsis "Python style guide checker")
4233 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4234 Python code against some of the style conventions in
4235 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4236 (license license:expat)))
4238 (define-public python2-pycodestyle
4239 (package-with-python2 python-pycodestyle))
4241 (define-public python-multidict
4243 (name "python-multidict")
4248 (uri (pypi-uri "multidict" version))
4251 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4252 (build-system python-build-system)
4254 `(("python-pytest" ,python-pytest)
4255 ("python-pytest-runner" ,python-pytest-runner)))
4256 (home-page "https://github.com/aio-libs/multidict/")
4257 (synopsis "Multidict implementation")
4258 (description "Multidict is dict-like collection of key-value pairs
4259 where key might be occurred more than once in the container.")
4260 (license license:asl2.0)))
4262 (define-public python-orderedmultidict
4264 (name "python-orderedmultidict")
4269 (uri (pypi-uri "orderedmultidict" version))
4272 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4273 (build-system python-build-system)
4276 (modify-phases %standard-phases
4277 (add-after 'unpack 'fix-tests
4279 ;; The package uses nosetest for running the tests.
4280 ;; Adding this initfile allows to run the test suite
4281 ;; without requiring nosetest.
4282 (with-output-to-file "tests/__init__.py" newline)
4285 `(("python-six" ,python-six)))
4287 `(("python-pycodestyle" ,python-pycodestyle)))
4288 (home-page "https://github.com/gruns/orderedmultidict")
4289 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4290 (description "This package contains a library for ordered multivalue
4291 dictionaries. A multivalue dictionary is a dictionary that can store
4292 multiple values for the same key. An ordered multivalue dictionary is a
4293 multivalue dictionary that retains the order of insertions and deletions.")
4294 (license license:unlicense)))
4296 (define-public python2-orderedmultidict
4297 (package-with-python2 python-orderedmultidict))
4299 (define-public python-autopep8
4301 (name "python-autopep8")
4306 (uri (pypi-uri "autopep8" version))
4309 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4310 (build-system python-build-system)
4312 `(("python-pycodestyle" ,python-pycodestyle)))
4313 (home-page "https://github.com/hhatto/autopep8")
4314 (synopsis "Format Python code according to the PEP 8 style guide")
4316 "@code{autopep8} automatically formats Python code to conform to
4317 the PEP 8 style guide. It uses the pycodestyle utility to determine
4318 what parts of the code needs to be formatted. @code{autopep8} is
4319 capable of fixing most of the formatting issues that can be reported
4321 (license (license:non-copyleft
4322 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4324 (define-public python2-autopep8
4325 (package-with-python2 python-autopep8))
4327 (define-public python-distutils-extra
4329 (name "python-distutils-extra")
4334 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4335 version "/+download/python-distutils-extra-"
4339 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4340 (build-system python-build-system)
4341 (home-page "https://launchpad.net/python-distutils-extra/")
4342 (synopsis "Enhancements to Python's distutils")
4344 "The python-distutils-extra module enables you to easily integrate
4345 gettext support, themed icons, and scrollkeeper-based documentation into
4346 Python's distutils.")
4347 (license license:gpl2)))
4349 (define-public python2-distutils-extra
4350 (package-with-python2 python-distutils-extra))
4352 (define-public python2-elib.intl
4354 (name "python2-elib.intl")
4358 ;; This project doesn't tag releases or publish tarballs, so we take
4359 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4362 (url "https://github.com/dieterv/elib.intl.git")
4363 (commit "d09997cfef")))
4364 (file-name (string-append name "-" version "-checkout"))
4367 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4368 (build-system python-build-system)
4370 ;; incompatible with Python 3 (exception syntax)
4371 `(#:python ,python-2
4373 (home-page "https://github.com/dieterv/elib.intl")
4374 (synopsis "Enhanced internationalization for Python")
4376 "The elib.intl module provides enhanced internationalization (I18N)
4377 services for your Python modules and applications.")
4378 (license license:lgpl3+)))
4380 (define-public python-olefile
4382 (name "python-olefile")
4387 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4388 "download/v" version "/olefile-" version ".tar.gz"))
4389 (file-name (string-append name "-" version ".tar.gz"))
4392 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4393 (build-system python-build-system)
4394 (home-page "https://www.decalage.info/python/olefileio")
4395 (synopsis "Read and write Microsoft OLE2 files.")
4397 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4398 Storage or Compound Document, Microsoft Office). It is an improved version of
4399 the OleFileIO module from PIL, the Python Image Library.")
4400 (license license:bsd-3)))
4402 (define-public python2-olefile
4403 (package-with-python2 python-olefile))
4405 (define-public python-pillow
4407 (name "python-pillow")
4412 (uri (pypi-uri "Pillow" version))
4415 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4416 (build-system python-build-system)
4418 `(("python-pytest" ,python-pytest)))
4420 `(("freetype" ,freetype)
4423 ("libjpeg" ,libjpeg)
4424 ("openjpeg" ,openjpeg)
4425 ("libtiff" ,libtiff)
4426 ("libwebp" ,libwebp)))
4428 `(("python-olefile" ,python-olefile)))
4431 (modify-phases %standard-phases
4432 (add-after 'unpack 'patch-ldconfig
4434 (substitute* "setup.py"
4435 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4436 (delete 'check) ; We must run checks after python-pillow is installed.
4437 (add-after 'install 'check-installed
4438 (lambda* (#:key outputs inputs #:allow-other-keys)
4440 (setenv "HOME" (getcwd))
4441 ;; Make installed package available for running the tests.
4442 (add-installed-pythonpath inputs outputs)
4443 (invoke "python" "selftest.py" "--installed")
4444 (invoke "python" "-m" "pytest" "-vv")))))))
4445 (home-page "https://python-pillow.org")
4446 (synopsis "Fork of the Python Imaging Library")
4448 "The Python Imaging Library adds image processing capabilities to your
4449 Python interpreter. This library provides extensive file format support, an
4450 efficient internal representation, and fairly powerful image processing
4451 capabilities. The core image library is designed for fast access to data
4452 stored in a few basic pixel formats. It should provide a solid foundation for
4453 a general image processing tool.")
4454 (license (license:x11-style
4455 "http://www.pythonware.com/products/pil/license.htm"
4456 "The PIL Software License"))))
4458 (define-public python2-pillow
4459 (package-with-python2 python-pillow))
4461 (define-public python-pycparser
4463 (name "python-pycparser")
4468 (uri (pypi-uri "pycparser" version))
4471 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4472 (outputs '("out" "doc"))
4473 (build-system python-build-system)
4475 `(("pkg-config" ,pkg-config)))
4478 (modify-phases %standard-phases
4481 (with-directory-excursion "tests"
4482 (invoke "python" "all_tests.py"))
4484 (add-after 'install 'install-doc
4485 (lambda* (#:key outputs #:allow-other-keys)
4486 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4487 (doc (string-append data "/doc/" ,name "-" ,version))
4488 (examples (string-append doc "/examples")))
4490 (for-each (lambda (file)
4491 (copy-file (string-append "." file)
4492 (string-append doc file)))
4493 '("/README.rst" "/CHANGES" "/LICENSE"))
4494 (copy-recursively "examples" examples)
4496 (home-page "https://github.com/eliben/pycparser")
4497 (synopsis "C parser in Python")
4499 "Pycparser is a complete parser of the C language, written in pure Python
4500 using the PLY parsing library. It parses C code into an AST and can serve as
4501 a front-end for C compilers or analysis tools.")
4502 (license license:bsd-3)))
4504 (define-public python2-pycparser
4505 (package-with-python2 python-pycparser))
4507 (define-public python-pywavelets
4509 (name "python-pywavelets")
4511 (home-page "https://github.com/PyWavelets/pywt")
4514 (uri (pypi-uri "PyWavelets" version))
4517 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4518 (build-system python-build-system)
4520 '(#:modules ((ice-9 ftw)
4524 (guix build python-build-system))
4525 #:phases (modify-phases %standard-phases
4528 (let ((cwd (getcwd))
4529 (libdir (find (cut string-prefix? "lib." <>)
4530 (scandir "build"))))
4531 (with-directory-excursion (string-append cwd "/build/" libdir)
4532 (invoke "nosetests" "-v" "."))))))))
4534 `(("python-matplotlib" ,python-matplotlib) ;for tests
4535 ("python-nose" ,python-nose)))
4537 `(("python-numpy" ,python-numpy)))
4538 (synopsis "Wavelet transforms in Python")
4540 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4541 mathematical basis functions that are localized in both time and frequency.
4542 Wavelet transforms are time-frequency transforms employing wavelets. They are
4543 similar to Fourier transforms, the difference being that Fourier transforms are
4544 localized only in frequency instead of in time and frequency.")
4545 (license license:expat)))
4547 (define-public python2-pywavelets
4548 (package-with-python2 python-pywavelets))
4550 (define-public python-xcffib
4552 (name "python-xcffib")
4557 (uri (pypi-uri "xcffib" version))
4560 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4561 (build-system python-build-system)
4563 `(("libxcb" ,libxcb)))
4565 `(("python-cffi" ,python-cffi) ; used at run time
4566 ("python-six" ,python-six)))
4568 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4571 (modify-phases %standard-phases
4572 (add-after 'unpack 'fix-libxcb-path
4573 (lambda* (#:key inputs #:allow-other-keys)
4574 (let ((libxcb (assoc-ref inputs "libxcb")))
4575 (substitute* '("xcffib/__init__.py")
4576 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4578 (add-after 'install 'install-doc
4579 (lambda* (#:key outputs #:allow-other-keys)
4580 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4581 "/doc/" ,name "-" ,version)))
4583 (copy-file "README.md"
4584 (string-append doc "/README.md"))
4586 (home-page "https://github.com/tych0/xcffib")
4587 (synopsis "XCB Python bindings")
4589 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4590 support for Python 3 and PyPy. It is based on cffi.")
4591 (license license:expat)))
4593 (define-public python2-xcffib
4594 (package-with-python2 python-xcffib))
4596 (define-public python-cairocffi
4598 (name "python-cairocffi")
4603 (uri (pypi-uri "cairocffi" version))
4606 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4607 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4608 (build-system python-build-system)
4609 (outputs '("out" "doc"))
4613 ("gdk-pixbuf" ,gdk-pixbuf)
4617 `(("pkg-config" ,pkg-config)
4618 ("python-pytest" ,python-pytest)
4619 ("python-pytest-cov" ,python-pytest-cov)
4620 ("python-pytest-runner" ,python-pytest-runner)
4621 ("python-sphinx" ,python-sphinx)
4622 ("python-docutils" ,python-docutils)))
4624 `(("python-xcffib" ,python-xcffib))) ; used at run time
4627 (modify-phases %standard-phases
4628 (add-after 'unpack 'patch-paths
4629 (lambda* (#:key inputs outputs #:allow-other-keys)
4630 (substitute* (find-files "." "\\.py$")
4631 (("dlopen\\(ffi, 'cairo'")
4632 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4633 "/lib/libcairo.so.2'"))
4634 (("dlopen\\(ffi, 'gdk-3'")
4635 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4636 "/lib/libgtk-3.so.0'"))
4637 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4638 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4639 "/lib/libgdk_pixbuf-2.0.so.0'"))
4640 (("dlopen\\(ffi, 'glib-2.0'")
4641 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4642 "/lib/libglib-2.0.so.0'"))
4643 (("dlopen\\(ffi, 'gobject-2.0'")
4644 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4645 "/lib/libgobject-2.0.so.0'"))
4646 (("dlopen\\(ffi, 'pangocairo-1.0'")
4647 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4648 "/lib/libpangocairo-1.0.so.0'"))
4649 (("dlopen\\(ffi, 'pango-1.0'")
4650 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4651 "/lib/libpango-1.0.so.0'")))
4653 (add-after 'install 'install-doc
4654 (lambda* (#:key inputs outputs #:allow-other-keys)
4655 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4656 (doc (string-append data "/doc/" ,name "-" ,version))
4657 (html (string-append doc "/html")))
4658 (setenv "LD_LIBRARY_PATH"
4659 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4660 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4661 (setenv "LANG" "en_US.UTF-8")
4663 (for-each (lambda (file)
4664 (copy-file (string-append "." file)
4665 (string-append doc file)))
4666 '("/README.rst" "/CHANGES" "/LICENSE"))
4667 (system* "python" "setup.py" "build_sphinx")
4668 (copy-recursively "docs/_build/html" html)
4670 (home-page "https://github.com/Kozea/cairocffi")
4671 (synopsis "Python bindings and object-oriented API for Cairo")
4673 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4674 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4675 graphics library with support for multiple backends including image buffers,
4676 PNG, PostScript, PDF, and SVG file output.")
4677 (license license:bsd-3)))
4679 (define-public python2-cairocffi
4680 (package-with-python2 python-cairocffi))
4682 (define-public python-decorator
4684 (name "python-decorator")
4689 (uri (pypi-uri "decorator" version))
4691 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4692 (build-system python-build-system)
4693 (home-page "https://pypi.python.org/pypi/decorator/")
4694 (synopsis "Python module to simplify usage of decorators")
4696 "The aim of the decorator module is to simplify the usage of decorators
4697 for the average programmer, and to popularize decorators usage giving examples
4698 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4699 etc. The core of this module is a decorator factory.")
4700 (license license:expat)))
4702 (define-public python2-decorator
4703 (package-with-python2 python-decorator))
4705 (define-public python-drmaa
4707 (name "python-drmaa")
4712 (uri (pypi-uri "drmaa" version))
4714 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4715 (build-system python-build-system)
4716 ;; The test suite requires libdrmaa which is provided by the cluster
4717 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4718 ;; should be set to the path of the libdrmaa library.
4719 (arguments '(#:tests? #f))
4721 `(("python-nose" ,python-nose)))
4722 (home-page "https://pypi.python.org/pypi/drmaa")
4723 (synopsis "Python bindings for the DRMAA library")
4725 "A Python package for Distributed Resource Management (DRM) job
4726 submission and control. This package is an implementation of the DRMAA 1.0
4727 Python language binding specification.")
4728 (license license:bsd-3)))
4730 (define-public python2-drmaa
4731 (package-with-python2 python-drmaa))
4733 (define-public python-grako
4735 (name "python-grako")
4741 (pypi-uri "grako" version ".zip"))
4744 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4745 (build-system python-build-system)
4746 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4749 ("python-pytest" ,python-pytest)
4750 ("python-pytest-runner" ,python-pytest-runner)))
4751 (home-page "https://bitbucket.org/neogeny/grako")
4752 (synopsis "EBNF parser generator")
4754 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4755 memoizing PEG/Packrat parser in Python.")
4756 (license license:bsd-3)))
4758 (define-public python2-grako
4759 (package-with-python2 python-grako))
4761 (define-public python-gridmap
4763 (name "python-gridmap")
4769 (url "https://github.com/pygridtools/gridmap.git")
4770 (commit (string-append "v" version))))
4771 (file-name (git-file-name name version))
4773 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4774 (build-system python-build-system)
4776 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4778 `(("python-psutil" ,python-psutil)
4779 ("python-drmaa" ,python-drmaa)
4780 ("python-pyzmq" ,python-pyzmq)))
4781 (home-page "https://github.com/pygridtools/gridmap")
4782 (synopsis "Create jobs on a cluster directly from Python")
4784 "Gridmap is a Python package to allow you to easily create jobs on the
4785 cluster directly from Python. You can directly map Python functions onto the
4786 cluster without needing to write any wrapper code yourself.")
4787 (license license:gpl3+)))
4789 (define-public python2-gridmap
4790 (package-with-python2 python-gridmap))
4792 (define-public python-honcho
4794 (name "python-honcho")
4800 (url "https://github.com/nickstenning/honcho.git")
4801 (commit (string-append "v" version))))
4802 (file-name (git-file-name name version))
4804 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4805 (build-system python-build-system)
4807 `(("python-pytest" ,python-pytest)
4808 ("python-mock" ,python-mock)
4809 ("python-tox" ,python-tox)
4810 ("which" ,which))) ;for tests
4812 `(("python-jinja2" ,python-jinja2)))
4815 (modify-phases %standard-phases
4817 (add-after 'install 'check
4818 (lambda* (#:key outputs inputs #:allow-other-keys)
4819 ;; fix honcho path in testsuite
4820 (substitute* "tests/conftest.py"
4821 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4822 "/bin/honcho" "'")))
4823 ;; It's easier to run tests after install.
4824 ;; Make installed package available for running the tests
4825 (add-installed-pythonpath inputs outputs)
4826 (invoke "py.test" "-v"))))))
4827 (home-page "https://github.com/nickstenning/honcho")
4828 (synopsis "Manage Procfile-based applications")
4830 "A Procfile is a file which describes how to run an application
4831 consisting of several processes. honcho starts all listed processes.
4832 The output of all running processes is collected by honcho and
4834 (license license:expat)))
4836 (define-public python2-honcho
4837 (package-with-python2 python-honcho))
4839 (define-public python-pexpect
4841 (name "python-pexpect")
4846 (uri (pypi-uri "pexpect" version))
4848 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4849 (build-system python-build-system)
4852 (modify-phases %standard-phases
4853 (add-before 'check 'prepare-tests
4855 (substitute* (find-files "tests")
4856 (("/bin/ls") (which "ls"))
4857 (("/bin/echo") (which "echo"))
4858 (("/bin/which") (which "which"))
4859 ;; Many tests try to use the /bin directory which
4860 ;; is not present in the build environment.
4861 ;; Use one that's non-empty and unlikely to change.
4862 (("/bin'") "/dev'"))
4863 ;; XXX: Socket connection test gets "Connection reset by peer".
4864 ;; Why does it not work? Delete for now.
4865 (delete-file "tests/test_socket.py")
4867 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4869 `(("python-nose" ,python-nose)
4870 ("python-pytest" ,python-pytest)
4873 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4875 `(("python-ptyprocess" ,python-ptyprocess)))
4876 (home-page "http://pexpect.readthedocs.org/")
4877 (synopsis "Controlling interactive console applications")
4879 "Pexpect is a pure Python module for spawning child applications;
4880 controlling them; and responding to expected patterns in their output.
4881 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4882 child application and control it as if a human were typing commands.")
4883 (license license:isc)))
4885 (define-public python2-pexpect
4886 (package-with-python2 python-pexpect))
4888 (define-public python-setuptools-scm
4890 (name "python-setuptools-scm")
4894 (uri (pypi-uri "setuptools_scm" version))
4897 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4898 (build-system python-build-system)
4899 (home-page "https://github.com/pypa/setuptools_scm/")
4900 (synopsis "Manage Python package versions in SCM metadata")
4902 "Setuptools_scm handles managing your Python package versions in
4903 @dfn{software configuration management} (SCM) metadata instead of declaring
4904 them as the version argument or in a SCM managed file.")
4905 (license license:expat)))
4907 (define-public python2-setuptools-scm
4908 (package-with-python2 python-setuptools-scm))
4910 (define-public python-pathlib2
4912 (name "python-pathlib2")
4917 (uri (pypi-uri "pathlib2" version))
4920 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4921 (build-system python-build-system)
4923 `(("python-scandir" ,python-scandir)
4924 ("python-six" ,python-six)))
4925 (home-page "https://pypi.python.org/pypi/pathlib2/")
4926 (synopsis "Object-oriented file system paths")
4927 (description "The goal of pathlib2 is to provide a backport of the
4928 standard @code{pathlib} module which tracks the standard library module, so
4929 all the newest features of the standard @code{pathlib} can be used also on
4930 older Python versions.")
4931 (license license:expat)))
4933 (define-public python-importlib-metadata
4935 (name "python-importlib-metadata")
4940 (uri (pypi-uri "importlib_metadata" version))
4943 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4944 (build-system python-build-system)
4946 `(("python-configparser" ,python-configparser)
4947 ("python-contextlib2" ,python-contextlib2)
4948 ("python-docutils" ,python-docutils)
4949 ("python-pathlib2" ,python-pathlib2)
4950 ("python-rst.linker" ,python-rst.linker)
4951 ("python-zipp" ,python-zipp)))
4953 `(("python-setuptools-scm" ,python-setuptools-scm)
4954 ("python-sphinx" ,python-sphinx)))
4955 (home-page "https://importlib-metadata.readthedocs.io/")
4956 (synopsis "Read metadata from Python packages")
4958 "@code{importlib_metadata} is a library which provides an API for
4959 accessing an installed Python package's metadata, such as its entry points or
4960 its top-level name. This functionality intends to replace most uses of
4961 @code{pkg_resources} entry point API and metadata API. Along with
4962 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4963 need to use the older and less efficient @code{pkg_resources} package.")
4964 (license license:asl2.0)))
4966 (define-public python-jaraco-packaging
4968 (name "python-jaraco-packaging")
4973 (uri (pypi-uri "jaraco.packaging" version))
4976 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4977 (build-system python-build-system)
4979 `(("python-pytest" ,python-pytest)
4980 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4981 ("python-pytest-flake8" ,python-pytest-flake8)
4982 ("python-rst.linker" ,python-rst.linker)
4983 ("python-setuptools" ,python-setuptools)
4984 ("python-setuptools-scm" ,python-setuptools-scm)
4985 ("python-six" ,python-six)
4986 ("python-sphinx" ,python-sphinx)))
4987 (home-page "https://github.com/jaraco/jaraco.packaging")
4988 (synopsis "Tools to supplement packaging Python releases")
4990 "This package provides various tools to supplement packaging Python
4992 (license license:expat)))
4994 (define-public python-pathpy
4996 (name "python-pathpy")
5001 (uri (pypi-uri "path.py" version))
5003 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5004 (outputs '("out" "doc"))
5005 (build-system python-build-system)
5007 `(("python-appdirs" ,python-appdirs)))
5009 `(("python-setuptools-scm" ,python-setuptools-scm)
5010 ("python-sphinx" ,python-sphinx)
5011 ("python-rst.linker" ,python-rst.linker)
5012 ("python-pytest" ,python-pytest)
5013 ("python-pytest-runner" ,python-pytest-runner)
5014 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5017 (modify-phases %standard-phases
5018 (add-after 'build 'build-doc
5020 (setenv "LANG" "en_US.UTF-8")
5021 (invoke "python" "setup.py" "build_sphinx")))
5022 (add-after 'install 'install-doc
5023 (lambda* (#:key outputs #:allow-other-keys)
5024 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5025 (doc (string-append data "/doc/" ,name "-" ,version))
5026 (html (string-append doc "/html")))
5028 (for-each (lambda (file)
5029 (copy-file file (string-append doc "/" file)))
5030 '("README.rst" "CHANGES.rst"))
5031 (copy-recursively "build/sphinx/html" html)
5035 ;; The import time test aborts if an import takes longer than
5036 ;; 100ms. It may very well take a little longer than that.
5037 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5038 (home-page "https://github.com/jaraco/path.py")
5039 (synopsis "Python module wrapper for built-in os.path")
5041 "@code{path.py} implements path objects as first-class entities, allowing
5042 common operations on files to be invoked on those path objects directly.")
5043 (license license:expat)))
5045 (define-public python2-pathpy
5046 (package-with-python2 python-pathpy))
5048 (define-public python-simplegeneric
5050 (name "python-simplegeneric")
5055 (uri (pypi-uri "simplegeneric" version ".zip"))
5057 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5058 (build-system python-build-system)
5060 `(("unzip" ,unzip)))
5061 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5062 (synopsis "Python module for simple generic functions")
5064 "The simplegeneric module lets you define simple single-dispatch generic
5065 functions, akin to Python’s built-in generic functions like @code{len()},
5066 @code{iter()} and so on. However, instead of using specially-named methods,
5067 these generic functions use simple lookup tables, akin to those used by
5068 e.g. @code{pickle.dump()} and other generic functions found in the Python
5070 (license license:zpl2.1)))
5072 (define-public python2-simplegeneric
5073 (package-with-python2 python-simplegeneric))
5075 (define-public python-ipython-genutils
5076 ;; TODO: This package is retired, check if can be removed, see description.
5078 (name "python-ipython-genutils")
5083 (uri (pypi-uri "ipython_genutils" version))
5085 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5086 (build-system python-build-system)
5087 (arguments `(#:tests? #f)) ; no tests
5088 (home-page "https://ipython.org")
5089 (synopsis "Vestigial utilities from IPython")
5091 "This package provides retired utilities from IPython. No packages
5092 outside IPython/Jupyter should depend on it.
5094 This package shouldn't exist. It contains some common utilities shared by
5095 Jupyter and IPython projects during The Big Split. As soon as possible, those
5096 packages will remove their dependency on this, and this package will go
5098 (license license:bsd-3)))
5100 (define-public python2-ipython-genutils
5101 (package-with-python2 python-ipython-genutils))
5103 (define-public python-traitlets
5105 (name "python-traitlets")
5110 (uri (pypi-uri "traitlets" version))
5113 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5114 (build-system python-build-system)
5117 (modify-phases %standard-phases
5118 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5120 `(("python-ipython-genutils" ,python-ipython-genutils)
5121 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5123 `(("python-pytest" ,python-pytest)))
5124 (properties `((python2-variant . ,(delay python2-traitlets))))
5125 (home-page "https://ipython.org")
5126 (synopsis "Configuration system for Python applications")
5128 "Traitlets is a framework that lets Python classes have attributes with
5129 type checking, dynamically calculated default values, and ‘on change’
5130 callbacks. The package also includes a mechanism to use traitlets for
5131 configuration, loading values from files or from command line arguments. This
5132 is a distinct layer on top of traitlets, so you can use traitlets in your code
5133 without using the configuration machinery.")
5134 (license license:bsd-3)))
5136 (define-public python2-traitlets
5137 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5141 `(("python2-enum34" ,python2-enum34)
5142 ,@(package-propagated-inputs traitlets))))))
5144 (define-public python-jupyter-core
5146 (name "python-jupyter-core")
5151 (uri (string-append (pypi-uri "jupyter_core" version)))
5154 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5155 (build-system python-build-system)
5156 ;; FIXME: not sure how to run the tests
5157 (arguments `(#:tests? #f))
5159 `(("python-traitlets" ,python-traitlets)))
5160 (home-page "http://jupyter.org/")
5161 (synopsis "Jupyter base package")
5163 "Jupyter core is the base package on which Jupyter projects rely.")
5164 (license license:bsd-3)))
5166 (define-public python2-jupyter-core
5167 (package-with-python2 python-jupyter-core))
5169 (define-public python-jupyter-client
5171 (name "python-jupyter-client")
5176 (uri (pypi-uri "jupyter_client" version))
5179 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5180 (build-system python-build-system)
5181 ;; Tests fail because of missing native python kernel which I assume is
5182 ;; provided by the ipython package, which we cannot use because it would
5183 ;; cause a dependency cycle.
5187 #:phases (modify-phases %standard-phases
5188 (add-after 'unpack 'set-tool-file-names
5189 (lambda* (#:key inputs #:allow-other-keys)
5190 (let ((iproute (assoc-ref inputs "iproute")))
5191 (substitute* "jupyter_client/localinterfaces.py"
5193 (string-append "'" iproute "/sbin/ip'")))
5196 `(("iproute" ,iproute)))
5198 `(("python-pyzmq" ,python-pyzmq)
5199 ("python-traitlets" ,python-traitlets)
5200 ("python-jupyter-core" ,python-jupyter-core)))
5201 (home-page "http://jupyter.org/")
5202 (synopsis "Jupyter protocol implementation and client libraries")
5204 "The @code{jupyter_client} package contains the reference implementation
5205 of the Jupyter protocol. It also provides client and kernel management APIs
5206 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5207 installing @code{kernelspec}s for use with Jupyter frontends.")
5208 (license license:bsd-3)))
5210 (define-public python2-jupyter-client
5211 (package-with-python2 python-jupyter-client))
5213 (define-public python-ipykernel
5215 (name "python-ipykernel")
5220 (uri (pypi-uri "ipykernel" version))
5222 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5223 (build-system python-build-system)
5226 (modify-phases %standard-phases
5229 (setenv "HOME" "/tmp")
5230 (invoke "pytest" "-v")
5232 (add-after 'install 'set-python-file-name
5233 (lambda* (#:key outputs #:allow-other-keys)
5234 ;; Record the absolute file name of the 'python' executable in
5236 (let ((out (assoc-ref outputs "out")))
5237 (substitute* (string-append out "/share/jupyter"
5238 "/kernels/python3/kernel.json")
5240 (string-append "\"" (which "python") "\"")))
5243 `(("python-ipython" ,python-ipython)
5244 ;; imported at runtime during connect
5245 ("python-jupyter-client" ,python-jupyter-client)))
5247 `(("python-pytest" ,python-pytest)
5248 ("python-nose" ,python-nose)))
5249 (home-page "https://ipython.org")
5250 (synopsis "IPython Kernel for Jupyter")
5252 "This package provides the IPython kernel for Jupyter.")
5253 (license license:bsd-3)))
5255 ;; Version 5.1.1 and above no longer support Python 2.
5256 (define-public python2-ipykernel
5258 (name "python2-ipykernel")
5263 (uri (pypi-uri "ipykernel" version))
5265 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5266 (build-system python-build-system)
5268 `(#:python ,python-2
5270 (modify-phases %standard-phases
5273 (setenv "HOME" "/tmp")
5274 (invoke "pytest" "-v")
5277 `(("python2-ipython" ,python2-ipython)
5278 ;; imported at runtime during connect
5279 ("python2-jupyter-client" ,python2-jupyter-client)))
5281 `(("python2-pytest" ,python2-pytest)
5282 ("python2-nose" ,python2-nose)))
5283 (home-page "https://ipython.org")
5284 (synopsis "IPython Kernel for Jupyter")
5286 "This package provides the IPython kernel for Jupyter.")
5287 (license license:bsd-3)))
5289 (define-public python-pari-jupyter
5291 (name "python-pari-jupyter")
5296 (uri (pypi-uri "pari_jupyter" version))
5299 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5300 (build-system python-build-system)
5302 `(("python-ipykernel" ,python-ipykernel)))
5304 `(("pari-gp" ,pari-gp)
5305 ("readline" ,readline)))
5307 `(#:tests? #f)) ; no test suite
5309 "https://github.com/jdemeyer/pari_jupyter")
5310 (synopsis "A Jupyter kernel for PARI/GP")
5311 (description "The package provides a PARI/GP kernel for Jupyter.")
5312 (license license:gpl3+)))
5314 (define-public python-backcall
5316 (name "python-backcall")
5321 (uri (pypi-uri "backcall" version))
5324 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5325 (build-system python-build-system)
5326 (home-page "https://github.com/takluyver/backcall/")
5327 (synopsis "Specifications for callback functions passed in to an API")
5329 "If your code lets other people supply callback functions, it's important
5330 to specify the function signature you expect, and check that functions support
5331 that. Adding extra parameters later would break other peoples code unless
5332 you're careful. The @code{backcall} package provides a way of specifying the
5333 callback signature using a prototype function.")
5334 (license license:bsd-3)))
5336 ;; This is the latest release of the LTS version of ipython with support for
5337 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5338 ;; dropped support for Python 2.7.
5339 (define-public python2-ipython
5341 (name "python2-ipython")
5346 (uri (pypi-uri "ipython" version ".tar.gz"))
5348 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5349 (build-system python-build-system)
5351 `(("python2-backports-shutil-get-terminal-size"
5352 ,python2-backports-shutil-get-terminal-size)
5353 ("python2-pathlib2" ,python2-pathlib2)
5354 ("python2-pyzmq" ,python2-pyzmq)
5355 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5356 ("python2-terminado" ,python2-terminado)
5357 ("python2-matplotlib" ,python2-matplotlib)
5358 ("python2-numpy" ,python2-numpy)
5359 ("python2-numpydoc" ,python2-numpydoc)
5360 ("python2-jinja2" ,python2-jinja2)
5361 ("python2-mistune" ,python2-mistune)
5362 ("python2-pexpect" ,python2-pexpect)
5363 ("python2-pickleshare" ,python2-pickleshare)
5364 ("python2-simplegeneric" ,python2-simplegeneric)
5365 ("python2-jsonschema" ,python2-jsonschema)
5366 ("python2-traitlets" ,python2-traitlets)
5367 ("python2-nbformat" ,python2-nbformat)
5368 ("python2-pygments" ,python2-pygments)))
5370 `(("readline" ,readline)
5373 `(("graphviz" ,graphviz)
5374 ("pkg-config" ,pkg-config)
5375 ("python2-requests" ,python2-requests) ;; for tests
5376 ("python2-testpath" ,python2-testpath)
5377 ("python2-mock" ,python2-mock)
5378 ("python2-nose" ,python2-nose)))
5380 `(#:python ,python-2
5382 (modify-phases %standard-phases
5383 (add-before 'check 'delete-broken-tests
5384 (lambda* (#:key inputs #:allow-other-keys)
5385 ;; These tests throw errors for unknown reasons.
5386 (delete-file "IPython/core/tests/test_profile.py")
5387 (delete-file "IPython/core/tests/test_interactiveshell.py")
5388 (delete-file "IPython/core/tests/test_magic.py")
5390 (home-page "https://ipython.org")
5391 (synopsis "IPython is a tool for interactive computing in Python")
5393 "IPython provides a rich architecture for interactive computing with:
5394 Powerful interactive shells, a browser-based notebook, support for interactive
5395 data visualization, embeddable interpreters and tools for parallel
5397 (license license:bsd-3)))
5399 (define-public python-ipython
5401 (name "python-ipython")
5406 (uri (pypi-uri "ipython" version ".tar.gz"))
5408 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5409 (build-system python-build-system)
5411 `(("python-backcall" ,python-backcall)
5412 ("python-pyzmq" ,python-pyzmq)
5413 ("python-prompt-toolkit" ,python-prompt-toolkit)
5414 ("python-terminado" ,python-terminado)
5415 ("python-matplotlib" ,python-matplotlib)
5416 ("python-numpy" ,python-numpy)
5417 ("python-numpydoc" ,python-numpydoc)
5418 ("python-jedi" ,python-jedi)
5419 ("python-jinja2" ,python-jinja2)
5420 ("python-mistune" ,python-mistune)
5421 ("python-pexpect" ,python-pexpect)
5422 ("python-pickleshare" ,python-pickleshare)
5423 ("python-simplegeneric" ,python-simplegeneric)
5424 ("python-jsonschema" ,python-jsonschema)
5425 ("python-traitlets" ,python-traitlets)
5426 ("python-nbformat" ,python-nbformat)
5427 ("python-pygments" ,python-pygments)))
5429 `(("readline" ,readline)
5432 `(("graphviz" ,graphviz)
5433 ("pkg-config" ,pkg-config)
5434 ("python-requests" ,python-requests) ;; for tests
5435 ("python-testpath" ,python-testpath)
5436 ("python-nose" ,python-nose)))
5439 (modify-phases %standard-phases
5440 ;; Tests can only be run after the library has been installed and not
5441 ;; within the source directory.
5443 (add-after 'install 'check
5444 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5447 ;; Make installed package available for running the tests
5448 (add-installed-pythonpath inputs outputs)
5449 (setenv "HOME" "/tmp/") ;; required by a test
5450 ;; We only test the core because one of the other tests
5451 ;; tries to import ipykernel.
5452 (invoke "python" "IPython/testing/iptest.py"
5453 "-v" "IPython/core/tests"))
5455 (add-before 'check 'fix-tests
5456 (lambda* (#:key inputs #:allow-other-keys)
5457 (substitute* "./IPython/utils/_process_posix.py"
5458 (("/usr/bin/env', 'which") (which "which")))
5459 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5460 (("#!/usr/bin/env python")
5461 (string-append "#!" (which "python"))))
5462 ;; This test introduces a circular dependency on ipykernel
5463 ;; (which depends on ipython).
5464 (delete-file "IPython/core/tests/test_display.py")
5465 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5466 (delete-file "IPython/core/tests/test_interactiveshell.py")
5468 (home-page "https://ipython.org")
5469 (synopsis "IPython is a tool for interactive computing in Python")
5471 "IPython provides a rich architecture for interactive computing with:
5472 Powerful interactive shells, a browser-based notebook, support for interactive
5473 data visualization, embeddable interpreters and tools for parallel
5475 (license license:bsd-3)))
5477 (define-public python-ipython-documentation
5479 (inherit python-ipython)
5480 (name "python-ipython-documentation")
5481 (version (package-version python-ipython))
5484 (modify-phases %standard-phases
5488 (lambda* (#:key outputs #:allow-other-keys)
5489 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5490 (doc (string-append data "/doc/" ,name "-" ,version))
5491 (html (string-append doc "/html"))
5492 (man1 (string-append data "/man/man1"))
5493 (info (string-append data "/info"))
5494 (examples (string-append doc "/examples"))
5495 (python-arg (string-append "PYTHON=" (which "python"))))
5496 (setenv "LANG" "en_US.utf8")
5497 (with-directory-excursion "docs"
5498 ;; FIXME: pdf fails to build
5499 ;;(system* "make" "pdf" "PAPER=a4")
5500 (system* "make" python-arg "html")
5501 ;; FIXME: the generated texi file contains ^@^@, which trips
5503 ;; (system* "make" python-arg "info")
5505 (copy-recursively "docs/man" man1)
5506 (copy-recursively "examples" examples)
5507 (copy-recursively "docs/build/html" html)
5508 ;; (copy-file "docs/build/latex/ipython.pdf"
5509 ;; (string-append doc "/ipython.pdf"))
5511 ;; (copy-file "docs/build/texinfo/ipython.info"
5512 ;; (string-append info "/ipython.info"))
5513 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5516 `(("python-ipython" ,python-ipython)
5517 ("python-ipykernel" ,python-ipykernel)))
5519 `(("python-sphinx" ,python-sphinx)
5520 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5521 ;; FIXME: It's possible that a smaller union would work just as well.
5522 ("texlive" ,(texlive-union (list texlive-amsfonts
5524 texlive-generic-ifxetex
5525 texlive-generic-pdftex
5526 texlive-latex-capt-of
5528 texlive-latex-environ
5529 texlive-latex-eqparbox
5530 texlive-latex-etoolbox
5531 texlive-latex-expdlist
5532 texlive-latex-fancyhdr
5533 texlive-latex-fancyvrb
5534 texlive-latex-fncychap
5536 texlive-latex-framed
5537 texlive-latex-geometry
5538 texlive-latex-graphics
5539 texlive-latex-hyperref
5540 texlive-latex-mdwtools
5541 texlive-latex-multirow
5542 texlive-latex-needspace
5543 texlive-latex-oberdiek
5544 texlive-latex-parskip
5545 texlive-latex-preview
5546 texlive-latex-tabulary
5547 texlive-latex-threeparttable
5548 texlive-latex-titlesec
5549 texlive-latex-trimspaces
5551 texlive-latex-upquote
5553 texlive-latex-varwidth
5554 texlive-latex-wrapfig)))
5555 ("texinfo" ,texinfo)))))
5557 (define-public python-urwid
5559 (name "python-urwid")
5564 (uri (pypi-uri "urwid" version))
5567 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5568 (build-system python-build-system)
5569 (home-page "http://urwid.org")
5570 (synopsis "Console user interface library for Python")
5572 "Urwid is a curses-based UI/widget library for Python. It includes many
5573 features useful for text console applications.")
5574 (license license:lgpl2.1+)))
5576 (define-public python2-urwid
5577 (package-with-python2 python-urwid))
5579 (define-public python-urwidtrees
5581 (name "python-urwidtrees")
5586 ;; package author intends on distributing via github rather than pypi:
5587 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5588 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5590 (file-name (string-append name "-" version ".tar.gz"))
5593 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5594 (build-system python-build-system)
5596 '(#:tests? #f)) ; no tests
5597 (propagated-inputs `(("python-urwid" ,python-urwid)))
5598 (home-page "https://github.com/pazz/urwidtrees")
5599 (synopsis "Tree widgets for urwid")
5600 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5601 toolkit. Use it to build trees of widgets.")
5602 (license license:gpl3+)))
5604 (define-public python2-urwidtrees
5605 (package-with-python2 python-urwidtrees))
5607 (define-public python-ua-parser
5609 (name "python-ua-parser")
5614 (uri (pypi-uri "ua-parser" version))
5617 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5618 (build-system python-build-system)
5620 `(#:tests? #f)) ;no test suite in release
5622 `(("python-pyyaml" ,python-pyyaml)))
5623 (home-page "https://github.com/ua-parser/uap-python")
5624 (synopsis "User agent parser")
5626 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5627 (license license:asl2.0)))
5629 (define-public python2-ua-parser
5630 (package-with-python2 python-ua-parser))
5632 (define-public python-user-agents
5634 (name "python-user-agents")
5639 (uri (pypi-uri "user-agents" version))
5642 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5643 (build-system python-build-system)
5645 `(#:tests? #f)) ;missing devices.json test file in release
5647 `(("python-ua-parser" ,python-ua-parser)))
5648 (home-page "https://github.com/selwin/python-user-agents")
5649 (synopsis "User Agent strings parsing library")
5651 "A library to identify devices (phones, tablets) and their capabilities by
5652 parsing (browser/HTTP) user agent strings.")
5653 (license license:expat)))
5655 (define-public python2-user-agents
5656 (package-with-python2 python-user-agents))
5658 (define-public python-dbus
5660 (name "python-dbus")
5665 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5666 "dbus-python-" version ".tar.gz"))
5669 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5670 (build-system gnu-build-system)
5673 (modify-phases %standard-phases
5677 ;; XXX: For the missing '/etc/machine-id'.
5678 (substitute* "test/run-test.sh"
5679 (("DBUS_FATAL_WARNINGS=1")
5680 "DBUS_FATAL_WARNINGS=0"))
5683 `(("pkg-config" ,pkg-config)))
5685 `(("python" ,python-wrapper)
5686 ("dbus-glib" ,dbus-glib)))
5687 (synopsis "Python bindings for D-bus")
5688 (description "python-dbus provides bindings for libdbus, the reference
5689 implementation of D-Bus.")
5690 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5691 (license license:expat)))
5693 (define-public python2-dbus
5694 (package (inherit python-dbus)
5695 (name "python2-dbus")
5696 (inputs `(("python" ,python-2)
5697 ,@(alist-delete "python"
5698 (package-inputs python-dbus)
5700 ;; FIXME: on Python 2, the test_utf8 fails with:
5701 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5702 (arguments `(#:tests? #f))))
5704 (define-public python-notify2
5706 (name "python-notify2")
5711 (uri (pypi-uri "notify2" version))
5714 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5715 (build-system python-build-system)
5716 (arguments `(#:tests? #f)) ; tests depend on system state
5718 `(("python-dbus" ,python-dbus)))
5719 (home-page "https://bitbucket.org/takluyver/pynotify2")
5720 (synopsis "Python interface to D-Bus notifications")
5722 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5723 It is a reimplementation of pynotify in pure Python, and an alternative to
5724 the GObject Introspection bindings to libnotify for non-GTK applications.")
5725 (license (list license:bsd-2
5726 license:lgpl2.1+))))
5728 (define-public python2-notify2
5729 (package-with-python2 python-notify2))
5731 (define-public python-lxml
5733 (name "python-lxml")
5738 (uri (pypi-uri "lxml" version))
5741 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5742 (build-system python-build-system)
5744 `(("libxml2" ,libxml2)
5745 ("libxslt" ,libxslt)))
5746 (home-page "http://lxml.de/")
5748 "Python XML processing library")
5750 "The lxml XML toolkit is a Pythonic binding for the C libraries
5751 libxml2 and libxslt.")
5752 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5754 (define-public python2-lxml
5755 (package-with-python2 python-lxml))
5757 ;; beautifulsoup4 has a totally different namespace than 3.x,
5758 ;; and pypi seems to put it under its own name, so I guess we should too
5759 (define-public python-beautifulsoup4
5761 (name "python-beautifulsoup4")
5766 (uri (pypi-uri "beautifulsoup4" version))
5769 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5770 (build-system python-build-system)
5773 (modify-phases %standard-phases
5774 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5775 ;; must use this conversion script when building with Python 3. The
5776 ;; conversion script also runs the tests.
5777 ;; For more information, see the file 'convert-py3k' in the source
5780 (lambda _ (invoke "./convert-py3k"))))))
5782 `(("python-soupsieve" ,python-soupsieve)))
5784 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5786 "Python screen-scraping library")
5788 "Beautiful Soup is a Python library designed for rapidly setting up
5789 screen-scraping projects. It offers Pythonic idioms for navigating,
5790 searching, and modifying a parse tree, providing a toolkit for
5791 dissecting a document and extracting what you need. It automatically
5792 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5793 (license license:expat)
5794 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5796 (define-public python2-beautifulsoup4
5798 (inherit (package-with-python2
5799 (strip-python2-variant python-beautifulsoup4)))
5800 (arguments `(#:python ,python-2))))
5802 (define-public python-soupsieve
5804 (name "python-soupsieve")
5809 (uri (pypi-uri "soupsieve" version))
5812 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5813 (build-system python-build-system)
5814 (arguments `(#:tests? #f))
5815 ;;XXX: 2 tests fail currently despite claming they were to be
5816 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5817 ;;don't want to create a circular dependency.
5818 (home-page "https://github.com/facelessuser/soupsieve")
5819 (synopsis "CSS selector library")
5821 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5822 Soup 4. It aims to provide selecting, matching, and filtering using modern
5823 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5824 specifications up through the latest CSS level 4 drafts and beyond (though
5825 some are not yet implemented).")
5826 (properties `((python2-variant . ,(delay python2-soupsieve))))
5827 (license license:expat)))
5829 (define-public python2-soupsieve
5830 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5834 `(("python2-backports-functools-lru-cache"
5835 ,python2-backports-functools-lru-cache)
5836 ,@(package-propagated-inputs base))))))
5838 (define-public python-netifaces
5840 (name "python-netifaces")
5845 (uri (pypi-uri "netifaces" version))
5848 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5849 (build-system python-build-system)
5850 (home-page "https://github.com/al45tair/netifaces")
5852 "Python module for portable network interface information")
5854 "Netifaces is a Python module providing information on network
5855 interfaces in an easy and portable manner.")
5856 (license license:expat)))
5858 (define-public python2-netifaces
5859 (package-with-python2 python-netifaces))
5861 (define-public python-networkx
5863 (name "python-networkx")
5868 (uri (pypi-uri "networkx" version ".zip"))
5870 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5871 (build-system python-build-system)
5872 ;; python-decorator is needed at runtime.
5874 `(("python-decorator" ,python-decorator)))
5876 `(("python-nose" ,python-nose)
5878 (home-page "https://networkx.github.io/")
5879 (synopsis "Python module for creating and manipulating graphs and networks")
5881 "NetworkX is a Python package for the creation, manipulation, and study
5882 of the structure, dynamics, and functions of complex networks.")
5883 (license license:bsd-3)))
5885 (define-public python2-networkx
5886 (package-with-python2 python-networkx))
5888 (define-public python-datrie
5890 (name "python-datrie")
5895 (uri (pypi-uri "datrie" version))
5898 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5899 (build-system python-build-system)
5901 `(("python-cython" ,python-cython)
5902 ("python-hypothesis" ,python-hypothesis)
5903 ("python-pytest" ,python-pytest)
5904 ("python-pytest-runner" ,python-pytest-runner)))
5905 (home-page "https://github.com/kmike/datrie")
5906 (synopsis "Fast, efficiently stored trie for Python")
5908 "This package provides a fast, efficiently stored trie implementation for
5910 (license license:lgpl2.1+)))
5912 (define-public snakemake
5919 (uri (pypi-uri "snakemake" version))
5921 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5922 (build-system python-build-system)
5924 ;; TODO: Package missing test dependencies.
5927 (modify-phases %standard-phases
5928 ;; For cluster execution Snakemake will call Python. Since there is
5929 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5930 ;; this by calling the snakemake wrapper instead.
5931 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5932 (lambda* (#:key outputs #:allow-other-keys)
5933 (substitute* "snakemake/executors.py"
5934 (("\\{sys.executable\\} -m snakemake")
5935 (string-append (assoc-ref outputs "out")
5939 `(("python-gitpython" ,python-gitpython)
5940 ("python-wrapt" ,python-wrapt)
5941 ("python-requests" ,python-requests)
5942 ("python-appdirs" ,python-appdirs)
5943 ("python-configargparse" ,python-configargparse)
5944 ("python-datrie" ,python-datrie)
5945 ("python-docutils" ,python-docutils)
5946 ("python-jinja2" ,python-jinja2)
5947 ("python-jsonschema" ,python-jsonschema)
5948 ("python-networkx" ,python-networkx)
5949 ("python-pyyaml" ,python-pyyaml)
5950 ("python-ratelimiter" ,python-ratelimiter)))
5951 (home-page "https://snakemake.readthedocs.io")
5952 (synopsis "Python-based execution environment for make-like workflows")
5954 "Snakemake aims to reduce the complexity of creating workflows by
5955 providing a clean and modern domain specific specification language (DSL) in
5956 Python style, together with a fast and comfortable execution environment.")
5957 (license license:expat)))
5959 ;; This is currently needed for the pigx-* packages.
5960 (define-public snakemake-4
5961 (package (inherit snakemake)
5966 (uri (pypi-uri "snakemake" version))
5968 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5970 `(("python-wrapt" ,python-wrapt)
5971 ("python-requests" ,python-requests)
5972 ("python-appdirs" ,python-appdirs)
5973 ("python-configargparse" ,python-configargparse)
5974 ("python-pyyaml" ,python-pyyaml)
5975 ("python-ratelimiter" ,python-ratelimiter)))))
5977 (define-public python-pyqrcode
5979 (name "python-pyqrcode")
5984 (uri (pypi-uri "PyQRCode" version))
5987 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5988 (build-system python-build-system)
5990 "https://github.com/mnooner256/pyqrcode")
5991 (synopsis "QR code generator")
5993 "Pyqrcode is a QR code generator written purely in Python with
5994 SVG, EPS, PNG and terminal output.")
5995 (license license:bsd-3)))
5997 (define-public python-seaborn
5999 (name "python-seaborn")
6004 (uri (pypi-uri "seaborn" version))
6006 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6007 (build-system python-build-system)
6010 (modify-phases %standard-phases
6011 (add-before 'check 'start-xserver
6012 (lambda* (#:key inputs #:allow-other-keys)
6013 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6014 ;; There must be a running X server and make check doesn't
6015 ;; start one. Therefore we must do it.
6016 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6017 (setenv "DISPLAY" ":1")
6019 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6021 `(("python-pandas" ,python-pandas)
6022 ("python-matplotlib" ,python-matplotlib)
6023 ("python-numpy" ,python-numpy)
6024 ("python-scipy" ,python-scipy)))
6026 `(("python-pytest" ,python-pytest)
6027 ("xorg-server" ,xorg-server)))
6028 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6029 (synopsis "Statistical data visualization")
6031 "Seaborn is a library for making attractive and informative statistical
6032 graphics in Python. It is built on top of matplotlib and tightly integrated
6033 with the PyData stack, including support for numpy and pandas data structures
6034 and statistical routines from scipy and statsmodels.")
6035 (license license:bsd-3)))
6037 (define-public python2-seaborn
6038 (package-with-python2 python-seaborn))
6040 (define-public python-mpmath
6042 (name "python-mpmath")
6046 (uri (string-append "http://mpmath.org/files/mpmath-"
6050 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6051 (build-system python-build-system)
6054 (modify-phases %standard-phases
6057 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6058 (home-page "http://mpmath.org")
6059 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6061 "@code{mpmath} can be used as an arbitrary-precision substitute for
6062 Python's float/complex types and math/cmath modules, but also does much
6063 more advanced mathematics.")
6064 (license license:bsd-3)))
6066 (define-public python2-mpmath
6067 (package-with-python2 python-mpmath))
6069 (define-public python-bigfloat
6071 (name "python-bigfloat")
6076 (uri (pypi-uri "bigfloat" version))
6078 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6079 (build-system python-build-system)
6082 (home-page "https://github.com/mdickinson/bigfloat")
6083 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6085 "This package provides a Python interface to the MPFR library for
6086 multiprecision arithmetic.")
6087 (license license:lgpl3+)))
6089 (define-public python2-bigfloat
6090 (package-with-python2 python-bigfloat))
6092 (define-public python-sympy
6094 (name "python-sympy")
6100 "https://github.com/sympy/sympy/releases/download/sympy-"
6101 version "/sympy-" version ".tar.gz"))
6103 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6104 (build-system python-build-system)
6107 (modify-phases %standard-phases
6108 ;; Run the core tests after installation. By default it would run
6109 ;; *all* tests, which take a very long time to complete and are known
6112 (add-after 'install 'check
6113 (lambda* (#:key outputs #:allow-other-keys)
6114 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6117 `(("python-mpmath" ,python-mpmath)))
6118 (home-page "http://www.sympy.org/")
6119 (synopsis "Python library for symbolic mathematics")
6121 "SymPy is a Python library for symbolic mathematics. It aims to become a
6122 full-featured computer algebra system (CAS) while keeping the code as simple
6123 as possible in order to be comprehensible and easily extensible.")
6124 (license license:bsd-3)))
6126 (define-public python2-sympy
6128 (inherit (package-with-python2 python-sympy))
6131 (modify-phases %standard-phases
6132 ;; Run the core tests after installation. By default it would run
6133 ;; *all* tests, which take a very long time to complete and are known
6136 (add-after 'install 'check
6137 (lambda* (#:key outputs #:allow-other-keys)
6138 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6141 (define-public python-q
6148 (uri (pypi-uri "q" version))
6151 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6152 (build-system python-build-system)
6153 (home-page "https://github.com/zestyping/q")
6154 (synopsis "Quick-and-dirty debugging output for tired programmers")
6156 "q is a Python module for \"print\" style of debugging Python code. It
6157 provides convenient short API for print out of values, tracebacks, and
6158 falling into the Python interpreter.")
6159 (license license:asl2.0)))
6161 (define-public python2-q
6162 (package-with-python2 python-q))
6164 (define-public python2-xlib
6166 (name "python2-xlib")
6170 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6172 "python-xlib-" version ".tar.gz"))
6175 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6176 (build-system python-build-system)
6178 `(#:python ,python-2 ;Python 2 only
6179 #:tests? #f)) ;no tests
6180 (home-page "http://python-xlib.sourceforge.net/")
6181 (synopsis "Python X11 client library")
6183 "The Python X Library is intended to be a fully functional X client
6184 library for Python programs. It is useful to implement low-level X clients.
6185 It is written entirely in Python.")
6186 (license license:gpl2+)))
6188 (define-public python-singledispatch
6190 (name "python-singledispatch")
6195 (uri (pypi-uri "singledispatch" version))
6198 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6199 (build-system python-build-system)
6201 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6203 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6204 (synopsis "Backport of singledispatch feature from Python 3.4")
6206 "This library brings functools.singledispatch from Python 3.4 to Python
6208 (license license:expat)))
6210 (define-public python2-singledispatch
6211 (package-with-python2 python-singledispatch))
6213 ;; the python- version can be removed with python-3.5
6214 (define-public python-backports-abc
6216 (name "python-backports-abc")
6221 (uri (pypi-uri "backports_abc" version))
6224 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6225 (build-system python-build-system)
6226 (home-page "https://github.com/cython/backports_abc")
6227 (synopsis "Backport of additions to the 'collections.abc' module")
6229 "Python-backports-abc provides a backport of additions to the
6230 @code{collections.abc} module in Python-3.5.")
6231 (license license:psfl)))
6233 (define-public python2-backports-abc
6234 (package-with-python2 python-backports-abc))
6236 (define-public python-backports-csv
6238 (name "python-backports-csv")
6243 (uri (pypi-uri "backports.csv" version))
6246 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6247 (build-system python-build-system)
6248 (home-page "https://github.com/ryanhiebert/backports.csv")
6249 (synopsis "Backport of Python 3's csv module for Python 2")
6251 "Provides a backport of Python 3's @code{csv} module for parsing
6252 comma separated values. The API of the @code{csv} module in Python 2
6253 is drastically different from the @code{csv} module in Python 3.
6254 This is due, for the most part, to the difference between str in
6255 Python 2 and Python 3.")
6256 (license license:psfl)))
6258 (define-public python2-backports-csv
6259 (package-with-python2 python-backports-csv))
6261 (define-public python2-backports-shutil-get-terminal-size
6263 (name "python2-backports-shutil-get-terminal-size")
6268 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6271 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6272 (build-system python-build-system)
6274 `(#:python ,python-2
6276 (modify-phases %standard-phases
6279 (invoke "py.test" "-v"))))))
6281 `(("python2-pytest" ,python2-pytest)))
6282 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6283 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6285 "This package provides a backport of the @code{get_terminal_size
6286 function} from Python 3.3's @code{shutil}.
6287 Unlike the original version it is written in pure Python rather than C,
6288 so it might be a tiny bit slower.")
6289 (license license:expat)))
6291 (define-public python-waf
6297 (uri (string-append "https://waf.io/"
6298 "waf-" version ".tar.bz2"))
6301 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6302 (build-system python-build-system)
6305 (modify-phases %standard-phases
6308 (invoke "python" "waf-light" "configure" "build")))
6311 (invoke "python" "waf" "--version")))
6313 (lambda* (#:key outputs #:allow-other-keys)
6314 (let ((out (assoc-ref outputs "out")))
6315 (install-file "waf" (string-append out "/bin")))
6317 ;; waf breaks when it is wrapped.
6319 (home-page "https://waf.io/")
6320 (synopsis "Python-based build system")
6322 "Waf is a Python-based framework for configuring, compiling and installing
6324 (license license:bsd-3)))
6326 (define-public python2-waf
6327 (package-with-python2 python-waf))
6329 (define-public python-pyzmq
6331 (name "python-pyzmq")
6336 (uri (pypi-uri "pyzmq" version))
6338 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6339 (build-system python-build-system)
6342 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6343 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6344 ;; --inplace' for 'python setup.py test' to work.
6347 `(("zeromq" ,zeromq)))
6349 `(("pkg-config" ,pkg-config)
6350 ("python-nose" ,python-nose)))
6351 (home-page "https://github.com/zeromq/pyzmq")
6352 (synopsis "Python bindings for 0MQ")
6354 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6355 (license license:bsd-4)))
6357 (define-public python2-pyzmq
6358 (package-with-python2 python-pyzmq))
6360 (define-public python-pep8
6361 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6362 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6363 ;; some dependents' test suites, and nothing more.
6365 (name "python-pep8")
6370 (uri (pypi-uri "pep8" version))
6373 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6374 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6375 (build-system python-build-system)
6376 (home-page "https://pep8.readthedocs.org/")
6377 (synopsis "Python style guide checker")
6379 "This tools checks Python code against some of the style conventions in
6381 (license license:expat)))
6383 (define-public python2-pep8
6384 (package-with-python2 python-pep8))
6386 (define-public python-pyflakes
6388 (name "python-pyflakes")
6393 (uri (pypi-uri "pyflakes" version))
6396 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6397 (build-system python-build-system)
6399 "https://github.com/pyflakes/pyflakes")
6400 (synopsis "Passive checker of Python programs")
6402 "Pyflakes statically checks Python source code for common errors.")
6403 (license license:expat)))
6405 (define-public python2-pyflakes
6406 (package-with-python2 python-pyflakes))
6408 (define-public python-mccabe
6410 (name "python-mccabe")
6415 (uri (pypi-uri "mccabe" version))
6418 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6419 (build-system python-build-system)
6421 `(("python-pytest" ,python-pytest-bootstrap)
6422 ("python-pytest-runner" ,python-pytest-runner)))
6423 (home-page "https://github.com/flintwork/mccabe")
6424 (synopsis "McCabe checker, plugin for flake8")
6426 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6427 complexity of Python source code.")
6428 (license license:expat)))
6430 (define-public python2-mccabe
6431 (package-with-python2 python-mccabe))
6433 (define-public python-mccabe-0.2.1
6434 (package (inherit python-mccabe)
6439 (uri (pypi-uri "mccabe" version))
6442 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6444 (define-public python2-mccabe-0.2.1
6445 (package-with-python2 python-mccabe-0.2.1))
6447 ;; Flake8 2.4.1 requires an older version of pep8.
6448 ;; This should be removed ASAP.
6449 (define-public python-pep8-1.5.7
6450 (package (inherit python-pep8)
6455 (uri (pypi-uri "pep8" version))
6458 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6460 ;; XXX Tests not compatible with Python 3.5.
6463 (define-public python2-pep8-1.5.7
6464 (package-with-python2 python-pep8-1.5.7))
6466 ;; Flake8 2.4.1 requires an older version of pyflakes.
6467 ;; This should be removed ASAP.
6468 (define-public python-pyflakes-0.8.1
6469 (package (inherit python-pyflakes)
6474 (uri (pypi-uri "pyflakes" version))
6477 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6479 ;; XXX Tests not compatible with Python 3.5.
6482 (define-public python2-pyflakes-0.8.1
6483 (package-with-python2 python-pyflakes-0.8.1))
6485 (define-public python-flake8
6487 (name "python-flake8")
6491 (uri (pypi-uri "flake8" version))
6494 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6495 (build-system python-build-system)
6498 (modify-phases %standard-phases
6500 (add-after 'install 'check
6501 (lambda* (#:key inputs outputs #:allow-other-keys)
6502 (add-installed-pythonpath inputs outputs)
6503 (invoke "pytest" "-v")
6506 `(("python-pycodestyle" ,python-pycodestyle)
6507 ("python-entrypoints" ,python-entrypoints)
6508 ("python-pyflakes" ,python-pyflakes)
6509 ("python-mccabe" ,python-mccabe)))
6511 `(("python-mock" ,python-mock)
6512 ("python-pytest" ,python-pytest-bootstrap)
6513 ("python-pytest-runner" ,python-pytest-runner)))
6514 (home-page "https://gitlab.com/pycqa/flake8")
6516 "The modular source code checker: pep8, pyflakes and co")
6518 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6519 (properties `((python2-variant . ,(delay python2-flake8))))
6520 (license license:expat)))
6522 (define-public python2-flake8
6523 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6524 (package (inherit base)
6526 `(("python2-configparser" ,python2-configparser)
6527 ("python2-enum34" ,python2-enum34)
6528 ("python2-typing" ,python2-typing)
6529 ,@(package-propagated-inputs base))))))
6531 ;; python-hacking requires flake8 <2.6.0.
6532 (define-public python-flake8-2.5
6534 (inherit python-flake8)
6538 (uri (pypi-uri "flake8" version))
6541 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6543 `(("python-pep8" ,python-pep8)
6544 ,@(package-propagated-inputs python-flake8)))
6545 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6547 (define-public python2-flake8-2.5
6549 (inherit python2-flake8)
6550 (version (package-version python-flake8-2.5))
6552 (inherit (package-source python-flake8-2.5))))
6554 `(("python2-pep8" ,python2-pep8)
6555 ,@(package-propagated-inputs python2-flake8)))))
6557 (define-public python-flake8-polyfill
6559 (name "python-flake8-polyfill")
6564 (uri (pypi-uri "flake8-polyfill" version))
6567 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6568 (build-system python-build-system)
6571 (modify-phases %standard-phases
6574 ;; Be compatible with Pytest 4:
6575 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6576 (substitute* "setup.cfg"
6580 (setenv "PYTHONPATH"
6581 (string-append (getcwd) "/build/lib:"
6582 (getenv "PYTHONPATH")))
6583 (invoke "py.test" "-v"))))))
6585 `(("python-flake8" ,python-flake8)
6586 ("python-mock" ,python-mock)
6587 ("python-pep8" ,python-pep8)
6588 ("python-pycodestyle" ,python-pycodestyle)
6589 ("python-pytest" ,python-pytest)))
6590 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6591 (synopsis "Polyfill package for Flake8 plugins")
6593 "This package that provides some compatibility helpers for Flake8
6594 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6595 (license license:expat)))
6597 (define-public python2-flake8-polyfill
6598 (package-with-python2 python-flake8-polyfill))
6600 (define-public python-mistune
6602 (name "python-mistune")
6607 (uri (pypi-uri "mistune" version))
6610 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6611 (build-system python-build-system)
6613 `(("python-nose" ,python-nose)
6614 ("python-cython" ,python-cython)))
6615 (home-page "https://github.com/lepture/mistune")
6616 (synopsis "Markdown parser in pure Python")
6617 (description "This package provides a fast markdown parser in pure
6619 (license license:bsd-3)))
6621 (define-public python2-mistune
6622 (package-with-python2 python-mistune))
6624 (define-public python-markdown
6626 (name "python-markdown")
6631 (uri (pypi-uri "Markdown" version))
6634 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6635 (build-system python-build-system)
6637 `(("python-nose" ,python-nose)
6638 ("python-pyyaml" ,python-pyyaml)))
6639 (home-page "https://python-markdown.github.io/")
6640 (synopsis "Python implementation of Markdown")
6642 "This package provides a Python implementation of John Gruber's
6643 Markdown. The library features international input, various Markdown
6644 extensions, and several HTML output formats. A command line wrapper
6645 markdown_py is also provided to convert Markdown files to HTML.")
6646 (license license:bsd-3)))
6648 (define-public python2-markdown
6649 (package-with-python2 python-markdown))
6651 (define-public python-ptyprocess
6653 (name "python-ptyprocess")
6658 (uri (pypi-uri "ptyprocess" version))
6661 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6662 (build-system python-build-system)
6664 `(("python-nose" ,python-nose)))
6667 (modify-phases %standard-phases
6669 (lambda _ (invoke "nosetests"))))))
6670 (home-page "https://github.com/pexpect/ptyprocess")
6671 (synopsis "Run a subprocess in a pseudo terminal")
6673 "This package provides a Python library used to launch a subprocess in a
6674 pseudo terminal (pty), and interact with both the process and its pty.")
6675 (license license:isc)))
6677 (define-public python2-ptyprocess
6678 (package-with-python2 python-ptyprocess))
6680 (define-public python-cram
6682 (name "python-cram")
6684 (home-page "https://bitheap.org/cram/")
6687 (uri (list (string-append home-page "cram-"
6689 (pypi-uri "cram" version)))
6692 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6695 (modify-phases %standard-phases
6696 (add-after 'unpack 'patch-source
6698 (substitute* (find-files "cram" ".*\\.py$")
6699 ;; Replace default shell path.
6700 (("/bin/sh") (which "sh")))
6701 (substitute* (find-files "tests" ".*\\.t$")
6703 (("/bin/bash") (which "bash"))
6704 (("/bin/sh") (which "sh")))
6705 (substitute* "cram/_test.py"
6706 ;; This hack works around a bug triggered by substituting
6707 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6708 ;; "cram -h", which breaks the output at 80 characters. This
6709 ;; causes the line showing the default shell to break into two
6710 ;; lines, but the test expects a single line...
6711 (("env\\['COLUMNS'\\] = '80'")
6712 "env['COLUMNS'] = '160'"))
6714 (substitute* "Makefile"
6715 ;; Recent versions of python-coverage have caused the test
6716 ;; coverage to decrease (as of version 0.7). Allow that.
6717 (("--fail-under=100")
6722 ;; The test phase uses the built library and executable.
6723 (lambda* (#:key inputs outputs #:allow-other-keys)
6724 (add-installed-pythonpath inputs outputs)
6725 (setenv "PATH" (string-append (getenv "PATH") ":"
6726 (assoc-ref outputs "out") "/bin"))
6727 (invoke "make" "test"))))))
6728 (build-system python-build-system)
6730 `(("python-coverage" ,python-coverage)
6732 (synopsis "Simple testing framework for command line applications")
6734 "Cram is a functional testing framework for command line applications.
6735 Cram tests look like snippets of interactive shell sessions. Cram runs each
6736 command and compares the command output in the test with the command’s actual
6738 (license license:gpl2+)))
6740 (define-public python2-cram
6741 (package-with-python2 python-cram))
6743 (define-public python-straight-plugin
6745 (name "python-straight-plugin")
6750 (uri (pypi-uri "straight.plugin" version))
6753 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6754 (build-system python-build-system)
6755 (home-page "https://github.com/ironfroggy/straight.plugin")
6756 (synopsis "Simple namespaced plugin facility")
6757 (description "Straight Plugin provides a type of plugin you can create from
6758 almost any existing Python modules, and an easy way for outside developers to
6759 add functionality and customization to your projects with their own plugins.")
6760 (license license:expat)))
6762 (define-public python2-straight-plugin
6763 (package-with-python2 python-straight-plugin))
6765 (define-public python-fonttools
6767 (name "python-fonttools")
6771 (uri (pypi-uri "fonttools" version ".zip"))
6774 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6775 (build-system python-build-system)
6778 ("python-pytest" ,python-pytest)
6779 ("python-pytest-runner" ,python-pytest-runner)))
6780 (home-page "https://github.com/behdad/fonttools")
6781 (synopsis "Tools to manipulate font files")
6783 "FontTools/TTX is a library to manipulate font files from Python. It
6784 supports reading and writing of TrueType/OpenType fonts, reading and writing
6785 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6786 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6787 from an XML-based format.")
6788 (license license:expat)))
6790 (define-public python2-fonttools
6791 (package-with-python2 python-fonttools))
6793 (define-public python-ly
6800 (uri (pypi-uri name version))
6803 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6804 (build-system python-build-system)
6806 ;; FIXME: Some tests need network access.
6808 (synopsis "Tool and library for manipulating LilyPond files")
6809 (description "This package provides a Python library to parse, manipulate
6810 or create documents in LilyPond format. A command line program ly is also
6811 provided that can be used to do various manipulations with LilyPond files.")
6812 (home-page "https://pypi.python.org/pypi/python-ly")
6813 (license license:gpl2+)))
6815 (define-public python-appdirs
6817 (name "python-appdirs")
6822 (uri (pypi-uri "appdirs" version))
6825 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6826 (build-system python-build-system)
6827 (home-page "https://github.com/ActiveState/appdirs")
6829 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6831 "This module provides a portable way of finding out where user data
6832 should be stored on various operating systems.")
6833 (license license:expat)))
6835 (define-public python2-appdirs
6836 (package-with-python2 python-appdirs))
6838 (define-public python-llfuse
6840 (name "python-llfuse")
6844 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6847 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6848 (build-system python-build-system)
6853 `(("pkg-config" ,pkg-config)))
6854 (synopsis "Python bindings for FUSE")
6856 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6857 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6858 (license license:lgpl2.0+)
6859 (properties `((python2-variant . ,(delay python2-llfuse))))))
6861 (define-public python2-llfuse
6862 (package (inherit (package-with-python2
6863 (strip-python2-variant python-llfuse)))
6864 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6867 (define-public python-llfuse-0.41
6868 (package (inherit python-llfuse)
6873 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6874 "llfuse-" version ".tar.bz2"))
6877 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6878 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6879 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6880 (license (list license:expat license:lgpl2.0+))))
6882 (define-public python-msgpack
6884 (name "python-msgpack")
6888 (uri (pypi-uri "msgpack" version))
6891 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6892 (build-system python-build-system)
6894 `(#:modules ((guix build utils)
6895 (guix build python-build-system)
6900 (modify-phases %standard-phases
6903 (let ((cwd (getcwd)))
6904 (setenv "PYTHONPATH"
6905 (string-append cwd "/build/"
6906 (find (cut string-prefix? "lib" <>)
6907 (scandir (string-append cwd "/build")))
6909 (getenv "PYTHONPATH")))
6910 (invoke "pytest" "-v" "test")))))))
6912 `(("python-pytest" ,python-pytest)))
6913 (synopsis "MessagePack (de)serializer")
6914 (description "MessagePack is a fast, compact binary serialization format,
6915 suitable for similar data to JSON. This package provides CPython bindings for
6916 reading and writing MessagePack data.")
6917 (home-page "https://pypi.python.org/pypi/msgpack/")
6918 (license license:asl2.0)))
6920 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6921 ;; release 0.5. Some packages like borg still call it by the old name for now.
6922 ;; <https://bugs.gnu.org/30662>
6923 (define-public python-msgpack-transitional
6925 (inherit python-msgpack)
6926 (name "python-msgpack-transitional")
6928 (substitute-keyword-arguments (package-arguments python-msgpack)
6930 `(modify-phases ,phases
6931 (add-after 'unpack 'configure-transitional
6933 ;; Keep using the old name.
6934 (substitute* "setup.py"
6935 (("TRANSITIONAL = False")
6936 "TRANSITIONAL = 1"))
6939 (define-public python2-msgpack
6940 (package-with-python2 python-msgpack))
6942 (define-public python-netaddr
6944 (name "python-netaddr")
6949 (uri (pypi-uri "netaddr" version))
6952 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6953 (build-system python-build-system)
6954 (arguments `(#:tests? #f)) ;; No tests.
6955 (home-page "https://github.com/drkjam/netaddr/")
6956 (synopsis "Pythonic manipulation of network addresses")
6958 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6959 and MAC network addresses.")
6960 (license license:bsd-3)))
6962 (define-public python2-netaddr
6963 (package-with-python2 python-netaddr))
6965 (define-public python2-pyroute2
6967 (name "python2-pyroute2")
6972 (uri (pypi-uri "pyroute2" version))
6975 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6976 (build-system python-build-system)
6978 `(#:python ,python-2)) ;Python 3.x is not supported
6979 (home-page "https://github.com/svinota/pyroute2")
6980 (synopsis "Python netlink library")
6982 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6983 Supported netlink families and protocols include:
6985 @item rtnl, network settings - addresses, routes, traffic controls
6986 @item nfnetlink - netfilter API: ipset, nftables, ...
6987 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6988 @item devlink - manage and monitor devlink-enabled hardware
6989 @item generic - generic netlink families
6991 @item nl80211 - wireless functions API (basic support)
6992 @item taskstats - extended process statistics
6993 @item acpi_events - ACPI events monitoring
6994 @item thermal_events - thermal events monitoring
6995 @item VFS_DQUOT - disk quota events monitoring
6998 (license license:gpl2+)))
7000 (define-public python-wrapt
7002 (name "python-wrapt")
7007 (uri (pypi-uri "wrapt" version))
7010 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7011 (build-system python-build-system)
7013 ;; Tests are not included in the tarball, they are only available in the
7016 (home-page "https://github.com/GrahamDumpleton/wrapt")
7017 (synopsis "Module for decorators, wrappers and monkey patching")
7019 "The aim of the wrapt module is to provide a transparent object proxy for
7020 Python, which can be used as the basis for the construction of function
7021 wrappers and decorator functions.")
7022 (license license:bsd-2)))
7024 (define-public python2-wrapt
7025 (package-with-python2 python-wrapt))
7027 (define-public python-xlrd
7029 (name "python-xlrd")
7033 (uri (pypi-uri "xlrd" version))
7036 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7037 (build-system python-build-system)
7040 (modify-phases %standard-phases
7041 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7042 ;; run tests instead for now.
7043 (replace 'check (lambda _ (invoke "nosetests"))))))
7044 (native-inputs `(("python-nose" ,python-nose)))
7045 (home-page "http://www.python-excel.org/")
7046 (synopsis "Library for extracting data from Excel files")
7047 (description "This package provides a library to extract data from
7048 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7049 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7050 Unicode-aware. It is not intended as an end-user tool.")
7051 (license license:bsd-3)))
7053 (define-public python2-xlrd
7054 (package-with-python2 python-xlrd))
7056 (define-public python-prettytable
7058 (name "python-prettytable")
7063 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7066 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7067 (build-system python-build-system)
7068 (home-page "http://code.google.com/p/prettytable/")
7069 (synopsis "Display tabular data in an ASCII table format")
7071 "A library designed to represent tabular data in visually appealing ASCII
7072 tables. PrettyTable allows for selection of which columns are to be printed,
7073 independent alignment of columns (left or right justified or centred) and
7074 printing of sub-tables by specifying a row range.")
7075 (license license:bsd-3)))
7077 (define-public python2-prettytable
7078 (package-with-python2 python-prettytable))
7080 (define-public python-tables
7082 (name "python-tables")
7087 (uri (pypi-uri "tables" version))
7090 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7091 (modules '((guix build utils)))
7094 ;; Remove pre-compiled .pyc files from source.
7095 (for-each delete-file-recursively
7096 (find-files "." "__pycache__" #:directories? #t))
7097 (for-each delete-file (find-files "." "\\.pyc$"))
7099 (build-system python-build-system)
7101 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7102 ;; or "check", so we must override the build and check phases.
7104 (modify-phases %standard-phases
7105 (add-after 'unpack 'use-gcc
7107 (substitute* "setup.py"
7108 (("compiler = new_compiler\\(\\)" line)
7110 "\ncompiler.set_executables(compiler='gcc',"
7111 "compiler_so='gcc',"
7113 "linker_so='gcc -shared')")))
7116 (lambda* (#:key inputs #:allow-other-keys)
7117 (invoke "python" "setup.py" "build"
7118 (string-append "--hdf5="
7119 (assoc-ref inputs "hdf5")))))
7121 (lambda* (#:key inputs #:allow-other-keys)
7122 (invoke "python" "setup.py" "check"
7123 (string-append "--hdf5="
7124 (assoc-ref inputs "hdf5"))))))))
7126 `(("python-numexpr" ,python-numexpr)
7127 ("python-numpy" ,python-numpy)))
7129 `(("python-cython" ,python-cython)
7130 ("pkg-config" ,pkg-config)))
7135 (home-page "http://www.pytables.org/")
7136 (synopsis "Hierarchical datasets for Python")
7137 (description "PyTables is a package for managing hierarchical datasets and
7138 designed to efficiently cope with extremely large amounts of data.")
7139 (license license:bsd-3)))
7141 (define-public python2-tables
7142 (package-with-python2 python-tables))
7144 (define-public python-pyasn1
7146 (name "python-pyasn1")
7151 (uri (pypi-uri "pyasn1" version))
7154 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7155 (build-system python-build-system)
7156 (home-page "http://pyasn1.sourceforge.net/")
7157 (synopsis "ASN.1 types and codecs")
7159 "This is an implementation of ASN.1 types and codecs in Python. It is
7160 suitable for a wide range of protocols based on the ASN.1 specification.")
7161 (license license:bsd-2)))
7163 (define-public python2-pyasn1
7164 (package-with-python2 python-pyasn1))
7166 (define-public python-pyasn1-modules
7168 (name "python-pyasn1-modules")
7173 (uri (pypi-uri "pyasn1-modules" version))
7176 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7177 (build-system python-build-system)
7179 `(("python-pyasn1" ,python-pyasn1)))
7180 (home-page "https://sourceforge.net/projects/pyasn1/")
7181 (synopsis "ASN.1 codec implementations")
7183 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7184 implementations of ASN.1-based codecs and protocols.")
7185 (license license:bsd-3)))
7187 (define-public python2-pyasn1-modules
7188 (package-with-python2 python-pyasn1-modules))
7190 (define-public python-ipaddress
7192 (name "python-ipaddress")
7196 (uri (pypi-uri "ipaddress" version))
7199 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7200 (build-system python-build-system)
7201 (home-page "https://github.com/phihag/ipaddress")
7202 (synopsis "IP address manipulation library")
7204 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7205 in Python. This library is used to create, poke at, and manipulate IPv4 and
7206 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7207 module to older versions of Python.")
7208 (license license:psfl)))
7210 (define-public python2-ipaddress
7211 (package-with-python2 python-ipaddress))
7213 (define-public python2-ipaddr
7215 (name "python2-ipaddr")
7220 (uri (pypi-uri "ipaddr" version))
7222 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7223 (build-system python-build-system)
7225 `(#:python ,python-2 ;version 2 only
7227 (modify-phases %standard-phases
7229 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7230 (home-page "https://github.com/google/ipaddr-py")
7231 (synopsis "IP address manipulation library")
7233 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7234 IPv6 addresses and networks.
7236 For new implementations you may prefer to use the standard module
7237 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7238 versions of Python.")
7239 (license license:asl2.0)))
7241 (define-public python-idna
7243 (name "python-idna")
7248 (uri (pypi-uri "idna" version))
7251 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7252 (build-system python-build-system)
7253 (home-page "https://github.com/kjd/idna")
7254 (synopsis "Internationalized domain names in applications")
7256 "This is a library to support the Internationalised Domain Names in
7257 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7258 protocol is often referred to as “IDNA2008” and can produce different results
7259 from the earlier standard from 2003. The library is also intended to act as a
7260 suitable drop-in replacement for the “encodings.idna” module that comes with
7261 the Python standard library but currently only supports the older 2003
7263 (license license:bsd-4)))
7265 (define-public python-idna-2.7
7266 (package (inherit python-idna)
7270 (uri (pypi-uri "idna" version))
7273 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7276 (define-public python2-idna
7277 (package-with-python2 python-idna))
7279 (define-public python-idna-ssl
7281 (name "python-idna-ssl")
7286 (uri (pypi-uri "idna-ssl" version))
7289 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7290 (build-system python-build-system)
7292 `(#:tests? #f)) ;circular dependency with python-aiohttp
7293 (home-page "https://github.com/aio-libs/idna-ssl")
7294 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7295 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7297 (license license:expat)))
7299 (define-public python-pretend
7301 (name "python-pretend")
7306 (uri (pypi-uri "pretend" version))
7309 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7310 (build-system python-build-system)
7311 (home-page "https://github.com/alex/pretend")
7312 (synopsis "Library for stubbing in Python")
7314 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7315 technique for writing tests. You may hear the term mixed up with mocks,
7316 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7317 responses, rather than doing any computation.")
7318 (license license:bsd-3)))
7320 (define-public python2-pretend
7321 (package-with-python2 python-pretend))
7323 (define-public python-pip
7330 (uri (pypi-uri "pip" version))
7333 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7334 (build-system python-build-system)
7336 '(#:tests? #f)) ; there are no tests in the pypi archive.
7337 (home-page "https://pip.pypa.io/")
7338 (synopsis "Package manager for Python software")
7340 "Pip is a package manager for Python software, that finds packages on the
7341 Python Package Index (PyPI).")
7342 (license license:expat)))
7344 (define-public python2-pip
7345 (package-with-python2 python-pip))
7347 (define-public python-tlsh
7349 (name "python-tlsh")
7351 (home-page "https://github.com/trendmicro/tlsh")
7356 (url "https://github.com/trendmicro/tlsh.git")
7357 (commit (string-append "v" version))))
7358 (file-name (git-file-name name version))
7360 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7361 (build-system cmake-build-system)
7363 '(#:out-of-source? #f
7364 #:phases (modify-phases %standard-phases
7367 (lambda* (#:key outputs #:allow-other-keys)
7368 ;; Build and install the Python bindings. The underlying
7369 ;; C++ library is apparently not meant to be installed.
7370 (let ((out (assoc-ref outputs "out")))
7371 (with-directory-excursion "py_ext"
7372 (and (system* "python" "setup.py" "build")
7373 (system* "python" "setup.py" "install"
7374 (string-append "--prefix=" out))))))))))
7375 (inputs `(("python" ,python-wrapper))) ;for the bindings
7376 (synopsis "Fuzzy matching library for Python")
7378 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7379 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7380 value which can be used for similarity comparisons. Similar objects have
7381 similar hash values, which allows for the detection of similar objects by
7382 comparing their hash values. The byte stream should have a sufficient amount
7383 of complexity; for example, a byte stream of identical bytes will not generate
7385 (license license:asl2.0)))
7387 (define-public python2-tlsh
7389 (inherit python-tlsh)
7390 (name "python2-tlsh")
7391 (inputs `(("python" ,python-2)))))
7393 (define-public python-termcolor
7395 (name "python-termcolor")
7400 (uri (pypi-uri "termcolor" version))
7403 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7404 (build-system python-build-system)
7406 ;; There are no tests.
7408 (home-page "https://pypi.python.org/pypi/termcolor")
7409 (synopsis "ANSII Color formatting for terminal output")
7411 "This package provides ANSII Color formatting for output in terminals.")
7412 (license license:expat)))
7414 (define-public python2-termcolor
7415 (package-with-python2 python-termcolor))
7417 (define-public python-libarchive-c
7419 (name "python-libarchive-c")
7423 (uri (pypi-uri "libarchive-c" version))
7426 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7427 (build-system python-build-system)
7429 '(#:phases (modify-phases %standard-phases
7431 'build 'reference-libarchive
7432 (lambda* (#:key inputs #:allow-other-keys)
7433 ;; Retain the absolute file name of libarchive.so.
7434 (let ((libarchive (assoc-ref inputs "libarchive")))
7435 (substitute* "libarchive/ffi.py"
7436 (("find_library\\('archive'\\)")
7437 (string-append "'" libarchive
7438 "/lib/libarchive.so'"))))))
7440 (lambda _ (invoke "pytest" "-vv"))))))
7442 `(("python-mock" ,python-mock)
7443 ("python-pytest" ,python-pytest)))
7445 `(("libarchive" ,libarchive)))
7446 (home-page "https://github.com/Changaco/python-libarchive-c")
7447 (synopsis "Python interface to libarchive")
7449 "This package provides Python bindings to libarchive, a C library to
7450 access possibly compressed archives in many different formats. It uses
7451 Python's @code{ctypes} foreign function interface (FFI).")
7452 (license license:lgpl2.0+)))
7454 (define-public python2-libarchive-c
7455 (package-with-python2 python-libarchive-c))
7457 (define-public python-file
7460 (name "python-file")
7461 (build-system python-build-system)
7463 '(#:tests? #f ;no tests
7464 #:configure-flags '("--single-version-externally-managed" "--root=/")
7465 #:phases (modify-phases %standard-phases
7466 (add-before 'build 'change-directory
7470 (add-before 'build 'set-library-file-name
7471 (lambda* (#:key inputs #:allow-other-keys)
7472 (let ((file (assoc-ref inputs "file")))
7473 (substitute* "magic.py"
7474 (("find_library\\('magic'\\)")
7475 (string-append "'" file "/lib/libmagic.so'")))
7477 (inputs `(("file" ,file)))
7478 (native-inputs (if (%current-target-system)
7479 `(("self" ,this-package))
7481 (synopsis "Python bindings to the libmagic file type guesser. Note that
7482 this module and the python-magic module both provide a \"magic.py\" file;
7483 these two modules, which are different and were developed separately, both
7484 serve the same purpose: provide Python bindings for libmagic.")))
7486 (define-public python2-file
7487 (package-with-python2 python-file))
7489 (define-public python-debian
7491 (name "python-debian")
7492 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7497 (uri (pypi-uri name version))
7500 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7501 (build-system python-build-system)
7503 `(("python-six" ,python-six)))
7504 (synopsis "Debian package related modules")
7506 ;; XXX: Use @enumerate instead of @itemize to work around
7507 ;; <http://bugs.gnu.org/21772>.
7508 "This package provides Python modules that abstract many formats of
7509 Debian-related files, such as:
7512 @item Debtags information;
7513 @item @file{debian/changelog} files;
7514 @item packages files, pdiffs;
7515 @item control files of single or multiple RFC822-style paragraphs---e.g.
7516 @file{debian/control}, @file{.changes}, @file{.dsc};
7517 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7518 contained files and meta-information.
7521 ;; Modules are either GPLv2+ or GPLv3+.
7522 (license license:gpl3+)))
7524 (define-public python2-debian
7525 (package-with-python2 python-debian))
7527 (define-public python-nbformat
7529 (name "python-nbformat")
7534 (uri (pypi-uri "nbformat" version))
7537 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7538 (build-system python-build-system)
7539 (arguments `(#:tests? #f)) ; no test target
7541 `(("python-ipython-genutils" ,python-ipython-genutils)
7542 ("python-jsonschema" ,python-jsonschema)
7543 ("python-jupyter-core" ,python-jupyter-core)
7544 ("python-traitlets" ,python-traitlets)))
7545 (home-page "http://jupyter.org")
7546 (synopsis "Jupyter Notebook format")
7547 (description "This package provides the reference implementation of the
7548 Jupyter Notebook format and Python APIs for working with notebooks.")
7549 (license license:bsd-3)))
7551 (define-public python2-nbformat
7552 (package-with-python2 python-nbformat))
7554 (define-public python-bleach
7556 (name "python-bleach")
7561 (uri (pypi-uri "bleach" version))
7564 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7565 (build-system python-build-system)
7567 `(("python-html5lib" ,python-html5lib-0.9)
7568 ("python-six" ,python-six)))
7570 `(("python-nose" ,python-nose)))
7571 (home-page "https://github.com/jsocol/bleach")
7572 (synopsis "Whitelist-based HTML-sanitizing tool")
7573 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7574 (license license:asl2.0)))
7576 (define-public python2-bleach
7577 (package-with-python2 python-bleach))
7579 (define-public python-entrypoints
7581 (name "python-entrypoints")
7586 (uri (pypi-uri "entrypoints" version))
7589 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7590 (build-system python-build-system)
7591 ;; The package does not come with a setup.py file, so we have to generate
7596 (modify-phases %standard-phases
7597 (add-after 'unpack 'create-setup.py
7599 (call-with-output-file "setup.py"
7602 from setuptools import setup
7603 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7605 (home-page "https://github.com/takluyver/entrypoints")
7606 (synopsis "Discover and load entry points from installed Python packages")
7607 (description "Entry points are a way for Python packages to advertise
7608 objects with some common interface. The most common examples are
7609 @code{console_scripts} entry points, which define shell commands by
7610 identifying a Python function to run. The @code{entrypoints} module contains
7611 functions to find and load entry points.")
7612 (license license:expat)))
7614 (define-public python2-entrypoints
7615 (package-with-python2 python-entrypoints))
7617 (define-public python-nbconvert
7619 (name "python-nbconvert")
7624 (uri (pypi-uri "nbconvert" version))
7627 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7628 (build-system python-build-system)
7630 `(;; The "bdist_egg" target is disabled by default, causing the installation
7632 #:configure-flags (list "bdist_egg")
7633 ;; FIXME: 5 failures, 40 errors.
7636 ;; (modify-phases %standard-phases
7639 ;; (zero? (system* "py.test" "-v")))))
7641 `(("python-pytest" ,python-pytest)))
7643 `(("python-bleach" ,python-bleach)
7644 ("python-entrypoints" ,python-entrypoints)
7645 ("python-jinja2" ,python-jinja2)
7646 ("python-jupyter-core" ,python-jupyter-core)
7647 ("python-mistune" ,python-mistune)
7648 ("python-nbformat" ,python-nbformat)
7649 ("python-pygments" ,python-pygments)
7650 ("python-traitlets" ,python-traitlets)))
7651 (home-page "http://jupyter.org")
7652 (synopsis "Converting Jupyter Notebooks")
7653 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7654 notebooks to various other formats via Jinja templates. It allows you to
7655 convert an @code{.ipynb} notebook file into various static formats including:
7663 @item ReStructured Text (rst)
7664 @item executable script
7666 (license license:bsd-3)))
7668 (define-public python2-nbconvert
7669 (package-with-python2 python-nbconvert))
7671 (define-public python-notebook
7673 (name "python-notebook")
7677 (uri (pypi-uri "notebook" version))
7680 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7681 (build-system python-build-system)
7684 (modify-phases %standard-phases
7687 ;; These tests require a browser
7688 (delete-file-recursively "notebook/tests/selenium")
7689 ;; Some tests need HOME
7690 (setenv "HOME" "/tmp")
7691 ;; This file contains "warningfilters", which are not supported
7692 ;; by this version of nose.
7693 (delete-file "setup.cfg")
7694 (with-directory-excursion "/tmp"
7695 (invoke "nosetests" "-v"))
7698 `(("python-jupyter-core" ,python-jupyter-core)
7699 ("python-nbformat" ,python-nbformat)
7700 ("python-nbconvert" ,python-nbconvert)
7701 ("python-prometheus-client" ,python-prometheus-client)
7702 ("python-send2trash" ,python-send2trash)
7703 ("python-terminado" ,python-terminado)))
7705 `(("python-nose" ,python-nose)
7706 ("python-sphinx" ,python-sphinx)
7707 ("python-requests" ,python-requests)))
7708 (home-page "http://jupyter.org/")
7709 (synopsis "Web-based notebook environment for interactive computing")
7711 "The Jupyter HTML notebook is a web-based notebook environment for
7712 interactive computing.")
7713 (properties `((python2-variant . ,(delay python2-notebook))))
7714 (license license:bsd-3)))
7716 (define-public python2-notebook
7717 (let ((base (package-with-python2
7718 (strip-python2-variant python-notebook))))
7719 (package (inherit base)
7721 `(("python2-mock" ,python2-mock)
7722 ,@(package-native-inputs base)))
7724 (substitute-keyword-arguments (package-arguments base)
7726 `(modify-phases ,phases
7727 (add-before 'check 'disable-test-case
7728 ;; The test requires network access to localhost. Curiously it
7729 ;; fails with Python 2 only. Simply make the test-case return
7733 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7734 (("formats = self.nbconvert_api") "return #")))))))))))
7736 (define-public python-widgetsnbextension
7738 (name "python-widgetsnbextension")
7743 (uri (pypi-uri "widgetsnbextension" version))
7746 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7747 (build-system python-build-system)
7749 `(("python-ipykernel" ,python-ipykernel)
7750 ("python-notebook" ,python-notebook)))
7752 `(("python-certifi" ,python-certifi)
7753 ("python-nose" ,python-nose)))
7754 (home-page "https://ipython.org")
7755 (synopsis "IPython HTML widgets for Jupyter")
7756 (description "This package provides interactive HTML widgets for Jupyter
7758 (license license:bsd-3)))
7760 (define-public python2-widgetsnbextension
7761 (package-with-python2 python-widgetsnbextension))
7763 (define-public python-ipywidgets
7765 (name "python-ipywidgets")
7770 (uri (pypi-uri "ipywidgets" version))
7773 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7774 (build-system python-build-system)
7776 `(("python-ipython" ,python-ipython)
7777 ("python-traitlets" ,python-traitlets)
7778 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7780 `(("python-nose" ,python-nose)
7781 ("python-pytest" ,python-pytest)))
7782 (home-page "https://ipython.org")
7783 (synopsis "IPython HTML widgets for Jupyter")
7784 (description "Ipywidgets are interactive HTML widgets for Jupyter
7785 notebooks and the IPython kernel. Notebooks come alive when interactive
7786 widgets are used. Users gain control of their data and can visualize changes
7788 (license license:bsd-3)))
7790 (define-public python2-ipywidgets
7791 (package-with-python2 python-ipywidgets))
7793 (define-public python-jupyter-console
7795 (name "python-jupyter-console")
7800 (uri (pypi-uri "jupyter_console" version))
7803 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7804 (build-system python-build-system)
7806 `(("python-ipykernel" ,python-ipykernel)
7807 ("python-jupyter-client" ,python-jupyter-client)
7808 ("python-prompt-toolkit" ,python-prompt-toolkit)
7809 ("python-pygments" ,python-pygments)))
7811 `(("python-nose" ,python-nose)))
7812 (home-page "https://jupyter.org")
7813 (synopsis "Jupyter terminal console")
7814 (description "This package provides a terminal-based console frontend for
7815 Jupyter kernels. It also allows for console-based interaction with non-Python
7816 Jupyter kernels such as IJulia and IRKernel.")
7817 (license license:bsd-3)))
7819 (define-public python2-jupyter-console
7821 (name "python2-jupyter-console")
7826 (uri (pypi-uri "jupyter_console" version))
7829 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7830 (build-system python-build-system)
7831 ;; Tests only run in an TTY.
7832 (arguments `(#:tests? #f))
7834 `(("python2-ipykernel" ,python2-ipykernel)
7835 ("python2-jupyter-client" ,python2-jupyter-client)
7836 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7837 ("python2-pygments" ,python2-pygments)))
7839 `(("python2-nose" ,python2-nose)))
7840 (home-page "https://jupyter.org")
7841 (synopsis "Jupyter terminal console")
7842 (description "This package provides a terminal-based console frontend for
7843 Jupyter kernels. It also allows for console-based interaction with non-Python
7844 Jupyter kernels such as IJulia and IRKernel.")
7845 (license license:bsd-3)))
7847 ;; The python-ipython and python-jupyter-console require each other. To get
7848 ;; the functionality in both packages working, strip down the
7849 ;; python-jupyter-console package when using it as an input to python-ipython.
7850 (define python-jupyter-console-minimal
7852 (inherit python-jupyter-console)
7853 (name "python-jupyter-console-minimal")
7855 (substitute-keyword-arguments
7856 (package-arguments python-jupyter-console)
7858 `(modify-phases ,phases
7859 (add-after 'install 'delete-bin
7860 (lambda* (#:key outputs #:allow-other-keys)
7861 ;; Delete the bin files, to avoid conflicts in profiles
7862 ;; where python-ipython and python-jupyter-console are
7864 (delete-file-recursively
7866 (assoc-ref outputs "out") "/bin"))))))))
7867 ;; Remove the python-ipython propagated input, to avoid the cycle
7871 (package-propagated-inputs python-jupyter-console)))))
7873 (define-public python-qtconsole
7875 (name "python-qtconsole")
7880 (uri (pypi-uri "qtconsole" version))
7883 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7884 (build-system python-build-system)
7886 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7887 ;; but we only have the LTS version 5.x. This means that there might be
7888 ;; runtime errors, but since this is a dependency of the Jupyter package,
7889 ;; and Jupyter can be used without the qtconsole we can overlook this for
7893 (modify-phases %standard-phases
7894 (add-before 'check 'pre-check
7896 (setenv "QT_QPA_PLATFORM" "offscreen")
7899 `(("python-ipykernel" ,python-ipykernel)
7900 ("python-ipython" ,python-ipython)))
7902 `(("python-pytest" ,python-pytest)))
7903 (home-page "http://jupyter.org")
7904 (synopsis "Jupyter Qt console")
7905 (description "This package provides a Qt-based console for Jupyter with
7906 support for rich media output.")
7907 (license license:bsd-3)))
7909 (define-public jupyter
7916 (uri (pypi-uri "jupyter" version))
7919 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7920 (build-system python-build-system)
7921 (arguments '(#:tests? #f)) ; there are none.
7923 `(("python-ipykernel" ,python-ipykernel)
7924 ("python-ipywidgets" ,python-ipywidgets)
7925 ("python-jupyter-console" ,python-jupyter-console)
7926 ("python-nbconvert" ,python-nbconvert)
7927 ("python-notebook" ,python-notebook)
7928 ("python-qtconsole" ,python-qtconsole)))
7929 (native-search-paths
7930 (list (search-path-specification
7931 (variable "JUPYTER_PATH")
7932 (files '("share/jupyter")))))
7933 (home-page "https://jupyter.org")
7934 (synopsis "Web application for interactive documents")
7936 "The Jupyter Notebook is a web application that allows you to create and
7937 share documents that contain live code, equations, visualizations and
7938 explanatory text. Uses include: data cleaning and transformation, numerical
7939 simulation, statistical modeling, machine learning and much more.")
7940 (license license:bsd-3)))
7942 (define-public python-chardet
7944 (name "python-chardet")
7949 (uri (pypi-uri "chardet" version))
7952 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7954 `(("python-hypothesis" ,python-hypothesis)
7955 ("python-pytest" ,python-pytest)
7956 ("python-pytest-runner" ,python-pytest-runner)))
7957 (build-system python-build-system)
7958 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7959 (arguments `(#:tests? #f))
7960 (home-page "https://github.com/chardet/chardet")
7961 (synopsis "Universal encoding detector for Python 2 and 3")
7963 "This package provides @code{chardet}, a Python module that can
7964 automatically detect a wide range of file encodings.")
7965 (license license:lgpl2.1+)))
7967 (define-public python2-chardet
7968 (package-with-python2 python-chardet))
7970 (define-public python-docopt
7972 (name "python-docopt")
7977 ;; The release on PyPI does not include tests.
7979 "https://github.com/docopt/docopt/archive/"
7981 (file-name (string-append name "-" version ".tar.gz"))
7984 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7985 (build-system python-build-system)
7987 `(("python-pytest" ,python-pytest)))
7990 (modify-phases %standard-phases
7992 (lambda _ (invoke "py.test"))))))
7993 (home-page "http://docopt.org")
7994 (synopsis "Command-line interface description language for Python")
7995 (description "This library allows the user to define a command-line
7996 interface from a program's help message rather than specifying it
7997 programmatically with command-line parsers like @code{getopt} and
7999 (license license:expat)))
8001 (define-public python2-docopt
8002 (package-with-python2 python-docopt))
8004 (define-public python-pythondialog
8006 (name "python-pythondialog")
8011 (uri (pypi-uri "pythondialog" version))
8014 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8015 (build-system python-build-system)
8018 (modify-phases %standard-phases
8019 (add-after 'unpack 'patch-path
8020 (lambda* (#:key inputs #:allow-other-keys)
8021 (let* ((dialog (assoc-ref inputs "dialog")))
8022 ;; Since this library really wants to grovel the search path, we
8023 ;; must hardcode dialog's store path into it.
8024 (substitute* "dialog.py"
8025 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8026 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8028 #:tests? #f)) ; no test suite
8030 `(("dialog" ,dialog)))
8031 (home-page "http://pythondialog.sourceforge.net/")
8032 (synopsis "Python interface to the UNIX dialog utility")
8033 (description "A Python wrapper for the dialog utility. Its purpose is to
8034 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8035 This allows one to make simple text-mode user interfaces on Unix-like systems")
8036 (license license:lgpl2.1)
8037 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8039 (define-public python2-pythondialog
8040 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8043 (version (package-version python-pythondialog))
8046 (uri (pypi-uri "python2-pythondialog" version))
8049 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8051 (define-public python-configobj
8053 (name "python-configobj")
8057 (uri (pypi-uri "configobj" version))
8060 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8061 ;; Patch setup.py so it looks for python-setuptools, which is
8062 ;; required to parse the keyword 'install_requires' in setup.py.
8063 (patches (search-patches "python-configobj-setuptools.patch"))))
8064 (build-system python-build-system)
8066 `(("python-six" ,python-six)))
8067 (synopsis "Config file reading, writing and validation")
8068 (description "ConfigObj is a simple but powerful config file reader and
8069 writer: an ini file round tripper. Its main feature is that it is very easy to
8070 use, with a straightforward programmer’s interface and a simple syntax for
8072 (home-page "https://github.com/DiffSK/configobj")
8073 (license license:bsd-3)))
8075 (define-public python2-configobj
8076 (package-with-python2 python-configobj))
8078 (define-public python-configargparse
8080 (name "python-configargparse")
8084 (uri (pypi-uri "ConfigArgParse" version))
8087 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8088 (build-system python-build-system)
8090 `(("python-pyyaml" ,python-pyyaml)))
8093 (modify-phases %standard-phases
8096 ;; Bypass setuptools-shim because one test relies on "setup.py"
8097 ;; being the first argument passed to the python call.
8099 ;; NOTE: Many tests do not run because they rely on Python's
8100 ;; built-in test.test_argparse, but we remove the unit tests from
8101 ;; our Python installation.
8102 (invoke "python" "setup.py" "test"))))))
8103 (synopsis "Replacement for argparse")
8104 (description "A drop-in replacement for argparse that allows options to also
8105 be set via config files and/or environment variables.")
8106 (home-page "https://github.com/bw2/ConfigArgParse")
8107 (license license:expat)))
8109 (define-public python2-configargparse
8110 (package-with-python2 python-configargparse))
8112 (define-public python-argparse-manpage
8114 (name "python-argparse-manpage")
8119 (uri (pypi-uri "argparse-manpage" version))
8122 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8123 (build-system python-build-system)
8124 (home-page "https://github.com/praiskup/argparse-manpage")
8125 (synopsis "Build manual page from Python's ArgumentParser object")
8127 "This package provides tools to build manual pages from Python's
8128 @code{ArgumentParser} object.")
8129 (license license:asl2.0)))
8131 (define-public python-contextlib2
8133 (name "python-contextlib2")
8138 (uri (pypi-uri "contextlib2" version))
8141 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8142 (build-system python-build-system)
8143 (home-page "http://contextlib2.readthedocs.org/")
8144 (synopsis "Tools for decorators and context managers")
8145 (description "This module is primarily a backport of the Python
8146 3.2 contextlib to earlier Python versions. Like contextlib, it
8147 provides utilities for common tasks involving decorators and context
8148 managers. It also contains additional features that are not part of
8149 the standard library.")
8150 (license license:psfl)))
8152 (define-public python2-contextlib2
8154 (name "python2-contextlib2")
8159 (uri (pypi-uri "contextlib2" version))
8162 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8163 (build-system python-build-system)
8165 `(#:python ,python-2
8167 (modify-phases %standard-phases
8169 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8171 `(("python2-unittest2" ,python2-unittest2)))
8172 (home-page "http://contextlib2.readthedocs.org/")
8173 (synopsis "Tools for decorators and context managers")
8174 (description "This module is primarily a backport of the Python
8175 3.2 contextlib to earlier Python versions. Like contextlib, it
8176 provides utilities for common tasks involving decorators and context
8177 managers. It also contains additional features that are not part of
8178 the standard library.")
8179 (license license:psfl)))
8181 (define-public python-texttable
8183 (name "python-texttable")
8188 (uri (pypi-uri "texttable" version))
8191 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8192 (build-system python-build-system)
8193 (arguments '(#:tests? #f)) ; no tests
8194 (home-page "https://github.com/foutaise/texttable/")
8195 (synopsis "Python module for creating simple ASCII tables")
8196 (description "Texttable is a Python module for creating simple ASCII
8198 (license license:lgpl2.1+)))
8200 (define-public python2-texttable
8201 (package-with-python2 python-texttable))
8203 (define-public python-atomicwrites
8205 (name "python-atomicwrites")
8209 (uri (pypi-uri "atomicwrites" version))
8212 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8213 (build-system python-build-system)
8214 (synopsis "Atomic file writes in Python")
8215 (description "Library for atomic file writes using platform dependent tools
8216 for atomic file system operations.")
8217 (home-page "https://github.com/untitaker/python-atomicwrites")
8218 (license license:expat)))
8220 (define-public python2-atomicwrites
8221 (package-with-python2 python-atomicwrites))
8223 (define-public python-click-threading
8225 (name "python-click-threading")
8229 (uri (pypi-uri "click-threading" version))
8232 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8233 (build-system python-build-system)
8235 `(("python-click" ,python-click)))
8236 (synopsis "Utilities for multithreading in Click")
8237 (description "This package provides utilities for multithreading in Click
8239 (home-page "https://github.com/click-contrib/click-threading")
8240 (license license:expat)))
8242 (define-public python-click-log
8244 (name "python-click-log")
8248 (uri (pypi-uri "click-log" version))
8251 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8252 (build-system python-build-system)
8254 `(("python-click" ,python-click)))
8255 (synopsis "Logging for click applications")
8256 (description "This package provides a Python library for logging Click
8258 (home-page "https://github.com/click-contrib/click-log")
8259 (license license:expat)))
8261 (define-public python-apipkg
8263 (name "python-apipkg")
8267 (uri (pypi-uri "apipkg" version))
8270 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8271 (build-system python-build-system)
8273 `(("python-pytest" ,python-pytest)))
8274 (synopsis "Namespace control and lazy-import mechanism")
8275 (description "With apipkg you can control the exported namespace of a Python
8276 package and greatly reduce the number of imports for your users. It is a small
8277 pure Python module that works on virtually all Python versions.")
8278 (home-page "https://github.com/pytest-dev/apipkg")
8279 (license license:expat)))
8281 (define-public python2-apipkg
8282 (package-with-python2 python-apipkg))
8284 (define-public python-execnet
8286 (name "python-execnet")
8290 (uri (pypi-uri "execnet" version))
8293 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8294 (build-system python-build-system)
8296 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8297 ;; The two test failures are caused by the lack of an `ssh` executable.
8298 ;; The test suite can be run with pytest after the 'install' phase.
8301 `(("python-pytest" ,python-pytest)
8302 ("python-setuptools-scm" ,python-setuptools-scm)))
8304 `(("python-apipkg" ,python-apipkg)))
8305 (synopsis "Rapid multi-Python deployment")
8306 (description "Execnet provides a share-nothing model with
8307 channel-send/receive communication for distributing execution across many
8308 Python interpreters across version, platform and network barriers. It has a
8309 minimal and fast API targeting the following uses:
8311 @item distribute tasks to (many) local or remote CPUs
8312 @item write and deploy hybrid multi-process applications
8313 @item write scripts to administer multiple environments
8315 (home-page "http://codespeak.net/execnet/")
8316 (license license:expat)))
8318 (define-public python2-execnet
8319 (package-with-python2 python-execnet))
8321 (define-public python-icalendar
8323 (name "python-icalendar")
8327 (uri (pypi-uri "icalendar" version))
8330 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8331 (build-system python-build-system)
8333 `(("python-dateutil" ,python-dateutil)
8334 ("python-pytz" ,python-pytz)))
8335 (synopsis "Python library for parsing iCalendar files")
8336 (description "The icalendar package is a parser/generator of iCalendar
8337 files for use with Python.")
8338 (home-page "https://github.com/collective/icalendar")
8339 (license license:bsd-2)))
8341 (define-public python-args
8343 (name "python-args")
8347 (uri (pypi-uri "args" version))
8350 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8351 (build-system python-build-system)
8352 (home-page "https://github.com/kennethreitz/args")
8353 (synopsis "Command-line argument parser")
8355 "This library provides a Python module to parse command-line arguments.")
8356 (license license:bsd-3)))
8358 (define-public python2-args
8359 (package-with-python2 python-args))
8361 (define-public python-clint
8363 (name "python-clint")
8367 (uri (pypi-uri "clint" version))
8370 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8371 (build-system python-build-system)
8374 (modify-phases %standard-phases
8376 (lambda _ (invoke "py.test" "-v"))))))
8378 `(("python-pytest" ,python-pytest)))
8380 `(("python-args" ,python-args)))
8381 (home-page "https://github.com/kennethreitz/clint")
8382 (synopsis "Command-line interface tools")
8384 "Clint is a Python module filled with a set of tools for developing
8385 command-line applications, including tools for colored and indented
8386 output, progress bar display, and pipes.")
8387 (license license:isc)))
8389 (define-public python2-clint
8390 (package-with-python2 python-clint))
8392 (define-public python-rply
8394 (name "python-rply")
8398 (uri (pypi-uri "rply" version))
8401 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8402 (build-system python-build-system)
8404 `(("python-appdirs" ,python-appdirs)))
8405 (home-page "https://github.com/alex/rply")
8406 (synopsis "Parser generator for Python")
8408 "This package provides a pure Python based parser generator, that also
8409 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8410 with a new public API, and RPython support.")
8411 (license license:bsd-3)))
8413 (define-public python2-rply
8414 (package-with-python2 python-rply))
8416 (define-public python-hy
8422 (uri (pypi-uri "hy" version))
8425 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8426 (build-system python-build-system)
8429 (modify-phases %standard-phases
8432 ;; Tests require write access to HOME.
8433 (setenv "HOME" "/tmp")
8434 (invoke "nosetests"))))))
8436 `(("python-coverage" ,python-coverage)
8437 ("python-nose" ,python-nose)))
8439 `(("python-astor" ,python-astor)
8440 ("python-clint" ,python-clint)
8441 ("python-rply" ,python-rply)))
8442 (home-page "http://hylang.org/")
8443 (synopsis "Lisp frontend to Python")
8445 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8446 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8447 Python at your fingertips, in Lisp form.")
8448 (license license:expat)))
8450 (define-public python2-hy
8451 (package-with-python2 python-hy))
8453 (define-public python2-functools32
8455 (name "python2-functools32")
8460 (uri (pypi-uri "functools32" version))
8463 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8464 (build-system python-build-system)
8466 `(#:python ,python-2
8467 #:tests? #f)) ; no test target
8468 (home-page "https://github.com/MiCHiLU/python-functools32")
8470 "Backport of the functools module from Python 3.2.3")
8472 "This package is a backport of the @code{functools} module from Python
8473 3.2.3 for use with older versions of Python and PyPy.")
8474 (license license:expat)))
8476 (define-public python2-subprocess32
8478 (name "python2-subprocess32")
8482 (uri (pypi-uri "subprocess32" version))
8485 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8487 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8488 (build-system python-build-system)
8490 `(#:python ,python-2
8491 ;; The test suite fails with Python > 2.7.13:
8492 ;; import test.support
8493 ;; ImportError: No module named support
8496 (modify-phases %standard-phases
8497 (add-after 'unpack 'patch-/bin/sh
8499 (substitute* '("subprocess32.py"
8500 "test_subprocess32.py")
8501 (("/bin/sh") (which "sh")))
8503 (home-page "https://github.com/google/python-subprocess32")
8504 (synopsis "Backport of the subprocess module from Python 3.2")
8506 "This is a backport of the @code{subprocess} standard library module
8507 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8508 new features. On POSIX systems it is guaranteed to be reliable when used
8509 in threaded applications. It includes timeout support from Python 3.3 but
8510 otherwise matches 3.2’s API.")
8511 (license license:psfl)))
8513 (define-public python2-futures
8515 (name "python2-futures")
8520 (uri (pypi-uri "futures" version))
8523 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8524 (build-system python-build-system)
8526 `(#:python ,python-2
8528 (modify-phases %standard-phases
8531 (invoke "python" "test_futures.py")
8533 (home-page "https://github.com/agronholm/pythonfutures")
8535 "Backport of the concurrent.futures package from Python 3.2")
8537 "The concurrent.futures module provides a high-level interface for
8538 asynchronously executing callables. This package backports the
8539 concurrent.futures package from Python 3.2")
8540 (license license:bsd-3)))
8542 (define-public python-promise
8544 (name "python-promise")
8549 (uri (pypi-uri "promise" version))
8552 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8553 (build-system python-build-system)
8554 ;; Tests wants python-futures, which is a python2 only program, and
8555 ;; can't be found by python-promise at test time.
8556 (arguments `(#:tests? #f))
8557 (home-page "https://github.com/syrusakbary/promise")
8558 (synopsis "Promises/A+ implementation for Python")
8560 "Promises/A+ implementation for Python")
8561 (properties `((python2-variant . ,(delay python2-promise))))
8562 (license license:expat)))
8564 (define-public python2-promise
8565 (let ((promise (package-with-python2
8566 (strip-python2-variant python-promise))))
8567 (package (inherit promise)
8568 (arguments (substitute-keyword-arguments (package-arguments promise)
8571 `(("python2-futures" ,python2-futures)
8572 ("python2-pytest" ,python2-pytest)
8573 ,@(package-native-inputs promise))))))
8575 (define-public python-progressbar33
8577 (name "python-progressbar33")
8582 (uri (pypi-uri "progressbar33" version))
8585 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8586 (build-system python-build-system)
8587 (home-page "http://github.com/germangh/python-progressbar")
8588 (synopsis "Text progress bar library for Python")
8590 "This package provides a text progress bar library for Python. This
8591 version only differs from the original @code{progressbar} package in that it
8592 uses relative package imports instead of absolute imports, which is necessary
8593 for the module to work under Python 3.3.")
8594 ;; Either or both of these licenses may be selected.
8595 (license (list license:lgpl2.1+ license:bsd-3))))
8597 (define-public python-colorama
8599 (name "python-colorama")
8604 (uri (pypi-uri "colorama" version))
8607 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8608 (build-system python-build-system)
8609 (synopsis "Colored terminal text rendering for Python")
8610 (description "Colorama is a Python library for rendering colored terminal
8612 (home-page "https://pypi.python.org/pypi/colorama")
8613 (license license:bsd-3)))
8615 (define-public python2-colorama
8616 (package-with-python2 python-colorama))
8618 (define-public python-rsa
8625 (uri (pypi-uri "rsa" version))
8628 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8629 (build-system python-build-system)
8631 `(("python-pyasn1" ,python-pyasn1)))
8632 (synopsis "Pure-Python RSA implementation")
8633 (description "Python-RSA is a pure-Python RSA implementation. It supports
8634 encryption and decryption, signing and verifying signatures, and key
8635 generation according to PKCS#1 version 1.5. It can be used as a Python
8636 library as well as on the command line.")
8637 (home-page "https://stuvel.eu/rsa")
8638 (license license:asl2.0)))
8640 (define-public python2-rsa
8641 (package-with-python2 python-rsa))
8643 (define-public python-pluggy
8645 (name "python-pluggy")
8650 (uri (pypi-uri "pluggy" version))
8653 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8654 (build-system python-build-system)
8656 `(("python-setuptools-scm" ,python-setuptools-scm)))
8657 (synopsis "Plugin and hook calling mechanism for Python")
8658 (description "Pluggy is an extraction of the plugin manager as used by
8659 Pytest but stripped of Pytest specific details.")
8660 (home-page "https://pypi.python.org/pypi/pluggy")
8661 (license license:expat)))
8663 (define-public python2-pluggy
8664 (package-with-python2 python-pluggy))
8666 (define-public python-tox
8673 (uri (pypi-uri "tox" version))
8676 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8677 (build-system python-build-system)
8679 ;; FIXME: Tests require pytest-timeout, which itself requires
8680 ;; pytest>=2.8.0 for installation.
8683 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8684 ("python-py" ,python-py)
8685 ("python-virtualenv" ,python-virtualenv)))
8687 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8688 ("python-pytest" ,python-pytest) ; >= 2.3.5
8689 ("python-setuptools-scm" ,python-setuptools-scm)))
8690 (home-page "http://tox.testrun.org/")
8691 (synopsis "Virtualenv-based automation of test activities")
8692 (description "Tox is a generic virtualenv management and test command line
8693 tool. It can be used to check that a package installs correctly with
8694 different Python versions and interpreters, or run tests in each type of
8695 supported environment, or act as a frontend to continuous integration
8697 (license license:expat)))
8699 (define-public python2-tox
8700 (package-with-python2 python-tox))
8702 (define-public python-jmespath
8704 (name "python-jmespath")
8709 (uri (pypi-uri "jmespath" version))
8712 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8713 (build-system python-build-system)
8715 `(("python-nose" ,python-nose)))
8716 (synopsis "JSON Matching Expressions")
8717 (description "JMESPath (pronounced “james path”) is a Python library that
8718 allows one to declaratively specify how to extract elements from a JSON
8720 (home-page "https://github.com/jmespath/jmespath.py")
8721 (license license:expat)))
8723 (define-public python2-jmespath
8724 (package-with-python2 python-jmespath))
8726 (define-public python-botocore
8728 (name "python-botocore")
8729 (version "1.12.149")
8733 (uri (pypi-uri "botocore" version))
8736 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8737 (build-system python-build-system)
8739 ;; FIXME: Many tests are failing.
8742 `(("python-dateutil" ,python-dateutil)
8743 ("python-docutils" ,python-docutils)
8744 ("python-jmespath" ,python-jmespath)))
8746 `(("python-mock" ,python-mock)
8747 ("python-nose" ,python-nose)
8749 ("python-tox" ,python-tox)
8750 ("python-urllib3" ,python-urllib3)
8751 ("python-wheel" ,python-wheel)))
8752 (home-page "https://github.com/boto/botocore")
8753 (synopsis "Low-level interface to AWS")
8754 (description "Botocore is a Python library that provides a low-level
8755 interface to the Amazon Web Services (AWS) API.")
8756 (license license:asl2.0)))
8758 (define-public python2-botocore
8759 (package-with-python2 python-botocore))
8761 (define-public python-xdo
8768 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8769 "python-xdo_" version ".orig.tar.gz"))
8772 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8773 (build-system python-build-system)
8776 (modify-phases %standard-phases
8777 (add-before 'install 'patch-libxdo-path
8778 ;; Hardcode the path of dynamically loaded libxdo library.
8779 (lambda* (#:key inputs #:allow-other-keys)
8780 (let ((libxdo (string-append
8781 (assoc-ref inputs "xdotool")
8783 (substitute* "xdo/_xdo.py"
8784 (("find_library\\(\"xdo\"\\)")
8785 (simple-format #f "\"~a\"" libxdo)))
8787 #:tests? #f)) ; no tests provided
8789 `(("python-six" ,python-six)))
8791 `(("xdotool" ,xdotool)
8792 ("libX11" ,libx11)))
8793 (home-page "https://tracker.debian.org/pkg/python-xdo")
8794 (synopsis "Python library for simulating X11 keyboard/mouse input")
8795 (description "Provides bindings to libxdo for manipulating X11 via simulated
8796 input. (Note that this is mostly a legacy library; you may wish to look at
8797 python-xdo for newer bindings.)")
8798 (license license:bsd-3)))
8800 (define-public python2-xdo
8801 (package-with-python2 python-xdo))
8803 (define-public python-mako
8805 (name "python-mako")
8810 (uri (pypi-uri "Mako" version))
8813 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8814 (build-system python-build-system)
8816 `(#:phases (modify-phases %standard-phases
8819 (invoke "pytest" "-vv"))))))
8821 `(("python-markupsafe" ,python-markupsafe)))
8823 `(("python-mock" ,python-mock)
8824 ("python-pytest" ,python-pytest)))
8825 (home-page "https://www.makotemplates.org/")
8826 (synopsis "Templating language for Python")
8827 (description "Mako is a templating language for Python that compiles
8828 templates into Python modules.")
8829 (license license:expat)))
8831 (define-public python2-mako
8832 (package-with-python2 python-mako))
8834 (define-public python-waitress
8836 (name "python-waitress")
8841 (uri (pypi-uri "waitress" version))
8842 (patches (search-patches "python-waitress-fix-tests.patch"))
8845 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8846 (build-system python-build-system)
8847 (home-page "https://github.com/Pylons/waitress")
8848 (synopsis "Waitress WSGI server")
8849 (description "Waitress is meant to be a production-quality pure-Python WSGI
8850 server with very acceptable performance.")
8851 (license license:zpl2.1)))
8853 (define-public python2-waitress
8854 (package-with-python2 python-waitress))
8856 (define-public python-pyquery
8858 (name "python-pyquery")
8863 (uri (pypi-uri "pyquery" version))
8866 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8867 (build-system python-build-system)
8869 `(("python-webob" ,python-webob)
8870 ("python-webtest" ,python-webtest)))
8872 `(("python-lxml" ,python-lxml)
8873 ("python-cssselect" ,python-cssselect)))
8874 (home-page "https://github.com/gawel/pyquery")
8875 (synopsis "Make jQuery-like queries on xml documents")
8876 (description "pyquery allows you to make jQuery queries on xml documents.
8877 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8878 fast xml and html manipulation.")
8879 (license license:bsd-3)))
8881 (define-public python-anyjson
8883 (name "python-anyjson")
8888 (uri (pypi-uri "anyjson" version))
8891 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8892 (build-system python-build-system)
8894 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8895 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8896 ;; whatever) so this transformation needs to be done before the tests
8897 ;; can be run. Maybe we could add a build step to transform beforehand
8898 ;; but it could be annoying/difficult.
8899 ;; We can enable tests for the Python 2 version, though, and do below.
8901 (home-page "https://bitbucket.org/runeh/anyjson/")
8903 "Wraps best available JSON implementation in a common interface")
8905 "Anyjson loads whichever is the fastest JSON module installed
8906 and provides a uniform API regardless of which JSON implementation is used.")
8907 (license license:bsd-3)
8908 (properties `((python2-variant . ,(delay python2-anyjson))))))
8910 (define-public python2-anyjson
8911 (let ((anyjson (package-with-python2
8912 (strip-python2-variant python-anyjson))))
8915 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8917 ,@(package-arguments anyjson)))
8918 (native-inputs `(("python2-nose" ,python2-nose))))))
8920 (define-public python-amqp
8922 (name "python-amqp")
8927 (uri (pypi-uri "amqp" version))
8930 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8931 (build-system python-build-system)
8933 `(("python-case" ,python-case)
8934 ("python-pytest-sugar" ,python-pytest-sugar)
8935 ("python-mock" ,python-mock)))
8937 `(("python-vine" ,python-vine)))
8938 (home-page "https://github.com/celery/py-amqp")
8940 "Low-level AMQP client for Python (fork of amqplib)")
8942 "This is a fork of amqplib which was originally written by Barry Pederson.
8943 It is maintained by the Celery project, and used by kombu as a pure python
8944 alternative when librabbitmq is not available.")
8945 (license license:lgpl2.1+)
8946 (properties `((python2-variant . ,(delay python2-amqp))))))
8948 (define-public python2-amqp
8949 (let ((amqp (package-with-python2
8950 (strip-python2-variant python-amqp))))
8953 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8954 ;; unmaintained. Weirdly, does not do this on the python 3
8957 ,@(package-arguments amqp))))))
8959 (define-public python-txamqp
8961 (name "python-txamqp")
8966 (uri (pypi-uri "txAMQP" version))
8969 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8970 (build-system python-build-system)
8972 `(("python-six" ,python-six)
8973 ("python-twisted" ,python-twisted)))
8974 (home-page "https://github.com/txamqp/txamqp")
8975 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8977 "This package provides a Python library for communicating with AMQP peers
8978 and brokers using the asynchronous networking framework Twisted. It contains
8979 all the necessary code to connect, send and receive messages to/from an
8980 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8981 also includes support for using Thrift RPC over AMQP in Twisted
8983 (license license:asl2.0)))
8985 (define-public python2-txamqp
8986 (package-with-python2 python-txamqp))
8988 (define-public python-kombu
8990 (name "python-kombu")
8995 (uri (pypi-uri "kombu" version))
8998 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8999 (build-system python-build-system)
9001 `(("python-mock" ,python-mock)
9002 ("python-case" ,python-case)
9003 ("python-pyro4" ,python-pyro4)
9004 ("python-pytest-sugar" ,python-pytest-sugar)
9005 ("python-pytz" ,python-pytz)))
9007 `(("python-anyjson" ,python-anyjson)
9008 ("python-amqp" ,python-amqp)
9009 ("python-redis" ,python-redis)))
9010 (home-page "https://kombu.readthedocs.io")
9011 (synopsis "Message passing library for Python")
9012 (description "The aim of Kombu is to make messaging in Python as easy as
9013 possible by providing an idiomatic high-level interface for the AMQ protocol,
9014 and also provide proven and tested solutions to common messaging problems.
9015 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9016 message orientation, queuing, routing, reliability and security, for which the
9017 RabbitMQ messaging server is the most popular implementation.")
9018 (license license:bsd-3)
9019 (properties `((python2-variant . ,(delay python2-kombu))))))
9021 (define-public python2-kombu
9022 (let ((kombu (package-with-python2
9023 (strip-python2-variant python-kombu))))
9026 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9027 ;; It works fine on the python3 variant.
9029 ,@(package-arguments kombu)))
9030 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9031 ,@(package-native-inputs kombu))))))
9033 (define-public python-billiard
9035 (name "python-billiard")
9040 (uri (pypi-uri "billiard" version))
9043 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9044 (build-system python-build-system)
9046 `(("python-case" ,python-case)
9047 ("python-pytest" ,python-pytest)))
9048 (home-page "https://github.com/celery/billiard")
9050 "Python multiprocessing fork with improvements and bugfixes")
9052 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9053 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9054 pyprocessing package. This standalone variant is intended to be compatible with
9055 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9056 (license license:bsd-3)
9057 (properties `((python2-variant . ,(delay python2-billiard))))))
9059 (define-public python2-billiard
9060 (let ((billiard (package-with-python2
9061 (strip-python2-variant python-billiard))))
9064 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9065 ("python2-mock" ,python2-mock)
9066 ,@(package-native-inputs billiard))))))
9068 (define-public python-celery
9070 (name "python-celery")
9075 (uri (pypi-uri "celery" version))
9078 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9079 (build-system python-build-system)
9081 '(;; TODO The tests fail with Python 3.7
9082 ;; https://github.com/celery/celery/issues/4849
9085 (modify-phases %standard-phases
9086 (add-after 'unpack 'patch-requirements
9088 (substitute* "requirements/test.txt"
9089 (("pytest>=3\\.0,<3\\.3")
9093 `(("python-case" ,python-case)
9094 ("python-pytest" ,python-pytest)))
9096 `(("python-pytz" ,python-pytz)
9097 ("python-billiard" ,python-billiard)
9098 ("python-kombu" ,python-kombu)))
9099 (home-page "https://celeryproject.org")
9100 (synopsis "Distributed Task Queue")
9101 (description "Celery is an asynchronous task queue/job queue based on
9102 distributed message passing. It is focused on real-time operation, but
9103 supports scheduling as well. The execution units, called tasks, are executed
9104 concurrently on a single or more worker servers using multiprocessing,
9105 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9106 synchronously (wait until ready).")
9107 (license license:bsd-3)
9108 (properties `((python2-variant . ,(delay python2-celery))))))
9110 (define-public python2-celery
9111 (let ((celery (package-with-python2
9112 (strip-python2-variant python-celery))))
9115 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9116 ("python2-mock" ,python2-mock)
9117 ,@(package-native-inputs celery))))))
9119 (define-public python-translitcodec
9121 (name "python-translitcodec")
9126 (uri (pypi-uri "translitcodec" version))
9129 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9130 (build-system python-build-system)
9132 `(#:tests? #f)) ; no tests provided
9134 "https://github.com/claudep/translitcodec")
9136 "Unicode to 8-bit charset transliteration codec")
9138 "This package contains codecs for transliterating ISO 10646 texts into
9139 best-effort representations using smaller coded character sets (ASCII,
9141 (license license:expat)))
9143 (define-public python2-translitcodec
9144 (package-with-python2 python-translitcodec))
9146 (define-public python-editor
9148 (name "python-editor")
9153 (uri (pypi-uri "python-editor" version))
9156 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9157 (build-system python-build-system)
9159 "https://github.com/fmoo/python-editor")
9161 "Programmatically open an editor, capture the result")
9163 "python-editor is a library that provides the editor module for
9164 programmatically interfacing with your system's $EDITOR.")
9165 (license license:asl2.0)))
9167 (define-public python2-editor
9168 (package-with-python2 python-editor))
9170 (define-public python-vobject
9172 (name "python-vobject")
9176 (uri (pypi-uri "vobject" version))
9179 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9180 (build-system python-build-system)
9182 '(;; The test suite relies on some non-portable Windows interfaces.
9185 `(("python-dateutil" ,python-dateutil)
9186 ("python-pyicu" ,python-pyicu)))
9187 (synopsis "Parse and generate vCard and vCalendar files")
9188 (description "Vobject is intended to be a full featured Python package for
9189 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9190 are supported and well tested. vCard 3.0 files are supported, and all data
9191 should be imported, but only a few components are understood in a sophisticated
9193 (home-page "http://eventable.github.io/vobject/")
9194 (license license:asl2.0)))
9196 (define-public python2-vobject
9197 (package-with-python2 python-vobject))
9199 (define-public python-munkres
9201 (name "python-munkres")
9205 (uri (pypi-uri "munkres" version))
9208 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9209 (build-system python-build-system)
9211 '(#:tests? #f)) ; no test suite
9212 (home-page "http://software.clapper.org/munkres/")
9213 (synopsis "Implementation of the Munkres algorithm")
9214 (description "The Munkres module provides an implementation of the Munkres
9215 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9216 useful for solving the Assignment Problem.")
9217 (license license:bsd-3)))
9219 (define-public python2-munkres
9220 (package-with-python2 python-munkres))
9222 (define-public python-whoosh
9224 (name "python-whoosh")
9229 (uri (pypi-uri "Whoosh" version))
9232 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9233 (build-system python-build-system)
9235 `(("python-pytest" ,python-pytest)))
9236 (home-page "https://bitbucket.org/mchaput/whoosh")
9237 (synopsis "Full text indexing, search, and spell checking library")
9239 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9241 (license license:bsd-2)))
9243 (define-public python2-whoosh
9244 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9245 (package (inherit whoosh)
9247 `(("python2-backport-ssl-match-hostname"
9248 ,python2-backport-ssl-match-hostname)
9249 ,@(package-propagated-inputs whoosh))))))
9251 (define-public python-pathlib
9253 (name "python-pathlib")
9257 (uri (pypi-uri "pathlib" version))
9260 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9261 (build-system python-build-system)
9262 ;; The tests depend on the internal "test" module, which does not provide
9263 ;; a stable interface.
9264 (arguments `(#:tests? #f))
9265 (home-page "https://pathlib.readthedocs.org/")
9266 (synopsis "Object-oriented file system paths")
9267 (description "Pathlib offers a set of classes to handle file system paths.
9268 It offers the following advantages over using string objects:
9271 @item No more cumbersome use of os and os.path functions. Everything can
9272 be done easily through operators, attribute accesses, and method calls.
9273 @item Embodies the semantics of different path types. For example,
9274 comparing Windows paths ignores casing.
9275 @item Well-defined semantics, eliminating any inconsistencies or
9276 ambiguities (forward vs. backward slashes, etc.).
9279 Note: In Python 3.4, pathlib is now part of the standard library. For other
9280 Python versions please consider python-pathlib2 instead, which tracks the
9281 standard library module. This module (python-pathlib) isn't maintained
9283 (license license:expat)))
9285 (define-public python2-pathlib
9286 (package-with-python2 python-pathlib))
9288 (define-public python2-pathlib2
9290 (name "python2-pathlib2")
9294 (uri (pypi-uri "pathlib2" version))
9297 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9298 (build-system python-build-system)
9299 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9300 ;; version is 3.4 which already includes this package as part of the
9301 ;; standard library.
9303 `(#:python ,python-2))
9305 `(("python2-scandir" ,python2-scandir)
9306 ("python2-six" ,python2-six)))
9307 (home-page "https://pypi.python.org/pypi/pathlib2/")
9308 (synopsis "Object-oriented file system paths - backport of standard
9310 (description "The goal of pathlib2 is to provide a backport of standard
9311 pathlib module which tracks the standard library module, so all the newest
9312 features of the standard pathlib can be used also on older Python versions.
9314 Pathlib offers a set of classes to handle file system paths. It offers the
9315 following advantages over using string objects:
9318 @item No more cumbersome use of os and os.path functions. Everything can
9319 be done easily through operators, attribute accesses, and method calls.
9320 @item Embodies the semantics of different path types. For example,
9321 comparing Windows paths ignores casing.
9322 @item Well-defined semantics, eliminating any inconsistencies or
9323 ambiguities (forward vs. backward slashes, etc.).
9325 (license license:expat)))
9327 (define-public python2-pathlib2-bootstrap
9330 (inherit python2-pathlib2)
9331 (name "python2-pathlib2-bootstrap")
9333 `(("python2-scandir" ,python2-scandir)
9334 ("python2-six" ,python2-six-bootstrap))))))
9336 (define-public python-jellyfish
9338 (name "python-jellyfish")
9342 (uri (pypi-uri "jellyfish" version))
9345 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9346 (build-system python-build-system)
9348 `(("python-pytest" ,python-pytest)))
9349 (home-page "https://github.com/jamesturk/jellyfish")
9350 (synopsis "Approximate and phonetic matching of strings")
9351 (description "Jellyfish uses a variety of string comparison and phonetic
9352 encoding algorithms to do fuzzy string matching.")
9353 (license license:bsd-2)
9354 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9356 (define-public python2-jellyfish
9357 (let ((jellyfish (package-with-python2
9358 (strip-python2-variant python-jellyfish))))
9359 (package (inherit jellyfish)
9360 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9361 ,@(package-native-inputs jellyfish))))))
9363 (define-public python2-unicodecsv
9365 (name "python2-unicodecsv")
9369 ;; The test suite is not included in the PyPi release.
9370 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9371 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9372 "archive/" version ".tar.gz"))
9373 (file-name (string-append name "-" version ".tar.gz"))
9376 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9377 (build-system python-build-system)
9379 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9380 #:python ,python-2))
9382 `(("python2-unittest2" ,python2-unittest2)))
9383 (home-page "https://github.com/jdunck/python-unicodecsv")
9384 (synopsis "Unicode CSV module for Python 2")
9385 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9386 module, adding support for Unicode strings.")
9387 (license license:bsd-2)))
9389 (define-public python-rarfile
9391 (name "python-rarfile")
9395 (uri (pypi-uri "rarfile" version))
9398 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9399 (build-system python-build-system)
9402 (modify-phases %standard-phases
9404 ;; Many tests fail, but the installation proceeds.
9405 (lambda _ (invoke "make" "-C" "test" "test"))))))
9407 `(("which" ,which))) ; required for tests
9409 `(("libarchive" ,libarchive)))
9410 (home-page "https://github.com/markokr/rarfile")
9411 (synopsis "RAR archive reader for Python")
9412 (description "This is Python module for RAR archive reading. The interface
9413 is made as zipfile like as possible.")
9414 (license license:isc)))
9416 (define-public python2-rarfile
9417 (package-with-python2 python-rarfile))
9419 (define-public python-magic
9421 (name "python-magic")
9426 (uri (pypi-uri "python-magic" version))
9429 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9430 (file-name (string-append name "-" version "-checkout"))))
9431 (build-system python-build-system)
9433 ;; The tests are unreliable, so don't run them. The tests fail
9434 ;; under Python3 because they were written for Python2 and
9435 ;; contain import statements that do not work in Python3. One of
9436 ;; the tests fails under Python2 because its assertions are
9437 ;; overly stringent; it relies on comparing output strings which
9438 ;; are brittle and can change depending on the version of
9439 ;; libmagic being used and the system on which the test is
9440 ;; running. In my case, under GuixSD 0.10.0, only one test
9441 ;; failed, and it seems to have failed only because the version
9442 ;; of libmagic that is packaged in Guix outputs a slightly
9443 ;; different (but not wrong) string than the one that the test
9446 #:phases (modify-phases %standard-phases
9447 ;; Replace a specific method call with a hard-coded
9448 ;; path to the necessary libmagic.so file in the
9449 ;; store. If we don't do this, then the method call
9450 ;; will fail to find the libmagic.so file, which in
9451 ;; turn will cause any application using
9452 ;; python-magic to fail.
9453 (add-before 'build 'hard-code-path-to-libmagic
9454 (lambda* (#:key inputs #:allow-other-keys)
9455 (let ((file (assoc-ref inputs "file")))
9456 (substitute* "magic.py"
9457 (("ctypes.util.find_library\\('magic'\\)")
9458 (string-append "'" file "/lib/libmagic.so'")))
9460 (add-before 'install 'disable-egg-compression
9462 (let ((port (open-file "setup.cfg" "a")))
9463 (display "\n[easy_install]\nzip_ok = 0\n"
9468 ;; python-magic needs to be able to find libmagic.so.
9471 "https://github.com/ahupp/python-magic")
9473 "File type identification using libmagic")
9475 "This module uses ctypes to access the libmagic file type
9476 identification library. It makes use of the local magic database and
9477 supports both textual and MIME-type output. Note that this module and
9478 the python-file module both provide a \"magic.py\" file; these two
9479 modules, which are different and were developed separately, both serve
9480 the same purpose: to provide Python bindings for libmagic.")
9481 (license license:expat)))
9483 (define-public python2-magic
9484 (package-with-python2 python-magic))
9486 (define-public python2-s3cmd
9488 (name "python2-s3cmd")
9493 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9494 "s3cmd-" version ".tar.gz"))
9497 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9498 (build-system python-build-system)
9500 ;; s3cmd is written for python2 only and contains no tests.
9501 `(#:python ,python-2
9504 `(("python2-dateutil" ,python2-dateutil)
9505 ;; The python-file package also provides a magic.py module.
9506 ;; This is an unfortunate state of affairs; however, s3cmd
9507 ;; fails to install if it cannot find specifically the
9508 ;; python-magic package. Thus we include it, instead of using
9509 ;; python-file. Ironically, s3cmd sometimes works better
9510 ;; without libmagic bindings at all:
9511 ;; https://github.com/s3tools/s3cmd/issues/198
9512 ("python2-magic" ,python2-magic)))
9513 (home-page "http://s3tools.org/s3cmd")
9514 (synopsis "Command line tool for S3-compatible storage services")
9516 "S3cmd is a command line tool for uploading, retrieving and managing data
9517 in storage services that are compatible with the Amazon Simple Storage
9518 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9519 GnuPG encryption, and more. It also supports management of Amazon's
9520 CloudFront content delivery network.")
9521 (license license:gpl2+)))
9523 (define-public python-pkgconfig
9525 (name "python-pkgconfig")
9530 (uri (pypi-uri "pkgconfig" version))
9533 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9534 (build-system python-build-system)
9536 `(("python-nose" ,python-nose)))
9538 `(("pkg-config" ,pkg-config)))
9541 (modify-phases %standard-phases
9542 (add-before 'build 'patch
9543 ;; Hard-code the path to pkg-config.
9545 (substitute* "pkgconfig/pkgconfig.py"
9546 (("cmd = 'pkg-config")
9547 (string-append "cmd = '" (which "pkg-config"))))
9551 (invoke "nosetests" "test.py"))))))
9552 (home-page "https://github.com/matze/pkgconfig")
9553 (synopsis "Python interface for pkg-config")
9554 (description "This module provides a Python interface to pkg-config. It
9555 can be used to find all pkg-config packages, check if a package exists,
9556 check if a package meets certain version requirements, query CFLAGS and
9557 LDFLAGS and parse the output to build extensions with setup.py.")
9558 (license license:expat)))
9560 (define-public python2-pkgconfig
9561 (package-with-python2 python-pkgconfig))
9563 (define-public python-bz2file
9565 (name "python-bz2file")
9570 (uri (pypi-uri "bz2file" version))
9573 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9574 (build-system python-build-system)
9576 `(#:tests? #f)) ; Tests use deprecated python modules.
9577 (home-page "https://github.com/nvawda/bz2file")
9578 (synopsis "Read and write bzip2-compressed files")
9580 "Bz2file is a Python library for reading and writing bzip2-compressed
9581 files. It contains a drop-in replacement for the I/O interface in the
9582 standard library's @code{bz2} module, including features from the latest
9583 development version of CPython that are not available in older releases.")
9584 (license license:asl2.0)))
9586 (define-public python2-bz2file
9587 (package-with-python2 python-bz2file))
9589 (define-public python-future
9591 (name "python-future")
9596 (uri (pypi-uri "future" version))
9599 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9600 (build-system python-build-system)
9601 ;; Many tests connect to the network or are otherwise flawed.
9602 ;; https://github.com/PythonCharmers/python-future/issues/210
9605 (home-page "http://python-future.org")
9606 (synopsis "Single-source support for Python 3 and 2")
9608 "@code{python-future} is the missing compatibility layer between Python 2 and
9609 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9610 to support both Python 2 and Python 3 with minimal overhead.")
9611 (license license:expat)))
9613 (define-public python2-future
9614 (package-with-python2 python-future))
9616 (define-public python-cysignals
9618 (name "python-cysignals")
9623 (uri (pypi-uri "cysignals" version))
9626 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9627 (build-system python-build-system)
9629 `(("python-cython" ,python-cython)
9630 ("python-sphinx" ,python-sphinx)))
9632 `(("pari-gp" ,pari-gp)))
9634 `(#:modules ((guix build python-build-system)
9635 ((guix build gnu-build-system) #:prefix gnu:)
9637 ;; FIXME: Tests are executed after installation and currently fail
9638 ;; when not installing into standard locations; the author is working
9642 (modify-phases %standard-phases
9645 (assoc-ref gnu:%standard-phases 'configure)))))
9647 "https://github.com/sagemath/cysignals")
9649 "Handling of interrupts and signals for Cython")
9651 "The cysignals package provides mechanisms to handle interrupts (and
9652 other signals and errors) in Cython code, using two related approaches,
9653 for mixed Cython/Python code or external C libraries and pure Cython code,
9655 (license license:lgpl3+)))
9657 (define-public python2-cysignals
9658 (package-with-python2 python-cysignals))
9660 (define-public python2-shedskin
9662 (name "python2-shedskin")
9667 (uri (string-append "https://github.com/shedskin/shedskin/"
9668 "releases/download/v" version
9669 "/shedskin-" version ".tgz"))
9672 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9673 (build-system python-build-system)
9675 `(#:python ,python-2
9676 #:phases (modify-phases %standard-phases
9677 (add-after 'unpack 'fix-resulting-include-libs
9678 (lambda* (#:key inputs #:allow-other-keys)
9679 (let ((libgc (assoc-ref inputs "libgc"))
9680 (pcre (assoc-ref inputs "pcre")))
9681 (substitute* "shedskin/makefile.py"
9682 (("variable == 'CCFLAGS':[ ]*")
9683 (string-append "variable == 'CCFLAGS':\n"
9684 " line += ' -I " pcre "/include"
9685 " -I " libgc "/include'"))
9686 (("variable == 'LFLAGS':[ ]*")
9687 (string-append "variable == 'LFLAGS':\n"
9688 " line += ' -L" pcre "/lib"
9689 " -L " libgc "/lib'")))
9691 (inputs `(("pcre" ,pcre)
9693 (home-page "https://shedskin.github.io/")
9694 (synopsis "Experimental Python-2 to C++ Compiler")
9695 (description (string-append "This is an experimental compiler for a subset of
9696 Python. It generates C++ code and a Makefile."))
9697 (license (list license:gpl3 license:bsd-3 license:expat))))
9699 (define-public python2-rope
9701 (name "python2-rope")
9706 (uri (pypi-uri "rope" version))
9709 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9711 ;; Rope has only partial python3 support, see `python-rope'
9712 `(#:python ,python-2))
9713 (build-system python-build-system)
9715 `(("python2-unittest2" ,python2-unittest2)))
9716 (home-page "https://github.com/python-rope/rope")
9717 (synopsis "Refactoring library for Python")
9718 (description "Rope is a refactoring library for Python. It facilitates
9719 the renaming, moving and extracting of attributes, functions, modules, fields
9720 and parameters in Python 2 source code. These refactorings can also be applied
9721 to occurrences in strings and comments.")
9722 (license license:gpl2)))
9724 (define-public python-rope
9726 (inherit python2-rope)
9727 (name "python-rope")
9728 (arguments `(#:python ,python-wrapper
9729 ;; XXX: Only partial python3 support, results in some failing
9730 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9732 (properties `((python2-variant . ,(delay python2-rope))))))
9734 (define-public python-py3status
9736 (name "python-py3status")
9741 (uri (pypi-uri "py3status" version))
9744 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9745 (build-system python-build-system)
9750 (modify-phases %standard-phases
9751 ;; 'file' is used for detection of configuration file encoding
9752 ;; let's make link the dependency to particular input
9753 (add-before 'build 'patch-file-path
9754 (lambda* (#:key inputs #:allow-other-keys)
9755 (let ((file-path (assoc-ref inputs "file")))
9756 (substitute* "py3status/parse_config.py"
9757 (("\\['file', '-b'")
9758 (string-append "['" file-path "/bin/file', '-b'")))
9760 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9761 (home-page "https://github.com/ultrabug/py3status")
9762 (synopsis "Extensible i3status wrapper written in Python")
9763 (description "py3status is an i3status wrapper which extends i3status
9764 functionality in a modular way, allowing you to extend your panel with your
9765 own code, responding to click events and updating clock every second.")
9766 (license license:bsd-3)))
9768 (define-public python-tblib
9770 (name "python-tblib")
9774 (uri (pypi-uri "tblib" version))
9776 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9777 (build-system python-build-system)
9780 (modify-phases %standard-phases
9781 (add-before 'check 'adjust-tests
9783 (when (which "python3")
9784 ;; Adjust the example output to match that of Python 3.7:
9785 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9786 (substitute* "README.rst"
9787 (("Exception\\('fail',") "Exception('fail'"))
9791 ;; Upstream runs tests after installation and the package itself
9792 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9794 (setenv "PYTHONPATH"
9795 (string-append (getcwd) "/build/lib:"
9796 (getenv "PYTHONPATH")))
9797 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9799 `(("python-pytest" ,python-pytest)
9800 ("python-six" ,python-six)))
9801 (home-page "https://github.com/ionelmc/python-tblib")
9802 (synopsis "Traceback serialization library")
9804 "Traceback serialization allows you to:
9807 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9808 different processes. This allows better error handling when running code over
9809 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9811 @item Parse traceback strings and raise with the parsed tracebacks.
9813 (license license:bsd-3)))
9815 (define-public python2-tblib
9816 (package-with-python2 python-tblib))
9818 (define-public python-greenlet
9820 (name "python-greenlet")
9824 (uri (pypi-uri "greenlet" version))
9827 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9828 (build-system python-build-system)
9829 (home-page "https://greenlet.readthedocs.io/")
9830 (synopsis "Lightweight in-process concurrent programming")
9832 "Greenlet package is a spin-off of Stackless, a version of CPython
9833 that supports micro-threads called \"tasklets\". Tasklets run
9834 pseudo-concurrently (typically in a single or a few OS-level threads) and
9835 are synchronized with data exchanges on \"channels\".")
9836 (license (list license:psfl license:expat))))
9838 (define-public python2-greenlet
9839 (package-with-python2 python-greenlet))
9841 (define-public python-objgraph
9843 (name "python-objgraph")
9848 (uri (pypi-uri "objgraph" version))
9851 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9852 (build-system python-build-system)
9854 `(("python-graphviz" ,python-graphviz)))
9856 `(("python-mock" ,python-mock)
9857 ("graphviz" ,graphviz)))
9858 (home-page "https://mg.pov.lt/objgraph/")
9859 (synopsis "Draw Python object reference graphs with graphviz")
9861 "This package provides tools to draw Python object reference graphs with
9863 (license license:expat)))
9865 (define-public python-gevent
9867 (name "python-gevent")
9871 (uri (pypi-uri "gevent" version))
9874 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9875 (modules '((guix build utils)))
9878 ;; unbunding libev and c-ares
9879 (delete-file-recursively "deps")
9881 (build-system python-build-system)
9883 `(#:modules ((ice-9 ftw)
9887 (guix build python-build-system))
9888 #:phases (modify-phases %standard-phases
9889 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9891 (substitute* "src/gevent/subprocess.py"
9892 (("/bin/sh") (which "sh")))
9893 (for-each (lambda (file)
9895 (("/bin/sh") (which "sh"))
9896 (("/bin/true") (which "true"))))
9897 (find-files "src/greentest" "\\.py$"))
9899 (add-before 'build 'do-not-use-bundled-sources
9900 (lambda* (#:key inputs #:allow-other-keys)
9901 (setenv "CONFIG_SHELL" (which "bash"))
9902 (setenv "LIBEV_EMBED" "false")
9903 (setenv "CARES_EMBED" "false")
9904 (setenv "EMBED" "false")
9906 ;; Prevent building bundled libev.
9907 (substitute* "setup.py"
9908 (("run_make=_BUILDING")
9911 (let ((greenlet (string-append
9912 (assoc-ref inputs "python-greenlet")
9914 (match (scandir greenlet
9916 (string-prefix? "python" item)))
9918 (setenv "C_INCLUDE_PATH"
9919 (string-append greenlet "/" python)))))
9921 (add-before 'check 'skip-timer-test
9923 ;; XXX: Skip 'TestTimerResolution', which appears to be
9925 (substitute* "src/greentest/test__core_timer.py"
9926 (("not greentest.RUNNING_ON_CI") "False"))
9930 ;; Make sure the build directory is on PYTHONPATH.
9931 (setenv "PYTHONPATH"
9933 (getenv "PYTHONPATH") ":"
9935 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9936 (with-directory-excursion "src/greentest"
9937 ;; XXX: Many tests require network access. Instead we only
9938 ;; run known-good tests. Unfortunately we cannot use
9939 ;; recursion here since this directory also contains
9940 ;; Python-version-specific subfolders.
9941 (apply invoke "python" "testrunner.py" "--config"
9943 (scandir "." (cut regexp-exec
9944 (make-regexp "test_+(subprocess|core)")
9947 `(("python-greenlet" ,python-greenlet)
9948 ("python-objgraph" ,python-objgraph)))
9950 `(("python-six" ,python-six)))
9952 `(("c-ares" ,c-ares)
9954 (home-page "http://www.gevent.org/")
9955 (synopsis "Coroutine-based network library")
9957 "gevent is a coroutine-based Python networking library that uses greenlet
9958 to provide a high-level synchronous API on top of the libev event loop.")
9959 (license license:expat)
9960 (properties `((python2-variant . ,(delay python2-gevent))))))
9962 (define-public python2-gevent
9963 (let ((base (package-with-python2
9964 (strip-python2-variant python-gevent))))
9967 (native-inputs `(,@(package-native-inputs python-gevent)
9968 ("python-mock" ,python2-mock))))))
9970 (define-public python-fastimport
9972 (name "python-fastimport")
9977 (uri (pypi-uri "fastimport" version))
9979 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9980 (build-system python-build-system)
9981 (home-page "https://github.com/jelmer/python-fastimport")
9982 (synopsis "VCS fastimport parser and generator in Python")
9983 (description "This package provides a parser for and generator of the Git
9984 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9986 (license license:gpl2+)))
9988 (define-public python2-fastimport
9989 (package-with-python2 python-fastimport))
9991 (define-public python-twisted
9993 (name "python-twisted")
9997 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10000 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10001 (build-system python-build-system)
10003 '(#:tests? #f)) ; FIXME: some tests fail
10005 `(("python-zope-interface" ,python-zope-interface)
10006 ("python-pyhamcrest" ,python-pyhamcrest)
10007 ("python-incremental" ,python-incremental)
10008 ("python-hyperlink" ,python-hyperlink)
10009 ("python-constantly" ,python-constantly)
10010 ("python-automat" ,python-automat)))
10011 (home-page "https://twistedmatrix.com/")
10012 (synopsis "Asynchronous networking framework written in Python")
10014 "Twisted is an extensible framework for Python programming, with special
10015 focus on event-based network programming and multiprotocol integration.")
10016 (license license:expat)))
10018 (define-public python2-twisted
10019 (package-with-python2 python-twisted))
10021 (define-public python-pika
10023 (name "python-pika")
10028 (uri (pypi-uri "pika" version))
10031 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10032 (build-system python-build-system)
10034 `(("python-pyev" ,python-pyev)
10035 ("python-tornado" ,python-tornado)
10036 ("python-twisted" ,python-twisted)))
10037 (home-page "https://pika.readthedocs.org")
10038 (synopsis "Pure Python AMQP Client Library")
10040 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10041 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10042 network support library.")
10043 (license license:bsd-3)))
10045 (define-public python2-pika
10046 (package-with-python2 python-pika))
10048 (define-public python-ply
10050 (name "python-ply")
10055 (uri (pypi-uri "ply" version))
10058 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10059 (build-system python-build-system)
10060 (home-page "http://www.dabeaz.com/ply/")
10061 (synopsis "Python Lex & Yacc")
10062 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10063 It uses LR parsing and does extensive error checking.")
10064 (license license:bsd-3)))
10066 (define-public python2-ply
10067 (package-with-python2 python-ply))
10069 (define-public python-tabulate
10071 (name "python-tabulate")
10075 (uri (pypi-uri "tabulate" version))
10078 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10079 (build-system python-build-system)
10081 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10082 ;; and the latest release is not tagged in the upstream repository.
10084 (home-page "https://bitbucket.org/astanin/python-tabulate")
10085 (synopsis "Pretty-print tabular data")
10087 "Tabulate is a library and command-line utility to pretty-print tabular
10089 (license license:expat)))
10091 (define-public python2-tabulate
10092 (package-with-python2 python-tabulate))
10094 (define-public python-kazoo
10096 (name "python-kazoo")
10101 (uri (pypi-uri "kazoo" version))
10104 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10105 (build-system python-build-system)
10106 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10108 `(("python-six" ,python-six)))
10109 (home-page "https://kazoo.readthedocs.org")
10110 (synopsis "High-level Zookeeper client library")
10112 "Kazoo is a Python client library for the Apache Zookeeper distributed
10113 application service. It is designed to be easy to use and to avoid common
10114 programming errors.")
10115 (license license:asl2.0)))
10117 (define-public python2-kazoo
10118 (package-with-python2 python-kazoo))
10120 (define-public python-pykafka
10122 (name "python-pykafka")
10126 (uri (pypi-uri "pykafka" version))
10129 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10130 (build-system python-build-system)
10131 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10133 `(("python-gevent" ,python-gevent)
10134 ("python-kazoo" ,python-kazoo)
10135 ("python-tabulate" ,python-tabulate)))
10137 `(("librdkafka" ,librdkafka)))
10138 (home-page "https://pykafka.readthedocs.io/")
10139 (synopsis "Apache Kafka client for Python")
10141 "PyKafka is a client for the Apache Kafka distributed messaging system.
10142 It includes Python implementations of Kafka producers and consumers, which
10143 are optionally backed by a C extension built on librdkafka.")
10144 (license license:asl2.0)))
10146 (define-public python2-pykafka
10147 (package-with-python2 python-pykafka))
10149 (define-public python-wcwidth
10151 (name "python-wcwidth")
10156 (uri (pypi-uri "wcwidth" version))
10159 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10160 (build-system python-build-system)
10161 (home-page "https://github.com/jquast/wcwidth")
10162 (synopsis "Measure number of terminal column cells of wide-character codes")
10163 (description "Wcwidth measures the number of terminal column cells of
10164 wide-character codes. It is useful for those implementing a terminal emulator,
10165 or programs that carefully produce output to be interpreted by one. It is a
10166 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10167 specified in POSIX.1-2001 and POSIX.1-2008.")
10168 (license license:expat)))
10170 (define-public python2-wcwidth
10171 (package-with-python2 python-wcwidth))
10173 (define-public python2-jsonrpclib
10175 (name "python2-jsonrpclib")
10179 (uri (pypi-uri "jsonrpclib" version))
10182 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10183 (build-system python-build-system)
10186 #:python ,python-2))
10187 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10188 (synopsis "Implementation of JSON-RPC specification for Python")
10190 "This library is an implementation of the JSON-RPC specification.
10191 It supports both the original 1.0 specification, as well as the
10192 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10194 (license license:asl2.0)))
10196 (define-public python-chai
10198 (name "python-chai")
10202 (uri (pypi-uri "chai" version))
10205 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10206 (build-system python-build-system)
10207 (home-page "https://github.com/agoragames/chai")
10208 (synopsis "Mocking framework for Python")
10210 "Chai provides an api for mocking, stubbing and spying your python
10211 objects, patterned after the Mocha library for Ruby.")
10212 (license license:bsd-3)))
10214 (define-public python2-chai
10215 (package-with-python2 python-chai))
10217 (define-public python-inflection
10219 (name "python-inflection")
10222 (origin (method url-fetch)
10223 (uri (pypi-uri "inflection" version))
10226 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10227 (build-system python-build-system)
10229 `(("python-pytest" ,python-pytest)))
10230 (home-page "https://github.com/jpvanhal/inflection")
10231 (synopsis "Python string transformation library")
10233 "Inflection is a string transformation library. It singularizes
10234 and pluralizes English words, and transforms strings from CamelCase to
10235 underscored string.")
10236 (license license:expat)))
10238 (define-public python2-inflection
10239 (package-with-python2 python-inflection))
10241 (define-public python-pylev
10243 (name "python-pylev")
10247 (uri (pypi-uri "pylev" version))
10250 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10251 (build-system python-build-system)
10252 (home-page "https://github.com/toastdriven/pylev")
10253 (synopsis "Levenshtein distance implementation in Python")
10254 (description "Pure Python Levenshtein implementation, based off the
10255 Wikipedia code samples at
10256 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10257 (license license:bsd-3)))
10259 (define-public python2-pylev
10260 (package-with-python2 python-pylev))
10262 (define-public python-cleo
10264 (name "python-cleo")
10268 (uri (pypi-uri "cleo" version))
10271 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10272 (build-system python-build-system)
10275 ("python-mock" ,python-mock)
10276 ("python-pytest-mock" ,python-pytest-mock)
10277 ("python-pytest" ,python-pytest)))
10279 `(("python-backpack" ,python-backpack)
10280 ("python-pastel" ,python-pastel)
10281 ("python-pylev" ,python-pylev)))
10282 (home-page "https://github.com/sdispater/cleo")
10283 (synopsis "Command-line arguments library for Python")
10285 "Cleo allows you to create command-line commands with signature in
10286 docstring and colored output.")
10287 (license license:expat)))
10289 (define-public python2-cleo
10290 (package-with-python2 python-cleo))
10292 (define-public python-lazy-object-proxy
10294 (name "python-lazy-object-proxy")
10298 (uri (pypi-uri "lazy-object-proxy" version))
10301 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10302 (build-system python-build-system)
10303 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10304 (synopsis "Lazy object proxy for python")
10306 "Lazy object proxy is an object that wraps a callable but defers the call
10307 until the object is actually required, and caches the result of said call.")
10308 (license license:bsd-2)))
10310 (define-public python2-lazy-object-proxy
10311 (package-with-python2 python-lazy-object-proxy))
10313 (define-public python-dnspython
10315 (name "python-dnspython")
10319 (uri (string-append "http://www.dnspython.org/kits/"
10320 version "/dnspython-" version ".tar.gz"))
10323 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10324 (build-system python-build-system)
10325 (arguments '(#:tests? #f)) ; XXX: requires internet access
10326 (home-page "http://www.dnspython.org")
10327 (synopsis "DNS toolkit for Python")
10329 "dnspython is a DNS toolkit for Python. It supports almost all record
10330 types. It can be used for queries, zone transfers, and dynamic updates.
10331 It supports TSIG authenticated messages and EDNS0.")
10332 (license license:expat)))
10334 (define-public python2-dnspython
10335 (package-with-python2 python-dnspython))
10337 (define-public python-email-validator
10339 (name "python-email-validator")
10342 (origin (method url-fetch)
10343 (uri (pypi-uri "email_validator" version))
10346 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10347 (build-system python-build-system)
10350 (modify-phases %standard-phases
10351 (add-before 'build 'use-dnspython
10353 (substitute* "setup.py"
10354 (("dnspython3") "dnspython"))
10357 `(("python-dnspython" ,python-dnspython)
10358 ("python-idna" ,python-idna)))
10359 (home-page "https://github.com/JoshData/python-email-validator")
10360 (synopsis "Email address validation library for Python")
10362 "This library validates email address syntax and deliverability.")
10363 (license license:cc0)))
10365 (define-public python2-email-validator
10366 (package-with-python2 python-email-validator))
10368 (define-public python-ukpostcodeparser
10370 (name "python-ukpostcodeparser")
10374 (uri (pypi-uri "UkPostcodeParser" version))
10377 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10378 (build-system python-build-system)
10379 (home-page "https://github.com/hamstah/ukpostcodeparser")
10380 (synopsis "UK Postcode parser for Python")
10382 "This library provides the @code{parse_uk_postcode} function for
10383 parsing UK postcodes.")
10384 (license license:expat)))
10386 (define-public python2-ukpostcodeparser
10387 (package-with-python2 python-ukpostcodeparser))
10389 (define-public python-faker
10391 (name "python-faker")
10395 (uri (pypi-uri "Faker" version))
10398 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10400 (search-patches "python-faker-fix-build-32bit.patch"))
10401 (modules '((guix build utils)))
10404 (for-each delete-file (find-files "." "\\.pyc$"))
10406 (build-system python-build-system)
10409 (modify-phases %standard-phases
10411 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10414 ("python-email-validator" ,python-email-validator)
10415 ("python-mock" ,python-mock)
10416 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10418 `(("python-dateutil" ,python-dateutil)
10419 ("python-six" ,python-six)))
10420 (home-page "https://github.com/joke2k/faker")
10421 (synopsis "Python package that generates fake data")
10423 "Faker is a Python package that generates fake data such as names,
10424 addresses, and phone numbers.")
10425 (license license:expat)
10426 (properties `((python2-variant . ,(delay python2-faker))))))
10428 (define-public python2-faker
10429 (let ((base (package-with-python2 (strip-python2-variant
10434 `(("python2-ipaddress" ,python2-ipaddress)
10435 ,@(package-propagated-inputs base))))))
10437 (define-public python-pyaml
10439 (name "python-pyaml")
10440 (version "18.11.0")
10443 (uri (pypi-uri "pyaml" version))
10446 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10447 (build-system python-build-system)
10449 `(("python-unidecode" ,python-unidecode)))
10451 `(("python-pyyaml" ,python-pyyaml)))
10452 (home-page "https://github.com/mk-fg/pretty-yaml")
10453 (synopsis "YAML pretty-print library for Python")
10455 "pyaml is a PyYAML based python module to produce pretty and readable
10456 YAML-serialized data.")
10457 (license license:wtfpl2)))
10459 (define-public python2-pyaml
10460 (package-with-python2 python-pyaml))
10462 (define-public python-backpack
10464 (name "python-backpack")
10469 (uri (pypi-uri "backpack" version))
10472 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10473 (build-system python-build-system)
10475 `(("python-pytest" ,python-pytest)
10476 ("python-nose" ,python-nose)))
10478 `(("python-simplejson" ,python-simplejson)))
10479 (home-page "https://github.com/sdispater/backpack")
10480 (synopsis "Utilities for working with Python collections")
10481 (description "Backpack provides some useful utilities for working with
10482 collections of data.")
10483 (license license:expat)))
10485 (define-public python2-backpack
10486 (package-with-python2 python-backpack))
10488 (define-public python-prompt-toolkit
10490 (name "python-prompt-toolkit")
10495 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10498 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10499 (build-system python-build-system)
10502 (modify-phases %standard-phases
10504 (add-after 'install 'post-install-check
10505 (lambda* (#:key inputs outputs #:allow-other-keys)
10506 ;; HOME is needed for the test
10507 ;; "test_pathcompleter_can_expanduser".
10508 (setenv "HOME" "/tmp")
10509 (add-installed-pythonpath inputs outputs)
10510 (invoke "py.test"))))))
10512 `(("python-wcwidth" ,python-wcwidth)
10513 ("python-six" ,python-six)
10514 ("python-pygments" ,python-pygments)))
10516 `(("python-pytest" ,python-pytest)))
10517 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10518 (synopsis "Library for building command line interfaces in Python")
10520 "Prompt-Toolkit is a library for building interactive command line
10521 interfaces in Python. It's like GNU Readline but it also features syntax
10522 highlighting while typing, out-of-the-box multi-line input editing, advanced
10523 code completion, incremental search, support for Chinese double-width
10524 characters, mouse support, and auto suggestions.")
10525 (license license:bsd-3)))
10527 (define-public python2-prompt-toolkit
10528 (package-with-python2 python-prompt-toolkit))
10530 (define-public python-prompt-toolkit-1
10531 (package (inherit python-prompt-toolkit)
10536 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10539 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10541 (define-public python2-prompt-toolkit-1
10542 (package-with-python2 python-prompt-toolkit-1))
10544 (define-public python-jedi
10546 (name "python-jedi")
10551 (uri (pypi-uri "jedi" version))
10554 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10555 (build-system python-build-system)
10557 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10558 ;; https://github.com/davidhalter/jedi/issues/1263)
10561 (modify-phases %standard-phases
10563 (lambda* (#:key tests? #:allow-other-keys)
10565 (invoke "py.test" "-vv")))))))
10567 `(("python-pytest" ,python-pytest)
10568 ("python-docopt" ,python-docopt)))
10570 `(("python-parso" ,python-parso)))
10571 (home-page "https://github.com/davidhalter/jedi")
10572 (synopsis "Autocompletion and static analysis library for Python")
10574 "Jedi is a static analysis tool for Python that can be used in Integrated
10575 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10576 on a deeper level than many other static analysis frameworks for Python.
10578 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10580 (license license:expat)))
10582 (define-public python2-jedi
10583 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10586 (arguments (substitute-keyword-arguments (package-arguments base)
10587 ((#:tests? _) #t))))))
10589 (define-public ptpython
10595 (uri (pypi-uri "ptpython" version))
10598 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10599 (build-system python-build-system)
10601 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10603 `(("python-docopt" ,python-docopt)
10604 ("python-jedi" ,python-jedi)
10605 ("python-prompt-toolkit" ,python-prompt-toolkit)
10606 ("python-pygments" ,python-pygments)))
10607 (home-page "https://github.com/jonathanslenders/ptpython")
10608 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10610 "ptpython is a Python read-eval-print loop with IDE-like features.
10611 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10612 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10614 (license license:bsd-3)
10615 (properties `((python2-variant . ,(delay ptpython-2))))))
10617 (define-public ptpython-2
10618 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10621 (name "ptpython2"))))
10623 (define-public python-stem
10625 (name "python-stem")
10630 (uri (pypi-uri "stem" version))
10633 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10634 (build-system python-build-system)
10637 (modify-phases %standard-phases
10640 (invoke "./run_tests.py" "--unit")
10643 `(("python-mock" ,python-mock)
10644 ("python-pycodestyle" ,python-pycodestyle)
10645 ("python-pyflakes" ,python-pyflakes)))
10646 (home-page "https://stem.torproject.org/")
10648 "Python controller library that allows applications to interact with Tor")
10650 "Stem is a Python controller library for Tor. With it you can use Tor's
10651 control protocol to script against the Tor process and read descriptor data
10652 relays publish about themselves.")
10653 (license license:lgpl3)))
10655 (define-public python2-stem
10656 (package-with-python2 python-stem))
10658 (define-public python-pyserial
10660 (name "python-pyserial")
10665 (uri (pypi-uri "pyserial" version))
10668 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10669 (build-system python-build-system)
10671 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10673 ;; (modify-phases %standard-phases
10676 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10678 "https://github.com/pyserial/pyserial")
10679 (synopsis "Python Serial Port Bindings")
10680 (description "@code{pyserial} provide serial port bindings for Python. It
10681 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10682 and/or Xon/Xoff. The port is accessed in RAW mode.")
10683 (license license:bsd-3)))
10685 (define-public python2-pyserial
10686 (package-with-python2 python-pyserial))
10688 (define-public python-kivy
10690 (name "python-kivy")
10695 (uri (pypi-uri "Kivy" version))
10696 (file-name (string-append name "-" version ".tar.gz"))
10699 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10700 (build-system python-build-system)
10702 `(#:tests? #f ; Tests require many optional packages
10704 (modify-phases %standard-phases
10705 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10706 (lambda* (#:key inputs #:allow-other-keys)
10707 (setenv "KIVY_SDL2_PATH"
10708 (string-append (assoc-ref inputs "sdl-union")
10713 ("pkg-config" ,pkg-config)
10714 ("python-cython" ,python-cython)))
10716 `(("gstreamer" ,gstreamer)
10719 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10720 (home-page "http://kivy.org")
10722 "Multitouch application framework")
10724 "A software library for rapid development of
10725 hardware-accelerated multitouch applications.")
10726 (license license:expat)))
10728 (define-public python2-kivy
10729 (package-with-python2 python-kivy))
10731 (define-public python-kivy-next
10732 (deprecated-package "python-kivy-next" python-kivy))
10734 (define-public python2-kivy-next
10735 (deprecated-package "python2-kivy-next" python2-kivy))
10737 (define-public python-binaryornot
10739 (name "python-binaryornot")
10743 (uri (pypi-uri "binaryornot" version))
10746 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10747 (build-system python-build-system)
10749 `(("python-chardet" ,python-chardet)
10750 ("python-hypothesis" ,python-hypothesis)))
10751 (home-page "https://github.com/audreyr/binaryornot")
10752 (synopsis "Package to check if a file is binary or text")
10753 (description "Ultra-lightweight pure Python package to check if a file is
10755 (license license:bsd-3)
10756 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10758 (define-public python2-binaryornot
10759 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10760 (package (inherit base)
10762 `(("python2-enum34" ,python2-enum34)
10763 ,@(package-propagated-inputs base))))))
10765 (define-public python-nltk
10767 (name "python-nltk")
10771 (uri (pypi-uri "nltk" version))
10774 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10775 (build-system python-build-system)
10777 '(;; The tests require some extra resources to be downloaded.
10778 ;; TODO Try packaging these resources.
10780 (home-page "http://nltk.org/")
10781 (synopsis "Natural Language Toolkit")
10782 (description "It provides interfaces to over 50 corpora and lexical
10783 resources such as WordNet, along with a suite of text processing libraries
10784 for classification, tokenization, stemming, tagging, parsing, and semantic
10785 reasoning, wrappers for natural language processing libraries.")
10786 (license license:asl2.0)))
10788 (define-public python2-nltk
10789 (package-with-python2 python-nltk))
10791 (define-public python-pymongo
10793 (name "python-pymongo")
10797 (uri (pypi-uri "pymongo" version))
10800 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10801 (build-system python-build-system)
10803 `(("python-certifi" ,python-certifi)))
10804 (home-page "https://github.com/mongodb/mongo-python-driver")
10805 (synopsis "Python driver for MongoDB")
10806 (description "Python driver for MongoDB.")
10807 (license license:asl2.0)))
10809 (define-public python2-pymongo
10810 (package-with-python2 python-pymongo))
10812 (define-public python-consul
10814 (name "python-consul")
10819 (uri (pypi-uri "python-consul" version))
10822 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10823 (build-system python-build-system)
10825 '(#:tests? #f)) ; The tests are not distributed
10827 `(("python-requests" ,python-requests)
10828 ("python-six" ,python-six)))
10829 (home-page "https://github.com/cablehead/python-consul")
10830 (synopsis "Python client for Consul")
10832 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10833 discovery, monitoring and configuration.")
10834 (license license:expat)))
10836 (define-public python2-consul
10837 (package-with-python2 python-consul))
10839 (define-public python-schematics
10841 (name "python-schematics")
10846 (uri (git-reference
10847 (url "https://github.com/schematics/schematics.git")
10848 (commit (string-append "v" version))))
10849 (file-name (git-file-name name version))
10851 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10852 (build-system python-build-system)
10854 `(("python-six" ,python-six)))
10856 ;; The tests require a bunch of not very nice packages with fixed
10857 ;; version requirements (e.g. python-coveralls).
10859 (home-page "https://github.com/schematics/schematics")
10860 (synopsis "Python Data Structures for Humans")
10861 (description "Python Data Structures for Humans.")
10862 (license license:bsd-3)))
10864 (define-public python2-schematics
10865 (package-with-python2 python-schematics))
10867 (define-public python-odfpy
10869 (name "python-odfpy")
10873 (uri (pypi-uri "odfpy" version))
10876 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10878 `(#:modules ((srfi srfi-1)
10879 (guix build python-build-system)
10880 (guix build utils))
10882 (modify-phases %standard-phases
10884 ;; The test runner invokes python2 and python3 for test*.py.
10885 ;; To avoid having both in inputs, we replicate it here.
10887 (for-each (lambda (test-file) (invoke "python" test-file))
10888 (find-files "tests" "^test.*\\.py$"))
10890 (build-system python-build-system)
10891 (home-page "https://github.com/eea/odfpy")
10892 (synopsis "Python API and tools to manipulate OpenDocument files")
10893 (description "Collection of libraries and utility programs written in
10894 Python to manipulate OpenDocument 1.2 files.")
10896 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10897 ;; number of files with other licenses.
10898 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10900 (define-public python2-odfpy
10901 (package-with-python2 python-odfpy))
10903 (define-public python-natsort
10905 (name "python-natsort")
10909 (uri (pypi-uri "natsort" version))
10912 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10913 (build-system python-build-system)
10915 `(#:modules ((guix build utils)
10916 (guix build python-build-system)
10921 (modify-phases %standard-phases
10922 (add-before 'check 'set-cachedir
10923 ;; Tests require write access to $HOME by default
10924 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10927 (let ((cwd (getcwd)))
10928 (setenv "PYTHONPATH"
10931 (find (cut string-prefix? "lib" <>)
10932 (scandir (string-append cwd "/build")))
10934 (getenv "PYTHONPATH")))
10935 (invoke "pytest" "-v")))))))
10937 `(("python-hypothesis" ,python-hypothesis)
10938 ("python-pytest-cov" ,python-pytest-cov)
10939 ("python-pytest-mock" ,python-pytest-mock)
10940 ("python-pytest" ,python-pytest)))
10941 (propagated-inputs ; TODO: Add python-fastnumbers.
10942 `(("python-pyicu" ,python-pyicu)))
10943 (home-page "https://github.com/SethMMorton/natsort")
10944 (synopsis "Natural sorting for python and shell")
10946 "Natsort lets you apply natural sorting on lists instead of
10947 lexicographical. If you use the built-in @code{sorted} method in python
10948 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10949 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10950 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10951 identifies numbers and sorts them separately from strings. It can also sort
10952 version numbers, real numbers, mixed types and more, and comes with a shell
10953 command @command{natsort} that exposes this functionality in the command line.")
10954 (license license:expat)
10955 (properties `((python2-variant . ,(delay python2-natsort))))))
10957 (define-public python2-natsort
10958 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10959 (package (inherit base)
10961 `(("python2-pathlib" ,python2-pathlib)
10962 ,@(package-native-inputs base))))))
10964 (define-public python-glances
10966 (name "python-glances")
10971 (uri (pypi-uri "Glances" version))
10974 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
10975 (modules '((guix build utils)))
10978 ;; Glances phones PyPI for weekly update checks by default.
10979 ;; Disable these. The user can re-enable them if desired.
10980 (substitute* "glances/outdated.py"
10981 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
10982 (string-append indentation
10983 "self.args.disable_check_update = True\n"
10986 (build-system python-build-system)
10988 `(("python-future" ,python-future)
10989 ("python-psutil" ,python-psutil)))
10991 "https://github.com/nicolargo/glances")
10992 (synopsis "Cross-platform curses-based monitoring tool")
10994 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10995 Glances uses the PsUtil library to get information from your system. It
10996 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10997 (license license:lgpl3+)))
10999 (define-public python2-glances
11000 (package-with-python2 python-glances))
11002 (define-public python-graphql-core
11004 (name "python-graphql-core")
11009 (uri (pypi-uri "graphql-core" version))
11012 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11013 (build-system python-build-system)
11015 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11017 (modify-phases %standard-phases
11018 (add-after 'unpack 'patch-hardcoded-version
11019 (lambda _ (substitute*
11021 (("'gevent==1.1rc1'") "'gevent'"))
11024 `(("python-gevent" ,python-gevent)
11025 ("python-mock" ,python-mock)
11026 ("python-pytest-mock" ,python-pytest-mock)))
11028 `(("python-promise" ,python-promise)
11029 ("python-six" ,python-six)))
11030 (home-page "https://github.com/graphql-python/graphql-core")
11031 (synopsis "GraphQL implementation for Python")
11033 "GraphQL implementation for Python. GraphQL is a data query language and
11034 runtime designed and used to request and deliver data to mobile and web apps.
11035 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11037 (license license:expat)))
11039 (define-public python2-graphql-core
11040 (package-with-python2 python-graphql-core))
11042 (define-public python-graphql-relay
11044 (name "python-graphql-relay")
11049 (uri (pypi-uri "graphql-relay" version))
11052 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11053 (build-system python-build-system)
11055 '(#:tests? #f)) ; The tests are not distributed
11057 `(("python-graphql-core" ,python-graphql-core)
11058 ("python-promise" ,python-promise)
11059 ("python-six" ,python-six)))
11060 (home-page "https://github.com/graphql-python/graphql-relay-py")
11061 (synopsis "Relay implementation for Python")
11063 "This is a library to allow the easy creation of Relay-compliant servers
11064 using the GraphQL Python reference implementation of a GraphQL server. It
11065 should be noted that the code is a exact port of the original
11066 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11068 (license license:expat)))
11070 (define-public python2-graphql-relay
11071 (package-with-python2 python-graphql-relay))
11073 (define-public python-graphene
11075 (name "python-graphene")
11080 (uri (pypi-uri "graphene" version))
11083 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11084 (build-system python-build-system)
11086 `(("python-graphql-core" ,python-graphql-core)
11087 ("python-graphql-relay" ,python-graphql-relay)
11088 ("python-iso8601" ,python-iso8601)
11089 ("python-promise" ,python-promise)
11090 ("python-six" ,python-six)))
11092 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11093 (home-page "http://graphene-python.org/")
11094 (synopsis "GraphQL Framework for Python")
11096 "Graphene is a Python library for building GraphQL schemas/types.
11097 A GraphQL schema describes your data model, and provides a GraphQL server
11098 with an associated set of resolve methods that know how to fetch data.")
11099 (properties `((python2-variant . ,(delay python2-graphene))))
11100 (license license:expat)))
11102 (define-public python2-graphene
11103 (let ((base (package-with-python2
11104 (strip-python2-variant python-graphene))))
11105 (package (inherit base)
11107 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11108 ,@(package-native-inputs base))))))
11110 (define-public python-nautilus
11112 (name "python-nautilus")
11117 (uri (pypi-uri "nautilus" version))
11120 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11121 (build-system python-build-system)
11122 (arguments `(#:tests? #f)) ; fails to import test modules
11124 `(("python-bcrypt" ,python-bcrypt)
11125 ("python-click" ,python-click)
11126 ("python-consul" ,python-consul)
11127 ("python-graphene" ,python-graphene)
11128 ("python-jinja2" ,python-jinja2)
11129 ("python-peewee" ,python-peewee)
11130 ("python-pika" ,python-pika)
11131 ("python-tornado" ,python-tornado)
11132 ("python-wtforms" ,python-wtforms)))
11134 `(("python-nose2" ,python-nose2)))
11135 (home-page "https://github.com/AlecAivazis/nautilus")
11136 (synopsis "Library for creating microservice applications")
11138 "Nautilus is a framework for flux based microservices that looks to
11139 provide extendible implementations of common aspects of a cloud so that you can
11140 focus on building massively scalable web applications.")
11141 (license license:expat)))
11143 (define-public python-snowballstemmer
11145 (name "python-snowballstemmer")
11149 (uri (pypi-uri "snowballstemmer" version))
11152 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11153 (build-system python-build-system)
11155 `(;; No tests exist
11157 (home-page "https://github.com/shibukawa/snowball_py")
11158 (synopsis "Snowball stemming library collection for Python")
11159 (description "This package provides 16 word stemmer algorithms generated
11160 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11162 (license license:bsd-3)))
11164 (define-public python2-snowballstemmer
11165 (package-with-python2 python-snowballstemmer))
11167 (define-public python-setproctitle
11169 (name "python-setproctitle")
11174 (uri (pypi-uri "setproctitle" version))
11177 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11178 (build-system python-build-system)
11181 (modify-phases %standard-phases
11182 (add-before 'check 'patch-Makefile
11183 ;; Stricly this is only required for the python2 variant.
11184 ;; But adding a phase in an inherited package seems to be
11185 ;; cumbersum. So we patch even for python3.
11187 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11189 (substitute* "Makefile"
11190 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11191 (string-append nose "/bin/nosetests "))))
11195 (setenv "PYTHON" (or (which "python3") (which "python")))
11196 (setenv "PYCONFIG" (or (which "python3-config")
11197 (which "python-config")))
11198 (setenv "CC" "gcc")
11199 ;; No need to extend PYTHONPATH to find the built package, since
11200 ;; the Makefile will build anyway
11201 (invoke "make" "check"))))))
11203 `(("procps" ,procps))) ; required for tests
11205 "https://github.com/dvarrazzo/py-setproctitle")
11207 "Setproctitle implementation for Python to customize the process title")
11208 (description "The library allows a process to change its title (as displayed
11209 by system tools such as ps and top).
11211 Changing the title is mostly useful in multi-process systems, for
11212 example when a master process is forked: changing the children's title
11213 allows to identify the task each process is busy with. The technique
11214 is used by PostgreSQL and the OpenSSH Server for example.")
11215 (license license:bsd-3)
11216 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11218 (define-public python2-setproctitle
11219 (let ((base (package-with-python2
11220 (strip-python2-variant python-setproctitle))))
11223 (native-inputs `(("python2-nose" ,python2-nose)
11224 ,@(package-native-inputs base))))))
11226 (define-public python-validictory
11228 (name "python-validictory")
11233 (uri (pypi-uri "validictory" version))
11236 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11237 (build-system python-build-system)
11240 (modify-phases %standard-phases
11241 (add-after 'unpack 'bootstrap
11242 ;; Move the tests out of the package directory to avoid
11245 (rename-file "validictory/tests" "tests")
11246 (delete-file "tests/__init__.py")))
11249 ;; Extend PYTHONPATH so the built package will be found.
11250 (setenv "PYTHONPATH"
11251 (string-append (getcwd) "/build/lib:"
11252 (getenv "PYTHONPATH")))
11253 (invoke "py.test" "-vv" ))))))
11255 `(("python-pytest" ,python-pytest)))
11257 "https://github.com/jamesturk/validictory")
11258 (synopsis "General purpose Python data validator")
11259 (description "It allows validation of arbitrary Python data structures.
11261 The schema format is based on the JSON Schema
11262 proposal (http://json-schema.org), so combined with json the library is also
11263 useful as a validator for JSON data.")
11264 (license license:expat)))
11266 (define-public python2-validictory
11267 (package-with-python2 python-validictory))
11269 (define-public python-pyelftools
11271 (name "python-pyelftools")
11276 (uri (pypi-uri "pyelftools" version))
11279 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11280 (build-system python-build-system)
11283 (modify-phases %standard-phases
11284 (add-before 'check 'set-pythonpath
11286 (setenv "PYTHONPATH"
11289 ":" (getenv "PYTHONPATH")))
11292 "https://github.com/eliben/pyelftools")
11294 "Analyze binary and library file information")
11295 (description "This Python library provides interfaces for parsing and
11296 analyzing two binary and library file formats; the Executable and Linking
11297 Format (ELF), and debugging information in the Debugging With Attributed
11298 Record Format (DWARF).")
11299 (license license:public-domain)))
11301 (define-public python-pyev
11303 (name "python-pyev")
11308 (uri (pypi-uri "pyev" version))
11311 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11312 (build-system python-build-system)
11314 `(#:tests? #f ; no test suite
11316 (modify-phases %standard-phases
11317 (add-after 'unpack 'patch
11318 (lambda* (#:key inputs #:allow-other-keys)
11319 (let ((libev (string-append (assoc-ref inputs "libev")
11320 "/lib/libev.so.4")))
11321 (substitute* "setup.py"
11322 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11323 (string-append "libev_dll_name = \"" libev "\"")))))))))
11325 `(("libev" ,libev)))
11326 (home-page "http://pythonhosted.org/pyev/")
11327 (synopsis "Python libev interface")
11328 (description "Pyev provides a Python interface to libev.")
11329 (license license:gpl3)))
11331 (define-public python2-pyev
11332 (package-with-python2 python-pyev))
11334 (define-public python-imagesize
11336 (name "python-imagesize")
11341 (uri (pypi-uri "imagesize" version))
11344 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11345 (build-system python-build-system)
11346 (home-page "https://github.com/shibukawa/imagesize_py")
11347 (synopsis "Gets image size of files in various formats in Python")
11349 "This package allows determination of image size from
11350 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11351 (license license:expat)))
11353 (define-public python2-imagesize
11354 (package-with-python2 python-imagesize))
11356 (define-public python-termstyle
11358 (name "python-termstyle")
11363 (uri (pypi-uri "termstyle" version))
11366 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11367 (build-system python-build-system)
11370 (modify-phases %standard-phases
11373 (invoke "python" "test3.py"))))))
11374 (home-page "https://github.com/gfxmonk/termstyle")
11375 (synopsis "Console text coloring for Python")
11376 (description "This package provides console text coloring for Python.")
11377 (license license:bsd-3)))
11379 (define-public python-argcomplete
11381 (name "python-argcomplete")
11386 (uri (pypi-uri "argcomplete" version))
11389 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11390 (build-system python-build-system)
11392 `(("python-pexpect" ,python-pexpect)
11394 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11395 (home-page "https://github.com/kislyuk/argcomplete")
11396 (synopsis "Shell tab completion for Python argparse")
11397 (description "argcomplete provides extensible command line tab completion
11398 of arguments and options for Python scripts using @code{argparse}. It's
11399 particularly useful for programs with many options or sub-parsers that can
11400 dynamically suggest completions; for example, when browsing resources over the
11402 (license license:asl2.0)))
11404 (define-public python2-argcomplete
11405 (package-with-python2 python-argcomplete))
11407 (define-public python-xopen
11409 (name "python-xopen")
11414 (uri (pypi-uri "xopen" version))
11417 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11418 (build-system python-build-system)
11420 `(("python-setuptools-scm" ,python-setuptools-scm)))
11421 (home-page "https://github.com/marcelm/xopen/")
11422 (synopsis "Open compressed files transparently")
11423 (description "This module provides an @code{xopen} function that works like
11424 Python's built-in @code{open} function, but can also deal with compressed files.
11425 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11426 recognized by their file extensions. The focus is on being as efficient as
11427 possible on all supported Python versions.")
11428 (license license:expat)))
11430 (define-public python2-xopen
11431 (let ((base (package-with-python2
11432 (strip-python2-variant python-xopen))))
11435 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11436 ,@(package-propagated-inputs base))))))
11438 (define-public python-cheetah
11440 (name "python-cheetah")
11445 (uri (pypi-uri "Cheetah3" version))
11448 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11449 (build-system python-build-system)
11451 `(#:modules ((guix build utils)
11452 (guix build python-build-system)
11456 #:phases (modify-phases %standard-phases
11457 (add-after 'unpack 'use-absolute-python
11459 (substitute* "Cheetah/CheetahWrapper.py"
11460 (("#!/usr/bin/env python")
11461 (string-append "#!" (which "python"))))
11465 (let ((cwd (getcwd)))
11466 (setenv "PYTHONPATH"
11469 (find (cut string-prefix? "lib" <>)
11470 (scandir (string-append cwd "/build")))
11471 ":" (getenv "PYTHONPATH")))
11473 (string-append (getenv "PATH")
11475 (setenv "TMPDIR" "/tmp")
11477 (substitute* "Cheetah/Tests/Test.py"
11478 (("unittest.TextTestRunner\\(\\)")
11479 "unittest.TextTestRunner(verbosity=2)"))
11481 (invoke "python" "Cheetah/Tests/Test.py")))))))
11483 `(("python-markdown" ,python-markdown))) ;optional
11484 (home-page "http://cheetahtemplate.org/")
11485 (synopsis "Template engine")
11486 (description "Cheetah is a text-based template engine and Python code
11489 Cheetah can be used as a standalone templating utility or referenced as
11490 a library from other Python applications. It has many potential uses,
11491 but web developers looking for a viable alternative to ASP, JSP, PHP and
11492 PSP are expected to be its principle user group.
11496 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11498 @item Cleanly separates content, graphic design, and program code.
11499 @item Blends the power and flexibility of Python with a simple template language
11500 that non-programmers can understand.
11501 @item Gives template writers full access to any Python data structure, module,
11502 function, object, or method in their templates.
11503 @item Makes code reuse easy by providing an object-orientated interface to
11504 templates that is accessible from Python code or other Cheetah templates.
11505 One template can subclass another and selectively reimplement sections of it.
11506 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11507 improve the performance of a dynamic website.
11508 @item Compiles templates into optimized, yet readable, Python code.
11510 (license (license:x11-style "file://LICENSE"))))
11512 (define-public python2-cheetah
11513 (package-with-python2 python-cheetah))
11515 (define-public python-dulwich
11517 (name "python-dulwich")
11522 (uri (list (string-append "https://www.dulwich.io/releases/"
11523 "dulwich-" version ".tar.gz")
11524 (pypi-uri "dulwich" version)))
11527 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11528 (build-system python-build-system)
11531 (modify-phases %standard-phases
11532 (add-before 'check 'fix-tests
11533 (lambda* (#:key inputs #:allow-other-keys)
11534 ;; The tests use Popen with a custom environment which doesn't
11536 (substitute* "dulwich/tests/compat/utils.py"
11537 (("'git'") (string-append "'"
11540 (substitute* '("dulwich/tests/test_repository.py"
11541 "dulwich/tests/test_hooks.py")
11542 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11543 (setenv "TEST_RUNNER" "unittest")
11544 (setenv "PYTHONHASHSEED" "random")
11547 `(("python-fastimport" ,python-fastimport)))
11549 `(("python-mock" ,python-mock)
11550 ("python-geventhttpclient" ,python-geventhttpclient)
11552 (home-page "https://www.dulwich.io/")
11553 (synopsis "Git implementation in Python")
11554 (description "Dulwich is an implementation of the Git file formats and
11555 protocols written in pure Python.")
11556 ;; Can be used with either license.
11557 (license (list license:asl2.0 license:gpl2+))))
11559 (define-public python2-dulwich
11560 (package-with-python2 python-dulwich))
11562 (define-public python-pbkdf2
11564 (name "python-pbkdf2")
11569 (uri (pypi-uri "pbkdf2" version))
11572 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11573 (build-system python-build-system)
11576 (modify-phases %standard-phases
11579 (setenv "PYTHONPATH"
11580 (string-append (getcwd) "/build/lib:"
11581 (getenv "PYTHONPATH")))
11582 (invoke "python" "test/test_pbkdf2.py"))))))
11584 `(("python-pycrypto" ,python-pycrypto))) ; optional
11585 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11586 (synopsis "Password-based key derivation")
11587 (description "This module implements the password-based key derivation
11588 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11590 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11591 is part of the RSA Public Key Cryptography Standards series. The provided
11592 implementation takes a password or a passphrase and a salt value (and
11593 optionally a iteration count, a digest module, and a MAC module) and provides
11594 a file-like object from which an arbitrarly-sized key can be read.")
11595 (license license:expat)))
11597 (define-public python2-pbkdf2
11598 (package-with-python2 python-pbkdf2))
11600 (define-public python-qrcode
11602 (name "python-qrcode")
11607 (uri (pypi-uri "qrcode" version))
11609 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11610 (build-system python-build-system)
11612 ;; FIXME: Tests require packaging 'pymaging'.
11615 `(("python-lxml" ,python-lxml) ; for SVG output
11616 ("python-pillow" ,python-pillow) ; for PNG output
11617 ("python-six" ,python-six)))
11618 (home-page "https://github.com/lincolnloop/python-qrcode")
11619 (synopsis "QR Code image generator")
11620 (description "This package provides a pure Python QR Code generator
11621 module. It uses the Python Imaging Library (PIL) to allow for the generation
11624 In addition this package provides a command line tool to generate QR codes and
11625 either write these QR codes to a file or do the output as ascii art at the
11627 (license license:bsd-3)))
11629 (define-public python2-qrcode
11630 (package-with-python2 python-qrcode))
11632 (define-public python-rst2ansi
11634 (name "python-rst2ansi")
11639 (uri (pypi-uri "rst2ansi" version))
11642 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11643 (build-system python-build-system)
11645 `(("python-docutils" ,python-docutils)))
11646 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11647 (synopsis "Convert RST to ANSI-decorated console output")
11649 "Python module dedicated to rendering RST (reStructuredText) documents
11650 to ansi-escaped strings suitable for display in a terminal.")
11651 (license license:expat)))
11653 (define-public python-ansi2html
11655 (name "python-ansi2html")
11660 (uri (pypi-uri "ansi2html" version))
11663 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11664 (build-system python-build-system)
11666 `(("python-mock" ,python-mock)
11667 ("python-nose" ,python-nose)))
11669 `(("python-six" ,python-six)))
11670 (home-page "https://github.com/ralphbean/ansi2html")
11671 (synopsis "Convert ANSI-decorated console output to HTML")
11673 "@command{ansi2html} is a Python library and command line utility for
11674 convering text with ANSI color codes to HTML or LaTeX.")
11675 (license license:gpl3+)))
11677 (define-public python2-ansi2html
11678 (package-with-python2 python-ansi2html))
11680 (define-public python-ddt
11682 (name "python-ddt")
11687 (uri (pypi-uri "ddt" version))
11690 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11691 (build-system python-build-system)
11693 `(("python-mock" ,python-mock)
11694 ("python-nose" ,python-nose)))
11696 `(("python-six" ,python-six)
11697 ("python-pyyaml" ,python-pyyaml)))
11698 (home-page "https://github.com/txels/ddt")
11699 (synopsis "Data-Driven Tests")
11701 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11702 running it with different test data, and make it appear as multiple test
11704 (license license:expat)))
11706 (define-public python2-ddt
11707 (package-with-python2 python-ddt))
11709 (define-public python-pycountry
11711 (name "python-pycountry")
11712 (version "18.5.26")
11716 (uri (pypi-uri "pycountry" version))
11719 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11720 (build-system python-build-system)
11721 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11722 (synopsis "ISO databases for languages, countries, currencies, etc.")
11724 "@code{pycountry} provides the ISO databases for the standards:
11726 @item 639-3 (Languages)
11727 @item 3166 (Countries)
11728 @item 3166-3 (Deleted Countries)
11729 @item 3166-2 (Subdivisions of countries)
11730 @item 4217 (Currencies)
11731 @item 15924 (Scripts)
11733 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11734 through a Python API.")
11735 (license license:lgpl2.1+)))
11737 (define-public python2-pycountry
11738 (package-with-python2 python-pycountry))
11740 (define-public python-pycosat
11742 (name "python-pycosat")
11747 (uri (pypi-uri "pycosat" version))
11750 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11751 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11752 (build-system python-build-system)
11753 (home-page "https://github.com/ContinuumIO/pycosat")
11754 (synopsis "Bindings to picosat (a SAT solver)")
11756 "This package provides efficient Python bindings to @code{picosat} on
11757 the C level. When importing pycosat, the @code{picosat} solver becomes part
11758 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11759 Problem} (SAT) solver.")
11760 (license license:expat)))
11762 (define-public python2-pycosat
11763 (package-with-python2 python-pycosat))
11765 (define-public python2-ruamel.ordereddict
11767 (name "python2-ruamel.ordereddict")
11772 (uri (pypi-uri "ruamel.ordereddict" version))
11775 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11776 (build-system python-build-system)
11778 `(#:python ,python-2
11780 (modify-phases %standard-phases
11782 (add-after 'install 'check
11783 (lambda* (#:key inputs outputs #:allow-other-keys)
11784 (add-installed-pythonpath inputs outputs)
11785 (invoke "python" "test/testordereddict.py"))))))
11786 (home-page "https://bitbucket.org/ruamel/ordereddict")
11787 (synopsis "Version of dict that keeps keys in insertion order")
11789 "This is an implementation of an ordered dictionary with @dfn{Key
11790 Insertion Order} (KIO: updates of values do not affect the position of the
11791 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11792 removed and put at the back). The standard library module @code{OrderedDict},
11793 implemented later, implements a subset of @code{ordereddict} functionality.
11794 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11795 Order} (KSO, no sorting function can be specified, but a transform can be
11796 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11797 (license license:expat)))
11799 (define-public python-pypeg2
11801 (name "python-pypeg2")
11806 (uri (pypi-uri "pyPEG2" version))
11809 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11810 (build-system python-build-system)
11811 (propagated-inputs `(("python-lxml" ,python-lxml)))
11813 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11815 (home-page "https://fdik.org/pyPEG/")
11816 (synopsis "Parsering Expression Grammars in Python")
11817 (description "PyPEG is an intrinsic parser interpreter framework for
11818 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11819 parse many formal languages.")
11820 (license license:gpl2)))
11822 (define-public python-incremental
11824 (name "python-incremental")
11829 (uri (pypi-uri "incremental" version))
11832 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11833 (build-system python-build-system)
11834 (home-page "https://github.com/hawkowl/incremental")
11835 (synopsis "Library for versioning Python projects")
11836 (description "Incremental is a small library that versions your Python
11838 (license license:expat)))
11840 (define-public python2-incremental
11841 (package-with-python2 python-incremental))
11843 (define-public python-invoke
11845 (name "python-invoke")
11846 (home-page "http://www.pyinvoke.org/")
11850 (uri (pypi-uri "invoke" version))
11853 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11854 (build-system python-build-system)
11856 ;; XXX: Requires many dependencies that are not yet in Guix.
11858 (synopsis "Pythonic task execution")
11860 "Invoke is a Python task execution tool and library, drawing inspiration
11861 from various sources to arrive at a powerful and clean feature set. It is
11862 evolved from the Fabric project, but focuses on local and abstract concerns
11863 instead of servers and network commands.")
11864 (license license:bsd-3)))
11866 (define-public python2-invoke
11867 (package-with-python2 python-invoke))
11869 (define-public python-automat
11871 (name "python-automat")
11875 (uri (pypi-uri "Automat" version))
11878 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11879 (build-system python-build-system)
11880 ;; We disable the tests because they require python-twisted, while
11881 ;; python-twisted depends on python-automat. Twisted is optional, but the
11882 ;; tests fail if it is not available. Also see
11883 ;; <https://github.com/glyph/automat/issues/71>.
11884 (arguments '(#:tests? #f))
11886 `(("python-m2r" ,python-m2r)
11887 ("python-setuptools-scm" ,python-setuptools-scm)
11888 ("python-graphviz" ,python-graphviz)))
11890 `(("python-six" ,python-six)
11891 ("python-attrs" ,python-attrs)))
11892 (home-page "https://github.com/glyph/Automat")
11893 (synopsis "Self-service finite-state machines")
11894 (description "Automat is a library for concise, idiomatic Python
11895 expression of finite-state automata (particularly deterministic finite-state
11897 (license license:expat)))
11899 (define-public python2-automat
11900 (package-with-python2 python-automat))
11902 (define-public python-m2r
11904 (name "python-m2r")
11908 (uri (pypi-uri "m2r" version))
11911 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11912 (build-system python-build-system)
11914 `(("python-docutils" ,python-docutils)
11915 ("python-mistune" ,python-mistune)))
11917 `(("python-pygments" ,python-pygments)
11918 ("python-mock" ,python-mock)))
11919 (home-page "https://github.com/miyakogi/m2r")
11920 (synopsis "Markdown to reStructuredText converter")
11921 (description "M2R converts a markdown file including reST markups to valid
11923 (license license:expat)))
11925 (define-public python2-m2r
11926 (package-with-python2 python-m2r))
11928 (define-public python-constantly
11930 (name "python-constantly")
11934 (uri (pypi-uri "constantly" version))
11937 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11938 (build-system python-build-system)
11939 (home-page "https://github.com/twisted/constantly")
11940 (synopsis "Symbolic constants in Python")
11941 (description "Constantly is a Python library that provides symbolic
11942 constant support. It includes collections and constants with text, numeric,
11943 and bit flag values.")
11944 (license license:expat)))
11946 (define-public python2-constantly
11947 (package-with-python2 python-constantly))
11949 (define-public python-attrs
11951 (name "python-attrs")
11955 (uri (pypi-uri "attrs" version))
11958 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11959 (build-system python-build-system)
11961 `(#:modules ((guix build utils)
11962 (guix build python-build-system)
11966 #:phases (modify-phases %standard-phases
11969 (let ((cwd (getcwd)))
11970 (setenv "PYTHONPATH"
11973 (find (cut string-prefix? "lib" <>)
11974 (scandir (string-append cwd "/build")))
11976 (getenv "PYTHONPATH")))
11977 (invoke "python" "-m" "pytest")))))))
11979 `(("python-coverage" ,python-coverage)
11980 ("python-hypothesis" ,python-hypothesis)
11981 ("python-pympler" ,python-pympler)
11982 ("python-pytest" ,python-pytest)
11983 ("python-six" ,python-six)
11984 ("python-sphinx" ,python-sphinx)
11985 ("python-zope-interface" ,python-zope-interface)))
11986 (home-page "https://github.com/python-attrs/attrs/")
11987 (synopsis "Attributes without boilerplate")
11988 (description "@code{attrs} is a Python package with class decorators that
11989 ease the chores of implementing the most common attribute-related object
11991 (license license:expat)))
11993 (define-public python2-attrs
11994 (package-with-python2 python-attrs))
11996 (define-public python-attrs-bootstrap
11998 (inherit python-attrs)
11999 (name "python-attrs-bootstrap")
12000 (native-inputs `())
12001 (arguments `(#:tests? #f))))
12003 (define-public python2-attrs-bootstrap
12004 (package-with-python2 python-attrs-bootstrap))
12006 (define-public python2-cliapp
12008 (name "python2-cliapp")
12009 (version "1.20180812.1")
12013 (uri (string-append
12014 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12015 version ".tar.gz"))
12018 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12019 (build-system python-build-system)
12021 `(#:python ,python-2
12023 (modify-phases %standard-phases
12024 ;; check phase needs to be run before the build phase. If not,
12025 ;; coverage-test-runner looks for tests for the built source files,
12028 (add-before 'build 'check
12030 ;; Disable python3 tests
12031 (substitute* "check"
12032 (("python3") "# python3"))
12033 (invoke "./check"))))))
12035 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12036 ("python2-pep8" ,python2-pep8)))
12038 `(("python2-pyaml" ,python2-pyaml)))
12039 (home-page "https://liw.fi/cliapp/")
12040 (synopsis "Python framework for command line programs")
12041 (description "@code{python2-cliapp} is a python framework for
12042 command line programs. It contains the typical stuff such programs
12043 need to do, such as parsing the command line for options, and
12044 iterating over input files.")
12045 (license license:gpl2+)))
12047 (define-public python2-ttystatus
12049 (name "python2-ttystatus")
12054 (uri (string-append
12055 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12056 version ".tar.gz"))
12059 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12060 (build-system python-build-system)
12062 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12063 ("python2-pep8" ,python2-pep8)))
12065 `(#:python ,python-2
12067 (modify-phases %standard-phases
12068 ;; check phase needs to be run before the build phase. If not,
12069 ;; coverage-test-runner looks for tests for the built source files,
12072 (add-before 'build 'check
12073 (lambda _ (invoke "make" "check"))))))
12074 (home-page "https://liw.fi/ttystatus/")
12075 (synopsis "Python library for showing progress reporting and
12076 status updates on terminals")
12077 (description "@code{python2-ttystatus} is a python library for
12078 showing progress reporting and status updates on terminals, for
12079 command line programs. Output is automatically adapted to the width
12080 of the terminal: truncated if it does not fit, and resized if the
12081 terminal size changes.")
12082 (license license:gpl3+)))
12084 (define-public python2-tracing
12086 (name "python2-tracing")
12091 (uri (string-append
12092 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12093 version ".tar.gz"))
12096 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12097 (build-system python-build-system)
12099 `(#:python ,python-2))
12100 (home-page "https://liw.fi/tracing/")
12101 (synopsis "Python debug logging helper")
12102 (description "@code{python2-tracing} is a python library for
12103 logging debug messages. It provides a way to turn debugging messages
12104 on and off, based on the filename they occur in. It is much faster
12105 than using @code{logging.Filter} to accomplish the same thing, which
12106 matters when code is run in production mode. The actual logging still
12107 happens using the @code{logging} library.")
12108 (license license:gpl3+)))
12110 (define-public python2-larch
12112 (name "python2-larch")
12113 (version "1.20151025")
12117 (uri (string-append
12118 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12119 version ".tar.gz"))
12120 (patches (search-patches
12121 "python2-larch-coverage-4.0a6-compatibility.patch"))
12124 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12125 (build-system python-build-system)
12127 `(#:python ,python-2
12129 (modify-phases %standard-phases
12130 ;; check phase needs to be run before the build phase. If not,
12131 ;; coverage-test-runner looks for tests for the built source files,
12134 (add-before 'build 'check
12135 (lambda _ (invoke "make" "check"))))))
12137 `(("cmdtest" ,cmdtest)
12138 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12140 `(("python2-tracing" ,python2-tracing)))
12141 (home-page "https://liw.fi/larch/")
12142 (synopsis "Python copy-on-write B-tree library")
12143 (description "@code{python2-larch} is an implementation of
12144 particular kind of B-tree, based on research by Ohad Rodeh. See
12145 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12146 on the data structure.
12148 The distinctive feature of this B-tree is that a node is never
12149 (conceptually) modified. Instead, all updates are done by
12150 copy-on-write. This makes it easy to clone a tree, and modify only the
12151 clone, while other processes access the original tree.")
12152 (license license:gpl3+)))
12154 (define-public python-astroid
12156 (name "python-astroid")
12161 (uri (pypi-uri "astroid" version))
12164 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12165 (build-system python-build-system)
12167 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12168 ("python-six" ,python-six)
12169 ("python-wrapt" ,python-wrapt)))
12171 `(("python-dateutil" ,python-dateutil)
12172 ("python-nose" ,python-nose)
12173 ("python-pytest" ,python-pytest)
12174 ("python-pytest-runner" ,python-pytest-runner)))
12177 (modify-phases %standard-phases
12178 (add-after 'unpack 'remove-spurious-test
12180 ;; This can be removed after upgrading from python-3.7
12181 ;; https://github.com/PyCQA/astroid/issues/593
12182 ;; https://bugs.python.org/issue34056
12183 (delete-file "astroid/tests/unittest_modutils.py")
12187 (invoke "pytest" "astroid"))))))
12188 (home-page "https://github.com/PyCQA/astroid")
12189 (synopsis "Common base representation of python source code for pylint and
12191 (description "@code{python-astroid} provides a common base representation
12192 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12194 It provides a compatible representation which comes from the _ast module. It
12195 rebuilds the tree generated by the builtin _ast module by recursively walking
12196 down the AST and building an extended ast. The new node classes have
12197 additional methods and attributes for different usages. They include some
12198 support for static inference and local name scopes. Furthermore, astroid
12199 builds partial trees by inspecting living objects.")
12200 (license license:lgpl2.1+)
12201 (properties `((python2-variant . ,(delay python2-astroid))))))
12203 (define-public python2-astroid
12204 (let ((base (package-with-python2
12205 (strip-python2-variant python-astroid))))
12206 (package (inherit base)
12207 ;; Version 2.x removes python2 support.
12212 (uri (pypi-uri "astroid" version))
12215 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12217 (substitute-keyword-arguments (package-arguments base)
12219 `(modify-phases ,phases
12220 (add-after 'unpack 'remove-spurious-test
12222 ;; https://github.com/PyCQA/astroid/issues/276
12223 (delete-file "astroid/tests/unittest_brain.py")
12227 (invoke"python" "-m" "unittest" "discover"
12228 "-p" "unittest*.py")))))))
12229 (native-inputs `())
12231 `(("python2-backports-functools-lru-cache"
12232 ,python2-backports-functools-lru-cache)
12233 ("python2-enum34" ,python2-enum34)
12234 ("python2-singledispatch" ,python2-singledispatch)
12235 ,@(package-propagated-inputs base))))))
12237 (define-public python-isort
12239 (name "python-isort")
12244 (uri (git-reference
12245 ;; Tests pass only from the Github sources
12246 (url "https://github.com/timothycrosley/isort")
12248 (file-name (git-file-name name version))
12251 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12252 (build-system python-build-system)
12254 `(("python-mock" ,python-mock)
12255 ("python-pytest" ,python-pytest)))
12256 (home-page "https://github.com/timothycrosley/isort")
12257 (synopsis "Python utility/library to sort python imports")
12258 (description "@code{python-isort} is a python utility/library to sort
12259 imports alphabetically, and automatically separated into sections. It
12260 provides a command line utility, a python library and plugins for various
12262 (license license:expat)
12263 (properties `((python2-variant . ,(delay python2-isort))))))
12265 (define-public python2-isort
12266 (let ((base (package-with-python2
12267 (strip-python2-variant python-isort))))
12268 (package (inherit base)
12270 `(("python2-futures" ,python2-futures)
12271 ,@(package-native-inputs base))))))
12273 (define-public python2-backports-functools-lru-cache
12275 (name "python2-backports-functools-lru-cache")
12280 ;; only the pypi tarballs contain the necessary metadata
12281 (uri (pypi-uri "backports.functools_lru_cache" version))
12284 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12285 (build-system python-build-system)
12287 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12289 `(#:python ,python-2))
12290 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12291 (synopsis "Backport of functools.lru_cache from Python 3.3")
12292 (description "@code{python2-backports-functools-lru-cache} is a backport
12293 of @code{functools.lru_cache} from python 3.3.")
12294 (license license:expat)))
12296 (define-public python-configparser
12298 (name "python-configparser")
12303 (uri (pypi-uri "configparser" version))
12306 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12307 (build-system python-build-system)
12308 (home-page "https://github.com/jaraco/configparser/")
12309 (synopsis "Backport of configparser from python 3.5")
12310 (description "@code{python-configparser} is a backport of
12311 @code{configparser} from Python 3.5 so that it can be used directly
12312 in other versions.")
12313 (license license:expat)))
12315 (define-public python2-configparser
12316 (package-with-python2 python-configparser))
12318 (define-public python-mando
12320 (name "python-mando")
12324 (uri (pypi-uri "mando" version))
12327 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12328 (build-system python-build-system)
12330 `(("python-rst2ansi" ,python-rst2ansi)
12331 ("python-six" ,python-six)))
12333 `(("python-pytest" ,python-pytest)))
12334 (home-page "https://mando.readthedocs.org/")
12336 "Wrapper around argparse, allowing creation of complete CLI applications")
12338 "This package is a wrapper around argparse, allowing you to write complete CLI
12339 applications in seconds while maintaining all the flexibility.")
12340 (license license:expat)))
12342 (define-public python2-mando
12343 (package-with-python2 python-mando))
12345 (define-public python2-argparse
12347 (name "python2-argparse")
12352 (uri (pypi-uri "argparse" version))
12355 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12356 (build-system python-build-system)
12358 `(#:python ,python-2))
12359 (home-page "https://github.com/ThomasWaldmann/argparse/")
12360 (synopsis "Python command-line parsing library")
12362 "This package is mostly for people who want to have @code{argparse} on
12363 older Pythons because it was not part of the standard library back then.")
12364 (license license:psfl)))
12366 (define-public python-fudge
12368 (name "python-fudge")
12369 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12370 ;; package, which is currently the only use of this package.
12375 (uri (pypi-uri "fudge" version))
12378 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12379 (build-system python-build-system)
12381 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12382 (home-page "https://github.com/fudge-py/fudge")
12383 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12385 "Fudge is a Python module for using fake objects (mocks and stubs) to
12388 In readable Python code, you declare the methods available on your fake object
12389 and how they should be called. Then you inject that into your application and
12390 start testing. This declarative approach means you don’t have to record and
12391 playback actions and you don’t have to inspect your fakes after running code.
12392 If the fake object was used incorrectly then you’ll see an informative
12393 exception message with a traceback that points to the culprit.")
12394 (license license:expat)))
12396 (define-public python2-fudge
12397 (package-with-python2 python-fudge))
12399 (define-public python-mwclient
12401 (name "python-mwclient")
12406 ;; The PyPI version wouldn't contain tests.
12407 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12408 "v" version ".tar.gz"))
12409 (file-name (string-append name "-" version ".tar.gz"))
12412 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12413 (build-system python-build-system)
12415 `(("python-requests" ,python-requests)
12416 ("python-requests-oauthlib"
12417 ,python-requests-oauthlib)
12418 ("python-six" ,python-six)))
12420 `(("python-mock" ,python-mock)
12421 ("python-pytest" ,python-pytest)
12422 ("python-pytest-pep8" ,python-pytest-pep8)
12423 ("python-pytest-cache" ,python-pytest-cache)
12424 ("python-pytest-cov" ,python-pytest-cov)
12425 ("python-responses" ,python-responses)))
12426 (home-page "https://github.com/btongminh/mwclient")
12427 (synopsis "MediaWiki API client")
12428 (description "This package provides a MediaWiki API client.")
12429 (license license:expat)))
12431 (define-public python2-mwclient
12432 (package-with-python2 python-mwclient))
12434 (define-public python-utils
12436 (name "python-utils")
12440 (uri (pypi-uri "python-utils" version))
12443 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12444 (build-system python-build-system)
12446 `(("pytest-runner" ,python-pytest-runner)
12447 ("pytest" ,python-pytest)
12448 ("six" ,python-six)))
12449 (home-page "https://github.com/WoLpH/python-utils")
12450 (synopsis "Convenient utilities not included with the standard Python install")
12452 "Python Utils is a collection of small Python functions and classes which
12453 make common patterns shorter and easier.")
12454 (license license:bsd-2)))
12456 (define-public python2-utils
12457 (package-with-python2 python-utils))
12459 (define-public python-diff-match-patch
12461 (name "python-diff-match-patch")
12462 (version "20121119")
12466 (uri (pypi-uri "diff-match-patch" version))
12469 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12470 (build-system python-build-system)
12471 (home-page "https://code.google.com/p/google-diff-match-patch")
12472 (synopsis "Synchronize plain text")
12473 (description "Diff Match and Patch libraries offer robust algorithms to
12474 perform the operations required for synchronizing plain text.")
12475 (license license:asl2.0)))
12477 (define-public python2-diff-match-patch
12478 (package-with-python2 python-diff-match-patch))
12480 (define-public python-dirsync
12482 (name "python-dirsync")
12487 (uri (pypi-uri "dirsync" version))
12490 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12491 (build-system python-build-system)
12493 `(("six" ,python-six)))
12494 (home-page "https://bitbucket.org/tkhyn/dirsync")
12495 (synopsis "Advanced directory tree synchronisation tool")
12496 (description "Advanced directory tree synchronisation tool.")
12497 (license license:expat)))
12499 (define-public python2-dirsync
12500 (package-with-python2 python-dirsync))
12502 (define-public python-levenshtein
12504 (name "python-levenshtein")
12509 (uri (pypi-uri "python-Levenshtein" version))
12512 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12513 (build-system python-build-system)
12514 (home-page "https://github.com/ztane/python-Levenshtein")
12515 (synopsis "Fast computation of Levenshtein distance and string similarity")
12517 "The Levenshtein Python C extension module contains functions for fast computation of
12519 @item Levenshtein (edit) distance, and edit operations
12520 @item string similarity
12521 @item approximate median strings, and generally string averaging
12522 @item string sequence and set similarity
12524 It supports both normal and Unicode strings.")
12525 (license license:gpl2+)))
12527 (define-public python2-levenshtein
12528 (package-with-python2 python-levenshtein))
12530 (define-public python-scandir
12532 (name "python-scandir")
12537 (uri (pypi-uri "scandir" version))
12539 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12540 (build-system python-build-system)
12542 `(#:phases (modify-phases %standard-phases
12545 (invoke "python" "test/run_tests.py"))))))
12546 (home-page "https://github.com/benhoyt/scandir")
12547 (synopsis "Directory iteration function")
12549 "Directory iteration function like os.listdir(), except that instead of
12550 returning a list of bare filenames, it yields DirEntry objects that include
12551 file type and stat information along with the name. Using scandir() increases
12552 the speed of os.walk() by 2-20 times (depending on the platform and file
12553 system) by avoiding unnecessary calls to os.stat() in most cases.
12555 This package is part of the Python standard library since version 3.5.")
12556 (license license:bsd-3)))
12558 (define-public python2-scandir
12559 (package-with-python2 python-scandir))
12561 (define-public python2-stemming
12563 (name "python2-stemming")
12568 (uri (pypi-uri "stemming" version))
12570 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12571 (build-system python-build-system)
12573 `(#:python ,python-2))
12574 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12575 (synopsis "Python implementations of various stemming algorithms")
12577 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12578 stemming algorithms for English. These implementations are straightforward and
12579 efficient, unlike some Python versions of the same algorithms available on the
12580 Web. This package is an extraction of the stemming code included in the Whoosh
12582 (license license:public-domain)))
12584 (define-public python-factory-boy
12586 (name "python-factory-boy")
12591 (uri (pypi-uri "factory_boy" version))
12593 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12594 (build-system python-build-system)
12596 ;; Tests are not included in the tarball.
12599 `(("faker" ,python-faker)))
12600 (home-page "https://github.com/benhoyt/scandir")
12601 (synopsis "Versatile test fixtures replacement")
12603 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12605 As a fixtures replacement tool, it aims to replace static, hard to maintain
12606 fixtures with easy-to-use factories for complex object.
12608 Instead of building an exhaustive test setup with every possible combination
12609 of corner cases, factory_boy allows you to use objects customized for the
12610 current test, while only declaring the test-specific fields")
12611 (license license:expat)))
12613 (define-public python2-factory-boy
12614 (package-with-python2 python-factory-boy))
12616 (define-public python-translate-toolkit
12618 (name "python-translate-toolkit")
12623 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12625 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12626 (build-system python-build-system)
12628 `(("python-pytest" ,python-pytest)
12629 ("python-sphinx" ,python-sphinx)))
12631 `(("python-babel" ,python-babel)
12632 ("python-beautifulsoup4" ,python-beautifulsoup4)
12633 ("python-chardet" ,python-chardet)
12634 ("python-diff-match-patch" ,python-diff-match-patch)
12635 ("python-levenshtein" ,python-levenshtein)
12636 ("python-lxml" ,python-lxml)
12637 ("python-six" ,python-six)
12638 ("python-vobject" ,python-vobject)
12639 ("python-pyyaml" ,python-pyyaml)))
12641 ;; TODO: tests are not run, because they end with
12642 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12644 ;; during test setup.
12646 (home-page "https://toolkit.translatehouse.org")
12647 (synopsis "Tools and API for translation and localization engineering")
12649 "Tools and API for translation and localization engineering. It contains
12650 several utilities, as well as an API for building localization tools.")
12651 (license license:gpl2+)))
12653 (define-public python2-translate-toolkit
12654 (package-with-python2 python-translate-toolkit))
12656 (define-public python-packaging
12658 (name "python-packaging")
12663 (uri (pypi-uri "packaging" version))
12666 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12667 (build-system python-build-system)
12669 `(#:phases (modify-phases %standard-phases
12671 (lambda _ (invoke "py.test" "-vv"))))))
12673 `(("python-pretend" ,python-pretend)
12674 ("python-pytest" ,python-pytest)))
12676 `(("python-pyparsing" ,python-pyparsing)
12677 ("python-six" ,python-six)))
12678 (home-page "https://github.com/pypa/packaging")
12679 (synopsis "Core utilities for Python packages")
12680 (description "Packaging is a Python module for dealing with Python packages.
12681 It offers an interface for working with package versions, names, and dependency
12683 ;; From 'LICENSE': This software is made available under the terms of
12684 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12685 ;; Contributions to this software is made under the terms of *both* these
12687 (license (list license:asl2.0 license:bsd-2))))
12689 (define-public python2-packaging
12690 (package-with-python2 python-packaging))
12692 (define-public python-relatorio
12694 (name "python-relatorio")
12699 (uri (pypi-uri "relatorio" version))
12702 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12703 (build-system python-build-system)
12705 `(("python-lxml" ,python-lxml)
12706 ("python-genshi" ,python-genshi)))
12708 `(("python-magic" ,python-magic)))
12709 (home-page "https://relatorio.tryton.org/")
12710 (synopsis "Templating library able to output ODT and PDF files")
12711 (description "Relatorio is a templating library which provides a way to
12712 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12713 for more filetypes can be easily added by creating plugins for them.")
12714 (license license:gpl3+)))
12716 (define-public python2-relatorio
12717 (package-with-python2 python-relatorio))
12719 (define-public python-radon
12721 (name "python-radon")
12726 (uri (pypi-uri "radon" version))
12729 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12730 (build-system python-build-system)
12732 `(#:phases (modify-phases %standard-phases
12735 (invoke "python" "radon/tests/run.py"))))))
12737 `(("python-colorama" ,python-colorama)
12738 ("python-flake8-polyfill" ,python-flake8-polyfill)
12739 ("python-mando" ,python-mando)))
12741 `(("python-pytest" ,python-pytest)
12742 ("python-pytest-mock" ,python-pytest-mock)))
12743 (home-page "https://radon.readthedocs.org/")
12744 (synopsis "Code Metrics in Python")
12745 (description "Radon is a Python tool which computes various code metrics.
12746 Supported metrics are:
12748 @item raw metrics: SLOC, comment lines, blank lines, &c.
12749 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12750 @item Halstead metrics (all of them)
12751 @item the Maintainability Index (a Visual Studio metric)
12753 (license license:expat)))
12755 (define-public python2-radon
12756 (package-with-python2 python-radon))
12758 (define-public python-sure
12760 (name "python-sure")
12765 (uri (pypi-uri "sure" version))
12768 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12769 (build-system python-build-system)
12771 `(("python-mock" ,python-mock)
12772 ("python-six" ,python-six)))
12774 `(("python-nose" ,python-nose)))
12775 (home-page "https://github.com/gabrielfalcao/sure")
12776 (synopsis "Automated testing library in python for python")
12778 "Sure is a python library that leverages a DSL for writing assertions.
12779 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12780 (license license:gpl3+)))
12782 (define-public python2-sure
12783 (package-with-python2 python-sure))
12785 (define-public python2-couleur
12786 ;; This package does not seem to support python3 at all, hence,
12787 ;; only the python2 variant definition is provided.
12789 (name "python2-couleur")
12794 (uri (pypi-uri "couleur" version))
12797 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12798 (build-system python-build-system)
12800 `(#:python ,python-2))
12801 (home-page "https://github.com/gabrielfalcao/couleur")
12803 "ANSI terminal tool for python, colored shell and other handy fancy features")
12805 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12806 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12807 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12808 ;; https://github.com/gabrielfalcao/couleur/issues/11
12809 (license license:lgpl3+)))
12811 (define-public python-misaka
12813 (name "python-misaka")
12818 (uri (pypi-uri "misaka" version))
12821 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12822 (build-system python-build-system)
12824 `(;; Line 37 of setup.py calls self.run_command('develop')
12825 ;; in the 'check' phase. This command seems to be trying
12827 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12828 ;; for which it does not have the permission to write.
12831 `(("python-cffi" ,python-cffi)))
12832 (home-page "https://github.com/FSX/misaka")
12833 (synopsis "Python binding for Hoedown")
12835 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12836 library written in C. It features a fast HTML renderer and functionality to make custom
12837 renderers (e.g. man pages or LaTeX).")
12838 (license license:expat)))
12840 (define-public python2-misaka
12841 (package-with-python2 python-misaka))
12843 (define-public python2-steadymark
12844 ;; This is forced into being a python2 only variant
12845 ;; due to its dependence on couleur that has no support
12848 (name "python2-steadymark")
12853 (uri (pypi-uri "steadymark" version))
12856 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12857 (build-system python-build-system)
12859 `(("python-couleur" ,python2-couleur)
12860 ("python-sure" ,python2-sure)
12861 ("python-misaka" ,python2-misaka)))
12863 `(#:python ,python-2
12865 (modify-phases %standard-phases
12866 (add-before 'build 'patch-setup-py
12868 ;; Update requirements from dependency==version
12869 ;; to dependency>=version
12870 (substitute* "setup.py"
12873 (home-page "https://github.com/gabrielfalcao/steadymark")
12874 (synopsis "Markdown-based test runner for python")
12876 "@code{Steadymark} allows documentation to be written in github-flavoured
12877 markdown. The documentation may contain snippets of code surrounded by python
12878 code blocks and @code{Steadymark} will find these snippets and run them, making
12879 sure that there are no old malfunctional examples in the documentation examples.")
12880 (license license:expat)))
12882 (define-public python-jsonpointer
12884 (name "python-jsonpointer")
12889 (uri (pypi-uri "jsonpointer" version))
12892 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12893 (build-system python-build-system)
12894 (home-page "https://github.com/stefankoegl/python-json-pointer")
12895 (synopsis "Identify specific nodes in a JSON document")
12896 (description "@code{jsonpointer} allows you to access specific nodes
12897 by path in a JSON document (see RFC 6901).")
12898 (license license:bsd-3)))
12900 (define-public python2-jsonpointer
12901 (package-with-python2 python-jsonpointer))
12903 (define-public python-jsonpatch
12905 (name "python-jsonpatch")
12910 ;; pypi version lacks tests.js
12911 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12912 "archive/v" version ".tar.gz"))
12913 (file-name (string-append name "-" version ".tar.gz"))
12916 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12917 (build-system python-build-system)
12919 `(("python-jsonpointer" ,python-jsonpointer)))
12920 (home-page "https://github.com/stefankoegl/python-json-patch")
12921 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12922 (description "@code{jsonpatch} is a library and program that allows
12923 applying JSON Patches according to RFC 6902.")
12924 (license license:bsd-3)))
12926 (define-public python2-jsonpatch
12927 (package-with-python2 python-jsonpatch))
12929 (define-public python-jsonpatch-0.4
12930 (package (inherit python-jsonpatch)
12931 (name "python-jsonpatch")
12936 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12937 "archive/v" version ".tar.gz"))
12938 (file-name (string-append name "-" version ".tar.gz"))
12941 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12943 (define-public python2-jsonpatch-0.4
12944 (package-with-python2 python-jsonpatch-0.4))
12946 (define-public python-rfc3986
12948 (name "python-rfc3986")
12952 (uri (pypi-uri "rfc3986" version))
12955 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12956 (build-system python-build-system)
12958 `(#:modules ((guix build utils)
12959 (guix build python-build-system)
12964 (modify-phases %standard-phases
12967 (let ((cwd (getcwd)))
12968 (setenv "PYTHONPATH"
12969 (string-append cwd "/build/"
12970 (find (cut string-prefix? "lib" <>)
12971 (scandir (string-append cwd "/build")))
12973 (getenv "PYTHONPATH")))
12974 (invoke "pytest" "-v")))))))
12976 `(("python-pytest" ,python-pytest)))
12977 (home-page "https://rfc3986.readthedocs.io/")
12978 (synopsis "Parse and validate URI references")
12980 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12981 validation and authority parsing. This module also supports RFC@tie{}6874
12982 which adds support for zone identifiers to IPv6 addresses.")
12983 (license license:asl2.0)))
12985 (define-public python2-rfc3986
12986 (package-with-python2 python-rfc3986))
12988 (define-public python-rfc3987
12990 (name "python-rfc3987")
12995 (uri (pypi-uri "rfc3987" version))
12998 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12999 (build-system python-build-system)
13000 (home-page "https://pypi.python.org/pypi/rfc3987")
13001 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13002 (description "@code{rfc3987} provides routines for parsing and
13003 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13004 (license license:gpl3+)))
13006 (define-public python2-rfc3987
13007 (package-with-python2 python-rfc3987))
13009 (define-public python-validate-email
13011 (name "python-validate-email")
13016 (uri (pypi-uri "validate_email" version))
13019 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13020 (build-system python-build-system)
13021 (home-page "https://github.com/syrusakbary/validate_email")
13022 (synopsis "Verifies if an email address is valid and really exists")
13023 (description "@code{validate_email} can be used to verify if an email
13024 address is valid and really exists.")
13025 (license license:lgpl3+)))
13027 (define-public python2-validate-email
13028 (package-with-python2 python-validate-email))
13030 (define-public python-flex
13032 (name "python-flex")
13037 (uri (pypi-uri "flex" version))
13040 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13041 (build-system python-build-system)
13043 `(("python-click" ,python-click)
13044 ("python-iso8601" ,python-iso8601)
13045 ("python-jsonpointer" ,python-jsonpointer)
13046 ("python-pyyaml" ,python-pyyaml)
13047 ("python-requests" ,python-requests)
13048 ("python-rfc3987" ,python-rfc3987)
13049 ("python-six" ,python-six)
13050 ("python-validate-email" ,python-validate-email)))
13051 (home-page "https://github.com/pipermerriam/flex")
13052 (synopsis "Validates Swagger schemata")
13053 (description "@code{flex} can be used to validate Swagger schemata.")
13054 (license license:bsd-3)))
13056 (define-public python2-flex
13057 (package-with-python2 python-flex))
13059 (define-public python-marshmallow
13061 (name "python-marshmallow")
13062 (version "3.0.0b14")
13066 (uri (pypi-uri "marshmallow" version))
13069 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13070 (build-system python-build-system)
13072 `(("python-dateutil" ,python-dateutil)
13073 ("python-simplejson" ,python-simplejson)))
13075 `(("python-pytest" ,python-pytest)
13076 ("python-pytz" ,python-pytz)))
13077 (home-page "https://github.com/marshmallow-code/marshmallow")
13078 (synopsis "Convert complex datatypes to and from native
13079 Python datatypes.")
13080 (description "@code{marshmallow} provides a library for converting
13081 complex datatypes to and from native Python datatypes.")
13082 (license license:expat)))
13084 (define-public python2-marshmallow
13085 (package-with-python2 python-marshmallow))
13087 (define-public python-apispec
13089 (name "python-apispec")
13094 (uri (pypi-uri "apispec" version))
13097 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13098 (build-system python-build-system)
13100 `(("python-pyyaml" ,python-pyyaml)))
13102 `(("python-pytest" ,python-pytest)
13103 ("python-flask" ,python-flask)
13104 ("python-marshmallow" ,python-marshmallow)
13105 ("python-tornado" ,python-tornado)
13106 ("python-bottle" ,python-bottle)
13107 ("python-mock" ,python-mock)))
13108 (home-page "https://github.com/marshmallow-code/apispec")
13109 (synopsis "Swagger 2.0 API specification generator")
13110 (description "@code{python-apispec} is a pluggable API specification
13111 generator. Currently supports the OpenAPI specification (f.k.a.
13113 (license license:expat)))
13115 (define-public python2-apispec
13116 (package-with-python2 python-apispec))
13118 (define-public python-flasgger
13120 (name "python-flasgger")
13125 (uri (git-reference
13126 (url "https://github.com/rochacbruno/flasgger.git")
13128 (file-name (git-file-name name version))
13130 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13131 (build-system python-build-system)
13134 (modify-phases %standard-phases
13136 (lambda* (#:key inputs outputs #:allow-other-keys)
13137 (substitute* "Makefile"
13138 (("flake8 flasgger --ignore=F403")
13139 "flake8 flasgger --ignore=E731,F403"))
13140 (setenv "PYTHONPATH" (string-append (getcwd)
13142 (getenv "PYTHONPATH")))
13143 (invoke "py.test"))))))
13145 `(("python-flask" ,python-flask)
13146 ("python-pyyaml" ,python-pyyaml)
13147 ("python-jsonschema" ,python-jsonschema)
13148 ("python-mistune" ,python-mistune)
13149 ("python-six" ,python-six)))
13151 `(("python-decorator" ,python-decorator)
13152 ("python-flake8" ,python-flake8)
13153 ("python-flask-restful" ,python-flask-restful)
13154 ("python-flex" ,python-flex)
13155 ("python-pytest" ,python-pytest)
13156 ("python-pytest-cov" ,python-pytest-cov)
13157 ("python-marshmallow" ,python-marshmallow)
13158 ("python-apispec" ,python-apispec)))
13159 (home-page "https://github.com/rochacbruno/flasgger/")
13160 (synopsis "Extract Swagger specs from your Flask project")
13161 (description "@code{python-flasgger} allows extracting Swagger specs
13162 from your Flask project. It is a fork of Flask-Swagger.")
13163 (license license:expat)))
13165 (define-public python2-flasgger
13166 (package-with-python2 python-flasgger))
13168 (define-public python-swagger-spec-validator
13170 (name "python-swagger-spec-validator")
13175 (uri (pypi-uri "swagger-spec-validator" version))
13178 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13179 (build-system python-build-system)
13181 `(("python-jsonschema" ,python-jsonschema)
13182 ("python-pyyaml" ,python-pyyaml)
13183 ("python-six" ,python-six)))
13185 "https://github.com/Yelp/swagger_spec_validator")
13186 (synopsis "Validation of Swagger specifications")
13187 (description "@code{swagger_spec_validator} provides a library for
13188 validating Swagger API specifications.")
13189 (license license:asl2.0)))
13191 (define-public python2-swagger-spec-validator
13192 (package-with-python2 python-swagger-spec-validator))
13194 (define-public python-apache-libcloud
13196 (name "python-apache-libcloud")
13201 (uri (pypi-uri "apache-libcloud" version))
13204 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13205 (build-system python-build-system)
13208 (modify-phases %standard-phases
13209 (add-after 'unpack 'patch-ssh
13210 (lambda* (#:key inputs #:allow-other-keys)
13211 (substitute* "libcloud/compute/ssh.py"
13212 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13215 (add-after 'unpack 'patch-tests
13217 (substitute* "./libcloud/test/test_file_fixtures.py"
13218 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13219 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13220 return (httplib.OK,
13222 {\"test\": \"value\"},
13223 httplib.responses[httplib.OK])
13225 (substitute* "libcloud/test/compute/test_ssh_client.py"
13226 (("class ShellOutSSHClientTests")
13227 "@unittest.skip(\"Guix container doesn't have ssh service\")
13228 class ShellOutSSHClientTests")
13229 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13230 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13231 (("'.xF0', '.x90', '.x8D', '.x88'")
13232 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13234 (add-before 'check 'copy-secret
13236 (copy-file "libcloud/test/secrets.py-dist"
13237 "libcloud/test/secrets.py")
13240 `(("openssh" ,openssh)))
13242 `(("python-paramiko" ,python-paramiko)
13243 ("python-requests" ,python-requests)))
13245 `(("python-lockfile" ,python-lockfile)
13246 ("python-mock" ,python-mock)
13247 ("python-pytest" ,python-pytest)
13248 ("python-pytest-runner" ,python-pytest-runner)
13249 ("python-requests-mock" ,python-requests-mock)))
13250 (home-page "https://libcloud.apache.org/")
13251 (synopsis "Unified Cloud API")
13252 (description "@code{libcloud} is a Python library for interacting with
13253 many of the popular cloud service providers using a unified API.")
13254 (license license:asl2.0)))
13256 (define-public python2-apache-libcloud
13257 (package-with-python2 python-apache-libcloud))
13259 (define-public python-smmap2
13261 (name "python-smmap2")
13266 (uri (pypi-uri "smmap2" version))
13269 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13270 (build-system python-build-system)
13272 `(("python-nosexcover" ,python-nosexcover)))
13273 (home-page "https://github.com/Byron/smmap")
13274 (synopsis "Python sliding window memory map manager")
13275 (description "@code{smmap2} is a pure Python implementation of a sliding
13276 window memory map manager.")
13277 (license license:bsd-3)))
13279 (define-public python2-smmap2
13280 (package-with-python2 python-smmap2))
13282 (define-public python-regex
13284 (name "python-regex")
13285 (version "2019.04.14")
13288 (uri (pypi-uri "regex" version))
13291 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13292 ;; TODO: Fix and enable regex_test.py tests that complain about the
13293 ;; test.support module not existing.
13294 (build-system python-build-system)
13295 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13296 (synopsis "Alternative regular expression module")
13297 (description "This regular expression implementation is backwards-
13298 compatible with the standard @code{re} module, but offers additional
13299 functionality like full case-folding for case-insensitive matches in Unicode.")
13300 (license license:psfl)))
13302 (define-public python2-regex
13303 (package-with-python2 python-regex))
13305 (define-public python2-pyopengl
13307 (name "python2-pyopengl")
13312 (uri (pypi-uri "PyOpenGL" version))
13315 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13317 `(#:python ,python-2))
13318 (build-system python-build-system)
13319 (home-page "http://pyopengl.sourceforge.net")
13320 (synopsis "Standard OpenGL bindings for Python")
13322 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13323 related APIs. The binding is created using the standard @code{ctypes}
13325 (license license:bsd-3)))
13327 (define-public python2-pyopengl-accelerate
13329 (inherit python2-pyopengl)
13330 (name "python2-pyopengl-accelerate")
13335 (uri (pypi-uri "PyOpenGL-accelerate" version))
13338 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13339 (synopsis "Acceleration code for PyOpenGL")
13341 "This is the Cython-coded accelerator module for PyOpenGL.")))
13343 (define-public python-rencode
13345 (name "python-rencode")
13350 (uri (pypi-uri "rencode" version))
13353 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13354 (build-system python-build-system)
13357 (modify-phases %standard-phases
13358 (add-before 'check 'delete-bogus-test
13359 ;; This test requires /home/aresch/Downloads, which is not provided by
13360 ;; the build environment.
13362 (delete-file "rencode/t.py")
13364 (native-inputs `(("pkg-config" ,pkg-config)
13365 ("python-cython" ,python-cython)))
13366 (home-page "https://github.com/aresch/rencode")
13367 (synopsis "Serialization of heterogeneous data structures")
13369 "The @code{rencode} module is a data structure serialization library,
13370 similar to @code{bencode} from the BitTorrent project. For complex,
13371 heterogeneous data structures with many small elements, r-encoding stake up
13372 significantly less space than b-encodings. This version of rencode is a
13373 complete rewrite in Cython to attempt to increase the performance over the
13374 pure Python module.")
13375 (license license:bsd-3)))
13377 (define-public python2-rencode
13378 (package-with-python2 python-rencode))
13380 (define-public python-xenon
13382 (name "python-xenon")
13387 (uri (pypi-uri "xenon" version))
13390 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13391 (build-system python-build-system)
13393 `(("python-pyyaml" ,python-pyyaml)
13394 ("python-radon" ,python-radon)
13395 ("python-requests" ,python-requests)
13396 ("python-flake8" ,python-flake8)
13397 ("python-tox" ,python-tox)))
13400 (modify-phases %standard-phases
13401 (add-before 'build 'patch-test-requirements
13403 ;; Remove httpretty dependency for tests.
13404 (substitute* "setup.py"
13405 (("httpretty") ""))
13407 (home-page "https://xenon.readthedocs.org/")
13408 (synopsis "Monitor code metrics for Python on your CI server")
13410 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13411 Ideally, @code{xenon} is run every time code is committed. Through command
13412 line options, various thresholds can be set for the complexity of code. It
13413 will fail (i.e. it will exit with a non-zero exit code) when any of these
13414 requirements is not met.")
13415 (license license:expat)))
13417 (define-public python2-xenon
13418 (package-with-python2 python-xenon))
13420 (define-public python-pysocks
13422 (name "python-pysocks")
13427 (uri (pypi-uri "PySocks" version))
13430 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13431 (build-system python-build-system)
13432 (arguments `(#:tests? #f))
13433 (home-page "https://github.com/Anorov/PySocks")
13434 (synopsis "SOCKS client module")
13435 (description "@code{pysocks} is an updated and semi-actively maintained
13436 version of @code{SocksiPy} with bug fixes and extra features.")
13437 (license license:bsd-3)))
13439 (define-public python2-pysocks
13440 (package-with-python2 python-pysocks))
13442 (define-public python-pydiff
13444 (name "python-pydiff")
13449 (uri (pypi-uri "pydiff" version))
13452 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13453 (build-system python-build-system)
13454 (home-page "https://github.com/myint/pydiff")
13455 (synopsis "Library to diff two Python files at the bytecode level")
13457 "@code{pydiff} makes it easy to look for actual code changes while
13458 ignoring formatting changes.")
13459 (license license:expat)))
13461 (define-public python2-pydiff
13462 (package-with-python2 python-pydiff))
13464 (define-public python-tqdm
13466 (name "python-tqdm")
13471 (uri (pypi-uri "tqdm" version))
13474 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13475 (build-system python-build-system)
13477 `(("python-flake8" ,python-flake8)
13478 ("python-nose" ,python-nose)
13479 ("python-coverage" ,python-coverage)))
13480 (home-page "https://github.com/tqdm/tqdm")
13481 (synopsis "Fast, extensible progress meter")
13483 "Make loops show a progress bar on the console by just wrapping any
13484 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13485 design and layout.")
13486 (license (list license:mpl2.0 license:expat))))
13488 (define-public python2-tqdm
13489 (package-with-python2 python-tqdm))
13491 (define-public python-pkginfo
13493 (name "python-pkginfo")
13498 (uri (pypi-uri "pkginfo" version))
13501 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13502 (build-system python-build-system)
13504 ;; The tests are broken upstream.
13507 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13509 "Query metadatdata from sdists, bdists, and installed packages")
13511 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13512 source distriubtion (an sdist) or a binary distribution (e.g., created by
13513 running bdist_egg). It can also query the EGG-INFO directory of an installed
13514 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13515 created by running @code{python setup.py develop}).")
13516 (license license:expat)))
13518 (define-public python2-pkginfo
13519 (package-with-python2 python-pkginfo))
13521 (define-public python-twine
13523 (name "python-twine")
13528 (uri (pypi-uri "twine" version))
13531 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13532 (build-system python-build-system)
13534 `(("python-tqdm" ,python-tqdm)
13535 ("python-pkginfo" ,python-pkginfo)
13536 ("python-requests" ,python-requests)
13537 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13538 (home-page "https://github.com/pypa/twine")
13539 (synopsis "Collection of utilities for interacting with PyPI")
13541 "@code{twine} currently supports registering projects and uploading
13542 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13543 their files and supports any packaging format (including wheels).")
13544 (license license:asl2.0)))
13546 (define-public python2-twine
13547 (package-with-python2 python-twine))
13549 (define-public python-linecache2
13551 (name "python-linecache2")
13556 (uri (pypi-uri "linecache2" version))
13559 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13560 (build-system python-build-system)
13562 `(;; The tests depend on unittest2, and our version is a bit too old.
13565 `(("python-pbr" ,python-pbr-minimal)))
13567 "https://github.com/testing-cabal/linecache2")
13568 (synopsis "Backports of the linecache module")
13570 "The linecache module allows one to get any line from any file, while
13571 attempting to optimize internally, using a cache, the common case where many
13572 lines are read from a single file.")
13573 (license license:psfl)))
13575 (define-public python2-linecache2
13576 (package-with-python2 python-linecache2))
13578 (define-public python-traceback2
13580 (name "python-traceback2")
13585 (uri (pypi-uri "traceback2" version))
13588 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13589 (build-system python-build-system)
13591 `(;; python-traceback2 and python-unittest2 depend on one another.
13594 `(("python-pbr" ,python-pbr-minimal)))
13596 `(("python-linecache2" ,python-linecache2)))
13598 "https://github.com/testing-cabal/traceback2")
13599 (synopsis "Backports of the traceback module")
13601 "This module provides a standard interface to extract, format and print
13602 stack traces of Python programs. It exactly mimics the behavior of the Python
13603 interpreter when it prints a stack trace.")
13604 (license license:psfl)))
13606 (define-public python2-traceback2
13607 (package-with-python2 python-traceback2))
13609 (define-public python-ratelimiter
13611 (name "python-ratelimiter")
13616 (uri (pypi-uri "ratelimiter" version))
13619 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13620 (build-system python-build-system)
13622 '(#:tests? #f)) ; There are no tests in the pypi archive.
13623 (home-page "https://github.com/RazerM/ratelimiter")
13624 (synopsis "Simple rate limiting object")
13626 "The @code{ratelimiter} module ensures that an operation will not be
13627 executed more than a given number of times during a given period.")
13628 (license license:asl2.0)))
13630 (define-public python2-ratelimiter
13631 (package-with-python2 python-ratelimiter))
13633 (define-public python-dukpy
13635 (name "python-dukpy")
13640 (uri (git-reference
13641 (url "https://github.com/kovidgoyal/dukpy.git")
13642 (commit (string-append "v" version))))
13643 (file-name (git-file-name name version))
13645 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13646 (build-system python-build-system)
13647 (home-page "https://github.com/kovidgoyal/dukpy")
13648 (synopsis "Run JavaScript in python")
13650 "dukpy is a JavaScript runtime environment for Python using the duktape
13651 embeddable JavaScript engine.")
13652 ;; Dukpy is licensed under MIT like the embedded duktape library,
13653 ;; with 'errors.c' as GPL3.
13654 (license (list license:expat license:gpl3))))
13656 (define-public python2-dukpy
13657 (package-with-python2 python-dukpy))
13659 (define-public python-jsonrpclib-pelix
13661 (name "python-jsonrpclib-pelix")
13666 (uri (pypi-uri "jsonrpclib-pelix" version))
13669 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13670 (build-system python-build-system)
13672 `(#:tests? #f)) ; no tests in PyPI tarball
13673 (home-page "https://github.com/tcalmant/jsonrpclib/")
13674 (synopsis "JSON-RPC 2.0 client library for Python")
13676 "This library implements the JSON-RPC v2.0
13677 specification (backwards-compatible) as a client library for Python. This
13678 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13680 (license license:asl2.0)))
13682 (define-public python2-jsonrpclib-pelix
13683 (package-with-python2 python-jsonrpclib-pelix))
13685 (define-public python-setuptools-scm-git-archive
13687 (name "python-setuptools-scm-git-archive")
13692 (uri (pypi-uri "setuptools_scm_git_archive" version))
13695 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13696 (build-system python-build-system)
13698 `(("python-pytest" ,python-pytest)))
13700 `(("python-setuptools-scm" ,python-setuptools-scm)))
13701 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13702 (synopsis "Setuptools_scm plugin for git archives")
13704 "The setuptools_scm_git_archive package is a plugin to
13705 setuptools_scm, which supports obtaining versions from git archives that
13706 belong to tagged versions.")
13707 (license license:expat)))
13709 (define-public python2-setuptools-scm-git-archive
13710 (package-with-python2 python-setuptools-scm-git-archive))
13712 (define-public python-setuptools-git
13714 (name "python-setuptools-git")
13719 (uri (pypi-uri "setuptools-git" version))
13722 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13723 (build-system python-build-system)
13726 (modify-phases %standard-phases
13727 ;; This is needed for tests.
13728 (add-after 'unpack 'configure-git
13730 (setenv "HOME" "/tmp")
13731 (invoke "git" "config" "--global" "user.email" "guix")
13732 (invoke "git" "config" "--global" "user.name" "guix")
13735 `(("git" ,git-minimal)))
13736 (home-page "https://github.com/msabramo/setuptools-git")
13737 (synopsis "Setuptools revision control system plugin for Git")
13739 "This package provides a plugin for Setuptools for revision control with
13741 (license license:bsd-3)))
13743 (define-public python-pyclipper
13745 (name "python-pyclipper")
13746 (version "1.1.0.post1")
13750 (uri (pypi-uri "pyclipper" version ".zip"))
13753 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13754 (modules '((guix build utils)))
13757 ;; This file is generated by Cython.
13758 (delete-file "pyclipper/pyclipper.cpp") #t))))
13759 (build-system python-build-system)
13762 (modify-phases %standard-phases
13763 (add-before 'build 'cythonize-sources
13765 (with-directory-excursion "pyclipper"
13766 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13768 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13770 `(("python-cython" ,python-cython)
13771 ("python-pytest" ,python-pytest)
13772 ("python-pytest-runner" ,python-pytest-runner)
13773 ("python-unittest2" ,python-unittest2)
13775 (home-page "https://github.com/greginvm/pyclipper")
13776 (synopsis "Wrapper for Angus Johnson's Clipper library")
13778 "Pyclipper is a Cython wrapper for the C++ translation of the
13779 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13780 (license license:expat)))
13782 (define-public python2-pyclipper
13783 (package-with-python2 python-pyclipper))
13785 (define-public python2-booleanoperations
13787 (name "python2-booleanoperations")
13792 (uri (pypi-uri "booleanOperations" version ".zip"))
13795 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13796 (build-system python-build-system)
13798 `(#:python ,python-2))
13801 ("python2-pytest" ,python2-pytest)
13802 ("python2-pytest-runner" ,python2-pytest-runner)))
13804 `(("python-fonttools" ,python2-fonttools)
13805 ("python-pyclipper" ,python2-pyclipper)
13806 ("python-ufolib" ,python2-ufolib)))
13807 (home-page "https://github.com/typemytype/booleanOperations")
13808 (synopsis "Boolean operations on paths")
13810 "BooleanOperations provides a Python library that enables
13811 boolean operations on paths.")
13812 (license license:expat)))
13814 (define-public python-tempdir
13816 (name "python-tempdir")
13821 (uri (pypi-uri "tempdir" version))
13824 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13825 (build-system python-build-system)
13826 (home-page "https://pypi.org/project/tempdir/")
13828 ;; the package has no tests
13830 (synopsis "Python library for managing temporary directories")
13832 "This library manages temporary directories that are automatically
13833 deleted with all their contents when they are no longer needed. It is
13834 particularly convenient for use in tests.")
13835 (license license:expat)))
13837 (define-public python2-tempdir
13838 (package-with-python2 python-tempdir))
13840 (define-public python-activepapers
13842 (name "python-activepapers")
13847 (uri (pypi-uri "ActivePapers.Py" version))
13850 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13851 (build-system python-build-system)
13853 `(#:modules ((ice-9 ftw)
13856 (guix build python-build-system))
13859 (modify-phases %standard-phases
13860 (add-after 'unpack 'delete-python2-code
13862 (for-each delete-file
13863 '("lib/activepapers/builtins2.py"
13864 "lib/activepapers/standardlib2.py"
13865 "lib/activepapers/utility2.py"))))
13868 ;; Deactivate the test cases that download files
13869 (setenv "NO_NETWORK_ACCESS" "1")
13870 ;; For some strange reason, some tests fail if nosetests runs all
13871 ;; test modules in a single execution. They pass if each test
13872 ;; module is run individually.
13873 (for-each (lambda (filename)
13874 (invoke "nosetests"
13875 (string-append "tests/" filename)))
13878 (string-suffix? ".py" filename)))))))))
13880 `(("python-tempdir" ,python-tempdir)
13881 ("python-nose" ,python-nose)))
13883 `(("python-h5py" ,python-h5py)))
13884 (home-page "http://www.activepapers.org/")
13885 (synopsis "Executable papers for scientific computing")
13887 "ActivePapers is a tool for working with executable papers, which
13888 combine data, code, and documentation in single-file packages,
13889 suitable for publication as supplementary material or on repositories
13890 such as figshare or Zenodo.")
13891 (properties `((python2-variant . ,(delay python2-activepapers))))
13892 (license license:bsd-3)))
13894 (define-public python2-activepapers
13895 (let ((base (package-with-python2
13896 (strip-python2-variant python-activepapers))))
13900 (substitute-keyword-arguments (package-arguments base)
13902 `(modify-phases ,phases
13903 (delete 'delete-python2-code)
13904 (add-after 'unpack 'delete-python3-code
13906 (for-each delete-file
13907 '("lib/activepapers/builtins3.py"
13908 "lib/activepapers/standardlib3.py"
13909 "lib/activepapers/utility3.py")))))))))))
13911 (define-public python-semver
13913 (name "python-semver")
13918 (uri (pypi-uri "semver" version))
13921 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13922 (build-system python-build-system)
13925 (modify-phases %standard-phases
13926 (add-after 'unpack 'patch-test-requirements
13928 (substitute* "setup.py"
13929 ;; Our Python is new enough.
13930 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13933 `(("python-tox" ,python-tox)
13934 ("python-virtualenv" ,python-virtualenv)))
13935 (home-page "https://github.com/k-bx/python-semver")
13936 (synopsis "Python helper for Semantic Versioning")
13937 (description "This package provides a Python library for
13938 @url{Semantic Versioning, http://semver.org/}.")
13939 (license license:bsd-3)))
13941 (define-public python2-semver
13942 (package-with-python2 python-semver))
13944 (define-public python-pyro4
13946 (name "python-pyro4")
13951 (uri (pypi-uri "Pyro4" version))
13953 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13954 (build-system python-build-system)
13956 `(("python-serpent" ,python-serpent)))
13957 (home-page "https://pyro4.readthedocs.io")
13958 (synopsis "Distributed object middleware for Python")
13960 "Pyro enables you to build applications in which objects can talk to each
13961 other over the network. You can just use normal Python method calls to call
13962 objects on other machines, also known as remote procedure calls (RPC).")
13963 (license license:expat)))
13965 (define-public python2-pyro
13967 (name "python2-pyro")
13972 (uri (pypi-uri "Pyro" version))
13973 (file-name (string-append "Pyro-" version ".tar.gz"))
13976 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13977 (build-system python-build-system)
13979 ;; Pyro is not compatible with Python 3
13980 `(#:python ,python-2
13981 ;; Pyro has no test cases for automatic execution
13983 (home-page "http://pythonhosted.org/Pyro/")
13984 (synopsis "Distributed object manager for Python")
13985 (description "Pyro is a Distributed Object Technology system
13986 written in Python that is designed to be easy to use. It resembles
13987 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13988 which is a system and language independent Distributed Object Technology
13989 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13990 longer maintained. New projects should use Pyro4 instead, which
13991 is the new Pyro version that is actively developed.")
13992 (license license:expat)))
13994 (define-public python2-scientific
13996 (name "python2-scientific")
14001 (uri (string-append "https://bitbucket.org/khinsen/"
14002 "scientificpython/downloads/ScientificPython-"
14003 version ".tar.gz"))
14004 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14007 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14008 (build-system python-build-system)
14010 `(("netcdf" ,netcdf)))
14012 `(("python-numpy" ,python2-numpy-1.8)
14013 ("python-pyro" ,python2-pyro)))
14015 ;; ScientificPython is not compatible with Python 3
14016 `(#:python ,python-2
14017 #:tests? #f ; No test suite
14019 (modify-phases %standard-phases
14021 (lambda* (#:key inputs #:allow-other-keys)
14022 (invoke "python" "setup.py" "build"
14023 (string-append "--netcdf_prefix="
14024 (assoc-ref inputs "netcdf"))))))))
14025 (home-page "https://bitbucket.org/khinsen/scientificpython")
14026 (synopsis "Python modules for scientific computing")
14027 (description "ScientificPython is a collection of Python modules that are
14028 useful for scientific computing. Most modules are rather general (Geometry,
14029 physical units, automatic derivatives, ...) whereas others are more
14030 domain-specific (e.g. netCDF and PDB support). The library is currently
14031 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14032 (license license:cecill-c)))
14034 (define-public python2-mmtk
14036 (name "python2-mmtk")
14041 (uri (string-append "https://bitbucket.org/khinsen/"
14042 "mmtk/downloads/MMTK-" version ".tar.gz"))
14043 (file-name (string-append "MMTK-" version ".tar.gz"))
14046 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14047 (build-system python-build-system)
14049 `(("netcdf" ,netcdf)))
14051 `(("python-scientific" ,python2-scientific)
14052 ("python-tkinter" ,python-2 "tk")))
14054 `(#:python ,python-2
14057 (modify-phases %standard-phases
14058 (add-before 'build 'includes-from-scientific
14059 (lambda* (#:key inputs #:allow-other-keys)
14060 (mkdir-p "Include/Scientific")
14063 (assoc-ref inputs "python-scientific")
14064 "/include/python2.7/Scientific")
14065 "Include/Scientific"))))))
14066 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14067 (synopsis "Python library for molecular simulation")
14068 (description "MMTK is a library for molecular simulations with an emphasis
14069 on biomolecules. It provides widely used methods such as Molecular Dynamics
14070 and normal mode analysis, but also basic routines for implementing new methods
14071 for simulation and analysis. The library is currently not actively maintained
14072 and works only with Python 2 and NumPy < 1.9.")
14073 (license license:cecill-c)))
14075 (define-public python-phonenumbers
14077 (name "python-phonenumbers")
14082 (uri (pypi-uri "phonenumbers" version))
14085 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14086 (build-system python-build-system)
14088 "https://github.com/daviddrysdale/python-phonenumbers")
14090 "Python library for dealing with international phone numbers")
14092 "This package provides a Python port of Google's libphonenumber library.")
14093 (license license:asl2.0)))
14095 (define-public python2-phonenumbers
14096 (package-with-python2 python-phonenumbers))
14098 (define-public python-send2trash
14100 (name "python-send2trash")
14103 (origin (method git-fetch)
14104 ;; Source tarball on PyPI doesn't include tests.
14105 (uri (git-reference
14106 (url "https://github.com/hsoft/send2trash.git")
14108 (file-name (git-file-name name version))
14111 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14112 (build-system python-build-system)
14115 (modify-phases %standard-phases
14116 (add-before 'check 'pre-check
14118 (mkdir-p "/tmp/foo")
14119 (setenv "HOME" "/tmp/foo")
14121 (home-page "https://github.com/hsoft/send2trash")
14122 (synopsis "Send files to the user's @file{~/Trash} directory")
14123 (description "This package provides a Python library to send files to the
14124 user's @file{~/Trash} directory.")
14125 (properties `((python2-variant . ,(delay python2-send2trash))))
14126 (license license:bsd-3)))
14128 (define-public python2-send2trash
14130 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14132 (substitute-keyword-arguments (package-arguments python-send2trash)
14134 `(modify-phases ,phases
14135 (add-before 'check 'setenv
14137 (setenv "PYTHONPATH"
14138 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14141 (define-public python-yapf
14143 (name "python-yapf")
14148 (uri (pypi-uri "yapf" version))
14151 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14152 (build-system python-build-system)
14153 (home-page "https://github.com/google/yapf")
14154 (synopsis "Formatter for Python code")
14155 (description "YAPF is a formatter for Python code. It's based off of
14156 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14157 takes the code and reformats it to the best formatting that conforms to the
14158 style guide, even if the original code didn't violate the style guide.")
14159 (license license:asl2.0)))
14161 (define-public python2-yapf
14162 (package-with-python2 python-yapf))
14164 (define-public python-gyp
14165 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14168 (name "python-gyp")
14169 ;; Google does not release versions,
14170 ;; based on second most recent commit date.
14171 (version (git-version "0.0.0" revision commit))
14174 ;; Google does not release tarballs,
14175 ;; git checkout is needed.
14177 (uri (git-reference
14178 (url "https://chromium.googlesource.com/external/gyp")
14180 (file-name (git-file-name name version))
14183 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14184 (build-system python-build-system)
14185 (home-page "https://gyp.gsrc.io/")
14186 (synopsis "GYP is a Meta-Build system")
14188 "GYP builds build systems for large, cross platform applications.
14189 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14190 files, and Makefiles.")
14191 (license license:bsd-3))))
14193 (define-public python2-gyp
14194 (package-with-python2 python-gyp))
14196 (define-public python-whatever
14198 (name "python-whatever")
14203 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14207 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14208 (file-name (string-append name "-" version ".tar.gz"))))
14209 (build-system python-build-system)
14212 (modify-phases %standard-phases
14215 (invoke "py.test"))))))
14217 `(("python-pytest" ,python-pytest)))
14218 (home-page "http://github.com/Suor/whatever")
14219 (synopsis "Make anonymous functions by partial application of operators")
14220 (description "@code{whatever} provides an easy way to make anonymous
14221 functions by partial application of operators.")
14222 (license license:bsd-3)))
14224 (define-public python2-whatever
14225 (package-with-python2 python-whatever))
14227 (define-public python-funcy
14229 (name "python-funcy")
14234 (uri (git-reference
14235 (url "https://github.com/Suor/funcy.git")
14238 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14239 (file-name (git-file-name name version))))
14240 (build-system python-build-system)
14243 (modify-phases %standard-phases
14246 (invoke "py.test"))))))
14248 `(("python-pytest" ,python-pytest)
14249 ("python-whatever" ,python-whatever)))
14250 (home-page "http://github.com/Suor/funcy")
14251 (synopsis "Functional tools")
14252 (description "@code{funcy} is a library that provides functional tools.
14255 @item merge - Merges collections of the same type
14256 @item walk - Type-preserving map
14257 @item select - Selects a part of a collection
14258 @item take - Takes the first n items of a collection
14259 @item first - Takes the first item of a collection
14260 @item remove - Predicated-removes items of a collection
14261 @item concat - Concatenates two collections
14262 @item flatten - Flattens a collection with subcollections
14263 @item distinct - Returns only distinct items
14264 @item split - Predicated-splits a collection
14265 @item split_at - Splits a collection at a given item
14266 @item group_by - Groups items by group
14267 @item pairwise - Pairs off adjacent items
14268 @item partial - Partially-applies a function
14269 @item curry - Curries a function
14270 @item compose - Composes functions
14271 @item complement - Complements a predicate
14272 @item all_fn - \"all\" with predicate
14274 (license license:bsd-3)))
14276 (define-public python2-funcy
14277 (package-with-python2 python-funcy))
14279 (define-public python-isoweek
14281 (name "python-isoweek")
14286 (uri (pypi-uri "isoweek" version))
14289 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14290 (build-system python-build-system)
14291 (home-page "https://github.com/gisle/isoweek")
14292 (synopsis "Objects representing a week")
14293 (description "The @code{isoweek} module provide the class Week that
14294 implements the week definition of ISO 8601. This standard also defines
14295 a notation for identifying weeks; yyyyWww (where the W is a literal).
14296 Week instances stringify to this form.")
14297 (license license:bsd-3)))
14299 (define-public python2-isoweek
14300 (package-with-python2 python-isoweek))
14302 (define-public python-tokenize-rt
14304 (name "python-tokenize-rt")
14309 (uri (pypi-uri "tokenize-rt" version))
14312 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14313 (build-system python-build-system)
14314 (home-page "https://github.com/asottile/tokenize-rt")
14315 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14317 "This Python library is a wrapper around @code{tokenize} from the Python
14318 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14319 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14320 and @code{tokens_to_src} to roundtrip.")
14321 (license license:expat)))
14323 (define-public python-future-fstrings
14325 (name "python-future-fstrings")
14330 (uri (pypi-uri "future_fstrings" version))
14333 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14334 (build-system python-build-system)
14336 `(("python-tokenize-rt" ,python-tokenize-rt)))
14337 (home-page "https://github.com/asottile/future-fstrings")
14338 (synopsis "Backport of fstrings to Python < 3.6")
14340 "This package provides a UTF-8 compatible encoding
14341 @code{future_fstrings}, which performs source manipulation. It decodes the
14342 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14343 @code{f} strings.")
14344 (license license:expat)))
14346 (define-public python-typed-ast
14348 (name "python-typed-ast")
14353 (uri (pypi-uri "typed-ast" version))
14356 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14357 (build-system python-build-system)
14359 `(#:modules ((guix build utils)
14360 (guix build python-build-system)
14365 (modify-phases %standard-phases
14368 (let ((cwd (getcwd)))
14369 (setenv "PYTHONPATH"
14370 (string-append cwd "/build/"
14371 (find (cut string-prefix? "lib" <>)
14372 (scandir (string-append cwd "/build")))
14374 (getenv "PYTHONPATH"))))
14377 (native-inputs `(("python-pytest" ,python-pytest)))
14378 (home-page "https://github.com/python/typed_ast")
14379 (synopsis "Fork of Python @code{ast} modules with type comment support")
14380 (description "This package provides a parser similar to the standard
14381 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14382 include PEP 484 type comments and are independent of the version of Python
14383 under which they are run. The @code{typed_ast} parsers produce the standard
14384 Python AST (plus type comments), and are both fast and correct, as they are
14385 based on the CPython 2.7 and 3.7 parsers.")
14386 ;; See the file "LICENSE" for the details.
14387 (license (list license:psfl
14389 license:expat)))) ;ast27/Parser/spark.py
14391 (define-public python-typing
14393 (name "python-typing")
14398 (uri (pypi-uri "typing" version))
14401 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14402 (build-system python-build-system)
14403 (home-page "https://docs.python.org/3/library/typing.html")
14404 (synopsis "Type hints for Python")
14405 (description "This is a backport of the standard library @code{typing}
14406 module to Python versions older than 3.5. Typing defines a standard notation
14407 for Python function and variable type annotations. The notation can be used
14408 for documenting code in a concise, standard format, and it has been designed
14409 to also be used by static and runtime type checkers, static analyzers, IDEs
14411 (license license:psfl)))
14413 (define-public python2-typing
14414 (package-with-python2 python-typing))
14416 (define-public python-typing-extensions
14418 (name "python-typing-extensions")
14423 (uri (pypi-uri "typing_extensions" version))
14426 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14427 (build-system python-build-system)
14429 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14430 (synopsis "Experimental type hints for Python")
14432 "The typing_extensions module contains additional @code{typing} hints not
14433 yet present in the of the @code{typing} standard library.
14434 Included are implementations of:
14437 @item ContextManager
14448 @item TYPE_CHECKING
14449 @item AsyncGenerator
14451 (license license:psfl)))
14453 (define-public bpython
14460 (uri (pypi-uri "bpython" version))
14463 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14464 (build-system python-build-system)
14467 (modify-phases %standard-phases
14468 (add-after 'unpack 'remove-failing-test
14470 ;; Remove failing test. FIXME: make it pass
14471 (delete-file "bpython/test/test_args.py")
14473 (add-after 'wrap 'add-aliases
14474 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14475 (lambda* (#:key outputs #:allow-other-keys)
14476 (let ((out (assoc-ref outputs "out")))
14479 (symlink old (string-append out "/bin/" new)))
14480 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14481 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14484 `(("python-pygments" ,python-pygments)
14485 ("python-requests" ,python-requests)
14486 ("python-babel" ,python-babel) ; optional, for internationalization
14487 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14488 ("python-greenlet" ,python-greenlet)
14489 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14490 ("python-six" ,python-six)))
14492 `(("python-sphinx" ,python-sphinx)
14493 ("python-mock" ,python-mock)))
14494 (home-page "https://bpython-interpreter.org/")
14495 (synopsis "Fancy interface to the Python interpreter")
14496 (description "Bpython is a fancy interface to the Python
14497 interpreter. bpython's main features are
14500 @item in-line syntax highlighting,
14501 @item readline-like autocomplete with suggestions displayed as you type,
14502 @item expected parameter list for any Python function,
14503 @item \"rewind\" function to pop the last line of code from memory and
14505 @item send the code you've entered off to a pastebin,
14506 @item save the code you've entered to a file, and
14507 @item auto-indentation.
14509 (license license:expat)))
14511 (define-public bpython2
14512 (let ((base (package-with-python2
14513 (strip-python2-variant bpython))))
14514 (package (inherit base)
14517 `(#:python ,python-2
14519 (modify-phases %standard-phases
14520 (add-after 'unpack 'remove-failing-test
14522 ;; Remove failing test. FIXME: make it pass
14523 (delete-file "bpython/test/test_args.py")
14524 ;; Disable failing test-cases (renaming inhibits they are
14526 (substitute* "bpython/test/test_curtsies_repl.py"
14527 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14528 (string-append a "xxx_off_" b))
14529 (("^(\\s*def )(test_complex\\W)" _ a b)
14530 (string-append a "xxx_off_" b)))
14532 (add-before 'build 'rename-scripts
14533 ;; rename the scripts to bypthon2, bpdb2, etc.
14535 (substitute* "setup.py"
14536 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14537 (string-append name "2" rest "\n"))
14538 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14539 (string-append name "2" (or sub "") rest "\n")))
14542 (define-public python-pyinotify
14544 (name "python-pyinotify")
14548 (uri (pypi-uri "pyinotify" version))
14551 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14552 (build-system python-build-system)
14553 (arguments `(#:tests? #f)) ;no tests
14554 (home-page "https://github.com/seb-m/pyinotify")
14555 (synopsis "Python library for monitoring inotify events")
14557 "@code{pyinotify} provides a Python interface for monitoring
14558 file system events on Linux.")
14559 (license license:expat)))
14561 (define-public python2-pyinotify
14562 (package-with-python2 python-pyinotify))
14564 ;; Ada parser uses this version.
14565 (define-public python2-quex-0.67.3
14567 (name "python2-quex")
14572 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14573 (version-major+minor version)
14574 "/quex-" version ".zip"))
14577 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14578 (build-system python-build-system)
14580 `(("unzip" ,unzip)))
14582 `(#:python ,python-2
14585 (modify-phases %standard-phases
14586 (delete 'configure)
14589 (lambda* (#:key outputs #:allow-other-keys)
14590 (let* ((out (assoc-ref outputs "out"))
14591 (share/quex (string-append out "/share/quex"))
14592 (bin (string-append out "/bin")))
14593 (copy-recursively "." share/quex)
14595 (symlink (string-append share/quex "/quex-exe.py")
14596 (string-append bin "/quex"))
14598 (native-search-paths
14599 (list (search-path-specification
14600 (variable "QUEX_PATH")
14601 (files '("share/quex")))))
14602 (home-page "http://quex.sourceforge.net/")
14603 (synopsis "Lexical analyzer generator in Python")
14604 (description "@code{quex} is a lexical analyzer generator in Python.")
14605 (license license:lgpl2.1+))) ; Non-military
14607 (define-public python2-quex
14608 (package (inherit python2-quex-0.67.3)
14609 (name "python2-quex")
14614 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14617 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14618 (file-name (string-append name "-" version ".tar.gz"))))))
14620 (define-public python-more-itertools
14622 (name "python-more-itertools")
14627 (uri (pypi-uri "more-itertools" version))
14630 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14631 (build-system python-build-system)
14632 (home-page "https://github.com/erikrose/more-itertools")
14633 (synopsis "More routines for operating on iterables, beyond itertools")
14634 (description "Python's built-in @code{itertools} module implements a
14635 number of iterator building blocks inspired by constructs from APL, Haskell,
14636 and SML. @code{more-itertools} includes additional building blocks for
14637 working with iterables.")
14638 (properties `((python2-variant . ,(delay python2-more-itertools))))
14639 (license license:expat)))
14641 ;; The 5.x series are the last versions supporting Python 2.7.
14642 (define-public python2-more-itertools
14644 (inherit python-more-itertools)
14645 (name "python2-more-itertools")
14649 (uri (pypi-uri "more-itertools" version))
14652 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14654 `(#:python ,python2-minimal))
14656 `(("python2-six" ,python2-six-bootstrap)))))
14658 (define-public python-latexcodec
14660 (name "python-latexcodec")
14665 (uri (pypi-uri "latexcodec" version))
14667 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14668 (build-system python-build-system)
14670 `(("python-six" ,python-six)))
14671 (home-page "https://readthedocs.org/projects/latexcodec/")
14672 (synopsis "Work with LaTeX code in Python")
14673 (description "Lexer and codec to work with LaTeX code in Python.")
14674 (license license:expat)))
14676 (define-public python-pybtex
14678 (name "python-pybtex")
14683 (uri (pypi-uri "pybtex" version))
14686 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14687 (build-system python-build-system)
14689 `(("python-nose" ,python-nose)))
14691 `(("python-latexcodec" ,python-latexcodec)
14692 ("python-pyyaml" ,python-pyyaml)
14693 ("python-six" ,python-six)))
14695 `(#:test-target "nosetests"))
14696 (home-page "https://pybtex.org/")
14697 (synopsis "BibTeX-compatible bibliography processor")
14698 (description "Pybtex is a BibTeX-compatible bibliography processor written
14699 in Python. You can simply type pybtex instead of bibtex.")
14700 (license license:expat)))
14702 (define-public python-onetimepass
14704 (name "python-onetimepass")
14709 (uri (pypi-uri "onetimepass" version))
14711 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14712 (build-system python-build-system)
14713 (propagated-inputs `(("python-six" ,python-six)))
14714 (home-page "https://github.com/tadeck/onetimepass/")
14715 (synopsis "One-time password library")
14716 (description "Python one-time password library for HMAC-based (HOTP) and
14717 time-based (TOTP) passwords.")
14718 (license license:expat)))
14720 (define-public python-parso
14722 (name "python-parso")
14727 (uri (pypi-uri "parso" version))
14730 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14732 `(("python-pytest" ,python-pytest)))
14733 (build-system python-build-system)
14734 (home-page "https://github.com/davidhalter/parso")
14735 (synopsis "Python Parser")
14736 (description "Parso is a Python parser that supports error recovery and
14737 round-trip parsing for different Python versions (in multiple Python versions).
14738 Parso is also able to list multiple syntax errors in your Python file.")
14739 (license license:expat)))
14741 (define-public python2-parso
14742 (package-with-python2 python-parso))
14744 (define-public python-async-generator
14746 (name "python-async-generator")
14751 (uri (pypi-uri "async_generator" version))
14754 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14755 (build-system python-build-system)
14757 `(("python-pytest" ,python-pytest)))
14758 (home-page "https://github.com/python-trio/async_generator")
14759 (synopsis "Async generators and context managers for Python 3.5+")
14760 (description "@code{async_generator} back-ports Python 3.6's native async
14761 generators and Python 3.7's context managers into Python 3.5.")
14763 (license (list license:expat license:asl2.0))))
14765 (define-public python-async-timeout
14767 (name "python-async-timeout")
14772 (uri (pypi-uri "async-timeout" version))
14775 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14776 (build-system python-build-system)
14777 (home-page "https://github.com/aio-libs/async_timeout/")
14778 (synopsis "Timeout context manager for asyncio programs")
14779 (description "@code{async-timeout} provides a timeout timeout context
14780 manager compatible with @code{asyncio}.")
14781 (license license:asl2.0)))
14783 (define-public python-glob2
14785 (name "python-glob2")
14790 (uri (git-reference
14791 (url "https://github.com/miracle2k/python-glob2.git")
14793 (file-name (git-file-name name version))
14795 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14796 (build-system python-build-system)
14797 (home-page "https://github.com/miracle2k/python-glob2/")
14798 (synopsis "Extended Version of the python buildin glob module")
14799 (description "This is an extended version of the Python
14800 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14804 @item The ability to capture the text matched by glob patterns, and return
14805 those matches alongside the file names.
14806 @item A recursive @code{**} globbing syntax, akin for example to the
14807 @code{globstar} option of Bash.
14808 @item The ability to replace the file system functions used, in order to glob
14809 on virtual file systems.
14810 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14813 Glob2 currently based on the glob code from Python 3.3.1.")
14814 (license license:bsd-2)))
14816 (define-public python2-glob2
14817 (package-with-python2 python-glob2))
14819 (define-public python-gipc
14821 (name "python-gipc")
14826 (uri (pypi-uri "gipc" version ".zip"))
14829 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14830 (build-system python-build-system)
14832 `(("unzip" ,unzip)))
14834 `(("python-gevent" ,python-gevent)))
14835 (home-page "http://gehrcke.de/gipc")
14836 (synopsis "Child process management in the context of gevent")
14837 (description "Usage of Python's multiprocessing package in a
14838 gevent-powered application may raise problems. With @code{gipc},
14839 process-based child processes can safely be created anywhere within a
14840 gevent-powered application.")
14841 (license license:expat)))
14843 (define-public python2-gipc
14844 (package-with-python2 python-gipc))
14846 (define-public python-fusepy
14848 (name "python-fusepy")
14853 (uri (pypi-uri "fusepy" version))
14856 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14857 (build-system python-build-system)
14860 (modify-phases %standard-phases
14861 (add-before 'build 'set-library-file-name
14862 (lambda* (#:key inputs #:allow-other-keys)
14863 (let ((fuse (assoc-ref inputs "fuse")))
14864 (substitute* "fuse.py"
14865 (("find_library\\('fuse'\\)")
14866 (string-append "'" fuse "/lib/libfuse.so'")))
14870 (home-page "https://github.com/fusepy/fusepy")
14871 (synopsis "Simple ctypes bindings for FUSE")
14872 (description "Python module that provides a simple interface to FUSE and
14873 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14874 (license license:isc)))
14876 (define-public python2-fusepy
14877 (package-with-python2 python-fusepy))
14879 (define-public python2-gdrivefs
14881 (name "python2-gdrivefs")
14886 (uri (pypi-uri "gdrivefs" version))
14889 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14890 (build-system python-build-system)
14892 `(#:python ,python-2
14894 (modify-phases %standard-phases
14895 (add-before 'build 'patch-setup-py
14897 ;; Update requirements from dependency==version
14898 ;; to dependency>=version
14899 (substitute* "gdrivefs/resources/requirements.txt"
14903 `(("python2-gipc" ,python2-gipc)
14904 ("python2-gevent" ,python2-gevent)
14905 ("python2-greenlet" ,python2-greenlet)
14906 ("python2-httplib2" ,python2-httplib2)
14907 ("python2-uritemplate" ,python2-uritemplate)
14908 ("python2-oauth2client" ,python2-oauth2client)
14909 ("python2-six" ,python2-six)))
14911 `(("python2-dateutil" ,python2-dateutil)
14912 ("python2-fusepy" ,python2-fusepy)
14913 ("python2-google-api-client" ,python2-google-api-client)))
14914 (home-page "https://github.com/dsoprea/GDriveFS")
14915 (synopsis "Mount Google Drive as a local file system")
14916 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14917 under Python 2.7.")
14918 (license license:gpl2)))
14920 (define-public pybind11
14926 (uri (git-reference
14927 (url "https://github.com/pybind/pybind11.git")
14928 (commit (string-append "v" version))))
14931 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
14932 (file-name (git-file-name name version))))
14933 (build-system cmake-build-system)
14935 `(("python" ,python)
14936 ("python-pytest" ,python-pytest)))
14938 `(#:test-target "check"))
14939 (home-page "https://github.com/pybind/pybind11/")
14940 (synopsis "Seamless operability between C++11 and Python")
14941 (description "pybind11 is a lightweight header-only library that exposes
14942 C++ types in Python and vice versa, mainly to create Python bindings of
14943 existing C++ code. Its goals and syntax are similar to the excellent
14944 Boost.Python library by David Abrahams: to minimize boilerplate code in
14945 traditional extension modules by inferring type information using compile-time
14947 (license license:expat)))
14949 (define-public python-fasteners
14951 (name "python-fasteners")
14956 (uri (pypi-uri "fasteners" version))
14959 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14960 (build-system python-build-system)
14962 `(("python-monotonic" ,python-monotonic)
14963 ("python-six" ,python-six)
14964 ("python-testtools" ,python-testtools)))
14965 (home-page "https://github.com/harlowja/fasteners")
14966 (synopsis "Python package that provides useful locks")
14968 "This package provides a Python program that provides following locks:
14971 @item Locking decorator
14972 @item Reader-writer locks
14973 @item Inter-process locks
14974 @item Generic helpers
14976 (properties `((python2-variant . ,(delay python2-fasteners))))
14977 (license license:asl2.0)))
14979 (define-public python2-fasteners
14980 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14984 `(("python2-futures" ,python2-futures)
14985 ,@(package-propagated-inputs base))))))
14987 (define-public python-requests-file
14989 (name "python-requests-file")
14994 (uri (pypi-uri "requests-file" version))
14997 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14998 (build-system python-build-system)
15000 `(("python-requests" ,python-requests)
15001 ("python-six" ,python-six)))
15003 "https://github.com/dashea/requests-file")
15004 (synopsis "File transport adapter for Requests")
15006 "Requests-File is a transport adapter for use with the Requests Python
15007 library to allow local file system access via @code{file://} URLs.")
15008 (license license:asl2.0)))
15010 (define-public python2-requests-file
15011 (package-with-python2 python-requests-file))
15013 (define-public python-tldextract
15015 (name "python-tldextract")
15020 (uri (pypi-uri "tldextract" version))
15023 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15024 (build-system python-build-system)
15026 `(("python-pytest" ,python-pytest)
15027 ("python-responses" ,python-responses)))
15029 `(("python-idna" ,python-idna)
15030 ("python-requests" ,python-requests)
15031 ("python-requests-file" ,python-requests-file)))
15033 "https://github.com/john-kurkowski/tldextract")
15035 "Separate the TLD from the registered domain and subdomains of a URL")
15037 "TLDExtract accurately separates the TLD from the registered domain and
15038 subdomains of a URL, using the Public Suffix List. By default, this includes
15039 the public ICANN TLDs and their exceptions. It can optionally support the
15040 Public Suffix List's private domains as well.")
15041 (license license:bsd-3)))
15043 (define-public python2-tldextract
15044 (package-with-python2 python-tldextract))
15046 (define-public python-pynamecheap
15048 (name "python-pynamecheap")
15053 (uri (pypi-uri "PyNamecheap" version))
15056 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15057 (build-system python-build-system)
15059 `(("python-requests" ,python-requests)))
15061 "https://github.com/Bemmu/PyNamecheap")
15063 "Namecheap API client in Python")
15065 "PyNamecheap is a Namecheap API client in Python.")
15066 (license license:expat)))
15068 (define-public python2-pynamecheap
15069 (package-with-python2 python-pynamecheap))
15071 (define-public python-dns-lexicon
15073 (name "python-dns-lexicon")
15078 (uri (pypi-uri "dns-lexicon" version))
15081 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15082 (build-system python-build-system)
15084 `(#:tests? #f)) ;requires internet access
15086 `(("python-future" ,python-future)
15087 ("python-pynamecheap" ,python-pynamecheap)
15088 ("python-requests" ,python-requests)
15089 ("python-tldextract" ,python-tldextract)
15090 ("python-urllib3" ,python-urllib3)))
15091 (home-page "https://github.com/AnalogJ/lexicon")
15093 "Manipulate DNS records on various DNS providers")
15095 "Lexicon provides a way to manipulate DNS records on multiple DNS
15096 providers in a standardized way. It has a CLI but it can also be used as a
15097 Python library. It was designed to be used in automation, specifically with
15099 (license license:expat)))
15101 (define-public python2-dns-lexicon
15102 (package-with-python2 python-dns-lexicon))
15104 (define-public python-commandlines
15106 (name "python-commandlines")
15111 (uri (pypi-uri "commandlines" version))
15114 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15115 (build-system python-build-system)
15116 (home-page "https://github.com/chrissimpkins/commandlines")
15117 (synopsis "Command line argument to object parsing library")
15119 "@code{Commandlines} is a Python library for command line application
15120 development that supports command line argument parsing, command string
15121 validation testing and application logic.")
15122 (license license:expat)))
15124 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15125 ;; python-numba. They have a very unflexible relationship.
15126 (define-public python-numba
15128 (name "python-numba")
15133 (uri (pypi-uri "numba" version))
15136 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15137 (build-system python-build-system)
15139 `(#:modules ((guix build utils)
15140 (guix build python-build-system)
15145 (modify-phases %standard-phases
15146 (add-after 'unpack 'disable-proprietary-features
15148 (setenv "NUMBA_DISABLE_HSA" "1")
15149 (setenv "NUMBA_DISABLE_CUDA" "1")
15151 (add-after 'unpack 'remove-failing-tests
15153 ;; FIXME: these tests fail for unknown reasons:
15154 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15155 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15156 (substitute* "numba/tests/test_dispatcher.py"
15157 (("def test(_non_writable_pycache)" _ m)
15158 (string-append "def guix_skip" m))
15159 (("def test(_non_creatable_pycache)" _ m)
15160 (string-append "def guix_skip" m))
15161 (("def test(_frozen)" _ m)
15162 (string-append "def guix_skip" m)))
15164 ;; These tests fail because we don't run the tests from the build
15165 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15166 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15167 (substitute* "numba/tests/test_pycc.py"
15168 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15169 (string-append "def guix_skip" m)))
15173 (let ((cwd (getcwd)))
15174 (setenv "PYTHONPATH"
15175 (string-append cwd "/build/"
15176 (find (cut string-prefix? "lib" <>)
15177 (scandir (string-append cwd "/build")))
15179 (getenv "PYTHONPATH")))
15180 ;; Something is wrong with the PYTHONPATH when running the
15181 ;; tests from the build directory, as it complains about not being
15182 ;; able to import certain modules.
15183 (with-directory-excursion "/tmp"
15184 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15187 `(("python-llvmlite" ,python-llvmlite)
15188 ("python-numpy" ,python-numpy)
15189 ("python-singledispatch" ,python-singledispatch)))
15190 ;; Needed for tests.
15192 `(("python-jinja2" ,python-jinja2)
15193 ("python-pygments" ,python-pygments)))
15194 (home-page "https://numba.pydata.org")
15195 (synopsis "Compile Python code using LLVM")
15196 (description "Numba gives you the power to speed up your applications with
15197 high performance functions written directly in Python. With a few
15198 annotations, array-oriented and math-heavy Python code can be just-in-time
15199 compiled to native machine instructions, similar in performance to C, C++ and
15200 Fortran, without having to switch languages or Python interpreters.
15202 Numba works by generating optimized machine code using the LLVM compiler
15203 infrastructure at import time, runtime, or statically (using the included pycc
15205 (license license:bsd-3)))
15207 (define-public python-anndata
15209 (name "python-anndata")
15214 (uri (pypi-uri "anndata" version))
15217 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15218 (build-system python-build-system)
15220 `(("python-h5py" ,python-h5py)
15221 ("python-natsort" ,python-natsort)
15222 ("python-pandas" ,python-pandas)
15223 ("python-scipy" ,python-scipy)))
15224 (home-page "https://github.com/theislab/anndata")
15225 (synopsis "Annotated data for data analysis pipelines")
15226 (description "Anndata is a package for simple (functional) high-level APIs
15227 for data analysis pipelines. In this context, it provides an efficient,
15228 scalable way of keeping track of data together with learned annotations and
15229 reduces the code overhead typically encountered when using a mostly
15230 object-oriented library such as @code{scikit-learn}.")
15231 (license license:bsd-3)))
15233 (define-public python-dill
15235 (name "python-dill")
15240 (uri (pypi-uri "dill" version))
15242 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15243 (build-system python-build-system)
15244 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15245 (arguments '(#:tests? #f))
15246 (home-page "https://pypi.org/project/dill")
15247 (synopsis "Serialize all of Python")
15248 (description "Dill extends Python's @code{pickle} module for serializing
15249 and de-serializing Python objects to the majority of the built-in Python
15250 types. Dill provides the user the same interface as the @code{pickle} module,
15251 and also includes some additional features. In addition to pickling Python
15252 objects, @code{dill} provides the ability to save the state of an interpreter
15253 session in a single command. Hence, it would be feasible to save a
15254 interpreter session, close the interpreter, ship the pickled file to another
15255 computer, open a new interpreter, unpickle the session and thus continue from
15256 the saved state of the original interpreter session.")
15257 (license license:bsd-3)))
15259 (define-public python-multiprocess
15261 (name "python-multiprocess")
15262 (version "0.70.6.1")
15266 (uri (pypi-uri "multiprocess" version))
15269 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15270 (build-system python-build-system)
15272 `(("python-dill" ,python-dill)))
15273 (home-page "https://pypi.org/project/multiprocess")
15274 (synopsis "Multiprocessing and multithreading in Python")
15276 "This package is a fork of the multiprocessing Python package, a package
15277 which supports the spawning of processes using the API of the standard
15278 library's @code{threading} module.")
15279 (license license:bsd-3)))
15281 (define-public python-toolz
15283 (name "python-toolz")
15288 (uri (pypi-uri "toolz" version))
15291 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15292 (build-system python-build-system)
15293 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15294 ;; unregistered loader type"
15295 (arguments '(#:tests? #f))
15296 (home-page "https://github.com/pytoolz/toolz/")
15297 (synopsis "List processing tools and functional utilities")
15299 "This package provides a set of utility functions for iterators,
15300 functions, and dictionaries.")
15301 (license license:bsd-3)))
15303 (define-public python2-toolz
15304 (package-with-python2 python-toolz))
15306 (define-public python-cytoolz
15308 (name "python-cytoolz")
15309 (version "0.9.0.1")
15313 (uri (pypi-uri "cytoolz" version))
15316 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15317 (build-system python-build-system)
15318 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15320 (arguments '(#:tests? #f))
15322 `(("python-toolz" ,python-toolz)))
15324 `(("python-cython" ,python-cython)))
15325 (home-page "https://github.com/pytoolz/cytoolz")
15326 (synopsis "High performance functional utilities")
15328 "The cytoolz package implements the same API as provided by toolz. The
15329 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15330 that is accessible to other projects developed in Cython.")
15331 (license license:bsd-3)))
15333 (define-public python-sortedcontainers
15335 (name "python-sortedcontainers")
15340 (uri (pypi-uri "sortedcontainers" version))
15343 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15344 (build-system python-build-system)
15346 `(("python-tox" ,python-tox)))
15347 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15348 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15350 "This package provides a sorted collections library, written in
15352 (license license:asl2.0)))
15354 (define-public python-cloudpickle
15356 (name "python-cloudpickle")
15361 (uri (pypi-uri "cloudpickle" version))
15364 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15365 (build-system python-build-system)
15366 ;; FIXME: there are 5 errors in 122 tests:
15367 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15368 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15369 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15370 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15371 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15372 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15373 (arguments '(#:tests? #f))
15375 `(("python-pytest" ,python-pytest)
15376 ("python-mock" ,python-mock)
15377 ("python-tornado" ,python-tornado)))
15378 (home-page "https://github.com/cloudpipe/cloudpickle")
15379 (synopsis "Extended pickling support for Python objects")
15381 "Cloudpickle makes it possible to serialize Python constructs not
15382 supported by the default pickle module from the Python standard library. It
15383 is especially useful for cluster computing where Python expressions are
15384 shipped over the network to execute on remote hosts, possibly close to the
15386 (license license:bsd-3)))
15388 (define-public python2-cloudpickle
15389 (package-with-python2 python-cloudpickle))
15391 (define-public python-locket
15393 (name "python-locket")
15398 (uri (pypi-uri "locket" version))
15401 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15402 (build-system python-build-system)
15403 (home-page "https://github.com/mwilliamson/locket.py")
15404 (synopsis "File-based locks for Python")
15406 "Locket implements a lock that can be used by multiple processes provided
15407 they use the same path.")
15408 (license license:bsd-2)))
15410 (define-public python2-locket
15411 (package-with-python2 python-locket))
15413 (define-public python-blosc
15415 (name "python-blosc")
15420 (uri (pypi-uri "blosc" version))
15423 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15424 (build-system python-build-system)
15425 ;; FIXME: all tests pass, but then this error is printed:
15426 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15427 (arguments '(#:tests? #f))
15429 `(("python-numpy" ,python-numpy)))
15430 (home-page "https://github.com/blosc/python-blosc")
15431 (synopsis "Python wrapper for the Blosc data compressor library")
15432 (description "Blosc is a high performance compressor optimized for binary
15433 data. It has been designed to transmit data to the processor cache faster
15434 than the traditional, non-compressed, direct memory fetch approach via a
15435 @code{memcpy()} system call.
15437 Blosc works well for compressing numerical arrays that contains data with
15438 relatively low entropy, like sparse data, time series, grids with
15439 regular-spaced values, etc.
15441 This Python package wraps the Blosc library.")
15442 (license license:bsd-3)))
15444 (define-public python2-blosc
15445 (package-with-python2 python-blosc))
15447 (define-public python-partd
15449 (name "python-partd")
15454 (uri (pypi-uri "partd" version))
15457 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15458 (build-system python-build-system)
15460 `(("python-blosc" ,python-blosc)
15461 ("python-locket" ,python-locket)
15462 ("python-numpy" ,python-numpy)
15463 ("python-pandas" ,python-pandas)
15464 ("python-pyzmq" ,python-pyzmq)
15465 ("python-toolz" ,python-toolz)))
15466 (home-page "https://github.com/dask/partd/")
15467 (synopsis "Appendable key-value storage")
15468 (description "Partd stores key-value pairs. Values are raw bytes. We
15469 append on old values. Partd excels at shuffling operations.")
15470 (license license:bsd-3)))
15472 (define-public python2-partd
15473 (package-with-python2 python-partd))
15475 (define-public python-dask
15477 (name "python-dask")
15482 (uri (pypi-uri "dask" version))
15484 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15485 (build-system python-build-system)
15486 ;; A single test out of 5000+ fails. This test is marked as xfail when
15487 ;; pytest-xdist is used.
15490 (modify-phases %standard-phases
15491 (add-after 'unpack 'disable-broken-test
15493 (substitute* "dask/tests/test_threaded.py"
15494 (("def test_interrupt\\(\\)" m)
15495 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15497 (when (which "python2")
15498 ;; This test fails with recent Pandas:
15499 ;; <https://github.com/dask/dask/issues/3794>.
15500 (substitute* "dask/dataframe/tests/test_dataframe.py"
15501 (("def test_info\\(\\)" m)
15502 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15506 (lambda _ (invoke "pytest" "-vv"))))))
15508 `(("python-cloudpickle" ,python-cloudpickle)
15509 ("python-numpy" ,python-numpy)
15510 ("python-pandas" ,python-pandas)
15511 ("python-partd" ,python-partd)
15512 ("python-toolz" ,python-toolz)
15513 ("python-pyyaml" ,python-pyyaml)))
15515 `(("python-pytest" ,python-pytest)
15516 ("python-pytest-runner" ,python-pytest-runner)))
15517 (home-page "https://github.com/dask/dask/")
15518 (synopsis "Parallel computing with task scheduling")
15520 "Dask is a flexible parallel computing library for analytics. It
15521 consists of two components: dynamic task scheduling optimized for computation,
15522 and large data collections like parallel arrays, dataframes, and lists that
15523 extend common interfaces like NumPy, Pandas, or Python iterators to
15524 larger-than-memory or distributed environments. These parallel collections
15525 run on top of the dynamic task schedulers. ")
15526 (license license:bsd-3)))
15528 (define-public python2-dask
15529 (package-with-python2 python-dask))
15531 (define-public python-ilinkedlist
15533 (name "python-ilinkedlist")
15538 (uri (pypi-uri "ilinkedlist" version))
15541 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15542 (build-system python-build-system)
15543 (native-inputs `(("python-pytest" ,python-pytest)))
15544 (inputs `(("python" ,python)))
15545 (home-page "https://github.com/luther9/ilinkedlist-py")
15546 (synopsis "Immutable linked list library")
15548 "This is a implementation of immutable linked lists for Python. It
15549 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15550 Since a linked list is treated as immutable, it is hashable, and its length
15551 can be retrieved in constant time. Some of the terminology is inspired by
15552 LISP. It is possible to create an improper list by creating a @code{Pair}
15553 with a non-list @code{cdr}.")
15554 (license license:gpl3+)))
15556 (define-public python-readlike
15558 (name "python-readlike")
15563 (uri (pypi-uri "readlike" version))
15565 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15566 (build-system python-build-system)
15567 (home-page "https://github.com/jangler/readlike")
15568 (synopsis "GNU Readline-like line editing module")
15570 "This Python module provides line editing functions similar to the default
15571 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15572 @code{readline} package, this one allows access to those capabilties in settings
15573 outside of a standard command-line interface. It is especially well-suited to
15574 interfacing with Urwid, due to a shared syntax for describing key inputs.
15576 Currently, all stateless Readline commands are implemented. Yanking and history
15577 are not supported.")
15578 (license license:expat)))
15580 (define-public python2-readlike
15581 (package-with-python2 python-readlike))
15583 (define-public python-reparser
15585 (name "python-reparser")
15590 (uri (pypi-uri "ReParser" version))
15592 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15593 (build-system python-build-system)
15594 (home-page "https://github.com/xmikos/reparser")
15595 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15597 "This Python library provides a simple lexer/parser for inline markup based
15598 on regular expressions.")
15599 (license license:expat)))
15601 (define-public python2-reparser
15602 (let ((reparser (package-with-python2
15603 (strip-python2-variant python-reparser))))
15604 (package (inherit reparser)
15606 `(("python2-enum34" ,python2-enum34)
15607 ,@(package-propagated-inputs reparser))))))
15609 (define-public python-precis-i18n
15611 (name "python-precis-i18n")
15616 (uri (pypi-uri "precis_i18n" version))
15619 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/byllyfish/precis_i18n")
15622 (synopsis "Implementation of the PRECIS framework")
15624 "This module implements the PRECIS Framework as described in RFC 8264,
15625 RFC 8265 and RFC 8266.")
15626 (license license:expat)))
15628 (define-public python-absl-py
15630 (name "python-absl-py")
15635 (uri (pypi-uri "absl-py" version))
15638 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15639 (build-system python-build-system)
15641 `(("python-six" ,python-six)))
15642 (home-page "https://github.com/abseil/abseil-py")
15643 (synopsis "Abseil Python common libraries")
15645 "This package provides the Abseil Python Common Libraries, a collection
15646 of Python libraries for building Python applications.")
15647 (license license:asl2.0)))
15649 (define-public python-astor
15651 (name "python-astor")
15656 (uri (pypi-uri "astor" version))
15659 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15660 (build-system python-build-system)
15661 ;; FIXME: There are two errors and two test failures.
15662 (arguments `(#:tests? #f))
15663 (home-page "https://github.com/berkerpeksag/astor")
15664 (synopsis "Read and write Python ASTs")
15665 (description "Astor is designed to allow easy manipulation of Python
15666 source via the Abstract Syntax Tree.")
15667 (license license:bsd-3)))
15669 (define-public python2-astor
15670 (package-with-python2 python-astor))
15672 (define-public python-grpcio
15674 (name "python-grpcio")
15679 (uri (pypi-uri "grpcio" version))
15682 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15683 (build-system python-build-system)
15685 `(("python-six" ,python-six)))
15686 (home-page "https://grpc.io")
15687 (synopsis "HTTP/2-based RPC framework")
15688 (description "This package provides a Python library for communicating
15689 with the HTTP/2-based RPC framework gRPC.")
15690 (license license:asl2.0)))
15692 (define-public python-astunparse
15694 (name "python-astunparse")
15699 (uri (pypi-uri "astunparse" version))
15701 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15702 (build-system python-build-system)
15703 (arguments '(#:tests? #f)) ; there are none
15705 `(("python-six" ,python-six)
15706 ("python-wheel" ,python-wheel)))
15707 (home-page "https://github.com/simonpercivall/astunparse")
15708 (synopsis "AST unparser for Python")
15709 (description "This package provides an AST unparser for Python. It is a
15710 factored out version of @code{unparse} found in the Python source
15712 (license license:bsd-3)))
15714 (define-public python-gast
15716 (name "python-gast")
15721 (uri (pypi-uri "gast" version))
15723 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15724 (build-system python-build-system)
15726 `(("python-astunparse" ,python-astunparse)))
15727 (home-page "https://pypi.org/project/gast/")
15728 (synopsis "Generic Python AST that abstracts the underlying Python version")
15730 "GAST provides a compatibility layer between the AST of various Python
15731 versions, as produced by @code{ast.parse} from the standard @code{ast}
15733 (license license:bsd-3)))
15735 (define-public python-wikidata
15737 (name "python-wikidata")
15742 (uri (pypi-uri "Wikidata" version))
15745 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15746 (build-system python-build-system)
15748 `(("python-babel" ,python-babel)))
15749 (home-page "https://github.com/dahlia/wikidata")
15750 (synopsis "Wikidata client library")
15752 "This package provides a Python interface to
15753 @url{https://www.wikidata.org/, Wikidata}.")
15754 (properties '((upstream-name . "Wikidata")))
15755 (license license:gpl3+)))
15757 (define-public python-doctest-ignore-unicode
15759 (name "python-doctest-ignore-unicode")
15764 (uri (pypi-uri "doctest-ignore-unicode" version))
15767 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15768 (build-system python-build-system)
15770 `(("python-nose" ,python-nose)))
15771 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15772 (synopsis "Ignore Unicode literal prefixes in doctests")
15774 "This package adds support for a flag to ignore Unicode literal prefixes
15776 (license license:asl2.0)))
15778 (define-public python-attr
15780 (name "python-attr")
15785 (uri (pypi-uri "attr" version))
15788 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15789 (build-system python-build-system)
15790 (home-page "https://github.com/denis-ryzhkov/attr")
15791 (synopsis "Decorator for attributes of target function or class")
15792 (description "Simple decorator to set attributes of target function or
15793 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15794 (license license:expat)))
15796 (define-public python-construct
15798 (name "python-construct")
15803 (uri (pypi-uri "construct" version))
15806 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15807 (build-system python-build-system)
15809 `(#:tests? #f)) ; No tests exist.
15811 `(("python-extras" ,python-extras)
15812 ("python-arrow" ,python-arrow)
15813 ("python-numpy" ,python-numpy)
15814 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15815 (home-page "http://construct.readthedocs.io")
15816 (synopsis "Declarative and symmetrical parser and builder for binary data")
15818 "This package provides both simple, atomic constructs (such as
15819 integers of various sizes), as well as composite ones which allow you
15820 form hierarchical and sequential structures of increasing complexity.
15821 It features bit and byte granularity, easy debugging and testing, an
15822 easy-to-extend subclass system, and lots of primitive constructs to
15823 make your work easier.")
15824 (license license:expat)))
15826 (define-public python-humanize
15828 (name "python-humanize")
15833 (uri (pypi-uri "humanize" version))
15836 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15838 '(#:tests? #f)) ; tests not in pypi archive
15839 (build-system python-build-system)
15840 (home-page "https://github.com/jmoiron/humanize")
15841 (synopsis "Print numerical information in a human-readable form")
15842 (description "This package provides a Python module that displays numbers
15843 and dates in \"human readable\" forms. For example, it would display
15844 \"12345591313\" as \"12.3 billion\".")
15845 (license license:expat)))
15847 (define-public python-txaio
15849 (name "python-txaio")
15854 (uri (pypi-uri "txaio" version))
15857 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15858 (build-system python-build-system)
15860 `(("python-twisted" ,python-twisted)
15861 ("python-six" ,python-six)))
15862 (home-page "https://github.com/crossbario/txaio")
15863 (synopsis "Compatibility layer between Python asyncio and Twisted")
15864 (description "Txaio provides a compatibility layer between the Python
15865 @code{asyncio} module and @code{Twisted}.")
15866 (license license:expat)))
15868 (define-public python-toolshed
15870 (name "python-toolshed")
15875 (uri (pypi-uri "toolshed" version))
15878 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15879 (build-system python-build-system)
15881 `(("python-nose" ,python-nose)))
15882 (home-page "https://github.com/brentp/toolshed/")
15883 (synopsis "Collection of modules and functions for working with data")
15884 (description "This is a collection of well-tested, simple modules and
15885 functions that aim to reduce boilerplate when working with data.")
15886 (license license:bsd-2)))
15888 (define-public python-annoy
15890 (name "python-annoy")
15895 (uri (pypi-uri "annoy" version))
15898 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15899 (build-system python-build-system)
15901 `(("python-nose" ,python-nose)))
15902 (home-page "https://github.com/spotify/annoy/")
15903 (synopsis "Approximate nearest neighbors library")
15905 "Annoy is a C++ library with Python bindings to search for points in
15906 space that are close to a given query point. It also creates large read-only
15907 file-based data structures that are @code{mmap}ped into memory so that many
15908 processes may share the same data.")
15909 (license license:asl2.0)))
15911 (define-public python-pylzma
15913 (name "python-pylzma")
15918 (uri (pypi-uri "pylzma" version))
15921 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15922 (build-system python-build-system)
15923 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15924 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15925 (description "This package provides Python bindings for the LZMA library
15927 (license license:lgpl2.1+)))
15929 (define-public python2-pylzma
15930 (package-with-python2 python-pylzma))
15932 (define-public python2-zeroconf
15934 (name "python2-zeroconf")
15936 ;; This is the last version that supports Python 2.x.
15941 (uri (pypi-uri "zeroconf" version))
15944 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15945 (build-system python-build-system)
15947 `(#:python ,python-2
15949 (modify-phases %standard-phases
15950 (add-after 'unpack 'patch-requires
15951 (lambda* (#:key inputs #:allow-other-keys)
15952 (substitute* "setup.py"
15957 `(("python2-six" ,python2-six)
15958 ("python2-enum32" ,python2-enum34)
15959 ("python2-netifaces" ,python2-netifaces)
15960 ("python2-typing" ,python2-typing)))
15961 (home-page "https://github.com/jstasiak/python-zeroconf")
15962 (synopsis "Pure Python mDNS service discovery")
15964 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15966 (license license:lgpl2.1+)))
15968 (define-public python-bsddb3
15970 (name "python-bsddb3")
15975 (uri (pypi-uri "bsddb3" version))
15978 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15979 (build-system python-build-system)
15984 (modify-phases %standard-phases
15985 (add-after 'unpack 'configure-locations
15986 (lambda* (#:key inputs #:allow-other-keys)
15987 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15988 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15992 (invoke "python3" "test3.py" "-v"))))))
15993 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15994 (synopsis "Python bindings for Oracle Berkeley DB")
15996 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15997 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15998 Transaction objects, and each of these is exposed as a Python type in the
15999 bsddb3.db module. The database objects can use various access methods: btree,
16000 hash, recno, and queue. Complete support of Berkeley DB distributed
16001 transactions. Complete support for Berkeley DB Replication Manager.
16002 Complete support for Berkeley DB Base Replication. Support for RPC.")
16003 (license license:bsd-3)))
16005 (define-public python-dbfread
16007 (name "python-dbfread")
16011 (uri (pypi-uri "dbfread" version))
16014 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16015 (build-system python-build-system)
16017 `(("python-pytest" ,python-pytest)))
16018 (home-page "https://dbfread.readthedocs.io")
16019 (synopsis "Read DBF Files with Python")
16021 "This library reads DBF files and returns the data as native Python data
16022 types for further processing. It is primarily intended for batch jobs and
16024 (license license:expat)))
16026 (define-public python-cached-property
16028 (name "python-cached-property")
16033 (uri (pypi-uri "cached-property" version))
16036 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16037 (build-system python-build-system)
16040 (modify-phases %standard-phases
16041 ;; https://github.com/pydanny/cached-property/issues/131
16042 ;; recent versions of freezegun break one test
16043 (add-after 'unpack 'disable-broken-test
16045 (substitute* "tests/test_cached_property.py"
16046 (("def test_threads_ttl_expiry\\(self\\)" m)
16047 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16051 `(("python-freezegun" ,python-freezegun)))
16053 "https://github.com/pydanny/cached-property")
16055 "Decorator for caching properties in classes")
16057 "This package provides a decorator which makes caching
16058 time-or-computationally-expensive properties quick and easy and works in Python
16060 (license license:bsd-3)))
16062 (define-public python-folium
16064 (name "python-folium")
16069 (uri (pypi-uri "folium" version))
16072 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16073 (build-system python-build-system)
16075 `(("python-branca" ,python-branca)
16076 ("python-jinja2" ,python-jinja2)
16077 ("python-numpy" ,python-numpy)
16078 ("python-requests" ,python-requests)))
16080 `(("python-pytest" ,python-pytest)))
16081 (home-page "https://github.com/python-visualization/folium")
16082 (synopsis "Make beautiful maps with Leaflet.js & Python")
16083 (description "@code{folium} makes it easy to visualize data that’s been
16084 manipulated in Python on an interactive leaflet map. It enables both the
16085 binding of data to a map for @code{choropleth} visualizations as well as
16086 passing rich vector/raster/HTML visualizations as markers on the map.
16088 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16089 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16090 supports Image, Video, GeoJSON and TopoJSON overlays.")
16091 (license license:expat)))
16093 (define-public jube
16095 ;; This is a command-line tool, so no "python-" prefix.
16100 (uri (string-append
16101 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16105 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16106 (file-name (string-append "jube-" version ".tar.gz"))))
16107 (build-system python-build-system)
16108 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16109 (synopsis "Benchmarking environment")
16111 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16112 benchmarked application, benchmark data is stored in a format that allows JUBE
16113 to deduct the desired information. This data can be parsed by automatic pre-
16114 and post-processing scripts that draw information and store it more densely
16115 for manual interpretation.")
16116 (license license:gpl3+)))
16118 (define-public python-pyroutelib3
16120 (name "python-pyroutelib3")
16121 (version "1.3.post1")
16125 (uri (pypi-uri "pyroutelib3" version))
16128 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16129 (build-system python-build-system)
16131 `(("python-dateutil" ,python-dateutil)))
16132 (home-page "https://github.com/MKuranowski/pyroutelib3")
16133 (synopsis "Library for simple routing on OSM data")
16134 (description "Library for simple routing on OSM data")
16135 (license license:gpl3+)))
16137 (define-public python-elementpath
16139 (name "python-elementpath")
16144 (uri (pypi-uri "elementpath" version))
16147 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16148 (build-system python-build-system)
16150 "https://github.com/sissaschool/elementpath")
16152 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16154 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16155 for Python's ElementTree XML data structures, both for the standard
16156 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16158 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16159 because lxml.etree already has it's own implementation of XPath 1.0.")
16160 (license license:expat)))