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>
67 ;;; This file is part of GNU Guix.
69 ;;; GNU Guix is free software; you can redistribute it and/or modify it
70 ;;; under the terms of the GNU General Public License as published by
71 ;;; the Free Software Foundation; either version 3 of the License, or (at
72 ;;; your option) any later version.
74 ;;; GNU Guix is distributed in the hope that it will be useful, but
75 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
76 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77 ;;; GNU General Public License for more details.
79 ;;; You should have received a copy of the GNU General Public License
80 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82 (define-module (gnu packages python-xyz)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (gnu packages)
85 #:use-module (gnu packages algebra)
86 #:use-module (gnu packages adns)
87 #:use-module (gnu packages attr)
88 #:use-module (gnu packages backup)
89 #:use-module (gnu packages bash)
90 #:use-module (gnu packages check)
91 #:use-module (gnu packages compression)
92 #:use-module (gnu packages crypto)
93 #:use-module (gnu packages databases)
94 #:use-module (gnu packages dbm)
95 #:use-module (gnu packages file)
96 #:use-module (gnu packages fontutils)
97 #:use-module (gnu packages gcc)
98 #:use-module (gnu packages geo)
99 #:use-module (gnu packages ghostscript)
100 #:use-module (gnu packages gl)
101 #:use-module (gnu packages glib)
102 #:use-module (gnu packages graphviz)
103 #:use-module (gnu packages graphics)
104 #:use-module (gnu packages gstreamer)
105 #:use-module (gnu packages gtk)
106 #:use-module (gnu packages icu4c)
107 #:use-module (gnu packages image)
108 #:use-module (gnu packages imagemagick)
109 #:use-module (gnu packages libevent)
110 #:use-module (gnu packages libffi)
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages llvm)
113 #:use-module (gnu packages man)
114 #:use-module (gnu packages maths)
115 #:use-module (gnu packages monitoring)
116 #:use-module (gnu packages multiprecision)
117 #:use-module (gnu packages networking)
118 #:use-module (gnu packages ncurses)
119 #:use-module (gnu packages openstack)
120 #:use-module (gnu packages pcre)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages pkg-config)
123 #:use-module (gnu packages python)
124 #:use-module (gnu packages python-check)
125 #:use-module (gnu packages python-compression)
126 #:use-module (gnu packages python-crypto)
127 #:use-module (gnu packages python-web)
128 #:use-module (gnu packages qt)
129 #:use-module (gnu packages readline)
130 #:use-module (gnu packages sdl)
131 #:use-module (gnu packages search)
132 #:use-module (gnu packages shells)
133 #:use-module (gnu packages sphinx)
134 #:use-module (gnu packages ssh)
135 #:use-module (gnu packages terminals)
136 #:use-module (gnu packages tex)
137 #:use-module (gnu packages texinfo)
138 #:use-module (gnu packages time)
139 #:use-module (gnu packages tls)
140 #:use-module (gnu packages version-control)
141 #:use-module (gnu packages video)
142 #:use-module (gnu packages web)
143 #:use-module (gnu packages base)
144 #:use-module (gnu packages xml)
145 #:use-module (gnu packages xorg)
146 #:use-module (gnu packages xdisorg)
147 #:use-module (gnu packages tcl)
148 #:use-module (gnu packages bdw-gc)
149 #:use-module (gnu packages serialization)
150 #:use-module (guix packages)
151 #:use-module (guix download)
152 #:use-module (guix git-download)
153 #:use-module (guix hg-download)
154 #:use-module (guix utils)
155 #:use-module (guix build-system gnu)
156 #:use-module (guix build-system cmake)
157 #:use-module (guix build-system python)
158 #:use-module (guix build-system trivial)
159 #:use-module (srfi srfi-1)
160 #:use-module (srfi srfi-26))
162 (define-public python-psutil
164 (name "python-psutil")
169 (uri (pypi-uri "psutil" version))
172 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
173 (build-system python-build-system)
175 ;; FIXME: some tests does not return and times out.
177 (home-page "https://www.github.com/giampaolo/psutil")
178 (synopsis "Library for retrieving information on running processes")
180 "psutil (Python system and process utilities) is a library for retrieving
181 information on running processes and system utilization (CPU, memory, disks,
182 network) in Python. It is useful mainly for system monitoring, profiling and
183 limiting process resources and management of running processes. It implements
184 many functionalities offered by command line tools such as: ps, top, lsof,
185 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
186 pidof, tty, taskset, pmap.")
187 (properties `((python2-variant . ,(delay python2-psutil))))
188 (license license:bsd-3)))
190 (define-public python2-psutil
191 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 `(("python2-enum34" ,python2-enum34) ;optional
196 ,@(package-propagated-inputs base))))))
198 (define-public python-shapely
200 (name "python-shapely")
201 (version "1.6.4.post2")
205 (uri (pypi-uri "Shapely" version))
208 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
209 (build-system python-build-system)
211 `(("python-cython" ,python-cython)
212 ("python-matplotlib" ,python-matplotlib)
213 ("python-pytest" ,python-pytest)
214 ("python-pytest-cov" ,python-pytest-cov)))
218 `(("python-numpy" ,python-numpy)))
221 (modify-phases %standard-phases
222 (add-after 'unpack 'patch-geos-path
223 (lambda* (#:key inputs #:allow-other-keys)
224 (let ((geos (assoc-ref inputs "geos"))
225 (glibc (assoc-ref inputs ,(if (%current-target-system)
226 "cross-libc" "libc"))))
227 (substitute* "shapely/geos.py"
228 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
229 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
230 geos "/lib/libgeos_c.so'])"))
231 (("free = load_dll\\('c'\\)\\.free")
232 (string-append "free = load_dll('c', fallbacks=['"
233 glibc "/lib/libc.so.6']).free"))))
235 (home-page "https://github.com/Toblerity/Shapely")
236 (synopsis "Library for the manipulation and analysis of geometric objects")
237 (description "Shapely is a Python package for manipulation and analysis of
238 planar geometric objects. It is based on the @code{GEOS} library.")
239 (license license:bsd-3)))
241 (define-public python-shortuuid
243 (name "python-shortuuid")
248 (uri (pypi-uri "shortuuid" version))
251 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
252 (build-system python-build-system)
254 `(("python-pep8" ,python-pep8)))
255 (home-page "https://github.com/skorokithakis/shortuuid")
256 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 "@code{shortuuid} is a Python library for generating concise, unambiguous
259 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
260 module and then similar looking characters are removed.")
261 (license license:bsd-3)))
263 (define-public python-logwrap
265 (name "python-logwrap")
270 (uri (pypi-uri "logwrap" version ".zip"))
273 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
274 (build-system python-build-system)
276 `(("python-six" ,python-six)
277 ("python-typing" ,python-typing)))
280 ("python-cython" ,python-cython)
281 ("python-pytest" ,python-pytest)
282 ("python-pytest-cov" ,python-pytest-cov)
283 ("python-pytest-runner" ,python-pytest-runner)))
284 (home-page "https://github.com/penguinolog/logwrap")
285 (synopsis "Decorator for logging function arguments")
286 (description "This package provides a decorator to log function arguments
287 and function call return values in a human-readable way.")
288 (license license:asl2.0)))
290 (define-public python2-shapely
291 (package-with-python2 python-shapely))
293 (define-public python-clyent
295 (name "python-clyent")
300 (uri (pypi-uri "clyent" version))
303 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
304 (build-system python-build-system)
306 `(("python-mock" ,python-mock)))
307 (home-page "https://github.com/binstar/clyent")
308 (synopsis "Command line client library")
309 (description "Clyent is a Python command line utiliy library. It is used
310 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
311 (license license:bsd-3)))
313 (define-public python2-clyent
314 (package-with-python2 python-clyent))
316 (define-public python-babel
318 (name "python-babel")
323 (uri (pypi-uri "Babel" version))
326 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
327 (build-system python-build-system)
329 `(("python-freezegun" ,python-freezegun)
330 ("python-pytest" ,python-pytest)))
332 `(("python-pytz" ,python-pytz)))
334 `(#:phases (modify-phases %standard-phases
337 (invoke "pytest" "-vv" "-k"
339 ;; XXX: These tests fail when using Pytest 4.x and
340 ;; Babel 2.6.0. Try removing this for later versions.
341 "not test_no_inherit_metazone_marker_never_in_output"
342 " and not test_smoke_dates"
343 " and not test_smoke_numbers")))))))
344 (home-page "http://babel.pocoo.org/")
346 "Tools for internationalizing Python applications")
348 "Babel is composed of two major parts:
349 - tools to build and work with gettext message catalogs
350 - a Python interface to the CLDR (Common Locale Data Repository), providing
351 access to various locale display names, localized number and date formatting,
353 (license license:bsd-3)))
355 (define-public python2-babel
356 (package-with-python2 python-babel))
358 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
359 (define-public python2-babel-2.6
361 (inherit python2-babel)
365 (uri (pypi-uri "Babel" version))
368 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
370 (define-public python2-backport-ssl-match-hostname
372 (name "python2-backport-ssl-match-hostname")
377 (uri (pypi-uri "backports.ssl_match_hostname" version))
380 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
381 (build-system python-build-system)
384 #:tests? #f)) ; no test target
385 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
386 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
388 "This backport brings the ssl.match_hostname() function to users of
389 earlier versions of Python. The function checks the hostname in the
390 certificate returned by the server to which a connection has been established,
391 and verifies that it matches the intended target hostname.")
392 (license license:psfl)))
394 (define-public python-hdf4
401 (uri (pypi-uri name version))
404 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
405 (build-system python-build-system)
406 (native-inputs `(("nose" ,python-nose)))
407 (propagated-inputs `(("numpy" ,python-numpy)))
414 (modify-phases %standard-phases
417 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
418 ;; on to import numpy. Somehow this works on their CI system.
419 ;; Let's just manage PYTHONPATH here instead.
420 (substitute* "runexamples.sh"
421 (("export PYTHONPATH=.*") ""))
423 (string-append (getcwd) ":"
424 (getenv "PYTHONPATH")))
425 (invoke "./runexamples.sh")
426 (invoke "nosetests" "-v"))))))
427 (home-page "https://github.com/fhs/python-hdf4")
428 (synopsis "Python interface to the NCSA HDF4 library")
430 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
431 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
432 NetCDF files can also be read and modified. Python-HDF4 is a fork of
433 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
434 (license license:expat)))
436 (define-public python2-hdf4
437 (package-with-python2 python-hdf4))
439 (define-public python-h5py
446 (uri (pypi-uri "h5py" version))
449 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
450 (build-system python-build-system)
452 `(#:tests? #f ; no test target
454 (modify-phases %standard-phases
455 (add-after 'unpack 'fix-hdf5-paths
456 (lambda* (#:key inputs #:allow-other-keys)
457 (let ((prefix (assoc-ref inputs "hdf5")))
458 (substitute* "setup_build.py"
459 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']"))
461 (("'/opt/local/include', '/usr/local/include'")
462 (string-append "'" prefix "/include" "'")))
463 (substitute* "setup_configure.py"
464 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
465 (string-append "['" prefix "/lib" "']")))
468 `(("python-six" ,python-six)
469 ("python-numpy" ,python-numpy)))
473 `(("python-cython" ,python-cython)
474 ("python-pkgconfig" ,python-pkgconfig)))
475 (home-page "http://www.h5py.org/")
476 (synopsis "Read and write HDF5 files from Python")
478 "The h5py package provides both a high- and low-level interface to the
479 HDF5 library from Python. The low-level interface is intended to be a
480 complete wrapping of the HDF5 API, while the high-level component supports
481 access to HDF5 files, datasets and groups using established Python and NumPy
483 (license license:bsd-3)))
485 (define-public python2-h5py
486 (package-with-python2 python-h5py))
488 (define-public python-sh
495 (uri (pypi-uri "sh" version))
498 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
499 (build-system python-build-system)
502 (modify-phases %standard-phases
505 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
506 (setenv "HOME" "/tmp")
507 (invoke "python" "sh.py" "test"))))))
509 `(("python-coverage" ,python-coverage)))
510 (home-page "https://github.com/amoffat/sh")
511 (synopsis "Python subprocess replacement")
512 (description "This package provides a replacement for Python's
513 @code{subprocess} feature.")
514 (license license:expat)))
516 (define-public python2-sh
517 (package-with-python2 python-sh))
519 (define-public python-cftime
521 (name "python-cftime")
526 (uri (pypi-uri "cftime" version))
529 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
530 (build-system python-build-system)
532 `(("python-numpy" ,python-numpy)))
534 `(("python-coveralls" ,python-coveralls)
535 ("python-cython" ,python-cython)
536 ("python-pytest-cov" ,python-pytest-cov)))
537 (home-page "https://github.com/Unidata/cftime")
538 (synopsis "Library for time handling")
540 "This package provides time-handling functionality that used to be part
541 of the netcdf4 package before.")
542 ;; This package claims to include code under the GPLv3 but is released
544 (license (list license:isc license:gpl3+))))
546 (define-public python-netcdf4
548 (name "python-netcdf4")
553 (uri (pypi-uri "netCDF4" version))
556 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
557 (build-system python-build-system)
560 (modify-phases %standard-phases
561 (add-after 'unpack 'configure-locations
562 (lambda* (#:key inputs #:allow-other-keys)
563 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
566 `(("python-cython" ,python-cython)))
568 `(("python-numpy" ,python-numpy)
569 ("python-cftime" ,python-cftime)))
574 (home-page "https://github.com/Unidata/netcdf4-python")
575 (synopsis "Python/numpy interface to the netCDF library")
576 (description "Netcdf4-python is a Python interface to the netCDF C
577 library. netCDF version 4 has many features not found in earlier
578 versions of the library and is implemented on top of HDF5. This module
579 can read and write files in both the new netCDF 4 and the old netCDF 3
580 format, and can create files that are readable by HDF5 clients. The
581 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
582 to users of that module.")
583 ;; The software is mainly ISC, but includes some files covered
584 ;; by the Expat license.
585 (license (list license:isc license:expat))))
587 (define-public python2-netcdf4
588 (package-with-python2 python-netcdf4))
590 (define-public python-lockfile
592 (name "python-lockfile")
597 (uri (pypi-uri "lockfile" version))
600 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
601 (build-system python-build-system)
602 (arguments '(#:test-target "check"))
604 `(("python-pbr" ,python-pbr)))
605 (home-page "https://launchpad.net/pylockfile")
606 (synopsis "Platform-independent file locking module")
608 "The lockfile package exports a LockFile class which provides a simple
609 API for locking files.")
610 (license license:expat)))
612 (define-public python2-lockfile
613 (package-with-python2 python-lockfile))
615 (define-public python-semantic-version
617 (name "python-semantic-version")
622 (uri (pypi-uri "semantic_version" version))
625 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
626 (build-system python-build-system)
628 `(#:tests? #f)) ; PyPI tarball lacks tests
629 (home-page "https://github.com/rbarrois/python-semanticversion")
630 (synopsis "Semantic versioning module for Python")
632 "The @code{semantic_version} class is a small library for handling
633 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
635 It can compare versions, generate a new version that represents a bump in one of
636 the version levels, and check whether any given string is a proper semantic
637 version identifier.")
638 (license license:bsd-3)))
640 (define-public python2-semantic-version
641 (package-with-python2 python-semantic-version))
643 (define-public python-serpent
645 (name "python-serpent")
650 (uri (pypi-uri "serpent" version))
652 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
653 (build-system python-build-system)
655 `(("python-attrs" ,python-attrs)
656 ("python-pytz" ,python-pytz)))
657 (home-page "https://github.com/irmen/Serpent")
658 (synopsis "Serializer for literal Python expressions")
660 "Serpent provides @code{ast.literal_eval()}-compatible object tree
661 serialization. It serializes an object tree into bytes (an utf-8 encoded
662 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
663 to rebuild the original object tree.
665 Because only safe literals are encoded, it is safe to send serpent data to
666 other machines, such as over the network.")
667 (license license:expat)))
669 (define-public python-setuptools
671 (name "python-setuptools")
676 (uri (pypi-uri "setuptools" version ".zip"))
679 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
680 (modules '((guix build utils)))
683 ;; Remove included binaries which are used to build self-extracting
684 ;; installers for Windows.
685 ;; TODO: Find some way to build them ourself so we can include them.
686 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
688 (build-system python-build-system)
689 ;; FIXME: Tests require pytest, which itself relies on setuptools.
690 ;; One could bootstrap with an internal untested setuptools.
693 (home-page "https://pypi.python.org/pypi/setuptools")
695 "Library designed to facilitate packaging Python projects")
697 "Setuptools is a fully-featured, stable library designed to facilitate
698 packaging Python projects, where packaging includes:
699 Python package and module definitions,
700 distribution package metadata,
702 project installation,
703 platform-specific details,
705 ;; TODO: setuptools now bundles the following libraries:
706 ;; packaging, pyparsing, six and appdirs. How to unbundle?
707 (license (list license:psfl ; setuptools itself
708 license:expat ; six, appdirs, pyparsing
709 license:asl2.0 ; packaging is dual ASL2/BSD-2
712 (define-public python2-setuptools
713 (package-with-python2 python-setuptools))
715 (define-public python-uniseg
717 (name "python-uniseg")
722 (uri (pypi-uri "uniseg" version ".zip"))
725 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
726 (build-system python-build-system)
728 '(#:tests? #f)) ; The test suite requires network access.
732 "https://bitbucket.org/emptypage/uniseg-python")
734 "Python library to determine Unicode text segmentations")
736 "Uniseg is a Python package used to determine Unicode text segmentations.
737 Supported segmentations include:
739 @item @dfn{Code point} (any value in the Unicode codespace)
740 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
741 multiple Unicode code points, e.g. \"G\" + acute-accent)
746 (license license:expat)))
748 (define-public python2-uniseg
749 (package-with-python2 python-uniseg))
751 (define-public python-humanfriendly
753 (name "python-humanfriendly")
758 (uri (pypi-uri "humanfriendly" version))
761 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
762 (build-system python-build-system)
764 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
767 `(("python-monotonic" ,python-monotonic)))
768 (home-page "https://humanfriendly.readthedocs.io")
769 (synopsis "Human-friendly input and output in Python")
771 "The functions and classes in @code{humanfriendly} can be used to make
772 text interfaces more user-friendly. It includes tools to parse and format
773 numbers, file sizes, and timespans, timers for long-running operations, menus
774 to allow the user to choose from a list of options, and terminal interaction
776 (license license:expat)))
778 (define-public python2-humanfriendly
779 (package-with-python2 python-humanfriendly))
781 (define-public python-capturer
783 (name "python-capturer")
788 (uri (pypi-uri "capturer" version))
791 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
792 (build-system python-build-system)
796 `(("python-humanfriendly" ,python-humanfriendly)))
797 (home-page "https://capturer.readthedocs.io")
798 (synopsis "Capture stdout and stderr streams of the current process")
800 "The capturer package makes it easy to capture the stdout and stderr
801 streams of the current process and subprocesses. Output can be relayed
802 to the terminal in real time but is also available to the Python program
803 for additional processing.")
804 (license license:expat)))
806 (define-public python2-capturer
807 (package-with-python2 python-capturer))
809 (define-public python-case
816 (uri (pypi-uri "case" version))
819 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
820 (build-system python-build-system)
822 `(("python-mock" ,python-mock)
823 ("python-nose" ,python-nose)
824 ("python-six" ,python-six)
825 ("python-unittest2" ,python-unittest2)))
827 `(("python-coverage" ,python-coverage)))
828 (home-page "https://github.com/celery/case")
829 (synopsis "Unittest utilities and convenience methods")
831 "The @code{case} package provides utilities on top of unittest, including
832 some helpful Python 2 compatibility convenience methods.")
833 (license license:bsd-3)))
835 (define-public python-verboselogs
837 (name "python-verboselogs")
842 (uri (pypi-uri "verboselogs" version))
845 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
846 (build-system python-build-system)
848 `(("python-mock" ,python-mock)
849 ("python-astroid" ,python-astroid)
850 ("python-pylint" ,python-pylint)))
851 (home-page "https://verboselogs.readthedocs.io")
852 (synopsis "Verbose logging level for Python's logging module")
854 "The @code{verboselogs} package extends Python's @code{logging} module to
855 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
856 (license license:expat)))
858 (define-public python2-verboselogs
859 (package-with-python2 python-verboselogs))
861 (define-public python-coloredlogs
863 (name "python-coloredlogs")
868 (uri (pypi-uri "coloredlogs" version))
871 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
872 (build-system python-build-system)
874 `(;Tests require some updated modules
877 `(("python-capturer" ,python-capturer)))
878 (home-page "https://coloredlogs.readthedocs.io")
879 (synopsis "Colored stream handler for Python's logging module")
881 "The @code{coloredlogs} package enables colored terminal output for
882 Python's logging module. The @code{ColoredFormatter} class inherits from
883 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
885 (license license:expat)))
887 (define-public python2-coloredlogs
888 (package-with-python2 python-coloredlogs))
890 (define-public python-et-xmlfile
892 (name "python-et-xmlfile")
897 (uri (pypi-uri "et_xmlfile" version))
900 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
901 (build-system python-build-system)
903 `(#:phases (modify-phases %standard-phases
906 (invoke "pytest"))))))
908 `(("python-pytest" ,python-pytest)
909 ("python-lxml" ,python-lxml))) ;used for the tests
910 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
911 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
912 (description "This Python library is based upon the @code{xmlfile} module
913 from @code{lxml}. It aims to provide a low memory, compatible implementation
915 (license license:expat)))
917 (define-public python2-et-xmlfile
918 (package-with-python2 python-et-xmlfile))
920 (define-public python-openpyxl
922 (name "python-openpyxl")
926 ;; We use the upstream repository, as the tests are not included in the
930 (url "https://bitbucket.org/openpyxl/openpyxl")
931 (changeset version)))
932 (file-name (string-append name "-" version "-checkout"))
934 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
935 (build-system python-build-system)
937 `(#:phases (modify-phases %standard-phases
940 (invoke "pytest"))))))
942 ;; For the test suite.
943 `(("python-lxml" ,python-lxml)
944 ("python-pillow" ,python-pillow)
945 ("python-pytest" ,python-pytest)))
947 `(("python-et-xmlfile" ,python-et-xmlfile)
948 ("python-jdcal" ,python-jdcal)))
949 (home-page "https://openpyxl.readthedocs.io")
950 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
951 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
952 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
954 (license license:expat)))
956 (define-public python-eventlet
958 (name "python-eventlet")
963 (uri (pypi-uri "eventlet" version))
966 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
967 (build-system python-build-system)
969 `(("python-greenlet" ,python-greenlet)))
971 ;; TODO: Requires unpackaged 'enum-compat'.
973 (home-page "http://eventlet.net")
974 (synopsis "Concurrent networking library for Python")
976 "Eventlet is a concurrent networking library for Python that
977 allows you to change how you run your code, not how you write it.
978 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
979 Coroutines ensure that the developer uses a blocking style of programming
980 that is similar to threading, but provide the benefits of non-blocking I/O.
981 The event dispatch is implicit, which means you can easily use @code{Eventlet}
982 from the Python interpreter, or as a small part of a larger application.")
983 (license license:expat)))
985 (define-public python2-eventlet
986 (let ((base (package-with-python2
987 (strip-python2-variant python-eventlet))))
988 (package (inherit base)
990 `(("python2-enum34" ,python2-enum34)
991 ,@(package-propagated-inputs base))))))
993 (define-public python-six
1000 (uri (pypi-uri "six" version))
1003 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1004 (build-system python-build-system)
1007 (modify-phases %standard-phases
1010 (invoke "py.test" "-v"))))))
1012 `(("python-py" ,python-py)
1013 ("python-pytest" ,python-pytest-bootstrap)))
1014 (home-page "https://pypi.python.org/pypi/six/")
1015 (synopsis "Python 2 and 3 compatibility utilities")
1017 "Six is a Python 2 and 3 compatibility library. It provides utility
1018 functions for smoothing over the differences between the Python versions with
1019 the goal of writing Python code that is compatible on both Python versions.
1020 Six supports every Python version since 2.5. It is contained in only one
1021 Python file, so it can be easily copied into your project.")
1022 (license license:x11)))
1024 (define-public python2-six
1025 (package-with-python2 python-six))
1027 (define-public python-six-bootstrap
1029 (inherit python-six)
1030 (name "python-six-bootstrap")
1032 (arguments `(#:tests? #f))))
1034 (define-public python2-six-bootstrap
1035 (package-with-python2 python-six-bootstrap))
1037 (define-public python-schedule
1039 (name "python-schedule")
1044 (uri (pypi-uri "schedule" version))
1047 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1048 (build-system python-build-system)
1050 `(("python-pytest" ,python-pytest)
1051 ("python-mock" ,python-mock)))
1052 (home-page "https://github.com/dbader/schedule")
1053 (synopsis "Schedule periodic function calls in Python")
1055 "Schedule is an in-process scheduler for periodic jobs that uses the
1056 builder pattern for configuration. Schedule lets you run Python functions (or
1057 any other callable) periodically at pre-determined intervals using a simple,
1058 human-friendly syntax.")
1059 (license license:expat)))
1061 (define-public python2-schedule
1062 (package-with-python2 python-schedule))
1064 (define-public python-pandas
1066 (name "python-pandas")
1071 (uri (pypi-uri "pandas" version))
1073 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1074 (build-system python-build-system)
1076 `(#:modules ((guix build utils)
1077 (guix build python-build-system)
1080 #:phases (modify-phases %standard-phases
1081 (add-after 'unpack 'patch-which
1082 (lambda* (#:key inputs #:allow-other-keys)
1083 (let ((which (assoc-ref inputs "which")))
1084 (substitute* "pandas/io/clipboard/__init__.py"
1085 (("^CHECK_CMD = .*")
1086 (string-append "CHECK_CMD = \"" which "\"\n"))))
1090 (let ((build-directory
1093 (car (scandir "build"
1094 (cut string-prefix? "lib." <>))))))
1095 ;; Disable the "strict data files" option which causes
1096 ;; the build to error out if required data files are
1097 ;; not available (as is the case with PyPI archives).
1098 (substitute* "setup.cfg"
1099 (("addopts = --strict-data-files") "addopts = "))
1100 (with-directory-excursion build-directory
1101 ;; Delete tests that require "moto" which is not yet
1103 (for-each delete-file
1104 '("pandas/tests/io/conftest.py"
1105 "pandas/tests/io/json/test_compression.py"
1106 "pandas/tests/io/parser/test_network.py"
1107 "pandas/tests/io/test_parquet.py"))
1108 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1109 "--skip-network" "-k"
1110 ;; XXX: Due to the deleted tests above.
1111 "not test_read_s3_jsonl"))))))))
1113 `(("python-numpy" ,python-numpy)
1114 ("python-openpyxl" ,python-openpyxl)
1115 ("python-pytz" ,python-pytz)
1116 ("python-dateutil" ,python-dateutil)
1117 ("python-xlrd" ,python-xlrd)))
1119 `(("which" ,which)))
1121 `(("python-cython" ,python-cython)
1122 ("python-beautifulsoup4" ,python-beautifulsoup4)
1123 ("python-lxml" ,python-lxml)
1124 ("python-html5lib" ,python-html5lib)
1125 ("python-nose" ,python-nose)
1126 ("python-pytest" ,python-pytest)
1127 ("python-pytest-mock" ,python-pytest-mock)))
1128 (home-page "https://pandas.pydata.org")
1129 (synopsis "Data structures for data analysis, time series, and statistics")
1131 "Pandas is a Python package providing fast, flexible, and expressive data
1132 structures designed to make working with structured (tabular,
1133 multidimensional, potentially heterogeneous) and time series data both easy
1134 and intuitive. It aims to be the fundamental high-level building block for
1135 doing practical, real world data analysis in Python.")
1136 (license license:bsd-3)))
1138 (define-public python2-pandas
1139 (package-with-python2 python-pandas))
1141 (define-public python2-mechanize
1143 (name "python2-mechanize")
1148 (uri (pypi-uri "mechanize" version))
1151 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1152 (build-system python-build-system)
1154 `(#:python ,python-2 ; apparently incompatible with Python 3
1156 ;; test fails with message
1157 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1158 ;; (python-3.3.2) or
1159 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1161 ;; The source code is from March 2011 and probably not up-to-date
1162 ;; with respect to python unit tests.
1163 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1165 "Stateful programmatic web browsing in Python")
1167 "Mechanize implements stateful programmatic web browsing in Python,
1168 after Andy Lester’s Perl module WWW::Mechanize.")
1169 (license (license:non-copyleft
1171 "See COPYING in the distribution."))))
1174 (define-public python-simplejson
1176 (name "python-simplejson")
1181 (uri (pypi-uri "simplejson" version))
1184 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1185 (build-system python-build-system)
1186 (home-page "http://simplejson.readthedocs.org/en/latest/")
1188 "Json library for Python")
1190 "JSON (JavaScript Object Notation) is a subset of JavaScript
1191 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1194 Simplejson exposes an API familiar to users of the standard library marshal
1195 and pickle modules. It is the externally maintained version of the json
1196 library contained in Python 2.6, but maintains compatibility with Python 2.5
1197 and (currently) has significant performance advantages, even without using
1198 the optional C extension for speedups. Simplejson is also supported on
1200 (license license:x11)))
1202 (define-public python2-simplejson
1203 (package-with-python2 python-simplejson))
1206 (define-public python-pyicu
1208 (name "python-pyicu")
1213 (uri (pypi-uri "PyICU" version))
1216 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1217 (build-system python-build-system)
1219 `(("icu4c" ,icu4c)))
1221 `(("python-pytest" ,python-pytest)
1222 ("python-six" ,python-six)))
1223 (home-page "https://github.com/ovalhub/pyicu")
1224 (synopsis "Python extension wrapping the ICU C++ API")
1226 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (properties `((python2-variant . ,(delay python2-pyicu))))
1228 (license license:x11)))
1230 (define-public python2-pyicu
1231 (let ((base (package-with-python2
1232 (strip-python2-variant python-pyicu))))
1236 `(,@(package-arguments base)
1238 (modify-phases %standard-phases
1239 (add-before 'check 'delete-failing-test
1241 ;; XXX: This fails due to Unicode issues unique to Python 2,
1242 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1243 (delete-file "test/test_Script.py")
1246 (define-public python2-dogtail
1247 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1248 ;; spaces in indentation" with Python 3.
1250 (name "python2-dogtail")
1254 (uri (pypi-uri "dogtail" version))
1257 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1258 (build-system python-build-system)
1259 (arguments `(#:python ,python-2
1260 #:tests? #f)) ; invalid command "test"
1261 ;; Currently no offical homepage.
1262 (home-page "https://pypi.python.org/pypi/dogtail/")
1263 (synopsis "GUI test tool and automation framework written in Python")
1265 "Dogtail is a GUI test tool and automation framework written in Python.
1266 It uses Accessibility (a11y) technologies to communicate with desktop
1267 applications. dogtail scripts are written in Python and executed like any
1268 other Python program.")
1269 (license license:gpl2+)))
1271 (define-public python-empy
1273 (name "python-empy")
1277 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1281 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1282 (build-system python-build-system)
1284 `(#:tests? #f)) ; python2 only
1285 (home-page "http://www.alcyone.com/software/empy/")
1286 (synopsis "Templating system for Python")
1288 "EmPy is a system for embedding Python expressions and statements in
1289 template text; it takes an EmPy source file, processes it, and produces
1290 output. This is accomplished via expansions, which are special signals to the
1291 EmPy system and are set off by a special prefix (by default the at sign, @@).
1292 EmPy can expand arbitrary Python expressions and statements in this way, as
1293 well as a variety of special forms. Textual data not explicitly delimited in
1294 this way is sent unaffected to the output, allowing Python to be used in
1295 effect as a markup language. Also supported are callbacks via hooks,
1296 recording and playback via diversions, and dynamic, chainable filters. The
1297 system is highly configurable via command line options and embedded
1299 (license license:lgpl2.1+)))
1301 (define-public python2-empy
1302 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1305 (arguments `(,@(package-arguments base)
1308 (define-public python2-element-tree
1310 (name "python2-element-tree")
1315 "http://effbot.org/media/downloads/elementtree-"
1316 version "-20050316.tar.gz"))
1319 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1320 (build-system python-build-system)
1322 `(#:python ,python-2 ; seems to be part of Python 3
1323 #:tests? #f)) ; no 'test' sub-command
1324 (synopsis "Toolkit for XML processing in Python")
1326 "ElementTree is a Python library supporting lightweight XML processing.")
1327 (home-page "http://effbot.org/zone/element-index.htm")
1328 (license (license:x11-style
1329 "http://docs.python.org/2/license.html"
1330 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1332 (define-public python2-pybugz
1334 (name "python2-pybugz")
1339 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1343 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1344 (patches (search-patches "pybugz-stty.patch"
1345 "pybugz-encode-error.patch"))))
1346 (build-system python-build-system)
1348 `(#:python ,python-2 ; SyntaxError with Python 3
1349 #:tests? #f)) ; no 'test' sub-command
1351 `(("element-tree" ,python2-element-tree)))
1352 (synopsis "Python and command-line interface to Bugzilla")
1354 "PyBugz is a Python library and command-line tool to query the Bugzilla
1355 bug tracking system. It is meant as an aid to speed up interaction with the
1357 (home-page "http://www.liquidx.net/pybugz/")
1358 (license license:gpl2)))
1360 (define-public python2-enum
1362 (name "python2-enum")
1366 (uri (pypi-uri "enum" version))
1369 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1370 (build-system python-build-system)
1372 `(#:python ,python-2))
1373 (home-page "http://pypi.python.org/pypi/enum/")
1374 (synopsis "Robust enumerated type support in Python")
1376 "This provides a module for robust enumerations in Python. It has
1377 been superseded by the Python standard library and is provided only for
1379 ;; Choice of either license.
1380 (license (list license:gpl3+ license:psfl))))
1382 (define-public python-enum34
1384 (name "python-enum34")
1389 (uri (pypi-uri "enum34" version))
1392 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1393 (build-system python-build-system)
1394 (home-page "https://pypi.python.org/pypi/enum34")
1395 (synopsis "Backported Python 3.4 Enum")
1397 "Enum34 is the new Python stdlib enum module available in Python 3.4
1398 backported for previous versions of Python from 2.4 to 3.3.")
1399 (license license:bsd-3)))
1401 (define-public python2-enum34
1402 (package-with-python2 python-enum34))
1404 (define-public python-parse-type
1406 (name "python-parse-type")
1411 (uri (pypi-uri "parse_type" version))
1414 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1415 (build-system python-build-system)
1417 `(("python-six" ,python-six)
1418 ("python-parse" ,python-parse)))
1420 `(("python-pytest" ,python-pytest)
1421 ("python-pytest-runner" ,python-pytest-runner)))
1422 (home-page "https://github.com/jenisys/parse_type")
1423 (synopsis "Extended parse module")
1425 "Parse_type extends the python parse module.")
1427 `((python2-variant . ,(delay python2-parse-type))))
1428 (license license:bsd-3)))
1430 (define-public python2-parse-type
1431 (let ((base (package-with-python2
1432 (strip-python2-variant python-parse-type))))
1433 (package (inherit base)
1435 `(("python2-enum34" ,python2-enum34)
1436 ,@(package-propagated-inputs base))))))
1438 (define-public python-parse
1440 (name "python-parse")
1445 (uri (pypi-uri "parse" version))
1448 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1449 (build-system python-build-system)
1452 (modify-phases %standard-phases
1454 (lambda _ (invoke "python" "test_parse.py"))))))
1455 (home-page "https://github.com/r1chardj0n3s/parse")
1456 (synopsis "Parse strings")
1458 "Parse strings using a specification based on the Python @code{format()}
1460 (license license:x11)))
1462 (define-public python-polib
1464 (name "python-polib")
1468 (uri (pypi-uri "polib" version))
1471 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1472 (build-system python-build-system)
1473 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1474 (synopsis "Manipulate, create and modify gettext files")
1475 (description "Polib can manipulate any gettext format (po, pot and mo)
1476 files. It can be used to create po files from scratch or to modify
1478 (license license:expat)))
1480 (define-public python2-polib
1481 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1484 (arguments `(,@(package-arguments base)
1485 ;; Tests don't work with python2.
1488 (define-public scons
1495 (url "https://github.com/SCons/scons.git")
1497 (file-name (git-file-name name version))
1500 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1501 (build-system python-build-system)
1503 `(#:use-setuptools? #f ; still relies on distutils
1504 #:tests? #f ; no 'python setup.py test' command
1506 (modify-phases %standard-phases
1507 (add-before 'build 'bootstrap
1509 (substitute* "src/engine/SCons/compat/__init__.py"
1510 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1511 "sys.modules[new] = __import__(old)"))
1512 (substitute* "src/engine/SCons/Platform/__init__.py"
1513 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1514 "mod = __import__(full_name)"))
1515 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1516 (chdir "build/scons")
1518 (home-page "http://scons.org/")
1519 (synopsis "Software construction tool written in Python")
1521 "SCons is a software construction tool. Think of SCons as an improved,
1522 cross-platform substitute for the classic Make utility with integrated
1523 functionality similar to autoconf/automake and compiler caches such as ccache.
1524 In short, SCons is an easier, more reliable and faster way to build
1526 (license license:x11)))
1528 (define-public scons-python2
1530 (inherit (package-with-python2 scons))
1531 (name "scons-python2")))
1533 (define-public python-extras
1535 (name "python-extras")
1540 (uri (pypi-uri "extras" version))
1543 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1544 (build-system python-build-system)
1546 ;; FIXME: Circular dependency on testtools.
1548 (home-page "https://github.com/testing-cabal/extras")
1549 (synopsis "Useful extensions to the Python standard library")
1551 "Extras is a set of extensions to the Python standard library.")
1552 (license license:expat)))
1554 (define-public python2-extras
1555 (package-with-python2 python-extras))
1557 (define-public python-mimeparse
1559 (name "python-mimeparse")
1564 (uri (pypi-uri "python-mimeparse" version))
1567 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1568 (build-system python-build-system)
1571 (modify-phases %standard-phases
1574 (invoke "./mimeparse_test.py"))))))
1576 "https://github.com/dbtsai/python-mimeparse")
1577 (synopsis "Python library for parsing MIME types")
1579 "Mimeparse provides basic functions for parsing MIME type names and
1580 matching them against a list of media-ranges.")
1581 (license license:expat)))
1583 (define-public python2-mimeparse
1584 (package-with-python2 python-mimeparse))
1586 (define-public python-miniboa
1588 (name "python-miniboa")
1593 (uri (pypi-uri "miniboa" version))
1596 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1597 (build-system python-build-system)
1598 (home-page "https://github.com/shmup/miniboa")
1599 (synopsis "Simple, single-threaded Telnet server")
1601 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1603 (license license:asl2.0)))
1605 (define-public python2-miniboa
1606 (package-with-python2 python-miniboa))
1608 (define-public python-pafy
1610 (name "python-pafy")
1615 (uri (pypi-uri "pafy" version))
1618 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1619 (build-system python-build-system)
1621 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1623 ;; Youtube-dl is a python package which is imported in the file
1624 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1625 `(("youtube-dl" ,youtube-dl)))
1626 (home-page "https://np1.github.io/pafy/")
1627 (synopsis "Retrieve YouTube content and metadata")
1629 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1630 (license license:lgpl3+)))
1632 (define-public python2-funcsigs
1634 (name "python2-funcsigs")
1638 (uri (pypi-uri "funcsigs" version))
1641 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1642 (build-system python-build-system)
1644 `(#:python ,python-2))
1646 `(("python2-unittest2" ,python2-unittest2)))
1647 (home-page "http://funcsigs.readthedocs.org")
1648 (synopsis "Python function signatures from PEP362")
1650 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1651 (license license:asl2.0)))
1653 (define-public python2-funcsigs-bootstrap
1655 (inherit python2-funcsigs)
1656 (name "python2-funcsigs-bootstrap")
1660 ,@(package-arguments python2-funcsigs)))))
1662 (define-public python-py
1669 (uri (pypi-uri "py" version))
1672 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1673 (build-system python-build-system)
1675 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1676 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1677 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1678 ;; Is this module globally installed?"
1681 `(("python-setuptools-scm" ,python-setuptools-scm)))
1682 (home-page "https://github.com/pytest-dev/py")
1683 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1685 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1686 code introspection, and logging.")
1687 (license license:expat)))
1689 (define-public python2-py
1690 (package-with-python2 python-py))
1692 ;; Recent versions of python-fixtures and python-testrepository need
1693 ;; python-pbr for packaging, which itself needs these two packages for
1695 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1696 ;; same source, just without any test dependencies and with tests disabled.
1697 ;; python-pbr-minmal is then used to package python-fixtures and
1698 ;; python-testrepository.
1699 ;; Strictly speaking we currently could remove the test-requirements from the
1700 ;; normal python-pbr package (and save this package) since test are disabled
1701 ;; there anyway. But this may change in future.
1702 (define-public python-pbr-minimal
1704 (name "python-pbr-minimal")
1709 (uri (pypi-uri "pbr" version))
1712 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1713 (build-system python-build-system)
1716 (home-page "http://docs.openstack.org/developer/pbr/")
1717 (synopsis "Minimal build of python-pbr used for bootstrapping")
1719 "Used only for bootstrapping python2-pbr, you should not need this.")
1720 (license license:asl2.0)))
1722 (define-public python2-pbr-minimal
1723 (package-with-python2 python-pbr-minimal))
1725 (define-public python-pbr
1727 (inherit python-pbr-minimal)
1730 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1732 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1734 `(("python-fixtures" ,python-fixtures-bootstrap)
1735 ;; discover, coverage, hacking, subunit
1736 ("python-mock" ,python-mock)
1737 ("python-six" ,python-six)
1738 ("python-sphinx" ,python-sphinx)
1739 ("python-testrepository" ,python-testrepository-bootstrap)
1740 ("python-testresources" ,python-testresources-bootstrap)
1741 ("python-testscenarios" ,python-testscenarios-bootstrap)
1742 ("python-testtools" ,python-testtools-bootstrap)
1743 ("python-virtualenv" ,python-virtualenv)))
1744 (synopsis "Enhance the default behavior of Python’s setuptools")
1746 "Python Build Reasonableness (PBR) is a library that injects some useful
1747 and sensible default behaviors into your setuptools run. It will set
1748 versions, process requirements files and generate AUTHORS and ChangeLog file
1749 from git information.
1752 (define-public python2-pbr
1753 (package-with-python2 python-pbr))
1755 (define-public python-pyrsistent
1757 (name "python-pyrsistent")
1759 (home-page "https://github.com/tobgu/pyrsistent")
1762 (uri (pypi-uri "pyrsistent" version))
1765 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1766 (build-system python-build-system)
1768 `(("python-hypothesis" ,python-hypothesis)
1769 ("python-pytest" ,python-pytest)
1770 ("python-pytest-runner" ,python-pytest-runner)))
1772 `(("python-six" ,python-six)))
1773 (synopsis "Persistent data structures for Python")
1775 "Pyrsistent is a number of persistent collections (by some referred to as
1776 functional data structures). Persistent in the sense that they are immutable.
1778 All methods on a data structure that would normally mutate it instead return a
1779 new copy of the structure containing the requested updates. The original
1780 structure is left untouched.")
1781 (license license:expat)))
1783 (define-public python2-pyrsistent
1784 (package-with-python2 python-pyrsistent))
1786 (define-public python-exif-read
1788 (name "python-exif-read")
1792 (uri (pypi-uri "ExifRead" version))
1795 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1796 (build-system python-build-system)
1797 (arguments `(#:tests? #f)) ; no tests
1798 (home-page "https://github.com/ianare/exif-py")
1799 (synopsis "Python library to extract EXIF data from image files")
1801 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1803 (license license:bsd-3)))
1805 (define-public python2-exif-read
1806 (package-with-python2 python-exif-read))
1808 (define-public python-pyld
1810 (name "python-pyld")
1814 (uri (pypi-uri "PyLD" version))
1817 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1818 (build-system python-build-system)
1819 (home-page "https://github.com/digitalbazaar/pyld")
1820 (synopsis "Python implementation of the JSON-LD specification")
1822 "PyLD is an implementation of the JSON-LD specification.")
1823 (license license:bsd-3)))
1825 (define-public python2-pyld
1826 (package-with-python2 python-pyld))
1828 (define-public python-click
1830 (name "python-click")
1835 (uri (pypi-uri "click" version))
1838 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1839 (build-system python-build-system)
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'fix-paths
1844 (lambda* (#:key inputs #:allow-other-keys)
1845 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1846 "cross-libc" "libc"))))
1847 (substitute* "click/_unicodefun.py"
1849 (string-append "'" glibc "/bin/locale'"))))
1853 (invoke "python" "-m" "pytest"))))))
1855 `(("python-pytest" ,python-pytest)))
1856 (home-page "https://palletsprojects.com/p/click/")
1857 (synopsis "Command line library for Python")
1859 "Click is a Python package for creating command line interfaces in a
1860 composable way with as little code as necessary. Its name stands for
1861 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1862 with sensible defaults out of the box.")
1863 (license license:bsd-3)))
1865 (define-public python2-click
1866 (package-with-python2 python-click))
1868 (define-public python-wheel
1870 (name "python-wheel")
1875 (uri (pypi-uri "wheel" version))
1878 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1879 (build-system python-build-system)
1881 `(("python-jsonschema" ,python-jsonschema)
1882 ("python-pytest-cov" ,python-pytest-cov)))
1883 (home-page "https://bitbucket.org/pypa/wheel/")
1884 (synopsis "Format for built Python packages")
1886 "A wheel is a ZIP-format archive with a specially formatted filename and
1887 the @code{.whl} extension. It is designed to contain all the files for a PEP
1888 376 compatible install in a way that is very close to the on-disk format. Many
1889 packages will be properly installed with only the @code{Unpack} step and the
1890 unpacked archive preserves enough information to @code{Spread} (copy data and
1891 scripts to their final locations) at any later time. Wheel files can be
1892 installed with a newer @code{pip} or with wheel's own command line utility.")
1893 (license license:expat)
1894 (properties `((python2-variant . ,(delay python2-wheel))))))
1896 (define-public python2-wheel
1897 (let ((wheel (package-with-python2
1898 (strip-python2-variant python-wheel))))
1899 (package (inherit wheel)
1900 (native-inputs `(("python2-functools32" ,python2-functools32)
1901 ,@(package-native-inputs wheel))))))
1903 (define-public python-vcversioner
1905 (name "python-vcversioner")
1906 (version "2.16.0.0")
1910 (uri (pypi-uri "vcversioner" version))
1913 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1914 (build-system python-build-system)
1915 (synopsis "Python library for version number discovery")
1916 (description "Vcversioner is a Python library that inspects tagging
1917 information in a variety of version control systems in order to discover
1919 (home-page "https://github.com/habnabit/vcversioner")
1920 (license license:isc)))
1922 (define-public python2-vcversioner
1923 (package-with-python2 python-vcversioner))
1925 (define-public python-jdcal
1927 (name "python-jdcal")
1932 (uri (pypi-uri "jdcal" version))
1935 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1936 (build-system python-build-system)
1938 `(#:phases (modify-phases %standard-phases
1941 (invoke "pytest"))))))
1943 `(("python-pytest" ,python-pytest)))
1944 (home-page "https://github.com/phn/jdcal")
1945 (synopsis "Functions to convert between Julian dates Gregorian dates")
1946 (description "This Python library provides functions for converting
1947 between Julian dates and Gregorian dates.")
1948 (license license:bsd-2)))
1950 (define-public python2-jdcal
1951 (package-with-python2 python-jdcal))
1953 (define-public python-jsonschema
1955 (name "python-jsonschema")
1959 (uri (pypi-uri "jsonschema" version))
1962 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1963 (build-system python-build-system)
1966 (modify-phases %standard-phases
1969 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1970 (invoke "trial" "jsonschema"))))))
1972 `(("python-setuptools_scm" ,python-setuptools-scm)
1973 ("python-twisted" ,python-twisted)))
1975 `(("python-attrs" ,python-attrs)
1976 ("python-pyrsistent" ,python-pyrsistent)
1977 ("python-six" ,python-six)))
1978 (home-page "https://github.com/Julian/jsonschema")
1979 (synopsis "Implementation of JSON Schema for Python")
1981 "Jsonschema is an implementation of JSON Schema for Python.")
1982 (license license:expat)
1983 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1985 (define-public python2-jsonschema
1986 (let ((jsonschema (package-with-python2
1987 (strip-python2-variant python-jsonschema))))
1988 (package (inherit jsonschema)
1990 `(("python2-functools32" ,python2-functools32)
1991 ,@(package-propagated-inputs jsonschema))))))
1993 ;; This old version is still required by docker-compose as of 1.24.0.
1994 (define-public python-jsonschema-2.6
1996 (name "python-jsonschema")
2000 (uri (pypi-uri "jsonschema" version))
2003 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2004 (build-system python-build-system)
2007 (modify-phases %standard-phases
2008 (replace 'check (lambda _ (invoke "nosetests"))))))
2010 `(("python-nose" ,python-nose)
2011 ("python-vcversioner" ,python-vcversioner)))
2012 (home-page "https://github.com/Julian/jsonschema")
2013 (synopsis "Implementation of JSON Schema for Python")
2015 "Jsonschema is an implementation of JSON Schema for Python.")
2016 (license license:expat)
2017 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2019 (define-public python-schema
2021 (name "python-schema")
2026 (uri (pypi-uri "schema" version))
2029 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2030 (build-system python-build-system)
2032 `(("python-pytest" ,python-pytest)))
2033 (home-page "https://github.com/keleshev/schema")
2034 (synopsis "Simple data validation library")
2036 "@code{python-schema} is a library for validating Python data
2037 structures, such as those obtained from config-files, forms, external
2038 services or command-line parsing, converted from JSON/YAML (or
2039 something else) to Python data-types.")
2040 (license license:psfl)))
2042 (define-public python2-schema
2043 (package-with-python2 python-schema))
2045 (define-public python-schema-0.5
2046 (package (inherit python-schema)
2051 (uri (pypi-uri "schema" version))
2054 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2056 (define-public python2-schema-0.5
2057 (package-with-python2 python-schema-0.5))
2059 (define-public python-kitchen
2061 (name "python-kitchen")
2066 (uri (pypi-uri "kitchen" version))
2069 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2070 (build-system python-build-system)
2072 `(("python-chardet" ,python-chardet)))
2073 (home-page "https://github.com/fedora-infra/kitchen")
2074 (synopsis "Python API for snippets")
2075 (description "@code{kitchen} module provides a python API for all sorts of
2076 little useful snippets of code that everybody ends up writing for their projects
2077 but never seem big enough to build an independent release. Use kitchen and stop
2078 cutting and pasting that code over and over.")
2079 (license (list license:lgpl2.1+
2080 ;; subprocess.py, test_subprocess.py,
2081 ;; kitchen/pycompat25/defaultdict.py:
2084 (define-public python2-kitchen
2085 (package-with-python2 python-kitchen))
2087 (define-public python-unidecode
2089 (name "python-unidecode")
2093 (uri (pypi-uri "Unidecode" version))
2096 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2097 (build-system python-build-system)
2098 (home-page "https://pypi.python.org/pypi/Unidecode")
2099 (synopsis "ASCII transliterations of Unicode text")
2101 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2102 useful when integrating with legacy code that doesn't support Unicode, or for
2103 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2104 machine identifiers from human-readable Unicode strings that should still be
2105 somewhat intelligible.")
2106 (license license:gpl2+)))
2108 (define-public python2-unidecode
2109 (package-with-python2 python-unidecode))
2111 (define-public python-pyjwt
2113 (name "python-pyjwt")
2118 (uri (pypi-uri "PyJWT" version))
2121 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2122 (modules '((guix build utils)))
2125 (for-each delete-file-recursively
2126 (find-files "." "\\.pyc$"))
2128 (build-system python-build-system)
2130 `(("python-pytest" ,python-pytest)
2131 ("python-pytest-cov" ,python-pytest-cov)
2132 ("python-pytest-runner" ,python-pytest-runner)))
2133 (home-page "https://github.com/progrium/pyjwt")
2134 (synopsis "JSON Web Token implementation in Python")
2136 "PyJWT is a JSON Web Token implementation written in Python.")
2137 (license license:expat)))
2139 (define-public python2-pyjwt
2140 (package-with-python2 python-pyjwt))
2142 (define-public python-pykka
2144 (name "python-pykka")
2149 (uri (pypi-uri "Pykka" version))
2152 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2153 (build-system python-build-system)
2155 `(("python-mock" ,python-mock)
2156 ("python-nose" ,python-nose)
2157 ("python-gevent" ,python-gevent)
2158 ("python-eventlet" ,python-eventlet)))
2159 (home-page "https://www.pykka.org/")
2160 (synopsis "Pykka is a Python implementation of the actor model")
2162 "Pykka is a Python implementation of the actor model.
2163 The actor model introduces some simple rules to control the sharing
2164 of state and cooperation between execution units, which makes it
2165 easier to build concurrent applications.")
2166 (license license:asl2.0)))
2168 (define-public python2-pykka
2169 (package-with-python2 python-pykka))
2171 (define-public python-pymsgbox
2173 (name "python-pymsgbox")
2179 ;; LICENSE.txt is not present on pypi
2180 (url "https://github.com/asweigart/PyMsgBox")
2181 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2182 (file-name (git-file-name name version))
2185 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2187 ;; Circular dependency to run tests:
2188 ;; Tests need pyautogui, which depends on pymsgbox.
2190 (build-system python-build-system)
2191 (home-page "https://github.com/asweigart/PyMsgBox")
2192 (synopsis "Python module for JavaScript-like message boxes")
2194 "PyMsgBox is a simple, cross-platform, pure Python module for
2195 JavaScript-like message boxes. Types of dialog boxes include:
2203 (license license:bsd-3)))
2205 (define-public python-pympler
2207 (name "python-pympler")
2208 (home-page "https://pythonhosted.org/Pympler/")
2212 (uri (pypi-uri "Pympler" version))
2215 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
2216 (build-system python-build-system)
2218 `(#:phases (modify-phases %standard-phases
2220 (add-after 'install 'check
2221 (lambda* (#:key inputs outputs #:allow-other-keys)
2222 (add-installed-pythonpath inputs outputs)
2223 (invoke "python" "setup.py" "test"))))))
2224 (synopsis "Measure, monitor and analyze memory behavior")
2226 "Pympler is a development tool to measure, monitor and analyze
2227 the memory behavior of Python objects in a running Python application.
2229 By pympling a Python application, detailed insight in the size and the
2230 lifetime of Python objects can be obtained. Undesirable or unexpected
2231 runtime behavior like memory bloat and other @samp{pymples} can easily
2234 A web profiling frontend exposes process statistics, garbage
2235 visualisation and class tracker statistics.")
2236 (license license:asl2.0)))
2238 (define-public python2-pympler
2239 (package-with-python2 python-pympler))
2241 (define-public python-itsdangerous
2243 (name "python-itsdangerous")
2248 (uri (pypi-uri "itsdangerous" version))
2251 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2252 (build-system python-build-system)
2253 (home-page "https://palletsprojects.com/p/itsdangerous/")
2254 (synopsis "Python library for passing data to/from untrusted environments")
2256 "Itsdangerous provides various helpers to pass trusted data to untrusted
2257 environments and back.")
2258 (license license:bsd-3)))
2260 (define-public python2-itsdangerous
2261 (package-with-python2 python-itsdangerous))
2263 (define-public python-pyyaml
2265 (name "python-pyyaml")
2270 (uri (pypi-uri "PyYAML" version))
2273 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2274 (build-system python-build-system)
2276 `(("libyaml" ,libyaml)))
2277 (home-page "http://pyyaml.org/wiki/PyYAML")
2278 (synopsis "YAML parser and emitter for Python")
2280 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2281 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2282 API, and sensible error messages. PyYAML supports standard YAML tags and
2283 provides Python-specific tags that allow to represent an arbitrary Python
2285 (license license:expat)))
2287 (define-public python2-pyyaml
2288 (package-with-python2 python-pyyaml))
2290 (define-public python-vine
2292 (name "python-vine")
2297 (uri (pypi-uri "vine" version))
2300 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2301 (build-system python-build-system)
2303 `(("python-pytest" ,python-pytest)
2304 ("python-case" ,python-case)))
2305 (home-page "https://github.com/celery/vine")
2306 (synopsis "Promises for Python")
2308 "@code{vine} provides a special implementation of promises in that it can
2309 be used both for \"promise of a value\" and lazy evaluation. The biggest
2310 upside for this is that everything in a promise can also be a promise,
2311 e.g. filters, callbacks and errbacks can all be promises.")
2312 (license license:bsd-3)))
2314 (define-public python-virtualenv
2316 (name "python-virtualenv")
2321 (uri (pypi-uri "virtualenv" version))
2324 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2325 (build-system python-build-system)
2328 (modify-phases %standard-phases
2329 (add-before 'check 'disable-failing-test
2331 ;; Disable failing test. See upstream bug report
2332 ;; https://github.com/pypa/virtualenv/issues/957
2333 (substitute* "tests/test_virtualenv.py"
2334 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2337 `(("python-mock" ,python-mock)
2338 ("python-pytest" ,python-pytest)))
2339 (home-page "https://virtualenv.pypa.io/")
2340 (synopsis "Virtual Python environment builder")
2342 "Virtualenv is a tool to create isolated Python environments.")
2343 (license license:expat)))
2345 (define-public python2-virtualenv
2346 (package-with-python2 python-virtualenv))
2348 (define-public python-markupsafe
2350 (name "python-markupsafe")
2355 (uri (pypi-uri "MarkupSafe" version))
2358 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2359 (build-system python-build-system)
2361 `(#:modules ((ice-9 ftw)
2365 (guix build python-build-system))
2366 #:phases (modify-phases %standard-phases
2369 (let ((cwd (getcwd))
2370 (libdir (find (cut string-prefix? "lib." <>)
2371 (scandir "build"))))
2372 (setenv "PYTHONPATH"
2373 (string-append cwd "/build/" libdir ":"
2374 (getenv "PYTHONPATH")))
2375 (invoke "pytest" "-vv")))))))
2377 `(("python-pytest" ,python-pytest)))
2378 (home-page "https://github.com/mitsuhiko/markupsafe")
2379 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2381 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2383 (license license:bsd-3)))
2385 (define-public python2-markupsafe
2386 (package-with-python2 python-markupsafe))
2388 (define-public python-jinja2
2390 (name "python-jinja2")
2395 (uri (pypi-uri "Jinja2" version))
2398 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2399 (build-system python-build-system)
2401 `(("python-markupsafe" ,python-markupsafe)))
2402 (home-page "http://jinja.pocoo.org/")
2403 (synopsis "Python template engine")
2405 "Jinja2 is a small but fast and easy to use stand-alone template engine
2406 written in pure Python.")
2407 (license license:bsd-3)))
2409 (define-public python2-jinja2
2410 (package-with-python2 python-jinja2))
2412 (define-public python-pystache
2414 (name "python-pystache")
2418 (uri (pypi-uri "pystache" version))
2421 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2422 (build-system python-build-system)
2424 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2425 (home-page "http://defunkt.io/pystache/")
2426 (synopsis "Python logic-less template engine")
2428 "Pystache is a Python implementation of the framework agnostic,
2429 logic-free templating system Mustache.")
2430 (license license:expat)
2431 (properties `((python2-variant . ,(delay python2-pystache))))))
2433 (define-public python2-pystache
2434 (package (inherit (package-with-python2
2435 (strip-python2-variant python-pystache)))
2437 `(#:python ,python-2
2439 (modify-phases %standard-phases
2442 (invoke "python" "test_pystache.py"))))))))
2444 (define-public python-joblib
2446 (name "python-joblib")
2450 (uri (pypi-uri "joblib" version))
2453 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2454 (build-system python-build-system)
2457 (modify-phases %standard-phases
2459 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2461 `(("python-pytest" ,python-pytest)))
2462 (home-page "https://joblib.readthedocs.io/")
2463 (synopsis "Using Python functions as pipeline jobs")
2465 "Joblib is a set of tools to provide lightweight pipelining in Python.
2466 In particular, joblib offers: transparent disk-caching of the output values
2467 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2468 logging and tracing of the execution.")
2469 (license license:bsd-3)))
2471 (define-public python2-joblib
2472 (package-with-python2 python-joblib))
2474 (define-public python-daemon
2476 (name "python-daemon")
2481 (uri (pypi-uri "python-daemon" version))
2484 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2485 (build-system python-build-system)
2488 (modify-phases %standard-phases
2489 (add-before 'check 'disable-tests
2491 ;; FIXME: Determine why test fails
2492 (substitute* "test/test_daemon.py"
2493 (("test_detaches_process_context")
2494 "skip_test_detaches_process_context"))
2497 `(("python-lockfile" ,python-lockfile)))
2499 `(("python-unittest2" ,python-unittest2)
2500 ("python-testtools" ,python-testtools)
2501 ("python-testscenarios" ,python-testscenarios)
2502 ("python-mock" ,python-mock)
2503 ("python-docutils" ,python-docutils)))
2504 (home-page "https://pagure.io/python-daemon/")
2505 (synopsis "Python library for making a Unix daemon process")
2506 (description "Python-daemon is a library that assists a Python program to
2507 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2509 This library provides a @code{DaemonContext} class that manages the following
2510 important tasks for becoming a daemon process:
2512 @item Detach the process into its own process group.
2513 @item Set process environment appropriate for running inside a chroot.
2514 @item Renounce suid and sgid privileges.
2515 @item Close all open file descriptors.
2516 @item Change the working directory, uid, gid, and umask.
2517 @item Set appropriate signal handlers.
2518 @item Open new file descriptors for stdin, stdout, and stderr.
2519 @item Manage a specified PID lock file.
2520 @item Register cleanup functions for at-exit processing.
2522 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2523 (license (list license:asl2.0 license:gpl3+))))
2525 (define-public python-docutils
2527 (name "python-docutils")
2532 (uri (pypi-uri "docutils" version))
2535 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2536 (build-system python-build-system)
2538 '(#:tests? #f)) ; no setup.py test command
2539 (home-page "http://docutils.sourceforge.net/")
2540 (synopsis "Python Documentation Utilities")
2542 "Docutils is a modular system for processing documentation into useful
2543 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2545 ;; Most of the source code is public domain, but some source files are
2546 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2547 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2549 (define-public python2-docutils
2550 (package-with-python2 python-docutils))
2552 (define-public python-pygments
2554 (name "python-pygments")
2559 (uri (pypi-uri "Pygments" version))
2562 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2563 (build-system python-build-system)
2565 ;; FIXME: Tests require sphinx, which depends on this.
2567 (home-page "http://pygments.org/")
2568 (synopsis "Syntax highlighting")
2570 "Pygments is a syntax highlighting package written in Python.")
2571 (license license:bsd-2)))
2573 (define-public python2-pygments
2574 (package-with-python2 python-pygments))
2576 (define-public python-bumpversion
2578 (name "python-bumpversion")
2583 (uri (pypi-uri "bumpversion" version))
2586 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2587 (build-system python-build-system)
2588 (home-page "https://github.com/peritus/bumpversion")
2589 (synopsis "Tool to bump software version")
2590 (description "This tool provides a command-line interface (CLI) to bump a
2591 software version simply.")
2592 (license license:expat)))
2594 (define-public python-deprecated
2596 (name "python-deprecated")
2602 (url "https://github.com/tantale/deprecated.git")
2603 (commit (string-append "v" version))))
2604 (file-name (git-file-name name version))
2607 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2608 (build-system python-build-system)
2610 `(#:phases (modify-phases %standard-phases
2613 (invoke "pytest"))))))
2615 `(("python-wrapt" ,python-wrapt)))
2617 `(("python-bumpversion" ,python-bumpversion)
2618 ("python-pytest" ,python-pytest)
2619 ("python-pytest-cov" ,python-pytest-cov)
2620 ("python-sphinx" ,python-sphinx)
2621 ("python-tox" ,python-tox)))
2622 (home-page "https://github.com/tantale/deprecated")
2623 (synopsis "Python decorator to deprecate classes, functions or methods")
2624 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2625 to deprecate classes, functions or methods.")
2626 (license license:expat)))
2628 (define-public python-pygithub
2630 (name "python-pygithub")
2633 ;; We fetch from the Git repo because there are no tests in the PyPI
2638 (url "https://github.com/PyGithub/PyGithub.git")
2639 (commit (string-append "v" version))))
2640 (file-name (git-file-name name version))
2643 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2644 (build-system python-build-system)
2646 `(#:phases (modify-phases %standard-phases
2647 ;; Some tests rely on the network.
2648 (add-after 'unpack 'disable-failing-tests
2650 (substitute* "tests/Issue142.py"
2651 (("testDecodeJson") "disabled_testDecodeJson"))
2653 (add-before 'check 'prepare-for-tests
2655 (for-each (lambda (f)
2657 (find-files "./tests"))
2658 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2659 (setenv "PYTHONPATH"
2660 (string-append "./tests:" (getenv "PYTHONPATH")))
2663 `(("python-deprecated" ,python-deprecated)
2664 ("python-pyjwt" ,python-pyjwt)
2665 ("python-requests" ,python-requests)))
2666 (native-inputs `(("python-httpretty" ,python-httpretty)))
2667 (home-page "https://pygithub.readthedocs.io/en/latest/")
2668 (synopsis "Python library for the GitHub API")
2669 (description "This library allows managing GitHub resources such as
2670 repositories, user profiles, and organizations in your Python applications,
2671 using version 3 of the GitHub application programming interface (API).")
2672 (license license:lgpl3+)))
2674 (define-public python-rellu
2676 (name "python-rellu")
2681 (uri (pypi-uri "rellu" version))
2684 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2685 (build-system python-build-system)
2687 `(("python-invoke" ,python-invoke)
2688 ("python-pygithub" ,python-pygithub)))
2689 (home-page "https://github.com/robotframework/rellu")
2690 (synopsis "Utilities to create PyPI releases")
2691 (description "This collection of utilities contains tooling and templates
2692 to assist in creating releases on GitHub and publishing them on PyPI. It is
2693 designed to be used by Robot Framework and tools and libraries in its
2694 ecosystem, but can naturally be used also by other projects.")
2695 (license license:asl2.0)))
2697 (define-public python-robotframework
2699 (name "python-robotframework")
2701 ;; There are no tests in the PyPI archive.
2706 (url "https://github.com/robotframework/robotframework.git")
2707 (commit (string-append "v" version))))
2708 (file-name (git-file-name name version))
2710 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2711 (patches (search-patches
2712 "python-robotframework-honor-source-date-epoch.patch"))))
2713 (build-system python-build-system)
2715 `(#:phases (modify-phases %standard-phases
2716 (add-before 'build 'build-and-install-doc
2717 (lambda* (#:key outputs #:allow-other-keys)
2718 (let* ((doc-output (assoc-ref outputs "doc"))
2719 (doc (string-append doc-output "/share/"
2720 ,name "-" ,version "/")))
2721 (invoke "invoke" "library-docs" "all")
2723 (copy-recursively "doc/libraries"
2724 (string-append doc "/libraries"))
2728 (invoke "python" "utest/run.py"))))))
2730 `(("python-invoke" ,python-invoke)
2731 ("python-rellu" ,python-rellu)
2732 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2733 (outputs '("out" "doc"))
2734 (home-page "https://robotframework.org")
2735 (synopsis "Generic automation framework")
2736 (description "Robot Framework is a generic automation framework for
2737 acceptance testing, acceptance test driven development (ATDD), and robotic
2738 process automation (RPA).")
2739 (license license:asl2.0)))
2741 (define-public python-robotframework-lint
2742 ;; There is no properly tagged release; the commit below seems to correspond
2743 ;; to the 0.9 stable release available from PyPI. The tests are not
2744 ;; included in the PyPI archive, so we fetch the sources from the upstream
2746 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2749 (name "python-robotframework-lint")
2750 (version (git-version "0.9.0" revision commit))
2755 (url "https://github.com/boakley/robotframework-lint.git")
2757 (file-name (git-file-name name version))
2760 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2761 (build-system python-build-system)
2764 (modify-phases %standard-phases
2767 (invoke "python" "-m" "robot" "-A"
2768 "tests/conf/default.args" "tests"))))))
2770 `(("python-robotframework" ,python-robotframework)))
2771 (home-page "https://github.com/boakley/robotframework-lint/")
2772 (synopsis "Static analysis tool (linter) for Robot Framework")
2773 (description "This package provides the @code{rflint} command-line
2774 utility, a static analysis tool (linter) for Robot Framework source files.")
2775 (license license:asl2.0))))
2777 (define-public python-robotframework-sshlibrary
2779 (name "python-robotframework-sshlibrary")
2781 ;; There are no tests in the PyPI archive.
2786 (url "https://github.com/robotframework/SSHLibrary.git")
2787 (commit (string-append "v" version))))
2788 (file-name (git-file-name name version))
2791 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2792 (build-system python-build-system)
2795 (modify-phases %standard-phases
2796 (add-before 'build 'build-and-install-doc
2797 (lambda* (#:key outputs #:allow-other-keys)
2798 (let* ((doc-output (assoc-ref outputs "doc"))
2799 (doc (string-append doc-output "/share/"
2800 ,name "-" ,version "/")))
2801 (invoke "chmod" "-R" "+w" "docs")
2802 (invoke "invoke" "kw-docs" "project-docs")
2804 (for-each delete-file (find-files "docs" "\\.rst"))
2805 (copy-recursively "docs" doc)
2809 ;; Some tests require an SSH server; we remove them.
2810 (delete-file "utest/test_client_api.py")
2811 (delete-file "utest/test_scp.py")
2812 (invoke "python" "utest/run.py"))))))
2814 `(("python-robotframework" ,python-robotframework)
2815 ("python-paramiko" ,python-paramiko)
2816 ("python-scp" ,python-scp)))
2818 `(("openssh" ,openssh)
2820 ;; To generate the documentation
2821 ("python-docutils" ,python-docutils)
2822 ("python-invoke" ,python-invoke)
2823 ("python-pygments" ,python-pygments)
2824 ("python-rellu" ,python-rellu)))
2825 (outputs '("out" "doc"))
2826 (home-page "https://github.com/robotframework/SSHLibrary")
2827 (synopsis "Robot Framework library for SSH and SFTP")
2828 (description "SSHLibrary is a Robot Framework library providing support
2829 for SSH and SFTP. It has the following main usages:
2831 @item Executing commands on the remote machine, either blocking or non-blocking.
2832 @item Writing and reading in an interactive shell.
2833 @item Transferring files and directories over SFTP.
2834 @item Ensuring that files and directories exist on the remote machine.
2836 (license license:asl2.0)))
2838 (define-public python-scp
2845 (uri (pypi-uri "scp" version))
2848 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2849 (build-system python-build-system)
2851 '(#:tests? #f)) ;tests require an SSH server
2853 `(("python-paramiko" ,python-paramiko)))
2854 (home-page "https://github.com/jbardin/scp.py")
2855 (synopsis "SCP protocol module for Python and Paramiko")
2856 (description "The scp module extends the Paramiko library to send and
2857 receive files via the SCP1 protocol, as implemented by the OpenSSH
2858 @command{scp} program.")
2859 (license license:gpl2+)))
2861 (define-public python-rst.linker
2863 (name "python-rst.linker")
2868 (uri (pypi-uri "rst.linker" version))
2871 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2872 (build-system python-build-system)
2874 `(("python-dateutil" ,python-dateutil)
2875 ("python-six" ,python-six)))
2877 `(("python-setuptools-scm" ,python-setuptools-scm)))
2878 ;; Test would require path.py, which would introduce a cyclic dependence.
2879 (arguments `(#:tests? #f))
2880 ;; Note: As of version 1.7 the documentation is not worth building.
2881 (home-page "https://github.com/jaraco/rst.linker")
2882 (synopsis "Sphinx plugin to add links and timestamps")
2883 (description "rst.linker allows to automatically replace text by a
2884 reStructuredText external reference or timestamps. It's primary purpose is to
2885 augment the changelog, but it can be used for other documents, too.")
2886 (license license:expat)))
2888 (define-public python2-rst.linker
2889 (package-with-python2 python-rst.linker))
2891 (define-public python-feedgenerator
2893 (name "python-feedgenerator")
2898 (uri (pypi-uri "feedgenerator" version))
2901 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2902 (modules '((guix build utils)))
2905 ;; Remove pre-compiled .pyc files from source.
2906 (for-each delete-file-recursively
2907 (find-files "." "__pycache__" #:directories? #t))
2908 (for-each delete-file (find-files "." "\\.pyc$"))
2910 (build-system python-build-system)
2912 `(("python-pytz" ,python-pytz)
2913 ("python-six" ,python-six)))
2914 (home-page "https://github.com/getpelican/feedgenerator")
2916 "Standalone version of Django's Atom/RSS feed generator")
2918 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2919 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2920 (license license:bsd-3)))
2922 (define-public python2-feedgenerator
2923 (package-with-python2 python-feedgenerator))
2925 (define-public python-toml
2927 (name "python-toml")
2932 (uri (pypi-uri "toml" version))
2935 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2936 (build-system python-build-system)
2938 `(#:tests? #f)) ;no tests suite in release
2939 (home-page "https://github.com/uiri/toml")
2940 (synopsis "Library for TOML")
2942 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2943 Language (TOML) configuration files.")
2944 (license license:expat)))
2946 (define-public python-jsonrpc-server
2948 (name "python-jsonrpc-server")
2953 (uri (pypi-uri "python-jsonrpc-server" version))
2956 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2957 (build-system python-build-system)
2959 `(("python-future" ,python-future)
2960 ("python-mock" ,python-mock)
2961 ("python-pytest" ,python-pytest)))
2963 "https://github.com/palantir/python-jsonrpc-server")
2964 (synopsis "JSON RPC 2.0 server library")
2966 "This package provides a JSON RPC 2.0 server library for Python.")
2967 (license license:expat)))
2969 (define-public python-pydocstyle
2971 (name "python-pydocstyle")
2976 (uri (pypi-uri "pydocstyle" version))
2979 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2980 (build-system python-build-system)
2982 `(("python-six" ,python-six)
2983 ("python-snowballstemmer" ,python-snowballstemmer)))
2985 "https://github.com/PyCQA/pydocstyle/")
2986 (synopsis "Python docstring style checker")
2988 "This package provides a style checker for the Python Language
2990 (license license:expat)))
2992 (define-public python-language-server
2994 (name "python-language-server")
2999 (uri (pypi-uri "python-language-server" version))
3002 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3003 (build-system python-build-system)
3005 `(("python-pluggy" ,python-pluggy)
3006 ("python-jsonrpc-server" ,python-jsonrpc-server)
3007 ("python-jedi" ,python-jedi)
3008 ("python-yapf" ,python-yapf)
3009 ("python-pyflakes" ,python-pyflakes)
3010 ("python-pydocstyle" ,python-pydocstyle)
3011 ("python-pycodestyle" ,python-pycodestyle)
3012 ("python-mccabe" ,python-mccabe)
3013 ("python-rope" ,python-rope)
3014 ("python-autopep8" ,python-autopep8)
3015 ("python-pylint" ,python-pylint)))
3016 (home-page "https://github.com/palantir/python-language-server")
3017 (synopsis "Python implementation of the Language Server Protocol")
3019 "The Python Language Server (pyls) is an implementation of the Python 3
3020 language specification for the Language Server Protocol (LSP). This tool is
3021 used in text editing environments to provide a complete and integrated
3022 feature-set for programming Python effectively.")
3023 (license license:expat)))
3025 (define-public python-black
3027 (name "python-black")
3032 (uri (pypi-uri "black" version))
3035 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3036 (build-system python-build-system)
3039 (modify-phases %standard-phases
3040 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3042 (let ((python3 (which "python3")))
3043 (substitute* '("tests/data/fmtonoff.py"
3044 "tests/data/string_prefixes.py"
3045 "tests/data/function.py")
3046 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3047 (string-append "#!" python3 (if (string? minor-version)
3051 `(("python-click" ,python-click)
3052 ("python-attrs" ,python-attrs)
3053 ("python-appdirs" ,python-appdirs)
3054 ("python-toml" ,python-toml)))
3055 (home-page "https://github.com/ambv/black")
3056 (synopsis "The uncompromising code formatter")
3057 (description "Black is the uncompromising Python code formatter.")
3058 (license license:expat)))
3060 (define-public python-blinker
3062 (name "python-blinker")
3067 (uri (pypi-uri "blinker" version))
3070 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3071 (build-system python-build-system)
3072 (home-page "http://pythonhosted.org/blinker/")
3073 (synopsis "Fast, simple object-to-object and broadcast signaling")
3075 "Blinker provides a fast dispatching system that allows any number of
3076 interested parties to subscribe to events, or \"signals\".")
3077 (license license:expat)))
3079 (define-public python2-blinker
3080 (package-with-python2 python-blinker))
3082 (define-public pelican
3089 (uri (pypi-uri "pelican" version))
3092 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3093 (build-system python-build-system)
3095 `(("python-feedgenerator" ,python-feedgenerator)
3096 ("python-jinja2" ,python-jinja2)
3097 ("python-pygments" ,python-pygments)
3098 ("python-docutils" ,python-docutils)
3099 ("python-pytz" ,python-pytz)
3100 ("python-blinker" ,python-blinker)
3101 ("python-unidecode" ,python-unidecode)
3102 ("python-six" ,python-six)
3103 ("python-dateutil" ,python-dateutil)
3104 ("python-markdown" ,python-markdown)))
3105 (home-page "https://getpelican.com/")
3107 `(;; XXX Requires a lot more packages to do unit tests :P
3109 #:phases (modify-phases %standard-phases
3111 'install 'adjust-requires
3112 ;; Since feedgenerator is installed from git, it doesn't
3113 ;; conform to the version requirements.
3115 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3116 ;; version requirement so setuptools doesn't get confused.
3118 (substitute* "setup.py"
3119 (("['\"]feedgenerator.*?['\"]")
3120 "'feedgenerator'")))))))
3121 (synopsis "Python-based static site publishing system")
3123 "Pelican is a tool to generate a static blog from reStructuredText,
3124 Markdown input files, and more. Pelican uses Jinja2 for templating
3125 and is very extensible.")
3126 (license license:agpl3+)))
3128 (define-public mallard-ducktype
3130 (name "mallard-ducktype")
3135 ;; git-reference because a proper source tarball is not available
3136 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3138 (url "https://github.com/projectmallard/mallard-ducktype.git")
3140 (file-name (git-file-name name version))
3143 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3144 (build-system python-build-system)
3145 (home-page "http://projectmallard.org")
3146 (synopsis "Convert Ducktype to Mallard documentation markup")
3148 "Ducktype is a lightweight syntax that can represent all the semantics
3149 of the Mallard XML documentation system. Ducktype files can be converted to
3150 Mallard using the @command{ducktype} tool. The yelp-tools package
3151 provides additional functionality on the produced Mallard documents.")
3152 (license license:expat)))
3154 (define-public python-scikit-image
3156 (name "python-scikit-image")
3161 (uri (pypi-uri "scikit-image" version))
3163 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3164 (build-system python-build-system)
3166 ;; TODO: Some tests require running X11 server. Disable them?
3168 ;; See DEPENDS.txt for the list of build and run time requiremnts
3170 `(("python-cloudpickle" ,python-cloudpickle)
3171 ("python-dask" ,python-dask)
3172 ("python-matplotlib" ,python-matplotlib)
3173 ("python-networkx" ,python-networkx)
3174 ("python-numpy" ,python-numpy)
3175 ("python-pillow" ,python-pillow)
3176 ("python-pywavelets" ,python-pywavelets)
3177 ("python-scipy" ,python-scipy)
3178 ("python-six" ,python-six)))
3180 `(("python-cython" ,python-cython)))
3181 (home-page "http://scikit-image.org/")
3182 (synopsis "Image processing in Python")
3184 "Scikit-image is a collection of algorithms for image processing.")
3185 (license license:bsd-3)))
3187 (define-public python2-scikit-image
3188 (package-with-python2 python-scikit-image))
3190 (define-public python-cython
3192 (name "python-cython")
3197 (uri (pypi-uri "Cython" version))
3200 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3201 (build-system python-build-system)
3202 ;; we need the full python package and not just the python-wrapper
3203 ;; because we need libpython3.3m.so
3205 `(("python" ,python)))
3208 (modify-phases %standard-phases
3209 (add-before 'check 'set-HOME
3210 ;; some tests require access to "$HOME/.cython"
3211 (lambda _ (setenv "HOME" "/tmp") #t))
3213 ;; FIXME: These tests started failing on armhf after the 0.28 update
3214 ;; (commit c69d11c5930), both with an error such as this:
3215 ;; compiling (cpp) and running dictcomp ...
3216 ;; === C/C++ compiler error output: ===
3218 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3219 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3220 ,@(if (target-arm32?)
3221 `((add-before 'check 'disable-failing-tests
3223 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3224 (for-each (lambda (test)
3225 (format disabled-tests "~a\n" test))
3226 '("memslice" "dictcomp"))
3227 (close-port disabled-tests)))))
3232 ;; Disable compiler optimizations to greatly reduce the running
3233 ;; time of the test suite.
3234 (setenv "CFLAGS" "-O0")
3236 (invoke "python" "runtests.py" "-vv"
3237 "-j" (number->string (parallel-job-count))))))))
3238 (home-page "https://cython.org/")
3239 (synopsis "C extensions for Python")
3240 (description "Cython is an optimising static compiler for both the Python
3241 programming language and the extended Cython programming language. It makes
3242 writing C extensions for Python as easy as Python itself.")
3243 (license license:asl2.0)
3244 (properties `((python2-variant . ,(delay python2-cython))))))
3246 (define-public python2-cython
3247 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3250 (name "python2-cython")
3252 `(("python-2" ,python-2))) ;this is not automatically changed
3254 (substitute-keyword-arguments (package-arguments base)
3256 `(modify-phases ,phases
3257 (add-before 'check 'adjust-test_embed
3259 (substitute* "runtests.py"
3260 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3261 ;; so it can give the right -L flag to GCC when embedding static
3262 ;; builds of Python. It is unaware that the Python "config"
3263 ;; directory (where the static library lives) was renamed in
3264 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3265 ;; which works fine, because that is where the shared library is.
3267 ;; It also appears to be unaware that the Makefile in Demos/embed
3268 ;; already unconditionally pass the static library location to GCC,
3269 ;; after checking sysconfig.get_config_var('LIBPL).
3271 ;; The effect is that the linker is unable to resolve libexpat
3272 ;; symbols when building for Python 2, because neither the Python 2
3273 ;; shared library nor Expat is available. To fix it, we can either
3274 ;; add Expat as an input and make it visible to the linker, or just
3275 ;; prevent it from overriding the Python shared library location.
3276 ;; The end result is identical, so we take the easy route.
3277 ((" or libname not in os\\.listdir\\(libdir\\)")
3281 ;; The RPython toolchain currently does not support Python 3.
3282 (define-public python2-rpython
3284 (name "python2-rpython")
3289 (uri (pypi-uri "rpython" version))
3292 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3293 (build-system python-build-system)
3294 (arguments `(#:python ,python-2))
3296 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3297 (home-page "https://rpython.readthedocs.org")
3298 (synopsis "Framework for implementing interpreters and virtual machines")
3299 (description "RPython is a translation and support framework for
3300 producing implementations of dynamic languages, emphasizing a clean separation
3301 between language specification and implementation aspects.")
3302 (license license:expat)))
3304 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3305 ;; python-scipy still build, as these three packages are often used together.
3306 (define-public python-numpy
3308 (name "python-numpy")
3314 "https://github.com/numpy/numpy/releases/download/v"
3315 version "/numpy-" version ".tar.gz"))
3318 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3319 (build-system python-build-system)
3321 `(("openblas" ,openblas)
3322 ("lapack" ,lapack)))
3324 `(("python-cython" ,python-cython)
3325 ("python-pytest" ,python-pytest)
3326 ("gfortran" ,gfortran)))
3329 (modify-phases %standard-phases
3330 (add-before 'build 'configure-blas-lapack
3331 (lambda* (#:key inputs #:allow-other-keys)
3332 (call-with-output-file "site.cfg"
3336 libraries = openblas
3337 library_dirs = ~a/lib
3338 include_dirs = ~a/include
3340 # backslash-n to make emacs happy
3342 lapack_libs = lapack
3343 library_dirs = ~a/lib
3344 include_dirs = ~a/include
3346 (assoc-ref inputs "openblas")
3347 (assoc-ref inputs "openblas")
3348 (assoc-ref inputs "lapack")
3349 (assoc-ref inputs "lapack"))))
3351 (add-before 'build 'fix-executable-paths
3352 (lambda* (#:key inputs #:allow-other-keys)
3353 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3354 ;; instead of /bin/sh.
3355 (substitute* "numpy/distutils/exec_command.py"
3356 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3357 (string-append match-start (assoc-ref inputs "bash") match-end)))
3358 ;; Use "gcc" executable, not "cc".
3359 (substitute* "numpy/distutils/system_info.py"
3360 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3361 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3363 ;; Tests can only be run after the library has been installed and not
3364 ;; within the source directory.
3366 (add-after 'install 'check
3367 (lambda* (#:key outputs inputs #:allow-other-keys)
3368 ;; Make installed package available for running the tests
3369 (add-installed-pythonpath inputs outputs)
3370 ;; Make sure "f2py" etc is found.
3371 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3372 ":" (getenv "PATH")))
3373 (with-directory-excursion "/tmp"
3374 (invoke "python" "-c"
3375 "import numpy; numpy.test(verbose=2)")))))))
3376 (home-page "http://www.numpy.org/")
3377 (synopsis "Fundamental package for scientific computing with Python")
3378 (description "NumPy is the fundamental package for scientific computing
3379 with Python. It contains among other things: a powerful N-dimensional array
3380 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3381 and Fortran code, useful linear algebra, Fourier transform, and random number
3383 (license license:bsd-3)))
3385 (define-public python2-numpy
3386 (package-with-python2 python-numpy))
3388 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3389 ;; interest only for legacy code going back to NumPy's predecessor
3391 (define-public python2-numpy-1.8
3392 (package (inherit python2-numpy)
3398 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3399 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3402 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3404 (substitute-keyword-arguments (package-arguments python2-numpy)
3406 `(modify-phases ,phases
3407 (replace 'configure-blas-lapack
3408 (lambda* (#:key inputs #:allow-other-keys)
3409 (call-with-output-file "site.cfg"
3413 libraries = openblas,lapack
3414 library_dirs = ~a/lib:~a/lib
3415 include_dirs = ~a/include:~a/include
3417 (assoc-ref inputs "openblas")
3418 (assoc-ref inputs "lapack")
3419 (assoc-ref inputs "openblas")
3420 (assoc-ref inputs "lapack"))))
3423 `(("python2-nose" ,python2-nose)))
3424 (description "NumPy is the fundamental package for scientific computing
3425 with Python. It contains among other things: a powerful N-dimensional array
3426 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3427 and Fortran code, useful linear algebra, Fourier transform, and random number
3428 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3429 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3431 (license license:bsd-3)))
3433 (define-public python-munch
3435 (name "python-munch")
3440 (uri (pypi-uri "munch" version))
3443 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3444 (build-system python-build-system)
3445 (home-page "https://github.com/Infinidat/munch")
3446 (synopsis "Dot-accessible dictionary")
3447 (description "Munch is a dot-accessible dictionary similar to JavaScript
3449 (license license:expat)))
3451 (define-public python2-munch
3452 (package-with-python2 python-munch))
3454 (define-public python-colormath
3456 (name "python-colormath")
3461 (uri (pypi-uri "colormath" version))
3464 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3465 (build-system python-build-system)
3467 `(("python-networkx" ,python-networkx)
3468 ("python-numpy" ,python-numpy)))
3469 (home-page "https://github.com/gtaylor/python-colormath")
3470 (synopsis "Color math and conversion library")
3472 "This is a Python library for color math and conversions.")
3473 (license license:bsd-3)))
3475 (define-public python2-colormath
3476 (package-with-python2 python-colormath))
3478 (define-public python-spectra
3480 (name "python-spectra")
3485 (uri (pypi-uri "spectra" version))
3488 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3489 (build-system python-build-system)
3492 (modify-phases %standard-phases
3494 (lambda _ (invoke "nosetests" "-v"))))))
3496 `(("python-colormath" ,python-colormath)))
3498 `(("python-nose" ,python-nose)))
3499 (home-page "https://github.com/jsvine/spectra")
3500 (synopsis "Color scales and color conversion")
3502 "This package provides a Python library intended to make color math,
3503 color scales, and color space conversion easy. It has support for:
3508 @item Color blending
3509 @item Brightening/darkening colors
3510 @item Saturating/desaturating colors
3511 @item Conversion to/from multiple color spaces.
3513 (license license:expat)))
3515 (define-public python2-spectra
3516 (package-with-python2 python-spectra))
3518 (define-public python-numpy-documentation
3520 (name "python-numpy-documentation")
3521 (version (package-version python-numpy))
3522 (source (package-source python-numpy))
3523 (build-system python-build-system)
3525 `(("python-matplotlib" ,python-matplotlib)
3526 ("python-numpy" ,python-numpy)
3527 ("pkg-config" ,pkg-config)
3528 ("python-sphinx" ,python-sphinx)
3529 ("python-numpydoc" ,python-numpydoc)
3530 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3531 texlive-fonts-cm-super
3533 texlive-generic-ifxetex
3534 texlive-generic-pdftex
3535 texlive-latex-amsfonts
3536 texlive-latex-capt-of
3538 texlive-latex-environ
3539 texlive-latex-eqparbox
3540 texlive-latex-etoolbox
3541 texlive-latex-expdlist
3542 texlive-latex-fancyhdr
3543 texlive-latex-fancyvrb
3544 texlive-latex-fncychap
3546 texlive-latex-framed
3547 texlive-latex-geometry
3548 texlive-latex-graphics
3549 texlive-latex-hyperref
3550 texlive-latex-mdwtools
3551 texlive-latex-multirow
3552 texlive-latex-needspace
3553 texlive-latex-oberdiek
3554 texlive-latex-parskip
3555 texlive-latex-preview
3556 texlive-latex-tabulary
3557 texlive-latex-threeparttable
3558 texlive-latex-titlesec
3559 texlive-latex-trimspaces
3561 texlive-latex-upquote
3563 texlive-latex-varwidth
3564 texlive-latex-wrapfig)))
3565 ("texinfo" ,texinfo)
3567 ("scipy-sphinx-theme"
3568 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3571 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3572 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3575 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3576 ,@(package-native-inputs python-numpy)))
3578 `(#:tests? #f ; we're only generating the documentation
3580 (modify-phases %standard-phases
3583 (lambda* (#:key inputs outputs #:allow-other-keys)
3584 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3586 data "/doc/" ,name "-"
3587 ,(package-version python-numpy)))
3588 (info-reader (string-append data "/info"))
3589 (html (string-append doc "/html"))
3590 (scipy-sphinx-theme "scipy-sphinx-theme")
3591 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3592 (pyver ,(string-append "PYVER=")))
3594 ;; FIXME: this is needed to for texlive-union to generate
3595 ;; fonts, which are not found.
3596 (setenv "HOME" "/tmp")
3598 (with-directory-excursion "doc"
3599 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3601 (invoke "make" "html" pyver)
3602 (invoke "make" "latex" "PAPER=a4" pyver)
3603 (invoke "make" "-C" "build/latex"
3604 "all-pdf" "PAPER=a4" pyver)
3605 ;; FIXME: Generation of the info file fails.
3606 ;; (invoke "make" "info" pyver)
3608 ;; (copy-file "build/texinfo/numpy.info"
3609 ;; (string-append info "/numpy.info"))
3610 (for-each (lambda (file)
3611 (copy-file (string-append "build/latex" file)
3612 (string-append doc file)))
3613 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3614 (with-directory-excursion "build/html"
3615 (for-each (lambda (file)
3616 (let* ((dir (dirname file))
3617 (tgt-dir (string-append html "/" dir)))
3618 (unless (equal? "." dir)
3620 (install-file file html)))
3621 (find-files "." ".*")))))
3623 (home-page (package-home-page python-numpy))
3624 (synopsis "Documentation for the python-numpy package")
3625 (description (package-description python-numpy))
3626 (license (package-license python-numpy))))
3628 (define-public python2-numpy-documentation
3629 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3631 (inherit numpy-documentation)
3632 (native-inputs `(("python2-functools32" ,python2-functools32)
3633 ,@(package-native-inputs numpy-documentation))))))
3635 (define-public python-pygit2
3637 (name "python-pygit2")
3642 (uri (pypi-uri "pygit2" version))
3644 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3645 (build-system python-build-system)
3647 '(#:tests? #f)) ; tests don't run correctly in our environment
3649 `(("python-six" ,python-six)
3650 ("python-cffi" ,python-cffi)
3651 ("libgit2" ,libgit2)
3652 ("python-tox" ,python-tox)))
3654 `(("python-pytest" ,python-pytest)))
3655 (home-page "https://github.com/libgit2/pygit2")
3656 (synopsis "Python bindings for libgit2")
3657 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3658 library, libgit2 implements Git plumbing.")
3659 ;; GPL2.0 only, with linking exception.
3660 (license license:gpl2)))
3662 (define-public python2-pygit2
3663 (package-with-python2 python-pygit2))
3665 (define-public python-pyparsing
3667 (name "python-pyparsing")
3672 (uri (pypi-uri "pyparsing" version))
3674 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3675 (build-system python-build-system)
3676 (outputs '("out" "doc"))
3678 `(#:tests? #f ; no test target
3680 (modify-phases %standard-phases
3681 (add-after 'install 'install-doc
3682 (lambda* (#:key outputs #:allow-other-keys)
3683 (let* ((doc (string-append (assoc-ref outputs "doc")
3684 "/share/doc/" ,name "-" ,version))
3685 (html-doc (string-append doc "/html"))
3686 (examples (string-append doc "/examples")))
3692 (install-file file tgt))
3693 (find-files dir ".*")))
3694 (list "docs" "htmldoc" "examples")
3695 (list doc html-doc examples))
3697 (home-page "https://github.com/pyparsing/pyparsing")
3698 (synopsis "Python parsing class library")
3700 "The pyparsing module is an alternative approach to creating and
3701 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3702 of regular expressions. The pyparsing module provides a library of classes
3703 that client code uses to construct the grammar directly in Python code.")
3704 (license license:expat)))
3706 (define-public python2-pyparsing
3707 (package-with-python2 python-pyparsing))
3709 (define-public python-numpydoc
3711 (name "python-numpydoc")
3716 (uri (pypi-uri "numpydoc" version))
3719 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3720 (build-system python-build-system)
3722 `(("python-sphinx" ,python-sphinx)))
3724 `(("python-nose" ,python-nose)))
3725 (home-page "https://pypi.python.org/pypi/numpydoc")
3727 "Numpy's Sphinx extensions")
3729 "Sphinx extension to support docstrings in Numpy format.")
3730 (license license:bsd-2)))
3732 (define-public python2-numpydoc
3733 (package-with-python2 python-numpydoc))
3735 (define-public python-numexpr
3737 (name "python-numexpr")
3742 (uri (pypi-uri "numexpr" version))
3745 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3746 (build-system python-build-system)
3747 (arguments `(#:tests? #f)) ; no tests included
3749 `(("python-numpy" ,python-numpy)))
3750 (home-page "https://github.com/pydata/numexpr")
3751 (synopsis "Fast numerical expression evaluator for NumPy")
3753 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3754 expressions that operate on arrays are accelerated and use less memory than
3755 doing the same calculation in Python. In addition, its multi-threaded
3756 capabilities can make use of all your cores, which may accelerate
3757 computations, most specially if they are not memory-bounded (e.g. those using
3758 transcendental functions).")
3759 (license license:expat)))
3761 (define-public python2-numexpr
3762 (package-with-python2 python-numexpr))
3764 (define-public python-cycler
3766 (name "python-cycler")
3770 (uri (pypi-uri "cycler" version))
3773 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3774 (build-system python-build-system)
3776 ;; XXX: The current version requires 'coveralls' which we don't have.
3777 ;; Enable this for the next release which uses 'python-pytest'.
3780 `(("python-six" ,python-six)))
3781 (home-page "http://matplotlib.org/cycler/")
3782 (synopsis "Composable keyword argument iterator")
3784 "When using @code{matplotlib} and plotting more than one line, it is
3785 common to want to be able to want to be able to cycle over one or more artist
3786 styles; but the plotting logic can quickly become involved.
3787 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3788 @code{Cycler} class was developed.")
3789 (license license:bsd-3)))
3791 (define-public python2-cycler
3792 (package-with-python2 python-cycler))
3794 (define-public python-colorspacious
3796 (name "python-colorspacious")
3802 (url "https://github.com/njsmith/colorspacious.git")
3803 (commit (string-append "v" version))))
3804 (file-name (git-file-name name version))
3806 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3807 (build-system python-build-system)
3809 `(("python-numpy" ,python-numpy)))
3811 `(("python-nose" ,python-nose)))
3814 (modify-phases %standard-phases
3817 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3818 (home-page "https://github.com/njsmith/colorspacious")
3819 (synopsis "Python library for colorspace conversions")
3820 (description "@code{colorspacious} is a Python library that lets you
3821 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3822 (license license:expat)))
3824 (define-public python2-colorspacious
3825 (package-with-python2 python-colorspacious))
3827 (define-public python-matplotlib
3829 (name "python-matplotlib")
3834 (uri (pypi-uri "matplotlib" version))
3837 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3838 (build-system python-build-system)
3839 (propagated-inputs ; the following packages are all needed at run time
3840 `(("python-cycler" ,python-cycler)
3841 ("python-kiwisolver" ,python-kiwisolver)
3842 ("python-pyparsing" ,python-pyparsing)
3843 ("python-pygobject" ,python-pygobject)
3844 ("gobject-introspection" ,gobject-introspection)
3845 ("python-tkinter" ,python "tk")
3846 ("python-dateutil" ,python-dateutil)
3847 ("python-numpy" ,python-numpy)
3848 ("python-pillow" ,python-pillow)
3849 ("python-pytz" ,python-pytz)
3850 ("python-six" ,python-six)
3851 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3852 ;; from 'gtk+') provides the required 'typelib' files used by
3853 ;; 'gobject-introspection'. The location of these files is set with the
3854 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3855 ;; is done automatically by a 'native-search-path' procedure. However,
3856 ;; at run-time the user must set this variable as follows:
3858 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3860 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3861 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3862 ;; object. For this reason we need to import both libraries.
3863 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3864 ("python-pycairo" ,python-pycairo)
3865 ;; XXX: qtwebkit cannot be built reliably.
3866 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3867 ("python-cairocffi" ,python-cairocffi)))
3869 `(("libpng" ,libpng)
3870 ("imagemagick" ,imagemagick)
3871 ("freetype" ,freetype)
3874 ;; FIXME: Add backends when available.
3875 ;("python-wxpython" ,python-wxpython)
3879 `(("pkg-config" ,pkg-config)
3880 ("python-nose" ,python-nose)
3881 ("python-mock" ,python-mock)))
3884 (modify-phases %standard-phases
3885 (add-before 'build 'configure-environment
3886 (lambda* (#:key outputs inputs #:allow-other-keys)
3887 (let ((cairo (assoc-ref inputs "cairo"))
3888 (gtk+ (assoc-ref inputs "gtk+")))
3889 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3891 (setenv "LD_LIBRARY_PATH"
3892 (string-append cairo "/lib:" gtk+ "/lib"))
3893 (setenv "HOME" (getcwd))
3894 (call-with-output-file "setup.cfg"
3896 (format port "[directories]~%
3897 basedirlist = ~a,~a~%
3900 (assoc-ref inputs "tcl")
3901 (assoc-ref inputs "tk")))))
3903 (home-page "http://matplotlib.org")
3904 (synopsis "2D plotting library for Python")
3906 "Matplotlib is a Python 2D plotting library which produces publication
3907 quality figures in a variety of hardcopy formats and interactive environments
3908 across platforms. Matplotlib can be used in Python scripts, the python and
3909 ipython shell, web application servers, and six graphical user interface
3911 (license license:psfl)
3912 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3914 (define-public python2-matplotlib
3915 (let ((matplotlib (package-with-python2
3916 (strip-python2-variant python-matplotlib))))
3917 (package (inherit matplotlib)
3918 ;; Make sure to use special packages for Python 2 instead
3919 ;; of those automatically rewritten by package-with-python2.
3921 `(("python2-pycairo" ,python2-pycairo)
3922 ("python2-backports-functools-lru-cache"
3923 ,python2-backports-functools-lru-cache)
3924 ("python2-functools32" ,python2-functools32)
3925 ("python2-pygobject-2" ,python2-pygobject-2)
3926 ("python2-subprocess32" ,python2-subprocess32)
3927 ("python2-tkinter" ,python-2 "tk")
3928 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3929 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3931 (define-public python-matplotlib-documentation
3933 (name "python-matplotlib-documentation")
3934 (version (package-version python-matplotlib))
3935 (source (package-source python-matplotlib))
3936 (build-system python-build-system)
3938 `(("python-matplotlib" ,python-matplotlib)
3939 ("python-colorspacious" ,python-colorspacious)
3940 ("python-sphinx" ,python-sphinx)
3941 ("python-sphinx-gallery" ,python-sphinx-gallery)
3942 ("python-numpydoc" ,python-numpydoc)
3943 ("python-ipython" ,python-ipython)
3944 ("python-ipykernel" ,python-ipykernel)
3945 ("python-mock" ,python-mock)
3946 ("graphviz" ,graphviz)
3947 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3948 texlive-latex-amsmath
3949 texlive-latex-enumitem
3950 texlive-latex-expdlist
3951 texlive-latex-geometry
3952 texlive-latex-preview
3953 texlive-latex-type1cm
3956 texlive-generic-pdftex
3958 texlive-fonts-amsfonts
3960 texlive-fonts-adobe-times
3961 texlive-fonts-txfonts)))
3962 ("texinfo" ,texinfo)
3963 ,@(package-native-inputs python-matplotlib)))
3965 `(#:tests? #f ; we're only generating documentation
3967 (modify-phases %standard-phases
3971 (setenv "PYTHONPATH"
3972 (string-append (getenv "PYTHONPATH")
3973 ":" (getcwd) "/../examples/units"))
3974 (substitute* "conf.py"
3976 (("^SHA = check_output.*")
3977 (string-append "SHA = \"" ,version "\"\n"))
3978 ;; Don't fetch intersphinx files from the Internet
3979 (("^explicit_order_folders" m)
3980 (string-append "intersphinx_mapping = {}\n" m))
3981 (("'sphinx.ext.intersphinx',") "")
3982 ;; Disable URL embedding which requires internet access.
3983 (("'https://docs.scipy.org/doc/numpy'") "None")
3984 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3986 "SPHINXBUILD=sphinx-build"
3987 "SPHINXOPTS=" ; don't abort on warnings
3990 (lambda* (#:key inputs outputs #:allow-other-keys)
3991 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3992 (doc (string-append data "/doc/python-matplotlib-" ,version))
3993 (info (string-append data "/info"))
3994 (html (string-append doc "/html")))
3997 (copy-recursively "build/html" html)
3998 (symlink (string-append html "/_images")
3999 (string-append info "/matplotlib-figures"))
4000 (with-directory-excursion "build/texinfo"
4001 (substitute* "matplotlib.texi"
4002 (("@image\\{([^,]*)" all file)
4003 (string-append "@image{matplotlib-figures/" file)))
4004 (symlink (string-append html "/_images")
4005 "./matplotlib-figures")
4006 (invoke "makeinfo" "--no-split"
4007 "-o" "matplotlib.info" "matplotlib.texi"))
4008 (install-file "build/texinfo/matplotlib.info" info))
4010 (home-page (package-home-page python-matplotlib))
4011 (synopsis "Documentation for the python-matplotlib package")
4012 (description (package-description python-matplotlib))
4013 (license (package-license python-matplotlib))))
4015 (define-public python2-matplotlib-documentation
4016 (package-with-python2 python-matplotlib-documentation))
4018 (define-public python-matplotlib-venn
4020 (name "python-matplotlib-venn")
4025 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4028 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4029 (build-system python-build-system)
4030 (arguments '(#:tests? #f)) ; tests are not included
4032 `(("python-matplotlib" ,python-matplotlib)
4033 ("python-numpy" ,python-numpy)
4034 ("python-scipy" ,python-scipy)))
4036 `(("unzip" ,unzip)))
4037 (home-page "https://github.com/konstantint/matplotlib-venn")
4038 (synopsis "Plot area-proportional Venn diagrams")
4040 "This package provides tools for plotting area-proportional two- and
4041 three-way Venn diagrams in @code{matplotlib}.")
4042 (license license:expat)))
4044 (define-public python2-pysnptools
4046 (name "python2-pysnptools")
4051 (uri (pypi-uri "pysnptools" version))
4054 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4055 (build-system python-build-system)
4057 `(#:python ,python-2 ; only Python 2.7 is supported
4058 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4060 `(("python2-numpy" ,python2-numpy)
4061 ("python2-scipy" ,python2-scipy)
4062 ("python2-pandas" ,python2-pandas)))
4064 `(("python2-cython" ,python2-cython)))
4065 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4066 (synopsis "Library for reading and manipulating genetic data")
4068 "PySnpTools is a library for reading and manipulating genetic data. It
4069 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4070 those files. It can also efficiently manipulate ranges of integers using set
4071 operators such as union, intersection, and difference.")
4072 (license license:asl2.0)))
4074 (define-public python-scipy
4076 (name "python-scipy")
4081 (uri (pypi-uri "scipy" version))
4084 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4085 (build-system python-build-system)
4087 `(("python-numpy" ,python-numpy)
4088 ("python-matplotlib" ,python-matplotlib)
4089 ("python-pyparsing" ,python-pyparsing)))
4091 `(("lapack" ,lapack)
4092 ("openblas" ,openblas)))
4094 `(("python-cython" ,python-cython)
4095 ("python-pytest" ,python-pytest)
4096 ("python-sphinx" ,python-sphinx)
4097 ("python-numpydoc" ,python-numpydoc)
4098 ("gfortran" ,gfortran)
4101 (outputs '("out" "doc"))
4104 (modify-phases %standard-phases
4105 (add-after 'unpack 'disable-broken-tests
4107 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4108 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4109 (string-append indent
4110 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4112 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4113 (("^def test_parallel_threads\\(\\):" m)
4114 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4117 (add-before 'build 'configure-openblas
4118 (lambda* (#:key inputs #:allow-other-keys)
4119 (call-with-output-file "site.cfg"
4123 libraries = openblas
4124 library_dirs = ~a/lib
4125 include_dirs = ~a/include
4127 # backslash-n to make emacs happy
4129 library_dirs = ~a/lib
4130 atlas_libs = openblas
4132 (assoc-ref inputs "openblas")
4133 (assoc-ref inputs "openblas")
4134 (assoc-ref inputs "openblas"))))
4136 (add-after 'install 'install-doc
4137 (lambda* (#:key inputs outputs #:allow-other-keys)
4138 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4139 (doc (string-append data "/doc/" ,name "-" ,version))
4140 (html (string-append doc "/html"))
4141 (pyver ,(string-append "PYVER=" (version-major+minor
4142 (package-version python))))
4143 ;; By default it tries to run sphinx-build through the Python
4144 ;; interpreter which won't work with our shell wrapper.
4145 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4146 ;; Make installed package available for building the
4148 (add-installed-pythonpath inputs outputs)
4149 (with-directory-excursion "doc"
4150 ;; Fix generation of images for mathematical expressions.
4151 (substitute* (find-files "source" "conf\\.py")
4152 (("pngmath_use_preview = True")
4153 "pngmath_use_preview = False"))
4155 (invoke "make" "html" pyver sphinxbuild)
4156 (with-directory-excursion "build/html"
4157 (for-each (lambda (file)
4158 (let* ((dir (dirname file))
4159 (tgt-dir (string-append html "/" dir)))
4160 (install-file file html)))
4161 (find-files "." ".*")))))
4163 ;; Tests can only be run after the library has been installed and not
4164 ;; within the source directory.
4166 (add-after 'install 'check
4167 (lambda* (#:key inputs outputs #:allow-other-keys)
4168 (add-installed-pythonpath inputs outputs)
4169 (with-directory-excursion "/tmp"
4170 (invoke "python" "-c"
4171 "import scipy; scipy.test(verbose=2)")))))))
4172 (home-page "https://www.scipy.org/")
4173 (synopsis "The Scipy library provides efficient numerical routines")
4174 (description "The SciPy library is one of the core packages that make up
4175 the SciPy stack. It provides many user-friendly and efficient numerical
4176 routines such as routines for numerical integration and optimization.")
4177 (properties `((python2-variant . ,(delay python2-scipy))))
4178 (license license:bsd-3)))
4180 (define-public python2-scipy
4181 (package-with-python2
4182 (strip-python2-variant python-scipy)))
4184 (define-public python-socksipy-branch
4186 (name "python-socksipy-branch")
4191 (uri (pypi-uri "SocksiPy-branch" version))
4194 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4195 (build-system python-build-system)
4197 `(#:tests? #f)) ; There are no tests
4198 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4199 (synopsis "Python SOCKS module")
4201 "SocksiPy - A Python SOCKS client module. It provides a
4202 socket-like interface that supports connections to any TCP
4203 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4204 The original version was developed by Dan Haim, this is a
4205 branch created by Mario Vilas to address some open issues,
4206 as the original project seems to have been abandoned circa 2007.")
4207 (license license:bsd-3)))
4209 (define-public python2-socksipy-branch
4210 (package-with-python2 python-socksipy-branch))
4212 (define-public python-pycodestyle
4214 (name "python-pycodestyle")
4219 (uri (pypi-uri "pycodestyle" version))
4222 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4223 (build-system python-build-system)
4224 (home-page "https://pycodestyle.readthedocs.io/")
4225 (synopsis "Python style guide checker")
4226 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4227 Python code against some of the style conventions in
4228 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4229 (license license:expat)))
4231 (define-public python2-pycodestyle
4232 (package-with-python2 python-pycodestyle))
4234 (define-public python-multidict
4236 (name "python-multidict")
4241 (uri (pypi-uri "multidict" version))
4244 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4245 (build-system python-build-system)
4247 `(("python-pytest" ,python-pytest)
4248 ("python-pytest-runner" ,python-pytest-runner)))
4249 (home-page "https://github.com/aio-libs/multidict/")
4250 (synopsis "Multidict implementation")
4251 (description "Multidict is dict-like collection of key-value pairs
4252 where key might be occurred more than once in the container.")
4253 (license license:asl2.0)))
4255 (define-public python-orderedmultidict
4257 (name "python-orderedmultidict")
4262 (uri (pypi-uri "orderedmultidict" version))
4265 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4266 (build-system python-build-system)
4269 (modify-phases %standard-phases
4270 (add-after 'unpack 'fix-tests
4272 ;; The package uses nosetest for running the tests.
4273 ;; Adding this initfile allows to run the test suite
4274 ;; without requiring nosetest.
4275 (with-output-to-file "tests/__init__.py" newline)
4278 `(("python-six" ,python-six)))
4280 `(("python-pycodestyle" ,python-pycodestyle)))
4281 (home-page "https://github.com/gruns/orderedmultidict")
4282 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4283 (description "This package contains a library for ordered multivalue
4284 dictionaries. A multivalue dictionary is a dictionary that can store
4285 multiple values for the same key. An ordered multivalue dictionary is a
4286 multivalue dictionary that retains the order of insertions and deletions.")
4287 (license license:unlicense)))
4289 (define-public python2-orderedmultidict
4290 (package-with-python2 python-orderedmultidict))
4292 (define-public python-autopep8
4294 (name "python-autopep8")
4299 (uri (pypi-uri "autopep8" version))
4302 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4303 (build-system python-build-system)
4305 `(("python-pycodestyle" ,python-pycodestyle)))
4306 (home-page "https://github.com/hhatto/autopep8")
4307 (synopsis "Format Python code according to the PEP 8 style guide")
4309 "@code{autopep8} automatically formats Python code to conform to
4310 the PEP 8 style guide. It uses the pycodestyle utility to determine
4311 what parts of the code needs to be formatted. @code{autopep8} is
4312 capable of fixing most of the formatting issues that can be reported
4314 (license (license:non-copyleft
4315 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4317 (define-public python2-autopep8
4318 (package-with-python2 python-autopep8))
4320 (define-public python-distutils-extra
4322 (name "python-distutils-extra")
4327 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4328 version "/+download/python-distutils-extra-"
4332 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4333 (build-system python-build-system)
4334 (home-page "https://launchpad.net/python-distutils-extra/")
4335 (synopsis "Enhancements to Python's distutils")
4337 "The python-distutils-extra module enables you to easily integrate
4338 gettext support, themed icons, and scrollkeeper-based documentation into
4339 Python's distutils.")
4340 (license license:gpl2)))
4342 (define-public python2-distutils-extra
4343 (package-with-python2 python-distutils-extra))
4345 (define-public python2-elib.intl
4347 (name "python2-elib.intl")
4351 ;; This project doesn't tag releases or publish tarballs, so we take
4352 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4355 (url "https://github.com/dieterv/elib.intl.git")
4356 (commit "d09997cfef")))
4357 (file-name (string-append name "-" version "-checkout"))
4360 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4361 (build-system python-build-system)
4363 ;; incompatible with Python 3 (exception syntax)
4364 `(#:python ,python-2
4366 (home-page "https://github.com/dieterv/elib.intl")
4367 (synopsis "Enhanced internationalization for Python")
4369 "The elib.intl module provides enhanced internationalization (I18N)
4370 services for your Python modules and applications.")
4371 (license license:lgpl3+)))
4373 (define-public python-olefile
4375 (name "python-olefile")
4380 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4381 "download/v" version "/olefile-" version ".tar.gz"))
4382 (file-name (string-append name "-" version ".tar.gz"))
4385 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4386 (build-system python-build-system)
4387 (home-page "https://www.decalage.info/python/olefileio")
4388 (synopsis "Read and write Microsoft OLE2 files.")
4390 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4391 Storage or Compound Document, Microsoft Office). It is an improved version of
4392 the OleFileIO module from PIL, the Python Image Library.")
4393 (license license:bsd-3)))
4395 (define-public python2-olefile
4396 (package-with-python2 python-olefile))
4398 (define-public python-pillow
4400 (name "python-pillow")
4405 (uri (pypi-uri "Pillow" version))
4408 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4409 (build-system python-build-system)
4411 `(("python-pytest" ,python-pytest)))
4413 `(("freetype" ,freetype)
4416 ("libjpeg" ,libjpeg)
4417 ("openjpeg" ,openjpeg)
4418 ("libtiff" ,libtiff)
4419 ("libwebp" ,libwebp)))
4421 `(("python-olefile" ,python-olefile)))
4424 (modify-phases %standard-phases
4425 (add-after 'unpack 'patch-ldconfig
4427 (substitute* "setup.py"
4428 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4429 (delete 'check) ; We must run checks after python-pillow is installed.
4430 (add-after 'install 'check-installed
4431 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 (setenv "HOME" (getcwd))
4434 ;; Make installed package available for running the tests.
4435 (add-installed-pythonpath inputs outputs)
4436 (invoke "python" "selftest.py" "--installed")
4437 (invoke "python" "-m" "pytest" "-vv")))))))
4438 (home-page "https://python-pillow.org")
4439 (synopsis "Fork of the Python Imaging Library")
4441 "The Python Imaging Library adds image processing capabilities to your
4442 Python interpreter. This library provides extensive file format support, an
4443 efficient internal representation, and fairly powerful image processing
4444 capabilities. The core image library is designed for fast access to data
4445 stored in a few basic pixel formats. It should provide a solid foundation for
4446 a general image processing tool.")
4447 (license (license:x11-style
4448 "http://www.pythonware.com/products/pil/license.htm"
4449 "The PIL Software License"))))
4451 (define-public python2-pillow
4452 (package-with-python2 python-pillow))
4454 (define-public python-pycparser
4456 (name "python-pycparser")
4461 (uri (pypi-uri "pycparser" version))
4464 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4465 (outputs '("out" "doc"))
4466 (build-system python-build-system)
4468 `(("pkg-config" ,pkg-config)))
4471 (modify-phases %standard-phases
4474 (with-directory-excursion "tests"
4475 (invoke "python" "all_tests.py"))
4477 (add-after 'install 'install-doc
4478 (lambda* (#:key outputs #:allow-other-keys)
4479 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4480 (doc (string-append data "/doc/" ,name "-" ,version))
4481 (examples (string-append doc "/examples")))
4483 (for-each (lambda (file)
4484 (copy-file (string-append "." file)
4485 (string-append doc file)))
4486 '("/README.rst" "/CHANGES" "/LICENSE"))
4487 (copy-recursively "examples" examples)
4489 (home-page "https://github.com/eliben/pycparser")
4490 (synopsis "C parser in Python")
4492 "Pycparser is a complete parser of the C language, written in pure Python
4493 using the PLY parsing library. It parses C code into an AST and can serve as
4494 a front-end for C compilers or analysis tools.")
4495 (license license:bsd-3)))
4497 (define-public python2-pycparser
4498 (package-with-python2 python-pycparser))
4500 (define-public python-pywavelets
4502 (name "python-pywavelets")
4504 (home-page "https://github.com/PyWavelets/pywt")
4507 (uri (pypi-uri "PyWavelets" version))
4510 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4511 (build-system python-build-system)
4513 '(#:modules ((ice-9 ftw)
4517 (guix build python-build-system))
4518 #:phases (modify-phases %standard-phases
4521 (let ((cwd (getcwd))
4522 (libdir (find (cut string-prefix? "lib." <>)
4523 (scandir "build"))))
4524 (with-directory-excursion (string-append cwd "/build/" libdir)
4525 (invoke "nosetests" "-v" "."))))))))
4527 `(("python-matplotlib" ,python-matplotlib) ;for tests
4528 ("python-nose" ,python-nose)))
4530 `(("python-numpy" ,python-numpy)))
4531 (synopsis "Wavelet transforms in Python")
4533 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4534 mathematical basis functions that are localized in both time and frequency.
4535 Wavelet transforms are time-frequency transforms employing wavelets. They are
4536 similar to Fourier transforms, the difference being that Fourier transforms are
4537 localized only in frequency instead of in time and frequency.")
4538 (license license:expat)))
4540 (define-public python2-pywavelets
4541 (package-with-python2 python-pywavelets))
4543 (define-public python-xcffib
4545 (name "python-xcffib")
4550 (uri (pypi-uri "xcffib" version))
4553 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4554 (build-system python-build-system)
4556 `(("libxcb" ,libxcb)))
4558 `(("python-cffi" ,python-cffi) ; used at run time
4559 ("python-six" ,python-six)))
4561 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4564 (modify-phases %standard-phases
4565 (add-after 'unpack 'fix-libxcb-path
4566 (lambda* (#:key inputs #:allow-other-keys)
4567 (let ((libxcb (assoc-ref inputs "libxcb")))
4568 (substitute* '("xcffib/__init__.py")
4569 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4571 (add-after 'install 'install-doc
4572 (lambda* (#:key outputs #:allow-other-keys)
4573 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4574 "/doc/" ,name "-" ,version)))
4576 (copy-file "README.md"
4577 (string-append doc "/README.md"))
4579 (home-page "https://github.com/tych0/xcffib")
4580 (synopsis "XCB Python bindings")
4582 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4583 support for Python 3 and PyPy. It is based on cffi.")
4584 (license license:expat)))
4586 (define-public python2-xcffib
4587 (package-with-python2 python-xcffib))
4589 (define-public python-cairocffi
4591 (name "python-cairocffi")
4596 (uri (pypi-uri "cairocffi" version))
4599 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4600 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4601 (build-system python-build-system)
4602 (outputs '("out" "doc"))
4606 ("gdk-pixbuf" ,gdk-pixbuf)
4610 `(("pkg-config" ,pkg-config)
4611 ("python-pytest" ,python-pytest)
4612 ("python-pytest-cov" ,python-pytest-cov)
4613 ("python-pytest-runner" ,python-pytest-runner)
4614 ("python-sphinx" ,python-sphinx)
4615 ("python-docutils" ,python-docutils)))
4617 `(("python-xcffib" ,python-xcffib))) ; used at run time
4620 (modify-phases %standard-phases
4621 (add-after 'unpack 'patch-paths
4622 (lambda* (#:key inputs outputs #:allow-other-keys)
4623 (substitute* (find-files "." "\\.py$")
4624 (("dlopen\\(ffi, 'cairo'")
4625 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4626 "/lib/libcairo.so.2'"))
4627 (("dlopen\\(ffi, 'gdk-3'")
4628 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4629 "/lib/libgtk-3.so.0'"))
4630 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4631 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4632 "/lib/libgdk_pixbuf-2.0.so.0'"))
4633 (("dlopen\\(ffi, 'glib-2.0'")
4634 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4635 "/lib/libglib-2.0.so.0'"))
4636 (("dlopen\\(ffi, 'gobject-2.0'")
4637 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4638 "/lib/libgobject-2.0.so.0'"))
4639 (("dlopen\\(ffi, 'pangocairo-1.0'")
4640 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4641 "/lib/libpangocairo-1.0.so.0'"))
4642 (("dlopen\\(ffi, 'pango-1.0'")
4643 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4644 "/lib/libpango-1.0.so.0'")))
4646 (add-after 'install 'install-doc
4647 (lambda* (#:key inputs outputs #:allow-other-keys)
4648 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4649 (doc (string-append data "/doc/" ,name "-" ,version))
4650 (html (string-append doc "/html")))
4651 (setenv "LD_LIBRARY_PATH"
4652 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4653 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4654 (setenv "LANG" "en_US.UTF-8")
4656 (for-each (lambda (file)
4657 (copy-file (string-append "." file)
4658 (string-append doc file)))
4659 '("/README.rst" "/CHANGES" "/LICENSE"))
4660 (system* "python" "setup.py" "build_sphinx")
4661 (copy-recursively "docs/_build/html" html)
4663 (home-page "https://github.com/Kozea/cairocffi")
4664 (synopsis "Python bindings and object-oriented API for Cairo")
4666 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4667 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4668 graphics library with support for multiple backends including image buffers,
4669 PNG, PostScript, PDF, and SVG file output.")
4670 (license license:bsd-3)))
4672 (define-public python2-cairocffi
4673 (package-with-python2 python-cairocffi))
4675 (define-public python-decorator
4677 (name "python-decorator")
4682 (uri (pypi-uri "decorator" version))
4684 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4685 (build-system python-build-system)
4686 (home-page "https://pypi.python.org/pypi/decorator/")
4687 (synopsis "Python module to simplify usage of decorators")
4689 "The aim of the decorator module is to simplify the usage of decorators
4690 for the average programmer, and to popularize decorators usage giving examples
4691 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4692 etc. The core of this module is a decorator factory.")
4693 (license license:expat)))
4695 (define-public python2-decorator
4696 (package-with-python2 python-decorator))
4698 (define-public python-drmaa
4700 (name "python-drmaa")
4705 (uri (pypi-uri "drmaa" version))
4707 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4708 (build-system python-build-system)
4709 ;; The test suite requires libdrmaa which is provided by the cluster
4710 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4711 ;; should be set to the path of the libdrmaa library.
4712 (arguments '(#:tests? #f))
4714 `(("python-nose" ,python-nose)))
4715 (home-page "https://pypi.python.org/pypi/drmaa")
4716 (synopsis "Python bindings for the DRMAA library")
4718 "A Python package for Distributed Resource Management (DRM) job
4719 submission and control. This package is an implementation of the DRMAA 1.0
4720 Python language binding specification.")
4721 (license license:bsd-3)))
4723 (define-public python2-drmaa
4724 (package-with-python2 python-drmaa))
4726 (define-public python-grako
4728 (name "python-grako")
4734 (pypi-uri "grako" version ".zip"))
4737 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4738 (build-system python-build-system)
4739 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4742 ("python-pytest" ,python-pytest)
4743 ("python-pytest-runner" ,python-pytest-runner)))
4744 (home-page "https://bitbucket.org/neogeny/grako")
4745 (synopsis "EBNF parser generator")
4747 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4748 memoizing PEG/Packrat parser in Python.")
4749 (license license:bsd-3)))
4751 (define-public python2-grako
4752 (package-with-python2 python-grako))
4754 (define-public python-gridmap
4756 (name "python-gridmap")
4762 (url "https://github.com/pygridtools/gridmap.git")
4763 (commit (string-append "v" version))))
4764 (file-name (git-file-name name version))
4766 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4767 (build-system python-build-system)
4769 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4771 `(("python-psutil" ,python-psutil)
4772 ("python-drmaa" ,python-drmaa)
4773 ("python-pyzmq" ,python-pyzmq)))
4774 (home-page "https://github.com/pygridtools/gridmap")
4775 (synopsis "Create jobs on a cluster directly from Python")
4777 "Gridmap is a Python package to allow you to easily create jobs on the
4778 cluster directly from Python. You can directly map Python functions onto the
4779 cluster without needing to write any wrapper code yourself.")
4780 (license license:gpl3+)))
4782 (define-public python2-gridmap
4783 (package-with-python2 python-gridmap))
4785 (define-public python-honcho
4787 (name "python-honcho")
4793 (url "https://github.com/nickstenning/honcho.git")
4794 (commit (string-append "v" version))))
4795 (file-name (git-file-name name version))
4797 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4798 (build-system python-build-system)
4800 `(("python-pytest" ,python-pytest)
4801 ("python-mock" ,python-mock)
4802 ("python-tox" ,python-tox)
4803 ("which" ,which))) ;for tests
4805 `(("python-jinja2" ,python-jinja2)))
4808 (modify-phases %standard-phases
4810 (add-after 'install 'check
4811 (lambda* (#:key outputs inputs #:allow-other-keys)
4812 ;; fix honcho path in testsuite
4813 (substitute* "tests/conftest.py"
4814 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4815 "/bin/honcho" "'")))
4816 ;; It's easier to run tests after install.
4817 ;; Make installed package available for running the tests
4818 (add-installed-pythonpath inputs outputs)
4819 (invoke "py.test" "-v"))))))
4820 (home-page "https://github.com/nickstenning/honcho")
4821 (synopsis "Manage Procfile-based applications")
4823 "A Procfile is a file which describes how to run an application
4824 consisting of several processes. honcho starts all listed processes.
4825 The output of all running processes is collected by honcho and
4827 (license license:expat)))
4829 (define-public python2-honcho
4830 (package-with-python2 python-honcho))
4832 (define-public python-pexpect
4834 (name "python-pexpect")
4839 (uri (pypi-uri "pexpect" version))
4841 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4842 (build-system python-build-system)
4845 (modify-phases %standard-phases
4846 (add-before 'check 'prepare-tests
4848 (substitute* (find-files "tests")
4849 (("/bin/ls") (which "ls"))
4850 (("/bin/echo") (which "echo"))
4851 (("/bin/which") (which "which"))
4852 ;; Many tests try to use the /bin directory which
4853 ;; is not present in the build environment.
4854 ;; Use one that's non-empty and unlikely to change.
4855 (("/bin'") "/dev'"))
4856 ;; XXX: Socket connection test gets "Connection reset by peer".
4857 ;; Why does it not work? Delete for now.
4858 (delete-file "tests/test_socket.py")
4860 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4862 `(("python-nose" ,python-nose)
4863 ("python-pytest" ,python-pytest)
4866 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4868 `(("python-ptyprocess" ,python-ptyprocess)))
4869 (home-page "http://pexpect.readthedocs.org/")
4870 (synopsis "Controlling interactive console applications")
4872 "Pexpect is a pure Python module for spawning child applications;
4873 controlling them; and responding to expected patterns in their output.
4874 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4875 child application and control it as if a human were typing commands.")
4876 (license license:isc)))
4878 (define-public python2-pexpect
4879 (package-with-python2 python-pexpect))
4881 (define-public python-setuptools-scm
4883 (name "python-setuptools-scm")
4887 (uri (pypi-uri "setuptools_scm" version))
4890 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4891 (build-system python-build-system)
4892 (home-page "https://github.com/pypa/setuptools_scm/")
4893 (synopsis "Manage Python package versions in SCM metadata")
4895 "Setuptools_scm handles managing your Python package versions in
4896 @dfn{software configuration management} (SCM) metadata instead of declaring
4897 them as the version argument or in a SCM managed file.")
4898 (license license:expat)))
4900 (define-public python2-setuptools-scm
4901 (package-with-python2 python-setuptools-scm))
4903 (define-public python-pathlib2
4905 (name "python-pathlib2")
4910 (uri (pypi-uri "pathlib2" version))
4913 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4914 (build-system python-build-system)
4916 `(("python-scandir" ,python-scandir)
4917 ("python-six" ,python-six)))
4918 (home-page "https://pypi.python.org/pypi/pathlib2/")
4919 (synopsis "Object-oriented filesystem paths")
4920 (description "The goal of pathlib2 is to provide a backport of the
4921 standard @code{pathlib} module which tracks the standard library module, so
4922 all the newest features of the standard @code{pathlib} can be used also on
4923 older Python versions.")
4924 (license license:expat)))
4926 (define-public python-importlib-metadata
4928 (name "python-importlib-metadata")
4933 (uri (pypi-uri "importlib_metadata" version))
4936 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4937 (build-system python-build-system)
4939 `(("python-configparser" ,python-configparser)
4940 ("python-contextlib2" ,python-contextlib2)
4941 ("python-docutils" ,python-docutils)
4942 ("python-pathlib2" ,python-pathlib2)
4943 ("python-rst.linker" ,python-rst.linker)
4944 ("python-zipp" ,python-zipp)))
4946 `(("python-setuptools-scm" ,python-setuptools-scm)
4947 ("python-sphinx" ,python-sphinx)))
4948 (home-page "https://importlib-metadata.readthedocs.io/")
4949 (synopsis "Read metadata from Python packages")
4951 "@code{importlib_metadata} is a library which provides an API for
4952 accessing an installed Python package's metadata, such as its entry points or
4953 its top-level name. This functionality intends to replace most uses of
4954 @code{pkg_resources} entry point API and metadata API. Along with
4955 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4956 need to use the older and less efficient @code{pkg_resources} package.")
4957 (license license:asl2.0)))
4959 (define-public python-jaraco-packaging
4961 (name "python-jaraco-packaging")
4966 (uri (pypi-uri "jaraco.packaging" version))
4969 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4970 (build-system python-build-system)
4972 `(("python-pytest" ,python-pytest)
4973 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4974 ("python-pytest-flake8" ,python-pytest-flake8)
4975 ("python-rst.linker" ,python-rst.linker)
4976 ("python-setuptools" ,python-setuptools)
4977 ("python-setuptools-scm" ,python-setuptools-scm)
4978 ("python-six" ,python-six)
4979 ("python-sphinx" ,python-sphinx)))
4980 (home-page "https://github.com/jaraco/jaraco.packaging")
4981 (synopsis "Tools to supplement packaging Python releases")
4983 "This package provides various tools to supplement packaging Python
4985 (license license:expat)))
4987 (define-public python-pathpy
4989 (name "python-pathpy")
4994 (uri (pypi-uri "path.py" version))
4996 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4997 (outputs '("out" "doc"))
4998 (build-system python-build-system)
5000 `(("python-appdirs" ,python-appdirs)))
5002 `(("python-setuptools-scm" ,python-setuptools-scm)
5003 ("python-sphinx" ,python-sphinx)
5004 ("python-rst.linker" ,python-rst.linker)
5005 ("python-pytest" ,python-pytest)
5006 ("python-pytest-runner" ,python-pytest-runner)
5007 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5010 (modify-phases %standard-phases
5011 (add-after 'build 'build-doc
5013 (setenv "LANG" "en_US.UTF-8")
5014 (invoke "python" "setup.py" "build_sphinx")))
5015 (add-after 'install 'install-doc
5016 (lambda* (#:key outputs #:allow-other-keys)
5017 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5018 (doc (string-append data "/doc/" ,name "-" ,version))
5019 (html (string-append doc "/html")))
5021 (for-each (lambda (file)
5022 (copy-file file (string-append doc "/" file)))
5023 '("README.rst" "CHANGES.rst"))
5024 (copy-recursively "build/sphinx/html" html)
5028 ;; The import time test aborts if an import takes longer than
5029 ;; 100ms. It may very well take a little longer than that.
5030 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5031 (home-page "https://github.com/jaraco/path.py")
5032 (synopsis "Python module wrapper for built-in os.path")
5034 "@code{path.py} implements path objects as first-class entities, allowing
5035 common operations on files to be invoked on those path objects directly.")
5036 (license license:expat)))
5038 (define-public python2-pathpy
5039 (package-with-python2 python-pathpy))
5041 (define-public python-simplegeneric
5043 (name "python-simplegeneric")
5048 (uri (pypi-uri "simplegeneric" version ".zip"))
5050 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5051 (build-system python-build-system)
5053 `(("unzip" ,unzip)))
5054 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5055 (synopsis "Python module for simple generic functions")
5057 "The simplegeneric module lets you define simple single-dispatch generic
5058 functions, akin to Python’s built-in generic functions like @code{len()},
5059 @code{iter()} and so on. However, instead of using specially-named methods,
5060 these generic functions use simple lookup tables, akin to those used by
5061 e.g. @code{pickle.dump()} and other generic functions found in the Python
5063 (license license:zpl2.1)))
5065 (define-public python2-simplegeneric
5066 (package-with-python2 python-simplegeneric))
5068 (define-public python-ipython-genutils
5069 ;; TODO: This package is retired, check if can be removed, see description.
5071 (name "python-ipython-genutils")
5076 (uri (pypi-uri "ipython_genutils" version))
5078 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5079 (build-system python-build-system)
5080 (arguments `(#:tests? #f)) ; no tests
5081 (home-page "https://ipython.org")
5082 (synopsis "Vestigial utilities from IPython")
5084 "This package provides retired utilities from IPython. No packages
5085 outside IPython/Jupyter should depend on it.
5087 This package shouldn't exist. It contains some common utilities shared by
5088 Jupyter and IPython projects during The Big Split. As soon as possible, those
5089 packages will remove their dependency on this, and this package will go
5091 (license license:bsd-3)))
5093 (define-public python2-ipython-genutils
5094 (package-with-python2 python-ipython-genutils))
5096 (define-public python-traitlets
5098 (name "python-traitlets")
5103 (uri (pypi-uri "traitlets" version))
5106 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5107 (build-system python-build-system)
5110 (modify-phases %standard-phases
5111 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5113 `(("python-ipython-genutils" ,python-ipython-genutils)
5114 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5116 `(("python-pytest" ,python-pytest)))
5117 (properties `((python2-variant . ,(delay python2-traitlets))))
5118 (home-page "https://ipython.org")
5119 (synopsis "Configuration system for Python applications")
5121 "Traitlets is a framework that lets Python classes have attributes with
5122 type checking, dynamically calculated default values, and ‘on change’
5123 callbacks. The package also includes a mechanism to use traitlets for
5124 configuration, loading values from files or from command line arguments. This
5125 is a distinct layer on top of traitlets, so you can use traitlets in your code
5126 without using the configuration machinery.")
5127 (license license:bsd-3)))
5129 (define-public python2-traitlets
5130 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5134 `(("python2-enum34" ,python2-enum34)
5135 ,@(package-propagated-inputs traitlets))))))
5137 (define-public python-jupyter-core
5139 (name "python-jupyter-core")
5144 (uri (string-append (pypi-uri "jupyter_core" version)))
5147 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5148 (build-system python-build-system)
5149 ;; FIXME: not sure how to run the tests
5150 (arguments `(#:tests? #f))
5152 `(("python-traitlets" ,python-traitlets)))
5153 (home-page "http://jupyter.org/")
5154 (synopsis "Jupyter base package")
5156 "Jupyter core is the base package on which Jupyter projects rely.")
5157 (license license:bsd-3)))
5159 (define-public python2-jupyter-core
5160 (package-with-python2 python-jupyter-core))
5162 (define-public python-jupyter-client
5164 (name "python-jupyter-client")
5169 (uri (pypi-uri "jupyter_client" version))
5172 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5173 (build-system python-build-system)
5174 ;; Tests fail because of missing native python kernel which I assume is
5175 ;; provided by the ipython package, which we cannot use because it would
5176 ;; cause a dependency cycle.
5177 (arguments `(#:tests? #f))
5179 `(("python-pyzmq" ,python-pyzmq)
5180 ("python-traitlets" ,python-traitlets)
5181 ("python-jupyter-core" ,python-jupyter-core)))
5182 (home-page "http://jupyter.org/")
5183 (synopsis "Jupyter protocol implementation and client libraries")
5185 "The @code{jupyter_client} package contains the reference implementation
5186 of the Jupyter protocol. It also provides client and kernel management APIs
5187 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5188 installing @code{kernelspec}s for use with Jupyter frontends.")
5189 (license license:bsd-3)))
5191 (define-public python2-jupyter-client
5192 (package-with-python2 python-jupyter-client))
5194 (define-public python-ipykernel
5196 (name "python-ipykernel")
5201 (uri (pypi-uri "ipykernel" version))
5203 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5204 (build-system python-build-system)
5207 (modify-phases %standard-phases
5210 (setenv "HOME" "/tmp")
5211 (invoke "pytest" "-v")
5214 `(("python-ipython" ,python-ipython)
5215 ;; imported at runtime during connect
5216 ("python-jupyter-client" ,python-jupyter-client)))
5218 `(("python-pytest" ,python-pytest)
5219 ("python-nose" ,python-nose)))
5220 (home-page "https://ipython.org")
5221 (synopsis "IPython Kernel for Jupyter")
5223 "This package provides the IPython kernel for Jupyter.")
5224 (license license:bsd-3)))
5226 ;; Version 5.1.1 and above no longer support Python 2.
5227 (define-public python2-ipykernel
5229 (name "python2-ipykernel")
5234 (uri (pypi-uri "ipykernel" version))
5236 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5237 (build-system python-build-system)
5239 `(#:python ,python-2
5241 (modify-phases %standard-phases
5244 (setenv "HOME" "/tmp")
5245 (invoke "pytest" "-v")
5248 `(("python2-ipython" ,python2-ipython)
5249 ;; imported at runtime during connect
5250 ("python2-jupyter-client" ,python2-jupyter-client)))
5252 `(("python2-pytest" ,python2-pytest)
5253 ("python2-nose" ,python2-nose)))
5254 (home-page "https://ipython.org")
5255 (synopsis "IPython Kernel for Jupyter")
5257 "This package provides the IPython kernel for Jupyter.")
5258 (license license:bsd-3)))
5260 (define-public python-pari-jupyter
5262 (name "python-pari-jupyter")
5267 (uri (pypi-uri "pari_jupyter" version))
5270 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5271 (build-system python-build-system)
5273 `(("python-ipykernel" ,python-ipykernel)))
5275 `(("pari-gp" ,pari-gp)
5276 ("readline" ,readline)))
5278 `(#:tests? #f)) ; no test suite
5280 "https://github.com/jdemeyer/pari_jupyter")
5281 (synopsis "A Jupyter kernel for PARI/GP")
5282 (description "The package provides a PARI/GP kernel for Jupyter.")
5283 (license license:gpl3+)))
5285 (define-public python-backcall
5287 (name "python-backcall")
5292 (uri (pypi-uri "backcall" version))
5295 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5296 (build-system python-build-system)
5297 (home-page "https://github.com/takluyver/backcall/")
5298 (synopsis "Specifications for callback functions passed in to an API")
5300 "If your code lets other people supply callback functions, it's important
5301 to specify the function signature you expect, and check that functions support
5302 that. Adding extra parameters later would break other peoples code unless
5303 you're careful. The @code{backcall} package provides a way of specifying the
5304 callback signature using a prototype function.")
5305 (license license:bsd-3)))
5307 ;; This is the latest release of the LTS version of ipython with support for
5308 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5309 ;; dropped support for Python 2.7.
5310 (define-public python2-ipython
5312 (name "python2-ipython")
5317 (uri (pypi-uri "ipython" version ".tar.gz"))
5319 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5320 (build-system python-build-system)
5322 `(("python2-backports-shutil-get-terminal-size"
5323 ,python2-backports-shutil-get-terminal-size)
5324 ("python2-pathlib2" ,python2-pathlib2)
5325 ("python2-pyzmq" ,python2-pyzmq)
5326 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5327 ("python2-terminado" ,python2-terminado)
5328 ("python2-matplotlib" ,python2-matplotlib)
5329 ("python2-numpy" ,python2-numpy)
5330 ("python2-numpydoc" ,python2-numpydoc)
5331 ("python2-jinja2" ,python2-jinja2)
5332 ("python2-mistune" ,python2-mistune)
5333 ("python2-pexpect" ,python2-pexpect)
5334 ("python2-pickleshare" ,python2-pickleshare)
5335 ("python2-simplegeneric" ,python2-simplegeneric)
5336 ("python2-jsonschema" ,python2-jsonschema)
5337 ("python2-traitlets" ,python2-traitlets)
5338 ("python2-nbformat" ,python2-nbformat)
5339 ("python2-pygments" ,python2-pygments)))
5341 `(("readline" ,readline)
5344 `(("graphviz" ,graphviz)
5345 ("pkg-config" ,pkg-config)
5346 ("python2-requests" ,python2-requests) ;; for tests
5347 ("python2-testpath" ,python2-testpath)
5348 ("python2-mock" ,python2-mock)
5349 ("python2-nose" ,python2-nose)))
5351 `(#:python ,python-2
5353 (modify-phases %standard-phases
5354 (add-before 'check 'delete-broken-tests
5355 (lambda* (#:key inputs #:allow-other-keys)
5356 ;; These tests throw errors for unknown reasons.
5357 (delete-file "IPython/core/tests/test_profile.py")
5358 (delete-file "IPython/core/tests/test_interactiveshell.py")
5359 (delete-file "IPython/core/tests/test_magic.py")
5361 (home-page "https://ipython.org")
5362 (synopsis "IPython is a tool for interactive computing in Python")
5364 "IPython provides a rich architecture for interactive computing with:
5365 Powerful interactive shells, a browser-based notebook, support for interactive
5366 data visualization, embeddable interpreters and tools for parallel
5368 (license license:bsd-3)))
5370 (define-public python-ipython
5372 (name "python-ipython")
5377 (uri (pypi-uri "ipython" version ".tar.gz"))
5379 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5380 (build-system python-build-system)
5382 `(("python-backcall" ,python-backcall)
5383 ("python-pyzmq" ,python-pyzmq)
5384 ("python-prompt-toolkit" ,python-prompt-toolkit)
5385 ("python-terminado" ,python-terminado)
5386 ("python-matplotlib" ,python-matplotlib)
5387 ("python-numpy" ,python-numpy)
5388 ("python-numpydoc" ,python-numpydoc)
5389 ("python-jedi" ,python-jedi)
5390 ("python-jinja2" ,python-jinja2)
5391 ("python-mistune" ,python-mistune)
5392 ("python-pexpect" ,python-pexpect)
5393 ("python-pickleshare" ,python-pickleshare)
5394 ("python-simplegeneric" ,python-simplegeneric)
5395 ("python-jsonschema" ,python-jsonschema)
5396 ("python-traitlets" ,python-traitlets)
5397 ("python-nbformat" ,python-nbformat)
5398 ("python-pygments" ,python-pygments)))
5400 `(("readline" ,readline)
5403 `(("graphviz" ,graphviz)
5404 ("pkg-config" ,pkg-config)
5405 ("python-requests" ,python-requests) ;; for tests
5406 ("python-testpath" ,python-testpath)
5407 ("python-nose" ,python-nose)))
5410 (modify-phases %standard-phases
5411 ;; Tests can only be run after the library has been installed and not
5412 ;; within the source directory.
5414 (add-after 'install 'check
5415 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5418 ;; Make installed package available for running the tests
5419 (add-installed-pythonpath inputs outputs)
5420 (setenv "HOME" "/tmp/") ;; required by a test
5421 ;; We only test the core because one of the other tests
5422 ;; tries to import ipykernel.
5423 (invoke "python" "IPython/testing/iptest.py"
5424 "-v" "IPython/core/tests"))
5426 (add-before 'check 'fix-tests
5427 (lambda* (#:key inputs #:allow-other-keys)
5428 (substitute* "./IPython/utils/_process_posix.py"
5429 (("/usr/bin/env', 'which") (which "which")))
5430 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5431 (("#!/usr/bin/env python")
5432 (string-append "#!" (which "python"))))
5433 ;; This test introduces a circular dependency on ipykernel
5434 ;; (which depends on ipython).
5435 (delete-file "IPython/core/tests/test_display.py")
5436 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5437 (delete-file "IPython/core/tests/test_interactiveshell.py")
5439 (home-page "https://ipython.org")
5440 (synopsis "IPython is a tool for interactive computing in Python")
5442 "IPython provides a rich architecture for interactive computing with:
5443 Powerful interactive shells, a browser-based notebook, support for interactive
5444 data visualization, embeddable interpreters and tools for parallel
5446 (license license:bsd-3)))
5448 (define-public python-ipython-documentation
5450 (inherit python-ipython)
5451 (name "python-ipython-documentation")
5452 (version (package-version python-ipython))
5455 (modify-phases %standard-phases
5459 (lambda* (#:key outputs #:allow-other-keys)
5460 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5461 (doc (string-append data "/doc/" ,name "-" ,version))
5462 (html (string-append doc "/html"))
5463 (man1 (string-append data "/man/man1"))
5464 (info (string-append data "/info"))
5465 (examples (string-append doc "/examples"))
5466 (python-arg (string-append "PYTHON=" (which "python"))))
5467 (setenv "LANG" "en_US.utf8")
5468 (with-directory-excursion "docs"
5469 ;; FIXME: pdf fails to build
5470 ;;(system* "make" "pdf" "PAPER=a4")
5471 (system* "make" python-arg "html")
5472 ;; FIXME: the generated texi file contains ^@^@, which trips
5474 ;; (system* "make" python-arg "info")
5476 (copy-recursively "docs/man" man1)
5477 (copy-recursively "examples" examples)
5478 (copy-recursively "docs/build/html" html)
5479 ;; (copy-file "docs/build/latex/ipython.pdf"
5480 ;; (string-append doc "/ipython.pdf"))
5482 ;; (copy-file "docs/build/texinfo/ipython.info"
5483 ;; (string-append info "/ipython.info"))
5484 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5487 `(("python-ipython" ,python-ipython)
5488 ("python-ipykernel" ,python-ipykernel)))
5490 `(("python-sphinx" ,python-sphinx)
5491 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5492 ;; FIXME: It's possible that a smaller union would work just as well.
5493 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5495 texlive-generic-ifxetex
5496 texlive-generic-pdftex
5497 texlive-latex-amsfonts
5498 texlive-latex-capt-of
5500 texlive-latex-environ
5501 texlive-latex-eqparbox
5502 texlive-latex-etoolbox
5503 texlive-latex-expdlist
5504 texlive-latex-fancyhdr
5505 texlive-latex-fancyvrb
5506 texlive-latex-fncychap
5508 texlive-latex-framed
5509 texlive-latex-geometry
5510 texlive-latex-graphics
5511 texlive-latex-hyperref
5512 texlive-latex-mdwtools
5513 texlive-latex-multirow
5514 texlive-latex-needspace
5515 texlive-latex-oberdiek
5516 texlive-latex-parskip
5517 texlive-latex-preview
5518 texlive-latex-tabulary
5519 texlive-latex-threeparttable
5520 texlive-latex-titlesec
5521 texlive-latex-trimspaces
5523 texlive-latex-upquote
5525 texlive-latex-varwidth
5526 texlive-latex-wrapfig)))
5527 ("texinfo" ,texinfo)))))
5529 (define-public python-urwid
5531 (name "python-urwid")
5536 (uri (pypi-uri "urwid" version))
5539 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5540 (build-system python-build-system)
5541 (home-page "http://urwid.org")
5542 (synopsis "Console user interface library for Python")
5544 "Urwid is a curses-based UI/widget library for Python. It includes many
5545 features useful for text console applications.")
5546 (license license:lgpl2.1+)))
5548 (define-public python2-urwid
5549 (package-with-python2 python-urwid))
5551 (define-public python-urwidtrees
5553 (name "python-urwidtrees")
5558 ;; package author intends on distributing via github rather than pypi:
5559 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5560 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5562 (file-name (string-append name "-" version ".tar.gz"))
5565 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5566 (build-system python-build-system)
5568 '(#:tests? #f)) ; no tests
5569 (propagated-inputs `(("python-urwid" ,python-urwid)))
5570 (home-page "https://github.com/pazz/urwidtrees")
5571 (synopsis "Tree widgets for urwid")
5572 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5573 toolkit. Use it to build trees of widgets.")
5574 (license license:gpl3+)))
5576 (define-public python2-urwidtrees
5577 (package-with-python2 python-urwidtrees))
5579 (define-public python-ua-parser
5581 (name "python-ua-parser")
5586 (uri (pypi-uri "ua-parser" version))
5589 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5590 (build-system python-build-system)
5592 `(#:tests? #f)) ;no test suite in release
5594 `(("python-pyyaml" ,python-pyyaml)))
5595 (home-page "https://github.com/ua-parser/uap-python")
5596 (synopsis "User agent parser")
5598 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5599 (license license:asl2.0)))
5601 (define-public python2-ua-parser
5602 (package-with-python2 python-ua-parser))
5604 (define-public python-user-agents
5606 (name "python-user-agents")
5611 (uri (pypi-uri "user-agents" version))
5614 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5615 (build-system python-build-system)
5617 `(#:tests? #f)) ;missing devices.json test file in release
5619 `(("python-ua-parser" ,python-ua-parser)))
5620 (home-page "https://github.com/selwin/python-user-agents")
5621 (synopsis "User Agent strings parsing library")
5623 "A library to identify devices (phones, tablets) and their capabilities by
5624 parsing (browser/HTTP) user agent strings.")
5625 (license license:expat)))
5627 (define-public python2-user-agents
5628 (package-with-python2 python-user-agents))
5630 (define-public python-dbus
5632 (name "python-dbus")
5637 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5638 "dbus-python-" version ".tar.gz"))
5641 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5642 (build-system gnu-build-system)
5645 (modify-phases %standard-phases
5649 ;; XXX: For the missing '/etc/machine-id'.
5650 (substitute* "test/run-test.sh"
5651 (("DBUS_FATAL_WARNINGS=1")
5652 "DBUS_FATAL_WARNINGS=0"))
5655 `(("pkg-config" ,pkg-config)))
5657 `(("python" ,python-wrapper)
5658 ("dbus-glib" ,dbus-glib)))
5659 (synopsis "Python bindings for D-bus")
5660 (description "python-dbus provides bindings for libdbus, the reference
5661 implementation of D-Bus.")
5662 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5663 (license license:expat)))
5665 (define-public python2-dbus
5666 (package (inherit python-dbus)
5667 (name "python2-dbus")
5668 (inputs `(("python" ,python-2)
5669 ,@(alist-delete "python"
5670 (package-inputs python-dbus)
5672 ;; FIXME: on Python 2, the test_utf8 fails with:
5673 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5674 (arguments `(#:tests? #f))))
5676 (define-public python-notify2
5678 (name "python-notify2")
5683 (uri (pypi-uri "notify2" version))
5686 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5687 (build-system python-build-system)
5688 (arguments `(#:tests? #f)) ; tests depend on system state
5690 `(("python-dbus" ,python-dbus)))
5691 (home-page "https://bitbucket.org/takluyver/pynotify2")
5692 (synopsis "Python interface to D-Bus notifications")
5694 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5695 It is a reimplementation of pynotify in pure Python, and an alternative to
5696 the GObject Introspection bindings to libnotify for non-GTK applications.")
5697 (license (list license:bsd-2
5698 license:lgpl2.1+))))
5700 (define-public python2-notify2
5701 (package-with-python2 python-notify2))
5703 (define-public python-lxml
5705 (name "python-lxml")
5710 (uri (pypi-uri "lxml" version))
5713 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5714 (build-system python-build-system)
5716 `(("libxml2" ,libxml2)
5717 ("libxslt" ,libxslt)))
5718 (home-page "http://lxml.de/")
5720 "Python XML processing library")
5722 "The lxml XML toolkit is a Pythonic binding for the C libraries
5723 libxml2 and libxslt.")
5724 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5726 (define-public python2-lxml
5727 (package-with-python2 python-lxml))
5729 ;; beautifulsoup4 has a totally different namespace than 3.x,
5730 ;; and pypi seems to put it under its own name, so I guess we should too
5731 (define-public python-beautifulsoup4
5733 (name "python-beautifulsoup4")
5738 (uri (pypi-uri "beautifulsoup4" version))
5741 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5742 (build-system python-build-system)
5745 (modify-phases %standard-phases
5746 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5747 ;; must use this conversion script when building with Python 3. The
5748 ;; conversion script also runs the tests.
5749 ;; For more information, see the file 'convert-py3k' in the source
5752 (lambda _ (invoke "./convert-py3k"))))))
5754 `(("python-soupsieve" ,python-soupsieve)))
5756 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5758 "Python screen-scraping library")
5760 "Beautiful Soup is a Python library designed for rapidly setting up
5761 screen-scraping projects. It offers Pythonic idioms for navigating,
5762 searching, and modifying a parse tree, providing a toolkit for
5763 dissecting a document and extracting what you need. It automatically
5764 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5765 (license license:expat)
5766 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5768 (define-public python2-beautifulsoup4
5770 (inherit (package-with-python2
5771 (strip-python2-variant python-beautifulsoup4)))
5772 (arguments `(#:python ,python-2))))
5774 (define-public python-soupsieve
5776 (name "python-soupsieve")
5781 (uri (pypi-uri "soupsieve" version))
5784 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5785 (build-system python-build-system)
5786 (arguments `(#:tests? #f))
5787 ;;XXX: 2 tests fail currently despite claming they were to be
5788 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5789 ;;don't want to create a circular dependency.
5790 (home-page "https://github.com/facelessuser/soupsieve")
5791 (synopsis "CSS selector library")
5793 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5794 Soup 4. It aims to provide selecting, matching, and filtering using modern
5795 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5796 specifications up through the latest CSS level 4 drafts and beyond (though
5797 some are not yet implemented).")
5798 (properties `((python2-variant . ,(delay python2-soupsieve))))
5799 (license license:expat)))
5801 (define-public python2-soupsieve
5802 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5806 `(("python2-backports-functools-lru-cache"
5807 ,python2-backports-functools-lru-cache)
5808 ,@(package-propagated-inputs base))))))
5810 (define-public python-netifaces
5812 (name "python-netifaces")
5817 (uri (pypi-uri "netifaces" version))
5820 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5821 (build-system python-build-system)
5822 (home-page "https://github.com/al45tair/netifaces")
5824 "Python module for portable network interface information")
5826 "Netifaces is a Python module providing information on network
5827 interfaces in an easy and portable manner.")
5828 (license license:expat)))
5830 (define-public python2-netifaces
5831 (package-with-python2 python-netifaces))
5833 (define-public python-networkx
5835 (name "python-networkx")
5840 (uri (pypi-uri "networkx" version ".zip"))
5842 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5843 (build-system python-build-system)
5844 ;; python-decorator is needed at runtime.
5846 `(("python-decorator" ,python-decorator)))
5848 `(("python-nose" ,python-nose)
5850 (home-page "https://networkx.github.io/")
5851 (synopsis "Python module for creating and manipulating graphs and networks")
5853 "NetworkX is a Python package for the creation, manipulation, and study
5854 of the structure, dynamics, and functions of complex networks.")
5855 (license license:bsd-3)))
5857 (define-public python2-networkx
5858 (package-with-python2 python-networkx))
5860 (define-public python-datrie
5862 (name "python-datrie")
5867 (uri (pypi-uri "datrie" version))
5870 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5871 (build-system python-build-system)
5873 `(#:phases (modify-phases %standard-phases
5874 (add-before 'build 'cythonize
5876 ;; Regenerate Cython classes to solve ABI issues with Python
5877 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5878 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5879 "src/stdio_ext.pxd" "-a"))))))
5881 `(("python-cython" ,python-cython)
5882 ("python-hypothesis" ,python-hypothesis)
5883 ("python-pytest" ,python-pytest)
5884 ("python-pytest-runner" ,python-pytest-runner)))
5885 (home-page "https://github.com/kmike/datrie")
5886 (synopsis "Fast, efficiently stored trie for Python")
5888 "This package provides a fast, efficiently stored trie implementation for
5890 (license license:lgpl2.1+)))
5892 (define-public snakemake
5899 (uri (pypi-uri "snakemake" version))
5901 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5902 (build-system python-build-system)
5904 ;; TODO: Package missing test dependencies.
5907 (modify-phases %standard-phases
5908 ;; For cluster execution Snakemake will call Python. Since there is
5909 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5910 ;; this by calling the snakemake wrapper instead.
5911 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5912 (lambda* (#:key outputs #:allow-other-keys)
5913 (substitute* "snakemake/executors.py"
5914 (("\\{sys.executable\\} -m snakemake")
5915 (string-append (assoc-ref outputs "out")
5919 `(("python-gitpython" ,python-gitpython)
5920 ("python-wrapt" ,python-wrapt)
5921 ("python-requests" ,python-requests)
5922 ("python-appdirs" ,python-appdirs)
5923 ("python-configargparse" ,python-configargparse)
5924 ("python-datrie" ,python-datrie)
5925 ("python-docutils" ,python-docutils)
5926 ("python-jinja2" ,python-jinja2)
5927 ("python-jsonschema" ,python-jsonschema)
5928 ("python-networkx" ,python-networkx)
5929 ("python-pyyaml" ,python-pyyaml)
5930 ("python-ratelimiter" ,python-ratelimiter)))
5931 (home-page "https://snakemake.readthedocs.io")
5932 (synopsis "Python-based execution environment for make-like workflows")
5934 "Snakemake aims to reduce the complexity of creating workflows by
5935 providing a clean and modern domain specific specification language (DSL) in
5936 Python style, together with a fast and comfortable execution environment.")
5937 (license license:expat)))
5939 ;; This is currently needed for the pigx-* packages.
5940 (define-public snakemake-4
5941 (package (inherit snakemake)
5946 (uri (pypi-uri "snakemake" version))
5948 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5950 `(("python-wrapt" ,python-wrapt)
5951 ("python-requests" ,python-requests)
5952 ("python-appdirs" ,python-appdirs)
5953 ("python-configargparse" ,python-configargparse)
5954 ("python-pyyaml" ,python-pyyaml)
5955 ("python-ratelimiter" ,python-ratelimiter)))))
5957 (define-public python-pyqrcode
5959 (name "python-pyqrcode")
5964 (uri (pypi-uri "PyQRCode" version))
5967 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5968 (build-system python-build-system)
5970 "https://github.com/mnooner256/pyqrcode")
5971 (synopsis "QR code generator")
5973 "Pyqrcode is a QR code generator written purely in Python with
5974 SVG, EPS, PNG and terminal output.")
5975 (license license:bsd-3)))
5977 (define-public python-seaborn
5979 (name "python-seaborn")
5984 (uri (pypi-uri "seaborn" version))
5986 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5987 (build-system python-build-system)
5990 (modify-phases %standard-phases
5991 (add-before 'check 'start-xserver
5992 (lambda* (#:key inputs #:allow-other-keys)
5993 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5994 ;; There must be a running X server and make check doesn't
5995 ;; start one. Therefore we must do it.
5996 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5997 (setenv "DISPLAY" ":1")
5999 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6001 `(("python-pandas" ,python-pandas)
6002 ("python-matplotlib" ,python-matplotlib)
6003 ("python-numpy" ,python-numpy)
6004 ("python-scipy" ,python-scipy)))
6006 `(("python-pytest" ,python-pytest)
6007 ("xorg-server" ,xorg-server)))
6008 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6009 (synopsis "Statistical data visualization")
6011 "Seaborn is a library for making attractive and informative statistical
6012 graphics in Python. It is built on top of matplotlib and tightly integrated
6013 with the PyData stack, including support for numpy and pandas data structures
6014 and statistical routines from scipy and statsmodels.")
6015 (license license:bsd-3)))
6017 (define-public python2-seaborn
6018 (package-with-python2 python-seaborn))
6020 (define-public python-mpmath
6022 (name "python-mpmath")
6026 (uri (string-append "http://mpmath.org/files/mpmath-"
6030 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6031 (build-system python-build-system)
6034 (modify-phases %standard-phases
6037 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6038 (home-page "http://mpmath.org")
6039 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6041 "@code{mpmath} can be used as an arbitrary-precision substitute for
6042 Python's float/complex types and math/cmath modules, but also does much
6043 more advanced mathematics.")
6044 (license license:bsd-3)))
6046 (define-public python2-mpmath
6047 (package-with-python2 python-mpmath))
6049 (define-public python-bigfloat
6051 (name "python-bigfloat")
6056 (uri (pypi-uri "bigfloat" version))
6058 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6059 (build-system python-build-system)
6062 (home-page "https://github.com/mdickinson/bigfloat")
6063 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6065 "This package provides a Python interface to the MPFR library for
6066 multiprecision arithmetic.")
6067 (license license:lgpl3+)))
6069 (define-public python2-bigfloat
6070 (package-with-python2 python-bigfloat))
6072 (define-public python-sympy
6074 (name "python-sympy")
6080 "https://github.com/sympy/sympy/releases/download/sympy-"
6081 version "/sympy-" version ".tar.gz"))
6083 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6084 (build-system python-build-system)
6087 (modify-phases %standard-phases
6088 ;; Run the core tests after installation. By default it would run
6089 ;; *all* tests, which take a very long time to complete and are known
6092 (add-after 'install 'check
6093 (lambda* (#:key outputs #:allow-other-keys)
6094 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6097 `(("python-mpmath" ,python-mpmath)))
6098 (home-page "http://www.sympy.org/")
6099 (synopsis "Python library for symbolic mathematics")
6101 "SymPy is a Python library for symbolic mathematics. It aims to become a
6102 full-featured computer algebra system (CAS) while keeping the code as simple
6103 as possible in order to be comprehensible and easily extensible.")
6104 (license license:bsd-3)))
6106 (define-public python2-sympy
6108 (inherit (package-with-python2 python-sympy))
6111 (modify-phases %standard-phases
6112 ;; Run the core tests after installation. By default it would run
6113 ;; *all* tests, which take a very long time to complete and are known
6116 (add-after 'install 'check
6117 (lambda* (#:key outputs #:allow-other-keys)
6118 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6121 (define-public python-q
6128 (uri (pypi-uri "q" version))
6131 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6132 (build-system python-build-system)
6133 (home-page "https://github.com/zestyping/q")
6134 (synopsis "Quick-and-dirty debugging output for tired programmers")
6136 "q is a Python module for \"print\" style of debugging Python code. It
6137 provides convenient short API for print out of values, tracebacks, and
6138 falling into the Python interpreter.")
6139 (license license:asl2.0)))
6141 (define-public python2-q
6142 (package-with-python2 python-q))
6144 (define-public python2-xlib
6146 (name "python2-xlib")
6150 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6152 "python-xlib-" version ".tar.gz"))
6155 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6156 (build-system python-build-system)
6158 `(#:python ,python-2 ;Python 2 only
6159 #:tests? #f)) ;no tests
6160 (home-page "http://python-xlib.sourceforge.net/")
6161 (synopsis "Python X11 client library")
6163 "The Python X Library is intended to be a fully functional X client
6164 library for Python programs. It is useful to implement low-level X clients.
6165 It is written entirely in Python.")
6166 (license license:gpl2+)))
6168 (define-public python-singledispatch
6170 (name "python-singledispatch")
6175 (uri (pypi-uri "singledispatch" version))
6178 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6179 (build-system python-build-system)
6181 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6183 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6184 (synopsis "Backport of singledispatch feature from Python 3.4")
6186 "This library brings functools.singledispatch from Python 3.4 to Python
6188 (license license:expat)))
6190 (define-public python2-singledispatch
6191 (package-with-python2 python-singledispatch))
6193 ;; the python- version can be removed with python-3.5
6194 (define-public python-backports-abc
6196 (name "python-backports-abc")
6201 (uri (pypi-uri "backports_abc" version))
6204 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6205 (build-system python-build-system)
6206 (home-page "https://github.com/cython/backports_abc")
6207 (synopsis "Backport of additions to the 'collections.abc' module")
6209 "Python-backports-abc provides a backport of additions to the
6210 @code{collections.abc} module in Python-3.5.")
6211 (license license:psfl)))
6213 (define-public python2-backports-abc
6214 (package-with-python2 python-backports-abc))
6216 (define-public python-backports-csv
6218 (name "python-backports-csv")
6223 (uri (pypi-uri "backports.csv" version))
6226 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6227 (build-system python-build-system)
6228 (home-page "https://github.com/ryanhiebert/backports.csv")
6229 (synopsis "Backport of Python 3's csv module for Python 2")
6231 "Provides a backport of Python 3's @code{csv} module for parsing
6232 comma separated values. The API of the @code{csv} module in Python 2
6233 is drastically different from the @code{csv} module in Python 3.
6234 This is due, for the most part, to the difference between str in
6235 Python 2 and Python 3.")
6236 (license license:psfl)))
6238 (define-public python2-backports-csv
6239 (package-with-python2 python-backports-csv))
6241 (define-public python2-backports-shutil-get-terminal-size
6243 (name "python2-backports-shutil-get-terminal-size")
6248 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6251 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6252 (build-system python-build-system)
6254 `(#:python ,python-2
6256 (modify-phases %standard-phases
6259 (invoke "py.test" "-v"))))))
6261 `(("python2-pytest" ,python2-pytest)))
6262 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6263 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6265 "This package provides a backport of the @code{get_terminal_size
6266 function} from Python 3.3's @code{shutil}.
6267 Unlike the original version it is written in pure Python rather than C,
6268 so it might be a tiny bit slower.")
6269 (license license:expat)))
6271 (define-public python-waf
6277 (uri (string-append "https://waf.io/"
6278 "waf-" version ".tar.bz2"))
6281 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6282 (build-system python-build-system)
6285 (modify-phases %standard-phases
6288 (invoke "python" "waf-light" "configure" "build")))
6291 (invoke "python" "waf" "--version")))
6293 (lambda* (#:key outputs #:allow-other-keys)
6294 (let ((out (assoc-ref outputs "out")))
6295 (install-file "waf" (string-append out "/bin")))
6297 ;; waf breaks when it is wrapped.
6299 (home-page "https://waf.io/")
6300 (synopsis "Python-based build system")
6302 "Waf is a Python-based framework for configuring, compiling and installing
6304 (license license:bsd-3)))
6306 (define-public python2-waf
6307 (package-with-python2 python-waf))
6309 (define-public python-pyzmq
6311 (name "python-pyzmq")
6316 (uri (pypi-uri "pyzmq" version))
6318 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6319 (build-system python-build-system)
6322 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6323 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6324 ;; --inplace' for 'python setup.py test' to work.
6327 `(("zeromq" ,zeromq)))
6329 `(("pkg-config" ,pkg-config)
6330 ("python-nose" ,python-nose)))
6331 (home-page "https://github.com/zeromq/pyzmq")
6332 (synopsis "Python bindings for 0MQ")
6334 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6335 (license license:bsd-4)))
6337 (define-public python2-pyzmq
6338 (package-with-python2 python-pyzmq))
6340 (define-public python-pep8
6341 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6342 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6343 ;; some dependents' test suites, and nothing more.
6345 (name "python-pep8")
6350 (uri (pypi-uri "pep8" version))
6353 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6354 (build-system python-build-system)
6355 (home-page "https://pep8.readthedocs.org/")
6356 (synopsis "Python style guide checker")
6358 "This tools checks Python code against some of the style conventions in
6360 (license license:expat)))
6362 (define-public python2-pep8
6363 (package-with-python2 python-pep8))
6365 (define-public python-pyflakes
6367 (name "python-pyflakes")
6372 (uri (pypi-uri "pyflakes" version))
6375 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6376 (build-system python-build-system)
6378 "https://github.com/pyflakes/pyflakes")
6379 (synopsis "Passive checker of Python programs")
6381 "Pyflakes statically checks Python source code for common errors.")
6382 (license license:expat)))
6384 (define-public python2-pyflakes
6385 (package-with-python2 python-pyflakes))
6387 (define-public python-mccabe
6389 (name "python-mccabe")
6394 (uri (pypi-uri "mccabe" version))
6397 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6398 (build-system python-build-system)
6400 `(("python-pytest" ,python-pytest-bootstrap)
6401 ("python-pytest-runner" ,python-pytest-runner)))
6402 (home-page "https://github.com/flintwork/mccabe")
6403 (synopsis "McCabe checker, plugin for flake8")
6405 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6406 complexity of Python source code.")
6407 (license license:expat)))
6409 (define-public python2-mccabe
6410 (package-with-python2 python-mccabe))
6412 (define-public python-mccabe-0.2.1
6413 (package (inherit python-mccabe)
6418 (uri (pypi-uri "mccabe" version))
6421 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6423 (define-public python2-mccabe-0.2.1
6424 (package-with-python2 python-mccabe-0.2.1))
6426 ;; Flake8 2.4.1 requires an older version of pep8.
6427 ;; This should be removed ASAP.
6428 (define-public python-pep8-1.5.7
6429 (package (inherit python-pep8)
6434 (uri (pypi-uri "pep8" version))
6437 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6439 ;; XXX Tests not compatible with Python 3.5.
6442 (define-public python2-pep8-1.5.7
6443 (package-with-python2 python-pep8-1.5.7))
6445 ;; Flake8 2.4.1 requires an older version of pyflakes.
6446 ;; This should be removed ASAP.
6447 (define-public python-pyflakes-0.8.1
6448 (package (inherit python-pyflakes)
6453 (uri (pypi-uri "pyflakes" version))
6456 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6458 ;; XXX Tests not compatible with Python 3.5.
6461 (define-public python2-pyflakes-0.8.1
6462 (package-with-python2 python-pyflakes-0.8.1))
6464 (define-public python-flake8
6466 (name "python-flake8")
6470 (uri (pypi-uri "flake8" version))
6473 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6474 (build-system python-build-system)
6477 (modify-phases %standard-phases
6479 (add-after 'install 'check
6480 (lambda* (#:key inputs outputs #:allow-other-keys)
6481 (add-installed-pythonpath inputs outputs)
6482 (invoke "pytest" "-v")
6485 `(("python-pycodestyle" ,python-pycodestyle)
6486 ("python-entrypoints" ,python-entrypoints)
6487 ("python-pyflakes" ,python-pyflakes)
6488 ("python-mccabe" ,python-mccabe)))
6490 `(("python-mock" ,python-mock)
6491 ("python-pytest" ,python-pytest-bootstrap)
6492 ("python-pytest-runner" ,python-pytest-runner)))
6493 (home-page "https://gitlab.com/pycqa/flake8")
6495 "The modular source code checker: pep8, pyflakes and co")
6497 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6498 (properties `((python2-variant . ,(delay python2-flake8))))
6499 (license license:expat)))
6501 (define-public python2-flake8
6502 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6503 (package (inherit base)
6505 `(("python2-configparser" ,python2-configparser)
6506 ("python2-enum34" ,python2-enum34)
6507 ("python2-typing" ,python2-typing)
6508 ,@(package-propagated-inputs base))))))
6510 ;; python-hacking requires flake8 <2.6.0.
6511 (define-public python-flake8-2.5
6513 (inherit python-flake8)
6517 (uri (pypi-uri "flake8" version))
6520 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6522 `(("python-pep8" ,python-pep8)
6523 ,@(package-propagated-inputs python-flake8)))
6524 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6526 (define-public python2-flake8-2.5
6528 (inherit python2-flake8)
6529 (version (package-version python-flake8-2.5))
6531 (inherit (package-source python-flake8-2.5))))
6533 `(("python2-pep8" ,python2-pep8)
6534 ,@(package-propagated-inputs python2-flake8)))))
6536 (define-public python-flake8-polyfill
6538 (name "python-flake8-polyfill")
6543 (uri (pypi-uri "flake8-polyfill" version))
6546 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6547 (build-system python-build-system)
6550 (modify-phases %standard-phases
6553 (setenv "PYTHONPATH"
6554 (string-append (getcwd) "/build/lib:"
6555 (getenv "PYTHONPATH")))
6556 (invoke "py.test" "-v"))))))
6558 `(("python-flake8" ,python-flake8)
6559 ("python-mock" ,python-mock)
6560 ("python-pep8" ,python-pep8)
6561 ("python-pycodestyle" ,python-pycodestyle)
6562 ("python-pytest" ,python-pytest)))
6563 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6564 (synopsis "Polyfill package for Flake8 plugins")
6566 "This package that provides some compatibility helpers for Flake8
6567 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6568 (license license:expat)))
6570 (define-public python2-flake8-polyfill
6571 (package-with-python2 python-flake8-polyfill))
6573 (define-public python-mistune
6575 (name "python-mistune")
6580 (uri (pypi-uri "mistune" version))
6583 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6584 (build-system python-build-system)
6586 `(("python-nose" ,python-nose)
6587 ("python-cython" ,python-cython)))
6588 (home-page "https://github.com/lepture/mistune")
6589 (synopsis "Markdown parser in pure Python")
6590 (description "This package provides a fast markdown parser in pure
6592 (license license:bsd-3)))
6594 (define-public python2-mistune
6595 (package-with-python2 python-mistune))
6597 (define-public python-markdown
6599 (name "python-markdown")
6604 (uri (pypi-uri "Markdown" version))
6607 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6608 (build-system python-build-system)
6610 `(("python-nose" ,python-nose)
6611 ("python-pyyaml" ,python-pyyaml)))
6612 (home-page "https://python-markdown.github.io/")
6613 (synopsis "Python implementation of Markdown")
6615 "This package provides a Python implementation of John Gruber's
6616 Markdown. The library features international input, various Markdown
6617 extensions, and several HTML output formats. A command line wrapper
6618 markdown_py is also provided to convert Markdown files to HTML.")
6619 (license license:bsd-3)))
6621 (define-public python2-markdown
6622 (package-with-python2 python-markdown))
6624 (define-public python-ptyprocess
6626 (name "python-ptyprocess")
6631 (uri (pypi-uri "ptyprocess" version))
6634 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6635 (build-system python-build-system)
6637 `(("python-nose" ,python-nose)))
6640 (modify-phases %standard-phases
6642 (lambda _ (invoke "nosetests"))))))
6643 (home-page "https://github.com/pexpect/ptyprocess")
6644 (synopsis "Run a subprocess in a pseudo terminal")
6646 "This package provides a Python library used to launch a subprocess in a
6647 pseudo terminal (pty), and interact with both the process and its pty.")
6648 (license license:isc)))
6650 (define-public python2-ptyprocess
6651 (package-with-python2 python-ptyprocess))
6653 (define-public python-cram
6655 (name "python-cram")
6657 (home-page "https://bitheap.org/cram/")
6660 (uri (list (string-append home-page "cram-"
6662 (pypi-uri "cram" version)))
6665 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6668 (modify-phases %standard-phases
6669 (add-after 'unpack 'patch-source
6671 (substitute* (find-files "cram" ".*\\.py$")
6672 ;; Replace default shell path.
6673 (("/bin/sh") (which "sh")))
6674 (substitute* (find-files "tests" ".*\\.t$")
6676 (("/bin/bash") (which "bash"))
6677 (("/bin/sh") (which "sh")))
6678 (substitute* "cram/_test.py"
6679 ;; This hack works around a bug triggered by substituting
6680 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6681 ;; "cram -h", which breaks the output at 80 characters. This
6682 ;; causes the line showing the default shell to break into two
6683 ;; lines, but the test expects a single line...
6684 (("env\\['COLUMNS'\\] = '80'")
6685 "env['COLUMNS'] = '160'"))
6687 (substitute* "Makefile"
6688 ;; Recent versions of python-coverage have caused the test
6689 ;; coverage to decrease (as of version 0.7). Allow that.
6690 (("--fail-under=100")
6695 ;; The test phase uses the built library and executable.
6696 (lambda* (#:key inputs outputs #:allow-other-keys)
6697 (add-installed-pythonpath inputs outputs)
6698 (setenv "PATH" (string-append (getenv "PATH") ":"
6699 (assoc-ref outputs "out") "/bin"))
6700 (invoke "make" "test"))))))
6701 (build-system python-build-system)
6703 `(("python-coverage" ,python-coverage)
6705 (synopsis "Simple testing framework for command line applications")
6707 "Cram is a functional testing framework for command line applications.
6708 Cram tests look like snippets of interactive shell sessions. Cram runs each
6709 command and compares the command output in the test with the command’s actual
6711 (license license:gpl2+)))
6713 (define-public python2-cram
6714 (package-with-python2 python-cram))
6716 (define-public python-straight-plugin
6718 (name "python-straight-plugin")
6723 (uri (pypi-uri "straight.plugin" version))
6726 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6727 (build-system python-build-system)
6728 (home-page "https://github.com/ironfroggy/straight.plugin")
6729 (synopsis "Simple namespaced plugin facility")
6730 (description "Straight Plugin provides a type of plugin you can create from
6731 almost any existing Python modules, and an easy way for outside developers to
6732 add functionality and customization to your projects with their own plugins.")
6733 (license license:expat)))
6735 (define-public python2-straight-plugin
6736 (package-with-python2 python-straight-plugin))
6738 (define-public python-fonttools
6740 (name "python-fonttools")
6744 (uri (pypi-uri "fonttools" version ".zip"))
6747 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6748 (build-system python-build-system)
6751 ("python-pytest" ,python-pytest)
6752 ("python-pytest-runner" ,python-pytest-runner)))
6753 (home-page "https://github.com/behdad/fonttools")
6754 (synopsis "Tools to manipulate font files")
6756 "FontTools/TTX is a library to manipulate font files from Python. It
6757 supports reading and writing of TrueType/OpenType fonts, reading and writing
6758 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6759 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6760 from an XML-based format.")
6761 (license license:expat)))
6763 (define-public python2-fonttools
6764 (package-with-python2 python-fonttools))
6766 (define-public python-ly
6773 (uri (pypi-uri name version))
6776 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6777 (build-system python-build-system)
6779 ;; FIXME: Some tests need network access.
6781 (synopsis "Tool and library for manipulating LilyPond files")
6782 (description "This package provides a Python library to parse, manipulate
6783 or create documents in LilyPond format. A command line program ly is also
6784 provided that can be used to do various manipulations with LilyPond files.")
6785 (home-page "https://pypi.python.org/pypi/python-ly")
6786 (license license:gpl2+)))
6788 (define-public python-appdirs
6790 (name "python-appdirs")
6795 (uri (pypi-uri "appdirs" version))
6798 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6799 (build-system python-build-system)
6800 (home-page "https://github.com/ActiveState/appdirs")
6802 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6804 "This module provides a portable way of finding out where user data
6805 should be stored on various operating systems.")
6806 (license license:expat)))
6808 (define-public python2-appdirs
6809 (package-with-python2 python-appdirs))
6811 (define-public python-llfuse
6813 (name "python-llfuse")
6817 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6820 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6821 (build-system python-build-system)
6826 `(("pkg-config" ,pkg-config)))
6827 (synopsis "Python bindings for FUSE")
6829 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6830 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6831 (license license:lgpl2.0+)
6832 (properties `((python2-variant . ,(delay python2-llfuse))))))
6834 (define-public python2-llfuse
6835 (package (inherit (package-with-python2
6836 (strip-python2-variant python-llfuse)))
6837 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6840 (define-public python-llfuse-0.41
6841 (package (inherit python-llfuse)
6846 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6847 "llfuse-" version ".tar.bz2"))
6850 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6851 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6852 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6853 (license (list license:expat license:lgpl2.0+))))
6855 (define-public python-msgpack
6857 (name "python-msgpack")
6861 (uri (pypi-uri "msgpack" version))
6864 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6865 (build-system python-build-system)
6867 `(#:modules ((guix build utils)
6868 (guix build python-build-system)
6873 (modify-phases %standard-phases
6876 (let ((cwd (getcwd)))
6877 (setenv "PYTHONPATH"
6878 (string-append cwd "/build/"
6879 (find (cut string-prefix? "lib" <>)
6880 (scandir (string-append cwd "/build")))
6882 (getenv "PYTHONPATH")))
6883 (invoke "pytest" "-v" "test")))))))
6885 `(("python-pytest" ,python-pytest)))
6886 (synopsis "MessagePack (de)serializer")
6887 (description "MessagePack is a fast, compact binary serialization format,
6888 suitable for similar data to JSON. This package provides CPython bindings for
6889 reading and writing MessagePack data.")
6890 (home-page "https://pypi.python.org/pypi/msgpack/")
6891 (license license:asl2.0)))
6893 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6894 ;; release 0.5. Some packages like borg still call it by the old name for now.
6895 ;; <https://bugs.gnu.org/30662>
6896 (define-public python-msgpack-transitional
6898 (inherit python-msgpack)
6899 (name "python-msgpack-transitional")
6901 (substitute-keyword-arguments (package-arguments python-msgpack)
6903 `(modify-phases ,phases
6904 (add-after 'unpack 'configure-transitional
6906 ;; Keep using the old name.
6907 (substitute* "setup.py"
6908 (("TRANSITIONAL = False")
6909 "TRANSITIONAL = 1"))
6912 (define-public python2-msgpack
6913 (package-with-python2 python-msgpack))
6915 (define-public python-netaddr
6917 (name "python-netaddr")
6922 (uri (pypi-uri "netaddr" version))
6925 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6926 (build-system python-build-system)
6927 (arguments `(#:tests? #f)) ;; No tests.
6928 (home-page "https://github.com/drkjam/netaddr/")
6929 (synopsis "Pythonic manipulation of network addresses")
6931 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6932 and MAC network addresses.")
6933 (license license:bsd-3)))
6935 (define-public python2-netaddr
6936 (package-with-python2 python-netaddr))
6938 (define-public python2-pyroute2
6940 (name "python2-pyroute2")
6945 (uri (pypi-uri "pyroute2" version))
6948 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6949 (build-system python-build-system)
6951 `(#:python ,python-2)) ;Python 3.x is not supported
6952 (home-page "https://github.com/svinota/pyroute2")
6953 (synopsis "Python netlink library")
6955 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6956 Supported netlink families and protocols include:
6958 @item rtnl, network settings - addresses, routes, traffic controls
6959 @item nfnetlink - netfilter API: ipset, nftables, ...
6960 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6961 @item devlink - manage and monitor devlink-enabled hardware
6962 @item generic - generic netlink families
6964 @item nl80211 - wireless functions API (basic support)
6965 @item taskstats - extended process statistics
6966 @item acpi_events - ACPI events monitoring
6967 @item thermal_events - thermal events monitoring
6968 @item VFS_DQUOT - disk quota events monitoring
6971 (license license:gpl2+)))
6973 (define-public python-wrapt
6975 (name "python-wrapt")
6980 (uri (pypi-uri "wrapt" version))
6983 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6984 (build-system python-build-system)
6986 ;; Tests are not included in the tarball, they are only available in the
6989 (home-page "https://github.com/GrahamDumpleton/wrapt")
6990 (synopsis "Module for decorators, wrappers and monkey patching")
6992 "The aim of the wrapt module is to provide a transparent object proxy for
6993 Python, which can be used as the basis for the construction of function
6994 wrappers and decorator functions.")
6995 (license license:bsd-2)))
6997 (define-public python2-wrapt
6998 (package-with-python2 python-wrapt))
7000 (define-public python-xlrd
7002 (name "python-xlrd")
7006 (uri (pypi-uri "xlrd" version))
7009 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7010 (build-system python-build-system)
7013 (modify-phases %standard-phases
7014 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7015 ;; run tests instead for now.
7016 (replace 'check (lambda _ (invoke "nosetests"))))))
7017 (native-inputs `(("python-nose" ,python-nose)))
7018 (home-page "http://www.python-excel.org/")
7019 (synopsis "Library for extracting data from Excel files")
7020 (description "This package provides a library to extract data from
7021 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7022 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7023 Unicode-aware. It is not intended as an end-user tool.")
7024 (license license:bsd-3)))
7026 (define-public python2-xlrd
7027 (package-with-python2 python-xlrd))
7029 (define-public python-prettytable
7031 (name "python-prettytable")
7036 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7039 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7040 (build-system python-build-system)
7041 (home-page "http://code.google.com/p/prettytable/")
7042 (synopsis "Display tabular data in an ASCII table format")
7044 "A library designed to represent tabular data in visually appealing ASCII
7045 tables. PrettyTable allows for selection of which columns are to be printed,
7046 independent alignment of columns (left or right justified or centred) and
7047 printing of sub-tables by specifying a row range.")
7048 (license license:bsd-3)))
7050 (define-public python2-prettytable
7051 (package-with-python2 python-prettytable))
7053 (define-public python-tables
7055 (name "python-tables")
7060 (uri (pypi-uri "tables" version))
7063 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7064 (modules '((guix build utils)))
7067 ;; Remove pre-compiled .pyc files from source.
7068 (for-each delete-file-recursively
7069 (find-files "." "__pycache__" #:directories? #t))
7070 (for-each delete-file (find-files "." "\\.pyc$"))
7072 (build-system python-build-system)
7074 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7075 ;; or "check", so we must override the build and check phases.
7077 (modify-phases %standard-phases
7078 (add-after 'unpack 'use-gcc
7080 (substitute* "setup.py"
7081 (("compiler = new_compiler\\(\\)" line)
7083 "\ncompiler.set_executables(compiler='gcc',"
7084 "compiler_so='gcc',"
7086 "linker_so='gcc -shared')")))
7089 (lambda* (#:key inputs #:allow-other-keys)
7090 (invoke "python" "setup.py" "build"
7091 (string-append "--hdf5="
7092 (assoc-ref inputs "hdf5")))))
7094 (lambda* (#:key inputs #:allow-other-keys)
7095 (invoke "python" "setup.py" "check"
7096 (string-append "--hdf5="
7097 (assoc-ref inputs "hdf5"))))))))
7099 `(("python-numexpr" ,python-numexpr)
7100 ("python-numpy" ,python-numpy)))
7102 `(("python-cython" ,python-cython)
7103 ("pkg-config" ,pkg-config)))
7108 (home-page "http://www.pytables.org/")
7109 (synopsis "Hierarchical datasets for Python")
7110 (description "PyTables is a package for managing hierarchical datasets and
7111 designed to efficiently cope with extremely large amounts of data.")
7112 (license license:bsd-3)))
7114 (define-public python2-tables
7115 (package-with-python2 python-tables))
7117 (define-public python-pyasn1
7119 (name "python-pyasn1")
7124 (uri (pypi-uri "pyasn1" version))
7127 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7128 (build-system python-build-system)
7129 (home-page "http://pyasn1.sourceforge.net/")
7130 (synopsis "ASN.1 types and codecs")
7132 "This is an implementation of ASN.1 types and codecs in Python. It is
7133 suitable for a wide range of protocols based on the ASN.1 specification.")
7134 (license license:bsd-2)))
7136 (define-public python2-pyasn1
7137 (package-with-python2 python-pyasn1))
7139 (define-public python-pyasn1-modules
7141 (name "python-pyasn1-modules")
7146 (uri (pypi-uri "pyasn1-modules" version))
7149 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7150 (build-system python-build-system)
7152 `(("python-pyasn1" ,python-pyasn1)))
7153 (home-page "https://sourceforge.net/projects/pyasn1/")
7154 (synopsis "ASN.1 codec implementations")
7156 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7157 implementations of ASN.1-based codecs and protocols.")
7158 (license license:bsd-3)))
7160 (define-public python2-pyasn1-modules
7161 (package-with-python2 python-pyasn1-modules))
7163 (define-public python-ipaddress
7165 (name "python-ipaddress")
7169 (uri (pypi-uri "ipaddress" version))
7172 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7173 (build-system python-build-system)
7174 (home-page "https://github.com/phihag/ipaddress")
7175 (synopsis "IP address manipulation library")
7177 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7178 in Python. This library is used to create, poke at, and manipulate IPv4 and
7179 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7180 module to older versions of Python.")
7181 (license license:psfl)))
7183 (define-public python2-ipaddress
7184 (package-with-python2 python-ipaddress))
7186 (define-public python2-ipaddr
7188 (name "python2-ipaddr")
7193 (uri (pypi-uri "ipaddr" version))
7195 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7196 (build-system python-build-system)
7198 `(#:python ,python-2 ;version 2 only
7200 (modify-phases %standard-phases
7202 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7203 (home-page "https://github.com/google/ipaddr-py")
7204 (synopsis "IP address manipulation library")
7206 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7207 IPv6 addresses and networks.
7209 For new implementations you may prefer to use the standard module
7210 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7211 versions of Python.")
7212 (license license:asl2.0)))
7214 (define-public python-idna
7216 (name "python-idna")
7221 (uri (pypi-uri "idna" version))
7224 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7225 (build-system python-build-system)
7226 (home-page "https://github.com/kjd/idna")
7227 (synopsis "Internationalized domain names in applications")
7229 "This is a library to support the Internationalised Domain Names in
7230 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7231 protocol is often referred to as “IDNA2008” and can produce different results
7232 from the earlier standard from 2003. The library is also intended to act as a
7233 suitable drop-in replacement for the “encodings.idna” module that comes with
7234 the Python standard library but currently only supports the older 2003
7236 (license license:bsd-4)))
7238 (define-public python2-idna
7239 (package-with-python2 python-idna))
7241 (define-public python-idna-ssl
7243 (name "python-idna-ssl")
7248 (uri (pypi-uri "idna-ssl" version))
7251 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7252 (build-system python-build-system)
7254 `(#:tests? #f)) ;circular dependency with python-aiohttp
7255 (home-page "https://github.com/aio-libs/idna-ssl")
7256 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7257 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7259 (license license:expat)))
7261 (define-public python-pretend
7263 (name "python-pretend")
7268 (uri (pypi-uri "pretend" version))
7271 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7272 (build-system python-build-system)
7273 (home-page "https://github.com/alex/pretend")
7274 (synopsis "Library for stubbing in Python")
7276 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7277 technique for writing tests. You may hear the term mixed up with mocks,
7278 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7279 responses, rather than doing any computation.")
7280 (license license:bsd-3)))
7282 (define-public python2-pretend
7283 (package-with-python2 python-pretend))
7285 (define-public python-pip
7292 (uri (pypi-uri "pip" version))
7295 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7296 (build-system python-build-system)
7298 '(#:tests? #f)) ; there are no tests in the pypi archive.
7299 (home-page "https://pip.pypa.io/")
7300 (synopsis "Package manager for Python software")
7302 "Pip is a package manager for Python software, that finds packages on the
7303 Python Package Index (PyPI).")
7304 (license license:expat)))
7306 (define-public python2-pip
7307 (package-with-python2 python-pip))
7309 (define-public python-tlsh
7311 (name "python-tlsh")
7313 (home-page "https://github.com/trendmicro/tlsh")
7318 (url "https://github.com/trendmicro/tlsh.git")
7319 (commit (string-append "v" version))))
7320 (file-name (git-file-name name version))
7322 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7323 (build-system cmake-build-system)
7325 '(#:out-of-source? #f
7326 #:phases (modify-phases %standard-phases
7329 (lambda* (#:key outputs #:allow-other-keys)
7330 ;; Build and install the Python bindings. The underlying
7331 ;; C++ library is apparently not meant to be installed.
7332 (let ((out (assoc-ref outputs "out")))
7333 (with-directory-excursion "py_ext"
7334 (and (system* "python" "setup.py" "build")
7335 (system* "python" "setup.py" "install"
7336 (string-append "--prefix=" out))))))))))
7337 (inputs `(("python" ,python-wrapper))) ;for the bindings
7338 (synopsis "Fuzzy matching library for Python")
7340 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7341 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7342 value which can be used for similarity comparisons. Similar objects have
7343 similar hash values, which allows for the detection of similar objects by
7344 comparing their hash values. The byte stream should have a sufficient amount
7345 of complexity; for example, a byte stream of identical bytes will not generate
7347 (license license:asl2.0)))
7349 (define-public python2-tlsh
7351 (inherit python-tlsh)
7352 (name "python2-tlsh")
7353 (inputs `(("python" ,python-2)))))
7355 (define-public python-termcolor
7357 (name "python-termcolor")
7362 (uri (pypi-uri "termcolor" version))
7365 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7366 (build-system python-build-system)
7368 ;; There are no tests.
7370 (home-page "https://pypi.python.org/pypi/termcolor")
7371 (synopsis "ANSII Color formatting for terminal output")
7373 "This package provides ANSII Color formatting for output in terminals.")
7374 (license license:expat)))
7376 (define-public python2-termcolor
7377 (package-with-python2 python-termcolor))
7379 (define-public python-libarchive-c
7381 (name "python-libarchive-c")
7385 (uri (pypi-uri "libarchive-c" version))
7388 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7389 (build-system python-build-system)
7391 '(#:phases (modify-phases %standard-phases
7393 'build 'reference-libarchive
7394 (lambda* (#:key inputs #:allow-other-keys)
7395 ;; Retain the absolute file name of libarchive.so.
7396 (let ((libarchive (assoc-ref inputs "libarchive")))
7397 (substitute* "libarchive/ffi.py"
7398 (("find_library\\('archive'\\)")
7399 (string-append "'" libarchive
7400 "/lib/libarchive.so'"))))))
7402 (lambda _ (invoke "pytest" "-vv"))))))
7404 `(("python-mock" ,python-mock)
7405 ("python-pytest" ,python-pytest)))
7407 `(("libarchive" ,libarchive)))
7408 (home-page "https://github.com/Changaco/python-libarchive-c")
7409 (synopsis "Python interface to libarchive")
7411 "This package provides Python bindings to libarchive, a C library to
7412 access possibly compressed archives in many different formats. It uses
7413 Python's @code{ctypes} foreign function interface (FFI).")
7414 (license license:lgpl2.0+)))
7416 (define-public python2-libarchive-c
7417 (package-with-python2 python-libarchive-c))
7419 (define-public python-file
7422 (name "python-file")
7423 (build-system python-build-system)
7425 '(#:tests? #f ;no tests
7426 #:configure-flags '("--single-version-externally-managed" "--root=/")
7427 #:phases (modify-phases %standard-phases
7428 (add-before 'build 'change-directory
7432 (add-before 'build 'set-library-file-name
7433 (lambda* (#:key inputs #:allow-other-keys)
7434 (let ((file (assoc-ref inputs "file")))
7435 (substitute* "magic.py"
7436 (("find_library\\('magic'\\)")
7437 (string-append "'" file "/lib/libmagic.so'")))
7439 (inputs `(("file" ,file)))
7440 (native-inputs (if (%current-target-system)
7441 `(("self" ,this-package))
7443 (synopsis "Python bindings to the libmagic file type guesser. Note that
7444 this module and the python-magic module both provide a \"magic.py\" file;
7445 these two modules, which are different and were developed separately, both
7446 serve the same purpose: provide Python bindings for libmagic.")))
7448 (define-public python2-file
7449 (package-with-python2 python-file))
7451 (define-public python-debian
7453 (name "python-debian")
7454 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7459 (uri (pypi-uri name version))
7462 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7463 (build-system python-build-system)
7465 `(("python-six" ,python-six)))
7466 (synopsis "Debian package related modules")
7468 ;; XXX: Use @enumerate instead of @itemize to work around
7469 ;; <http://bugs.gnu.org/21772>.
7470 "This package provides Python modules that abstract many formats of
7471 Debian-related files, such as:
7474 @item Debtags information;
7475 @item @file{debian/changelog} files;
7476 @item packages files, pdiffs;
7477 @item control files of single or multiple RFC822-style paragraphs---e.g.
7478 @file{debian/control}, @file{.changes}, @file{.dsc};
7479 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7480 contained files and meta-information.
7483 ;; Modules are either GPLv2+ or GPLv3+.
7484 (license license:gpl3+)))
7486 (define-public python2-debian
7487 (package-with-python2 python-debian))
7489 (define-public python-nbformat
7491 (name "python-nbformat")
7496 (uri (pypi-uri "nbformat" version))
7499 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7500 (build-system python-build-system)
7501 (arguments `(#:tests? #f)) ; no test target
7503 `(("python-ipython-genutils" ,python-ipython-genutils)
7504 ("python-jsonschema" ,python-jsonschema)
7505 ("python-jupyter-core" ,python-jupyter-core)
7506 ("python-traitlets" ,python-traitlets)))
7507 (home-page "http://jupyter.org")
7508 (synopsis "Jupyter Notebook format")
7509 (description "This package provides the reference implementation of the
7510 Jupyter Notebook format and Python APIs for working with notebooks.")
7511 (license license:bsd-3)))
7513 (define-public python2-nbformat
7514 (package-with-python2 python-nbformat))
7516 (define-public python-bleach
7518 (name "python-bleach")
7523 (uri (pypi-uri "bleach" version))
7526 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7527 (build-system python-build-system)
7529 `(("python-html5lib" ,python-html5lib-0.9)
7530 ("python-six" ,python-six)))
7532 `(("python-nose" ,python-nose)))
7533 (home-page "https://github.com/jsocol/bleach")
7534 (synopsis "Whitelist-based HTML-sanitizing tool")
7535 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7536 (license license:asl2.0)))
7538 (define-public python2-bleach
7539 (package-with-python2 python-bleach))
7541 (define-public python-entrypoints
7543 (name "python-entrypoints")
7548 (uri (pypi-uri "entrypoints" version))
7551 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7552 (build-system python-build-system)
7553 ;; The package does not come with a setup.py file, so we have to generate
7558 (modify-phases %standard-phases
7559 (add-after 'unpack 'create-setup.py
7561 (call-with-output-file "setup.py"
7564 from setuptools import setup
7565 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7567 (home-page "https://github.com/takluyver/entrypoints")
7568 (synopsis "Discover and load entry points from installed Python packages")
7569 (description "Entry points are a way for Python packages to advertise
7570 objects with some common interface. The most common examples are
7571 @code{console_scripts} entry points, which define shell commands by
7572 identifying a Python function to run. The @code{entrypoints} module contains
7573 functions to find and load entry points.")
7574 (license license:expat)))
7576 (define-public python2-entrypoints
7577 (package-with-python2 python-entrypoints))
7579 (define-public python-nbconvert
7581 (name "python-nbconvert")
7586 (uri (pypi-uri "nbconvert" version))
7589 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7590 (build-system python-build-system)
7592 `(;; The "bdist_egg" target is disabled by default, causing the installation
7594 #:configure-flags (list "bdist_egg")
7595 ;; FIXME: 5 failures, 40 errors.
7598 ;; (modify-phases %standard-phases
7601 ;; (zero? (system* "py.test" "-v")))))
7603 `(("python-pytest" ,python-pytest)))
7605 `(("python-bleach" ,python-bleach)
7606 ("python-entrypoints" ,python-entrypoints)
7607 ("python-jinja2" ,python-jinja2)
7608 ("python-jupyter-core" ,python-jupyter-core)
7609 ("python-mistune" ,python-mistune)
7610 ("python-nbformat" ,python-nbformat)
7611 ("python-pygments" ,python-pygments)
7612 ("python-traitlets" ,python-traitlets)))
7613 (home-page "http://jupyter.org")
7614 (synopsis "Converting Jupyter Notebooks")
7615 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7616 notebooks to various other formats via Jinja templates. It allows you to
7617 convert an @code{.ipynb} notebook file into various static formats including:
7625 @item ReStructured Text (rst)
7626 @item executable script
7628 (license license:bsd-3)))
7630 (define-public python2-nbconvert
7631 (package-with-python2 python-nbconvert))
7633 (define-public python-notebook
7635 (name "python-notebook")
7639 (uri (pypi-uri "notebook" version))
7642 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7643 (build-system python-build-system)
7646 (modify-phases %standard-phases
7649 ;; These tests require a browser
7650 (delete-file-recursively "notebook/tests/selenium")
7651 ;; Some tests need HOME
7652 (setenv "HOME" "/tmp")
7653 ;; This file contains "warningfilters", which are not supported
7654 ;; by this version of nose.
7655 (delete-file "setup.cfg")
7656 (with-directory-excursion "/tmp"
7657 (invoke "nosetests" "-v"))
7660 `(("python-jupyter-core" ,python-jupyter-core)
7661 ("python-nbformat" ,python-nbformat)
7662 ("python-nbconvert" ,python-nbconvert)
7663 ("python-prometheus-client" ,python-prometheus-client)
7664 ("python-send2trash" ,python-send2trash)
7665 ("python-terminado" ,python-terminado)))
7667 `(("python-nose" ,python-nose)
7668 ("python-sphinx" ,python-sphinx)
7669 ("python-requests" ,python-requests)))
7670 (home-page "http://jupyter.org/")
7671 (synopsis "Web-based notebook environment for interactive computing")
7673 "The Jupyter HTML notebook is a web-based notebook environment for
7674 interactive computing.")
7675 (properties `((python2-variant . ,(delay python2-notebook))))
7676 (license license:bsd-3)))
7678 (define-public python2-notebook
7679 (let ((base (package-with-python2
7680 (strip-python2-variant python-notebook))))
7681 (package (inherit base)
7683 `(("python2-mock" ,python2-mock)
7684 ,@(package-native-inputs base)))
7686 (substitute-keyword-arguments (package-arguments base)
7688 `(modify-phases ,phases
7689 (add-before 'check 'disable-test-case
7690 ;; The test requires network access to localhost. Curiously it
7691 ;; fails with Python 2 only. Simply make the test-case return
7695 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7696 (("formats = self.nbconvert_api") "return #")))))))))))
7698 (define-public python-widgetsnbextension
7700 (name "python-widgetsnbextension")
7705 (uri (pypi-uri "widgetsnbextension" version))
7708 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7709 (build-system python-build-system)
7711 `(("python-ipykernel" ,python-ipykernel)
7712 ("python-notebook" ,python-notebook)))
7714 `(("python-certifi" ,python-certifi)
7715 ("python-nose" ,python-nose)))
7716 (home-page "https://ipython.org")
7717 (synopsis "IPython HTML widgets for Jupyter")
7718 (description "This package provides interactive HTML widgets for Jupyter
7720 (license license:bsd-3)))
7722 (define-public python2-widgetsnbextension
7723 (package-with-python2 python-widgetsnbextension))
7725 (define-public python-ipywidgets
7727 (name "python-ipywidgets")
7732 (uri (pypi-uri "ipywidgets" version))
7735 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7736 (build-system python-build-system)
7738 `(("python-ipython" ,python-ipython)
7739 ("python-traitlets" ,python-traitlets)
7740 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7742 `(("python-nose" ,python-nose)
7743 ("python-pytest" ,python-pytest)))
7744 (home-page "https://ipython.org")
7745 (synopsis "IPython HTML widgets for Jupyter")
7746 (description "Ipywidgets are interactive HTML widgets for Jupyter
7747 notebooks and the IPython kernel. Notebooks come alive when interactive
7748 widgets are used. Users gain control of their data and can visualize changes
7750 (license license:bsd-3)))
7752 (define-public python2-ipywidgets
7753 (package-with-python2 python-ipywidgets))
7755 (define-public python-jupyter-console
7757 (name "python-jupyter-console")
7762 (uri (pypi-uri "jupyter_console" version))
7765 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7766 (build-system python-build-system)
7768 `(("python-ipykernel" ,python-ipykernel)
7769 ("python-jupyter-client" ,python-jupyter-client)
7770 ("python-prompt-toolkit" ,python-prompt-toolkit)
7771 ("python-pygments" ,python-pygments)))
7773 `(("python-nose" ,python-nose)))
7774 (home-page "https://jupyter.org")
7775 (synopsis "Jupyter terminal console")
7776 (description "This package provides a terminal-based console frontend for
7777 Jupyter kernels. It also allows for console-based interaction with non-Python
7778 Jupyter kernels such as IJulia and IRKernel.")
7779 (license license:bsd-3)))
7781 (define-public python2-jupyter-console
7783 (name "python2-jupyter-console")
7788 (uri (pypi-uri "jupyter_console" version))
7791 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7792 (build-system python-build-system)
7793 ;; Tests only run in an TTY.
7794 (arguments `(#:tests? #f))
7796 `(("python2-ipykernel" ,python2-ipykernel)
7797 ("python2-jupyter-client" ,python2-jupyter-client)
7798 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7799 ("python2-pygments" ,python2-pygments)))
7801 `(("python2-nose" ,python2-nose)))
7802 (home-page "https://jupyter.org")
7803 (synopsis "Jupyter terminal console")
7804 (description "This package provides a terminal-based console frontend for
7805 Jupyter kernels. It also allows for console-based interaction with non-Python
7806 Jupyter kernels such as IJulia and IRKernel.")
7807 (license license:bsd-3)))
7809 ;; The python-ipython and python-jupyter-console require each other. To get
7810 ;; the functionality in both packages working, strip down the
7811 ;; python-jupyter-console package when using it as an input to python-ipython.
7812 (define python-jupyter-console-minimal
7814 (inherit python-jupyter-console)
7815 (name "python-jupyter-console-minimal")
7817 (substitute-keyword-arguments
7818 (package-arguments python-jupyter-console)
7820 `(modify-phases ,phases
7821 (add-after 'install 'delete-bin
7822 (lambda* (#:key outputs #:allow-other-keys)
7823 ;; Delete the bin files, to avoid conflicts in profiles
7824 ;; where python-ipython and python-jupyter-console are
7826 (delete-file-recursively
7828 (assoc-ref outputs "out") "/bin"))))))))
7829 ;; Remove the python-ipython propagated input, to avoid the cycle
7833 (package-propagated-inputs python-jupyter-console)))))
7835 (define-public python-qtconsole
7837 (name "python-qtconsole")
7842 (uri (pypi-uri "qtconsole" version))
7845 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7846 (build-system python-build-system)
7848 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7849 ;; but we only have the LTS version 5.x. This means that there might be
7850 ;; runtime errors, but since this is a dependency of the Jupyter package,
7851 ;; and Jupyter can be used without the qtconsole we can overlook this for
7855 (modify-phases %standard-phases
7856 (add-before 'check 'pre-check
7858 (setenv "QT_QPA_PLATFORM" "offscreen")
7861 `(("python-ipykernel" ,python-ipykernel)
7862 ("python-ipython" ,python-ipython)))
7864 `(("python-pytest" ,python-pytest)))
7865 (home-page "http://jupyter.org")
7866 (synopsis "Jupyter Qt console")
7867 (description "This package provides a Qt-based console for Jupyter with
7868 support for rich media output.")
7869 (license license:bsd-3)))
7871 (define-public jupyter
7878 (uri (pypi-uri "jupyter" version))
7881 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7882 (build-system python-build-system)
7883 (arguments '(#:tests? #f)) ; there are none.
7885 `(("python-ipykernel" ,python-ipykernel)
7886 ("python-ipywidgets" ,python-ipywidgets)
7887 ("python-jupyter-console" ,python-jupyter-console)
7888 ("python-nbconvert" ,python-nbconvert)
7889 ("python-notebook" ,python-notebook)
7890 ("python-qtconsole" ,python-qtconsole)))
7891 (native-search-paths
7892 (list (search-path-specification
7893 (variable "JUPYTER_PATH")
7894 (files '("share/jupyter")))))
7895 (home-page "https://jupyter.org")
7896 (synopsis "Web application for interactive documents")
7898 "The Jupyter Notebook is a web application that allows you to create and
7899 share documents that contain live code, equations, visualizations and
7900 explanatory text. Uses include: data cleaning and transformation, numerical
7901 simulation, statistical modeling, machine learning and much more.")
7902 (license license:bsd-3)))
7904 (define-public python-chardet
7906 (name "python-chardet")
7911 (uri (pypi-uri "chardet" version))
7914 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7916 `(("python-hypothesis" ,python-hypothesis)
7917 ("python-pytest" ,python-pytest)
7918 ("python-pytest-runner" ,python-pytest-runner)))
7919 (build-system python-build-system)
7920 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7921 (arguments `(#:tests? #f))
7922 (home-page "https://github.com/chardet/chardet")
7923 (synopsis "Universal encoding detector for Python 2 and 3")
7925 "This package provides @code{chardet}, a Python module that can
7926 automatically detect a wide range of file encodings.")
7927 (license license:lgpl2.1+)))
7929 (define-public python2-chardet
7930 (package-with-python2 python-chardet))
7932 (define-public python-docopt
7934 (name "python-docopt")
7939 ;; The release on PyPI does not include tests.
7941 "https://github.com/docopt/docopt/archive/"
7943 (file-name (string-append name "-" version ".tar.gz"))
7946 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7947 (build-system python-build-system)
7949 `(("python-pytest" ,python-pytest)))
7952 (modify-phases %standard-phases
7954 (lambda _ (invoke "py.test"))))))
7955 (home-page "http://docopt.org")
7956 (synopsis "Command-line interface description language for Python")
7957 (description "This library allows the user to define a command-line
7958 interface from a program's help message rather than specifying it
7959 programmatically with command-line parsers like @code{getopt} and
7961 (license license:expat)))
7963 (define-public python2-docopt
7964 (package-with-python2 python-docopt))
7966 (define-public python-pythondialog
7968 (name "python-pythondialog")
7973 (uri (pypi-uri "pythondialog" version))
7976 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7977 (build-system python-build-system)
7980 (modify-phases %standard-phases
7981 (add-after 'unpack 'patch-path
7982 (lambda* (#:key inputs #:allow-other-keys)
7983 (let* ((dialog (assoc-ref inputs "dialog")))
7984 ;; Since this library really wants to grovel the search path, we
7985 ;; must hardcode dialog's store path into it.
7986 (substitute* "dialog.py"
7987 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7988 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7990 #:tests? #f)) ; no test suite
7992 `(("dialog" ,dialog)))
7993 (home-page "http://pythondialog.sourceforge.net/")
7994 (synopsis "Python interface to the UNIX dialog utility")
7995 (description "A Python wrapper for the dialog utility. Its purpose is to
7996 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7997 This allows one to make simple text-mode user interfaces on Unix-like systems")
7998 (license license:lgpl2.1)
7999 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8001 (define-public python2-pythondialog
8002 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8005 (version (package-version python-pythondialog))
8008 (uri (pypi-uri "python2-pythondialog" version))
8011 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8013 (define-public python-configobj
8015 (name "python-configobj")
8019 (uri (pypi-uri "configobj" version))
8022 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8023 ;; Patch setup.py so it looks for python-setuptools, which is
8024 ;; required to parse the keyword 'install_requires' in setup.py.
8025 (patches (search-patches "python-configobj-setuptools.patch"))))
8026 (build-system python-build-system)
8028 `(("python-six" ,python-six)))
8029 (synopsis "Config file reading, writing and validation")
8030 (description "ConfigObj is a simple but powerful config file reader and
8031 writer: an ini file round tripper. Its main feature is that it is very easy to
8032 use, with a straightforward programmer’s interface and a simple syntax for
8034 (home-page "https://github.com/DiffSK/configobj")
8035 (license license:bsd-3)))
8037 (define-public python2-configobj
8038 (package-with-python2 python-configobj))
8040 (define-public python-configargparse
8042 (name "python-configargparse")
8046 (uri (pypi-uri "ConfigArgParse" version))
8049 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8050 (build-system python-build-system)
8052 `(("python-pyyaml" ,python-pyyaml)))
8055 (modify-phases %standard-phases
8058 ;; Bypass setuptools-shim because one test relies on "setup.py"
8059 ;; being the first argument passed to the python call.
8061 ;; NOTE: Many tests do not run because they rely on Python's
8062 ;; built-in test.test_argparse, but we remove the unit tests from
8063 ;; our Python installation.
8064 (invoke "python" "setup.py" "test"))))))
8065 (synopsis "Replacement for argparse")
8066 (description "A drop-in replacement for argparse that allows options to also
8067 be set via config files and/or environment variables.")
8068 (home-page "https://github.com/bw2/ConfigArgParse")
8069 (license license:expat)))
8071 (define-public python2-configargparse
8072 (package-with-python2 python-configargparse))
8074 (define-public python-argparse-manpage
8076 (name "python-argparse-manpage")
8081 (uri (pypi-uri "argparse-manpage" version))
8084 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8085 (build-system python-build-system)
8086 (home-page "https://github.com/praiskup/argparse-manpage")
8087 (synopsis "Build manual page from Python's ArgumentParser object")
8089 "This package provides tools to build manual pages from Python's
8090 @code{ArgumentParser} object.")
8091 (license license:asl2.0)))
8093 (define-public python-contextlib2
8095 (name "python-contextlib2")
8100 (uri (pypi-uri "contextlib2" version))
8103 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8104 (build-system python-build-system)
8105 (home-page "http://contextlib2.readthedocs.org/")
8106 (synopsis "Tools for decorators and context managers")
8107 (description "This module is primarily a backport of the Python
8108 3.2 contextlib to earlier Python versions. Like contextlib, it
8109 provides utilities for common tasks involving decorators and context
8110 managers. It also contains additional features that are not part of
8111 the standard library.")
8112 (license license:psfl)))
8114 (define-public python2-contextlib2
8116 (name "python2-contextlib2")
8121 (uri (pypi-uri "contextlib2" version))
8124 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8125 (build-system python-build-system)
8127 `(#:python ,python-2
8129 (modify-phases %standard-phases
8131 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8133 `(("python2-unittest2" ,python2-unittest2)))
8134 (home-page "http://contextlib2.readthedocs.org/")
8135 (synopsis "Tools for decorators and context managers")
8136 (description "This module is primarily a backport of the Python
8137 3.2 contextlib to earlier Python versions. Like contextlib, it
8138 provides utilities for common tasks involving decorators and context
8139 managers. It also contains additional features that are not part of
8140 the standard library.")
8141 (license license:psfl)))
8143 (define-public python-texttable
8145 (name "python-texttable")
8150 (uri (pypi-uri "texttable" version))
8153 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8154 (build-system python-build-system)
8155 (arguments '(#:tests? #f)) ; no tests
8156 (home-page "https://github.com/foutaise/texttable/")
8157 (synopsis "Python module for creating simple ASCII tables")
8158 (description "Texttable is a Python module for creating simple ASCII
8160 (license license:lgpl2.1+)))
8162 (define-public python2-texttable
8163 (package-with-python2 python-texttable))
8165 (define-public python-atomicwrites
8167 (name "python-atomicwrites")
8171 (uri (pypi-uri "atomicwrites" version))
8174 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8175 (build-system python-build-system)
8176 (synopsis "Atomic file writes in Python")
8177 (description "Library for atomic file writes using platform dependent tools
8178 for atomic file system operations.")
8179 (home-page "https://github.com/untitaker/python-atomicwrites")
8180 (license license:expat)))
8182 (define-public python2-atomicwrites
8183 (package-with-python2 python-atomicwrites))
8185 (define-public python-click-threading
8187 (name "python-click-threading")
8191 (uri (pypi-uri "click-threading" version))
8194 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8195 (build-system python-build-system)
8197 `(("python-click" ,python-click)))
8198 (synopsis "Utilities for multithreading in Click")
8199 (description "This package provides utilities for multithreading in Click
8201 (home-page "https://github.com/click-contrib/click-threading")
8202 (license license:expat)))
8204 (define-public python-click-log
8206 (name "python-click-log")
8210 (uri (pypi-uri "click-log" version))
8213 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8214 (build-system python-build-system)
8216 `(("python-click" ,python-click)))
8217 (synopsis "Logging for click applications")
8218 (description "This package provides a Python library for logging Click
8220 (home-page "https://github.com/click-contrib/click-log")
8221 (license license:expat)))
8223 (define-public python-apipkg
8225 (name "python-apipkg")
8229 (uri (pypi-uri "apipkg" version))
8232 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8233 (build-system python-build-system)
8235 `(("python-pytest" ,python-pytest)))
8236 (synopsis "Namespace control and lazy-import mechanism")
8237 (description "With apipkg you can control the exported namespace of a Python
8238 package and greatly reduce the number of imports for your users. It is a small
8239 pure Python module that works on virtually all Python versions.")
8240 (home-page "https://github.com/pytest-dev/apipkg")
8241 (license license:expat)))
8243 (define-public python2-apipkg
8244 (package-with-python2 python-apipkg))
8246 (define-public python-execnet
8248 (name "python-execnet")
8252 (uri (pypi-uri "execnet" version))
8255 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8256 (build-system python-build-system)
8258 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8259 ;; The two test failures are caused by the lack of an `ssh` executable.
8260 ;; The test suite can be run with pytest after the 'install' phase.
8263 `(("python-pytest" ,python-pytest)
8264 ("python-setuptools-scm" ,python-setuptools-scm)))
8266 `(("python-apipkg" ,python-apipkg)))
8267 (synopsis "Rapid multi-Python deployment")
8268 (description "Execnet provides a share-nothing model with
8269 channel-send/receive communication for distributing execution across many
8270 Python interpreters across version, platform and network barriers. It has a
8271 minimal and fast API targeting the following uses:
8273 @item distribute tasks to (many) local or remote CPUs
8274 @item write and deploy hybrid multi-process applications
8275 @item write scripts to administer multiple environments
8277 (home-page "http://codespeak.net/execnet/")
8278 (license license:expat)))
8280 (define-public python2-execnet
8281 (package-with-python2 python-execnet))
8283 (define-public python-icalendar
8285 (name "python-icalendar")
8289 (uri (pypi-uri "icalendar" version))
8292 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8293 (build-system python-build-system)
8295 `(("python-dateutil" ,python-dateutil)
8296 ("python-pytz" ,python-pytz)))
8297 (synopsis "Python library for parsing iCalendar files")
8298 (description "The icalendar package is a parser/generator of iCalendar
8299 files for use with Python.")
8300 (home-page "https://github.com/collective/icalendar")
8301 (license license:bsd-2)))
8303 (define-public python-args
8305 (name "python-args")
8309 (uri (pypi-uri "args" version))
8312 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8313 (build-system python-build-system)
8314 (home-page "https://github.com/kennethreitz/args")
8315 (synopsis "Command-line argument parser")
8317 "This library provides a Python module to parse command-line arguments.")
8318 (license license:bsd-3)))
8320 (define-public python2-args
8321 (package-with-python2 python-args))
8323 (define-public python-clint
8325 (name "python-clint")
8329 (uri (pypi-uri "clint" version))
8332 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8333 (build-system python-build-system)
8336 (modify-phases %standard-phases
8338 (lambda _ (invoke "py.test" "-v"))))))
8340 `(("python-pytest" ,python-pytest)))
8342 `(("python-args" ,python-args)))
8343 (home-page "https://github.com/kennethreitz/clint")
8344 (synopsis "Command-line interface tools")
8346 "Clint is a Python module filled with a set of tools for developing
8347 command-line applications, including tools for colored and indented
8348 output, progress bar display, and pipes.")
8349 (license license:isc)))
8351 (define-public python2-clint
8352 (package-with-python2 python-clint))
8354 (define-public python-rply
8356 (name "python-rply")
8360 (uri (pypi-uri "rply" version))
8363 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8364 (build-system python-build-system)
8366 `(("python-appdirs" ,python-appdirs)))
8367 (home-page "https://github.com/alex/rply")
8368 (synopsis "Parser generator for Python")
8370 "This package provides a pure Python based parser generator, that also
8371 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8372 with a new public API, and RPython support.")
8373 (license license:bsd-3)))
8375 (define-public python2-rply
8376 (package-with-python2 python-rply))
8378 (define-public python-hy
8384 (uri (pypi-uri "hy" version))
8387 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8388 (build-system python-build-system)
8391 (modify-phases %standard-phases
8394 ;; Tests require write access to HOME.
8395 (setenv "HOME" "/tmp")
8396 (invoke "nosetests"))))))
8398 `(("python-coverage" ,python-coverage)
8399 ("python-nose" ,python-nose)))
8401 `(("python-astor" ,python-astor)
8402 ("python-clint" ,python-clint)
8403 ("python-rply" ,python-rply)))
8404 (home-page "http://hylang.org/")
8405 (synopsis "Lisp frontend to Python")
8407 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8408 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8409 Python at your fingertips, in Lisp form.")
8410 (license license:expat)))
8412 (define-public python2-hy
8413 (package-with-python2 python-hy))
8415 (define-public python2-functools32
8417 (name "python2-functools32")
8422 (uri (pypi-uri "functools32" version))
8425 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8426 (build-system python-build-system)
8428 `(#:python ,python-2
8429 #:tests? #f)) ; no test target
8430 (home-page "https://github.com/MiCHiLU/python-functools32")
8432 "Backport of the functools module from Python 3.2.3")
8434 "This package is a backport of the @code{functools} module from Python
8435 3.2.3 for use with older versions of Python and PyPy.")
8436 (license license:expat)))
8438 (define-public python2-subprocess32
8440 (name "python2-subprocess32")
8444 (uri (pypi-uri "subprocess32" version))
8447 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8449 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8450 (build-system python-build-system)
8452 `(#:python ,python-2
8453 ;; The test suite fails with Python > 2.7.13:
8454 ;; import test.support
8455 ;; ImportError: No module named support
8458 (modify-phases %standard-phases
8459 (add-after 'unpack 'patch-/bin/sh
8461 (substitute* '("subprocess32.py"
8462 "test_subprocess32.py")
8463 (("/bin/sh") (which "sh")))
8465 (home-page "https://github.com/google/python-subprocess32")
8466 (synopsis "Backport of the subprocess module from Python 3.2")
8468 "This is a backport of the @code{subprocess} standard library module
8469 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8470 new features. On POSIX systems it is guaranteed to be reliable when used
8471 in threaded applications. It includes timeout support from Python 3.3 but
8472 otherwise matches 3.2’s API.")
8473 (license license:psfl)))
8475 (define-public python2-futures
8477 (name "python2-futures")
8482 (uri (pypi-uri "futures" version))
8485 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8486 (build-system python-build-system)
8488 `(#:python ,python-2
8490 (modify-phases %standard-phases
8493 (invoke "python" "test_futures.py")
8495 (home-page "https://github.com/agronholm/pythonfutures")
8497 "Backport of the concurrent.futures package from Python 3.2")
8499 "The concurrent.futures module provides a high-level interface for
8500 asynchronously executing callables. This package backports the
8501 concurrent.futures package from Python 3.2")
8502 (license license:bsd-3)))
8504 (define-public python-promise
8506 (name "python-promise")
8511 (uri (pypi-uri "promise" version))
8514 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8515 (build-system python-build-system)
8516 ;; Tests wants python-futures, which is a python2 only program, and
8517 ;; can't be found by python-promise at test time.
8518 (arguments `(#:tests? #f))
8519 (home-page "https://github.com/syrusakbary/promise")
8520 (synopsis "Promises/A+ implementation for Python")
8522 "Promises/A+ implementation for Python")
8523 (properties `((python2-variant . ,(delay python2-promise))))
8524 (license license:expat)))
8526 (define-public python2-promise
8527 (let ((promise (package-with-python2
8528 (strip-python2-variant python-promise))))
8529 (package (inherit promise)
8530 (arguments (substitute-keyword-arguments (package-arguments promise)
8533 `(("python2-futures" ,python2-futures)
8534 ("python2-pytest" ,python2-pytest)
8535 ,@(package-native-inputs promise))))))
8537 (define-public python-colorama
8539 (name "python-colorama")
8544 (uri (pypi-uri "colorama" version))
8547 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8548 (build-system python-build-system)
8549 (synopsis "Colored terminal text rendering for Python")
8550 (description "Colorama is a Python library for rendering colored terminal
8552 (home-page "https://pypi.python.org/pypi/colorama")
8553 (license license:bsd-3)))
8555 (define-public python2-colorama
8556 (package-with-python2 python-colorama))
8558 (define-public python-rsa
8565 (uri (pypi-uri "rsa" version))
8568 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8569 (build-system python-build-system)
8571 `(("python-pyasn1" ,python-pyasn1)))
8572 (synopsis "Pure-Python RSA implementation")
8573 (description "Python-RSA is a pure-Python RSA implementation. It supports
8574 encryption and decryption, signing and verifying signatures, and key
8575 generation according to PKCS#1 version 1.5. It can be used as a Python
8576 library as well as on the command line.")
8577 (home-page "https://stuvel.eu/rsa")
8578 (license license:asl2.0)))
8580 (define-public python2-rsa
8581 (package-with-python2 python-rsa))
8583 (define-public python-pluggy
8585 (name "python-pluggy")
8590 (uri (pypi-uri "pluggy" version))
8593 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8594 (build-system python-build-system)
8596 `(("python-setuptools-scm" ,python-setuptools-scm)))
8597 (synopsis "Plugin and hook calling mechanism for Python")
8598 (description "Pluggy is an extraction of the plugin manager as used by
8599 Pytest but stripped of Pytest specific details.")
8600 (home-page "https://pypi.python.org/pypi/pluggy")
8601 (license license:expat)))
8603 (define-public python2-pluggy
8604 (package-with-python2 python-pluggy))
8606 (define-public python-tox
8613 (uri (pypi-uri "tox" version))
8616 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8617 (build-system python-build-system)
8619 ;; FIXME: Tests require pytest-timeout, which itself requires
8620 ;; pytest>=2.8.0 for installation.
8623 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8624 ("python-py" ,python-py)
8625 ("python-virtualenv" ,python-virtualenv)))
8627 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8628 ("python-pytest" ,python-pytest) ; >= 2.3.5
8629 ("python-setuptools-scm" ,python-setuptools-scm)))
8630 (home-page "http://tox.testrun.org/")
8631 (synopsis "Virtualenv-based automation of test activities")
8632 (description "Tox is a generic virtualenv management and test command line
8633 tool. It can be used to check that a package installs correctly with
8634 different Python versions and interpreters, or run tests in each type of
8635 supported environment, or act as a frontend to continuous integration
8637 (license license:expat)))
8639 (define-public python2-tox
8640 (package-with-python2 python-tox))
8642 (define-public python-jmespath
8644 (name "python-jmespath")
8649 (uri (pypi-uri "jmespath" version))
8652 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8653 (build-system python-build-system)
8655 `(("python-nose" ,python-nose)))
8656 (synopsis "JSON Matching Expressions")
8657 (description "JMESPath (pronounced “james path”) is a Python library that
8658 allows one to declaratively specify how to extract elements from a JSON
8660 (home-page "https://github.com/jmespath/jmespath.py")
8661 (license license:expat)))
8663 (define-public python2-jmespath
8664 (package-with-python2 python-jmespath))
8666 (define-public python-botocore
8668 (name "python-botocore")
8669 (version "1.12.149")
8673 (uri (pypi-uri "botocore" version))
8676 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8677 (build-system python-build-system)
8679 ;; FIXME: Many tests are failing.
8682 `(("python-dateutil" ,python-dateutil)
8683 ("python-docutils" ,python-docutils)
8684 ("python-jmespath" ,python-jmespath)))
8686 `(("python-mock" ,python-mock)
8687 ("python-nose" ,python-nose)
8689 ("python-tox" ,python-tox)
8690 ("python-urllib3" ,python-urllib3)
8691 ("python-wheel" ,python-wheel)))
8692 (home-page "https://github.com/boto/botocore")
8693 (synopsis "Low-level interface to AWS")
8694 (description "Botocore is a Python library that provides a low-level
8695 interface to the Amazon Web Services (AWS) API.")
8696 (license license:asl2.0)))
8698 (define-public python2-botocore
8699 (package-with-python2 python-botocore))
8701 (define-public python-xdo
8708 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8709 "python-xdo_" version ".orig.tar.gz"))
8712 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8713 (build-system python-build-system)
8716 (modify-phases %standard-phases
8717 (add-before 'install 'patch-libxdo-path
8718 ;; Hardcode the path of dynamically loaded libxdo library.
8719 (lambda* (#:key inputs #:allow-other-keys)
8720 (let ((libxdo (string-append
8721 (assoc-ref inputs "xdotool")
8723 (substitute* "xdo/_xdo.py"
8724 (("find_library\\(\"xdo\"\\)")
8725 (simple-format #f "\"~a\"" libxdo)))
8727 #:tests? #f)) ; no tests provided
8729 `(("python-six" ,python-six)))
8731 `(("xdotool" ,xdotool)
8732 ("libX11" ,libx11)))
8733 (home-page "https://tracker.debian.org/pkg/python-xdo")
8734 (synopsis "Python library for simulating X11 keyboard/mouse input")
8735 (description "Provides bindings to libxdo for manipulating X11 via simulated
8736 input. (Note that this is mostly a legacy library; you may wish to look at
8737 python-xdo for newer bindings.)")
8738 (license license:bsd-3)))
8740 (define-public python2-xdo
8741 (package-with-python2 python-xdo))
8743 (define-public python-mako
8745 (name "python-mako")
8750 (uri (pypi-uri "Mako" version))
8753 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8754 (build-system python-build-system)
8756 `(("python-markupsafe" ,python-markupsafe)))
8758 `(("python-mock" ,python-mock)
8759 ("python-nose" ,python-nose)
8760 ("python-pytest" ,python-pytest)))
8761 (home-page "https://www.makotemplates.org/")
8762 (synopsis "Templating language for Python")
8763 (description "Mako is a templating language for Python that compiles
8764 templates into Python modules.")
8765 (license license:expat)))
8767 (define-public python2-mako
8768 (package-with-python2 python-mako))
8770 (define-public python-waitress
8772 (name "python-waitress")
8777 (uri (pypi-uri "waitress" version))
8778 (patches (search-patches "python-waitress-fix-tests.patch"))
8781 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8782 (build-system python-build-system)
8783 (home-page "https://github.com/Pylons/waitress")
8784 (synopsis "Waitress WSGI server")
8785 (description "Waitress is meant to be a production-quality pure-Python WSGI
8786 server with very acceptable performance.")
8787 (license license:zpl2.1)))
8789 (define-public python2-waitress
8790 (package-with-python2 python-waitress))
8792 (define-public python-pyquery
8794 (name "python-pyquery")
8799 (uri (pypi-uri "pyquery" version))
8802 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8803 (build-system python-build-system)
8805 `(("python-webob" ,python-webob)
8806 ("python-webtest" ,python-webtest)))
8808 `(("python-lxml" ,python-lxml)
8809 ("python-cssselect" ,python-cssselect)))
8810 (home-page "https://github.com/gawel/pyquery")
8811 (synopsis "Make jQuery-like queries on xml documents")
8812 (description "pyquery allows you to make jQuery queries on xml documents.
8813 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8814 fast xml and html manipulation.")
8815 (license license:bsd-3)))
8817 (define-public python-anyjson
8819 (name "python-anyjson")
8824 (uri (pypi-uri "anyjson" version))
8827 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8828 (build-system python-build-system)
8830 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8831 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8832 ;; whatever) so this transformation needs to be done before the tests
8833 ;; can be run. Maybe we could add a build step to transform beforehand
8834 ;; but it could be annoying/difficult.
8835 ;; We can enable tests for the Python 2 version, though, and do below.
8837 (home-page "https://bitbucket.org/runeh/anyjson/")
8839 "Wraps best available JSON implementation in a common interface")
8841 "Anyjson loads whichever is the fastest JSON module installed
8842 and provides a uniform API regardless of which JSON implementation is used.")
8843 (license license:bsd-3)
8844 (properties `((python2-variant . ,(delay python2-anyjson))))))
8846 (define-public python2-anyjson
8847 (let ((anyjson (package-with-python2
8848 (strip-python2-variant python-anyjson))))
8851 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8853 ,@(package-arguments anyjson)))
8854 (native-inputs `(("python2-nose" ,python2-nose))))))
8856 (define-public python-amqp
8858 (name "python-amqp")
8863 (uri (pypi-uri "amqp" version))
8866 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8867 (build-system python-build-system)
8869 `(("python-case" ,python-case)
8870 ("python-pytest-sugar" ,python-pytest-sugar)
8871 ("python-mock" ,python-mock)))
8873 `(("python-vine" ,python-vine)))
8874 (home-page "https://github.com/celery/py-amqp")
8876 "Low-level AMQP client for Python (fork of amqplib)")
8878 "This is a fork of amqplib which was originally written by Barry Pederson.
8879 It is maintained by the Celery project, and used by kombu as a pure python
8880 alternative when librabbitmq is not available.")
8881 (license license:lgpl2.1+)
8882 (properties `((python2-variant . ,(delay python2-amqp))))))
8884 (define-public python2-amqp
8885 (let ((amqp (package-with-python2
8886 (strip-python2-variant python-amqp))))
8889 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8890 ;; unmaintained. Weirdly, does not do this on the python 3
8893 ,@(package-arguments amqp))))))
8895 (define-public python-txamqp
8897 (name "python-txamqp")
8902 (uri (pypi-uri "txAMQP" version))
8905 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8906 (build-system python-build-system)
8908 `(("python-six" ,python-six)
8909 ("python-twisted" ,python-twisted)))
8910 (home-page "https://github.com/txamqp/txamqp")
8911 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8913 "This package provides a Python library for communicating with AMQP peers
8914 and brokers using the asynchronous networking framework Twisted. It contains
8915 all the necessary code to connect, send and receive messages to/from an
8916 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8917 also includes support for using Thrift RPC over AMQP in Twisted
8919 (license license:asl2.0)))
8921 (define-public python2-txamqp
8922 (package-with-python2 python-txamqp))
8924 (define-public python-kombu
8926 (name "python-kombu")
8931 (uri (pypi-uri "kombu" version))
8934 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8935 (build-system python-build-system)
8937 `(("python-mock" ,python-mock)
8938 ("python-case" ,python-case)
8939 ("python-pyro4" ,python-pyro4)
8940 ("python-pytest-sugar" ,python-pytest-sugar)
8941 ("python-pytz" ,python-pytz)))
8943 `(("python-anyjson" ,python-anyjson)
8944 ("python-amqp" ,python-amqp)
8945 ("python-redis" ,python-redis)))
8946 (home-page "https://kombu.readthedocs.io")
8947 (synopsis "Message passing library for Python")
8948 (description "The aim of Kombu is to make messaging in Python as easy as
8949 possible by providing an idiomatic high-level interface for the AMQ protocol,
8950 and also provide proven and tested solutions to common messaging problems.
8951 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8952 message orientation, queuing, routing, reliability and security, for which the
8953 RabbitMQ messaging server is the most popular implementation.")
8954 (license license:bsd-3)
8955 (properties `((python2-variant . ,(delay python2-kombu))))))
8957 (define-public python2-kombu
8958 (let ((kombu (package-with-python2
8959 (strip-python2-variant python-kombu))))
8962 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8963 ;; It works fine on the python3 variant.
8965 ,@(package-arguments kombu)))
8966 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8967 ,@(package-native-inputs kombu))))))
8969 (define-public python-billiard
8971 (name "python-billiard")
8976 (uri (pypi-uri "billiard" version))
8979 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8980 (build-system python-build-system)
8982 `(("python-case" ,python-case)
8983 ("python-pytest" ,python-pytest)))
8984 (home-page "https://github.com/celery/billiard")
8986 "Python multiprocessing fork with improvements and bugfixes")
8988 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8989 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8990 pyprocessing package. This standalone variant is intended to be compatible with
8991 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8992 (license license:bsd-3)
8993 (properties `((python2-variant . ,(delay python2-billiard))))))
8995 (define-public python2-billiard
8996 (let ((billiard (package-with-python2
8997 (strip-python2-variant python-billiard))))
9000 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9001 ("python2-mock" ,python2-mock)
9002 ,@(package-native-inputs billiard))))))
9004 (define-public python-celery
9006 (name "python-celery")
9011 (uri (pypi-uri "celery" version))
9014 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9015 (build-system python-build-system)
9017 '(;; TODO The tests fail with Python 3.7
9018 ;; https://github.com/celery/celery/issues/4849
9021 (modify-phases %standard-phases
9022 (add-after 'unpack 'patch-requirements
9024 (substitute* "requirements/test.txt"
9025 (("pytest>=3\\.0,<3\\.3")
9029 `(("python-case" ,python-case)
9030 ("python-pytest" ,python-pytest)))
9032 `(("python-pytz" ,python-pytz)
9033 ("python-billiard" ,python-billiard)
9034 ("python-kombu" ,python-kombu)))
9035 (home-page "https://celeryproject.org")
9036 (synopsis "Distributed Task Queue")
9037 (description "Celery is an asynchronous task queue/job queue based on
9038 distributed message passing. It is focused on real-time operation, but
9039 supports scheduling as well. The execution units, called tasks, are executed
9040 concurrently on a single or more worker servers using multiprocessing,
9041 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9042 synchronously (wait until ready).")
9043 (license license:bsd-3)
9044 (properties `((python2-variant . ,(delay python2-celery))))))
9046 (define-public python2-celery
9047 (let ((celery (package-with-python2
9048 (strip-python2-variant python-celery))))
9051 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9052 ("python2-mock" ,python2-mock)
9053 ,@(package-native-inputs celery))))))
9055 (define-public python-translitcodec
9057 (name "python-translitcodec")
9062 (uri (pypi-uri "translitcodec" version))
9065 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9066 (build-system python-build-system)
9068 `(#:tests? #f)) ; no tests provided
9070 "https://github.com/claudep/translitcodec")
9072 "Unicode to 8-bit charset transliteration codec")
9074 "This package contains codecs for transliterating ISO 10646 texts into
9075 best-effort representations using smaller coded character sets (ASCII,
9077 (license license:expat)))
9079 (define-public python2-translitcodec
9080 (package-with-python2 python-translitcodec))
9082 (define-public python-editor
9084 (name "python-editor")
9089 (uri (pypi-uri "python-editor" version))
9092 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9093 (build-system python-build-system)
9095 "https://github.com/fmoo/python-editor")
9097 "Programmatically open an editor, capture the result")
9099 "python-editor is a library that provides the editor module for
9100 programmatically interfacing with your system's $EDITOR.")
9101 (license license:asl2.0)))
9103 (define-public python2-editor
9104 (package-with-python2 python-editor))
9106 (define-public python-vobject
9108 (name "python-vobject")
9112 (uri (pypi-uri "vobject" version))
9115 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9116 (build-system python-build-system)
9118 '(;; The test suite relies on some non-portable Windows interfaces.
9121 `(("python-dateutil" ,python-dateutil)
9122 ("python-pyicu" ,python-pyicu)))
9123 (synopsis "Parse and generate vCard and vCalendar files")
9124 (description "Vobject is intended to be a full featured Python package for
9125 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9126 are supported and well tested. vCard 3.0 files are supported, and all data
9127 should be imported, but only a few components are understood in a sophisticated
9129 (home-page "http://eventable.github.io/vobject/")
9130 (license license:asl2.0)))
9132 (define-public python2-vobject
9133 (package-with-python2 python-vobject))
9135 (define-public python-munkres
9137 (name "python-munkres")
9141 (uri (pypi-uri "munkres" version))
9144 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9145 (build-system python-build-system)
9147 '(#:tests? #f)) ; no test suite
9148 (home-page "http://software.clapper.org/munkres/")
9149 (synopsis "Implementation of the Munkres algorithm")
9150 (description "The Munkres module provides an implementation of the Munkres
9151 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9152 useful for solving the Assignment Problem.")
9153 (license license:bsd-3)))
9155 (define-public python2-munkres
9156 (package-with-python2 python-munkres))
9158 (define-public python-whoosh
9160 (name "python-whoosh")
9165 (uri (pypi-uri "Whoosh" version))
9168 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9169 (build-system python-build-system)
9171 `(("python-pytest" ,python-pytest)))
9172 (home-page "https://bitbucket.org/mchaput/whoosh")
9173 (synopsis "Full text indexing, search, and spell checking library")
9175 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9177 (license license:bsd-2)))
9179 (define-public python2-whoosh
9180 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9181 (package (inherit whoosh)
9183 `(("python2-backport-ssl-match-hostname"
9184 ,python2-backport-ssl-match-hostname)
9185 ,@(package-propagated-inputs whoosh))))))
9187 (define-public python-pathlib
9189 (name "python-pathlib")
9193 (uri (pypi-uri "pathlib" version))
9196 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9197 (build-system python-build-system)
9198 ;; The tests depend on the internal "test" module, which does not provide
9199 ;; a stable interface.
9200 (arguments `(#:tests? #f))
9201 (home-page "https://pathlib.readthedocs.org/")
9202 (synopsis "Object-oriented file system paths")
9203 (description "Pathlib offers a set of classes to handle file system paths.
9204 It offers the following advantages over using string objects:
9207 @item No more cumbersome use of os and os.path functions. Everything can
9208 be done easily through operators, attribute accesses, and method calls.
9209 @item Embodies the semantics of different path types. For example,
9210 comparing Windows paths ignores casing.
9211 @item Well-defined semantics, eliminating any inconsistencies or
9212 ambiguities (forward vs. backward slashes, etc.).
9215 Note: In Python 3.4, pathlib is now part of the standard library. For other
9216 Python versions please consider python-pathlib2 instead, which tracks the
9217 standard library module. This module (python-pathlib) isn't maintained
9219 (license license:expat)))
9221 (define-public python2-pathlib
9222 (package-with-python2 python-pathlib))
9224 (define-public python2-pathlib2
9226 (name "python2-pathlib2")
9230 (uri (pypi-uri "pathlib2" version))
9233 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9234 (build-system python-build-system)
9235 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9236 ;; version is 3.4 which already includes this package as part of the
9237 ;; standard library.
9239 `(#:python ,python-2))
9241 `(("python2-scandir" ,python2-scandir)
9242 ("python2-six" ,python2-six)))
9243 (home-page "https://pypi.python.org/pypi/pathlib2/")
9244 (synopsis "Object-oriented file system paths - backport of standard
9246 (description "The goal of pathlib2 is to provide a backport of standard
9247 pathlib module which tracks the standard library module, so all the newest
9248 features of the standard pathlib can be used also on older Python versions.
9250 Pathlib offers a set of classes to handle file system paths. It offers the
9251 following advantages over using string objects:
9254 @item No more cumbersome use of os and os.path functions. Everything can
9255 be done easily through operators, attribute accesses, and method calls.
9256 @item Embodies the semantics of different path types. For example,
9257 comparing Windows paths ignores casing.
9258 @item Well-defined semantics, eliminating any inconsistencies or
9259 ambiguities (forward vs. backward slashes, etc.).
9261 (license license:expat)))
9263 (define-public python2-pathlib2-bootstrap
9266 (inherit python2-pathlib2)
9267 (name "python2-pathlib2-bootstrap")
9269 `(("python2-scandir" ,python2-scandir)
9270 ("python2-six" ,python2-six-bootstrap))))))
9272 (define-public python-jellyfish
9274 (name "python-jellyfish")
9278 (uri (pypi-uri "jellyfish" version))
9281 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9282 (build-system python-build-system)
9284 `(("python-pytest" ,python-pytest)))
9285 (home-page "https://github.com/jamesturk/jellyfish")
9286 (synopsis "Approximate and phonetic matching of strings")
9287 (description "Jellyfish uses a variety of string comparison and phonetic
9288 encoding algorithms to do fuzzy string matching.")
9289 (license license:bsd-2)
9290 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9292 (define-public python2-jellyfish
9293 (let ((jellyfish (package-with-python2
9294 (strip-python2-variant python-jellyfish))))
9295 (package (inherit jellyfish)
9296 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9297 ,@(package-native-inputs jellyfish))))))
9299 (define-public python2-unicodecsv
9301 (name "python2-unicodecsv")
9305 ;; The test suite is not included in the PyPi release.
9306 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9307 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9308 "archive/" version ".tar.gz"))
9309 (file-name (string-append name "-" version ".tar.gz"))
9312 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9313 (build-system python-build-system)
9315 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9316 #:python ,python-2))
9318 `(("python2-unittest2" ,python2-unittest2)))
9319 (home-page "https://github.com/jdunck/python-unicodecsv")
9320 (synopsis "Unicode CSV module for Python 2")
9321 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9322 module, adding support for Unicode strings.")
9323 (license license:bsd-2)))
9325 (define-public python-rarfile
9327 (name "python-rarfile")
9331 (uri (pypi-uri "rarfile" version))
9334 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9335 (build-system python-build-system)
9338 (modify-phases %standard-phases
9340 ;; Many tests fail, but the installation proceeds.
9341 (lambda _ (invoke "make" "-C" "test" "test"))))))
9343 `(("which" ,which))) ; required for tests
9345 `(("libarchive" ,libarchive)))
9346 (home-page "https://github.com/markokr/rarfile")
9347 (synopsis "RAR archive reader for Python")
9348 (description "This is Python module for RAR archive reading. The interface
9349 is made as zipfile like as possible.")
9350 (license license:isc)))
9352 (define-public python2-rarfile
9353 (package-with-python2 python-rarfile))
9355 (define-public python-magic
9357 (name "python-magic")
9362 (uri (pypi-uri "python-magic" version))
9365 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9366 (file-name (string-append name "-" version "-checkout"))))
9367 (build-system python-build-system)
9369 ;; The tests are unreliable, so don't run them. The tests fail
9370 ;; under Python3 because they were written for Python2 and
9371 ;; contain import statements that do not work in Python3. One of
9372 ;; the tests fails under Python2 because its assertions are
9373 ;; overly stringent; it relies on comparing output strings which
9374 ;; are brittle and can change depending on the version of
9375 ;; libmagic being used and the system on which the test is
9376 ;; running. In my case, under GuixSD 0.10.0, only one test
9377 ;; failed, and it seems to have failed only because the version
9378 ;; of libmagic that is packaged in Guix outputs a slightly
9379 ;; different (but not wrong) string than the one that the test
9382 #:phases (modify-phases %standard-phases
9383 ;; Replace a specific method call with a hard-coded
9384 ;; path to the necessary libmagic.so file in the
9385 ;; store. If we don't do this, then the method call
9386 ;; will fail to find the libmagic.so file, which in
9387 ;; turn will cause any application using
9388 ;; python-magic to fail.
9389 (add-before 'build 'hard-code-path-to-libmagic
9390 (lambda* (#:key inputs #:allow-other-keys)
9391 (let ((file (assoc-ref inputs "file")))
9392 (substitute* "magic.py"
9393 (("ctypes.util.find_library\\('magic'\\)")
9394 (string-append "'" file "/lib/libmagic.so'")))
9396 (add-before 'install 'disable-egg-compression
9398 (let ((port (open-file "setup.cfg" "a")))
9399 (display "\n[easy_install]\nzip_ok = 0\n"
9404 ;; python-magic needs to be able to find libmagic.so.
9407 "https://github.com/ahupp/python-magic")
9409 "File type identification using libmagic")
9411 "This module uses ctypes to access the libmagic file type
9412 identification library. It makes use of the local magic database and
9413 supports both textual and MIME-type output. Note that this module and
9414 the python-file module both provide a \"magic.py\" file; these two
9415 modules, which are different and were developed separately, both serve
9416 the same purpose: to provide Python bindings for libmagic.")
9417 (license license:expat)))
9419 (define-public python2-magic
9420 (package-with-python2 python-magic))
9422 (define-public python2-s3cmd
9424 (name "python2-s3cmd")
9429 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9430 "s3cmd-" version ".tar.gz"))
9433 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9434 (build-system python-build-system)
9436 ;; s3cmd is written for python2 only and contains no tests.
9437 `(#:python ,python-2
9440 `(("python2-dateutil" ,python2-dateutil)
9441 ;; The python-file package also provides a magic.py module.
9442 ;; This is an unfortunate state of affairs; however, s3cmd
9443 ;; fails to install if it cannot find specifically the
9444 ;; python-magic package. Thus we include it, instead of using
9445 ;; python-file. Ironically, s3cmd sometimes works better
9446 ;; without libmagic bindings at all:
9447 ;; https://github.com/s3tools/s3cmd/issues/198
9448 ("python2-magic" ,python2-magic)))
9449 (home-page "http://s3tools.org/s3cmd")
9450 (synopsis "Command line tool for S3-compatible storage services")
9452 "S3cmd is a command line tool for uploading, retrieving and managing data
9453 in storage services that are compatible with the Amazon Simple Storage
9454 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9455 GnuPG encryption, and more. It also supports management of Amazon's
9456 CloudFront content delivery network.")
9457 (license license:gpl2+)))
9459 (define-public python-pkgconfig
9461 (name "python-pkgconfig")
9466 (uri (pypi-uri "pkgconfig" version))
9469 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9470 (build-system python-build-system)
9472 `(("python-nose" ,python-nose)))
9474 `(("pkg-config" ,pkg-config)))
9477 (modify-phases %standard-phases
9478 (add-before 'build 'patch
9479 ;; Hard-code the path to pkg-config.
9481 (substitute* "pkgconfig/pkgconfig.py"
9482 (("cmd = 'pkg-config")
9483 (string-append "cmd = '" (which "pkg-config"))))
9487 (invoke "nosetests" "test.py"))))))
9488 (home-page "https://github.com/matze/pkgconfig")
9489 (synopsis "Python interface for pkg-config")
9490 (description "This module provides a Python interface to pkg-config. It
9491 can be used to find all pkg-config packages, check if a package exists,
9492 check if a package meets certain version requirements, query CFLAGS and
9493 LDFLAGS and parse the output to build extensions with setup.py.")
9494 (license license:expat)))
9496 (define-public python2-pkgconfig
9497 (package-with-python2 python-pkgconfig))
9499 (define-public python-bz2file
9501 (name "python-bz2file")
9506 (uri (pypi-uri "bz2file" version))
9509 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9510 (build-system python-build-system)
9512 `(#:tests? #f)) ; Tests use deprecated python modules.
9513 (home-page "https://github.com/nvawda/bz2file")
9514 (synopsis "Read and write bzip2-compressed files")
9516 "Bz2file is a Python library for reading and writing bzip2-compressed
9517 files. It contains a drop-in replacement for the I/O interface in the
9518 standard library's @code{bz2} module, including features from the latest
9519 development version of CPython that are not available in older releases.")
9520 (license license:asl2.0)))
9522 (define-public python2-bz2file
9523 (package-with-python2 python-bz2file))
9525 (define-public python-future
9527 (name "python-future")
9532 (uri (pypi-uri "future" version))
9535 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9536 (build-system python-build-system)
9537 ;; Many tests connect to the network or are otherwise flawed.
9538 ;; https://github.com/PythonCharmers/python-future/issues/210
9541 (home-page "http://python-future.org")
9542 (synopsis "Single-source support for Python 3 and 2")
9544 "@code{python-future} is the missing compatibility layer between Python 2 and
9545 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9546 to support both Python 2 and Python 3 with minimal overhead.")
9547 (license license:expat)))
9549 (define-public python2-future
9550 (package-with-python2 python-future))
9552 (define-public python-cysignals
9554 (name "python-cysignals")
9559 (uri (pypi-uri "cysignals" version))
9562 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9563 (build-system python-build-system)
9565 `(("python-cython" ,python-cython)
9566 ("python-sphinx" ,python-sphinx)))
9568 `(("pari-gp" ,pari-gp)))
9570 `(#:modules ((guix build python-build-system)
9571 ((guix build gnu-build-system) #:prefix gnu:)
9573 ;; FIXME: Tests are executed after installation and currently fail
9574 ;; when not installing into standard locations; the author is working
9578 (modify-phases %standard-phases
9581 (assoc-ref gnu:%standard-phases 'configure)))))
9583 "https://github.com/sagemath/cysignals")
9585 "Handling of interrupts and signals for Cython")
9587 "The cysignals package provides mechanisms to handle interrupts (and
9588 other signals and errors) in Cython code, using two related approaches,
9589 for mixed Cython/Python code or external C libraries and pure Cython code,
9591 (license license:lgpl3+)))
9593 (define-public python2-cysignals
9594 (package-with-python2 python-cysignals))
9596 (define-public python2-shedskin
9598 (name "python2-shedskin")
9603 (uri (string-append "https://github.com/shedskin/shedskin/"
9604 "releases/download/v" version
9605 "/shedskin-" version ".tgz"))
9608 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9609 (build-system python-build-system)
9611 `(#:python ,python-2
9612 #:phases (modify-phases %standard-phases
9613 (add-after 'unpack 'fix-resulting-include-libs
9614 (lambda* (#:key inputs #:allow-other-keys)
9615 (let ((libgc (assoc-ref inputs "libgc"))
9616 (pcre (assoc-ref inputs "pcre")))
9617 (substitute* "shedskin/makefile.py"
9618 (("variable == 'CCFLAGS':[ ]*")
9619 (string-append "variable == 'CCFLAGS':\n"
9620 " line += ' -I " pcre "/include"
9621 " -I " libgc "/include'"))
9622 (("variable == 'LFLAGS':[ ]*")
9623 (string-append "variable == 'LFLAGS':\n"
9624 " line += ' -L" pcre "/lib"
9625 " -L " libgc "/lib'")))
9627 (inputs `(("pcre" ,pcre)
9629 (home-page "https://shedskin.github.io/")
9630 (synopsis "Experimental Python-2 to C++ Compiler")
9631 (description (string-append "This is an experimental compiler for a subset of
9632 Python. It generates C++ code and a Makefile."))
9633 (license (list license:gpl3 license:bsd-3 license:expat))))
9635 (define-public python2-rope
9637 (name "python2-rope")
9642 (uri (pypi-uri "rope" version))
9645 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9647 ;; Rope has only partial python3 support, see `python-rope'
9648 `(#:python ,python-2))
9649 (build-system python-build-system)
9651 `(("python2-unittest2" ,python2-unittest2)))
9652 (home-page "https://github.com/python-rope/rope")
9653 (synopsis "Refactoring library for Python")
9654 (description "Rope is a refactoring library for Python. It facilitates
9655 the renaming, moving and extracting of attributes, functions, modules, fields
9656 and parameters in Python 2 source code. These refactorings can also be applied
9657 to occurrences in strings and comments.")
9658 (license license:gpl2)))
9660 (define-public python-rope
9662 (inherit python2-rope)
9663 (name "python-rope")
9664 (arguments `(#:python ,python-wrapper
9665 ;; XXX: Only partial python3 support, results in some failing
9666 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9668 (properties `((python2-variant . ,(delay python2-rope))))))
9670 (define-public python-py3status
9672 (name "python-py3status")
9677 (uri (pypi-uri "py3status" version))
9680 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9681 (build-system python-build-system)
9686 (modify-phases %standard-phases
9687 ;; 'file' is used for detection of configuration file encoding
9688 ;; let's make link the dependency to particular input
9689 (add-before 'build 'patch-file-path
9690 (lambda* (#:key inputs #:allow-other-keys)
9691 (let ((file-path (assoc-ref inputs "file")))
9692 (substitute* "py3status/parse_config.py"
9693 (("\\['file', '-b'")
9694 (string-append "['" file-path "/bin/file', '-b'")))
9696 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9697 (home-page "https://github.com/ultrabug/py3status")
9698 (synopsis "Extensible i3status wrapper written in Python")
9699 (description "py3status is an i3status wrapper which extends i3status
9700 functionality in a modular way, allowing you to extend your panel with your
9701 own code, responding to click events and updating clock every second.")
9702 (license license:bsd-3)))
9704 (define-public python-tblib
9706 (name "python-tblib")
9710 (uri (pypi-uri "tblib" version))
9712 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9713 (build-system python-build-system)
9716 (modify-phases %standard-phases
9717 (add-before 'check 'adjust-tests
9719 (when (which "python3")
9720 ;; Adjust the example output to match that of Python 3.7:
9721 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9722 (substitute* "README.rst"
9723 (("Exception\\('fail',") "Exception('fail'"))
9727 ;; Upstream runs tests after installation and the package itself
9728 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9730 (setenv "PYTHONPATH"
9731 (string-append (getcwd) "/build/lib:"
9732 (getenv "PYTHONPATH")))
9733 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9735 `(("python-pytest" ,python-pytest)
9736 ("python-six" ,python-six)))
9737 (home-page "https://github.com/ionelmc/python-tblib")
9738 (synopsis "Traceback serialization library")
9740 "Traceback serialization allows you to:
9743 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9744 different processes. This allows better error handling when running code over
9745 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9747 @item Parse traceback strings and raise with the parsed tracebacks.
9749 (license license:bsd-3)))
9751 (define-public python2-tblib
9752 (package-with-python2 python-tblib))
9754 (define-public python-greenlet
9756 (name "python-greenlet")
9760 (uri (pypi-uri "greenlet" version))
9763 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9764 (build-system python-build-system)
9765 (home-page "https://greenlet.readthedocs.io/")
9766 (synopsis "Lightweight in-process concurrent programming")
9768 "Greenlet package is a spin-off of Stackless, a version of CPython
9769 that supports micro-threads called \"tasklets\". Tasklets run
9770 pseudo-concurrently (typically in a single or a few OS-level threads) and
9771 are synchronized with data exchanges on \"channels\".")
9772 (license (list license:psfl license:expat))))
9774 (define-public python2-greenlet
9775 (package-with-python2 python-greenlet))
9777 (define-public python-objgraph
9779 (name "python-objgraph")
9784 (uri (pypi-uri "objgraph" version))
9787 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9788 (build-system python-build-system)
9790 `(("python-graphviz" ,python-graphviz)))
9792 `(("python-mock" ,python-mock)
9793 ("graphviz" ,graphviz)))
9794 (home-page "https://mg.pov.lt/objgraph/")
9795 (synopsis "Draw Python object reference graphs with graphviz")
9797 "This package provides tools to draw Python object reference graphs with
9799 (license license:expat)))
9801 (define-public python-gevent
9803 (name "python-gevent")
9807 (uri (pypi-uri "gevent" version))
9810 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9811 (modules '((guix build utils)))
9814 ;; unbunding libev and c-ares
9815 (delete-file-recursively "deps")
9817 (build-system python-build-system)
9819 `(#:modules ((ice-9 ftw)
9823 (guix build python-build-system))
9824 #:phases (modify-phases %standard-phases
9825 (add-after 'unpack 'unpack-libev
9826 (lambda* (#:key inputs #:allow-other-keys)
9827 (mkdir-p "deps/libev")
9828 ;; FIXME: gevent requires building libev, even though
9829 ;; it only links against the proper one.
9830 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9831 "--strip-components=1" "-C" "deps/libev")))
9832 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9834 (substitute* "src/gevent/subprocess.py"
9835 (("/bin/sh") (which "sh")))
9836 (for-each (lambda (file)
9838 (("/bin/sh") (which "sh"))
9839 (("/bin/true") (which "true"))))
9840 (find-files "src/greentest" "\\.py$"))
9842 (add-before 'build 'do-not-use-bundled-sources
9843 (lambda* (#:key inputs #:allow-other-keys)
9844 (setenv "CONFIG_SHELL" (which "bash"))
9845 (setenv "LIBEV_EMBED" "false")
9846 (setenv "CARES_EMBED" "false")
9847 (setenv "EMBED" "false")
9849 (let ((greenlet (string-append
9850 (assoc-ref inputs "python-greenlet")
9852 (match (scandir greenlet
9854 (string-prefix? "python" item)))
9857 (string-append greenlet "/" python)))))
9859 (add-before 'check 'skip-timer-test
9861 ;; XXX: Skip 'TestTimerResolution', which appears to be
9863 (substitute* "src/greentest/test__core_timer.py"
9864 (("not greentest.RUNNING_ON_CI") "False"))
9868 ;; Make sure the build directory is on PYTHONPATH.
9869 (setenv "PYTHONPATH"
9871 (getenv "PYTHONPATH") ":"
9873 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9874 (with-directory-excursion "src/greentest"
9875 ;; XXX: Many tests require network access. Instead we only
9876 ;; run known-good tests. Unfortunately we cannot use
9877 ;; recursion here since this directory also contains
9878 ;; Python-version-specific subfolders.
9879 (apply invoke "python" "testrunner.py" "--config"
9881 (scandir "." (cut regexp-exec
9882 (make-regexp "test_+(subprocess|core)")
9885 `(("python-greenlet" ,python-greenlet)
9886 ("python-objgraph" ,python-objgraph)))
9888 `(("libev-source" ,(package-source libev))
9889 ("python-six" ,python-six)))
9891 `(("c-ares" ,c-ares)
9893 (home-page "http://www.gevent.org/")
9894 (synopsis "Coroutine-based network library")
9896 "gevent is a coroutine-based Python networking library that uses greenlet
9897 to provide a high-level synchronous API on top of the libev event loop.")
9898 (license license:expat)
9899 (properties `((python2-variant . ,(delay python2-gevent))))))
9901 (define-public python2-gevent
9902 (let ((base (package-with-python2
9903 (strip-python2-variant python-gevent))))
9906 (native-inputs `(,@(package-native-inputs python-gevent)
9907 ("python-mock" ,python2-mock))))))
9909 (define-public python-fastimport
9911 (name "python-fastimport")
9916 (uri (pypi-uri "fastimport" version))
9918 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9919 (build-system python-build-system)
9920 (home-page "https://github.com/jelmer/python-fastimport")
9921 (synopsis "VCS fastimport parser and generator in Python")
9922 (description "This package provides a parser for and generator of the Git
9923 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9925 (license license:gpl2+)))
9927 (define-public python2-fastimport
9928 (package-with-python2 python-fastimport))
9930 (define-public python-twisted
9932 (name "python-twisted")
9936 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9939 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9940 (build-system python-build-system)
9942 '(#:tests? #f)) ; FIXME: some tests fail
9944 `(("python-zope-interface" ,python-zope-interface)
9945 ("python-pyhamcrest" ,python-pyhamcrest)
9946 ("python-incremental" ,python-incremental)
9947 ("python-hyperlink" ,python-hyperlink)
9948 ("python-constantly" ,python-constantly)
9949 ("python-automat" ,python-automat)))
9950 (home-page "https://twistedmatrix.com/")
9951 (synopsis "Asynchronous networking framework written in Python")
9953 "Twisted is an extensible framework for Python programming, with special
9954 focus on event-based network programming and multiprotocol integration.")
9955 (license license:expat)))
9957 (define-public python2-twisted
9958 (package-with-python2 python-twisted))
9960 (define-public python-pika
9962 (name "python-pika")
9967 (uri (pypi-uri "pika" version))
9970 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9971 (build-system python-build-system)
9973 `(("python-pyev" ,python-pyev)
9974 ("python-tornado" ,python-tornado)
9975 ("python-twisted" ,python-twisted)))
9976 (home-page "https://pika.readthedocs.org")
9977 (synopsis "Pure Python AMQP Client Library")
9979 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9980 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9981 network support library.")
9982 (license license:bsd-3)))
9984 (define-public python2-pika
9985 (package-with-python2 python-pika))
9987 (define-public python-ply
9994 (uri (pypi-uri "ply" version))
9997 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9998 (build-system python-build-system)
9999 (home-page "http://www.dabeaz.com/ply/")
10000 (synopsis "Python Lex & Yacc")
10001 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10002 It uses LR parsing and does extensive error checking.")
10003 (license license:bsd-3)))
10005 (define-public python2-ply
10006 (package-with-python2 python-ply))
10008 (define-public python-tabulate
10010 (name "python-tabulate")
10014 (uri (pypi-uri "tabulate" version))
10017 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10018 (build-system python-build-system)
10020 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10021 ;; and the latest release is not tagged in the upstream repository.
10023 (home-page "https://bitbucket.org/astanin/python-tabulate")
10024 (synopsis "Pretty-print tabular data")
10026 "Tabulate is a library and command-line utility to pretty-print tabular
10028 (license license:expat)))
10030 (define-public python2-tabulate
10031 (package-with-python2 python-tabulate))
10033 (define-public python-kazoo
10035 (name "python-kazoo")
10040 (uri (pypi-uri "kazoo" version))
10043 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10044 (build-system python-build-system)
10045 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10047 `(("python-six" ,python-six)))
10048 (home-page "https://kazoo.readthedocs.org")
10049 (synopsis "High-level Zookeeper client library")
10051 "Kazoo is a Python client library for the Apache Zookeeper distributed
10052 application service. It is designed to be easy to use and to avoid common
10053 programming errors.")
10054 (license license:asl2.0)))
10056 (define-public python2-kazoo
10057 (package-with-python2 python-kazoo))
10059 (define-public python-pykafka
10061 (name "python-pykafka")
10065 (uri (pypi-uri "pykafka" version))
10068 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10069 (build-system python-build-system)
10070 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10072 `(("python-gevent" ,python-gevent)
10073 ("python-kazoo" ,python-kazoo)
10074 ("python-tabulate" ,python-tabulate)))
10076 `(("librdkafka" ,librdkafka)))
10077 (home-page "https://pykafka.readthedocs.io/")
10078 (synopsis "Apache Kafka client for Python")
10080 "PyKafka is a client for the Apache Kafka distributed messaging system.
10081 It includes Python implementations of Kafka producers and consumers, which
10082 are optionally backed by a C extension built on librdkafka.")
10083 (license license:asl2.0)))
10085 (define-public python2-pykafka
10086 (package-with-python2 python-pykafka))
10088 (define-public python-wcwidth
10090 (name "python-wcwidth")
10095 (uri (pypi-uri "wcwidth" version))
10098 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10099 (build-system python-build-system)
10100 (home-page "https://github.com/jquast/wcwidth")
10101 (synopsis "Measure number of terminal column cells of wide-character codes")
10102 (description "Wcwidth measures the number of terminal column cells of
10103 wide-character codes. It is useful for those implementing a terminal emulator,
10104 or programs that carefully produce output to be interpreted by one. It is a
10105 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10106 specified in POSIX.1-2001 and POSIX.1-2008.")
10107 (license license:expat)))
10109 (define-public python2-wcwidth
10110 (package-with-python2 python-wcwidth))
10112 (define-public python2-jsonrpclib
10114 (name "python2-jsonrpclib")
10118 (uri (pypi-uri "jsonrpclib" version))
10121 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10122 (build-system python-build-system)
10125 #:python ,python-2))
10126 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10127 (synopsis "Implementation of JSON-RPC specification for Python")
10129 "This library is an implementation of the JSON-RPC specification.
10130 It supports both the original 1.0 specification, as well as the
10131 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10133 (license license:asl2.0)))
10135 (define-public python-chai
10137 (name "python-chai")
10141 (uri (pypi-uri "chai" version))
10144 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10145 (build-system python-build-system)
10146 (home-page "https://github.com/agoragames/chai")
10147 (synopsis "Mocking framework for Python")
10149 "Chai provides an api for mocking, stubbing and spying your python
10150 objects, patterned after the Mocha library for Ruby.")
10151 (license license:bsd-3)))
10153 (define-public python2-chai
10154 (package-with-python2 python-chai))
10156 (define-public python-inflection
10158 (name "python-inflection")
10161 (origin (method url-fetch)
10162 (uri (pypi-uri "inflection" version))
10165 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10166 (build-system python-build-system)
10168 `(("python-pytest" ,python-pytest)))
10169 (home-page "https://github.com/jpvanhal/inflection")
10170 (synopsis "Python string transformation library")
10172 "Inflection is a string transformation library. It singularizes
10173 and pluralizes English words, and transforms strings from CamelCase to
10174 underscored string.")
10175 (license license:expat)))
10177 (define-public python2-inflection
10178 (package-with-python2 python-inflection))
10180 (define-public python-pylev
10182 (name "python-pylev")
10186 (uri (pypi-uri "pylev" version))
10189 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10190 (build-system python-build-system)
10191 (home-page "https://github.com/toastdriven/pylev")
10192 (synopsis "Levenshtein distance implementation in Python")
10193 (description "Pure Python Levenshtein implementation, based off the
10194 Wikipedia code samples at
10195 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10196 (license license:bsd-3)))
10198 (define-public python2-pylev
10199 (package-with-python2 python-pylev))
10201 (define-public python-cleo
10203 (name "python-cleo")
10207 (uri (pypi-uri "cleo" version))
10210 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10211 (build-system python-build-system)
10214 ("python-mock" ,python-mock)
10215 ("python-pytest-mock" ,python-pytest-mock)
10216 ("python-pytest" ,python-pytest)))
10218 `(("python-backpack" ,python-backpack)
10219 ("python-pastel" ,python-pastel)
10220 ("python-pylev" ,python-pylev)))
10221 (home-page "https://github.com/sdispater/cleo")
10222 (synopsis "Command-line arguments library for Python")
10224 "Cleo allows you to create command-line commands with signature in
10225 docstring and colored output.")
10226 (license license:expat)))
10228 (define-public python2-cleo
10229 (package-with-python2 python-cleo))
10231 (define-public python-lazy-object-proxy
10233 (name "python-lazy-object-proxy")
10237 (uri (pypi-uri "lazy-object-proxy" version))
10240 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10241 (build-system python-build-system)
10242 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10243 (synopsis "Lazy object proxy for python")
10245 "Lazy object proxy is an object that wraps a callable but defers the call
10246 until the object is actually required, and caches the result of said call.")
10247 (license license:bsd-2)))
10249 (define-public python2-lazy-object-proxy
10250 (package-with-python2 python-lazy-object-proxy))
10252 (define-public python-dnspython
10254 (name "python-dnspython")
10258 (uri (string-append "http://www.dnspython.org/kits/"
10259 version "/dnspython-" version ".tar.gz"))
10262 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10263 (build-system python-build-system)
10264 (arguments '(#:tests? #f)) ; XXX: requires internet access
10265 (home-page "http://www.dnspython.org")
10266 (synopsis "DNS toolkit for Python")
10268 "dnspython is a DNS toolkit for Python. It supports almost all record
10269 types. It can be used for queries, zone transfers, and dynamic updates.
10270 It supports TSIG authenticated messages and EDNS0.")
10271 (license license:expat)))
10273 (define-public python2-dnspython
10274 (package-with-python2 python-dnspython))
10276 (define-public python-email-validator
10278 (name "python-email-validator")
10281 (origin (method url-fetch)
10282 (uri (pypi-uri "email_validator" version))
10285 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10286 (build-system python-build-system)
10289 (modify-phases %standard-phases
10290 (add-before 'build 'use-dnspython
10292 (substitute* "setup.py"
10293 (("dnspython3") "dnspython"))
10296 `(("python-dnspython" ,python-dnspython)
10297 ("python-idna" ,python-idna)))
10298 (home-page "https://github.com/JoshData/python-email-validator")
10299 (synopsis "Email address validation library for Python")
10301 "This library validates email address syntax and deliverability.")
10302 (license license:cc0)))
10304 (define-public python2-email-validator
10305 (package-with-python2 python-email-validator))
10307 (define-public python-ukpostcodeparser
10309 (name "python-ukpostcodeparser")
10313 (uri (pypi-uri "UkPostcodeParser" version))
10316 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10317 (build-system python-build-system)
10318 (home-page "https://github.com/hamstah/ukpostcodeparser")
10319 (synopsis "UK Postcode parser for Python")
10321 "This library provides the @code{parse_uk_postcode} function for
10322 parsing UK postcodes.")
10323 (license license:expat)))
10325 (define-public python2-ukpostcodeparser
10326 (package-with-python2 python-ukpostcodeparser))
10328 (define-public python-faker
10330 (name "python-faker")
10334 (uri (pypi-uri "Faker" version))
10337 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10339 (search-patches "python-faker-fix-build-32bit.patch"))
10340 (modules '((guix build utils)))
10343 (for-each delete-file (find-files "." "\\.pyc$"))
10345 (build-system python-build-system)
10348 (modify-phases %standard-phases
10350 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10353 ("python-email-validator" ,python-email-validator)
10354 ("python-mock" ,python-mock)
10355 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10357 `(("python-dateutil" ,python-dateutil)
10358 ("python-six" ,python-six)))
10359 (home-page "https://github.com/joke2k/faker")
10360 (synopsis "Python package that generates fake data")
10362 "Faker is a Python package that generates fake data such as names,
10363 addresses, and phone numbers.")
10364 (license license:expat)
10365 (properties `((python2-variant . ,(delay python2-faker))))))
10367 (define-public python2-faker
10368 (let ((base (package-with-python2 (strip-python2-variant
10373 `(("python2-ipaddress" ,python2-ipaddress)
10374 ,@(package-propagated-inputs base))))))
10376 (define-public python-pyaml
10378 (name "python-pyaml")
10379 (version "18.11.0")
10382 (uri (pypi-uri "pyaml" version))
10385 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10386 (build-system python-build-system)
10388 `(("python-unidecode" ,python-unidecode)))
10390 `(("python-pyyaml" ,python-pyyaml)))
10391 (home-page "https://github.com/mk-fg/pretty-yaml")
10392 (synopsis "YAML pretty-print library for Python")
10394 "pyaml is a PyYAML based python module to produce pretty and readable
10395 YAML-serialized data.")
10396 (license license:wtfpl2)))
10398 (define-public python2-pyaml
10399 (package-with-python2 python-pyaml))
10401 (define-public python-backpack
10403 (name "python-backpack")
10408 (uri (pypi-uri "backpack" version))
10411 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10412 (build-system python-build-system)
10414 `(("python-pytest" ,python-pytest)
10415 ("python-nose" ,python-nose)))
10417 `(("python-simplejson" ,python-simplejson)))
10418 (home-page "https://github.com/sdispater/backpack")
10419 (synopsis "Utilities for working with Python collections")
10420 (description "Backpack provides some useful utilities for working with
10421 collections of data.")
10422 (license license:expat)))
10424 (define-public python2-backpack
10425 (package-with-python2 python-backpack))
10427 (define-public python-prompt-toolkit
10429 (name "python-prompt-toolkit")
10434 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10437 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10438 (build-system python-build-system)
10441 (modify-phases %standard-phases
10443 (add-after 'install 'post-install-check
10444 (lambda* (#:key inputs outputs #:allow-other-keys)
10445 ;; HOME is needed for the test
10446 ;; "test_pathcompleter_can_expanduser".
10447 (setenv "HOME" "/tmp")
10448 (add-installed-pythonpath inputs outputs)
10449 (invoke "py.test"))))))
10451 `(("python-wcwidth" ,python-wcwidth)
10452 ("python-six" ,python-six)
10453 ("python-pygments" ,python-pygments)))
10455 `(("python-pytest" ,python-pytest)))
10456 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10457 (synopsis "Library for building command line interfaces in Python")
10459 "Prompt-Toolkit is a library for building interactive command line
10460 interfaces in Python. It's like GNU Readline but it also features syntax
10461 highlighting while typing, out-of-the-box multi-line input editing, advanced
10462 code completion, incremental search, support for Chinese double-width
10463 characters, mouse support, and auto suggestions.")
10464 (license license:bsd-3)))
10466 (define-public python2-prompt-toolkit
10467 (package-with-python2 python-prompt-toolkit))
10469 (define-public python-prompt-toolkit-1
10470 (package (inherit python-prompt-toolkit)
10475 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10478 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10480 (define-public python2-prompt-toolkit-1
10481 (package-with-python2 python-prompt-toolkit-1))
10483 (define-public python-jedi
10485 (name "python-jedi")
10490 (uri (pypi-uri "jedi" version))
10493 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10494 (build-system python-build-system)
10496 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10497 ;; https://github.com/davidhalter/jedi/issues/1263)
10500 (modify-phases %standard-phases
10502 (lambda* (#:key tests? #:allow-other-keys)
10504 (invoke "py.test" "-vv")))))))
10506 `(("python-pytest" ,python-pytest)
10507 ("python-docopt" ,python-docopt)))
10509 `(("python-parso" ,python-parso)))
10510 (home-page "https://github.com/davidhalter/jedi")
10511 (synopsis "Autocompletion and static analysis library for Python")
10513 "Jedi is a static analysis tool for Python that can be used in Integrated
10514 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10515 on a deeper level than many other static analysis frameworks for Python.
10517 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10519 (license license:expat)))
10521 (define-public python2-jedi
10522 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10525 (arguments (substitute-keyword-arguments (package-arguments base)
10526 ((#:tests? _) #t))))))
10528 (define-public ptpython
10534 (uri (pypi-uri "ptpython" version))
10537 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10538 (build-system python-build-system)
10540 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10542 `(("python-docopt" ,python-docopt)
10543 ("python-jedi" ,python-jedi)
10544 ("python-prompt-toolkit" ,python-prompt-toolkit)
10545 ("python-pygments" ,python-pygments)))
10546 (home-page "https://github.com/jonathanslenders/ptpython")
10547 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10549 "ptpython is a Python read-eval-print loop with IDE-like features.
10550 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10551 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10553 (license license:bsd-3)
10554 (properties `((python2-variant . ,(delay ptpython-2))))))
10556 (define-public ptpython-2
10557 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10560 (name "ptpython2"))))
10562 (define-public python-stem
10564 (name "python-stem")
10569 (uri (pypi-uri "stem" version))
10572 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10573 (build-system python-build-system)
10576 (modify-phases %standard-phases
10579 (invoke "./run_tests.py" "--unit")
10582 `(("python-mock" ,python-mock)
10583 ("python-pycodestyle" ,python-pycodestyle)
10584 ("python-pyflakes" ,python-pyflakes)))
10585 (home-page "https://stem.torproject.org/")
10587 "Python controller library that allows applications to interact with Tor")
10589 "Stem is a Python controller library for Tor. With it you can use Tor's
10590 control protocol to script against the Tor process and read descriptor data
10591 relays publish about themselves.")
10592 (license license:lgpl3)))
10594 (define-public python2-stem
10595 (package-with-python2 python-stem))
10597 (define-public python-pyserial
10599 (name "python-pyserial")
10604 (uri (pypi-uri "pyserial" version))
10607 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10608 (build-system python-build-system)
10610 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10612 ;; (modify-phases %standard-phases
10615 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10617 "https://github.com/pyserial/pyserial")
10618 (synopsis "Python Serial Port Bindings")
10619 (description "@code{pyserial} provide serial port bindings for Python. It
10620 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10621 and/or Xon/Xoff. The port is accessed in RAW mode.")
10622 (license license:bsd-3)))
10624 (define-public python2-pyserial
10625 (package-with-python2 python-pyserial))
10627 (define-public python-kivy
10629 (name "python-kivy")
10634 (uri (pypi-uri "Kivy" version))
10635 (file-name (string-append name "-" version ".tar.gz"))
10638 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10639 (build-system python-build-system)
10641 `(#:tests? #f ; Tests require many optional packages
10643 (modify-phases %standard-phases
10644 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10645 (lambda* (#:key inputs #:allow-other-keys)
10646 (setenv "KIVY_SDL2_PATH"
10647 (string-append (assoc-ref inputs "sdl-union")
10652 ("pkg-config" ,pkg-config)
10653 ("python-cython" ,python-cython)))
10655 `(("gstreamer" ,gstreamer)
10658 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10659 (home-page "http://kivy.org")
10661 "Multitouch application framework")
10663 "A software library for rapid development of
10664 hardware-accelerated multitouch applications.")
10665 (license license:expat)))
10667 (define-public python2-kivy
10668 (package-with-python2 python-kivy))
10670 (define-public python-kivy-next
10671 (deprecated-package "python-kivy-next" python-kivy))
10673 (define-public python2-kivy-next
10674 (deprecated-package "python2-kivy-next" python2-kivy))
10676 (define-public python-binaryornot
10678 (name "python-binaryornot")
10682 (uri (pypi-uri "binaryornot" version))
10685 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10686 (build-system python-build-system)
10688 `(("python-chardet" ,python-chardet)
10689 ("python-hypothesis" ,python-hypothesis)))
10690 (home-page "https://github.com/audreyr/binaryornot")
10691 (synopsis "Package to check if a file is binary or text")
10692 (description "Ultra-lightweight pure Python package to check if a file is
10694 (license license:bsd-3)
10695 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10697 (define-public python2-binaryornot
10698 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10699 (package (inherit base)
10701 `(("python2-enum34" ,python2-enum34)
10702 ,@(package-propagated-inputs base))))))
10704 (define-public python-nltk
10706 (name "python-nltk")
10710 (uri (pypi-uri "nltk" version))
10713 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10714 (build-system python-build-system)
10716 '(;; The tests require some extra resources to be downloaded.
10717 ;; TODO Try packaging these resources.
10719 (home-page "http://nltk.org/")
10720 (synopsis "Natural Language Toolkit")
10721 (description "It provides interfaces to over 50 corpora and lexical
10722 resources such as WordNet, along with a suite of text processing libraries
10723 for classification, tokenization, stemming, tagging, parsing, and semantic
10724 reasoning, wrappers for natural language processing libraries.")
10725 (license license:asl2.0)))
10727 (define-public python2-nltk
10728 (package-with-python2 python-nltk))
10730 (define-public python-pymongo
10732 (name "python-pymongo")
10736 (uri (pypi-uri "pymongo" version))
10739 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10740 (build-system python-build-system)
10742 `(("python-certifi" ,python-certifi)))
10743 (home-page "https://github.com/mongodb/mongo-python-driver")
10744 (synopsis "Python driver for MongoDB")
10745 (description "Python driver for MongoDB.")
10746 (license license:asl2.0)))
10748 (define-public python2-pymongo
10749 (package-with-python2 python-pymongo))
10751 (define-public python-consul
10753 (name "python-consul")
10758 (uri (pypi-uri "python-consul" version))
10761 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10762 (build-system python-build-system)
10764 '(#:tests? #f)) ; The tests are not distributed
10766 `(("python-requests" ,python-requests)
10767 ("python-six" ,python-six)))
10768 (home-page "https://github.com/cablehead/python-consul")
10769 (synopsis "Python client for Consul")
10771 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10772 discovery, monitoring and configuration.")
10773 (license license:expat)))
10775 (define-public python2-consul
10776 (package-with-python2 python-consul))
10778 (define-public python-schematics
10780 (name "python-schematics")
10785 (uri (git-reference
10786 (url "https://github.com/schematics/schematics.git")
10787 (commit (string-append "v" version))))
10788 (file-name (git-file-name name version))
10790 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10791 (build-system python-build-system)
10793 `(("python-six" ,python-six)))
10795 ;; The tests require a bunch of not very nice packages with fixed
10796 ;; version requirements (e.g. python-coveralls).
10798 (home-page "https://github.com/schematics/schematics")
10799 (synopsis "Python Data Structures for Humans")
10800 (description "Python Data Structures for Humans.")
10801 (license license:bsd-3)))
10803 (define-public python2-schematics
10804 (package-with-python2 python-schematics))
10806 (define-public python-odfpy
10808 (name "python-odfpy")
10812 (uri (pypi-uri "odfpy" version))
10815 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10817 `(#:modules ((srfi srfi-1)
10818 (guix build python-build-system)
10819 (guix build utils))
10821 (modify-phases %standard-phases
10823 ;; The test runner invokes python2 and python3 for test*.py.
10824 ;; To avoid having both in inputs, we replicate it here.
10826 (for-each (lambda (test-file) (invoke "python" test-file))
10827 (find-files "tests" "^test.*\\.py$"))
10829 (build-system python-build-system)
10830 (home-page "https://github.com/eea/odfpy")
10831 (synopsis "Python API and tools to manipulate OpenDocument files")
10832 (description "Collection of libraries and utility programs written in
10833 Python to manipulate OpenDocument 1.2 files.")
10835 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10836 ;; number of files with other licenses.
10837 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10839 (define-public python2-odfpy
10840 (package-with-python2 python-odfpy))
10842 (define-public python-natsort
10844 (name "python-natsort")
10848 (uri (pypi-uri "natsort" version))
10851 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10852 (build-system python-build-system)
10854 `(#:modules ((guix build utils)
10855 (guix build python-build-system)
10860 (modify-phases %standard-phases
10861 (add-before 'check 'set-cachedir
10862 ;; Tests require write access to $HOME by default
10863 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10866 (let ((cwd (getcwd)))
10867 (setenv "PYTHONPATH"
10870 (find (cut string-prefix? "lib" <>)
10871 (scandir (string-append cwd "/build")))
10873 (getenv "PYTHONPATH")))
10874 (invoke "pytest" "-v")))))))
10876 `(("python-hypothesis" ,python-hypothesis)
10877 ("python-pytest-cov" ,python-pytest-cov)
10878 ("python-pytest-mock" ,python-pytest-mock)
10879 ("python-pytest" ,python-pytest)))
10880 (propagated-inputs ; TODO: Add python-fastnumbers.
10881 `(("python-pyicu" ,python-pyicu)))
10882 (home-page "https://github.com/SethMMorton/natsort")
10883 (synopsis "Natural sorting for python and shell")
10885 "Natsort lets you apply natural sorting on lists instead of
10886 lexicographical. If you use the built-in @code{sorted} method in python
10887 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10888 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10889 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10890 identifies numbers and sorts them separately from strings. It can also sort
10891 version numbers, real numbers, mixed types and more, and comes with a shell
10892 command @command{natsort} that exposes this functionality in the command line.")
10893 (license license:expat)
10894 (properties `((python2-variant . ,(delay python2-natsort))))))
10896 (define-public python2-natsort
10897 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10898 (package (inherit base)
10900 `(("python2-pathlib" ,python2-pathlib)
10901 ,@(package-native-inputs base))))))
10903 (define-public python-glances
10905 (name "python-glances")
10910 (uri (pypi-uri "Glances" version))
10913 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10914 (build-system python-build-system)
10916 `(("python-psutil" ,python-psutil)))
10918 "https://github.com/nicolargo/glances")
10920 "A cross-platform curses-based monitoring tool")
10922 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10923 Glances uses the PsUtil library to get information from your system. It monitors
10924 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10925 (license license:lgpl3+)))
10927 (define-public python2-glances
10928 (package-with-python2 python-glances))
10930 (define-public python-graphql-core
10932 (name "python-graphql-core")
10937 (uri (pypi-uri "graphql-core" version))
10940 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10941 (build-system python-build-system)
10943 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10945 (modify-phases %standard-phases
10946 (add-after 'unpack 'patch-hardcoded-version
10947 (lambda _ (substitute*
10949 (("'gevent==1.1rc1'") "'gevent'"))
10952 `(("python-gevent" ,python-gevent)
10953 ("python-mock" ,python-mock)
10954 ("python-pytest-mock" ,python-pytest-mock)))
10956 `(("python-promise" ,python-promise)
10957 ("python-six" ,python-six)))
10958 (home-page "https://github.com/graphql-python/graphql-core")
10959 (synopsis "GraphQL implementation for Python")
10961 "GraphQL implementation for Python. GraphQL is a data query language and
10962 runtime designed and used to request and deliver data to mobile and web apps.
10963 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10965 (license license:expat)))
10967 (define-public python2-graphql-core
10968 (package-with-python2 python-graphql-core))
10970 (define-public python-graphql-relay
10972 (name "python-graphql-relay")
10977 (uri (pypi-uri "graphql-relay" version))
10980 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10981 (build-system python-build-system)
10983 '(#:tests? #f)) ; The tests are not distributed
10985 `(("python-graphql-core" ,python-graphql-core)
10986 ("python-promise" ,python-promise)
10987 ("python-six" ,python-six)))
10988 (home-page "https://github.com/graphql-python/graphql-relay-py")
10989 (synopsis "Relay implementation for Python")
10991 "This is a library to allow the easy creation of Relay-compliant servers
10992 using the GraphQL Python reference implementation of a GraphQL server. It
10993 should be noted that the code is a exact port of the original
10994 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10996 (license license:expat)))
10998 (define-public python2-graphql-relay
10999 (package-with-python2 python-graphql-relay))
11001 (define-public python-graphene
11003 (name "python-graphene")
11008 (uri (pypi-uri "graphene" version))
11011 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11012 (build-system python-build-system)
11014 `(("python-graphql-core" ,python-graphql-core)
11015 ("python-graphql-relay" ,python-graphql-relay)
11016 ("python-iso8601" ,python-iso8601)
11017 ("python-promise" ,python-promise)
11018 ("python-six" ,python-six)))
11020 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11021 (home-page "http://graphene-python.org/")
11022 (synopsis "GraphQL Framework for Python")
11024 "Graphene is a Python library for building GraphQL schemas/types.
11025 A GraphQL schema describes your data model, and provides a GraphQL server
11026 with an associated set of resolve methods that know how to fetch data.")
11027 (properties `((python2-variant . ,(delay python2-graphene))))
11028 (license license:expat)))
11030 (define-public python2-graphene
11031 (let ((base (package-with-python2
11032 (strip-python2-variant python-graphene))))
11033 (package (inherit base)
11035 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11036 ,@(package-native-inputs base))))))
11038 (define-public python-nautilus
11040 (name "python-nautilus")
11045 (uri (pypi-uri "nautilus" version))
11048 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11049 (build-system python-build-system)
11050 (arguments `(#:tests? #f)) ; fails to import test modules
11052 `(("python-bcrypt" ,python-bcrypt)
11053 ("python-click" ,python-click)
11054 ("python-consul" ,python-consul)
11055 ("python-graphene" ,python-graphene)
11056 ("python-jinja2" ,python-jinja2)
11057 ("python-peewee" ,python-peewee)
11058 ("python-pika" ,python-pika)
11059 ("python-tornado" ,python-tornado)
11060 ("python-wtforms" ,python-wtforms)))
11062 `(("python-nose2" ,python-nose2)))
11063 (home-page "https://github.com/AlecAivazis/nautilus")
11064 (synopsis "Library for creating microservice applications")
11066 "Nautilus is a framework for flux based microservices that looks to
11067 provide extendible implementations of common aspects of a cloud so that you can
11068 focus on building massively scalable web applications.")
11069 (license license:expat)))
11071 (define-public python-snowballstemmer
11073 (name "python-snowballstemmer")
11077 (uri (pypi-uri "snowballstemmer" version))
11080 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11081 (build-system python-build-system)
11083 `(;; No tests exist
11085 (home-page "https://github.com/shibukawa/snowball_py")
11086 (synopsis "Snowball stemming library collection for Python")
11087 (description "This package provides 16 word stemmer algorithms generated
11088 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11090 (license license:bsd-3)))
11092 (define-public python2-snowballstemmer
11093 (package-with-python2 python-snowballstemmer))
11095 (define-public python-setproctitle
11097 (name "python-setproctitle")
11102 (uri (pypi-uri "setproctitle" version))
11105 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11106 (build-system python-build-system)
11109 (modify-phases %standard-phases
11110 (add-before 'check 'patch-Makefile
11111 ;; Stricly this is only required for the python2 variant.
11112 ;; But adding a phase in an inherited package seems to be
11113 ;; cumbersum. So we patch even for python3.
11115 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11117 (substitute* "Makefile"
11118 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11119 (string-append nose "/bin/nosetests "))))
11123 (setenv "PYTHON" (or (which "python3") (which "python")))
11124 (setenv "PYCONFIG" (or (which "python3-config")
11125 (which "python-config")))
11126 (setenv "CC" "gcc")
11127 ;; No need to extend PYTHONPATH to find the built package, since
11128 ;; the Makefile will build anyway
11129 (invoke "make" "check"))))))
11131 `(("procps" ,procps))) ; required for tests
11133 "https://github.com/dvarrazzo/py-setproctitle")
11135 "Setproctitle implementation for Python to customize the process title")
11136 (description "The library allows a process to change its title (as displayed
11137 by system tools such as ps and top).
11139 Changing the title is mostly useful in multi-process systems, for
11140 example when a master process is forked: changing the children's title
11141 allows to identify the task each process is busy with. The technique
11142 is used by PostgreSQL and the OpenSSH Server for example.")
11143 (license license:bsd-3)
11144 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11146 (define-public python2-setproctitle
11147 (let ((base (package-with-python2
11148 (strip-python2-variant python-setproctitle))))
11151 (native-inputs `(("python2-nose" ,python2-nose)
11152 ,@(package-native-inputs base))))))
11154 (define-public python-validictory
11156 (name "python-validictory")
11161 (uri (pypi-uri "validictory" version))
11164 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11165 (build-system python-build-system)
11168 (modify-phases %standard-phases
11169 (add-after 'unpack 'bootstrap
11170 ;; Move the tests out of the package directory to avoid
11173 (rename-file "validictory/tests" "tests")
11174 (delete-file "tests/__init__.py")))
11177 ;; Extend PYTHONPATH so the built package will be found.
11178 (setenv "PYTHONPATH"
11179 (string-append (getcwd) "/build/lib:"
11180 (getenv "PYTHONPATH")))
11181 (invoke "py.test" "-vv" ))))))
11183 `(("python-pytest" ,python-pytest)))
11185 "https://github.com/jamesturk/validictory")
11186 (synopsis "General purpose Python data validator")
11187 (description "It allows validation of arbitrary Python data structures.
11189 The schema format is based on the JSON Schema
11190 proposal (http://json-schema.org), so combined with json the library is also
11191 useful as a validator for JSON data.")
11192 (license license:expat)))
11194 (define-public python2-validictory
11195 (package-with-python2 python-validictory))
11197 (define-public python-pyelftools
11199 (name "python-pyelftools")
11204 (uri (pypi-uri "pyelftools" version))
11207 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11208 (build-system python-build-system)
11211 (modify-phases %standard-phases
11212 (add-before 'check 'set-pythonpath
11214 (setenv "PYTHONPATH"
11217 ":" (getenv "PYTHONPATH")))
11220 "https://github.com/eliben/pyelftools")
11222 "Analyze binary and library file information")
11223 (description "This Python library provides interfaces for parsing and
11224 analyzing two binary and library file formats; the Executable and Linking
11225 Format (ELF), and debugging information in the Debugging With Attributed
11226 Record Format (DWARF).")
11227 (license license:public-domain)))
11229 (define-public python-pyev
11231 (name "python-pyev")
11236 (uri (pypi-uri "pyev" version))
11239 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11240 (build-system python-build-system)
11242 `(#:tests? #f ; no test suite
11244 (modify-phases %standard-phases
11245 (add-after 'unpack 'patch
11246 (lambda* (#:key inputs #:allow-other-keys)
11247 (let ((libev (string-append (assoc-ref inputs "libev")
11248 "/lib/libev.so.4")))
11249 (substitute* "setup.py"
11250 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11251 (string-append "libev_dll_name = \"" libev "\"")))))))))
11253 `(("libev" ,libev)))
11254 (home-page "http://pythonhosted.org/pyev/")
11255 (synopsis "Python libev interface")
11256 (description "Pyev provides a Python interface to libev.")
11257 (license license:gpl3)))
11259 (define-public python2-pyev
11260 (package-with-python2 python-pyev))
11262 (define-public python-imagesize
11264 (name "python-imagesize")
11269 (uri (pypi-uri "imagesize" version))
11272 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11273 (build-system python-build-system)
11274 (home-page "https://github.com/shibukawa/imagesize_py")
11275 (synopsis "Gets image size of files in various formats in Python")
11277 "This package allows determination of image size from
11278 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11279 (license license:expat)))
11281 (define-public python2-imagesize
11282 (package-with-python2 python-imagesize))
11284 (define-public python-termstyle
11286 (name "python-termstyle")
11291 (uri (pypi-uri "termstyle" version))
11294 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11295 (build-system python-build-system)
11298 (modify-phases %standard-phases
11301 (invoke "python" "test3.py"))))))
11302 (home-page "https://github.com/gfxmonk/termstyle")
11303 (synopsis "Console text coloring for Python")
11304 (description "This package provides console text coloring for Python.")
11305 (license license:bsd-3)))
11307 (define-public python-argcomplete
11309 (name "python-argcomplete")
11314 (uri (pypi-uri "argcomplete" version))
11317 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11318 (build-system python-build-system)
11320 `(("python-pexpect" ,python-pexpect)
11322 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11323 (home-page "https://github.com/kislyuk/argcomplete")
11324 (synopsis "Shell tab completion for Python argparse")
11325 (description "argcomplete provides extensible command line tab completion
11326 of arguments and options for Python scripts using @code{argparse}. It's
11327 particularly useful for programs with many options or sub-parsers that can
11328 dynamically suggest completions; for example, when browsing resources over the
11330 (license license:asl2.0)))
11332 (define-public python2-argcomplete
11333 (package-with-python2 python-argcomplete))
11335 (define-public python-xopen
11337 (name "python-xopen")
11342 (uri (pypi-uri "xopen" version))
11345 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11346 (build-system python-build-system)
11348 `(("python-setuptools-scm" ,python-setuptools-scm)))
11349 (home-page "https://github.com/marcelm/xopen/")
11350 (synopsis "Open compressed files transparently")
11351 (description "This module provides an @code{xopen} function that works like
11352 Python's built-in @code{open} function, but can also deal with compressed files.
11353 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11354 recognized by their file extensions. The focus is on being as efficient as
11355 possible on all supported Python versions.")
11356 (license license:expat)))
11358 (define-public python2-xopen
11359 (let ((base (package-with-python2
11360 (strip-python2-variant python-xopen))))
11363 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11364 ,@(package-propagated-inputs base))))))
11366 (define-public python-cheetah
11368 (name "python-cheetah")
11373 (uri (pypi-uri "Cheetah3" version))
11376 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11377 (build-system python-build-system)
11379 `(#:modules ((guix build utils)
11380 (guix build python-build-system)
11384 #:phases (modify-phases %standard-phases
11385 (add-after 'unpack 'use-absolute-python
11387 (substitute* "Cheetah/CheetahWrapper.py"
11388 (("#!/usr/bin/env python")
11389 (string-append "#!" (which "python"))))
11393 (let ((cwd (getcwd)))
11394 (setenv "PYTHONPATH"
11397 (find (cut string-prefix? "lib" <>)
11398 (scandir (string-append cwd "/build")))
11399 ":" (getenv "PYTHONPATH")))
11401 (string-append (getenv "PATH")
11403 (setenv "TMPDIR" "/tmp")
11405 (substitute* "Cheetah/Tests/Test.py"
11406 (("unittest.TextTestRunner\\(\\)")
11407 "unittest.TextTestRunner(verbosity=2)"))
11409 (invoke "python" "Cheetah/Tests/Test.py")))))))
11411 `(("python-markdown" ,python-markdown))) ;optional
11412 (home-page "http://cheetahtemplate.org/")
11413 (synopsis "Template engine")
11414 (description "Cheetah is a text-based template engine and Python code
11417 Cheetah can be used as a standalone templating utility or referenced as
11418 a library from other Python applications. It has many potential uses,
11419 but web developers looking for a viable alternative to ASP, JSP, PHP and
11420 PSP are expected to be its principle user group.
11424 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11426 @item Cleanly separates content, graphic design, and program code.
11427 @item Blends the power and flexibility of Python with a simple template language
11428 that non-programmers can understand.
11429 @item Gives template writers full access to any Python data structure, module,
11430 function, object, or method in their templates.
11431 @item Makes code reuse easy by providing an object-orientated interface to
11432 templates that is accessible from Python code or other Cheetah templates.
11433 One template can subclass another and selectively reimplement sections of it.
11434 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11435 improve the performance of a dynamic website.
11436 @item Compiles templates into optimized, yet readable, Python code.
11438 (license (license:x11-style "file://LICENSE"))))
11440 (define-public python2-cheetah
11441 (package-with-python2 python-cheetah))
11443 (define-public python-dulwich
11445 (name "python-dulwich")
11450 (uri (list (string-append "https://www.dulwich.io/releases/"
11451 "dulwich-" version ".tar.gz")
11452 (pypi-uri "dulwich" version)))
11455 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11456 (build-system python-build-system)
11459 (modify-phases %standard-phases
11460 (add-before 'check 'fix-tests
11461 (lambda* (#:key inputs #:allow-other-keys)
11462 ;; The tests use Popen with a custom environment which doesn't
11464 (substitute* "dulwich/tests/compat/utils.py"
11465 (("'git'") (string-append "'"
11468 (substitute* '("dulwich/tests/test_repository.py"
11469 "dulwich/tests/test_hooks.py")
11470 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11471 (setenv "TEST_RUNNER" "unittest")
11472 (setenv "PYTHONHASHSEED" "random")
11475 `(("python-fastimport" ,python-fastimport)))
11477 `(("python-mock" ,python-mock)
11478 ("python-geventhttpclient" ,python-geventhttpclient)
11480 (home-page "https://www.dulwich.io/")
11481 (synopsis "Git implementation in Python")
11482 (description "Dulwich is an implementation of the Git file formats and
11483 protocols written in pure Python.")
11484 ;; Can be used with either license.
11485 (license (list license:asl2.0 license:gpl2+))))
11487 (define-public python2-dulwich
11488 (package-with-python2 python-dulwich))
11490 (define-public python-pbkdf2
11492 (name "python-pbkdf2")
11497 (uri (pypi-uri "pbkdf2" version))
11500 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11501 (build-system python-build-system)
11504 (modify-phases %standard-phases
11507 (setenv "PYTHONPATH"
11508 (string-append (getcwd) "/build/lib:"
11509 (getenv "PYTHONPATH")))
11510 (invoke "python" "test/test_pbkdf2.py"))))))
11512 `(("python-pycrypto" ,python-pycrypto))) ; optional
11513 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11514 (synopsis "Password-based key derivation")
11515 (description "This module implements the password-based key derivation
11516 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11518 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11519 is part of the RSA Public Key Cryptography Standards series. The provided
11520 implementation takes a password or a passphrase and a salt value (and
11521 optionally a iteration count, a digest module, and a MAC module) and provides
11522 a file-like object from which an arbitrarly-sized key can be read.")
11523 (license license:expat)))
11525 (define-public python2-pbkdf2
11526 (package-with-python2 python-pbkdf2))
11528 (define-public python-qrcode
11530 (name "python-qrcode")
11535 (uri (pypi-uri "qrcode" version))
11537 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11538 (build-system python-build-system)
11540 ;; FIXME: Tests require packaging 'pymaging'.
11543 `(("python-lxml" ,python-lxml) ; for SVG output
11544 ("python-pillow" ,python-pillow) ; for PNG output
11545 ("python-six" ,python-six)))
11546 (home-page "https://github.com/lincolnloop/python-qrcode")
11547 (synopsis "QR Code image generator")
11548 (description "This package provides a pure Python QR Code generator
11549 module. It uses the Python Imaging Library (PIL) to allow for the generation
11552 In addition this package provides a command line tool to generate QR codes and
11553 either write these QR codes to a file or do the output as ascii art at the
11555 (license license:bsd-3)))
11557 (define-public python2-qrcode
11558 (package-with-python2 python-qrcode))
11560 (define-public python-rst2ansi
11562 (name "python-rst2ansi")
11567 (uri (pypi-uri "rst2ansi" version))
11570 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11571 (build-system python-build-system)
11573 `(("python-docutils" ,python-docutils)))
11574 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11575 (synopsis "Convert RST to ANSI-decorated console output")
11577 "Python module dedicated to rendering RST (reStructuredText) documents
11578 to ansi-escaped strings suitable for display in a terminal.")
11579 (license license:expat)))
11581 (define-public python-ansi2html
11583 (name "python-ansi2html")
11588 (uri (pypi-uri "ansi2html" version))
11591 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11592 (build-system python-build-system)
11594 `(("python-mock" ,python-mock)
11595 ("python-nose" ,python-nose)))
11597 `(("python-six" ,python-six)))
11598 (home-page "https://github.com/ralphbean/ansi2html")
11599 (synopsis "Convert ANSI-decorated console output to HTML")
11601 "@command{ansi2html} is a Python library and command line utility for
11602 convering text with ANSI color codes to HTML or LaTeX.")
11603 (license license:gpl3+)))
11605 (define-public python2-ansi2html
11606 (package-with-python2 python-ansi2html))
11608 (define-public python-ddt
11610 (name "python-ddt")
11615 (uri (pypi-uri "ddt" version))
11618 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11619 (build-system python-build-system)
11621 `(("python-mock" ,python-mock)
11622 ("python-nose" ,python-nose)))
11624 `(("python-six" ,python-six)
11625 ("python-pyyaml" ,python-pyyaml)))
11626 (home-page "https://github.com/txels/ddt")
11627 (synopsis "Data-Driven Tests")
11629 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11630 running it with different test data, and make it appear as multiple test
11632 (license license:expat)))
11634 (define-public python2-ddt
11635 (package-with-python2 python-ddt))
11637 (define-public python-pycountry
11639 (name "python-pycountry")
11640 (version "18.5.26")
11644 (uri (pypi-uri "pycountry" version))
11647 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11648 (build-system python-build-system)
11649 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11650 (synopsis "ISO databases for languages, countries, currencies, etc.")
11652 "@code{pycountry} provides the ISO databases for the standards:
11654 @item 639-3 (Languages)
11655 @item 3166 (Countries)
11656 @item 3166-3 (Deleted Countries)
11657 @item 3166-2 (Subdivisions of countries)
11658 @item 4217 (Currencies)
11659 @item 15924 (Scripts)
11661 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11662 through a Python API.")
11663 (license license:lgpl2.1+)))
11665 (define-public python2-pycountry
11666 (package-with-python2 python-pycountry))
11668 (define-public python-pycosat
11670 (name "python-pycosat")
11675 (uri (pypi-uri "pycosat" version))
11678 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11679 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11680 (build-system python-build-system)
11681 (home-page "https://github.com/ContinuumIO/pycosat")
11682 (synopsis "Bindings to picosat (a SAT solver)")
11684 "This package provides efficient Python bindings to @code{picosat} on
11685 the C level. When importing pycosat, the @code{picosat} solver becomes part
11686 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11687 Problem} (SAT) solver.")
11688 (license license:expat)))
11690 (define-public python2-pycosat
11691 (package-with-python2 python-pycosat))
11693 (define-public python2-ruamel.ordereddict
11695 (name "python2-ruamel.ordereddict")
11700 (uri (pypi-uri "ruamel.ordereddict" version))
11703 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11704 (build-system python-build-system)
11706 `(#:python ,python-2
11708 (modify-phases %standard-phases
11710 (add-after 'install 'check
11711 (lambda* (#:key inputs outputs #:allow-other-keys)
11712 (add-installed-pythonpath inputs outputs)
11713 (invoke "python" "test/testordereddict.py"))))))
11714 (home-page "https://bitbucket.org/ruamel/ordereddict")
11715 (synopsis "Version of dict that keeps keys in insertion order")
11717 "This is an implementation of an ordered dictionary with @dfn{Key
11718 Insertion Order} (KIO: updates of values do not affect the position of the
11719 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11720 removed and put at the back). The standard library module @code{OrderedDict},
11721 implemented later, implements a subset of @code{ordereddict} functionality.
11722 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11723 Order} (KSO, no sorting function can be specified, but a transform can be
11724 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11725 (license license:expat)))
11727 (define-public python-pypeg2
11729 (name "python-pypeg2")
11734 (uri (pypi-uri "pyPEG2" version))
11737 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11738 (build-system python-build-system)
11739 (propagated-inputs `(("python-lxml" ,python-lxml)))
11741 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11743 (home-page "https://fdik.org/pyPEG/")
11744 (synopsis "Parsering Expression Grammars in Python")
11745 (description "PyPEG is an intrinsic parser interpreter framework for
11746 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11747 parse many formal languages.")
11748 (license license:gpl2)))
11750 (define-public python-incremental
11752 (name "python-incremental")
11757 (uri (pypi-uri "incremental" version))
11760 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11761 (build-system python-build-system)
11762 (home-page "https://github.com/hawkowl/incremental")
11763 (synopsis "Library for versioning Python projects")
11764 (description "Incremental is a small library that versions your Python
11766 (license license:expat)))
11768 (define-public python2-incremental
11769 (package-with-python2 python-incremental))
11771 (define-public python-invoke
11773 (name "python-invoke")
11774 (home-page "http://www.pyinvoke.org/")
11778 (uri (pypi-uri "invoke" version))
11781 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11782 (build-system python-build-system)
11784 ;; XXX: Requires many dependencies that are not yet in Guix.
11786 (synopsis "Pythonic task execution")
11788 "Invoke is a Python task execution tool and library, drawing inspiration
11789 from various sources to arrive at a powerful and clean feature set. It is
11790 evolved from the Fabric project, but focuses on local and abstract concerns
11791 instead of servers and network commands.")
11792 (license license:bsd-3)))
11794 (define-public python2-invoke
11795 (package-with-python2 python-invoke))
11797 (define-public python-automat
11799 (name "python-automat")
11803 (uri (pypi-uri "Automat" version))
11806 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11807 (build-system python-build-system)
11808 ;; We disable the tests because they require python-twisted, while
11809 ;; python-twisted depends on python-automat. Twisted is optional, but the
11810 ;; tests fail if it is not available. Also see
11811 ;; <https://github.com/glyph/automat/issues/71>.
11812 (arguments '(#:tests? #f))
11814 `(("python-m2r" ,python-m2r)
11815 ("python-setuptools-scm" ,python-setuptools-scm)
11816 ("python-graphviz" ,python-graphviz)))
11818 `(("python-six" ,python-six)
11819 ("python-attrs" ,python-attrs)))
11820 (home-page "https://github.com/glyph/Automat")
11821 (synopsis "Self-service finite-state machines")
11822 (description "Automat is a library for concise, idiomatic Python
11823 expression of finite-state automata (particularly deterministic finite-state
11825 (license license:expat)))
11827 (define-public python2-automat
11828 (package-with-python2 python-automat))
11830 (define-public python-m2r
11832 (name "python-m2r")
11836 (uri (pypi-uri "m2r" version))
11839 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11840 (build-system python-build-system)
11842 `(("python-docutils" ,python-docutils)
11843 ("python-mistune" ,python-mistune)))
11845 `(("python-pygments" ,python-pygments)
11846 ("python-mock" ,python-mock)))
11847 (home-page "https://github.com/miyakogi/m2r")
11848 (synopsis "Markdown to reStructuredText converter")
11849 (description "M2R converts a markdown file including reST markups to valid
11851 (license license:expat)))
11853 (define-public python2-m2r
11854 (package-with-python2 python-m2r))
11856 (define-public python-constantly
11858 (name "python-constantly")
11862 (uri (pypi-uri "constantly" version))
11865 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11866 (build-system python-build-system)
11867 (home-page "https://github.com/twisted/constantly")
11868 (synopsis "Symbolic constants in Python")
11869 (description "Constantly is a Python library that provides symbolic
11870 constant support. It includes collections and constants with text, numeric,
11871 and bit flag values.")
11872 (license license:expat)))
11874 (define-public python2-constantly
11875 (package-with-python2 python-constantly))
11877 (define-public python-attrs
11879 (name "python-attrs")
11883 (uri (pypi-uri "attrs" version))
11886 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11887 (build-system python-build-system)
11889 `(#:modules ((guix build utils)
11890 (guix build python-build-system)
11894 #:phases (modify-phases %standard-phases
11897 (let ((cwd (getcwd)))
11898 (setenv "PYTHONPATH"
11901 (find (cut string-prefix? "lib" <>)
11902 (scandir (string-append cwd "/build")))
11904 (getenv "PYTHONPATH")))
11905 (invoke "python" "-m" "pytest")))))))
11907 `(("python-coverage" ,python-coverage)
11908 ("python-hypothesis" ,python-hypothesis)
11909 ("python-pympler" ,python-pympler)
11910 ("python-pytest" ,python-pytest)
11911 ("python-six" ,python-six)
11912 ("python-sphinx" ,python-sphinx)
11913 ("python-zope-interface" ,python-zope-interface)))
11914 (home-page "https://github.com/python-attrs/attrs/")
11915 (synopsis "Attributes without boilerplate")
11916 (description "@code{attrs} is a Python package with class decorators that
11917 ease the chores of implementing the most common attribute-related object
11919 (license license:expat)))
11921 (define-public python2-attrs
11922 (package-with-python2 python-attrs))
11924 (define-public python-attrs-bootstrap
11926 (inherit python-attrs)
11927 (name "python-attrs-bootstrap")
11928 (native-inputs `())
11929 (arguments `(#:tests? #f))))
11931 (define-public python2-attrs-bootstrap
11932 (package-with-python2 python-attrs-bootstrap))
11934 (define-public python2-cliapp
11936 (name "python2-cliapp")
11937 (version "1.20180812.1")
11941 (uri (string-append
11942 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11943 version ".tar.gz"))
11946 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11947 (build-system python-build-system)
11949 `(#:python ,python-2
11951 (modify-phases %standard-phases
11952 ;; check phase needs to be run before the build phase. If not,
11953 ;; coverage-test-runner looks for tests for the built source files,
11956 (add-before 'build 'check
11958 ;; Disable python3 tests
11959 (substitute* "check"
11960 (("python3") "# python3"))
11961 (invoke "./check"))))))
11963 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11964 ("python2-pep8" ,python2-pep8)))
11966 `(("python2-pyaml" ,python2-pyaml)))
11967 (home-page "https://liw.fi/cliapp/")
11968 (synopsis "Python framework for command line programs")
11969 (description "@code{python2-cliapp} is a python framework for
11970 command line programs. It contains the typical stuff such programs
11971 need to do, such as parsing the command line for options, and
11972 iterating over input files.")
11973 (license license:gpl2+)))
11975 (define-public python2-ttystatus
11977 (name "python2-ttystatus")
11982 (uri (string-append
11983 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11984 version ".tar.gz"))
11987 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11988 (build-system python-build-system)
11990 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11991 ("python2-pep8" ,python2-pep8)))
11993 `(#:python ,python-2
11995 (modify-phases %standard-phases
11996 ;; check phase needs to be run before the build phase. If not,
11997 ;; coverage-test-runner looks for tests for the built source files,
12000 (add-before 'build 'check
12001 (lambda _ (invoke "make" "check"))))))
12002 (home-page "https://liw.fi/ttystatus/")
12003 (synopsis "Python library for showing progress reporting and
12004 status updates on terminals")
12005 (description "@code{python2-ttystatus} is a python library for
12006 showing progress reporting and status updates on terminals, for
12007 command line programs. Output is automatically adapted to the width
12008 of the terminal: truncated if it does not fit, and resized if the
12009 terminal size changes.")
12010 (license license:gpl3+)))
12012 (define-public python2-tracing
12014 (name "python2-tracing")
12019 (uri (string-append
12020 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12021 version ".tar.gz"))
12024 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12025 (build-system python-build-system)
12027 `(#:python ,python-2))
12028 (home-page "https://liw.fi/tracing/")
12029 (synopsis "Python debug logging helper")
12030 (description "@code{python2-tracing} is a python library for
12031 logging debug messages. It provides a way to turn debugging messages
12032 on and off, based on the filename they occur in. It is much faster
12033 than using @code{logging.Filter} to accomplish the same thing, which
12034 matters when code is run in production mode. The actual logging still
12035 happens using the @code{logging} library.")
12036 (license license:gpl3+)))
12038 (define-public python2-larch
12040 (name "python2-larch")
12041 (version "1.20151025")
12045 (uri (string-append
12046 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12047 version ".tar.gz"))
12048 (patches (search-patches
12049 "python2-larch-coverage-4.0a6-compatibility.patch"))
12052 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12053 (build-system python-build-system)
12055 `(#:python ,python-2
12057 (modify-phases %standard-phases
12058 ;; check phase needs to be run before the build phase. If not,
12059 ;; coverage-test-runner looks for tests for the built source files,
12062 (add-before 'build 'check
12063 (lambda _ (invoke "make" "check"))))))
12065 `(("cmdtest" ,cmdtest)
12066 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12068 `(("python2-tracing" ,python2-tracing)))
12069 (home-page "https://liw.fi/larch/")
12070 (synopsis "Python copy-on-write B-tree library")
12071 (description "@code{python2-larch} is an implementation of
12072 particular kind of B-tree, based on research by Ohad Rodeh. See
12073 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12074 on the data structure.
12076 The distinctive feature of this B-tree is that a node is never
12077 (conceptually) modified. Instead, all updates are done by
12078 copy-on-write. This makes it easy to clone a tree, and modify only the
12079 clone, while other processes access the original tree.")
12080 (license license:gpl3+)))
12082 (define-public python-astroid
12084 (name "python-astroid")
12089 (uri (pypi-uri "astroid" version))
12092 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12093 (build-system python-build-system)
12095 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12096 ("python-six" ,python-six)
12097 ("python-wrapt" ,python-wrapt)))
12099 `(("python-dateutil" ,python-dateutil)
12100 ("python-nose" ,python-nose)
12101 ("python-pytest" ,python-pytest)
12102 ("python-pytest-runner" ,python-pytest-runner)))
12105 (modify-phases %standard-phases
12106 (add-after 'unpack 'remove-spurious-test
12108 ;; This can be removed after upgrading from python-3.7
12109 ;; https://github.com/PyCQA/astroid/issues/593
12110 ;; https://bugs.python.org/issue34056
12111 (delete-file "astroid/tests/unittest_modutils.py")
12115 (invoke "pytest" "astroid"))))))
12116 (home-page "https://github.com/PyCQA/astroid")
12117 (synopsis "Common base representation of python source code for pylint and
12119 (description "@code{python-astroid} provides a common base representation
12120 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12122 It provides a compatible representation which comes from the _ast module. It
12123 rebuilds the tree generated by the builtin _ast module by recursively walking
12124 down the AST and building an extended ast. The new node classes have
12125 additional methods and attributes for different usages. They include some
12126 support for static inference and local name scopes. Furthermore, astroid
12127 builds partial trees by inspecting living objects.")
12128 (license license:lgpl2.1+)
12129 (properties `((python2-variant . ,(delay python2-astroid))))))
12131 (define-public python2-astroid
12132 (let ((base (package-with-python2
12133 (strip-python2-variant python-astroid))))
12134 (package (inherit base)
12135 ;; Version 2.x removes python2 support.
12140 (uri (pypi-uri "astroid" version))
12143 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12145 (substitute-keyword-arguments (package-arguments base)
12147 `(modify-phases ,phases
12148 (add-after 'unpack 'remove-spurious-test
12150 ;; https://github.com/PyCQA/astroid/issues/276
12151 (delete-file "astroid/tests/unittest_brain.py")
12155 (invoke"python" "-m" "unittest" "discover"
12156 "-p" "unittest*.py")))))))
12157 (native-inputs `())
12159 `(("python2-backports-functools-lru-cache"
12160 ,python2-backports-functools-lru-cache)
12161 ("python2-enum34" ,python2-enum34)
12162 ("python2-singledispatch" ,python2-singledispatch)
12163 ,@(package-propagated-inputs base))))))
12165 (define-public python-isort
12167 (name "python-isort")
12172 (uri (git-reference
12173 ;; Tests pass only from the Github sources
12174 (url "https://github.com/timothycrosley/isort")
12176 (file-name (git-file-name name version))
12179 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12180 (build-system python-build-system)
12182 `(("python-mock" ,python-mock)
12183 ("python-pytest" ,python-pytest)))
12184 (home-page "https://github.com/timothycrosley/isort")
12185 (synopsis "Python utility/library to sort python imports")
12186 (description "@code{python-isort} is a python utility/library to sort
12187 imports alphabetically, and automatically separated into sections. It
12188 provides a command line utility, a python library and plugins for various
12190 (license license:expat)
12191 (properties `((python2-variant . ,(delay python2-isort))))))
12193 (define-public python2-isort
12194 (let ((base (package-with-python2
12195 (strip-python2-variant python-isort))))
12196 (package (inherit base)
12198 `(("python2-futures" ,python2-futures)
12199 ,@(package-native-inputs base))))))
12201 (define-public python2-backports-functools-lru-cache
12203 (name "python2-backports-functools-lru-cache")
12208 ;; only the pypi tarballs contain the necessary metadata
12209 (uri (pypi-uri "backports.functools_lru_cache" version))
12212 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12213 (build-system python-build-system)
12215 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12217 `(#:python ,python-2))
12218 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12219 (synopsis "Backport of functools.lru_cache from Python 3.3")
12220 (description "@code{python2-backports-functools-lru-cache} is a backport
12221 of @code{functools.lru_cache} from python 3.3.")
12222 (license license:expat)))
12224 (define-public python-configparser
12226 (name "python-configparser")
12231 (uri (pypi-uri "configparser" version))
12234 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12235 (build-system python-build-system)
12236 (home-page "https://github.com/jaraco/configparser/")
12237 (synopsis "Backport of configparser from python 3.5")
12238 (description "@code{python-configparser} is a backport of
12239 @code{configparser} from Python 3.5 so that it can be used directly
12240 in other versions.")
12241 (license license:expat)))
12243 (define-public python2-configparser
12244 (package-with-python2 python-configparser))
12246 (define-public python-mando
12248 (name "python-mando")
12252 (uri (pypi-uri "mando" version))
12255 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12256 (build-system python-build-system)
12258 `(("python-rst2ansi" ,python-rst2ansi)
12259 ("python-six" ,python-six)))
12261 `(("python-pytest" ,python-pytest)))
12262 (home-page "https://mando.readthedocs.org/")
12264 "Wrapper around argparse, allowing creation of complete CLI applications")
12266 "This package is a wrapper around argparse, allowing you to write complete CLI
12267 applications in seconds while maintaining all the flexibility.")
12268 (license license:expat)))
12270 (define-public python2-mando
12271 (package-with-python2 python-mando))
12273 (define-public python2-argparse
12275 (name "python2-argparse")
12280 (uri (pypi-uri "argparse" version))
12283 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12284 (build-system python-build-system)
12286 `(#:python ,python-2))
12287 (home-page "https://github.com/ThomasWaldmann/argparse/")
12288 (synopsis "Python command-line parsing library")
12290 "This package is mostly for people who want to have @code{argparse} on
12291 older Pythons because it was not part of the standard library back then.")
12292 (license license:psfl)))
12294 (define-public python-fudge
12296 (name "python-fudge")
12297 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12298 ;; package, which is currently the only use of this package.
12303 (uri (pypi-uri "fudge" version))
12306 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12307 (build-system python-build-system)
12309 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12310 (home-page "https://github.com/fudge-py/fudge")
12311 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12313 "Fudge is a Python module for using fake objects (mocks and stubs) to
12316 In readable Python code, you declare the methods available on your fake object
12317 and how they should be called. Then you inject that into your application and
12318 start testing. This declarative approach means you don’t have to record and
12319 playback actions and you don’t have to inspect your fakes after running code.
12320 If the fake object was used incorrectly then you’ll see an informative
12321 exception message with a traceback that points to the culprit.")
12322 (license license:expat)))
12324 (define-public python2-fudge
12325 (package-with-python2 python-fudge))
12327 (define-public python-mwclient
12329 (name "python-mwclient")
12334 ;; The PyPI version wouldn't contain tests.
12335 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12336 "v" version ".tar.gz"))
12337 (file-name (string-append name "-" version ".tar.gz"))
12340 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12341 (build-system python-build-system)
12343 `(("python-requests" ,python-requests)
12344 ("python-requests-oauthlib"
12345 ,python-requests-oauthlib)
12346 ("python-six" ,python-six)))
12348 `(("python-mock" ,python-mock)
12349 ("python-pytest" ,python-pytest)
12350 ("python-pytest-pep8" ,python-pytest-pep8)
12351 ("python-pytest-cache" ,python-pytest-cache)
12352 ("python-pytest-cov" ,python-pytest-cov)
12353 ("python-responses" ,python-responses)))
12354 (home-page "https://github.com/btongminh/mwclient")
12355 (synopsis "MediaWiki API client")
12356 (description "This package provides a MediaWiki API client.")
12357 (license license:expat)))
12359 (define-public python2-mwclient
12360 (package-with-python2 python-mwclient))
12362 (define-public python-utils
12364 (name "python-utils")
12368 (uri (pypi-uri "python-utils" version))
12371 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12372 (build-system python-build-system)
12374 `(("pytest-runner" ,python-pytest-runner)
12375 ("pytest" ,python-pytest)
12376 ("six" ,python-six)))
12377 (home-page "https://github.com/WoLpH/python-utils")
12378 (synopsis "Convenient utilities not included with the standard Python install")
12380 "Python Utils is a collection of small Python functions and classes which
12381 make common patterns shorter and easier.")
12382 (license license:bsd-2)))
12384 (define-public python2-utils
12385 (package-with-python2 python-utils))
12387 (define-public python-diff-match-patch
12389 (name "python-diff-match-patch")
12390 (version "20121119")
12394 (uri (pypi-uri "diff-match-patch" version))
12397 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12398 (build-system python-build-system)
12399 (home-page "https://code.google.com/p/google-diff-match-patch")
12400 (synopsis "Synchronize plain text")
12401 (description "Diff Match and Patch libraries offer robust algorithms to
12402 perform the operations required for synchronizing plain text.")
12403 (license license:asl2.0)))
12405 (define-public python2-diff-match-patch
12406 (package-with-python2 python-diff-match-patch))
12408 (define-public python-dirsync
12410 (name "python-dirsync")
12415 (uri (pypi-uri "dirsync" version))
12418 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12419 (build-system python-build-system)
12421 `(("six" ,python-six)))
12422 (home-page "https://bitbucket.org/tkhyn/dirsync")
12423 (synopsis "Advanced directory tree synchronisation tool")
12424 (description "Advanced directory tree synchronisation tool.")
12425 (license license:expat)))
12427 (define-public python2-dirsync
12428 (package-with-python2 python-dirsync))
12430 (define-public python-levenshtein
12432 (name "python-levenshtein")
12437 (uri (pypi-uri "python-Levenshtein" version))
12440 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12441 (build-system python-build-system)
12442 (home-page "https://github.com/ztane/python-Levenshtein")
12443 (synopsis "Fast computation of Levenshtein distance and string similarity")
12445 "The Levenshtein Python C extension module contains functions for fast computation of
12447 @item Levenshtein (edit) distance, and edit operations
12448 @item string similarity
12449 @item approximate median strings, and generally string averaging
12450 @item string sequence and set similarity
12452 It supports both normal and Unicode strings.")
12453 (license license:gpl2+)))
12455 (define-public python2-levenshtein
12456 (package-with-python2 python-levenshtein))
12458 (define-public python-scandir
12460 (name "python-scandir")
12465 (uri (pypi-uri "scandir" version))
12467 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12468 (build-system python-build-system)
12470 `(#:phases (modify-phases %standard-phases
12473 (invoke "python" "test/run_tests.py"))))))
12474 (home-page "https://github.com/benhoyt/scandir")
12475 (synopsis "Directory iteration function")
12477 "Directory iteration function like os.listdir(), except that instead of
12478 returning a list of bare filenames, it yields DirEntry objects that include
12479 file type and stat information along with the name. Using scandir() increases
12480 the speed of os.walk() by 2-20 times (depending on the platform and file
12481 system) by avoiding unnecessary calls to os.stat() in most cases.
12483 This package is part of the Python standard library since version 3.5.")
12484 (license license:bsd-3)))
12486 (define-public python2-scandir
12487 (package-with-python2 python-scandir))
12489 (define-public python2-stemming
12491 (name "python2-stemming")
12496 (uri (pypi-uri "stemming" version))
12498 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12499 (build-system python-build-system)
12501 `(#:python ,python-2))
12502 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12503 (synopsis "Python implementations of various stemming algorithms")
12505 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12506 stemming algorithms for English. These implementations are straightforward and
12507 efficient, unlike some Python versions of the same algorithms available on the
12508 Web. This package is an extraction of the stemming code included in the Whoosh
12510 (license license:public-domain)))
12512 (define-public python-factory-boy
12514 (name "python-factory-boy")
12519 (uri (pypi-uri "factory_boy" version))
12521 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12522 (build-system python-build-system)
12524 ;; Tests are not included in the tarball.
12527 `(("faker" ,python-faker)))
12528 (home-page "https://github.com/benhoyt/scandir")
12529 (synopsis "Versatile test fixtures replacement")
12531 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12533 As a fixtures replacement tool, it aims to replace static, hard to maintain
12534 fixtures with easy-to-use factories for complex object.
12536 Instead of building an exhaustive test setup with every possible combination
12537 of corner cases, factory_boy allows you to use objects customized for the
12538 current test, while only declaring the test-specific fields")
12539 (license license:expat)))
12541 (define-public python2-factory-boy
12542 (package-with-python2 python-factory-boy))
12544 (define-public python-translate-toolkit
12546 (name "python-translate-toolkit")
12551 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12553 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12554 (build-system python-build-system)
12556 `(("python-pytest" ,python-pytest)
12557 ("python-sphinx" ,python-sphinx)))
12559 `(("python-babel" ,python-babel)
12560 ("python-beautifulsoup4" ,python-beautifulsoup4)
12561 ("python-chardet" ,python-chardet)
12562 ("python-diff-match-patch" ,python-diff-match-patch)
12563 ("python-levenshtein" ,python-levenshtein)
12564 ("python-lxml" ,python-lxml)
12565 ("python-six" ,python-six)
12566 ("python-vobject" ,python-vobject)
12567 ("python-pyyaml" ,python-pyyaml)))
12569 ;; TODO: tests are not run, because they end with
12570 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12572 ;; during test setup.
12574 (home-page "https://toolkit.translatehouse.org")
12575 (synopsis "Tools and API for translation and localization engineering")
12577 "Tools and API for translation and localization engineering. It contains
12578 several utilities, as well as an API for building localization tools.")
12579 (license license:gpl2+)))
12581 (define-public python2-translate-toolkit
12582 (package-with-python2 python-translate-toolkit))
12584 (define-public python-packaging
12586 (name "python-packaging")
12591 (uri (pypi-uri "packaging" version))
12594 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12595 (build-system python-build-system)
12597 `(#:phases (modify-phases %standard-phases
12599 (lambda _ (invoke "py.test" "-vv"))))))
12601 `(("python-pretend" ,python-pretend)
12602 ("python-pytest" ,python-pytest)))
12604 `(("python-pyparsing" ,python-pyparsing)
12605 ("python-six" ,python-six)))
12606 (home-page "https://github.com/pypa/packaging")
12607 (synopsis "Core utilities for Python packages")
12608 (description "Packaging is a Python module for dealing with Python packages.
12609 It offers an interface for working with package versions, names, and dependency
12611 ;; From 'LICENSE': This software is made available under the terms of
12612 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12613 ;; Contributions to this software is made under the terms of *both* these
12615 (license (list license:asl2.0 license:bsd-2))))
12617 (define-public python2-packaging
12618 (package-with-python2 python-packaging))
12620 (define-public python-relatorio
12622 (name "python-relatorio")
12627 (uri (pypi-uri "relatorio" version))
12630 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12631 (build-system python-build-system)
12633 `(("python-lxml" ,python-lxml)
12634 ("python-genshi" ,python-genshi)))
12636 `(("python-magic" ,python-magic)))
12637 (home-page "https://relatorio.tryton.org/")
12638 (synopsis "Templating library able to output ODT and PDF files")
12639 (description "Relatorio is a templating library which provides a way to
12640 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12641 for more filetypes can be easily added by creating plugins for them.")
12642 (license license:gpl3+)))
12644 (define-public python2-relatorio
12645 (package-with-python2 python-relatorio))
12647 (define-public python-radon
12649 (name "python-radon")
12654 (uri (pypi-uri "radon" version))
12657 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12658 (build-system python-build-system)
12660 `(#:phases (modify-phases %standard-phases
12663 (invoke "python" "radon/tests/run.py"))))))
12665 `(("python-colorama" ,python-colorama)
12666 ("python-flake8-polyfill" ,python-flake8-polyfill)
12667 ("python-mando" ,python-mando)))
12669 `(("python-pytest" ,python-pytest)
12670 ("python-pytest-mock" ,python-pytest-mock)))
12671 (home-page "https://radon.readthedocs.org/")
12672 (synopsis "Code Metrics in Python")
12673 (description "Radon is a Python tool which computes various code metrics.
12674 Supported metrics are:
12676 @item raw metrics: SLOC, comment lines, blank lines, &c.
12677 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12678 @item Halstead metrics (all of them)
12679 @item the Maintainability Index (a Visual Studio metric)
12681 (license license:expat)))
12683 (define-public python2-radon
12684 (package-with-python2 python-radon))
12686 (define-public python-sure
12688 (name "python-sure")
12693 (uri (pypi-uri "sure" version))
12696 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12697 (build-system python-build-system)
12699 `(("python-mock" ,python-mock)
12700 ("python-six" ,python-six)))
12702 `(("python-nose" ,python-nose)))
12703 (home-page "https://github.com/gabrielfalcao/sure")
12704 (synopsis "Automated testing library in python for python")
12706 "Sure is a python library that leverages a DSL for writing assertions.
12707 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12708 (license license:gpl3+)))
12710 (define-public python2-sure
12711 (package-with-python2 python-sure))
12713 (define-public python2-couleur
12714 ;; This package does not seem to support python3 at all, hence,
12715 ;; only the python2 variant definition is provided.
12717 (name "python2-couleur")
12722 (uri (pypi-uri "couleur" version))
12725 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12726 (build-system python-build-system)
12728 `(#:python ,python-2))
12729 (home-page "https://github.com/gabrielfalcao/couleur")
12731 "ANSI terminal tool for python, colored shell and other handy fancy features")
12733 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12734 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12735 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12736 ;; https://github.com/gabrielfalcao/couleur/issues/11
12737 (license license:lgpl3+)))
12739 (define-public python-misaka
12741 (name "python-misaka")
12746 (uri (pypi-uri "misaka" version))
12749 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12750 (build-system python-build-system)
12752 `(;; Line 37 of setup.py calls self.run_command('develop')
12753 ;; in the 'check' phase. This command seems to be trying
12755 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12756 ;; for which it does not have the permission to write.
12759 `(("python-cffi" ,python-cffi)))
12760 (home-page "https://github.com/FSX/misaka")
12761 (synopsis "Python binding for Hoedown")
12763 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12764 library written in C. It features a fast HTML renderer and functionality to make custom
12765 renderers (e.g. man pages or LaTeX).")
12766 (license license:expat)))
12768 (define-public python2-misaka
12769 (package-with-python2 python-misaka))
12771 (define-public python2-steadymark
12772 ;; This is forced into being a python2 only variant
12773 ;; due to its dependence on couleur that has no support
12776 (name "python2-steadymark")
12781 (uri (pypi-uri "steadymark" version))
12784 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12785 (build-system python-build-system)
12787 `(("python-couleur" ,python2-couleur)
12788 ("python-sure" ,python2-sure)
12789 ("python-misaka" ,python2-misaka)))
12791 `(#:python ,python-2
12793 (modify-phases %standard-phases
12794 (add-before 'build 'patch-setup-py
12796 ;; Update requirements from dependency==version
12797 ;; to dependency>=version
12798 (substitute* "setup.py"
12801 (home-page "https://github.com/gabrielfalcao/steadymark")
12802 (synopsis "Markdown-based test runner for python")
12804 "@code{Steadymark} allows documentation to be written in github-flavoured
12805 markdown. The documentation may contain snippets of code surrounded by python
12806 code blocks and @code{Steadymark} will find these snippets and run them, making
12807 sure that there are no old malfunctional examples in the documentation examples.")
12808 (license license:expat)))
12810 (define-public python-jsonpointer
12812 (name "python-jsonpointer")
12817 (uri (pypi-uri "jsonpointer" version))
12820 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12821 (build-system python-build-system)
12822 (home-page "https://github.com/stefankoegl/python-json-pointer")
12823 (synopsis "Identify specific nodes in a JSON document")
12824 (description "@code{jsonpointer} allows you to access specific nodes
12825 by path in a JSON document (see RFC 6901).")
12826 (license license:bsd-3)))
12828 (define-public python2-jsonpointer
12829 (package-with-python2 python-jsonpointer))
12831 (define-public python-jsonpatch
12833 (name "python-jsonpatch")
12838 ;; pypi version lacks tests.js
12839 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12840 "archive/v" version ".tar.gz"))
12841 (file-name (string-append name "-" version ".tar.gz"))
12844 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12845 (build-system python-build-system)
12847 `(("python-jsonpointer" ,python-jsonpointer)))
12848 (home-page "https://github.com/stefankoegl/python-json-patch")
12849 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12850 (description "@code{jsonpatch} is a library and program that allows
12851 applying JSON Patches according to RFC 6902.")
12852 (license license:bsd-3)))
12854 (define-public python2-jsonpatch
12855 (package-with-python2 python-jsonpatch))
12857 (define-public python-jsonpatch-0.4
12858 (package (inherit python-jsonpatch)
12859 (name "python-jsonpatch")
12864 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12865 "archive/v" version ".tar.gz"))
12866 (file-name (string-append name "-" version ".tar.gz"))
12869 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12871 (define-public python2-jsonpatch-0.4
12872 (package-with-python2 python-jsonpatch-0.4))
12874 (define-public python-rfc3986
12876 (name "python-rfc3986")
12880 (uri (pypi-uri "rfc3986" version))
12883 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12884 (build-system python-build-system)
12886 `(#:modules ((guix build utils)
12887 (guix build python-build-system)
12892 (modify-phases %standard-phases
12895 (let ((cwd (getcwd)))
12896 (setenv "PYTHONPATH"
12897 (string-append cwd "/build/"
12898 (find (cut string-prefix? "lib" <>)
12899 (scandir (string-append cwd "/build")))
12901 (getenv "PYTHONPATH")))
12902 (invoke "pytest" "-v")))))))
12904 `(("python-pytest" ,python-pytest)))
12905 (home-page "https://rfc3986.readthedocs.io/")
12906 (synopsis "Parse and validate URI references")
12908 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12909 validation and authority parsing. This module also supports RFC@tie{}6874
12910 which adds support for zone identifiers to IPv6 addresses.")
12911 (license license:asl2.0)))
12913 (define-public python2-rfc3986
12914 (package-with-python2 python-rfc3986))
12916 (define-public python-rfc3987
12918 (name "python-rfc3987")
12923 (uri (pypi-uri "rfc3987" version))
12926 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12927 (build-system python-build-system)
12928 (home-page "https://pypi.python.org/pypi/rfc3987")
12929 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12930 (description "@code{rfc3987} provides routines for parsing and
12931 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12932 (license license:gpl3+)))
12934 (define-public python2-rfc3987
12935 (package-with-python2 python-rfc3987))
12937 (define-public python-validate-email
12939 (name "python-validate-email")
12944 (uri (pypi-uri "validate_email" version))
12947 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12948 (build-system python-build-system)
12949 (home-page "https://github.com/syrusakbary/validate_email")
12950 (synopsis "Verifies if an email address is valid and really exists")
12951 (description "@code{validate_email} can be used to verify if an email
12952 address is valid and really exists.")
12953 (license license:lgpl3+)))
12955 (define-public python2-validate-email
12956 (package-with-python2 python-validate-email))
12958 (define-public python-flex
12960 (name "python-flex")
12965 (uri (pypi-uri "flex" version))
12968 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12969 (build-system python-build-system)
12971 `(("python-click" ,python-click)
12972 ("python-iso8601" ,python-iso8601)
12973 ("python-jsonpointer" ,python-jsonpointer)
12974 ("python-pyyaml" ,python-pyyaml)
12975 ("python-requests" ,python-requests)
12976 ("python-rfc3987" ,python-rfc3987)
12977 ("python-six" ,python-six)
12978 ("python-validate-email" ,python-validate-email)))
12979 (home-page "https://github.com/pipermerriam/flex")
12980 (synopsis "Validates Swagger schemata")
12981 (description "@code{flex} can be used to validate Swagger schemata.")
12982 (license license:bsd-3)))
12984 (define-public python2-flex
12985 (package-with-python2 python-flex))
12987 (define-public python-marshmallow
12989 (name "python-marshmallow")
12990 (version "3.0.0b14")
12994 (uri (pypi-uri "marshmallow" version))
12997 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12998 (build-system python-build-system)
13000 `(("python-dateutil" ,python-dateutil)
13001 ("python-simplejson" ,python-simplejson)))
13003 `(("python-pytest" ,python-pytest)
13004 ("python-pytz" ,python-pytz)))
13005 (home-page "https://github.com/marshmallow-code/marshmallow")
13006 (synopsis "Convert complex datatypes to and from native
13007 Python datatypes.")
13008 (description "@code{marshmallow} provides a library for converting
13009 complex datatypes to and from native Python datatypes.")
13010 (license license:expat)))
13012 (define-public python2-marshmallow
13013 (package-with-python2 python-marshmallow))
13015 (define-public python-apispec
13017 (name "python-apispec")
13022 (uri (pypi-uri "apispec" version))
13025 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13026 (build-system python-build-system)
13028 `(("python-pyyaml" ,python-pyyaml)))
13030 `(("python-pytest" ,python-pytest)
13031 ("python-flask" ,python-flask)
13032 ("python-marshmallow" ,python-marshmallow)
13033 ("python-tornado" ,python-tornado)
13034 ("python-bottle" ,python-bottle)
13035 ("python-mock" ,python-mock)))
13036 (home-page "https://github.com/marshmallow-code/apispec")
13037 (synopsis "Swagger 2.0 API specification generator")
13038 (description "@code{python-apispec} is a pluggable API specification
13039 generator. Currently supports the OpenAPI specification (f.k.a.
13041 (license license:expat)))
13043 (define-public python2-apispec
13044 (package-with-python2 python-apispec))
13046 (define-public python-flasgger
13048 (name "python-flasgger")
13053 (uri (git-reference
13054 (url "https://github.com/rochacbruno/flasgger.git")
13056 (file-name (git-file-name name version))
13058 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13059 (build-system python-build-system)
13062 (modify-phases %standard-phases
13064 (lambda* (#:key inputs outputs #:allow-other-keys)
13065 (substitute* "Makefile"
13066 (("flake8 flasgger --ignore=F403")
13067 "flake8 flasgger --ignore=E731,F403"))
13068 (setenv "PYTHONPATH" (string-append (getcwd)
13070 (getenv "PYTHONPATH")))
13071 (invoke "py.test"))))))
13073 `(("python-flask" ,python-flask)
13074 ("python-pyyaml" ,python-pyyaml)
13075 ("python-jsonschema" ,python-jsonschema)
13076 ("python-mistune" ,python-mistune)
13077 ("python-six" ,python-six)))
13079 `(("python-decorator" ,python-decorator)
13080 ("python-flake8" ,python-flake8)
13081 ("python-flask-restful" ,python-flask-restful)
13082 ("python-flex" ,python-flex)
13083 ("python-pytest" ,python-pytest)
13084 ("python-pytest-cov" ,python-pytest-cov)
13085 ("python-marshmallow" ,python-marshmallow)
13086 ("python-apispec" ,python-apispec)))
13087 (home-page "https://github.com/rochacbruno/flasgger/")
13088 (synopsis "Extract Swagger specs from your Flask project")
13089 (description "@code{python-flasgger} allows extracting Swagger specs
13090 from your Flask project. It is a fork of Flask-Swagger.")
13091 (license license:expat)))
13093 (define-public python2-flasgger
13094 (package-with-python2 python-flasgger))
13096 (define-public python-swagger-spec-validator
13098 (name "python-swagger-spec-validator")
13103 (uri (pypi-uri "swagger-spec-validator" version))
13106 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13107 (build-system python-build-system)
13109 `(("python-jsonschema" ,python-jsonschema)
13110 ("python-six" ,python-six)))
13112 "https://github.com/Yelp/swagger_spec_validator")
13113 (synopsis "Validation of Swagger specifications")
13114 (description "@code{swagger_spec_validator} provides a library for
13115 validating Swagger API specifications.")
13116 (license license:asl2.0)))
13118 (define-public python2-swagger-spec-validator
13119 (package-with-python2 python-swagger-spec-validator))
13121 (define-public python-apache-libcloud
13123 (name "python-apache-libcloud")
13128 (uri (pypi-uri "apache-libcloud" version))
13131 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13132 (build-system python-build-system)
13135 (modify-phases %standard-phases
13136 (add-after 'unpack 'patch-ssh
13137 (lambda* (#:key inputs #:allow-other-keys)
13138 (substitute* "libcloud/compute/ssh.py"
13139 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13142 (add-after 'unpack 'patch-tests
13144 (substitute* "./libcloud/test/test_file_fixtures.py"
13145 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13146 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13147 return (httplib.OK,
13149 {\"test\": \"value\"},
13150 httplib.responses[httplib.OK])
13152 (substitute* "libcloud/test/compute/test_ssh_client.py"
13153 (("class ShellOutSSHClientTests")
13154 "@unittest.skip(\"Guix container doesn't have ssh service\")
13155 class ShellOutSSHClientTests")
13156 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13157 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13158 (("'.xF0', '.x90', '.x8D', '.x88'")
13159 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13161 (add-before 'check 'copy-secret
13163 (copy-file "libcloud/test/secrets.py-dist"
13164 "libcloud/test/secrets.py")
13167 `(("openssh" ,openssh)))
13169 `(("python-paramiko" ,python-paramiko)
13170 ("python-requests" ,python-requests)))
13172 `(("python-lockfile" ,python-lockfile)
13173 ("python-mock" ,python-mock)
13174 ("python-pytest" ,python-pytest)
13175 ("python-pytest-runner" ,python-pytest-runner)
13176 ("python-requests-mock" ,python-requests-mock)))
13177 (home-page "https://libcloud.apache.org/")
13178 (synopsis "Unified Cloud API")
13179 (description "@code{libcloud} is a Python library for interacting with
13180 many of the popular cloud service providers using a unified API.")
13181 (license license:asl2.0)))
13183 (define-public python2-apache-libcloud
13184 (package-with-python2 python-apache-libcloud))
13186 (define-public python-smmap2
13188 (name "python-smmap2")
13193 (uri (pypi-uri "smmap2" version))
13196 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13197 (build-system python-build-system)
13199 `(("python-nosexcover" ,python-nosexcover)))
13200 (home-page "https://github.com/Byron/smmap")
13201 (synopsis "Python sliding window memory map manager")
13202 (description "@code{smmap2} is a pure Python implementation of a sliding
13203 window memory map manager.")
13204 (license license:bsd-3)))
13206 (define-public python2-smmap2
13207 (package-with-python2 python-smmap2))
13209 (define-public python-regex
13211 (name "python-regex")
13212 (version "2019.04.14")
13215 (uri (pypi-uri "regex" version))
13218 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13219 ;; TODO: Fix and enable regex_test.py tests that complain about the
13220 ;; test.support module not existing.
13221 (build-system python-build-system)
13222 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13223 (synopsis "Alternative regular expression module")
13224 (description "This regular expression implementation is backwards-
13225 compatible with the standard @code{re} module, but offers additional
13226 functionality like full case-folding for case-insensitive matches in Unicode.")
13227 (license license:psfl)))
13229 (define-public python2-regex
13230 (package-with-python2 python-regex))
13232 (define-public python2-pyopengl
13234 (name "python2-pyopengl")
13239 (uri (pypi-uri "PyOpenGL" version))
13242 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13244 `(#:python ,python-2))
13245 (build-system python-build-system)
13246 (home-page "http://pyopengl.sourceforge.net")
13247 (synopsis "Standard OpenGL bindings for Python")
13249 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13250 related APIs. The binding is created using the standard @code{ctypes}
13252 (license license:bsd-3)))
13254 (define-public python2-pyopengl-accelerate
13256 (inherit python2-pyopengl)
13257 (name "python2-pyopengl-accelerate")
13262 (uri (pypi-uri "PyOpenGL-accelerate" version))
13265 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13266 (synopsis "Acceleration code for PyOpenGL")
13268 "This is the Cython-coded accelerator module for PyOpenGL.")))
13270 (define-public python-rencode
13272 (name "python-rencode")
13277 (uri (pypi-uri "rencode" version))
13280 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13281 (build-system python-build-system)
13284 (modify-phases %standard-phases
13285 (add-before 'check 'delete-bogus-test
13286 ;; This test requires /home/aresch/Downloads, which is not provided by
13287 ;; the build environment.
13289 (delete-file "rencode/t.py")
13291 (native-inputs `(("pkg-config" ,pkg-config)
13292 ("python-cython" ,python-cython)))
13293 (home-page "https://github.com/aresch/rencode")
13294 (synopsis "Serialization of heterogeneous data structures")
13296 "The @code{rencode} module is a data structure serialization library,
13297 similar to @code{bencode} from the BitTorrent project. For complex,
13298 heterogeneous data structures with many small elements, r-encoding stake up
13299 significantly less space than b-encodings. This version of rencode is a
13300 complete rewrite in Cython to attempt to increase the performance over the
13301 pure Python module.")
13302 (license license:bsd-3)))
13304 (define-public python2-rencode
13305 (package-with-python2 python-rencode))
13307 (define-public python-xenon
13309 (name "python-xenon")
13314 (uri (pypi-uri "xenon" version))
13317 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13318 (build-system python-build-system)
13320 `(("python-pyyaml" ,python-pyyaml)
13321 ("python-radon" ,python-radon)
13322 ("python-requests" ,python-requests)
13323 ("python-flake8" ,python-flake8)
13324 ("python-tox" ,python-tox)))
13327 (modify-phases %standard-phases
13328 (add-before 'build 'patch-test-requirements
13330 ;; Remove httpretty dependency for tests.
13331 (substitute* "setup.py"
13332 (("httpretty") ""))
13334 (home-page "https://xenon.readthedocs.org/")
13335 (synopsis "Monitor code metrics for Python on your CI server")
13337 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13338 Ideally, @code{xenon} is run every time code is committed. Through command
13339 line options, various thresholds can be set for the complexity of code. It
13340 will fail (i.e. it will exit with a non-zero exit code) when any of these
13341 requirements is not met.")
13342 (license license:expat)))
13344 (define-public python2-xenon
13345 (package-with-python2 python-xenon))
13347 (define-public python-pysocks
13349 (name "python-pysocks")
13354 (uri (pypi-uri "PySocks" version))
13357 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13358 (build-system python-build-system)
13359 (arguments `(#:tests? #f))
13360 (home-page "https://github.com/Anorov/PySocks")
13361 (synopsis "SOCKS client module")
13362 (description "@code{pysocks} is an updated and semi-actively maintained
13363 version of @code{SocksiPy} with bug fixes and extra features.")
13364 (license license:bsd-3)))
13366 (define-public python2-pysocks
13367 (package-with-python2 python-pysocks))
13369 (define-public python-pydiff
13371 (name "python-pydiff")
13376 (uri (pypi-uri "pydiff" version))
13379 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13380 (build-system python-build-system)
13381 (home-page "https://github.com/myint/pydiff")
13382 (synopsis "Library to diff two Python files at the bytecode level")
13384 "@code{pydiff} makes it easy to look for actual code changes while
13385 ignoring formatting changes.")
13386 (license license:expat)))
13388 (define-public python2-pydiff
13389 (package-with-python2 python-pydiff))
13391 (define-public python-tqdm
13393 (name "python-tqdm")
13398 (uri (pypi-uri "tqdm" version))
13401 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13402 (build-system python-build-system)
13404 `(("python-flake8" ,python-flake8)
13405 ("python-nose" ,python-nose)
13406 ("python-coverage" ,python-coverage)))
13407 (home-page "https://github.com/tqdm/tqdm")
13408 (synopsis "Fast, extensible progress meter")
13410 "Make loops show a progress bar on the console by just wrapping any
13411 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13412 design and layout.")
13413 (license (list license:mpl2.0 license:expat))))
13415 (define-public python2-tqdm
13416 (package-with-python2 python-tqdm))
13418 (define-public python-pkginfo
13420 (name "python-pkginfo")
13425 (uri (pypi-uri "pkginfo" version))
13428 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13429 (build-system python-build-system)
13431 ;; The tests are broken upstream.
13434 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13436 "Query metadatdata from sdists, bdists, and installed packages")
13438 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13439 source distriubtion (an sdist) or a binary distribution (e.g., created by
13440 running bdist_egg). It can also query the EGG-INFO directory of an installed
13441 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13442 created by running @code{python setup.py develop}).")
13443 (license license:expat)))
13445 (define-public python2-pkginfo
13446 (package-with-python2 python-pkginfo))
13448 (define-public python-twine
13450 (name "python-twine")
13455 (uri (pypi-uri "twine" version))
13458 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13459 (build-system python-build-system)
13461 `(("python-tqdm" ,python-tqdm)
13462 ("python-pkginfo" ,python-pkginfo)
13463 ("python-requests" ,python-requests)
13464 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13465 (home-page "https://github.com/pypa/twine")
13466 (synopsis "Collection of utilities for interacting with PyPI")
13468 "@code{twine} currently supports registering projects and uploading
13469 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13470 their files and supports any packaging format (including wheels).")
13471 (license license:asl2.0)))
13473 (define-public python2-twine
13474 (package-with-python2 python-twine))
13476 (define-public python-linecache2
13478 (name "python-linecache2")
13483 (uri (pypi-uri "linecache2" version))
13486 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13487 (build-system python-build-system)
13489 `(;; The tests depend on unittest2, and our version is a bit too old.
13492 `(("python-pbr" ,python-pbr-minimal)))
13494 "https://github.com/testing-cabal/linecache2")
13495 (synopsis "Backports of the linecache module")
13497 "The linecache module allows one to get any line from any file, while
13498 attempting to optimize internally, using a cache, the common case where many
13499 lines are read from a single file.")
13500 (license license:psfl)))
13502 (define-public python2-linecache2
13503 (package-with-python2 python-linecache2))
13505 (define-public python-traceback2
13507 (name "python-traceback2")
13512 (uri (pypi-uri "traceback2" version))
13515 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13516 (build-system python-build-system)
13518 `(;; python-traceback2 and python-unittest2 depend on one another.
13521 `(("python-pbr" ,python-pbr-minimal)))
13523 `(("python-linecache2" ,python-linecache2)))
13525 "https://github.com/testing-cabal/traceback2")
13526 (synopsis "Backports of the traceback module")
13528 "This module provides a standard interface to extract, format and print
13529 stack traces of Python programs. It exactly mimics the behavior of the Python
13530 interpreter when it prints a stack trace.")
13531 (license license:psfl)))
13533 (define-public python2-traceback2
13534 (package-with-python2 python-traceback2))
13536 (define-public python-ratelimiter
13538 (name "python-ratelimiter")
13543 (uri (pypi-uri "ratelimiter" version))
13546 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13547 (build-system python-build-system)
13549 '(#:tests? #f)) ; There are no tests in the pypi archive.
13550 (home-page "https://github.com/RazerM/ratelimiter")
13551 (synopsis "Simple rate limiting object")
13553 "The @code{ratelimiter} module ensures that an operation will not be
13554 executed more than a given number of times during a given period.")
13555 (license license:asl2.0)))
13557 (define-public python2-ratelimiter
13558 (package-with-python2 python-ratelimiter))
13560 (define-public python-dukpy
13562 (name "python-dukpy")
13567 (uri (git-reference
13568 (url "https://github.com/kovidgoyal/dukpy.git")
13569 (commit (string-append "v" version))))
13570 (file-name (git-file-name name version))
13572 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13573 (build-system python-build-system)
13574 (home-page "https://github.com/kovidgoyal/dukpy")
13575 (synopsis "Run JavaScript in python")
13577 "dukpy is a JavaScript runtime environment for Python using the duktape
13578 embeddable JavaScript engine.")
13579 ;; Dukpy is licensed under MIT like the embedded duktape library,
13580 ;; with 'errors.c' as GPL3.
13581 (license (list license:expat license:gpl3))))
13583 (define-public python2-dukpy
13584 (package-with-python2 python-dukpy))
13586 (define-public python-jsonrpclib-pelix
13588 (name "python-jsonrpclib-pelix")
13593 (uri (pypi-uri "jsonrpclib-pelix" version))
13596 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13597 (build-system python-build-system)
13599 `(#:tests? #f)) ; no tests in PyPI tarball
13600 (home-page "https://github.com/tcalmant/jsonrpclib/")
13601 (synopsis "JSON-RPC 2.0 client library for Python")
13603 "This library implements the JSON-RPC v2.0
13604 specification (backwards-compatible) as a client library for Python. This
13605 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13607 (license license:asl2.0)))
13609 (define-public python2-jsonrpclib-pelix
13610 (package-with-python2 python-jsonrpclib-pelix))
13612 (define-public python-setuptools-scm-git-archive
13614 (name "python-setuptools-scm-git-archive")
13619 (uri (pypi-uri "setuptools_scm_git_archive" version))
13622 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13623 (build-system python-build-system)
13625 `(("python-pytest" ,python-pytest)))
13627 `(("python-setuptools-scm" ,python-setuptools-scm)))
13628 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13629 (synopsis "Setuptools_scm plugin for git archives")
13631 "The setuptools_scm_git_archive package is a plugin to
13632 setuptools_scm, which supports obtaining versions from git archives that
13633 belong to tagged versions.")
13634 (license license:expat)))
13636 (define-public python2-setuptools-scm-git-archive
13637 (package-with-python2 python-setuptools-scm-git-archive))
13639 (define-public python-setuptools-git
13641 (name "python-setuptools-git")
13646 (uri (pypi-uri "setuptools-git" version))
13649 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13650 (build-system python-build-system)
13653 (modify-phases %standard-phases
13654 ;; This is needed for tests.
13655 (add-after 'unpack 'configure-git
13657 (setenv "HOME" "/tmp")
13658 (invoke "git" "config" "--global" "user.email" "guix")
13659 (invoke "git" "config" "--global" "user.name" "guix")
13662 `(("git" ,git-minimal)))
13663 (home-page "https://github.com/msabramo/setuptools-git")
13664 (synopsis "Setuptools revision control system plugin for Git")
13666 "This package provides a plugin for Setuptools for revision control with
13668 (license license:bsd-3)))
13670 (define-public python-pyclipper
13672 (name "python-pyclipper")
13673 (version "1.1.0.post1")
13677 (uri (pypi-uri "pyclipper" version ".zip"))
13680 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13681 (modules '((guix build utils)))
13684 ;; This file is generated by Cython.
13685 (delete-file "pyclipper/pyclipper.cpp") #t))))
13686 (build-system python-build-system)
13689 (modify-phases %standard-phases
13690 (add-before 'build 'cythonize-sources
13692 (with-directory-excursion "pyclipper"
13693 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13695 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13697 `(("python-cython" ,python-cython)
13698 ("python-pytest" ,python-pytest)
13699 ("python-pytest-runner" ,python-pytest-runner)
13700 ("python-unittest2" ,python-unittest2)
13702 (home-page "https://github.com/greginvm/pyclipper")
13703 (synopsis "Wrapper for Angus Johnson's Clipper library")
13705 "Pyclipper is a Cython wrapper for the C++ translation of the
13706 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13707 (license license:expat)))
13709 (define-public python2-pyclipper
13710 (package-with-python2 python-pyclipper))
13712 (define-public python2-booleanoperations
13714 (name "python2-booleanoperations")
13719 (uri (pypi-uri "booleanOperations" version ".zip"))
13722 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13723 (build-system python-build-system)
13725 `(#:python ,python-2))
13728 ("python2-pytest" ,python2-pytest)
13729 ("python2-pytest-runner" ,python2-pytest-runner)))
13731 `(("python-fonttools" ,python2-fonttools)
13732 ("python-pyclipper" ,python2-pyclipper)
13733 ("python-ufolib" ,python2-ufolib)))
13734 (home-page "https://github.com/typemytype/booleanOperations")
13735 (synopsis "Boolean operations on paths")
13737 "BooleanOperations provides a Python library that enables
13738 boolean operations on paths.")
13739 (license license:expat)))
13741 (define-public python-tempdir
13743 (name "python-tempdir")
13748 (uri (pypi-uri "tempdir" version))
13751 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13752 (build-system python-build-system)
13753 (home-page "https://pypi.org/project/tempdir/")
13755 ;; the package has no tests
13757 (synopsis "Python library for managing temporary directories")
13759 "This library manages temporary directories that are automatically
13760 deleted with all their contents when they are no longer needed. It is
13761 particularly convenient for use in tests.")
13762 (license license:expat)))
13764 (define-public python2-tempdir
13765 (package-with-python2 python-tempdir))
13767 (define-public python-activepapers
13769 (name "python-activepapers")
13774 (uri (pypi-uri "ActivePapers.Py" version))
13777 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13778 (build-system python-build-system)
13780 `(#:modules ((ice-9 ftw)
13783 (guix build python-build-system))
13786 (modify-phases %standard-phases
13787 (add-after 'unpack 'delete-python2-code
13789 (for-each delete-file
13790 '("lib/activepapers/builtins2.py"
13791 "lib/activepapers/standardlib2.py"
13792 "lib/activepapers/utility2.py"))))
13795 ;; Deactivate the test cases that download files
13796 (setenv "NO_NETWORK_ACCESS" "1")
13797 ;; For some strange reason, some tests fail if nosetests runs all
13798 ;; test modules in a single execution. They pass if each test
13799 ;; module is run individually.
13800 (for-each (lambda (filename)
13801 (invoke "nosetests"
13802 (string-append "tests/" filename)))
13805 (string-suffix? ".py" filename)))))))))
13807 `(("python-tempdir" ,python-tempdir)
13808 ("python-nose" ,python-nose)))
13810 `(("python-h5py" ,python-h5py)))
13811 (home-page "http://www.activepapers.org/")
13812 (synopsis "Executable papers for scientific computing")
13814 "ActivePapers is a tool for working with executable papers, which
13815 combine data, code, and documentation in single-file packages,
13816 suitable for publication as supplementary material or on repositories
13817 such as figshare or Zenodo.")
13818 (properties `((python2-variant . ,(delay python2-activepapers))))
13819 (license license:bsd-3)))
13821 (define-public python2-activepapers
13822 (let ((base (package-with-python2
13823 (strip-python2-variant python-activepapers))))
13827 (substitute-keyword-arguments (package-arguments base)
13829 `(modify-phases ,phases
13830 (delete 'delete-python2-code)
13831 (add-after 'unpack 'delete-python3-code
13833 (for-each delete-file
13834 '("lib/activepapers/builtins3.py"
13835 "lib/activepapers/standardlib3.py"
13836 "lib/activepapers/utility3.py")))))))))))
13838 (define-public python-semver
13840 (name "python-semver")
13845 (uri (pypi-uri "semver" version))
13848 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13849 (build-system python-build-system)
13852 (modify-phases %standard-phases
13853 (add-after 'unpack 'patch-test-requirements
13855 (substitute* "setup.py"
13856 ;; Our Python is new enough.
13857 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13860 `(("python-tox" ,python-tox)
13861 ("python-virtualenv" ,python-virtualenv)))
13862 (home-page "https://github.com/k-bx/python-semver")
13863 (synopsis "Python helper for Semantic Versioning")
13864 (description "This package provides a Python library for
13865 @url{Semantic Versioning, http://semver.org/}.")
13866 (license license:bsd-3)))
13868 (define-public python2-semver
13869 (package-with-python2 python-semver))
13871 (define-public python-pyro4
13873 (name "python-pyro4")
13878 (uri (pypi-uri "Pyro4" version))
13880 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13881 (build-system python-build-system)
13883 `(("python-serpent" ,python-serpent)))
13884 (home-page "https://pyro4.readthedocs.io")
13885 (synopsis "Distributed object middleware for Python")
13887 "Pyro enables you to build applications in which objects can talk to each
13888 other over the network. You can just use normal Python method calls to call
13889 objects on other machines, also known as remote procedure calls (RPC).")
13890 (license license:expat)))
13892 (define-public python2-pyro
13894 (name "python2-pyro")
13899 (uri (pypi-uri "Pyro" version))
13900 (file-name (string-append "Pyro-" version ".tar.gz"))
13903 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13904 (build-system python-build-system)
13906 ;; Pyro is not compatible with Python 3
13907 `(#:python ,python-2
13908 ;; Pyro has no test cases for automatic execution
13910 (home-page "http://pythonhosted.org/Pyro/")
13911 (synopsis "Distributed object manager for Python")
13912 (description "Pyro is a Distributed Object Technology system
13913 written in Python that is designed to be easy to use. It resembles
13914 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13915 which is a system and language independent Distributed Object Technology
13916 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13917 longer maintained. New projects should use Pyro4 instead, which
13918 is the new Pyro version that is actively developed.")
13919 (license license:expat)))
13921 (define-public python2-scientific
13923 (name "python2-scientific")
13928 (uri (string-append "https://bitbucket.org/khinsen/"
13929 "scientificpython/downloads/ScientificPython-"
13930 version ".tar.gz"))
13931 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13934 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13935 (build-system python-build-system)
13937 `(("netcdf" ,netcdf)))
13939 `(("python-numpy" ,python2-numpy-1.8)
13940 ("python-pyro" ,python2-pyro)))
13942 ;; ScientificPython is not compatible with Python 3
13943 `(#:python ,python-2
13944 #:tests? #f ; No test suite
13946 (modify-phases %standard-phases
13948 (lambda* (#:key inputs #:allow-other-keys)
13949 (invoke "python" "setup.py" "build"
13950 (string-append "--netcdf_prefix="
13951 (assoc-ref inputs "netcdf"))))))))
13952 (home-page "https://bitbucket.org/khinsen/scientificpython")
13953 (synopsis "Python modules for scientific computing")
13954 (description "ScientificPython is a collection of Python modules that are
13955 useful for scientific computing. Most modules are rather general (Geometry,
13956 physical units, automatic derivatives, ...) whereas others are more
13957 domain-specific (e.g. netCDF and PDB support). The library is currently
13958 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13959 (license license:cecill-c)))
13961 (define-public python2-mmtk
13963 (name "python2-mmtk")
13968 (uri (string-append "https://bitbucket.org/khinsen/"
13969 "mmtk/downloads/MMTK-" version ".tar.gz"))
13970 (file-name (string-append "MMTK-" version ".tar.gz"))
13973 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13974 (build-system python-build-system)
13976 `(("netcdf" ,netcdf)))
13978 `(("python-scientific" ,python2-scientific)
13979 ("python-tkinter" ,python-2 "tk")))
13981 `(#:python ,python-2
13984 (modify-phases %standard-phases
13985 (add-before 'build 'includes-from-scientific
13986 (lambda* (#:key inputs #:allow-other-keys)
13987 (mkdir-p "Include/Scientific")
13990 (assoc-ref inputs "python-scientific")
13991 "/include/python2.7/Scientific")
13992 "Include/Scientific"))))))
13993 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13994 (synopsis "Python library for molecular simulation")
13995 (description "MMTK is a library for molecular simulations with an emphasis
13996 on biomolecules. It provides widely used methods such as Molecular Dynamics
13997 and normal mode analysis, but also basic routines for implementing new methods
13998 for simulation and analysis. The library is currently not actively maintained
13999 and works only with Python 2 and NumPy < 1.9.")
14000 (license license:cecill-c)))
14002 (define-public python-phonenumbers
14004 (name "python-phonenumbers")
14009 (uri (pypi-uri "phonenumbers" version))
14012 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14013 (build-system python-build-system)
14015 "https://github.com/daviddrysdale/python-phonenumbers")
14017 "Python library for dealing with international phone numbers")
14019 "This package provides a Python port of Google's libphonenumber library.")
14020 (license license:asl2.0)))
14022 (define-public python2-phonenumbers
14023 (package-with-python2 python-phonenumbers))
14025 (define-public python-send2trash
14027 (name "python-send2trash")
14030 (origin (method git-fetch)
14031 ;; Source tarball on PyPI doesn't include tests.
14032 (uri (git-reference
14033 (url "https://github.com/hsoft/send2trash.git")
14035 (file-name (git-file-name name version))
14038 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14039 (build-system python-build-system)
14042 (modify-phases %standard-phases
14043 (add-before 'check 'pre-check
14045 (mkdir-p "/tmp/foo")
14046 (setenv "HOME" "/tmp/foo")
14048 (home-page "https://github.com/hsoft/send2trash")
14049 (synopsis "Send files to the user's @file{~/Trash} directory")
14050 (description "This package provides a Python library to send files to the
14051 user's @file{~/Trash} directory.")
14052 (properties `((python2-variant . ,(delay python2-send2trash))))
14053 (license license:bsd-3)))
14055 (define-public python2-send2trash
14057 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14059 (substitute-keyword-arguments (package-arguments python-send2trash)
14061 `(modify-phases ,phases
14062 (add-before 'check 'setenv
14064 (setenv "PYTHONPATH"
14065 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14068 (define-public python-yapf
14070 (name "python-yapf")
14075 (uri (pypi-uri "yapf" version))
14078 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14079 (build-system python-build-system)
14080 (home-page "https://github.com/google/yapf")
14081 (synopsis "Formatter for Python code")
14082 (description "YAPF is a formatter for Python code. It's based off of
14083 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14084 takes the code and reformats it to the best formatting that conforms to the
14085 style guide, even if the original code didn't violate the style guide.")
14086 (license license:asl2.0)))
14088 (define-public python2-yapf
14089 (package-with-python2 python-yapf))
14091 (define-public python-gyp
14092 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14095 (name "python-gyp")
14096 ;; Google does not release versions,
14097 ;; based on second most recent commit date.
14098 (version (git-version "0.0.0" revision commit))
14101 ;; Google does not release tarballs,
14102 ;; git checkout is needed.
14104 (uri (git-reference
14105 (url "https://chromium.googlesource.com/external/gyp")
14107 (file-name (git-file-name name version))
14110 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14111 (build-system python-build-system)
14112 (home-page "https://gyp.gsrc.io/")
14113 (synopsis "GYP is a Meta-Build system")
14115 "GYP builds build systems for large, cross platform applications.
14116 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14117 files, and Makefiles.")
14118 (license license:bsd-3))))
14120 (define-public python2-gyp
14121 (package-with-python2 python-gyp))
14123 (define-public python-whatever
14125 (name "python-whatever")
14130 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14134 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14135 (file-name (string-append name "-" version ".tar.gz"))))
14136 (build-system python-build-system)
14139 (modify-phases %standard-phases
14142 (invoke "py.test"))))))
14144 `(("python-pytest" ,python-pytest)))
14145 (home-page "http://github.com/Suor/whatever")
14146 (synopsis "Make anonymous functions by partial application of operators")
14147 (description "@code{whatever} provides an easy way to make anonymous
14148 functions by partial application of operators.")
14149 (license license:bsd-3)))
14151 (define-public python2-whatever
14152 (package-with-python2 python-whatever))
14154 (define-public python-funcy
14156 (name "python-funcy")
14161 (uri (git-reference
14162 (url "https://github.com/Suor/funcy.git")
14165 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14166 (file-name (git-file-name name version))))
14167 (build-system python-build-system)
14170 (modify-phases %standard-phases
14173 (invoke "py.test"))))))
14175 `(("python-pytest" ,python-pytest)
14176 ("python-whatever" ,python-whatever)))
14177 (home-page "http://github.com/Suor/funcy")
14178 (synopsis "Functional tools")
14179 (description "@code{funcy} is a library that provides functional tools.
14182 @item merge - Merges collections of the same type
14183 @item walk - Type-preserving map
14184 @item select - Selects a part of a collection
14185 @item take - Takes the first n items of a collection
14186 @item first - Takes the first item of a collection
14187 @item remove - Predicated-removes items of a collection
14188 @item concat - Concatenates two collections
14189 @item flatten - Flattens a collection with subcollections
14190 @item distinct - Returns only distinct items
14191 @item split - Predicated-splits a collection
14192 @item split_at - Splits a collection at a given item
14193 @item group_by - Groups items by group
14194 @item pairwise - Pairs off adjacent items
14195 @item partial - Partially-applies a function
14196 @item curry - Curries a function
14197 @item compose - Composes functions
14198 @item complement - Complements a predicate
14199 @item all_fn - \"all\" with predicate
14201 (license license:bsd-3)))
14203 (define-public python2-funcy
14204 (package-with-python2 python-funcy))
14206 (define-public python-isoweek
14208 (name "python-isoweek")
14213 (uri (pypi-uri "isoweek" version))
14216 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14217 (build-system python-build-system)
14218 (home-page "https://github.com/gisle/isoweek")
14219 (synopsis "Objects representing a week")
14220 (description "The @code{isoweek} module provide the class Week that
14221 implements the week definition of ISO 8601. This standard also defines
14222 a notation for identifying weeks; yyyyWww (where the W is a literal).
14223 Week instances stringify to this form.")
14224 (license license:bsd-3)))
14226 (define-public python2-isoweek
14227 (package-with-python2 python-isoweek))
14229 (define-public python-tokenize-rt
14231 (name "python-tokenize-rt")
14236 (uri (pypi-uri "tokenize-rt" version))
14239 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14240 (build-system python-build-system)
14241 (home-page "https://github.com/asottile/tokenize-rt")
14242 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14244 "This Python library is a wrapper around @code{tokenize} from the Python
14245 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14246 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14247 and @code{tokens_to_src} to roundtrip.")
14248 (license license:expat)))
14250 (define-public python-future-fstrings
14252 (name "python-future-fstrings")
14257 (uri (pypi-uri "future_fstrings" version))
14260 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14261 (build-system python-build-system)
14263 `(("python-tokenize-rt" ,python-tokenize-rt)))
14264 (home-page "https://github.com/asottile/future-fstrings")
14265 (synopsis "Backport of fstrings to Python < 3.6")
14267 "This package provides a UTF-8 compatible encoding
14268 @code{future_fstrings}, which performs source manipulation. It decodes the
14269 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14270 @code{f} strings.")
14271 (license license:expat)))
14273 (define-public python-typed-ast
14275 (name "python-typed-ast")
14280 (uri (pypi-uri "typed-ast" version))
14283 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14284 (build-system python-build-system)
14286 `(#:modules ((guix build utils)
14287 (guix build python-build-system)
14292 (modify-phases %standard-phases
14295 (let ((cwd (getcwd)))
14296 (setenv "PYTHONPATH"
14297 (string-append cwd "/build/"
14298 (find (cut string-prefix? "lib" <>)
14299 (scandir (string-append cwd "/build")))
14301 (getenv "PYTHONPATH"))))
14304 (native-inputs `(("python-pytest" ,python-pytest)))
14305 (home-page "https://github.com/python/typed_ast")
14306 (synopsis "Fork of Python @code{ast} modules with type comment support")
14307 (description "This package provides a parser similar to the standard
14308 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14309 include PEP 484 type comments and are independent of the version of Python
14310 under which they are run. The @code{typed_ast} parsers produce the standard
14311 Python AST (plus type comments), and are both fast and correct, as they are
14312 based on the CPython 2.7 and 3.7 parsers.")
14313 ;; See the file "LICENSE" for the details.
14314 (license (list license:psfl
14316 license:expat)))) ;ast27/Parser/spark.py
14318 (define-public python-typing
14320 (name "python-typing")
14325 (uri (pypi-uri "typing" version))
14328 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14329 (build-system python-build-system)
14330 (home-page "https://docs.python.org/3/library/typing.html")
14331 (synopsis "Type hints for Python")
14332 (description "This is a backport of the standard library @code{typing}
14333 module to Python versions older than 3.5. Typing defines a standard notation
14334 for Python function and variable type annotations. The notation can be used
14335 for documenting code in a concise, standard format, and it has been designed
14336 to also be used by static and runtime type checkers, static analyzers, IDEs
14338 (license license:psfl)))
14340 (define-public python2-typing
14341 (package-with-python2 python-typing))
14343 (define-public python-typing-extensions
14345 (name "python-typing-extensions")
14350 (uri (pypi-uri "typing_extensions" version))
14353 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14354 (build-system python-build-system)
14356 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14357 (synopsis "Experimental type hints for Python")
14359 "The typing_extensions module contains additional @code{typing} hints not
14360 yet present in the of the @code{typing} standard library.
14361 Included are implementations of:
14364 @item ContextManager
14375 @item TYPE_CHECKING
14376 @item AsyncGenerator
14378 (license license:psfl)))
14380 (define-public bpython
14387 (uri (pypi-uri "bpython" version))
14390 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14391 (build-system python-build-system)
14394 (modify-phases %standard-phases
14395 (add-after 'unpack 'remove-failing-test
14397 ;; Remove failing test. FIXME: make it pass
14398 (delete-file "bpython/test/test_args.py")
14400 (add-after 'wrap 'add-aliases
14401 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14402 (lambda* (#:key outputs #:allow-other-keys)
14403 (let ((out (assoc-ref outputs "out")))
14406 (symlink old (string-append out "/bin/" new)))
14407 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14408 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14411 `(("python-pygments" ,python-pygments)
14412 ("python-requests" ,python-requests)
14413 ("python-babel" ,python-babel) ; optional, for internationalization
14414 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14415 ("python-greenlet" ,python-greenlet)
14416 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14417 ("python-six" ,python-six)))
14419 `(("python-sphinx" ,python-sphinx)
14420 ("python-mock" ,python-mock)))
14421 (home-page "https://bpython-interpreter.org/")
14422 (synopsis "Fancy interface to the Python interpreter")
14423 (description "Bpython is a fancy interface to the Python
14424 interpreter. bpython's main features are
14427 @item in-line syntax highlighting,
14428 @item readline-like autocomplete with suggestions displayed as you type,
14429 @item expected parameter list for any Python function,
14430 @item \"rewind\" function to pop the last line of code from memory and
14432 @item send the code you've entered off to a pastebin,
14433 @item save the code you've entered to a file, and
14434 @item auto-indentation.
14436 (license license:expat)))
14438 (define-public bpython2
14439 (let ((base (package-with-python2
14440 (strip-python2-variant bpython))))
14441 (package (inherit base)
14444 `(#:python ,python-2
14446 (modify-phases %standard-phases
14447 (add-after 'unpack 'remove-failing-test
14449 ;; Remove failing test. FIXME: make it pass
14450 (delete-file "bpython/test/test_args.py")
14451 ;; Disable failing test-cases (renaming inhibits they are
14453 (substitute* "bpython/test/test_curtsies_repl.py"
14454 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14455 (string-append a "xxx_off_" b))
14456 (("^(\\s*def )(test_complex\\W)" _ a b)
14457 (string-append a "xxx_off_" b)))
14459 (add-before 'build 'rename-scripts
14460 ;; rename the scripts to bypthon2, bpdb2, etc.
14462 (substitute* "setup.py"
14463 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14464 (string-append name "2" rest "\n"))
14465 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14466 (string-append name "2" (or sub "") rest "\n")))
14469 (define-public python-pyinotify
14471 (name "python-pyinotify")
14475 (uri (pypi-uri "pyinotify" version))
14478 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14479 (build-system python-build-system)
14480 (arguments `(#:tests? #f)) ;no tests
14481 (home-page "https://github.com/seb-m/pyinotify")
14482 (synopsis "Python library for monitoring inotify events")
14484 "@code{pyinotify} provides a Python interface for monitoring
14485 file system events on Linux.")
14486 (license license:expat)))
14488 (define-public python2-pyinotify
14489 (package-with-python2 python-pyinotify))
14491 ;; Ada parser uses this version.
14492 (define-public python2-quex-0.67.3
14494 (name "python2-quex")
14499 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14500 (version-major+minor version)
14501 "/quex-" version ".zip"))
14504 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14505 (build-system python-build-system)
14507 `(("unzip" ,unzip)))
14509 `(#:python ,python-2
14512 (modify-phases %standard-phases
14513 (delete 'configure)
14516 (lambda* (#:key outputs #:allow-other-keys)
14517 (let* ((out (assoc-ref outputs "out"))
14518 (share/quex (string-append out "/share/quex"))
14519 (bin (string-append out "/bin")))
14520 (copy-recursively "." share/quex)
14522 (symlink (string-append share/quex "/quex-exe.py")
14523 (string-append bin "/quex"))
14525 (native-search-paths
14526 (list (search-path-specification
14527 (variable "QUEX_PATH")
14528 (files '("share/quex")))))
14529 (home-page "http://quex.sourceforge.net/")
14530 (synopsis "Lexical analyzer generator in Python")
14531 (description "@code{quex} is a lexical analyzer generator in Python.")
14532 (license license:lgpl2.1+))) ; Non-military
14534 (define-public python2-quex
14535 (package (inherit python2-quex-0.67.3)
14536 (name "python2-quex")
14541 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14544 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14545 (file-name (string-append name "-" version ".tar.gz"))))))
14547 (define-public python-more-itertools
14549 (name "python-more-itertools")
14554 (uri (pypi-uri "more-itertools" version))
14557 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14558 (build-system python-build-system)
14559 (home-page "https://github.com/erikrose/more-itertools")
14560 (synopsis "More routines for operating on iterables, beyond itertools")
14561 (description "Python's built-in @code{itertools} module implements a
14562 number of iterator building blocks inspired by constructs from APL, Haskell,
14563 and SML. @code{more-itertools} includes additional building blocks for
14564 working with iterables.")
14565 (properties `((python2-variant . ,(delay python2-more-itertools))))
14566 (license license:expat)))
14568 ;; The 5.x series are the last versions supporting Python 2.7.
14569 (define-public python2-more-itertools
14571 (inherit python-more-itertools)
14572 (name "python2-more-itertools")
14576 (uri (pypi-uri "more-itertools" version))
14579 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14581 `(#:python ,python2-minimal))
14583 `(("python2-six" ,python2-six-bootstrap)))))
14585 (define-public python-latexcodec
14587 (name "python-latexcodec")
14592 (uri (pypi-uri "latexcodec" version))
14594 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14595 (build-system python-build-system)
14597 `(("python-six" ,python-six)))
14598 (home-page "https://readthedocs.org/projects/latexcodec/")
14599 (synopsis "Work with LaTeX code in Python")
14600 (description "Lexer and codec to work with LaTeX code in Python.")
14601 (license license:expat)))
14603 (define-public python-pybtex
14605 (name "python-pybtex")
14610 (uri (pypi-uri "pybtex" version))
14613 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14614 (build-system python-build-system)
14616 `(("python-nose" ,python-nose)))
14618 `(("python-latexcodec" ,python-latexcodec)
14619 ("python-pyyaml" ,python-pyyaml)
14620 ("python-six" ,python-six)))
14622 `(#:test-target "nosetests"))
14623 (home-page "https://pybtex.org/")
14624 (synopsis "BibTeX-compatible bibliography processor")
14625 (description "Pybtex is a BibTeX-compatible bibliography processor written
14626 in Python. You can simply type pybtex instead of bibtex.")
14627 (license license:expat)))
14629 (define-public python-onetimepass
14631 (name "python-onetimepass")
14636 (uri (pypi-uri "onetimepass" version))
14638 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14639 (build-system python-build-system)
14640 (propagated-inputs `(("python-six" ,python-six)))
14641 (home-page "https://github.com/tadeck/onetimepass/")
14642 (synopsis "One-time password library")
14643 (description "Python one-time password library for HMAC-based (HOTP) and
14644 time-based (TOTP) passwords.")
14645 (license license:expat)))
14647 (define-public python-parso
14649 (name "python-parso")
14654 (uri (pypi-uri "parso" version))
14657 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14659 `(("python-pytest" ,python-pytest)))
14660 (build-system python-build-system)
14661 (home-page "https://github.com/davidhalter/parso")
14662 (synopsis "Python Parser")
14663 (description "Parso is a Python parser that supports error recovery and
14664 round-trip parsing for different Python versions (in multiple Python versions).
14665 Parso is also able to list multiple syntax errors in your Python file.")
14666 (license license:expat)))
14668 (define-public python2-parso
14669 (package-with-python2 python-parso))
14671 (define-public python-async-generator
14673 (name "python-async-generator")
14678 (uri (pypi-uri "async_generator" version))
14681 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14682 (build-system python-build-system)
14684 `(("python-pytest" ,python-pytest)))
14685 (home-page "https://github.com/python-trio/async_generator")
14686 (synopsis "Async generators and context managers for Python 3.5+")
14687 (description "@code{async_generator} back-ports Python 3.6's native async
14688 generators and Python 3.7's context managers into Python 3.5.")
14690 (license (list license:expat license:asl2.0))))
14692 (define-public python-async-timeout
14694 (name "python-async-timeout")
14699 (uri (pypi-uri "async-timeout" version))
14702 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14703 (build-system python-build-system)
14704 (home-page "https://github.com/aio-libs/async_timeout/")
14705 (synopsis "Timeout context manager for asyncio programs")
14706 (description "@code{async-timeout} provides a timeout timeout context
14707 manager compatible with @code{asyncio}.")
14708 (license license:asl2.0)))
14710 (define-public python-glob2
14712 (name "python-glob2")
14717 (uri (git-reference
14718 (url "https://github.com/miracle2k/python-glob2.git")
14720 (file-name (git-file-name name version))
14722 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14723 (build-system python-build-system)
14724 (home-page "https://github.com/miracle2k/python-glob2/")
14725 (synopsis "Extended Version of the python buildin glob module")
14726 (description "This is an extended version of the Python
14727 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14731 @item The ability to capture the text matched by glob patterns, and return
14732 those matches alongside the file names.
14733 @item A recursive @code{**} globbing syntax, akin for example to the
14734 @code{globstar} option of Bash.
14735 @item The ability to replace the file system functions used, in order to glob
14736 on virtual file systems.
14737 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14740 Glob2 currently based on the glob code from Python 3.3.1.")
14741 (license license:bsd-2)))
14743 (define-public python2-glob2
14744 (package-with-python2 python-glob2))
14746 (define-public python-gipc
14748 (name "python-gipc")
14753 (uri (pypi-uri "gipc" version ".zip"))
14756 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14757 (build-system python-build-system)
14759 `(("unzip" ,unzip)))
14761 `(("python-gevent" ,python-gevent)))
14762 (home-page "http://gehrcke.de/gipc")
14763 (synopsis "Child process management in the context of gevent")
14764 (description "Usage of Python's multiprocessing package in a
14765 gevent-powered application may raise problems. With @code{gipc},
14766 process-based child processes can safely be created anywhere within a
14767 gevent-powered application.")
14768 (license license:expat)))
14770 (define-public python2-gipc
14771 (package-with-python2 python-gipc))
14773 (define-public python-fusepy
14775 (name "python-fusepy")
14780 (uri (pypi-uri "fusepy" version))
14783 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14784 (build-system python-build-system)
14787 (modify-phases %standard-phases
14788 (add-before 'build 'set-library-file-name
14789 (lambda* (#:key inputs #:allow-other-keys)
14790 (let ((fuse (assoc-ref inputs "fuse")))
14791 (substitute* "fuse.py"
14792 (("find_library\\('fuse'\\)")
14793 (string-append "'" fuse "/lib/libfuse.so'")))
14797 (home-page "https://github.com/fusepy/fusepy")
14798 (synopsis "Simple ctypes bindings for FUSE")
14799 (description "Python module that provides a simple interface to FUSE and
14800 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14801 (license license:isc)))
14803 (define-public python2-fusepy
14804 (package-with-python2 python-fusepy))
14806 (define-public python2-gdrivefs
14808 (name "python2-gdrivefs")
14813 (uri (pypi-uri "gdrivefs" version))
14816 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14817 (build-system python-build-system)
14819 `(#:python ,python-2
14821 (modify-phases %standard-phases
14822 (add-before 'build 'patch-setup-py
14824 ;; Update requirements from dependency==version
14825 ;; to dependency>=version
14826 (substitute* "gdrivefs/resources/requirements.txt"
14830 `(("python2-gipc" ,python2-gipc)
14831 ("python2-gevent" ,python2-gevent)
14832 ("python2-greenlet" ,python2-greenlet)
14833 ("python2-httplib2" ,python2-httplib2)
14834 ("python2-uritemplate" ,python2-uritemplate)
14835 ("python2-oauth2client" ,python2-oauth2client)
14836 ("python2-six" ,python2-six)))
14838 `(("python2-dateutil" ,python2-dateutil)
14839 ("python2-fusepy" ,python2-fusepy)
14840 ("python2-google-api-client" ,python2-google-api-client)))
14841 (home-page "https://github.com/dsoprea/GDriveFS")
14842 (synopsis "Mount Google Drive as a local file system")
14843 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14844 under Python 2.7.")
14845 (license license:gpl2)))
14847 (define-public pybind11
14853 (uri (git-reference
14854 (url "https://github.com/pybind/pybind11.git")
14855 (commit (string-append "v" version))))
14858 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14859 (file-name (git-file-name name version))))
14860 (build-system cmake-build-system)
14862 `(("python" ,python)
14863 ("python-pytest" ,python-pytest)))
14865 `(#:test-target "check"))
14866 (home-page "https://github.com/pybind/pybind11/")
14867 (synopsis "Seamless operability between C++11 and Python")
14868 (description "pybind11 is a lightweight header-only library that exposes
14869 C++ types in Python and vice versa, mainly to create Python bindings of
14870 existing C++ code. Its goals and syntax are similar to the excellent
14871 Boost.Python library by David Abrahams: to minimize boilerplate code in
14872 traditional extension modules by inferring type information using compile-time
14874 (license license:expat)))
14876 (define-public python-fasteners
14878 (name "python-fasteners")
14883 (uri (pypi-uri "fasteners" version))
14886 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14887 (build-system python-build-system)
14889 `(("python-monotonic" ,python-monotonic)
14890 ("python-six" ,python-six)
14891 ("python-testtools" ,python-testtools)))
14892 (home-page "https://github.com/harlowja/fasteners")
14893 (synopsis "Python package that provides useful locks")
14895 "This package provides a Python program that provides following locks:
14898 @item Locking decorator
14899 @item Reader-writer locks
14900 @item Inter-process locks
14901 @item Generic helpers
14903 (properties `((python2-variant . ,(delay python2-fasteners))))
14904 (license license:asl2.0)))
14906 (define-public python2-fasteners
14907 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14911 `(("python2-futures" ,python2-futures)
14912 ,@(package-propagated-inputs base))))))
14914 (define-public python-requests-file
14916 (name "python-requests-file")
14921 (uri (pypi-uri "requests-file" version))
14924 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14925 (build-system python-build-system)
14927 `(("python-requests" ,python-requests)
14928 ("python-six" ,python-six)))
14930 "https://github.com/dashea/requests-file")
14931 (synopsis "File transport adapter for Requests")
14933 "Requests-File is a transport adapter for use with the Requests Python
14934 library to allow local file system access via @code{file://} URLs.")
14935 (license license:asl2.0)))
14937 (define-public python2-requests-file
14938 (package-with-python2 python-requests-file))
14940 (define-public python-tldextract
14942 (name "python-tldextract")
14947 (uri (pypi-uri "tldextract" version))
14950 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14951 (build-system python-build-system)
14953 `(("python-pytest" ,python-pytest)
14954 ("python-responses" ,python-responses)))
14956 `(("python-idna" ,python-idna)
14957 ("python-requests" ,python-requests)
14958 ("python-requests-file" ,python-requests-file)))
14960 "https://github.com/john-kurkowski/tldextract")
14962 "Separate the TLD from the registered domain and subdomains of a URL")
14964 "TLDExtract accurately separates the TLD from the registered domain and
14965 subdomains of a URL, using the Public Suffix List. By default, this includes
14966 the public ICANN TLDs and their exceptions. It can optionally support the
14967 Public Suffix List's private domains as well.")
14968 (license license:bsd-3)))
14970 (define-public python2-tldextract
14971 (package-with-python2 python-tldextract))
14973 (define-public python-pynamecheap
14975 (name "python-pynamecheap")
14980 (uri (pypi-uri "PyNamecheap" version))
14983 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14984 (build-system python-build-system)
14986 `(("python-requests" ,python-requests)))
14988 "https://github.com/Bemmu/PyNamecheap")
14990 "Namecheap API client in Python")
14992 "PyNamecheap is a Namecheap API client in Python.")
14993 (license license:expat)))
14995 (define-public python2-pynamecheap
14996 (package-with-python2 python-pynamecheap))
14998 (define-public python-dns-lexicon
15000 (name "python-dns-lexicon")
15005 (uri (pypi-uri "dns-lexicon" version))
15008 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15009 (build-system python-build-system)
15011 `(#:tests? #f)) ;requires internet access
15013 `(("python-future" ,python-future)
15014 ("python-pynamecheap" ,python-pynamecheap)
15015 ("python-requests" ,python-requests)
15016 ("python-tldextract" ,python-tldextract)
15017 ("python-urllib3" ,python-urllib3)))
15018 (home-page "https://github.com/AnalogJ/lexicon")
15020 "Manipulate DNS records on various DNS providers")
15022 "Lexicon provides a way to manipulate DNS records on multiple DNS
15023 providers in a standardized way. It has a CLI but it can also be used as a
15024 Python library. It was designed to be used in automation, specifically with
15026 (license license:expat)))
15028 (define-public python2-dns-lexicon
15029 (package-with-python2 python-dns-lexicon))
15031 (define-public python-commandlines
15033 (name "python-commandlines")
15038 (uri (pypi-uri "commandlines" version))
15041 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15042 (build-system python-build-system)
15043 (home-page "https://github.com/chrissimpkins/commandlines")
15044 (synopsis "Command line argument to object parsing library")
15046 "@code{Commandlines} is a Python library for command line application
15047 development that supports command line argument parsing, command string
15048 validation testing and application logic.")
15049 (license license:expat)))
15051 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15052 ;; python-numba. They have a very unflexible relationship.
15053 (define-public python-numba
15055 (name "python-numba")
15060 (uri (pypi-uri "numba" version))
15063 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15064 (build-system python-build-system)
15066 `(#:modules ((guix build utils)
15067 (guix build python-build-system)
15072 (modify-phases %standard-phases
15073 (add-after 'unpack 'disable-proprietary-features
15075 (setenv "NUMBA_DISABLE_HSA" "1")
15076 (setenv "NUMBA_DISABLE_CUDA" "1")
15078 (add-after 'unpack 'remove-failing-tests
15080 ;; FIXME: these tests fail for unknown reasons:
15081 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15082 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15083 (substitute* "numba/tests/test_dispatcher.py"
15084 (("def test(_non_writable_pycache)" _ m)
15085 (string-append "def guix_skip" m))
15086 (("def test(_non_creatable_pycache)" _ m)
15087 (string-append "def guix_skip" m))
15088 (("def test(_frozen)" _ m)
15089 (string-append "def guix_skip" m)))
15091 ;; These tests fail because we don't run the tests from the build
15092 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15093 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15094 (substitute* "numba/tests/test_pycc.py"
15095 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15096 (string-append "def guix_skip" m)))
15100 (let ((cwd (getcwd)))
15101 (setenv "PYTHONPATH"
15102 (string-append cwd "/build/"
15103 (find (cut string-prefix? "lib" <>)
15104 (scandir (string-append cwd "/build")))
15106 (getenv "PYTHONPATH")))
15107 ;; Something is wrong with the PYTHONPATH when running the
15108 ;; tests from the build directory, as it complains about not being
15109 ;; able to import certain modules.
15110 (with-directory-excursion "/tmp"
15111 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15114 `(("python-llvmlite" ,python-llvmlite)
15115 ("python-numpy" ,python-numpy)
15116 ("python-singledispatch" ,python-singledispatch)))
15117 ;; Needed for tests.
15119 `(("python-jinja2" ,python-jinja2)
15120 ("python-pygments" ,python-pygments)))
15121 (home-page "https://numba.pydata.org")
15122 (synopsis "Compile Python code using LLVM")
15123 (description "Numba gives you the power to speed up your applications with
15124 high performance functions written directly in Python. With a few
15125 annotations, array-oriented and math-heavy Python code can be just-in-time
15126 compiled to native machine instructions, similar in performance to C, C++ and
15127 Fortran, without having to switch languages or Python interpreters.
15129 Numba works by generating optimized machine code using the LLVM compiler
15130 infrastructure at import time, runtime, or statically (using the included pycc
15132 (license license:bsd-3)))
15134 (define-public python-anndata
15136 (name "python-anndata")
15141 (uri (pypi-uri "anndata" version))
15144 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15145 (build-system python-build-system)
15147 `(("python-h5py" ,python-h5py)
15148 ("python-natsort" ,python-natsort)
15149 ("python-pandas" ,python-pandas)
15150 ("python-scipy" ,python-scipy)))
15151 (home-page "https://github.com/theislab/anndata")
15152 (synopsis "Annotated data for data analysis pipelines")
15153 (description "Anndata is a package for simple (functional) high-level APIs
15154 for data analysis pipelines. In this context, it provides an efficient,
15155 scalable way of keeping track of data together with learned annotations and
15156 reduces the code overhead typically encountered when using a mostly
15157 object-oriented library such as @code{scikit-learn}.")
15158 (license license:bsd-3)))
15160 (define-public python-dill
15162 (name "python-dill")
15167 (uri (pypi-uri "dill" version))
15169 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15170 (build-system python-build-system)
15171 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15172 (arguments '(#:tests? #f))
15173 (home-page "https://pypi.org/project/dill")
15174 (synopsis "Serialize all of Python")
15175 (description "Dill extends Python's @code{pickle} module for serializing
15176 and de-serializing Python objects to the majority of the built-in Python
15177 types. Dill provides the user the same interface as the @code{pickle} module,
15178 and also includes some additional features. In addition to pickling Python
15179 objects, @code{dill} provides the ability to save the state of an interpreter
15180 session in a single command. Hence, it would be feasible to save a
15181 interpreter session, close the interpreter, ship the pickled file to another
15182 computer, open a new interpreter, unpickle the session and thus continue from
15183 the saved state of the original interpreter session.")
15184 (license license:bsd-3)))
15186 (define-public python-multiprocess
15188 (name "python-multiprocess")
15189 (version "0.70.6.1")
15193 (uri (pypi-uri "multiprocess" version))
15196 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15197 (build-system python-build-system)
15199 `(("python-dill" ,python-dill)))
15200 (home-page "https://pypi.org/project/multiprocess")
15201 (synopsis "Multiprocessing and multithreading in Python")
15203 "This package is a fork of the multiprocessing Python package, a package
15204 which supports the spawning of processes using the API of the standard
15205 library's @code{threading} module.")
15206 (license license:bsd-3)))
15208 (define-public python-toolz
15210 (name "python-toolz")
15215 (uri (pypi-uri "toolz" version))
15218 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15219 (build-system python-build-system)
15220 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15221 ;; unregistered loader type"
15222 (arguments '(#:tests? #f))
15223 (home-page "https://github.com/pytoolz/toolz/")
15224 (synopsis "List processing tools and functional utilities")
15226 "This package provides a set of utility functions for iterators,
15227 functions, and dictionaries.")
15228 (license license:bsd-3)))
15230 (define-public python2-toolz
15231 (package-with-python2 python-toolz))
15233 (define-public python-cytoolz
15235 (name "python-cytoolz")
15236 (version "0.9.0.1")
15240 (uri (pypi-uri "cytoolz" version))
15243 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15244 (build-system python-build-system)
15245 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15247 (arguments '(#:tests? #f))
15249 `(("python-toolz" ,python-toolz)))
15251 `(("python-cython" ,python-cython)))
15252 (home-page "https://github.com/pytoolz/cytoolz")
15253 (synopsis "High performance functional utilities")
15255 "The cytoolz package implements the same API as provided by toolz. The
15256 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15257 that is accessible to other projects developed in Cython.")
15258 (license license:bsd-3)))
15260 (define-public python-sortedcontainers
15262 (name "python-sortedcontainers")
15267 (uri (pypi-uri "sortedcontainers" version))
15270 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15271 (build-system python-build-system)
15273 `(("python-tox" ,python-tox)))
15274 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15275 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15277 "This package provides a sorted collections library, written in
15279 (license license:asl2.0)))
15281 (define-public python-cloudpickle
15283 (name "python-cloudpickle")
15288 (uri (pypi-uri "cloudpickle" version))
15291 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15292 (build-system python-build-system)
15293 ;; FIXME: there are 5 errors in 122 tests:
15294 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15295 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15296 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15297 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15298 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15299 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15300 (arguments '(#:tests? #f))
15302 `(("python-pytest" ,python-pytest)
15303 ("python-mock" ,python-mock)
15304 ("python-tornado" ,python-tornado)))
15305 (home-page "https://github.com/cloudpipe/cloudpickle")
15306 (synopsis "Extended pickling support for Python objects")
15308 "Cloudpickle makes it possible to serialize Python constructs not
15309 supported by the default pickle module from the Python standard library. It
15310 is especially useful for cluster computing where Python expressions are
15311 shipped over the network to execute on remote hosts, possibly close to the
15313 (license license:bsd-3)))
15315 (define-public python2-cloudpickle
15316 (package-with-python2 python-cloudpickle))
15318 (define-public python-locket
15320 (name "python-locket")
15325 (uri (pypi-uri "locket" version))
15328 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15329 (build-system python-build-system)
15330 (home-page "https://github.com/mwilliamson/locket.py")
15331 (synopsis "File-based locks for Python")
15333 "Locket implements a lock that can be used by multiple processes provided
15334 they use the same path.")
15335 (license license:bsd-2)))
15337 (define-public python2-locket
15338 (package-with-python2 python-locket))
15340 (define-public python-blosc
15342 (name "python-blosc")
15347 (uri (pypi-uri "blosc" version))
15350 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15351 (build-system python-build-system)
15352 ;; FIXME: all tests pass, but then this error is printed:
15353 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15354 (arguments '(#:tests? #f))
15356 `(("python-numpy" ,python-numpy)))
15357 (home-page "https://github.com/blosc/python-blosc")
15358 (synopsis "Python wrapper for the Blosc data compressor library")
15359 (description "Blosc is a high performance compressor optimized for binary
15360 data. It has been designed to transmit data to the processor cache faster
15361 than the traditional, non-compressed, direct memory fetch approach via a
15362 @code{memcpy()} system call.
15364 Blosc works well for compressing numerical arrays that contains data with
15365 relatively low entropy, like sparse data, time series, grids with
15366 regular-spaced values, etc.
15368 This Python package wraps the Blosc library.")
15369 (license license:bsd-3)))
15371 (define-public python2-blosc
15372 (package-with-python2 python-blosc))
15374 (define-public python-partd
15376 (name "python-partd")
15381 (uri (pypi-uri "partd" version))
15384 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15385 (build-system python-build-system)
15387 `(("python-blosc" ,python-blosc)
15388 ("python-locket" ,python-locket)
15389 ("python-numpy" ,python-numpy)
15390 ("python-pandas" ,python-pandas)
15391 ("python-pyzmq" ,python-pyzmq)
15392 ("python-toolz" ,python-toolz)))
15393 (home-page "https://github.com/dask/partd/")
15394 (synopsis "Appendable key-value storage")
15395 (description "Partd stores key-value pairs. Values are raw bytes. We
15396 append on old values. Partd excels at shuffling operations.")
15397 (license license:bsd-3)))
15399 (define-public python2-partd
15400 (package-with-python2 python-partd))
15402 (define-public python-dask
15404 (name "python-dask")
15409 (uri (pypi-uri "dask" version))
15411 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15412 (build-system python-build-system)
15413 ;; A single test out of 5000+ fails. This test is marked as xfail when
15414 ;; pytest-xdist is used.
15417 (modify-phases %standard-phases
15418 (add-after 'unpack 'disable-broken-test
15420 (substitute* "dask/tests/test_threaded.py"
15421 (("def test_interrupt\\(\\)" m)
15422 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15424 (when (which "python2")
15425 ;; This test fails with recent Pandas:
15426 ;; <https://github.com/dask/dask/issues/3794>.
15427 (substitute* "dask/dataframe/tests/test_dataframe.py"
15428 (("def test_info\\(\\)" m)
15429 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15433 (lambda _ (invoke "pytest" "-vv"))))))
15435 `(("python-cloudpickle" ,python-cloudpickle)
15436 ("python-numpy" ,python-numpy)
15437 ("python-pandas" ,python-pandas)
15438 ("python-partd" ,python-partd)
15439 ("python-toolz" ,python-toolz)
15440 ("python-pyyaml" ,python-pyyaml)))
15442 `(("python-pytest" ,python-pytest)
15443 ("python-pytest-runner" ,python-pytest-runner)))
15444 (home-page "https://github.com/dask/dask/")
15445 (synopsis "Parallel computing with task scheduling")
15447 "Dask is a flexible parallel computing library for analytics. It
15448 consists of two components: dynamic task scheduling optimized for computation,
15449 and large data collections like parallel arrays, dataframes, and lists that
15450 extend common interfaces like NumPy, Pandas, or Python iterators to
15451 larger-than-memory or distributed environments. These parallel collections
15452 run on top of the dynamic task schedulers. ")
15453 (license license:bsd-3)))
15455 (define-public python2-dask
15456 (package-with-python2 python-dask))
15458 (define-public python-ilinkedlist
15460 (name "python-ilinkedlist")
15465 (uri (pypi-uri "ilinkedlist" version))
15468 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15469 (build-system python-build-system)
15470 (native-inputs `(("python-pytest" ,python-pytest)))
15471 (inputs `(("python" ,python)))
15472 (home-page "https://github.com/luther9/ilinkedlist-py")
15473 (synopsis "Immutable linked list library")
15475 "This is a implementation of immutable linked lists for Python. It
15476 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15477 Since a linked list is treated as immutable, it is hashable, and its length
15478 can be retrieved in constant time. Some of the terminology is inspired by
15479 LISP. It is possible to create an improper list by creating a @code{Pair}
15480 with a non-list @code{cdr}.")
15481 (license license:gpl3+)))
15483 (define-public python-readlike
15485 (name "python-readlike")
15490 (uri (pypi-uri "readlike" version))
15492 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15493 (build-system python-build-system)
15494 (home-page "https://github.com/jangler/readlike")
15495 (synopsis "GNU Readline-like line editing module")
15497 "This Python module provides line editing functions similar to the default
15498 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15499 @code{readline} package, this one allows access to those capabilties in settings
15500 outside of a standard command-line interface. It is especially well-suited to
15501 interfacing with Urwid, due to a shared syntax for describing key inputs.
15503 Currently, all stateless Readline commands are implemented. Yanking and history
15504 are not supported.")
15505 (license license:expat)))
15507 (define-public python2-readlike
15508 (package-with-python2 python-readlike))
15510 (define-public python-reparser
15512 (name "python-reparser")
15517 (uri (pypi-uri "ReParser" version))
15519 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15520 (build-system python-build-system)
15521 (home-page "https://github.com/xmikos/reparser")
15522 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15524 "This Python library provides a simple lexer/parser for inline markup based
15525 on regular expressions.")
15526 (license license:expat)))
15528 (define-public python2-reparser
15529 (let ((reparser (package-with-python2
15530 (strip-python2-variant python-reparser))))
15531 (package (inherit reparser)
15533 `(("python2-enum34" ,python2-enum34)
15534 ,@(package-propagated-inputs reparser))))))
15536 (define-public python-precis-i18n
15538 (name "python-precis-i18n")
15543 (uri (pypi-uri "precis_i18n" version))
15546 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15547 (build-system python-build-system)
15548 (home-page "https://github.com/byllyfish/precis_i18n")
15549 (synopsis "Implementation of the PRECIS framework")
15551 "This module implements the PRECIS Framework as described in RFC 8264,
15552 RFC 8265 and RFC 8266.")
15553 (license license:expat)))
15555 (define-public python-absl-py
15557 (name "python-absl-py")
15562 (uri (pypi-uri "absl-py" version))
15565 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15566 (build-system python-build-system)
15568 `(("python-six" ,python-six)))
15569 (home-page "https://github.com/abseil/abseil-py")
15570 (synopsis "Abseil Python common libraries")
15572 "This package provides the Abseil Python Common Libraries, a collection
15573 of Python libraries for building Python applications.")
15574 (license license:asl2.0)))
15576 (define-public python-astor
15578 (name "python-astor")
15583 (uri (pypi-uri "astor" version))
15586 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15587 (build-system python-build-system)
15588 ;; FIXME: There are two errors and two test failures.
15589 (arguments `(#:tests? #f))
15590 (home-page "https://github.com/berkerpeksag/astor")
15591 (synopsis "Read and write Python ASTs")
15592 (description "Astor is designed to allow easy manipulation of Python
15593 source via the Abstract Syntax Tree.")
15594 (license license:bsd-3)))
15596 (define-public python2-astor
15597 (package-with-python2 python-astor))
15599 (define-public python-grpcio
15601 (name "python-grpcio")
15606 (uri (pypi-uri "grpcio" version))
15609 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15610 (build-system python-build-system)
15612 `(("python-six" ,python-six)))
15613 (home-page "https://grpc.io")
15614 (synopsis "HTTP/2-based RPC framework")
15615 (description "This package provides a Python library for communicating
15616 with the HTTP/2-based RPC framework gRPC.")
15617 (license license:asl2.0)))
15619 (define-public python-astunparse
15621 (name "python-astunparse")
15626 (uri (pypi-uri "astunparse" version))
15628 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15629 (build-system python-build-system)
15630 (arguments '(#:tests? #f)) ; there are none
15632 `(("python-six" ,python-six)
15633 ("python-wheel" ,python-wheel)))
15634 (home-page "https://github.com/simonpercivall/astunparse")
15635 (synopsis "AST unparser for Python")
15636 (description "This package provides an AST unparser for Python. It is a
15637 factored out version of @code{unparse} found in the Python source
15639 (license license:bsd-3)))
15641 (define-public python-gast
15643 (name "python-gast")
15648 (uri (pypi-uri "gast" version))
15650 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15651 (build-system python-build-system)
15653 `(("python-astunparse" ,python-astunparse)))
15654 (home-page "https://pypi.org/project/gast/")
15655 (synopsis "Generic Python AST that abstracts the underlying Python version")
15657 "GAST provides a compatibility layer between the AST of various Python
15658 versions, as produced by @code{ast.parse} from the standard @code{ast}
15660 (license license:bsd-3)))
15662 (define-public python-wikidata
15664 (name "python-wikidata")
15669 (uri (pypi-uri "Wikidata" version))
15672 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15673 (build-system python-build-system)
15675 `(("python-babel" ,python-babel)))
15676 (home-page "https://github.com/dahlia/wikidata")
15677 (synopsis "Wikidata client library")
15679 "This package provides a Python interface to
15680 @url{https://www.wikidata.org/, Wikidata}.")
15681 (properties '((upstream-name . "Wikidata")))
15682 (license license:gpl3+)))
15684 (define-public python-doctest-ignore-unicode
15686 (name "python-doctest-ignore-unicode")
15691 (uri (pypi-uri "doctest-ignore-unicode" version))
15694 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15695 (build-system python-build-system)
15697 `(("python-nose" ,python-nose)))
15698 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15699 (synopsis "Ignore Unicode literal prefixes in doctests")
15701 "This package adds support for a flag to ignore Unicode literal prefixes
15703 (license license:asl2.0)))
15705 (define-public python-attr
15707 (name "python-attr")
15712 (uri (pypi-uri "attr" version))
15715 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15716 (build-system python-build-system)
15717 (home-page "https://github.com/denis-ryzhkov/attr")
15718 (synopsis "Decorator for attributes of target function or class")
15719 (description "Simple decorator to set attributes of target function or
15720 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15721 (license license:expat)))
15723 (define-public python-construct
15725 (name "python-construct")
15730 (uri (pypi-uri "construct" version))
15733 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15734 (build-system python-build-system)
15736 `(#:tests? #f)) ; No tests exist.
15738 `(("python-extras" ,python-extras)
15739 ("python-arrow" ,python-arrow)
15740 ("python-numpy" ,python-numpy)
15741 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15742 (home-page "http://construct.readthedocs.io")
15743 (synopsis "Declarative and symmetrical parser and builder for binary data")
15745 "This package provides both simple, atomic constructs (such as
15746 integers of various sizes), as well as composite ones which allow you
15747 form hierarchical and sequential structures of increasing complexity.
15748 It features bit and byte granularity, easy debugging and testing, an
15749 easy-to-extend subclass system, and lots of primitive constructs to
15750 make your work easier.")
15751 (license license:expat)))
15753 (define-public python-humanize
15755 (name "python-humanize")
15760 (uri (pypi-uri "humanize" version))
15763 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15765 '(#:tests? #f)) ; tests not in pypi archive
15766 (build-system python-build-system)
15767 (home-page "https://github.com/jmoiron/humanize")
15768 (synopsis "Print numerical information in a human-readable form")
15769 (description "This package provides a Python module that displays numbers
15770 and dates in \"human readable\" forms. For example, it would display
15771 \"12345591313\" as \"12.3 billion\".")
15772 (license license:expat)))
15774 (define-public python-txaio
15776 (name "python-txaio")
15781 (uri (pypi-uri "txaio" version))
15784 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15785 (build-system python-build-system)
15787 `(("python-twisted" ,python-twisted)
15788 ("python-six" ,python-six)))
15789 (home-page "https://github.com/crossbario/txaio")
15790 (synopsis "Compatibility layer between Python asyncio and Twisted")
15791 (description "Txaio provides a compatibility layer between the Python
15792 @code{asyncio} module and @code{Twisted}.")
15793 (license license:expat)))
15795 (define-public python-toolshed
15797 (name "python-toolshed")
15802 (uri (pypi-uri "toolshed" version))
15805 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15806 (build-system python-build-system)
15808 `(("python-nose" ,python-nose)))
15809 (home-page "https://github.com/brentp/toolshed/")
15810 (synopsis "Collection of modules and functions for working with data")
15811 (description "This is a collection of well-tested, simple modules and
15812 functions that aim to reduce boilerplate when working with data.")
15813 (license license:bsd-2)))
15815 (define-public python-annoy
15817 (name "python-annoy")
15822 (uri (pypi-uri "annoy" version))
15825 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15826 (build-system python-build-system)
15828 `(("python-nose" ,python-nose)))
15829 (home-page "https://github.com/spotify/annoy/")
15830 (synopsis "Approximate nearest neighbors library")
15832 "Annoy is a C++ library with Python bindings to search for points in
15833 space that are close to a given query point. It also creates large read-only
15834 file-based data structures that are @code{mmap}ped into memory so that many
15835 processes may share the same data.")
15836 (license license:asl2.0)))
15838 (define-public python-pylzma
15840 (name "python-pylzma")
15845 (uri (pypi-uri "pylzma" version))
15848 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15849 (build-system python-build-system)
15850 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15851 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15852 (description "This package provides Python bindings for the LZMA library
15854 (license license:lgpl2.1+)))
15856 (define-public python2-pylzma
15857 (package-with-python2 python-pylzma))
15859 (define-public python2-zeroconf
15861 (name "python2-zeroconf")
15863 ;; This is the last version that supports Python 2.x.
15868 (uri (pypi-uri "zeroconf" version))
15871 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15872 (build-system python-build-system)
15874 `(#:python ,python-2
15876 (modify-phases %standard-phases
15877 (add-after 'unpack 'patch-requires
15878 (lambda* (#:key inputs #:allow-other-keys)
15879 (substitute* "setup.py"
15884 `(("python2-six" ,python2-six)
15885 ("python2-enum32" ,python2-enum34)
15886 ("python2-netifaces" ,python2-netifaces)
15887 ("python2-typing" ,python2-typing)))
15888 (home-page "https://github.com/jstasiak/python-zeroconf")
15889 (synopsis "Pure Python mDNS service discovery")
15891 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15893 (license license:lgpl2.1+)))
15895 (define-public python-bsddb3
15897 (name "python-bsddb3")
15902 (uri (pypi-uri "bsddb3" version))
15905 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15906 (build-system python-build-system)
15911 (modify-phases %standard-phases
15912 (add-after 'unpack 'configure-locations
15913 (lambda* (#:key inputs #:allow-other-keys)
15914 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15915 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15919 (invoke "python3" "test3.py" "-v"))))))
15920 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15921 (synopsis "Python bindings for Oracle Berkeley DB")
15923 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15924 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15925 Transaction objects, and each of these is exposed as a Python type in the
15926 bsddb3.db module. The database objects can use various access methods: btree,
15927 hash, recno, and queue. Complete support of Berkeley DB distributed
15928 transactions. Complete support for Berkeley DB Replication Manager.
15929 Complete support for Berkeley DB Base Replication. Support for RPC.")
15930 (license license:bsd-3)))
15932 (define-public python-dbfread
15934 (name "python-dbfread")
15938 (uri (pypi-uri "dbfread" version))
15941 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15942 (build-system python-build-system)
15944 `(("python-pytest" ,python-pytest)))
15945 (home-page "https://dbfread.readthedocs.io")
15946 (synopsis "Read DBF Files with Python")
15948 "This library reads DBF files and returns the data as native Python data
15949 types for further processing. It is primarily intended for batch jobs and
15951 (license license:expat)))