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 (invoke "python" "runtests.py" "-vv"))))))
3233 (home-page "https://cython.org/")
3234 (synopsis "C extensions for Python")
3235 (description "Cython is an optimising static compiler for both the Python
3236 programming language and the extended Cython programming language. It makes
3237 writing C extensions for Python as easy as Python itself.")
3238 (license license:asl2.0)
3239 (properties `((python2-variant . ,(delay python2-cython))))))
3241 (define-public python2-cython
3242 (package (inherit (package-with-python2
3243 (strip-python2-variant python-cython)))
3244 (name "python2-cython")
3246 `(("python-2" ,python-2))))) ; this is not automatically changed
3248 ;; The RPython toolchain currently does not support Python 3.
3249 (define-public python2-rpython
3251 (name "python2-rpython")
3256 (uri (pypi-uri "rpython" version))
3259 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3260 (build-system python-build-system)
3261 (arguments `(#:python ,python-2))
3263 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3264 (home-page "https://rpython.readthedocs.org")
3265 (synopsis "Framework for implementing interpreters and virtual machines")
3266 (description "RPython is a translation and support framework for
3267 producing implementations of dynamic languages, emphasizing a clean separation
3268 between language specification and implementation aspects.")
3269 (license license:expat)))
3271 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3272 ;; python-scipy still build, as these three packages are often used together.
3273 (define-public python-numpy
3275 (name "python-numpy")
3281 "https://github.com/numpy/numpy/releases/download/v"
3282 version "/numpy-" version ".tar.gz"))
3285 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3286 (build-system python-build-system)
3288 `(("openblas" ,openblas)
3289 ("lapack" ,lapack)))
3291 `(("python-cython" ,python-cython)
3292 ("python-pytest" ,python-pytest)
3293 ("gfortran" ,gfortran)))
3296 (modify-phases %standard-phases
3297 (add-before 'build 'configure-blas-lapack
3298 (lambda* (#:key inputs #:allow-other-keys)
3299 (call-with-output-file "site.cfg"
3303 libraries = openblas
3304 library_dirs = ~a/lib
3305 include_dirs = ~a/include
3307 # backslash-n to make emacs happy
3309 lapack_libs = lapack
3310 library_dirs = ~a/lib
3311 include_dirs = ~a/include
3313 (assoc-ref inputs "openblas")
3314 (assoc-ref inputs "openblas")
3315 (assoc-ref inputs "lapack")
3316 (assoc-ref inputs "lapack"))))
3318 (add-before 'build 'fix-executable-paths
3319 (lambda* (#:key inputs #:allow-other-keys)
3320 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3321 ;; instead of /bin/sh.
3322 (substitute* "numpy/distutils/exec_command.py"
3323 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3324 (string-append match-start (assoc-ref inputs "bash") match-end)))
3325 ;; Use "gcc" executable, not "cc".
3326 (substitute* "numpy/distutils/system_info.py"
3327 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3328 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3330 ;; Tests can only be run after the library has been installed and not
3331 ;; within the source directory.
3333 (add-after 'install 'check
3334 (lambda* (#:key outputs inputs #:allow-other-keys)
3335 ;; Make installed package available for running the tests
3336 (add-installed-pythonpath inputs outputs)
3337 ;; Make sure "f2py" etc is found.
3338 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3339 ":" (getenv "PATH")))
3340 (with-directory-excursion "/tmp"
3341 (invoke "python" "-c"
3342 "import numpy; numpy.test(verbose=2)")))))))
3343 (home-page "http://www.numpy.org/")
3344 (synopsis "Fundamental package for scientific computing with Python")
3345 (description "NumPy is the fundamental package for scientific computing
3346 with Python. It contains among other things: a powerful N-dimensional array
3347 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3348 and Fortran code, useful linear algebra, Fourier transform, and random number
3350 (license license:bsd-3)))
3352 (define-public python2-numpy
3353 (package-with-python2 python-numpy))
3355 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3356 ;; interest only for legacy code going back to NumPy's predecessor
3358 (define-public python2-numpy-1.8
3359 (package (inherit python2-numpy)
3365 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3366 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3369 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3371 (substitute-keyword-arguments (package-arguments python2-numpy)
3373 `(modify-phases ,phases
3374 (replace 'configure-blas-lapack
3375 (lambda* (#:key inputs #:allow-other-keys)
3376 (call-with-output-file "site.cfg"
3380 libraries = openblas,lapack
3381 library_dirs = ~a/lib:~a/lib
3382 include_dirs = ~a/include:~a/include
3384 (assoc-ref inputs "openblas")
3385 (assoc-ref inputs "lapack")
3386 (assoc-ref inputs "openblas")
3387 (assoc-ref inputs "lapack"))))
3390 `(("python2-nose" ,python2-nose)))
3391 (description "NumPy is the fundamental package for scientific computing
3392 with Python. It contains among other things: a powerful N-dimensional array
3393 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3394 and Fortran code, useful linear algebra, Fourier transform, and random number
3395 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3396 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3398 (license license:bsd-3)))
3400 (define-public python-munch
3402 (name "python-munch")
3407 (uri (pypi-uri "munch" version))
3410 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3411 (build-system python-build-system)
3412 (home-page "https://github.com/Infinidat/munch")
3413 (synopsis "Dot-accessible dictionary")
3414 (description "Munch is a dot-accessible dictionary similar to JavaScript
3416 (license license:expat)))
3418 (define-public python2-munch
3419 (package-with-python2 python-munch))
3421 (define-public python-colormath
3423 (name "python-colormath")
3428 (uri (pypi-uri "colormath" version))
3431 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3432 (build-system python-build-system)
3434 `(("python-networkx" ,python-networkx)
3435 ("python-numpy" ,python-numpy)))
3436 (home-page "https://github.com/gtaylor/python-colormath")
3437 (synopsis "Color math and conversion library")
3439 "This is a Python library for color math and conversions.")
3440 (license license:bsd-3)))
3442 (define-public python2-colormath
3443 (package-with-python2 python-colormath))
3445 (define-public python-spectra
3447 (name "python-spectra")
3452 (uri (pypi-uri "spectra" version))
3455 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3456 (build-system python-build-system)
3459 (modify-phases %standard-phases
3461 (lambda _ (invoke "nosetests" "-v"))))))
3463 `(("python-colormath" ,python-colormath)))
3465 `(("python-nose" ,python-nose)))
3466 (home-page "https://github.com/jsvine/spectra")
3467 (synopsis "Color scales and color conversion")
3469 "This package provides a Python library intended to make color math,
3470 color scales, and color space conversion easy. It has support for:
3475 @item Color blending
3476 @item Brightening/darkening colors
3477 @item Saturating/desaturating colors
3478 @item Conversion to/from multiple color spaces.
3480 (license license:expat)))
3482 (define-public python2-spectra
3483 (package-with-python2 python-spectra))
3485 (define-public python-numpy-documentation
3487 (name "python-numpy-documentation")
3488 (version (package-version python-numpy))
3489 (source (package-source python-numpy))
3490 (build-system python-build-system)
3492 `(("python-matplotlib" ,python-matplotlib)
3493 ("python-numpy" ,python-numpy)
3494 ("pkg-config" ,pkg-config)
3495 ("python-sphinx" ,python-sphinx)
3496 ("python-numpydoc" ,python-numpydoc)
3497 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3498 texlive-fonts-cm-super
3500 texlive-generic-ifxetex
3501 texlive-generic-pdftex
3502 texlive-latex-amsfonts
3503 texlive-latex-capt-of
3505 texlive-latex-environ
3506 texlive-latex-eqparbox
3507 texlive-latex-etoolbox
3508 texlive-latex-expdlist
3509 texlive-latex-fancyhdr
3510 texlive-latex-fancyvrb
3511 texlive-latex-fncychap
3513 texlive-latex-framed
3514 texlive-latex-geometry
3515 texlive-latex-graphics
3516 texlive-latex-hyperref
3517 texlive-latex-mdwtools
3518 texlive-latex-multirow
3519 texlive-latex-needspace
3520 texlive-latex-oberdiek
3521 texlive-latex-parskip
3522 texlive-latex-preview
3523 texlive-latex-tabulary
3524 texlive-latex-threeparttable
3525 texlive-latex-titlesec
3526 texlive-latex-trimspaces
3528 texlive-latex-upquote
3530 texlive-latex-varwidth
3531 texlive-latex-wrapfig)))
3532 ("texinfo" ,texinfo)
3534 ("scipy-sphinx-theme"
3535 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3538 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3539 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3542 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3543 ,@(package-native-inputs python-numpy)))
3545 `(#:tests? #f ; we're only generating the documentation
3547 (modify-phases %standard-phases
3550 (lambda* (#:key inputs outputs #:allow-other-keys)
3551 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3553 data "/doc/" ,name "-"
3554 ,(package-version python-numpy)))
3555 (info-reader (string-append data "/info"))
3556 (html (string-append doc "/html"))
3557 (scipy-sphinx-theme "scipy-sphinx-theme")
3558 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3559 (pyver ,(string-append "PYVER=")))
3561 ;; FIXME: this is needed to for texlive-union to generate
3562 ;; fonts, which are not found.
3563 (setenv "HOME" "/tmp")
3565 (with-directory-excursion "doc"
3566 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3568 (invoke "make" "html" pyver)
3569 (invoke "make" "latex" "PAPER=a4" pyver)
3570 (invoke "make" "-C" "build/latex"
3571 "all-pdf" "PAPER=a4" pyver)
3572 ;; FIXME: Generation of the info file fails.
3573 ;; (invoke "make" "info" pyver)
3575 ;; (copy-file "build/texinfo/numpy.info"
3576 ;; (string-append info "/numpy.info"))
3577 (for-each (lambda (file)
3578 (copy-file (string-append "build/latex" file)
3579 (string-append doc file)))
3580 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3581 (with-directory-excursion "build/html"
3582 (for-each (lambda (file)
3583 (let* ((dir (dirname file))
3584 (tgt-dir (string-append html "/" dir)))
3585 (unless (equal? "." dir)
3587 (install-file file html)))
3588 (find-files "." ".*")))))
3590 (home-page (package-home-page python-numpy))
3591 (synopsis "Documentation for the python-numpy package")
3592 (description (package-description python-numpy))
3593 (license (package-license python-numpy))))
3595 (define-public python2-numpy-documentation
3596 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3598 (inherit numpy-documentation)
3599 (native-inputs `(("python2-functools32" ,python2-functools32)
3600 ,@(package-native-inputs numpy-documentation))))))
3602 (define-public python-pygit2
3604 (name "python-pygit2")
3609 (uri (pypi-uri "pygit2" version))
3611 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3612 (build-system python-build-system)
3614 '(#:tests? #f)) ; tests don't run correctly in our environment
3616 `(("python-six" ,python-six)
3617 ("python-cffi" ,python-cffi)
3618 ("libgit2" ,libgit2)
3619 ("python-tox" ,python-tox)))
3621 `(("python-pytest" ,python-pytest)))
3622 (home-page "https://github.com/libgit2/pygit2")
3623 (synopsis "Python bindings for libgit2")
3624 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3625 library, libgit2 implements Git plumbing.")
3626 ;; GPL2.0 only, with linking exception.
3627 (license license:gpl2)))
3629 (define-public python2-pygit2
3630 (package-with-python2 python-pygit2))
3632 (define-public python-pyparsing
3634 (name "python-pyparsing")
3639 (uri (pypi-uri "pyparsing" version))
3641 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3642 (build-system python-build-system)
3643 (outputs '("out" "doc"))
3645 `(#:tests? #f ; no test target
3647 (modify-phases %standard-phases
3648 (add-after 'install 'install-doc
3649 (lambda* (#:key outputs #:allow-other-keys)
3650 (let* ((doc (string-append (assoc-ref outputs "doc")
3651 "/share/doc/" ,name "-" ,version))
3652 (html-doc (string-append doc "/html"))
3653 (examples (string-append doc "/examples")))
3659 (install-file file tgt))
3660 (find-files dir ".*")))
3661 (list "docs" "htmldoc" "examples")
3662 (list doc html-doc examples))
3664 (home-page "https://github.com/pyparsing/pyparsing")
3665 (synopsis "Python parsing class library")
3667 "The pyparsing module is an alternative approach to creating and
3668 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3669 of regular expressions. The pyparsing module provides a library of classes
3670 that client code uses to construct the grammar directly in Python code.")
3671 (license license:expat)))
3673 (define-public python2-pyparsing
3674 (package-with-python2 python-pyparsing))
3676 (define-public python-numpydoc
3678 (name "python-numpydoc")
3683 (uri (pypi-uri "numpydoc" version))
3686 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3687 (build-system python-build-system)
3689 `(("python-sphinx" ,python-sphinx)))
3691 `(("python-nose" ,python-nose)))
3692 (home-page "https://pypi.python.org/pypi/numpydoc")
3694 "Numpy's Sphinx extensions")
3696 "Sphinx extension to support docstrings in Numpy format.")
3697 (license license:bsd-2)))
3699 (define-public python2-numpydoc
3700 (package-with-python2 python-numpydoc))
3702 (define-public python-numexpr
3704 (name "python-numexpr")
3709 (uri (pypi-uri "numexpr" version))
3712 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3713 (build-system python-build-system)
3714 (arguments `(#:tests? #f)) ; no tests included
3716 `(("python-numpy" ,python-numpy)))
3717 (home-page "https://github.com/pydata/numexpr")
3718 (synopsis "Fast numerical expression evaluator for NumPy")
3720 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3721 expressions that operate on arrays are accelerated and use less memory than
3722 doing the same calculation in Python. In addition, its multi-threaded
3723 capabilities can make use of all your cores, which may accelerate
3724 computations, most specially if they are not memory-bounded (e.g. those using
3725 transcendental functions).")
3726 (license license:expat)))
3728 (define-public python2-numexpr
3729 (package-with-python2 python-numexpr))
3731 (define-public python-cycler
3733 (name "python-cycler")
3737 (uri (pypi-uri "cycler" version))
3740 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3741 (build-system python-build-system)
3743 ;; XXX: The current version requires 'coveralls' which we don't have.
3744 ;; Enable this for the next release which uses 'python-pytest'.
3747 `(("python-six" ,python-six)))
3748 (home-page "http://matplotlib.org/cycler/")
3749 (synopsis "Composable keyword argument iterator")
3751 "When using @code{matplotlib} and plotting more than one line, it is
3752 common to want to be able to want to be able to cycle over one or more artist
3753 styles; but the plotting logic can quickly become involved.
3754 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3755 @code{Cycler} class was developed.")
3756 (license license:bsd-3)))
3758 (define-public python2-cycler
3759 (package-with-python2 python-cycler))
3761 (define-public python-colorspacious
3763 (name "python-colorspacious")
3769 (url "https://github.com/njsmith/colorspacious.git")
3770 (commit (string-append "v" version))))
3771 (file-name (git-file-name name version))
3773 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3774 (build-system python-build-system)
3776 `(("python-numpy" ,python-numpy)))
3778 `(("python-nose" ,python-nose)))
3781 (modify-phases %standard-phases
3784 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3785 (home-page "https://github.com/njsmith/colorspacious")
3786 (synopsis "Python library for colorspace conversions")
3787 (description "@code{colorspacious} is a Python library that lets you
3788 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3789 (license license:expat)))
3791 (define-public python2-colorspacious
3792 (package-with-python2 python-colorspacious))
3794 (define-public python-matplotlib
3796 (name "python-matplotlib")
3801 (uri (pypi-uri "matplotlib" version))
3804 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3805 (build-system python-build-system)
3806 (propagated-inputs ; the following packages are all needed at run time
3807 `(("python-cycler" ,python-cycler)
3808 ("python-kiwisolver" ,python-kiwisolver)
3809 ("python-pyparsing" ,python-pyparsing)
3810 ("python-pygobject" ,python-pygobject)
3811 ("gobject-introspection" ,gobject-introspection)
3812 ("python-tkinter" ,python "tk")
3813 ("python-dateutil" ,python-dateutil)
3814 ("python-numpy" ,python-numpy)
3815 ("python-pillow" ,python-pillow)
3816 ("python-pytz" ,python-pytz)
3817 ("python-six" ,python-six)
3818 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3819 ;; from 'gtk+') provides the required 'typelib' files used by
3820 ;; 'gobject-introspection'. The location of these files is set with the
3821 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3822 ;; is done automatically by a 'native-search-path' procedure. However,
3823 ;; at run-time the user must set this variable as follows:
3825 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3827 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3828 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3829 ;; object. For this reason we need to import both libraries.
3830 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3831 ("python-pycairo" ,python-pycairo)
3832 ;; XXX: qtwebkit cannot be built reliably.
3833 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3834 ("python-cairocffi" ,python-cairocffi)))
3836 `(("libpng" ,libpng)
3837 ("imagemagick" ,imagemagick)
3838 ("freetype" ,freetype)
3841 ;; FIXME: Add backends when available.
3842 ;("python-wxpython" ,python-wxpython)
3846 `(("pkg-config" ,pkg-config)
3847 ("python-nose" ,python-nose)
3848 ("python-mock" ,python-mock)))
3851 (modify-phases %standard-phases
3852 (add-before 'build 'configure-environment
3853 (lambda* (#:key outputs inputs #:allow-other-keys)
3854 (let ((cairo (assoc-ref inputs "cairo"))
3855 (gtk+ (assoc-ref inputs "gtk+")))
3856 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3858 (setenv "LD_LIBRARY_PATH"
3859 (string-append cairo "/lib:" gtk+ "/lib"))
3860 (setenv "HOME" (getcwd))
3861 (call-with-output-file "setup.cfg"
3863 (format port "[directories]~%
3864 basedirlist = ~a,~a~%
3867 (assoc-ref inputs "tcl")
3868 (assoc-ref inputs "tk")))))
3870 (home-page "http://matplotlib.org")
3871 (synopsis "2D plotting library for Python")
3873 "Matplotlib is a Python 2D plotting library which produces publication
3874 quality figures in a variety of hardcopy formats and interactive environments
3875 across platforms. Matplotlib can be used in Python scripts, the python and
3876 ipython shell, web application servers, and six graphical user interface
3878 (license license:psfl)
3879 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3881 (define-public python2-matplotlib
3882 (let ((matplotlib (package-with-python2
3883 (strip-python2-variant python-matplotlib))))
3884 (package (inherit matplotlib)
3885 ;; Make sure to use special packages for Python 2 instead
3886 ;; of those automatically rewritten by package-with-python2.
3888 `(("python2-pycairo" ,python2-pycairo)
3889 ("python2-backports-functools-lru-cache"
3890 ,python2-backports-functools-lru-cache)
3891 ("python2-functools32" ,python2-functools32)
3892 ("python2-pygobject-2" ,python2-pygobject-2)
3893 ("python2-subprocess32" ,python2-subprocess32)
3894 ("python2-tkinter" ,python-2 "tk")
3895 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3896 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3898 (define-public python-matplotlib-documentation
3900 (name "python-matplotlib-documentation")
3901 (version (package-version python-matplotlib))
3902 (source (package-source python-matplotlib))
3903 (build-system python-build-system)
3905 `(("python-matplotlib" ,python-matplotlib)
3906 ("python-colorspacious" ,python-colorspacious)
3907 ("python-sphinx" ,python-sphinx)
3908 ("python-sphinx-gallery" ,python-sphinx-gallery)
3909 ("python-numpydoc" ,python-numpydoc)
3910 ("python-ipython" ,python-ipython)
3911 ("python-ipykernel" ,python-ipykernel)
3912 ("python-mock" ,python-mock)
3913 ("graphviz" ,graphviz)
3914 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3915 texlive-latex-amsmath
3916 texlive-latex-enumitem
3917 texlive-latex-expdlist
3918 texlive-latex-geometry
3919 texlive-latex-preview
3920 texlive-latex-type1cm
3923 texlive-generic-pdftex
3925 texlive-fonts-amsfonts
3927 texlive-fonts-adobe-times
3928 texlive-fonts-txfonts)))
3929 ("texinfo" ,texinfo)
3930 ,@(package-native-inputs python-matplotlib)))
3932 `(#:tests? #f ; we're only generating documentation
3934 (modify-phases %standard-phases
3938 (setenv "PYTHONPATH"
3939 (string-append (getenv "PYTHONPATH")
3940 ":" (getcwd) "/../examples/units"))
3941 (substitute* "conf.py"
3943 (("^SHA = check_output.*")
3944 (string-append "SHA = \"" ,version "\"\n"))
3945 ;; Don't fetch intersphinx files from the Internet
3946 (("^explicit_order_folders" m)
3947 (string-append "intersphinx_mapping = {}\n" m))
3948 (("'sphinx.ext.intersphinx',") "")
3949 ;; Disable URL embedding which requires internet access.
3950 (("'https://docs.scipy.org/doc/numpy'") "None")
3951 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3953 "SPHINXBUILD=sphinx-build"
3954 "SPHINXOPTS=" ; don't abort on warnings
3957 (lambda* (#:key inputs outputs #:allow-other-keys)
3958 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3959 (doc (string-append data "/doc/python-matplotlib-" ,version))
3960 (info (string-append data "/info"))
3961 (html (string-append doc "/html")))
3964 (copy-recursively "build/html" html)
3965 (symlink (string-append html "/_images")
3966 (string-append info "/matplotlib-figures"))
3967 (with-directory-excursion "build/texinfo"
3968 (substitute* "matplotlib.texi"
3969 (("@image\\{([^,]*)" all file)
3970 (string-append "@image{matplotlib-figures/" file)))
3971 (symlink (string-append html "/_images")
3972 "./matplotlib-figures")
3973 (invoke "makeinfo" "--no-split"
3974 "-o" "matplotlib.info" "matplotlib.texi"))
3975 (install-file "build/texinfo/matplotlib.info" info))
3977 (home-page (package-home-page python-matplotlib))
3978 (synopsis "Documentation for the python-matplotlib package")
3979 (description (package-description python-matplotlib))
3980 (license (package-license python-matplotlib))))
3982 (define-public python2-matplotlib-documentation
3983 (package-with-python2 python-matplotlib-documentation))
3985 (define-public python-matplotlib-venn
3987 (name "python-matplotlib-venn")
3992 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3995 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3996 (build-system python-build-system)
3997 (arguments '(#:tests? #f)) ; tests are not included
3999 `(("python-matplotlib" ,python-matplotlib)
4000 ("python-numpy" ,python-numpy)
4001 ("python-scipy" ,python-scipy)))
4003 `(("unzip" ,unzip)))
4004 (home-page "https://github.com/konstantint/matplotlib-venn")
4005 (synopsis "Plot area-proportional Venn diagrams")
4007 "This package provides tools for plotting area-proportional two- and
4008 three-way Venn diagrams in @code{matplotlib}.")
4009 (license license:expat)))
4011 (define-public python2-pysnptools
4013 (name "python2-pysnptools")
4018 (uri (pypi-uri "pysnptools" version))
4021 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4022 (build-system python-build-system)
4024 `(#:python ,python-2 ; only Python 2.7 is supported
4025 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4027 `(("python2-numpy" ,python2-numpy)
4028 ("python2-scipy" ,python2-scipy)
4029 ("python2-pandas" ,python2-pandas)))
4031 `(("python2-cython" ,python2-cython)))
4032 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4033 (synopsis "Library for reading and manipulating genetic data")
4035 "PySnpTools is a library for reading and manipulating genetic data. It
4036 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4037 those files. It can also efficiently manipulate ranges of integers using set
4038 operators such as union, intersection, and difference.")
4039 (license license:asl2.0)))
4041 (define-public python-scipy
4043 (name "python-scipy")
4048 (uri (pypi-uri "scipy" version))
4051 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4052 (build-system python-build-system)
4054 `(("python-numpy" ,python-numpy)
4055 ("python-matplotlib" ,python-matplotlib)
4056 ("python-pyparsing" ,python-pyparsing)))
4058 `(("lapack" ,lapack)
4059 ("openblas" ,openblas)))
4061 `(("python-cython" ,python-cython)
4062 ("python-pytest" ,python-pytest)
4063 ("python-sphinx" ,python-sphinx)
4064 ("python-numpydoc" ,python-numpydoc)
4065 ("gfortran" ,gfortran)
4068 (outputs '("out" "doc"))
4071 (modify-phases %standard-phases
4072 (add-after 'unpack 'disable-broken-tests
4074 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4075 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4076 (string-append indent
4077 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4079 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4080 (("^def test_parallel_threads\\(\\):" m)
4081 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4084 (add-before 'build 'configure-openblas
4085 (lambda* (#:key inputs #:allow-other-keys)
4086 (call-with-output-file "site.cfg"
4090 libraries = openblas
4091 library_dirs = ~a/lib
4092 include_dirs = ~a/include
4094 # backslash-n to make emacs happy
4096 library_dirs = ~a/lib
4097 atlas_libs = openblas
4099 (assoc-ref inputs "openblas")
4100 (assoc-ref inputs "openblas")
4101 (assoc-ref inputs "openblas"))))
4103 (add-after 'install 'install-doc
4104 (lambda* (#:key inputs outputs #:allow-other-keys)
4105 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4106 (doc (string-append data "/doc/" ,name "-" ,version))
4107 (html (string-append doc "/html"))
4108 (pyver ,(string-append "PYVER=" (version-major+minor
4109 (package-version python))))
4110 ;; By default it tries to run sphinx-build through the Python
4111 ;; interpreter which won't work with our shell wrapper.
4112 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4113 ;; Make installed package available for building the
4115 (add-installed-pythonpath inputs outputs)
4116 (with-directory-excursion "doc"
4117 ;; Fix generation of images for mathematical expressions.
4118 (substitute* (find-files "source" "conf\\.py")
4119 (("pngmath_use_preview = True")
4120 "pngmath_use_preview = False"))
4122 (invoke "make" "html" pyver sphinxbuild)
4123 (with-directory-excursion "build/html"
4124 (for-each (lambda (file)
4125 (let* ((dir (dirname file))
4126 (tgt-dir (string-append html "/" dir)))
4127 (install-file file html)))
4128 (find-files "." ".*")))))
4130 ;; Tests can only be run after the library has been installed and not
4131 ;; within the source directory.
4133 (add-after 'install 'check
4134 (lambda* (#:key inputs outputs #:allow-other-keys)
4135 (add-installed-pythonpath inputs outputs)
4136 (with-directory-excursion "/tmp"
4137 (invoke "python" "-c"
4138 "import scipy; scipy.test(verbose=2)")))))))
4139 (home-page "https://www.scipy.org/")
4140 (synopsis "The Scipy library provides efficient numerical routines")
4141 (description "The SciPy library is one of the core packages that make up
4142 the SciPy stack. It provides many user-friendly and efficient numerical
4143 routines such as routines for numerical integration and optimization.")
4144 (properties `((python2-variant . ,(delay python2-scipy))))
4145 (license license:bsd-3)))
4147 (define-public python2-scipy
4148 (package-with-python2
4149 (strip-python2-variant python-scipy)))
4151 (define-public python-socksipy-branch
4153 (name "python-socksipy-branch")
4158 (uri (pypi-uri "SocksiPy-branch" version))
4161 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4162 (build-system python-build-system)
4164 `(#:tests? #f)) ; There are no tests
4165 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4166 (synopsis "Python SOCKS module")
4168 "SocksiPy - A Python SOCKS client module. It provides a
4169 socket-like interface that supports connections to any TCP
4170 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4171 The original version was developed by Dan Haim, this is a
4172 branch created by Mario Vilas to address some open issues,
4173 as the original project seems to have been abandoned circa 2007.")
4174 (license license:bsd-3)))
4176 (define-public python2-socksipy-branch
4177 (package-with-python2 python-socksipy-branch))
4179 (define-public python-pycodestyle
4181 (name "python-pycodestyle")
4186 (uri (pypi-uri "pycodestyle" version))
4189 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4190 (build-system python-build-system)
4191 (home-page "https://pycodestyle.readthedocs.io/")
4192 (synopsis "Python style guide checker")
4193 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4194 Python code against some of the style conventions in
4195 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4196 (license license:expat)))
4198 (define-public python2-pycodestyle
4199 (package-with-python2 python-pycodestyle))
4201 (define-public python-multidict
4203 (name "python-multidict")
4208 (uri (pypi-uri "multidict" version))
4211 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4212 (build-system python-build-system)
4214 `(("python-pytest" ,python-pytest)
4215 ("python-pytest-runner" ,python-pytest-runner)))
4216 (home-page "https://github.com/aio-libs/multidict/")
4217 (synopsis "Multidict implementation")
4218 (description "Multidict is dict-like collection of key-value pairs
4219 where key might be occurred more than once in the container.")
4220 (license license:asl2.0)))
4222 (define-public python-orderedmultidict
4224 (name "python-orderedmultidict")
4229 (uri (pypi-uri "orderedmultidict" version))
4232 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4233 (build-system python-build-system)
4236 (modify-phases %standard-phases
4237 (add-after 'unpack 'fix-tests
4239 ;; The package uses nosetest for running the tests.
4240 ;; Adding this initfile allows to run the test suite
4241 ;; without requiring nosetest.
4242 (with-output-to-file "tests/__init__.py" newline)
4245 `(("python-six" ,python-six)))
4247 `(("python-pycodestyle" ,python-pycodestyle)))
4248 (home-page "https://github.com/gruns/orderedmultidict")
4249 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4250 (description "This package contains a library for ordered multivalue
4251 dictionaries. A multivalue dictionary is a dictionary that can store
4252 multiple values for the same key. An ordered multivalue dictionary is a
4253 multivalue dictionary that retains the order of insertions and deletions.")
4254 (license license:unlicense)))
4256 (define-public python2-orderedmultidict
4257 (package-with-python2 python-orderedmultidict))
4259 (define-public python-autopep8
4261 (name "python-autopep8")
4266 (uri (pypi-uri "autopep8" version))
4269 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4270 (build-system python-build-system)
4272 `(("python-pycodestyle" ,python-pycodestyle)))
4273 (home-page "https://github.com/hhatto/autopep8")
4274 (synopsis "Format Python code according to the PEP 8 style guide")
4276 "@code{autopep8} automatically formats Python code to conform to
4277 the PEP 8 style guide. It uses the pycodestyle utility to determine
4278 what parts of the code needs to be formatted. @code{autopep8} is
4279 capable of fixing most of the formatting issues that can be reported
4281 (license (license:non-copyleft
4282 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4284 (define-public python2-autopep8
4285 (package-with-python2 python-autopep8))
4287 (define-public python-distutils-extra
4289 (name "python-distutils-extra")
4294 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4295 version "/+download/python-distutils-extra-"
4299 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4300 (build-system python-build-system)
4301 (home-page "https://launchpad.net/python-distutils-extra/")
4302 (synopsis "Enhancements to Python's distutils")
4304 "The python-distutils-extra module enables you to easily integrate
4305 gettext support, themed icons, and scrollkeeper-based documentation into
4306 Python's distutils.")
4307 (license license:gpl2)))
4309 (define-public python2-distutils-extra
4310 (package-with-python2 python-distutils-extra))
4312 (define-public python2-elib.intl
4314 (name "python2-elib.intl")
4318 ;; This project doesn't tag releases or publish tarballs, so we take
4319 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4322 (url "https://github.com/dieterv/elib.intl.git")
4323 (commit "d09997cfef")))
4324 (file-name (string-append name "-" version "-checkout"))
4327 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4328 (build-system python-build-system)
4330 ;; incompatible with Python 3 (exception syntax)
4331 `(#:python ,python-2
4333 (home-page "https://github.com/dieterv/elib.intl")
4334 (synopsis "Enhanced internationalization for Python")
4336 "The elib.intl module provides enhanced internationalization (I18N)
4337 services for your Python modules and applications.")
4338 (license license:lgpl3+)))
4340 (define-public python-olefile
4342 (name "python-olefile")
4347 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4348 "download/v" version "/olefile-" version ".tar.gz"))
4349 (file-name (string-append name "-" version ".tar.gz"))
4352 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4353 (build-system python-build-system)
4354 (home-page "https://www.decalage.info/python/olefileio")
4355 (synopsis "Read and write Microsoft OLE2 files.")
4357 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4358 Storage or Compound Document, Microsoft Office). It is an improved version of
4359 the OleFileIO module from PIL, the Python Image Library.")
4360 (license license:bsd-3)))
4362 (define-public python2-olefile
4363 (package-with-python2 python-olefile))
4365 (define-public python-pillow
4367 (name "python-pillow")
4372 (uri (pypi-uri "Pillow" version))
4375 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4376 (build-system python-build-system)
4378 `(("python-pytest" ,python-pytest)))
4380 `(("freetype" ,freetype)
4383 ("libjpeg" ,libjpeg)
4384 ("openjpeg" ,openjpeg)
4385 ("libtiff" ,libtiff)
4386 ("libwebp" ,libwebp)))
4388 `(("python-olefile" ,python-olefile)))
4391 (modify-phases %standard-phases
4392 (add-after 'unpack 'patch-ldconfig
4394 (substitute* "setup.py"
4395 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4396 (delete 'check) ; We must run checks after python-pillow is installed.
4397 (add-after 'install 'check-installed
4398 (lambda* (#:key outputs inputs #:allow-other-keys)
4400 (setenv "HOME" (getcwd))
4401 ;; Make installed package available for running the tests.
4402 (add-installed-pythonpath inputs outputs)
4403 (invoke "python" "selftest.py" "--installed")
4404 (invoke "python" "-m" "pytest" "-vv")))))))
4405 (home-page "https://python-pillow.org")
4406 (synopsis "Fork of the Python Imaging Library")
4408 "The Python Imaging Library adds image processing capabilities to your
4409 Python interpreter. This library provides extensive file format support, an
4410 efficient internal representation, and fairly powerful image processing
4411 capabilities. The core image library is designed for fast access to data
4412 stored in a few basic pixel formats. It should provide a solid foundation for
4413 a general image processing tool.")
4414 (license (license:x11-style
4415 "http://www.pythonware.com/products/pil/license.htm"
4416 "The PIL Software License"))))
4418 (define-public python2-pillow
4419 (package-with-python2 python-pillow))
4421 (define-public python-pycparser
4423 (name "python-pycparser")
4428 (uri (pypi-uri "pycparser" version))
4431 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4432 (outputs '("out" "doc"))
4433 (build-system python-build-system)
4435 `(("pkg-config" ,pkg-config)))
4438 (modify-phases %standard-phases
4441 (with-directory-excursion "tests"
4442 (invoke "python" "all_tests.py"))
4444 (add-after 'install 'install-doc
4445 (lambda* (#:key outputs #:allow-other-keys)
4446 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4447 (doc (string-append data "/doc/" ,name "-" ,version))
4448 (examples (string-append doc "/examples")))
4450 (for-each (lambda (file)
4451 (copy-file (string-append "." file)
4452 (string-append doc file)))
4453 '("/README.rst" "/CHANGES" "/LICENSE"))
4454 (copy-recursively "examples" examples)
4456 (home-page "https://github.com/eliben/pycparser")
4457 (synopsis "C parser in Python")
4459 "Pycparser is a complete parser of the C language, written in pure Python
4460 using the PLY parsing library. It parses C code into an AST and can serve as
4461 a front-end for C compilers or analysis tools.")
4462 (license license:bsd-3)))
4464 (define-public python2-pycparser
4465 (package-with-python2 python-pycparser))
4467 (define-public python-pywavelets
4469 (name "python-pywavelets")
4471 (home-page "https://github.com/PyWavelets/pywt")
4474 (uri (pypi-uri "PyWavelets" version))
4477 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4478 (build-system python-build-system)
4480 '(#:modules ((ice-9 ftw)
4484 (guix build python-build-system))
4485 #:phases (modify-phases %standard-phases
4488 (let ((cwd (getcwd))
4489 (libdir (find (cut string-prefix? "lib." <>)
4490 (scandir "build"))))
4491 (with-directory-excursion (string-append cwd "/build/" libdir)
4492 (invoke "nosetests" "-v" "."))))))))
4494 `(("python-matplotlib" ,python-matplotlib) ;for tests
4495 ("python-nose" ,python-nose)))
4497 `(("python-numpy" ,python-numpy)))
4498 (synopsis "Wavelet transforms in Python")
4500 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4501 mathematical basis functions that are localized in both time and frequency.
4502 Wavelet transforms are time-frequency transforms employing wavelets. They are
4503 similar to Fourier transforms, the difference being that Fourier transforms are
4504 localized only in frequency instead of in time and frequency.")
4505 (license license:expat)))
4507 (define-public python2-pywavelets
4508 (package-with-python2 python-pywavelets))
4510 (define-public python-xcffib
4512 (name "python-xcffib")
4517 (uri (pypi-uri "xcffib" version))
4520 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4521 (build-system python-build-system)
4523 `(("libxcb" ,libxcb)))
4525 `(("python-cffi" ,python-cffi) ; used at run time
4526 ("python-six" ,python-six)))
4528 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4531 (modify-phases %standard-phases
4532 (add-after 'unpack 'fix-libxcb-path
4533 (lambda* (#:key inputs #:allow-other-keys)
4534 (let ((libxcb (assoc-ref inputs "libxcb")))
4535 (substitute* '("xcffib/__init__.py")
4536 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4538 (add-after 'install 'install-doc
4539 (lambda* (#:key outputs #:allow-other-keys)
4540 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4541 "/doc/" ,name "-" ,version)))
4543 (copy-file "README.md"
4544 (string-append doc "/README.md"))
4546 (home-page "https://github.com/tych0/xcffib")
4547 (synopsis "XCB Python bindings")
4549 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4550 support for Python 3 and PyPy. It is based on cffi.")
4551 (license license:expat)))
4553 (define-public python2-xcffib
4554 (package-with-python2 python-xcffib))
4556 (define-public python-cairocffi
4558 (name "python-cairocffi")
4563 (uri (pypi-uri "cairocffi" version))
4566 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4567 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4568 (build-system python-build-system)
4569 (outputs '("out" "doc"))
4573 ("gdk-pixbuf" ,gdk-pixbuf)
4577 `(("pkg-config" ,pkg-config)
4578 ("python-pytest" ,python-pytest)
4579 ("python-pytest-cov" ,python-pytest-cov)
4580 ("python-pytest-runner" ,python-pytest-runner)
4581 ("python-sphinx" ,python-sphinx)
4582 ("python-docutils" ,python-docutils)))
4584 `(("python-xcffib" ,python-xcffib))) ; used at run time
4587 (modify-phases %standard-phases
4588 (add-after 'unpack 'patch-paths
4589 (lambda* (#:key inputs outputs #:allow-other-keys)
4590 (substitute* (find-files "." "\\.py$")
4591 (("dlopen\\(ffi, 'cairo'")
4592 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4593 "/lib/libcairo.so.2'"))
4594 (("dlopen\\(ffi, 'gdk-3'")
4595 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4596 "/lib/libgtk-3.so.0'"))
4597 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4598 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4599 "/lib/libgdk_pixbuf-2.0.so.0'"))
4600 (("dlopen\\(ffi, 'glib-2.0'")
4601 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4602 "/lib/libglib-2.0.so.0'"))
4603 (("dlopen\\(ffi, 'gobject-2.0'")
4604 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4605 "/lib/libgobject-2.0.so.0'"))
4606 (("dlopen\\(ffi, 'pangocairo-1.0'")
4607 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4608 "/lib/libpangocairo-1.0.so.0'"))
4609 (("dlopen\\(ffi, 'pango-1.0'")
4610 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4611 "/lib/libpango-1.0.so.0'")))
4613 (add-after 'install 'install-doc
4614 (lambda* (#:key inputs outputs #:allow-other-keys)
4615 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4616 (doc (string-append data "/doc/" ,name "-" ,version))
4617 (html (string-append doc "/html")))
4618 (setenv "LD_LIBRARY_PATH"
4619 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4620 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4621 (setenv "LANG" "en_US.UTF-8")
4623 (for-each (lambda (file)
4624 (copy-file (string-append "." file)
4625 (string-append doc file)))
4626 '("/README.rst" "/CHANGES" "/LICENSE"))
4627 (system* "python" "setup.py" "build_sphinx")
4628 (copy-recursively "docs/_build/html" html)
4630 (home-page "https://github.com/Kozea/cairocffi")
4631 (synopsis "Python bindings and object-oriented API for Cairo")
4633 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4634 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4635 graphics library with support for multiple backends including image buffers,
4636 PNG, PostScript, PDF, and SVG file output.")
4637 (license license:bsd-3)))
4639 (define-public python2-cairocffi
4640 (package-with-python2 python-cairocffi))
4642 (define-public python-decorator
4644 (name "python-decorator")
4649 (uri (pypi-uri "decorator" version))
4651 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4652 (build-system python-build-system)
4653 (home-page "https://pypi.python.org/pypi/decorator/")
4654 (synopsis "Python module to simplify usage of decorators")
4656 "The aim of the decorator module is to simplify the usage of decorators
4657 for the average programmer, and to popularize decorators usage giving examples
4658 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4659 etc. The core of this module is a decorator factory.")
4660 (license license:expat)))
4662 (define-public python2-decorator
4663 (package-with-python2 python-decorator))
4665 (define-public python-drmaa
4667 (name "python-drmaa")
4672 (uri (pypi-uri "drmaa" version))
4674 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4675 (build-system python-build-system)
4676 ;; The test suite requires libdrmaa which is provided by the cluster
4677 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4678 ;; should be set to the path of the libdrmaa library.
4679 (arguments '(#:tests? #f))
4681 `(("python-nose" ,python-nose)))
4682 (home-page "https://pypi.python.org/pypi/drmaa")
4683 (synopsis "Python bindings for the DRMAA library")
4685 "A Python package for Distributed Resource Management (DRM) job
4686 submission and control. This package is an implementation of the DRMAA 1.0
4687 Python language binding specification.")
4688 (license license:bsd-3)))
4690 (define-public python2-drmaa
4691 (package-with-python2 python-drmaa))
4693 (define-public python-grako
4695 (name "python-grako")
4701 (pypi-uri "grako" version ".zip"))
4704 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4705 (build-system python-build-system)
4706 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4709 ("python-pytest" ,python-pytest)
4710 ("python-pytest-runner" ,python-pytest-runner)))
4711 (home-page "https://bitbucket.org/neogeny/grako")
4712 (synopsis "EBNF parser generator")
4714 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4715 memoizing PEG/Packrat parser in Python.")
4716 (license license:bsd-3)))
4718 (define-public python2-grako
4719 (package-with-python2 python-grako))
4721 (define-public python-gridmap
4723 (name "python-gridmap")
4729 (url "https://github.com/pygridtools/gridmap.git")
4730 (commit (string-append "v" version))))
4731 (file-name (git-file-name name version))
4733 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4734 (build-system python-build-system)
4736 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4738 `(("python-psutil" ,python-psutil)
4739 ("python-drmaa" ,python-drmaa)
4740 ("python-pyzmq" ,python-pyzmq)))
4741 (home-page "https://github.com/pygridtools/gridmap")
4742 (synopsis "Create jobs on a cluster directly from Python")
4744 "Gridmap is a Python package to allow you to easily create jobs on the
4745 cluster directly from Python. You can directly map Python functions onto the
4746 cluster without needing to write any wrapper code yourself.")
4747 (license license:gpl3+)))
4749 (define-public python2-gridmap
4750 (package-with-python2 python-gridmap))
4752 (define-public python-honcho
4754 (name "python-honcho")
4760 (url "https://github.com/nickstenning/honcho.git")
4761 (commit (string-append "v" version))))
4762 (file-name (git-file-name name version))
4764 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4765 (build-system python-build-system)
4767 `(("python-pytest" ,python-pytest)
4768 ("python-mock" ,python-mock)
4769 ("python-tox" ,python-tox)
4770 ("which" ,which))) ;for tests
4772 `(("python-jinja2" ,python-jinja2)))
4775 (modify-phases %standard-phases
4777 (add-after 'install 'check
4778 (lambda* (#:key outputs inputs #:allow-other-keys)
4779 ;; fix honcho path in testsuite
4780 (substitute* "tests/conftest.py"
4781 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4782 "/bin/honcho" "'")))
4783 ;; It's easier to run tests after install.
4784 ;; Make installed package available for running the tests
4785 (add-installed-pythonpath inputs outputs)
4786 (invoke "py.test" "-v"))))))
4787 (home-page "https://github.com/nickstenning/honcho")
4788 (synopsis "Manage Procfile-based applications")
4790 "A Procfile is a file which describes how to run an application
4791 consisting of several processes. honcho starts all listed processes.
4792 The output of all running processes is collected by honcho and
4794 (license license:expat)))
4796 (define-public python2-honcho
4797 (package-with-python2 python-honcho))
4799 (define-public python-pexpect
4801 (name "python-pexpect")
4806 (uri (pypi-uri "pexpect" version))
4808 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4809 (build-system python-build-system)
4812 (modify-phases %standard-phases
4813 (add-before 'check 'prepare-tests
4815 (substitute* (find-files "tests")
4816 (("/bin/ls") (which "ls"))
4817 (("/bin/echo") (which "echo"))
4818 (("/bin/which") (which "which"))
4819 ;; Many tests try to use the /bin directory which
4820 ;; is not present in the build environment.
4821 ;; Use one that's non-empty and unlikely to change.
4822 (("/bin'") "/dev'"))
4823 ;; XXX: Socket connection test gets "Connection reset by peer".
4824 ;; Why does it not work? Delete for now.
4825 (delete-file "tests/test_socket.py")
4827 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4829 `(("python-nose" ,python-nose)
4830 ("python-pytest" ,python-pytest)
4833 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4835 `(("python-ptyprocess" ,python-ptyprocess)))
4836 (home-page "http://pexpect.readthedocs.org/")
4837 (synopsis "Controlling interactive console applications")
4839 "Pexpect is a pure Python module for spawning child applications;
4840 controlling them; and responding to expected patterns in their output.
4841 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4842 child application and control it as if a human were typing commands.")
4843 (license license:isc)))
4845 (define-public python2-pexpect
4846 (package-with-python2 python-pexpect))
4848 (define-public python-setuptools-scm
4850 (name "python-setuptools-scm")
4854 (uri (pypi-uri "setuptools_scm" version))
4857 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4858 (build-system python-build-system)
4859 (home-page "https://github.com/pypa/setuptools_scm/")
4860 (synopsis "Manage Python package versions in SCM metadata")
4862 "Setuptools_scm handles managing your Python package versions in
4863 @dfn{software configuration management} (SCM) metadata instead of declaring
4864 them as the version argument or in a SCM managed file.")
4865 (license license:expat)))
4867 (define-public python2-setuptools-scm
4868 (package-with-python2 python-setuptools-scm))
4870 (define-public python-pathlib2
4872 (name "python-pathlib2")
4877 (uri (pypi-uri "pathlib2" version))
4880 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4881 (build-system python-build-system)
4883 `(("python-scandir" ,python-scandir)
4884 ("python-six" ,python-six)))
4885 (home-page "https://pypi.python.org/pypi/pathlib2/")
4886 (synopsis "Object-oriented filesystem paths")
4887 (description "The goal of pathlib2 is to provide a backport of the
4888 standard @code{pathlib} module which tracks the standard library module, so
4889 all the newest features of the standard @code{pathlib} can be used also on
4890 older Python versions.")
4891 (license license:expat)))
4893 (define-public python-importlib-metadata
4895 (name "python-importlib-metadata")
4900 (uri (pypi-uri "importlib_metadata" version))
4903 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4904 (build-system python-build-system)
4906 `(("python-configparser" ,python-configparser)
4907 ("python-contextlib2" ,python-contextlib2)
4908 ("python-docutils" ,python-docutils)
4909 ("python-pathlib2" ,python-pathlib2)
4910 ("python-rst.linker" ,python-rst.linker)
4911 ("python-zipp" ,python-zipp)))
4913 `(("python-setuptools-scm" ,python-setuptools-scm)
4914 ("python-sphinx" ,python-sphinx)))
4915 (home-page "https://importlib-metadata.readthedocs.io/")
4916 (synopsis "Read metadata from Python packages")
4918 "@code{importlib_metadata} is a library which provides an API for
4919 accessing an installed Python package's metadata, such as its entry points or
4920 its top-level name. This functionality intends to replace most uses of
4921 @code{pkg_resources} entry point API and metadata API. Along with
4922 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4923 need to use the older and less efficient @code{pkg_resources} package.")
4924 (license license:asl2.0)))
4926 (define-public python-jaraco-packaging
4928 (name "python-jaraco-packaging")
4933 (uri (pypi-uri "jaraco.packaging" version))
4936 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4937 (build-system python-build-system)
4939 `(("python-pytest" ,python-pytest)
4940 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4941 ("python-pytest-flake8" ,python-pytest-flake8)
4942 ("python-rst.linker" ,python-rst.linker)
4943 ("python-setuptools" ,python-setuptools)
4944 ("python-setuptools-scm" ,python-setuptools-scm)
4945 ("python-six" ,python-six)
4946 ("python-sphinx" ,python-sphinx)))
4947 (home-page "https://github.com/jaraco/jaraco.packaging")
4948 (synopsis "Tools to supplement packaging Python releases")
4950 "This package provides various tools to supplement packaging Python
4952 (license license:expat)))
4954 (define-public python-pathpy
4956 (name "python-pathpy")
4961 (uri (pypi-uri "path.py" version))
4963 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4964 (outputs '("out" "doc"))
4965 (build-system python-build-system)
4967 `(("python-appdirs" ,python-appdirs)))
4969 `(("python-setuptools-scm" ,python-setuptools-scm)
4970 ("python-sphinx" ,python-sphinx)
4971 ("python-rst.linker" ,python-rst.linker)
4972 ("python-pytest" ,python-pytest)
4973 ("python-pytest-runner" ,python-pytest-runner)
4974 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4977 (modify-phases %standard-phases
4978 (add-after 'build 'build-doc
4980 (setenv "LANG" "en_US.UTF-8")
4981 (invoke "python" "setup.py" "build_sphinx")))
4982 (add-after 'install 'install-doc
4983 (lambda* (#:key outputs #:allow-other-keys)
4984 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4985 (doc (string-append data "/doc/" ,name "-" ,version))
4986 (html (string-append doc "/html")))
4988 (for-each (lambda (file)
4989 (copy-file file (string-append doc "/" file)))
4990 '("README.rst" "CHANGES.rst"))
4991 (copy-recursively "build/sphinx/html" html)
4995 ;; The import time test aborts if an import takes longer than
4996 ;; 100ms. It may very well take a little longer than that.
4997 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
4998 (home-page "https://github.com/jaraco/path.py")
4999 (synopsis "Python module wrapper for built-in os.path")
5001 "@code{path.py} implements path objects as first-class entities, allowing
5002 common operations on files to be invoked on those path objects directly.")
5003 (license license:expat)))
5005 (define-public python2-pathpy
5006 (package-with-python2 python-pathpy))
5008 (define-public python-simplegeneric
5010 (name "python-simplegeneric")
5015 (uri (pypi-uri "simplegeneric" version ".zip"))
5017 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5018 (build-system python-build-system)
5020 `(("unzip" ,unzip)))
5021 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5022 (synopsis "Python module for simple generic functions")
5024 "The simplegeneric module lets you define simple single-dispatch generic
5025 functions, akin to Python’s built-in generic functions like @code{len()},
5026 @code{iter()} and so on. However, instead of using specially-named methods,
5027 these generic functions use simple lookup tables, akin to those used by
5028 e.g. @code{pickle.dump()} and other generic functions found in the Python
5030 (license license:zpl2.1)))
5032 (define-public python2-simplegeneric
5033 (package-with-python2 python-simplegeneric))
5035 (define-public python-ipython-genutils
5036 ;; TODO: This package is retired, check if can be removed, see description.
5038 (name "python-ipython-genutils")
5043 (uri (pypi-uri "ipython_genutils" version))
5045 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5046 (build-system python-build-system)
5047 (arguments `(#:tests? #f)) ; no tests
5048 (home-page "https://ipython.org")
5049 (synopsis "Vestigial utilities from IPython")
5051 "This package provides retired utilities from IPython. No packages
5052 outside IPython/Jupyter should depend on it.
5054 This package shouldn't exist. It contains some common utilities shared by
5055 Jupyter and IPython projects during The Big Split. As soon as possible, those
5056 packages will remove their dependency on this, and this package will go
5058 (license license:bsd-3)))
5060 (define-public python2-ipython-genutils
5061 (package-with-python2 python-ipython-genutils))
5063 (define-public python-traitlets
5065 (name "python-traitlets")
5070 (uri (pypi-uri "traitlets" version))
5073 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5074 (build-system python-build-system)
5077 (modify-phases %standard-phases
5078 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5080 `(("python-ipython-genutils" ,python-ipython-genutils)
5081 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5083 `(("python-pytest" ,python-pytest)))
5084 (properties `((python2-variant . ,(delay python2-traitlets))))
5085 (home-page "https://ipython.org")
5086 (synopsis "Configuration system for Python applications")
5088 "Traitlets is a framework that lets Python classes have attributes with
5089 type checking, dynamically calculated default values, and ‘on change’
5090 callbacks. The package also includes a mechanism to use traitlets for
5091 configuration, loading values from files or from command line arguments. This
5092 is a distinct layer on top of traitlets, so you can use traitlets in your code
5093 without using the configuration machinery.")
5094 (license license:bsd-3)))
5096 (define-public python2-traitlets
5097 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5101 `(("python2-enum34" ,python2-enum34)
5102 ,@(package-propagated-inputs traitlets))))))
5104 (define-public python-jupyter-core
5106 (name "python-jupyter-core")
5111 (uri (string-append (pypi-uri "jupyter_core" version)))
5114 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5115 (build-system python-build-system)
5116 ;; FIXME: not sure how to run the tests
5117 (arguments `(#:tests? #f))
5119 `(("python-traitlets" ,python-traitlets)))
5120 (home-page "http://jupyter.org/")
5121 (synopsis "Jupyter base package")
5123 "Jupyter core is the base package on which Jupyter projects rely.")
5124 (license license:bsd-3)))
5126 (define-public python2-jupyter-core
5127 (package-with-python2 python-jupyter-core))
5129 (define-public python-jupyter-client
5131 (name "python-jupyter-client")
5136 (uri (pypi-uri "jupyter_client" version))
5139 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5140 (build-system python-build-system)
5141 ;; Tests fail because of missing native python kernel which I assume is
5142 ;; provided by the ipython package, which we cannot use because it would
5143 ;; cause a dependency cycle.
5144 (arguments `(#:tests? #f))
5146 `(("python-pyzmq" ,python-pyzmq)
5147 ("python-traitlets" ,python-traitlets)
5148 ("python-jupyter-core" ,python-jupyter-core)))
5149 (home-page "http://jupyter.org/")
5150 (synopsis "Jupyter protocol implementation and client libraries")
5152 "The @code{jupyter_client} package contains the reference implementation
5153 of the Jupyter protocol. It also provides client and kernel management APIs
5154 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5155 installing @code{kernelspec}s for use with Jupyter frontends.")
5156 (license license:bsd-3)))
5158 (define-public python2-jupyter-client
5159 (package-with-python2 python-jupyter-client))
5161 (define-public python-ipykernel
5163 (name "python-ipykernel")
5168 (uri (pypi-uri "ipykernel" version))
5170 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5171 (build-system python-build-system)
5174 (modify-phases %standard-phases
5177 (setenv "HOME" "/tmp")
5178 (invoke "pytest" "-v")
5181 `(("python-ipython" ,python-ipython)
5182 ;; imported at runtime during connect
5183 ("python-jupyter-client" ,python-jupyter-client)))
5185 `(("python-pytest" ,python-pytest)
5186 ("python-nose" ,python-nose)))
5187 (home-page "https://ipython.org")
5188 (synopsis "IPython Kernel for Jupyter")
5190 "This package provides the IPython kernel for Jupyter.")
5191 (license license:bsd-3)))
5193 ;; Version 5.1.1 and above no longer support Python 2.
5194 (define-public python2-ipykernel
5196 (name "python2-ipykernel")
5201 (uri (pypi-uri "ipykernel" version))
5203 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5204 (build-system python-build-system)
5206 `(#:python ,python-2
5208 (modify-phases %standard-phases
5211 (setenv "HOME" "/tmp")
5212 (invoke "pytest" "-v")
5215 `(("python2-ipython" ,python2-ipython)
5216 ;; imported at runtime during connect
5217 ("python2-jupyter-client" ,python2-jupyter-client)))
5219 `(("python2-pytest" ,python2-pytest)
5220 ("python2-nose" ,python2-nose)))
5221 (home-page "https://ipython.org")
5222 (synopsis "IPython Kernel for Jupyter")
5224 "This package provides the IPython kernel for Jupyter.")
5225 (license license:bsd-3)))
5227 (define-public python-pari-jupyter
5229 (name "python-pari-jupyter")
5234 (uri (pypi-uri "pari_jupyter" version))
5237 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5238 (build-system python-build-system)
5240 `(("python-ipykernel" ,python-ipykernel)))
5242 `(("pari-gp" ,pari-gp)
5243 ("readline" ,readline)))
5245 `(#:tests? #f)) ; no test suite
5247 "https://github.com/jdemeyer/pari_jupyter")
5248 (synopsis "A Jupyter kernel for PARI/GP")
5249 (description "The package provides a PARI/GP kernel for Jupyter.")
5250 (license license:gpl3+)))
5252 (define-public python-backcall
5254 (name "python-backcall")
5259 (uri (pypi-uri "backcall" version))
5262 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5263 (build-system python-build-system)
5264 (home-page "https://github.com/takluyver/backcall/")
5265 (synopsis "Specifications for callback functions passed in to an API")
5267 "If your code lets other people supply callback functions, it's important
5268 to specify the function signature you expect, and check that functions support
5269 that. Adding extra parameters later would break other peoples code unless
5270 you're careful. The @code{backcall} package provides a way of specifying the
5271 callback signature using a prototype function.")
5272 (license license:bsd-3)))
5274 ;; This is the latest release of the LTS version of ipython with support for
5275 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5276 ;; dropped support for Python 2.7.
5277 (define-public python2-ipython
5279 (name "python2-ipython")
5284 (uri (pypi-uri "ipython" version ".tar.gz"))
5286 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5287 (build-system python-build-system)
5289 `(("python2-backports-shutil-get-terminal-size"
5290 ,python2-backports-shutil-get-terminal-size)
5291 ("python2-pathlib2" ,python2-pathlib2)
5292 ("python2-pyzmq" ,python2-pyzmq)
5293 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5294 ("python2-terminado" ,python2-terminado)
5295 ("python2-matplotlib" ,python2-matplotlib)
5296 ("python2-numpy" ,python2-numpy)
5297 ("python2-numpydoc" ,python2-numpydoc)
5298 ("python2-jinja2" ,python2-jinja2)
5299 ("python2-mistune" ,python2-mistune)
5300 ("python2-pexpect" ,python2-pexpect)
5301 ("python2-pickleshare" ,python2-pickleshare)
5302 ("python2-simplegeneric" ,python2-simplegeneric)
5303 ("python2-jsonschema" ,python2-jsonschema)
5304 ("python2-traitlets" ,python2-traitlets)
5305 ("python2-nbformat" ,python2-nbformat)
5306 ("python2-pygments" ,python2-pygments)))
5308 `(("readline" ,readline)
5311 `(("graphviz" ,graphviz)
5312 ("pkg-config" ,pkg-config)
5313 ("python2-requests" ,python2-requests) ;; for tests
5314 ("python2-testpath" ,python2-testpath)
5315 ("python2-mock" ,python2-mock)
5316 ("python2-nose" ,python2-nose)))
5318 `(#:python ,python-2
5320 (modify-phases %standard-phases
5321 (add-before 'check 'delete-broken-tests
5322 (lambda* (#:key inputs #:allow-other-keys)
5323 ;; These tests throw errors for unknown reasons.
5324 (delete-file "IPython/core/tests/test_profile.py")
5325 (delete-file "IPython/core/tests/test_interactiveshell.py")
5326 (delete-file "IPython/core/tests/test_magic.py")
5328 (home-page "https://ipython.org")
5329 (synopsis "IPython is a tool for interactive computing in Python")
5331 "IPython provides a rich architecture for interactive computing with:
5332 Powerful interactive shells, a browser-based notebook, support for interactive
5333 data visualization, embeddable interpreters and tools for parallel
5335 (license license:bsd-3)))
5337 (define-public python-ipython
5339 (name "python-ipython")
5344 (uri (pypi-uri "ipython" version ".tar.gz"))
5346 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5347 (build-system python-build-system)
5349 `(("python-backcall" ,python-backcall)
5350 ("python-pyzmq" ,python-pyzmq)
5351 ("python-prompt-toolkit" ,python-prompt-toolkit)
5352 ("python-terminado" ,python-terminado)
5353 ("python-matplotlib" ,python-matplotlib)
5354 ("python-numpy" ,python-numpy)
5355 ("python-numpydoc" ,python-numpydoc)
5356 ("python-jedi" ,python-jedi)
5357 ("python-jinja2" ,python-jinja2)
5358 ("python-mistune" ,python-mistune)
5359 ("python-pexpect" ,python-pexpect)
5360 ("python-pickleshare" ,python-pickleshare)
5361 ("python-simplegeneric" ,python-simplegeneric)
5362 ("python-jsonschema" ,python-jsonschema)
5363 ("python-traitlets" ,python-traitlets)
5364 ("python-nbformat" ,python-nbformat)
5365 ("python-pygments" ,python-pygments)))
5367 `(("readline" ,readline)
5370 `(("graphviz" ,graphviz)
5371 ("pkg-config" ,pkg-config)
5372 ("python-requests" ,python-requests) ;; for tests
5373 ("python-testpath" ,python-testpath)
5374 ("python-nose" ,python-nose)))
5377 (modify-phases %standard-phases
5378 ;; Tests can only be run after the library has been installed and not
5379 ;; within the source directory.
5381 (add-after 'install 'check
5382 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5385 ;; Make installed package available for running the tests
5386 (add-installed-pythonpath inputs outputs)
5387 (setenv "HOME" "/tmp/") ;; required by a test
5388 ;; We only test the core because one of the other tests
5389 ;; tries to import ipykernel.
5390 (invoke "python" "IPython/testing/iptest.py"
5391 "-v" "IPython/core/tests"))
5393 (add-before 'check 'fix-tests
5394 (lambda* (#:key inputs #:allow-other-keys)
5395 (substitute* "./IPython/utils/_process_posix.py"
5396 (("/usr/bin/env', 'which") (which "which")))
5397 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5398 (("#!/usr/bin/env python")
5399 (string-append "#!" (which "python"))))
5400 ;; This test introduces a circular dependency on ipykernel
5401 ;; (which depends on ipython).
5402 (delete-file "IPython/core/tests/test_display.py")
5403 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5404 (delete-file "IPython/core/tests/test_interactiveshell.py")
5406 (home-page "https://ipython.org")
5407 (synopsis "IPython is a tool for interactive computing in Python")
5409 "IPython provides a rich architecture for interactive computing with:
5410 Powerful interactive shells, a browser-based notebook, support for interactive
5411 data visualization, embeddable interpreters and tools for parallel
5413 (license license:bsd-3)))
5415 (define-public python-ipython-documentation
5417 (inherit python-ipython)
5418 (name "python-ipython-documentation")
5419 (version (package-version python-ipython))
5422 (modify-phases %standard-phases
5426 (lambda* (#:key outputs #:allow-other-keys)
5427 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5428 (doc (string-append data "/doc/" ,name "-" ,version))
5429 (html (string-append doc "/html"))
5430 (man1 (string-append data "/man/man1"))
5431 (info (string-append data "/info"))
5432 (examples (string-append doc "/examples"))
5433 (python-arg (string-append "PYTHON=" (which "python"))))
5434 (setenv "LANG" "en_US.utf8")
5435 (with-directory-excursion "docs"
5436 ;; FIXME: pdf fails to build
5437 ;;(system* "make" "pdf" "PAPER=a4")
5438 (system* "make" python-arg "html")
5439 ;; FIXME: the generated texi file contains ^@^@, which trips
5441 ;; (system* "make" python-arg "info")
5443 (copy-recursively "docs/man" man1)
5444 (copy-recursively "examples" examples)
5445 (copy-recursively "docs/build/html" html)
5446 ;; (copy-file "docs/build/latex/ipython.pdf"
5447 ;; (string-append doc "/ipython.pdf"))
5449 ;; (copy-file "docs/build/texinfo/ipython.info"
5450 ;; (string-append info "/ipython.info"))
5451 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5454 `(("python-ipython" ,python-ipython)
5455 ("python-ipykernel" ,python-ipykernel)))
5457 `(("python-sphinx" ,python-sphinx)
5458 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5459 ;; FIXME: It's possible that a smaller union would work just as well.
5460 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5462 texlive-generic-ifxetex
5463 texlive-generic-pdftex
5464 texlive-latex-amsfonts
5465 texlive-latex-capt-of
5467 texlive-latex-environ
5468 texlive-latex-eqparbox
5469 texlive-latex-etoolbox
5470 texlive-latex-expdlist
5471 texlive-latex-fancyhdr
5472 texlive-latex-fancyvrb
5473 texlive-latex-fncychap
5475 texlive-latex-framed
5476 texlive-latex-geometry
5477 texlive-latex-graphics
5478 texlive-latex-hyperref
5479 texlive-latex-mdwtools
5480 texlive-latex-multirow
5481 texlive-latex-needspace
5482 texlive-latex-oberdiek
5483 texlive-latex-parskip
5484 texlive-latex-preview
5485 texlive-latex-tabulary
5486 texlive-latex-threeparttable
5487 texlive-latex-titlesec
5488 texlive-latex-trimspaces
5490 texlive-latex-upquote
5492 texlive-latex-varwidth
5493 texlive-latex-wrapfig)))
5494 ("texinfo" ,texinfo)))))
5496 (define-public python-urwid
5498 (name "python-urwid")
5503 (uri (pypi-uri "urwid" version))
5506 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5507 (build-system python-build-system)
5508 (home-page "http://urwid.org")
5509 (synopsis "Console user interface library for Python")
5511 "Urwid is a curses-based UI/widget library for Python. It includes many
5512 features useful for text console applications.")
5513 (license license:lgpl2.1+)))
5515 (define-public python2-urwid
5516 (package-with-python2 python-urwid))
5518 (define-public python-urwidtrees
5520 (name "python-urwidtrees")
5525 ;; package author intends on distributing via github rather than pypi:
5526 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5527 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5529 (file-name (string-append name "-" version ".tar.gz"))
5532 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5533 (build-system python-build-system)
5535 '(#:tests? #f)) ; no tests
5536 (propagated-inputs `(("python-urwid" ,python-urwid)))
5537 (home-page "https://github.com/pazz/urwidtrees")
5538 (synopsis "Tree widgets for urwid")
5539 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5540 toolkit. Use it to build trees of widgets.")
5541 (license license:gpl3+)))
5543 (define-public python2-urwidtrees
5544 (package-with-python2 python-urwidtrees))
5546 (define-public python-ua-parser
5548 (name "python-ua-parser")
5553 (uri (pypi-uri "ua-parser" version))
5556 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5557 (build-system python-build-system)
5559 `(#:tests? #f)) ;no test suite in release
5561 `(("python-pyyaml" ,python-pyyaml)))
5562 (home-page "https://github.com/ua-parser/uap-python")
5563 (synopsis "User agent parser")
5565 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5566 (license license:asl2.0)))
5568 (define-public python2-ua-parser
5569 (package-with-python2 python-ua-parser))
5571 (define-public python-user-agents
5573 (name "python-user-agents")
5578 (uri (pypi-uri "user-agents" version))
5581 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5582 (build-system python-build-system)
5584 `(#:tests? #f)) ;missing devices.json test file in release
5586 `(("python-ua-parser" ,python-ua-parser)))
5587 (home-page "https://github.com/selwin/python-user-agents")
5588 (synopsis "User Agent strings parsing library")
5590 "A library to identify devices (phones, tablets) and their capabilities by
5591 parsing (browser/HTTP) user agent strings.")
5592 (license license:expat)))
5594 (define-public python2-user-agents
5595 (package-with-python2 python-user-agents))
5597 (define-public python-dbus
5599 (name "python-dbus")
5604 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5605 "dbus-python-" version ".tar.gz"))
5608 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5609 (build-system gnu-build-system)
5612 (modify-phases %standard-phases
5616 ;; XXX: For the missing '/etc/machine-id'.
5617 (substitute* "test/run-test.sh"
5618 (("DBUS_FATAL_WARNINGS=1")
5619 "DBUS_FATAL_WARNINGS=0"))
5622 `(("pkg-config" ,pkg-config)))
5624 `(("python" ,python-wrapper)
5625 ("dbus-glib" ,dbus-glib)))
5626 (synopsis "Python bindings for D-bus")
5627 (description "python-dbus provides bindings for libdbus, the reference
5628 implementation of D-Bus.")
5629 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5630 (license license:expat)))
5632 (define-public python2-dbus
5633 (package (inherit python-dbus)
5634 (name "python2-dbus")
5635 (inputs `(("python" ,python-2)
5636 ,@(alist-delete "python"
5637 (package-inputs python-dbus)
5639 ;; FIXME: on Python 2, the test_utf8 fails with:
5640 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5641 (arguments `(#:tests? #f))))
5643 (define-public python-notify2
5645 (name "python-notify2")
5650 (uri (pypi-uri "notify2" version))
5653 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5654 (build-system python-build-system)
5655 (arguments `(#:tests? #f)) ; tests depend on system state
5657 `(("python-dbus" ,python-dbus)))
5658 (home-page "https://bitbucket.org/takluyver/pynotify2")
5659 (synopsis "Python interface to D-Bus notifications")
5661 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5662 It is a reimplementation of pynotify in pure Python, and an alternative to
5663 the GObject Introspection bindings to libnotify for non-GTK applications.")
5664 (license (list license:bsd-2
5665 license:lgpl2.1+))))
5667 (define-public python2-notify2
5668 (package-with-python2 python-notify2))
5670 (define-public python-lxml
5672 (name "python-lxml")
5677 (uri (pypi-uri "lxml" version))
5680 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5681 (build-system python-build-system)
5683 `(("libxml2" ,libxml2)
5684 ("libxslt" ,libxslt)))
5685 (home-page "http://lxml.de/")
5687 "Python XML processing library")
5689 "The lxml XML toolkit is a Pythonic binding for the C libraries
5690 libxml2 and libxslt.")
5691 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5693 (define-public python2-lxml
5694 (package-with-python2 python-lxml))
5696 ;; beautifulsoup4 has a totally different namespace than 3.x,
5697 ;; and pypi seems to put it under its own name, so I guess we should too
5698 (define-public python-beautifulsoup4
5700 (name "python-beautifulsoup4")
5705 (uri (pypi-uri "beautifulsoup4" version))
5708 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5709 (build-system python-build-system)
5712 (modify-phases %standard-phases
5713 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5714 ;; must use this conversion script when building with Python 3. The
5715 ;; conversion script also runs the tests.
5716 ;; For more information, see the file 'convert-py3k' in the source
5719 (lambda _ (invoke "./convert-py3k"))))))
5721 `(("python-soupsieve" ,python-soupsieve)))
5723 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5725 "Python screen-scraping library")
5727 "Beautiful Soup is a Python library designed for rapidly setting up
5728 screen-scraping projects. It offers Pythonic idioms for navigating,
5729 searching, and modifying a parse tree, providing a toolkit for
5730 dissecting a document and extracting what you need. It automatically
5731 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5732 (license license:expat)
5733 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5735 (define-public python2-beautifulsoup4
5737 (inherit (package-with-python2
5738 (strip-python2-variant python-beautifulsoup4)))
5739 (arguments `(#:python ,python-2))))
5741 (define-public python-soupsieve
5743 (name "python-soupsieve")
5748 (uri (pypi-uri "soupsieve" version))
5751 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5752 (build-system python-build-system)
5753 (arguments `(#:tests? #f))
5754 ;;XXX: 2 tests fail currently despite claming they were to be
5755 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5756 ;;don't want to create a circular dependency.
5757 (home-page "https://github.com/facelessuser/soupsieve")
5758 (synopsis "CSS selector library")
5760 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5761 Soup 4. It aims to provide selecting, matching, and filtering using modern
5762 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5763 specifications up through the latest CSS level 4 drafts and beyond (though
5764 some are not yet implemented).")
5765 (properties `((python2-variant . ,(delay python2-soupsieve))))
5766 (license license:expat)))
5768 (define-public python2-soupsieve
5769 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5773 `(("python2-backports-functools-lru-cache"
5774 ,python2-backports-functools-lru-cache)
5775 ,@(package-propagated-inputs base))))))
5777 (define-public python-netifaces
5779 (name "python-netifaces")
5784 (uri (pypi-uri "netifaces" version))
5787 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5788 (build-system python-build-system)
5789 (home-page "https://github.com/al45tair/netifaces")
5791 "Python module for portable network interface information")
5793 "Netifaces is a Python module providing information on network
5794 interfaces in an easy and portable manner.")
5795 (license license:expat)))
5797 (define-public python2-netifaces
5798 (package-with-python2 python-netifaces))
5800 (define-public python-networkx
5802 (name "python-networkx")
5807 (uri (pypi-uri "networkx" version ".zip"))
5809 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5810 (build-system python-build-system)
5811 ;; python-decorator is needed at runtime.
5813 `(("python-decorator" ,python-decorator)))
5815 `(("python-nose" ,python-nose)
5817 (home-page "https://networkx.github.io/")
5818 (synopsis "Python module for creating and manipulating graphs and networks")
5820 "NetworkX is a Python package for the creation, manipulation, and study
5821 of the structure, dynamics, and functions of complex networks.")
5822 (license license:bsd-3)))
5824 (define-public python2-networkx
5825 (package-with-python2 python-networkx))
5827 (define-public python-datrie
5829 (name "python-datrie")
5834 (uri (pypi-uri "datrie" version))
5837 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5838 (build-system python-build-system)
5840 `(#:phases (modify-phases %standard-phases
5841 (add-before 'build 'cythonize
5843 ;; Regenerate Cython classes to solve ABI issues with Python
5844 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5845 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5846 "src/stdio_ext.pxd" "-a"))))))
5848 `(("python-cython" ,python-cython)
5849 ("python-hypothesis" ,python-hypothesis)
5850 ("python-pytest" ,python-pytest)
5851 ("python-pytest-runner" ,python-pytest-runner)))
5852 (home-page "https://github.com/kmike/datrie")
5853 (synopsis "Fast, efficiently stored trie for Python")
5855 "This package provides a fast, efficiently stored trie implementation for
5857 (license license:lgpl2.1+)))
5859 (define-public snakemake
5866 (uri (pypi-uri "snakemake" version))
5868 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5869 (build-system python-build-system)
5871 ;; TODO: Package missing test dependencies.
5874 (modify-phases %standard-phases
5875 ;; For cluster execution Snakemake will call Python. Since there is
5876 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5877 ;; this by calling the snakemake wrapper instead.
5878 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5879 (lambda* (#:key outputs #:allow-other-keys)
5880 (substitute* "snakemake/executors.py"
5881 (("\\{sys.executable\\} -m snakemake")
5882 (string-append (assoc-ref outputs "out")
5886 `(("python-gitpython" ,python-gitpython)
5887 ("python-wrapt" ,python-wrapt)
5888 ("python-requests" ,python-requests)
5889 ("python-appdirs" ,python-appdirs)
5890 ("python-configargparse" ,python-configargparse)
5891 ("python-datrie" ,python-datrie)
5892 ("python-docutils" ,python-docutils)
5893 ("python-jinja2" ,python-jinja2)
5894 ("python-jsonschema" ,python-jsonschema)
5895 ("python-networkx" ,python-networkx)
5896 ("python-pyyaml" ,python-pyyaml)
5897 ("python-ratelimiter" ,python-ratelimiter)))
5898 (home-page "https://snakemake.readthedocs.io")
5899 (synopsis "Python-based execution environment for make-like workflows")
5901 "Snakemake aims to reduce the complexity of creating workflows by
5902 providing a clean and modern domain specific specification language (DSL) in
5903 Python style, together with a fast and comfortable execution environment.")
5904 (license license:expat)))
5906 ;; This is currently needed for the pigx-* packages.
5907 (define-public snakemake-4
5908 (package (inherit snakemake)
5913 (uri (pypi-uri "snakemake" version))
5915 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5917 `(("python-wrapt" ,python-wrapt)
5918 ("python-requests" ,python-requests)
5919 ("python-appdirs" ,python-appdirs)
5920 ("python-configargparse" ,python-configargparse)
5921 ("python-pyyaml" ,python-pyyaml)
5922 ("python-ratelimiter" ,python-ratelimiter)))))
5924 (define-public python-pyqrcode
5926 (name "python-pyqrcode")
5931 (uri (pypi-uri "PyQRCode" version))
5934 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5935 (build-system python-build-system)
5937 "https://github.com/mnooner256/pyqrcode")
5938 (synopsis "QR code generator")
5940 "Pyqrcode is a QR code generator written purely in Python with
5941 SVG, EPS, PNG and terminal output.")
5942 (license license:bsd-3)))
5944 (define-public python-seaborn
5946 (name "python-seaborn")
5951 (uri (pypi-uri "seaborn" version))
5953 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5954 (build-system python-build-system)
5957 (modify-phases %standard-phases
5958 (add-before 'check 'start-xserver
5959 (lambda* (#:key inputs #:allow-other-keys)
5960 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5961 ;; There must be a running X server and make check doesn't
5962 ;; start one. Therefore we must do it.
5963 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5964 (setenv "DISPLAY" ":1")
5966 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5968 `(("python-pandas" ,python-pandas)
5969 ("python-matplotlib" ,python-matplotlib)
5970 ("python-numpy" ,python-numpy)
5971 ("python-scipy" ,python-scipy)))
5973 `(("python-pytest" ,python-pytest)
5974 ("xorg-server" ,xorg-server)))
5975 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5976 (synopsis "Statistical data visualization")
5978 "Seaborn is a library for making attractive and informative statistical
5979 graphics in Python. It is built on top of matplotlib and tightly integrated
5980 with the PyData stack, including support for numpy and pandas data structures
5981 and statistical routines from scipy and statsmodels.")
5982 (license license:bsd-3)))
5984 (define-public python2-seaborn
5985 (package-with-python2 python-seaborn))
5987 (define-public python-mpmath
5989 (name "python-mpmath")
5993 (uri (string-append "http://mpmath.org/files/mpmath-"
5997 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5998 (build-system python-build-system)
6001 (modify-phases %standard-phases
6004 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6005 (home-page "http://mpmath.org")
6006 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6008 "@code{mpmath} can be used as an arbitrary-precision substitute for
6009 Python's float/complex types and math/cmath modules, but also does much
6010 more advanced mathematics.")
6011 (license license:bsd-3)))
6013 (define-public python2-mpmath
6014 (package-with-python2 python-mpmath))
6016 (define-public python-bigfloat
6018 (name "python-bigfloat")
6023 (uri (pypi-uri "bigfloat" version))
6025 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6026 (build-system python-build-system)
6029 (home-page "https://github.com/mdickinson/bigfloat")
6030 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6032 "This package provides a Python interface to the MPFR library for
6033 multiprecision arithmetic.")
6034 (license license:lgpl3+)))
6036 (define-public python2-bigfloat
6037 (package-with-python2 python-bigfloat))
6039 (define-public python-sympy
6041 (name "python-sympy")
6047 "https://github.com/sympy/sympy/releases/download/sympy-"
6048 version "/sympy-" version ".tar.gz"))
6050 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6051 (build-system python-build-system)
6054 (modify-phases %standard-phases
6055 ;; Run the core tests after installation. By default it would run
6056 ;; *all* tests, which take a very long time to complete and are known
6059 (add-after 'install 'check
6060 (lambda* (#:key outputs #:allow-other-keys)
6061 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6064 `(("python-mpmath" ,python-mpmath)))
6065 (home-page "http://www.sympy.org/")
6066 (synopsis "Python library for symbolic mathematics")
6068 "SymPy is a Python library for symbolic mathematics. It aims to become a
6069 full-featured computer algebra system (CAS) while keeping the code as simple
6070 as possible in order to be comprehensible and easily extensible.")
6071 (license license:bsd-3)))
6073 (define-public python2-sympy
6075 (inherit (package-with-python2 python-sympy))
6078 (modify-phases %standard-phases
6079 ;; Run the core tests after installation. By default it would run
6080 ;; *all* tests, which take a very long time to complete and are known
6083 (add-after 'install 'check
6084 (lambda* (#:key outputs #:allow-other-keys)
6085 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6088 (define-public python-q
6095 (uri (pypi-uri "q" version))
6098 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6099 (build-system python-build-system)
6100 (home-page "https://github.com/zestyping/q")
6101 (synopsis "Quick-and-dirty debugging output for tired programmers")
6103 "q is a Python module for \"print\" style of debugging Python code. It
6104 provides convenient short API for print out of values, tracebacks, and
6105 falling into the Python interpreter.")
6106 (license license:asl2.0)))
6108 (define-public python2-q
6109 (package-with-python2 python-q))
6111 (define-public python2-xlib
6113 (name "python2-xlib")
6117 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6119 "python-xlib-" version ".tar.gz"))
6122 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6123 (build-system python-build-system)
6125 `(#:python ,python-2 ;Python 2 only
6126 #:tests? #f)) ;no tests
6127 (home-page "http://python-xlib.sourceforge.net/")
6128 (synopsis "Python X11 client library")
6130 "The Python X Library is intended to be a fully functional X client
6131 library for Python programs. It is useful to implement low-level X clients.
6132 It is written entirely in Python.")
6133 (license license:gpl2+)))
6135 (define-public python-singledispatch
6137 (name "python-singledispatch")
6142 (uri (pypi-uri "singledispatch" version))
6145 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6146 (build-system python-build-system)
6148 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6150 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6151 (synopsis "Backport of singledispatch feature from Python 3.4")
6153 "This library brings functools.singledispatch from Python 3.4 to Python
6155 (license license:expat)))
6157 (define-public python2-singledispatch
6158 (package-with-python2 python-singledispatch))
6160 ;; the python- version can be removed with python-3.5
6161 (define-public python-backports-abc
6163 (name "python-backports-abc")
6168 (uri (pypi-uri "backports_abc" version))
6171 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6172 (build-system python-build-system)
6173 (home-page "https://github.com/cython/backports_abc")
6174 (synopsis "Backport of additions to the 'collections.abc' module")
6176 "Python-backports-abc provides a backport of additions to the
6177 @code{collections.abc} module in Python-3.5.")
6178 (license license:psfl)))
6180 (define-public python2-backports-abc
6181 (package-with-python2 python-backports-abc))
6183 (define-public python-backports-csv
6185 (name "python-backports-csv")
6190 (uri (pypi-uri "backports.csv" version))
6193 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6194 (build-system python-build-system)
6195 (home-page "https://github.com/ryanhiebert/backports.csv")
6196 (synopsis "Backport of Python 3's csv module for Python 2")
6198 "Provides a backport of Python 3's @code{csv} module for parsing
6199 comma separated values. The API of the @code{csv} module in Python 2
6200 is drastically different from the @code{csv} module in Python 3.
6201 This is due, for the most part, to the difference between str in
6202 Python 2 and Python 3.")
6203 (license license:psfl)))
6205 (define-public python2-backports-csv
6206 (package-with-python2 python-backports-csv))
6208 (define-public python2-backports-shutil-get-terminal-size
6210 (name "python2-backports-shutil-get-terminal-size")
6215 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6218 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6219 (build-system python-build-system)
6221 `(#:python ,python-2
6223 (modify-phases %standard-phases
6226 (invoke "py.test" "-v"))))))
6228 `(("python2-pytest" ,python2-pytest)))
6229 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6230 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6232 "This package provides a backport of the @code{get_terminal_size
6233 function} from Python 3.3's @code{shutil}.
6234 Unlike the original version it is written in pure Python rather than C,
6235 so it might be a tiny bit slower.")
6236 (license license:expat)))
6238 (define-public python-waf
6244 (uri (string-append "https://waf.io/"
6245 "waf-" version ".tar.bz2"))
6248 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6249 (build-system python-build-system)
6252 (modify-phases %standard-phases
6255 (invoke "python" "waf-light" "configure" "build")))
6258 (invoke "python" "waf" "--version")))
6260 (lambda* (#:key outputs #:allow-other-keys)
6261 (let ((out (assoc-ref outputs "out")))
6262 (install-file "waf" (string-append out "/bin")))
6264 ;; waf breaks when it is wrapped.
6266 (home-page "https://waf.io/")
6267 (synopsis "Python-based build system")
6269 "Waf is a Python-based framework for configuring, compiling and installing
6271 (license license:bsd-3)))
6273 (define-public python2-waf
6274 (package-with-python2 python-waf))
6276 (define-public python-pyzmq
6278 (name "python-pyzmq")
6283 (uri (pypi-uri "pyzmq" version))
6285 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6286 (build-system python-build-system)
6289 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6290 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6291 ;; --inplace' for 'python setup.py test' to work.
6294 `(("zeromq" ,zeromq)))
6296 `(("pkg-config" ,pkg-config)
6297 ("python-nose" ,python-nose)))
6298 (home-page "https://github.com/zeromq/pyzmq")
6299 (synopsis "Python bindings for 0MQ")
6301 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6302 (license license:bsd-4)))
6304 (define-public python2-pyzmq
6305 (package-with-python2 python-pyzmq))
6307 (define-public python-pep8
6308 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6309 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6310 ;; some dependents' test suites, and nothing more.
6312 (name "python-pep8")
6317 (uri (pypi-uri "pep8" version))
6320 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6321 (build-system python-build-system)
6322 (home-page "https://pep8.readthedocs.org/")
6323 (synopsis "Python style guide checker")
6325 "This tools checks Python code against some of the style conventions in
6327 (license license:expat)))
6329 (define-public python2-pep8
6330 (package-with-python2 python-pep8))
6332 (define-public python-pyflakes
6334 (name "python-pyflakes")
6339 (uri (pypi-uri "pyflakes" version))
6342 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6343 (build-system python-build-system)
6345 "https://github.com/pyflakes/pyflakes")
6346 (synopsis "Passive checker of Python programs")
6348 "Pyflakes statically checks Python source code for common errors.")
6349 (license license:expat)))
6351 (define-public python2-pyflakes
6352 (package-with-python2 python-pyflakes))
6354 (define-public python-mccabe
6356 (name "python-mccabe")
6361 (uri (pypi-uri "mccabe" version))
6364 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6365 (build-system python-build-system)
6367 `(("python-pytest" ,python-pytest-bootstrap)
6368 ("python-pytest-runner" ,python-pytest-runner)))
6369 (home-page "https://github.com/flintwork/mccabe")
6370 (synopsis "McCabe checker, plugin for flake8")
6372 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6373 complexity of Python source code.")
6374 (license license:expat)))
6376 (define-public python2-mccabe
6377 (package-with-python2 python-mccabe))
6379 (define-public python-mccabe-0.2.1
6380 (package (inherit python-mccabe)
6385 (uri (pypi-uri "mccabe" version))
6388 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6390 (define-public python2-mccabe-0.2.1
6391 (package-with-python2 python-mccabe-0.2.1))
6393 ;; Flake8 2.4.1 requires an older version of pep8.
6394 ;; This should be removed ASAP.
6395 (define-public python-pep8-1.5.7
6396 (package (inherit python-pep8)
6401 (uri (pypi-uri "pep8" version))
6404 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6406 ;; XXX Tests not compatible with Python 3.5.
6409 (define-public python2-pep8-1.5.7
6410 (package-with-python2 python-pep8-1.5.7))
6412 ;; Flake8 2.4.1 requires an older version of pyflakes.
6413 ;; This should be removed ASAP.
6414 (define-public python-pyflakes-0.8.1
6415 (package (inherit python-pyflakes)
6420 (uri (pypi-uri "pyflakes" version))
6423 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6425 ;; XXX Tests not compatible with Python 3.5.
6428 (define-public python2-pyflakes-0.8.1
6429 (package-with-python2 python-pyflakes-0.8.1))
6431 (define-public python-flake8
6433 (name "python-flake8")
6437 (uri (pypi-uri "flake8" version))
6440 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6441 (build-system python-build-system)
6444 (modify-phases %standard-phases
6446 (add-after 'install 'check
6447 (lambda* (#:key inputs outputs #:allow-other-keys)
6448 (add-installed-pythonpath inputs outputs)
6449 (invoke "pytest" "-v")
6452 `(("python-pycodestyle" ,python-pycodestyle)
6453 ("python-entrypoints" ,python-entrypoints)
6454 ("python-pyflakes" ,python-pyflakes)
6455 ("python-mccabe" ,python-mccabe)))
6457 `(("python-mock" ,python-mock)
6458 ("python-pytest" ,python-pytest-bootstrap)
6459 ("python-pytest-runner" ,python-pytest-runner)))
6460 (home-page "https://gitlab.com/pycqa/flake8")
6462 "The modular source code checker: pep8, pyflakes and co")
6464 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6465 (properties `((python2-variant . ,(delay python2-flake8))))
6466 (license license:expat)))
6468 (define-public python2-flake8
6469 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6470 (package (inherit base)
6472 `(("python2-configparser" ,python2-configparser)
6473 ("python2-enum34" ,python2-enum34)
6474 ("python2-typing" ,python2-typing)
6475 ,@(package-propagated-inputs base))))))
6477 ;; python-hacking requires flake8 <2.6.0.
6478 (define-public python-flake8-2.5
6480 (inherit python-flake8)
6484 (uri (pypi-uri "flake8" version))
6487 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6489 `(("python-pep8" ,python-pep8)
6490 ,@(package-propagated-inputs python-flake8)))
6491 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6493 (define-public python2-flake8-2.5
6495 (inherit python2-flake8)
6496 (version (package-version python-flake8-2.5))
6498 (inherit (package-source python-flake8-2.5))))
6500 `(("python2-pep8" ,python2-pep8)
6501 ,@(package-propagated-inputs python2-flake8)))))
6503 (define-public python-flake8-polyfill
6505 (name "python-flake8-polyfill")
6510 (uri (pypi-uri "flake8-polyfill" version))
6513 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6514 (build-system python-build-system)
6517 (modify-phases %standard-phases
6520 (setenv "PYTHONPATH"
6521 (string-append (getcwd) "/build/lib:"
6522 (getenv "PYTHONPATH")))
6523 (invoke "py.test" "-v"))))))
6525 `(("python-flake8" ,python-flake8)
6526 ("python-mock" ,python-mock)
6527 ("python-pep8" ,python-pep8)
6528 ("python-pycodestyle" ,python-pycodestyle)
6529 ("python-pytest" ,python-pytest)))
6530 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6531 (synopsis "Polyfill package for Flake8 plugins")
6533 "This package that provides some compatibility helpers for Flake8
6534 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6535 (license license:expat)))
6537 (define-public python2-flake8-polyfill
6538 (package-with-python2 python-flake8-polyfill))
6540 (define-public python-mistune
6542 (name "python-mistune")
6547 (uri (pypi-uri "mistune" version))
6550 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6551 (build-system python-build-system)
6553 `(("python-nose" ,python-nose)
6554 ("python-cython" ,python-cython)))
6555 (home-page "https://github.com/lepture/mistune")
6556 (synopsis "Markdown parser in pure Python")
6557 (description "This package provides a fast markdown parser in pure
6559 (license license:bsd-3)))
6561 (define-public python2-mistune
6562 (package-with-python2 python-mistune))
6564 (define-public python-markdown
6566 (name "python-markdown")
6571 (uri (pypi-uri "Markdown" version))
6574 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6575 (build-system python-build-system)
6577 `(("python-nose" ,python-nose)
6578 ("python-pyyaml" ,python-pyyaml)))
6579 (home-page "https://python-markdown.github.io/")
6580 (synopsis "Python implementation of Markdown")
6582 "This package provides a Python implementation of John Gruber's
6583 Markdown. The library features international input, various Markdown
6584 extensions, and several HTML output formats. A command line wrapper
6585 markdown_py is also provided to convert Markdown files to HTML.")
6586 (license license:bsd-3)))
6588 (define-public python2-markdown
6589 (package-with-python2 python-markdown))
6591 (define-public python-ptyprocess
6593 (name "python-ptyprocess")
6598 (uri (pypi-uri "ptyprocess" version))
6601 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6602 (build-system python-build-system)
6604 `(("python-nose" ,python-nose)))
6607 (modify-phases %standard-phases
6609 (lambda _ (invoke "nosetests"))))))
6610 (home-page "https://github.com/pexpect/ptyprocess")
6611 (synopsis "Run a subprocess in a pseudo terminal")
6613 "This package provides a Python library used to launch a subprocess in a
6614 pseudo terminal (pty), and interact with both the process and its pty.")
6615 (license license:isc)))
6617 (define-public python2-ptyprocess
6618 (package-with-python2 python-ptyprocess))
6620 (define-public python-cram
6622 (name "python-cram")
6624 (home-page "https://bitheap.org/cram/")
6627 (uri (list (string-append home-page "cram-"
6629 (pypi-uri "cram" version)))
6632 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6635 (modify-phases %standard-phases
6636 (add-after 'unpack 'patch-source
6638 (substitute* (find-files "cram" ".*\\.py$")
6639 ;; Replace default shell path.
6640 (("/bin/sh") (which "sh")))
6641 (substitute* (find-files "tests" ".*\\.t$")
6643 (("/bin/bash") (which "bash"))
6644 (("/bin/sh") (which "sh")))
6645 (substitute* "cram/_test.py"
6646 ;; This hack works around a bug triggered by substituting
6647 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6648 ;; "cram -h", which breaks the output at 80 characters. This
6649 ;; causes the line showing the default shell to break into two
6650 ;; lines, but the test expects a single line...
6651 (("env\\['COLUMNS'\\] = '80'")
6652 "env['COLUMNS'] = '160'"))
6654 (substitute* "Makefile"
6655 ;; Recent versions of python-coverage have caused the test
6656 ;; coverage to decrease (as of version 0.7). Allow that.
6657 (("--fail-under=100")
6662 ;; The test phase uses the built library and executable.
6663 (lambda* (#:key inputs outputs #:allow-other-keys)
6664 (add-installed-pythonpath inputs outputs)
6665 (setenv "PATH" (string-append (getenv "PATH") ":"
6666 (assoc-ref outputs "out") "/bin"))
6667 (invoke "make" "test"))))))
6668 (build-system python-build-system)
6670 `(("python-coverage" ,python-coverage)
6672 (synopsis "Simple testing framework for command line applications")
6674 "Cram is a functional testing framework for command line applications.
6675 Cram tests look like snippets of interactive shell sessions. Cram runs each
6676 command and compares the command output in the test with the command’s actual
6678 (license license:gpl2+)))
6680 (define-public python2-cram
6681 (package-with-python2 python-cram))
6683 (define-public python-straight-plugin
6685 (name "python-straight-plugin")
6690 (uri (pypi-uri "straight.plugin" version))
6693 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6694 (build-system python-build-system)
6695 (home-page "https://github.com/ironfroggy/straight.plugin")
6696 (synopsis "Simple namespaced plugin facility")
6697 (description "Straight Plugin provides a type of plugin you can create from
6698 almost any existing Python modules, and an easy way for outside developers to
6699 add functionality and customization to your projects with their own plugins.")
6700 (license license:expat)))
6702 (define-public python2-straight-plugin
6703 (package-with-python2 python-straight-plugin))
6705 (define-public python-fonttools
6707 (name "python-fonttools")
6711 (uri (pypi-uri "fonttools" version ".zip"))
6714 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6715 (build-system python-build-system)
6718 ("python-pytest" ,python-pytest)
6719 ("python-pytest-runner" ,python-pytest-runner)))
6720 (home-page "https://github.com/behdad/fonttools")
6721 (synopsis "Tools to manipulate font files")
6723 "FontTools/TTX is a library to manipulate font files from Python. It
6724 supports reading and writing of TrueType/OpenType fonts, reading and writing
6725 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6726 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6727 from an XML-based format.")
6728 (license license:expat)))
6730 (define-public python2-fonttools
6731 (package-with-python2 python-fonttools))
6733 (define-public python-ly
6740 (uri (pypi-uri name version))
6743 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6744 (build-system python-build-system)
6746 ;; FIXME: Some tests need network access.
6748 (synopsis "Tool and library for manipulating LilyPond files")
6749 (description "This package provides a Python library to parse, manipulate
6750 or create documents in LilyPond format. A command line program ly is also
6751 provided that can be used to do various manipulations with LilyPond files.")
6752 (home-page "https://pypi.python.org/pypi/python-ly")
6753 (license license:gpl2+)))
6755 (define-public python-appdirs
6757 (name "python-appdirs")
6762 (uri (pypi-uri "appdirs" version))
6765 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6766 (build-system python-build-system)
6767 (home-page "https://github.com/ActiveState/appdirs")
6769 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6771 "This module provides a portable way of finding out where user data
6772 should be stored on various operating systems.")
6773 (license license:expat)))
6775 (define-public python2-appdirs
6776 (package-with-python2 python-appdirs))
6778 (define-public python-llfuse
6780 (name "python-llfuse")
6784 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6787 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6788 (build-system python-build-system)
6793 `(("pkg-config" ,pkg-config)))
6794 (synopsis "Python bindings for FUSE")
6796 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6797 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6798 (license license:lgpl2.0+)
6799 (properties `((python2-variant . ,(delay python2-llfuse))))))
6801 (define-public python2-llfuse
6802 (package (inherit (package-with-python2
6803 (strip-python2-variant python-llfuse)))
6804 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6807 (define-public python-llfuse-0.41
6808 (package (inherit python-llfuse)
6813 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6814 "llfuse-" version ".tar.bz2"))
6817 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6818 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6819 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6820 (license (list license:expat license:lgpl2.0+))))
6822 (define-public python-msgpack
6824 (name "python-msgpack")
6828 (uri (pypi-uri "msgpack" version))
6831 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6832 (build-system python-build-system)
6834 `(#:modules ((guix build utils)
6835 (guix build python-build-system)
6840 (modify-phases %standard-phases
6843 (let ((cwd (getcwd)))
6844 (setenv "PYTHONPATH"
6845 (string-append cwd "/build/"
6846 (find (cut string-prefix? "lib" <>)
6847 (scandir (string-append cwd "/build")))
6849 (getenv "PYTHONPATH")))
6850 (invoke "pytest" "-v" "test")))))))
6852 `(("python-pytest" ,python-pytest)))
6853 (synopsis "MessagePack (de)serializer")
6854 (description "MessagePack is a fast, compact binary serialization format,
6855 suitable for similar data to JSON. This package provides CPython bindings for
6856 reading and writing MessagePack data.")
6857 (home-page "https://pypi.python.org/pypi/msgpack/")
6858 (license license:asl2.0)))
6860 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6861 ;; release 0.5. Some packages like borg still call it by the old name for now.
6862 ;; <https://bugs.gnu.org/30662>
6863 (define-public python-msgpack-transitional
6865 (inherit python-msgpack)
6866 (name "python-msgpack-transitional")
6868 (substitute-keyword-arguments (package-arguments python-msgpack)
6870 `(modify-phases ,phases
6871 (add-after 'unpack 'configure-transitional
6873 ;; Keep using the old name.
6874 (substitute* "setup.py"
6875 (("TRANSITIONAL = False")
6876 "TRANSITIONAL = 1"))
6879 (define-public python2-msgpack
6880 (package-with-python2 python-msgpack))
6882 (define-public python-netaddr
6884 (name "python-netaddr")
6889 (uri (pypi-uri "netaddr" version))
6892 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6893 (build-system python-build-system)
6894 (arguments `(#:tests? #f)) ;; No tests.
6895 (home-page "https://github.com/drkjam/netaddr/")
6896 (synopsis "Pythonic manipulation of network addresses")
6898 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6899 and MAC network addresses.")
6900 (license license:bsd-3)))
6902 (define-public python2-netaddr
6903 (package-with-python2 python-netaddr))
6905 (define-public python2-pyroute2
6907 (name "python2-pyroute2")
6912 (uri (pypi-uri "pyroute2" version))
6915 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6916 (build-system python-build-system)
6918 `(#:python ,python-2)) ;Python 3.x is not supported
6919 (home-page "https://github.com/svinota/pyroute2")
6920 (synopsis "Python netlink library")
6922 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6923 Supported netlink families and protocols include:
6925 @item rtnl, network settings - addresses, routes, traffic controls
6926 @item nfnetlink - netfilter API: ipset, nftables, ...
6927 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6928 @item devlink - manage and monitor devlink-enabled hardware
6929 @item generic - generic netlink families
6931 @item nl80211 - wireless functions API (basic support)
6932 @item taskstats - extended process statistics
6933 @item acpi_events - ACPI events monitoring
6934 @item thermal_events - thermal events monitoring
6935 @item VFS_DQUOT - disk quota events monitoring
6938 (license license:gpl2+)))
6940 (define-public python-wrapt
6942 (name "python-wrapt")
6947 (uri (pypi-uri "wrapt" version))
6950 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6951 (build-system python-build-system)
6953 ;; Tests are not included in the tarball, they are only available in the
6956 (home-page "https://github.com/GrahamDumpleton/wrapt")
6957 (synopsis "Module for decorators, wrappers and monkey patching")
6959 "The aim of the wrapt module is to provide a transparent object proxy for
6960 Python, which can be used as the basis for the construction of function
6961 wrappers and decorator functions.")
6962 (license license:bsd-2)))
6964 (define-public python2-wrapt
6965 (package-with-python2 python-wrapt))
6967 (define-public python-xlrd
6969 (name "python-xlrd")
6973 (uri (pypi-uri "xlrd" version))
6976 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6977 (build-system python-build-system)
6980 (modify-phases %standard-phases
6981 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6982 ;; run tests instead for now.
6983 (replace 'check (lambda _ (invoke "nosetests"))))))
6984 (native-inputs `(("python-nose" ,python-nose)))
6985 (home-page "http://www.python-excel.org/")
6986 (synopsis "Library for extracting data from Excel files")
6987 (description "This package provides a library to extract data from
6988 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6989 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6990 Unicode-aware. It is not intended as an end-user tool.")
6991 (license license:bsd-3)))
6993 (define-public python2-xlrd
6994 (package-with-python2 python-xlrd))
6996 (define-public python-prettytable
6998 (name "python-prettytable")
7003 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7006 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7007 (build-system python-build-system)
7008 (home-page "http://code.google.com/p/prettytable/")
7009 (synopsis "Display tabular data in an ASCII table format")
7011 "A library designed to represent tabular data in visually appealing ASCII
7012 tables. PrettyTable allows for selection of which columns are to be printed,
7013 independent alignment of columns (left or right justified or centred) and
7014 printing of sub-tables by specifying a row range.")
7015 (license license:bsd-3)))
7017 (define-public python2-prettytable
7018 (package-with-python2 python-prettytable))
7020 (define-public python-tables
7022 (name "python-tables")
7027 (uri (pypi-uri "tables" version))
7030 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7031 (modules '((guix build utils)))
7034 ;; Remove pre-compiled .pyc files from source.
7035 (for-each delete-file-recursively
7036 (find-files "." "__pycache__" #:directories? #t))
7037 (for-each delete-file (find-files "." "\\.pyc$"))
7039 (build-system python-build-system)
7041 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7042 ;; or "check", so we must override the build and check phases.
7044 (modify-phases %standard-phases
7045 (add-after 'unpack 'use-gcc
7047 (substitute* "setup.py"
7048 (("compiler = new_compiler\\(\\)" line)
7050 "\ncompiler.set_executables(compiler='gcc',"
7051 "compiler_so='gcc',"
7053 "linker_so='gcc -shared')")))
7056 (lambda* (#:key inputs #:allow-other-keys)
7057 (invoke "python" "setup.py" "build"
7058 (string-append "--hdf5="
7059 (assoc-ref inputs "hdf5")))))
7061 (lambda* (#:key inputs #:allow-other-keys)
7062 (invoke "python" "setup.py" "check"
7063 (string-append "--hdf5="
7064 (assoc-ref inputs "hdf5"))))))))
7066 `(("python-numexpr" ,python-numexpr)
7067 ("python-numpy" ,python-numpy)))
7069 `(("python-cython" ,python-cython)
7070 ("pkg-config" ,pkg-config)))
7075 (home-page "http://www.pytables.org/")
7076 (synopsis "Hierarchical datasets for Python")
7077 (description "PyTables is a package for managing hierarchical datasets and
7078 designed to efficiently cope with extremely large amounts of data.")
7079 (license license:bsd-3)))
7081 (define-public python2-tables
7082 (package-with-python2 python-tables))
7084 (define-public python-pyasn1
7086 (name "python-pyasn1")
7091 (uri (pypi-uri "pyasn1" version))
7094 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7095 (build-system python-build-system)
7096 (home-page "http://pyasn1.sourceforge.net/")
7097 (synopsis "ASN.1 types and codecs")
7099 "This is an implementation of ASN.1 types and codecs in Python. It is
7100 suitable for a wide range of protocols based on the ASN.1 specification.")
7101 (license license:bsd-2)))
7103 (define-public python2-pyasn1
7104 (package-with-python2 python-pyasn1))
7106 (define-public python-pyasn1-modules
7108 (name "python-pyasn1-modules")
7113 (uri (pypi-uri "pyasn1-modules" version))
7116 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7117 (build-system python-build-system)
7119 `(("python-pyasn1" ,python-pyasn1)))
7120 (home-page "https://sourceforge.net/projects/pyasn1/")
7121 (synopsis "ASN.1 codec implementations")
7123 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7124 implementations of ASN.1-based codecs and protocols.")
7125 (license license:bsd-3)))
7127 (define-public python2-pyasn1-modules
7128 (package-with-python2 python-pyasn1-modules))
7130 (define-public python-ipaddress
7132 (name "python-ipaddress")
7136 (uri (pypi-uri "ipaddress" version))
7139 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7140 (build-system python-build-system)
7141 (home-page "https://github.com/phihag/ipaddress")
7142 (synopsis "IP address manipulation library")
7144 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7145 in Python. This library is used to create, poke at, and manipulate IPv4 and
7146 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7147 module to older versions of Python.")
7148 (license license:psfl)))
7150 (define-public python2-ipaddress
7151 (package-with-python2 python-ipaddress))
7153 (define-public python2-ipaddr
7155 (name "python2-ipaddr")
7160 (uri (pypi-uri "ipaddr" version))
7162 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7163 (build-system python-build-system)
7165 `(#:python ,python-2 ;version 2 only
7167 (modify-phases %standard-phases
7169 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7170 (home-page "https://github.com/google/ipaddr-py")
7171 (synopsis "IP address manipulation library")
7173 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7174 IPv6 addresses and networks.
7176 For new implementations you may prefer to use the standard module
7177 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7178 versions of Python.")
7179 (license license:asl2.0)))
7181 (define-public python-idna
7183 (name "python-idna")
7188 (uri (pypi-uri "idna" version))
7191 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7192 (build-system python-build-system)
7193 (home-page "https://github.com/kjd/idna")
7194 (synopsis "Internationalized domain names in applications")
7196 "This is a library to support the Internationalised Domain Names in
7197 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7198 protocol is often referred to as “IDNA2008” and can produce different results
7199 from the earlier standard from 2003. The library is also intended to act as a
7200 suitable drop-in replacement for the “encodings.idna” module that comes with
7201 the Python standard library but currently only supports the older 2003
7203 (license license:bsd-4)))
7205 (define-public python2-idna
7206 (package-with-python2 python-idna))
7208 (define-public python-idna-ssl
7210 (name "python-idna-ssl")
7215 (uri (pypi-uri "idna-ssl" version))
7218 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7219 (build-system python-build-system)
7221 `(#:tests? #f)) ;circular dependency with python-aiohttp
7222 (home-page "https://github.com/aio-libs/idna-ssl")
7223 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7224 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7226 (license license:expat)))
7228 (define-public python-pretend
7230 (name "python-pretend")
7235 (uri (pypi-uri "pretend" version))
7238 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/alex/pretend")
7241 (synopsis "Library for stubbing in Python")
7243 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7244 technique for writing tests. You may hear the term mixed up with mocks,
7245 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7246 responses, rather than doing any computation.")
7247 (license license:bsd-3)))
7249 (define-public python2-pretend
7250 (package-with-python2 python-pretend))
7252 (define-public python-pip
7259 (uri (pypi-uri "pip" version))
7262 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7263 (build-system python-build-system)
7265 '(#:tests? #f)) ; there are no tests in the pypi archive.
7266 (home-page "https://pip.pypa.io/")
7267 (synopsis "Package manager for Python software")
7269 "Pip is a package manager for Python software, that finds packages on the
7270 Python Package Index (PyPI).")
7271 (license license:expat)))
7273 (define-public python2-pip
7274 (package-with-python2 python-pip))
7276 (define-public python-tlsh
7278 (name "python-tlsh")
7280 (home-page "https://github.com/trendmicro/tlsh")
7285 (url "https://github.com/trendmicro/tlsh.git")
7286 (commit (string-append "v" version))))
7287 (file-name (git-file-name name version))
7289 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7290 (build-system cmake-build-system)
7292 '(#:out-of-source? #f
7293 #:phases (modify-phases %standard-phases
7296 (lambda* (#:key outputs #:allow-other-keys)
7297 ;; Build and install the Python bindings. The underlying
7298 ;; C++ library is apparently not meant to be installed.
7299 (let ((out (assoc-ref outputs "out")))
7300 (with-directory-excursion "py_ext"
7301 (and (system* "python" "setup.py" "build")
7302 (system* "python" "setup.py" "install"
7303 (string-append "--prefix=" out))))))))))
7304 (inputs `(("python" ,python-wrapper))) ;for the bindings
7305 (synopsis "Fuzzy matching library for Python")
7307 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7308 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7309 value which can be used for similarity comparisons. Similar objects have
7310 similar hash values, which allows for the detection of similar objects by
7311 comparing their hash values. The byte stream should have a sufficient amount
7312 of complexity; for example, a byte stream of identical bytes will not generate
7314 (license license:asl2.0)))
7316 (define-public python2-tlsh
7318 (inherit python-tlsh)
7319 (name "python2-tlsh")
7320 (inputs `(("python" ,python-2)))))
7322 (define-public python-termcolor
7324 (name "python-termcolor")
7329 (uri (pypi-uri "termcolor" version))
7332 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7333 (build-system python-build-system)
7335 ;; There are no tests.
7337 (home-page "https://pypi.python.org/pypi/termcolor")
7338 (synopsis "ANSII Color formatting for terminal output")
7340 "This package provides ANSII Color formatting for output in terminals.")
7341 (license license:expat)))
7343 (define-public python2-termcolor
7344 (package-with-python2 python-termcolor))
7346 (define-public python-libarchive-c
7348 (name "python-libarchive-c")
7352 (uri (pypi-uri "libarchive-c" version))
7355 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7356 (build-system python-build-system)
7358 '(#:phases (modify-phases %standard-phases
7360 'build 'reference-libarchive
7361 (lambda* (#:key inputs #:allow-other-keys)
7362 ;; Retain the absolute file name of libarchive.so.
7363 (let ((libarchive (assoc-ref inputs "libarchive")))
7364 (substitute* "libarchive/ffi.py"
7365 (("find_library\\('archive'\\)")
7366 (string-append "'" libarchive
7367 "/lib/libarchive.so'"))))))
7369 (lambda _ (invoke "pytest" "-vv"))))))
7371 `(("python-mock" ,python-mock)
7372 ("python-pytest" ,python-pytest)))
7374 `(("libarchive" ,libarchive)))
7375 (home-page "https://github.com/Changaco/python-libarchive-c")
7376 (synopsis "Python interface to libarchive")
7378 "This package provides Python bindings to libarchive, a C library to
7379 access possibly compressed archives in many different formats. It uses
7380 Python's @code{ctypes} foreign function interface (FFI).")
7381 (license license:lgpl2.0+)))
7383 (define-public python2-libarchive-c
7384 (package-with-python2 python-libarchive-c))
7386 (define-public python-file
7389 (name "python-file")
7390 (build-system python-build-system)
7392 '(#:tests? #f ;no tests
7393 #:configure-flags '("--single-version-externally-managed" "--root=/")
7394 #:phases (modify-phases %standard-phases
7395 (add-before 'build 'change-directory
7399 (add-before 'build 'set-library-file-name
7400 (lambda* (#:key inputs #:allow-other-keys)
7401 (let ((file (assoc-ref inputs "file")))
7402 (substitute* "magic.py"
7403 (("find_library\\('magic'\\)")
7404 (string-append "'" file "/lib/libmagic.so'")))
7406 (inputs `(("file" ,file)))
7407 (native-inputs (if (%current-target-system)
7408 `(("self" ,this-package))
7410 (synopsis "Python bindings to the libmagic file type guesser. Note that
7411 this module and the python-magic module both provide a \"magic.py\" file;
7412 these two modules, which are different and were developed separately, both
7413 serve the same purpose: provide Python bindings for libmagic.")))
7415 (define-public python2-file
7416 (package-with-python2 python-file))
7418 (define-public python-debian
7420 (name "python-debian")
7421 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7426 (uri (pypi-uri name version))
7429 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7430 (build-system python-build-system)
7432 `(("python-six" ,python-six)))
7433 (synopsis "Debian package related modules")
7435 ;; XXX: Use @enumerate instead of @itemize to work around
7436 ;; <http://bugs.gnu.org/21772>.
7437 "This package provides Python modules that abstract many formats of
7438 Debian-related files, such as:
7441 @item Debtags information;
7442 @item @file{debian/changelog} files;
7443 @item packages files, pdiffs;
7444 @item control files of single or multiple RFC822-style paragraphs---e.g.
7445 @file{debian/control}, @file{.changes}, @file{.dsc};
7446 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7447 contained files and meta-information.
7450 ;; Modules are either GPLv2+ or GPLv3+.
7451 (license license:gpl3+)))
7453 (define-public python2-debian
7454 (package-with-python2 python-debian))
7456 (define-public python-nbformat
7458 (name "python-nbformat")
7463 (uri (pypi-uri "nbformat" version))
7466 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7467 (build-system python-build-system)
7468 (arguments `(#:tests? #f)) ; no test target
7470 `(("python-ipython-genutils" ,python-ipython-genutils)
7471 ("python-jsonschema" ,python-jsonschema)
7472 ("python-jupyter-core" ,python-jupyter-core)
7473 ("python-traitlets" ,python-traitlets)))
7474 (home-page "http://jupyter.org")
7475 (synopsis "Jupyter Notebook format")
7476 (description "This package provides the reference implementation of the
7477 Jupyter Notebook format and Python APIs for working with notebooks.")
7478 (license license:bsd-3)))
7480 (define-public python2-nbformat
7481 (package-with-python2 python-nbformat))
7483 (define-public python-bleach
7485 (name "python-bleach")
7490 (uri (pypi-uri "bleach" version))
7493 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7494 (build-system python-build-system)
7496 `(("python-html5lib" ,python-html5lib-0.9)
7497 ("python-six" ,python-six)))
7499 `(("python-nose" ,python-nose)))
7500 (home-page "https://github.com/jsocol/bleach")
7501 (synopsis "Whitelist-based HTML-sanitizing tool")
7502 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7503 (license license:asl2.0)))
7505 (define-public python2-bleach
7506 (package-with-python2 python-bleach))
7508 (define-public python-entrypoints
7510 (name "python-entrypoints")
7515 (uri (pypi-uri "entrypoints" version))
7518 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7519 (build-system python-build-system)
7520 ;; The package does not come with a setup.py file, so we have to generate
7525 (modify-phases %standard-phases
7526 (add-after 'unpack 'create-setup.py
7528 (call-with-output-file "setup.py"
7531 from setuptools import setup
7532 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7534 (home-page "https://github.com/takluyver/entrypoints")
7535 (synopsis "Discover and load entry points from installed Python packages")
7536 (description "Entry points are a way for Python packages to advertise
7537 objects with some common interface. The most common examples are
7538 @code{console_scripts} entry points, which define shell commands by
7539 identifying a Python function to run. The @code{entrypoints} module contains
7540 functions to find and load entry points.")
7541 (license license:expat)))
7543 (define-public python2-entrypoints
7544 (package-with-python2 python-entrypoints))
7546 (define-public python-nbconvert
7548 (name "python-nbconvert")
7553 (uri (pypi-uri "nbconvert" version))
7556 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7557 (build-system python-build-system)
7559 `(;; The "bdist_egg" target is disabled by default, causing the installation
7561 #:configure-flags (list "bdist_egg")
7562 ;; FIXME: 5 failures, 40 errors.
7565 ;; (modify-phases %standard-phases
7568 ;; (zero? (system* "py.test" "-v")))))
7570 `(("python-pytest" ,python-pytest)))
7572 `(("python-bleach" ,python-bleach)
7573 ("python-entrypoints" ,python-entrypoints)
7574 ("python-jinja2" ,python-jinja2)
7575 ("python-jupyter-core" ,python-jupyter-core)
7576 ("python-mistune" ,python-mistune)
7577 ("python-nbformat" ,python-nbformat)
7578 ("python-pygments" ,python-pygments)
7579 ("python-traitlets" ,python-traitlets)))
7580 (home-page "http://jupyter.org")
7581 (synopsis "Converting Jupyter Notebooks")
7582 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7583 notebooks to various other formats via Jinja templates. It allows you to
7584 convert an @code{.ipynb} notebook file into various static formats including:
7592 @item ReStructured Text (rst)
7593 @item executable script
7595 (license license:bsd-3)))
7597 (define-public python2-nbconvert
7598 (package-with-python2 python-nbconvert))
7600 (define-public python-notebook
7602 (name "python-notebook")
7606 (uri (pypi-uri "notebook" version))
7609 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7610 (build-system python-build-system)
7613 (modify-phases %standard-phases
7616 ;; These tests require a browser
7617 (delete-file-recursively "notebook/tests/selenium")
7618 ;; Some tests need HOME
7619 (setenv "HOME" "/tmp")
7620 ;; This file contains "warningfilters", which are not supported
7621 ;; by this version of nose.
7622 (delete-file "setup.cfg")
7623 (with-directory-excursion "/tmp"
7624 (invoke "nosetests" "-v"))
7627 `(("python-jupyter-core" ,python-jupyter-core)
7628 ("python-nbformat" ,python-nbformat)
7629 ("python-nbconvert" ,python-nbconvert)
7630 ("python-prometheus-client" ,python-prometheus-client)
7631 ("python-send2trash" ,python-send2trash)
7632 ("python-terminado" ,python-terminado)))
7634 `(("python-nose" ,python-nose)
7635 ("python-sphinx" ,python-sphinx)
7636 ("python-requests" ,python-requests)))
7637 (home-page "http://jupyter.org/")
7638 (synopsis "Web-based notebook environment for interactive computing")
7640 "The Jupyter HTML notebook is a web-based notebook environment for
7641 interactive computing.")
7642 (properties `((python2-variant . ,(delay python2-notebook))))
7643 (license license:bsd-3)))
7645 (define-public python2-notebook
7646 (let ((base (package-with-python2
7647 (strip-python2-variant python-notebook))))
7648 (package (inherit base)
7650 `(("python2-mock" ,python2-mock)
7651 ,@(package-native-inputs base)))
7653 (substitute-keyword-arguments (package-arguments base)
7655 `(modify-phases ,phases
7656 (add-before 'check 'disable-test-case
7657 ;; The test requires network access to localhost. Curiously it
7658 ;; fails with Python 2 only. Simply make the test-case return
7662 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7663 (("formats = self.nbconvert_api") "return #")))))))))))
7665 (define-public python-widgetsnbextension
7667 (name "python-widgetsnbextension")
7672 (uri (pypi-uri "widgetsnbextension" version))
7675 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7676 (build-system python-build-system)
7678 `(("python-ipykernel" ,python-ipykernel)
7679 ("python-notebook" ,python-notebook)))
7681 `(("python-certifi" ,python-certifi)
7682 ("python-nose" ,python-nose)))
7683 (home-page "https://ipython.org")
7684 (synopsis "IPython HTML widgets for Jupyter")
7685 (description "This package provides interactive HTML widgets for Jupyter
7687 (license license:bsd-3)))
7689 (define-public python2-widgetsnbextension
7690 (package-with-python2 python-widgetsnbextension))
7692 (define-public python-ipywidgets
7694 (name "python-ipywidgets")
7699 (uri (pypi-uri "ipywidgets" version))
7702 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7703 (build-system python-build-system)
7705 `(("python-ipython" ,python-ipython)
7706 ("python-traitlets" ,python-traitlets)
7707 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7709 `(("python-nose" ,python-nose)
7710 ("python-pytest" ,python-pytest)))
7711 (home-page "https://ipython.org")
7712 (synopsis "IPython HTML widgets for Jupyter")
7713 (description "Ipywidgets are interactive HTML widgets for Jupyter
7714 notebooks and the IPython kernel. Notebooks come alive when interactive
7715 widgets are used. Users gain control of their data and can visualize changes
7717 (license license:bsd-3)))
7719 (define-public python2-ipywidgets
7720 (package-with-python2 python-ipywidgets))
7722 (define-public python-jupyter-console
7724 (name "python-jupyter-console")
7729 (uri (pypi-uri "jupyter_console" version))
7732 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7733 (build-system python-build-system)
7735 `(("python-ipykernel" ,python-ipykernel)
7736 ("python-jupyter-client" ,python-jupyter-client)
7737 ("python-prompt-toolkit" ,python-prompt-toolkit)
7738 ("python-pygments" ,python-pygments)))
7740 `(("python-nose" ,python-nose)))
7741 (home-page "https://jupyter.org")
7742 (synopsis "Jupyter terminal console")
7743 (description "This package provides a terminal-based console frontend for
7744 Jupyter kernels. It also allows for console-based interaction with non-Python
7745 Jupyter kernels such as IJulia and IRKernel.")
7746 (license license:bsd-3)))
7748 (define-public python2-jupyter-console
7750 (name "python2-jupyter-console")
7755 (uri (pypi-uri "jupyter_console" version))
7758 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7759 (build-system python-build-system)
7760 ;; Tests only run in an TTY.
7761 (arguments `(#:tests? #f))
7763 `(("python2-ipykernel" ,python2-ipykernel)
7764 ("python2-jupyter-client" ,python2-jupyter-client)
7765 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7766 ("python2-pygments" ,python2-pygments)))
7768 `(("python2-nose" ,python2-nose)))
7769 (home-page "https://jupyter.org")
7770 (synopsis "Jupyter terminal console")
7771 (description "This package provides a terminal-based console frontend for
7772 Jupyter kernels. It also allows for console-based interaction with non-Python
7773 Jupyter kernels such as IJulia and IRKernel.")
7774 (license license:bsd-3)))
7776 ;; The python-ipython and python-jupyter-console require each other. To get
7777 ;; the functionality in both packages working, strip down the
7778 ;; python-jupyter-console package when using it as an input to python-ipython.
7779 (define python-jupyter-console-minimal
7781 (inherit python-jupyter-console)
7782 (name "python-jupyter-console-minimal")
7784 (substitute-keyword-arguments
7785 (package-arguments python-jupyter-console)
7787 `(modify-phases ,phases
7788 (add-after 'install 'delete-bin
7789 (lambda* (#:key outputs #:allow-other-keys)
7790 ;; Delete the bin files, to avoid conflicts in profiles
7791 ;; where python-ipython and python-jupyter-console are
7793 (delete-file-recursively
7795 (assoc-ref outputs "out") "/bin"))))))))
7796 ;; Remove the python-ipython propagated input, to avoid the cycle
7800 (package-propagated-inputs python-jupyter-console)))))
7802 (define-public python-qtconsole
7804 (name "python-qtconsole")
7809 (uri (pypi-uri "qtconsole" version))
7812 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7813 (build-system python-build-system)
7815 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7816 ;; but we only have the LTS version 5.x. This means that there might be
7817 ;; runtime errors, but since this is a dependency of the Jupyter package,
7818 ;; and Jupyter can be used without the qtconsole we can overlook this for
7822 (modify-phases %standard-phases
7823 (add-before 'check 'pre-check
7825 (setenv "QT_QPA_PLATFORM" "offscreen")
7828 `(("python-ipykernel" ,python-ipykernel)
7829 ("python-ipython" ,python-ipython)))
7831 `(("python-pytest" ,python-pytest)))
7832 (home-page "http://jupyter.org")
7833 (synopsis "Jupyter Qt console")
7834 (description "This package provides a Qt-based console for Jupyter with
7835 support for rich media output.")
7836 (license license:bsd-3)))
7838 (define-public jupyter
7845 (uri (pypi-uri "jupyter" version))
7848 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7849 (build-system python-build-system)
7850 (arguments '(#:tests? #f)) ; there are none.
7852 `(("python-ipykernel" ,python-ipykernel)
7853 ("python-ipywidgets" ,python-ipywidgets)
7854 ("python-jupyter-console" ,python-jupyter-console)
7855 ("python-nbconvert" ,python-nbconvert)
7856 ("python-notebook" ,python-notebook)
7857 ("python-qtconsole" ,python-qtconsole)))
7858 (native-search-paths
7859 (list (search-path-specification
7860 (variable "JUPYTER_PATH")
7861 (files '("share/jupyter")))))
7862 (home-page "https://jupyter.org")
7863 (synopsis "Web application for interactive documents")
7865 "The Jupyter Notebook is a web application that allows you to create and
7866 share documents that contain live code, equations, visualizations and
7867 explanatory text. Uses include: data cleaning and transformation, numerical
7868 simulation, statistical modeling, machine learning and much more.")
7869 (license license:bsd-3)))
7871 (define-public python-chardet
7873 (name "python-chardet")
7878 (uri (pypi-uri "chardet" version))
7881 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7883 `(("python-hypothesis" ,python-hypothesis)
7884 ("python-pytest" ,python-pytest)
7885 ("python-pytest-runner" ,python-pytest-runner)))
7886 (build-system python-build-system)
7887 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7888 (arguments `(#:tests? #f))
7889 (home-page "https://github.com/chardet/chardet")
7890 (synopsis "Universal encoding detector for Python 2 and 3")
7892 "This package provides @code{chardet}, a Python module that can
7893 automatically detect a wide range of file encodings.")
7894 (license license:lgpl2.1+)))
7896 (define-public python2-chardet
7897 (package-with-python2 python-chardet))
7899 (define-public python-docopt
7901 (name "python-docopt")
7906 ;; The release on PyPI does not include tests.
7908 "https://github.com/docopt/docopt/archive/"
7910 (file-name (string-append name "-" version ".tar.gz"))
7913 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7914 (build-system python-build-system)
7916 `(("python-pytest" ,python-pytest)))
7919 (modify-phases %standard-phases
7921 (lambda _ (invoke "py.test"))))))
7922 (home-page "http://docopt.org")
7923 (synopsis "Command-line interface description language for Python")
7924 (description "This library allows the user to define a command-line
7925 interface from a program's help message rather than specifying it
7926 programmatically with command-line parsers like @code{getopt} and
7928 (license license:expat)))
7930 (define-public python2-docopt
7931 (package-with-python2 python-docopt))
7933 (define-public python-pythondialog
7935 (name "python-pythondialog")
7940 (uri (pypi-uri "pythondialog" version))
7943 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7944 (build-system python-build-system)
7947 (modify-phases %standard-phases
7948 (add-after 'unpack 'patch-path
7949 (lambda* (#:key inputs #:allow-other-keys)
7950 (let* ((dialog (assoc-ref inputs "dialog")))
7951 ;; Since this library really wants to grovel the search path, we
7952 ;; must hardcode dialog's store path into it.
7953 (substitute* "dialog.py"
7954 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7955 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7957 #:tests? #f)) ; no test suite
7959 `(("dialog" ,dialog)))
7960 (home-page "http://pythondialog.sourceforge.net/")
7961 (synopsis "Python interface to the UNIX dialog utility")
7962 (description "A Python wrapper for the dialog utility. Its purpose is to
7963 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7964 This allows one to make simple text-mode user interfaces on Unix-like systems")
7965 (license license:lgpl2.1)
7966 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7968 (define-public python2-pythondialog
7969 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7972 (version (package-version python-pythondialog))
7975 (uri (pypi-uri "python2-pythondialog" version))
7978 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7980 (define-public python-configobj
7982 (name "python-configobj")
7986 (uri (pypi-uri "configobj" version))
7989 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7990 ;; Patch setup.py so it looks for python-setuptools, which is
7991 ;; required to parse the keyword 'install_requires' in setup.py.
7992 (patches (search-patches "python-configobj-setuptools.patch"))))
7993 (build-system python-build-system)
7995 `(("python-six" ,python-six)))
7996 (synopsis "Config file reading, writing and validation")
7997 (description "ConfigObj is a simple but powerful config file reader and
7998 writer: an ini file round tripper. Its main feature is that it is very easy to
7999 use, with a straightforward programmer’s interface and a simple syntax for
8001 (home-page "https://github.com/DiffSK/configobj")
8002 (license license:bsd-3)))
8004 (define-public python2-configobj
8005 (package-with-python2 python-configobj))
8007 (define-public python-configargparse
8009 (name "python-configargparse")
8013 (uri (pypi-uri "ConfigArgParse" version))
8016 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8017 (build-system python-build-system)
8019 `(("python-pyyaml" ,python-pyyaml)))
8022 (modify-phases %standard-phases
8025 ;; Bypass setuptools-shim because one test relies on "setup.py"
8026 ;; being the first argument passed to the python call.
8028 ;; NOTE: Many tests do not run because they rely on Python's
8029 ;; built-in test.test_argparse, but we remove the unit tests from
8030 ;; our Python installation.
8031 (invoke "python" "setup.py" "test"))))))
8032 (synopsis "Replacement for argparse")
8033 (description "A drop-in replacement for argparse that allows options to also
8034 be set via config files and/or environment variables.")
8035 (home-page "https://github.com/bw2/ConfigArgParse")
8036 (license license:expat)))
8038 (define-public python2-configargparse
8039 (package-with-python2 python-configargparse))
8041 (define-public python-argparse-manpage
8043 (name "python-argparse-manpage")
8048 (uri (pypi-uri "argparse-manpage" version))
8051 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8052 (build-system python-build-system)
8053 (home-page "https://github.com/praiskup/argparse-manpage")
8054 (synopsis "Build manual page from Python's ArgumentParser object")
8056 "This package provides tools to build manual pages from Python's
8057 @code{ArgumentParser} object.")
8058 (license license:asl2.0)))
8060 (define-public python-contextlib2
8062 (name "python-contextlib2")
8067 (uri (pypi-uri "contextlib2" version))
8070 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8071 (build-system python-build-system)
8072 (home-page "http://contextlib2.readthedocs.org/")
8073 (synopsis "Tools for decorators and context managers")
8074 (description "This module is primarily a backport of the Python
8075 3.2 contextlib to earlier Python versions. Like contextlib, it
8076 provides utilities for common tasks involving decorators and context
8077 managers. It also contains additional features that are not part of
8078 the standard library.")
8079 (license license:psfl)))
8081 (define-public python2-contextlib2
8083 (name "python2-contextlib2")
8088 (uri (pypi-uri "contextlib2" version))
8091 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8092 (build-system python-build-system)
8094 `(#:python ,python-2
8096 (modify-phases %standard-phases
8098 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8100 `(("python2-unittest2" ,python2-unittest2)))
8101 (home-page "http://contextlib2.readthedocs.org/")
8102 (synopsis "Tools for decorators and context managers")
8103 (description "This module is primarily a backport of the Python
8104 3.2 contextlib to earlier Python versions. Like contextlib, it
8105 provides utilities for common tasks involving decorators and context
8106 managers. It also contains additional features that are not part of
8107 the standard library.")
8108 (license license:psfl)))
8110 (define-public python-texttable
8112 (name "python-texttable")
8117 (uri (pypi-uri "texttable" version))
8120 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8121 (build-system python-build-system)
8122 (arguments '(#:tests? #f)) ; no tests
8123 (home-page "https://github.com/foutaise/texttable/")
8124 (synopsis "Python module for creating simple ASCII tables")
8125 (description "Texttable is a Python module for creating simple ASCII
8127 (license license:lgpl2.1+)))
8129 (define-public python2-texttable
8130 (package-with-python2 python-texttable))
8132 (define-public python-atomicwrites
8134 (name "python-atomicwrites")
8138 (uri (pypi-uri "atomicwrites" version))
8141 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8142 (build-system python-build-system)
8143 (synopsis "Atomic file writes in Python")
8144 (description "Library for atomic file writes using platform dependent tools
8145 for atomic file system operations.")
8146 (home-page "https://github.com/untitaker/python-atomicwrites")
8147 (license license:expat)))
8149 (define-public python2-atomicwrites
8150 (package-with-python2 python-atomicwrites))
8152 (define-public python-click-threading
8154 (name "python-click-threading")
8158 (uri (pypi-uri "click-threading" version))
8161 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8162 (build-system python-build-system)
8164 `(("python-click" ,python-click)))
8165 (synopsis "Utilities for multithreading in Click")
8166 (description "This package provides utilities for multithreading in Click
8168 (home-page "https://github.com/click-contrib/click-threading")
8169 (license license:expat)))
8171 (define-public python-click-log
8173 (name "python-click-log")
8177 (uri (pypi-uri "click-log" version))
8180 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8181 (build-system python-build-system)
8183 `(("python-click" ,python-click)))
8184 (synopsis "Logging for click applications")
8185 (description "This package provides a Python library for logging Click
8187 (home-page "https://github.com/click-contrib/click-log")
8188 (license license:expat)))
8190 (define-public python-apipkg
8192 (name "python-apipkg")
8196 (uri (pypi-uri "apipkg" version))
8199 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8200 (build-system python-build-system)
8202 `(("python-pytest" ,python-pytest)))
8203 (synopsis "Namespace control and lazy-import mechanism")
8204 (description "With apipkg you can control the exported namespace of a Python
8205 package and greatly reduce the number of imports for your users. It is a small
8206 pure Python module that works on virtually all Python versions.")
8207 (home-page "https://github.com/pytest-dev/apipkg")
8208 (license license:expat)))
8210 (define-public python2-apipkg
8211 (package-with-python2 python-apipkg))
8213 (define-public python-execnet
8215 (name "python-execnet")
8219 (uri (pypi-uri "execnet" version))
8222 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8223 (build-system python-build-system)
8225 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8226 ;; The two test failures are caused by the lack of an `ssh` executable.
8227 ;; The test suite can be run with pytest after the 'install' phase.
8230 `(("python-pytest" ,python-pytest)
8231 ("python-setuptools-scm" ,python-setuptools-scm)))
8233 `(("python-apipkg" ,python-apipkg)))
8234 (synopsis "Rapid multi-Python deployment")
8235 (description "Execnet provides a share-nothing model with
8236 channel-send/receive communication for distributing execution across many
8237 Python interpreters across version, platform and network barriers. It has a
8238 minimal and fast API targeting the following uses:
8240 @item distribute tasks to (many) local or remote CPUs
8241 @item write and deploy hybrid multi-process applications
8242 @item write scripts to administer multiple environments
8244 (home-page "http://codespeak.net/execnet/")
8245 (license license:expat)))
8247 (define-public python2-execnet
8248 (package-with-python2 python-execnet))
8250 (define-public python-icalendar
8252 (name "python-icalendar")
8256 (uri (pypi-uri "icalendar" version))
8259 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8260 (build-system python-build-system)
8262 `(("python-dateutil" ,python-dateutil)
8263 ("python-pytz" ,python-pytz)))
8264 (synopsis "Python library for parsing iCalendar files")
8265 (description "The icalendar package is a parser/generator of iCalendar
8266 files for use with Python.")
8267 (home-page "https://github.com/collective/icalendar")
8268 (license license:bsd-2)))
8270 (define-public python-args
8272 (name "python-args")
8276 (uri (pypi-uri "args" version))
8279 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8280 (build-system python-build-system)
8281 (home-page "https://github.com/kennethreitz/args")
8282 (synopsis "Command-line argument parser")
8284 "This library provides a Python module to parse command-line arguments.")
8285 (license license:bsd-3)))
8287 (define-public python2-args
8288 (package-with-python2 python-args))
8290 (define-public python-clint
8292 (name "python-clint")
8296 (uri (pypi-uri "clint" version))
8299 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8300 (build-system python-build-system)
8303 (modify-phases %standard-phases
8305 (lambda _ (invoke "py.test" "-v"))))))
8307 `(("python-pytest" ,python-pytest)))
8309 `(("python-args" ,python-args)))
8310 (home-page "https://github.com/kennethreitz/clint")
8311 (synopsis "Command-line interface tools")
8313 "Clint is a Python module filled with a set of tools for developing
8314 command-line applications, including tools for colored and indented
8315 output, progress bar display, and pipes.")
8316 (license license:isc)))
8318 (define-public python2-clint
8319 (package-with-python2 python-clint))
8321 (define-public python-rply
8323 (name "python-rply")
8327 (uri (pypi-uri "rply" version))
8330 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8331 (build-system python-build-system)
8333 `(("python-appdirs" ,python-appdirs)))
8334 (home-page "https://github.com/alex/rply")
8335 (synopsis "Parser generator for Python")
8337 "This package provides a pure Python based parser generator, that also
8338 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8339 with a new public API, and RPython support.")
8340 (license license:bsd-3)))
8342 (define-public python2-rply
8343 (package-with-python2 python-rply))
8345 (define-public python-hy
8351 (uri (pypi-uri "hy" version))
8354 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8355 (build-system python-build-system)
8358 (modify-phases %standard-phases
8361 ;; Tests require write access to HOME.
8362 (setenv "HOME" "/tmp")
8363 (invoke "nosetests"))))))
8365 `(("python-coverage" ,python-coverage)
8366 ("python-nose" ,python-nose)))
8368 `(("python-astor" ,python-astor)
8369 ("python-clint" ,python-clint)
8370 ("python-rply" ,python-rply)))
8371 (home-page "http://hylang.org/")
8372 (synopsis "Lisp frontend to Python")
8374 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8375 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8376 Python at your fingertips, in Lisp form.")
8377 (license license:expat)))
8379 (define-public python2-hy
8380 (package-with-python2 python-hy))
8382 (define-public python2-functools32
8384 (name "python2-functools32")
8389 (uri (pypi-uri "functools32" version))
8392 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8393 (build-system python-build-system)
8395 `(#:python ,python-2
8396 #:tests? #f)) ; no test target
8397 (home-page "https://github.com/MiCHiLU/python-functools32")
8399 "Backport of the functools module from Python 3.2.3")
8401 "This package is a backport of the @code{functools} module from Python
8402 3.2.3 for use with older versions of Python and PyPy.")
8403 (license license:expat)))
8405 (define-public python2-subprocess32
8407 (name "python2-subprocess32")
8411 (uri (pypi-uri "subprocess32" version))
8414 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8416 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8417 (build-system python-build-system)
8419 `(#:python ,python-2
8420 ;; The test suite fails with Python > 2.7.13:
8421 ;; import test.support
8422 ;; ImportError: No module named support
8425 (modify-phases %standard-phases
8426 (add-after 'unpack 'patch-/bin/sh
8428 (substitute* '("subprocess32.py"
8429 "test_subprocess32.py")
8430 (("/bin/sh") (which "sh")))
8432 (home-page "https://github.com/google/python-subprocess32")
8433 (synopsis "Backport of the subprocess module from Python 3.2")
8435 "This is a backport of the @code{subprocess} standard library module
8436 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8437 new features. On POSIX systems it is guaranteed to be reliable when used
8438 in threaded applications. It includes timeout support from Python 3.3 but
8439 otherwise matches 3.2’s API.")
8440 (license license:psfl)))
8442 (define-public python2-futures
8444 (name "python2-futures")
8449 (uri (pypi-uri "futures" version))
8452 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8453 (build-system python-build-system)
8455 `(#:python ,python-2
8457 (modify-phases %standard-phases
8460 (invoke "python" "test_futures.py")
8462 (home-page "https://github.com/agronholm/pythonfutures")
8464 "Backport of the concurrent.futures package from Python 3.2")
8466 "The concurrent.futures module provides a high-level interface for
8467 asynchronously executing callables. This package backports the
8468 concurrent.futures package from Python 3.2")
8469 (license license:bsd-3)))
8471 (define-public python-promise
8473 (name "python-promise")
8478 (uri (pypi-uri "promise" version))
8481 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8482 (build-system python-build-system)
8483 ;; Tests wants python-futures, which is a python2 only program, and
8484 ;; can't be found by python-promise at test time.
8485 (arguments `(#:tests? #f))
8486 (home-page "https://github.com/syrusakbary/promise")
8487 (synopsis "Promises/A+ implementation for Python")
8489 "Promises/A+ implementation for Python")
8490 (properties `((python2-variant . ,(delay python2-promise))))
8491 (license license:expat)))
8493 (define-public python2-promise
8494 (let ((promise (package-with-python2
8495 (strip-python2-variant python-promise))))
8496 (package (inherit promise)
8497 (arguments (substitute-keyword-arguments (package-arguments promise)
8500 `(("python2-futures" ,python2-futures)
8501 ("python2-pytest" ,python2-pytest)
8502 ,@(package-native-inputs promise))))))
8504 (define-public python-colorama
8506 (name "python-colorama")
8511 (uri (pypi-uri "colorama" version))
8514 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8515 (build-system python-build-system)
8516 (synopsis "Colored terminal text rendering for Python")
8517 (description "Colorama is a Python library for rendering colored terminal
8519 (home-page "https://pypi.python.org/pypi/colorama")
8520 (license license:bsd-3)))
8522 (define-public python2-colorama
8523 (package-with-python2 python-colorama))
8525 (define-public python-rsa
8532 (uri (pypi-uri "rsa" version))
8535 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8536 (build-system python-build-system)
8538 `(("python-pyasn1" ,python-pyasn1)))
8539 (synopsis "Pure-Python RSA implementation")
8540 (description "Python-RSA is a pure-Python RSA implementation. It supports
8541 encryption and decryption, signing and verifying signatures, and key
8542 generation according to PKCS#1 version 1.5. It can be used as a Python
8543 library as well as on the command line.")
8544 (home-page "https://stuvel.eu/rsa")
8545 (license license:asl2.0)))
8547 (define-public python2-rsa
8548 (package-with-python2 python-rsa))
8550 (define-public python-pluggy
8552 (name "python-pluggy")
8557 (uri (pypi-uri "pluggy" version))
8560 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8561 (build-system python-build-system)
8563 `(("python-setuptools-scm" ,python-setuptools-scm)))
8564 (synopsis "Plugin and hook calling mechanism for Python")
8565 (description "Pluggy is an extraction of the plugin manager as used by
8566 Pytest but stripped of Pytest specific details.")
8567 (home-page "https://pypi.python.org/pypi/pluggy")
8568 (license license:expat)))
8570 (define-public python2-pluggy
8571 (package-with-python2 python-pluggy))
8573 (define-public python-tox
8580 (uri (pypi-uri "tox" version))
8583 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8584 (build-system python-build-system)
8586 ;; FIXME: Tests require pytest-timeout, which itself requires
8587 ;; pytest>=2.8.0 for installation.
8590 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8591 ("python-py" ,python-py)
8592 ("python-virtualenv" ,python-virtualenv)))
8594 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8595 ("python-pytest" ,python-pytest) ; >= 2.3.5
8596 ("python-setuptools-scm" ,python-setuptools-scm)))
8597 (home-page "http://tox.testrun.org/")
8598 (synopsis "Virtualenv-based automation of test activities")
8599 (description "Tox is a generic virtualenv management and test command line
8600 tool. It can be used to check that a package installs correctly with
8601 different Python versions and interpreters, or run tests in each type of
8602 supported environment, or act as a frontend to continuous integration
8604 (license license:expat)))
8606 (define-public python2-tox
8607 (package-with-python2 python-tox))
8609 (define-public python-jmespath
8611 (name "python-jmespath")
8616 (uri (pypi-uri "jmespath" version))
8619 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8620 (build-system python-build-system)
8622 `(("python-nose" ,python-nose)))
8623 (synopsis "JSON Matching Expressions")
8624 (description "JMESPath (pronounced “james path”) is a Python library that
8625 allows one to declaratively specify how to extract elements from a JSON
8627 (home-page "https://github.com/jmespath/jmespath.py")
8628 (license license:expat)))
8630 (define-public python2-jmespath
8631 (package-with-python2 python-jmespath))
8633 (define-public python-botocore
8635 (name "python-botocore")
8636 (version "1.12.149")
8640 (uri (pypi-uri "botocore" version))
8643 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8644 (build-system python-build-system)
8646 ;; FIXME: Many tests are failing.
8649 `(("python-dateutil" ,python-dateutil)
8650 ("python-docutils" ,python-docutils)
8651 ("python-jmespath" ,python-jmespath)))
8653 `(("python-mock" ,python-mock)
8654 ("python-nose" ,python-nose)
8656 ("python-tox" ,python-tox)
8657 ("python-urllib3" ,python-urllib3)
8658 ("python-wheel" ,python-wheel)))
8659 (home-page "https://github.com/boto/botocore")
8660 (synopsis "Low-level interface to AWS")
8661 (description "Botocore is a Python library that provides a low-level
8662 interface to the Amazon Web Services (AWS) API.")
8663 (license license:asl2.0)))
8665 (define-public python2-botocore
8666 (package-with-python2 python-botocore))
8668 (define-public python-xdo
8675 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8676 "python-xdo_" version ".orig.tar.gz"))
8679 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8680 (build-system python-build-system)
8683 (modify-phases %standard-phases
8684 (add-before 'install 'patch-libxdo-path
8685 ;; Hardcode the path of dynamically loaded libxdo library.
8686 (lambda* (#:key inputs #:allow-other-keys)
8687 (let ((libxdo (string-append
8688 (assoc-ref inputs "xdotool")
8690 (substitute* "xdo/_xdo.py"
8691 (("find_library\\(\"xdo\"\\)")
8692 (simple-format #f "\"~a\"" libxdo)))
8694 #:tests? #f)) ; no tests provided
8696 `(("python-six" ,python-six)))
8698 `(("xdotool" ,xdotool)
8699 ("libX11" ,libx11)))
8700 (home-page "https://tracker.debian.org/pkg/python-xdo")
8701 (synopsis "Python library for simulating X11 keyboard/mouse input")
8702 (description "Provides bindings to libxdo for manipulating X11 via simulated
8703 input. (Note that this is mostly a legacy library; you may wish to look at
8704 python-xdo for newer bindings.)")
8705 (license license:bsd-3)))
8707 (define-public python2-xdo
8708 (package-with-python2 python-xdo))
8710 (define-public python-mako
8712 (name "python-mako")
8717 (uri (pypi-uri "Mako" version))
8720 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8721 (build-system python-build-system)
8723 `(("python-markupsafe" ,python-markupsafe)))
8725 `(("python-mock" ,python-mock)
8726 ("python-nose" ,python-nose)
8727 ("python-pytest" ,python-pytest)))
8728 (home-page "https://www.makotemplates.org/")
8729 (synopsis "Templating language for Python")
8730 (description "Mako is a templating language for Python that compiles
8731 templates into Python modules.")
8732 (license license:expat)))
8734 (define-public python2-mako
8735 (package-with-python2 python-mako))
8737 (define-public python-waitress
8739 (name "python-waitress")
8744 (uri (pypi-uri "waitress" version))
8745 (patches (search-patches "python-waitress-fix-tests.patch"))
8748 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8749 (build-system python-build-system)
8750 (home-page "https://github.com/Pylons/waitress")
8751 (synopsis "Waitress WSGI server")
8752 (description "Waitress is meant to be a production-quality pure-Python WSGI
8753 server with very acceptable performance.")
8754 (license license:zpl2.1)))
8756 (define-public python2-waitress
8757 (package-with-python2 python-waitress))
8759 (define-public python-pyquery
8761 (name "python-pyquery")
8766 (uri (pypi-uri "pyquery" version))
8769 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8770 (build-system python-build-system)
8772 `(("python-webob" ,python-webob)
8773 ("python-webtest" ,python-webtest)))
8775 `(("python-lxml" ,python-lxml)
8776 ("python-cssselect" ,python-cssselect)))
8777 (home-page "https://github.com/gawel/pyquery")
8778 (synopsis "Make jQuery-like queries on xml documents")
8779 (description "pyquery allows you to make jQuery queries on xml documents.
8780 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8781 fast xml and html manipulation.")
8782 (license license:bsd-3)))
8784 (define-public python-anyjson
8786 (name "python-anyjson")
8791 (uri (pypi-uri "anyjson" version))
8794 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8795 (build-system python-build-system)
8797 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8798 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8799 ;; whatever) so this transformation needs to be done before the tests
8800 ;; can be run. Maybe we could add a build step to transform beforehand
8801 ;; but it could be annoying/difficult.
8802 ;; We can enable tests for the Python 2 version, though, and do below.
8804 (home-page "https://bitbucket.org/runeh/anyjson/")
8806 "Wraps best available JSON implementation in a common interface")
8808 "Anyjson loads whichever is the fastest JSON module installed
8809 and provides a uniform API regardless of which JSON implementation is used.")
8810 (license license:bsd-3)
8811 (properties `((python2-variant . ,(delay python2-anyjson))))))
8813 (define-public python2-anyjson
8814 (let ((anyjson (package-with-python2
8815 (strip-python2-variant python-anyjson))))
8818 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8820 ,@(package-arguments anyjson)))
8821 (native-inputs `(("python2-nose" ,python2-nose))))))
8823 (define-public python-amqp
8825 (name "python-amqp")
8830 (uri (pypi-uri "amqp" version))
8833 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8834 (build-system python-build-system)
8836 `(("python-case" ,python-case)
8837 ("python-pytest-sugar" ,python-pytest-sugar)
8838 ("python-mock" ,python-mock)))
8840 `(("python-vine" ,python-vine)))
8841 (home-page "https://github.com/celery/py-amqp")
8843 "Low-level AMQP client for Python (fork of amqplib)")
8845 "This is a fork of amqplib which was originally written by Barry Pederson.
8846 It is maintained by the Celery project, and used by kombu as a pure python
8847 alternative when librabbitmq is not available.")
8848 (license license:lgpl2.1+)
8849 (properties `((python2-variant . ,(delay python2-amqp))))))
8851 (define-public python2-amqp
8852 (let ((amqp (package-with-python2
8853 (strip-python2-variant python-amqp))))
8856 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8857 ;; unmaintained. Weirdly, does not do this on the python 3
8860 ,@(package-arguments amqp))))))
8862 (define-public python-txamqp
8864 (name "python-txamqp")
8869 (uri (pypi-uri "txAMQP" version))
8872 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8873 (build-system python-build-system)
8875 `(("python-six" ,python-six)
8876 ("python-twisted" ,python-twisted)))
8877 (home-page "https://github.com/txamqp/txamqp")
8878 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8880 "This package provides a Python library for communicating with AMQP peers
8881 and brokers using the asynchronous networking framework Twisted. It contains
8882 all the necessary code to connect, send and receive messages to/from an
8883 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8884 also includes support for using Thrift RPC over AMQP in Twisted
8886 (license license:asl2.0)))
8888 (define-public python2-txamqp
8889 (package-with-python2 python-txamqp))
8891 (define-public python-kombu
8893 (name "python-kombu")
8898 (uri (pypi-uri "kombu" version))
8901 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8902 (build-system python-build-system)
8904 `(("python-mock" ,python-mock)
8905 ("python-case" ,python-case)
8906 ("python-pyro4" ,python-pyro4)
8907 ("python-pytest-sugar" ,python-pytest-sugar)
8908 ("python-pytz" ,python-pytz)))
8910 `(("python-anyjson" ,python-anyjson)
8911 ("python-amqp" ,python-amqp)
8912 ("python-redis" ,python-redis)))
8913 (home-page "https://kombu.readthedocs.io")
8914 (synopsis "Message passing library for Python")
8915 (description "The aim of Kombu is to make messaging in Python as easy as
8916 possible by providing an idiomatic high-level interface for the AMQ protocol,
8917 and also provide proven and tested solutions to common messaging problems.
8918 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8919 message orientation, queuing, routing, reliability and security, for which the
8920 RabbitMQ messaging server is the most popular implementation.")
8921 (license license:bsd-3)
8922 (properties `((python2-variant . ,(delay python2-kombu))))))
8924 (define-public python2-kombu
8925 (let ((kombu (package-with-python2
8926 (strip-python2-variant python-kombu))))
8929 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8930 ;; It works fine on the python3 variant.
8932 ,@(package-arguments kombu)))
8933 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8934 ,@(package-native-inputs kombu))))))
8936 (define-public python-billiard
8938 (name "python-billiard")
8943 (uri (pypi-uri "billiard" version))
8946 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8947 (build-system python-build-system)
8949 `(("python-case" ,python-case)
8950 ("python-pytest" ,python-pytest)))
8951 (home-page "https://github.com/celery/billiard")
8953 "Python multiprocessing fork with improvements and bugfixes")
8955 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8956 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8957 pyprocessing package. This standalone variant is intended to be compatible with
8958 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8959 (license license:bsd-3)
8960 (properties `((python2-variant . ,(delay python2-billiard))))))
8962 (define-public python2-billiard
8963 (let ((billiard (package-with-python2
8964 (strip-python2-variant python-billiard))))
8967 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8968 ("python2-mock" ,python2-mock)
8969 ,@(package-native-inputs billiard))))))
8971 (define-public python-celery
8973 (name "python-celery")
8978 (uri (pypi-uri "celery" version))
8981 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8982 (build-system python-build-system)
8984 '(;; TODO The tests fail with Python 3.7
8985 ;; https://github.com/celery/celery/issues/4849
8988 (modify-phases %standard-phases
8989 (add-after 'unpack 'patch-requirements
8991 (substitute* "requirements/test.txt"
8992 (("pytest>=3\\.0,<3\\.3")
8996 `(("python-case" ,python-case)
8997 ("python-pytest" ,python-pytest)))
8999 `(("python-pytz" ,python-pytz)
9000 ("python-billiard" ,python-billiard)
9001 ("python-kombu" ,python-kombu)))
9002 (home-page "https://celeryproject.org")
9003 (synopsis "Distributed Task Queue")
9004 (description "Celery is an asynchronous task queue/job queue based on
9005 distributed message passing. It is focused on real-time operation, but
9006 supports scheduling as well. The execution units, called tasks, are executed
9007 concurrently on a single or more worker servers using multiprocessing,
9008 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9009 synchronously (wait until ready).")
9010 (license license:bsd-3)
9011 (properties `((python2-variant . ,(delay python2-celery))))))
9013 (define-public python2-celery
9014 (let ((celery (package-with-python2
9015 (strip-python2-variant python-celery))))
9018 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9019 ("python2-mock" ,python2-mock)
9020 ,@(package-native-inputs celery))))))
9022 (define-public python-translitcodec
9024 (name "python-translitcodec")
9029 (uri (pypi-uri "translitcodec" version))
9032 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9033 (build-system python-build-system)
9035 `(#:tests? #f)) ; no tests provided
9037 "https://github.com/claudep/translitcodec")
9039 "Unicode to 8-bit charset transliteration codec")
9041 "This package contains codecs for transliterating ISO 10646 texts into
9042 best-effort representations using smaller coded character sets (ASCII,
9044 (license license:expat)))
9046 (define-public python2-translitcodec
9047 (package-with-python2 python-translitcodec))
9049 (define-public python-editor
9051 (name "python-editor")
9056 (uri (pypi-uri "python-editor" version))
9059 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9060 (build-system python-build-system)
9062 "https://github.com/fmoo/python-editor")
9064 "Programmatically open an editor, capture the result")
9066 "python-editor is a library that provides the editor module for
9067 programmatically interfacing with your system's $EDITOR.")
9068 (license license:asl2.0)))
9070 (define-public python2-editor
9071 (package-with-python2 python-editor))
9073 (define-public python-vobject
9075 (name "python-vobject")
9079 (uri (pypi-uri "vobject" version))
9082 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9083 (build-system python-build-system)
9085 '(;; The test suite relies on some non-portable Windows interfaces.
9088 `(("python-dateutil" ,python-dateutil)
9089 ("python-pyicu" ,python-pyicu)))
9090 (synopsis "Parse and generate vCard and vCalendar files")
9091 (description "Vobject is intended to be a full featured Python package for
9092 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9093 are supported and well tested. vCard 3.0 files are supported, and all data
9094 should be imported, but only a few components are understood in a sophisticated
9096 (home-page "http://eventable.github.io/vobject/")
9097 (license license:asl2.0)))
9099 (define-public python2-vobject
9100 (package-with-python2 python-vobject))
9102 (define-public python-munkres
9104 (name "python-munkres")
9108 (uri (pypi-uri "munkres" version))
9111 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9112 (build-system python-build-system)
9114 '(#:tests? #f)) ; no test suite
9115 (home-page "http://software.clapper.org/munkres/")
9116 (synopsis "Implementation of the Munkres algorithm")
9117 (description "The Munkres module provides an implementation of the Munkres
9118 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9119 useful for solving the Assignment Problem.")
9120 (license license:bsd-3)))
9122 (define-public python2-munkres
9123 (package-with-python2 python-munkres))
9125 (define-public python-whoosh
9127 (name "python-whoosh")
9132 (uri (pypi-uri "Whoosh" version))
9135 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9136 (build-system python-build-system)
9138 `(("python-pytest" ,python-pytest)))
9139 (home-page "https://bitbucket.org/mchaput/whoosh")
9140 (synopsis "Full text indexing, search, and spell checking library")
9142 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9144 (license license:bsd-2)))
9146 (define-public python2-whoosh
9147 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9148 (package (inherit whoosh)
9150 `(("python2-backport-ssl-match-hostname"
9151 ,python2-backport-ssl-match-hostname)
9152 ,@(package-propagated-inputs whoosh))))))
9154 (define-public python-pathlib
9156 (name "python-pathlib")
9160 (uri (pypi-uri "pathlib" version))
9163 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9164 (build-system python-build-system)
9165 ;; The tests depend on the internal "test" module, which does not provide
9166 ;; a stable interface.
9167 (arguments `(#:tests? #f))
9168 (home-page "https://pathlib.readthedocs.org/")
9169 (synopsis "Object-oriented file system paths")
9170 (description "Pathlib offers a set of classes to handle file system paths.
9171 It offers the following advantages over using string objects:
9174 @item No more cumbersome use of os and os.path functions. Everything can
9175 be done easily through operators, attribute accesses, and method calls.
9176 @item Embodies the semantics of different path types. For example,
9177 comparing Windows paths ignores casing.
9178 @item Well-defined semantics, eliminating any inconsistencies or
9179 ambiguities (forward vs. backward slashes, etc.).
9182 Note: In Python 3.4, pathlib is now part of the standard library. For other
9183 Python versions please consider python-pathlib2 instead, which tracks the
9184 standard library module. This module (python-pathlib) isn't maintained
9186 (license license:expat)))
9188 (define-public python2-pathlib
9189 (package-with-python2 python-pathlib))
9191 (define-public python2-pathlib2
9193 (name "python2-pathlib2")
9197 (uri (pypi-uri "pathlib2" version))
9200 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9201 (build-system python-build-system)
9202 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9203 ;; version is 3.4 which already includes this package as part of the
9204 ;; standard library.
9206 `(#:python ,python-2))
9208 `(("python2-scandir" ,python2-scandir)
9209 ("python2-six" ,python2-six)))
9210 (home-page "https://pypi.python.org/pypi/pathlib2/")
9211 (synopsis "Object-oriented file system paths - backport of standard
9213 (description "The goal of pathlib2 is to provide a backport of standard
9214 pathlib module which tracks the standard library module, so all the newest
9215 features of the standard pathlib can be used also on older Python versions.
9217 Pathlib offers a set of classes to handle file system paths. It offers the
9218 following advantages over using string objects:
9221 @item No more cumbersome use of os and os.path functions. Everything can
9222 be done easily through operators, attribute accesses, and method calls.
9223 @item Embodies the semantics of different path types. For example,
9224 comparing Windows paths ignores casing.
9225 @item Well-defined semantics, eliminating any inconsistencies or
9226 ambiguities (forward vs. backward slashes, etc.).
9228 (license license:expat)))
9230 (define-public python2-pathlib2-bootstrap
9233 (inherit python2-pathlib2)
9234 (name "python2-pathlib2-bootstrap")
9236 `(("python2-scandir" ,python2-scandir)
9237 ("python2-six" ,python2-six-bootstrap))))))
9239 (define-public python-jellyfish
9241 (name "python-jellyfish")
9245 (uri (pypi-uri "jellyfish" version))
9248 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9249 (build-system python-build-system)
9251 `(("python-pytest" ,python-pytest)))
9252 (home-page "https://github.com/jamesturk/jellyfish")
9253 (synopsis "Approximate and phonetic matching of strings")
9254 (description "Jellyfish uses a variety of string comparison and phonetic
9255 encoding algorithms to do fuzzy string matching.")
9256 (license license:bsd-2)
9257 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9259 (define-public python2-jellyfish
9260 (let ((jellyfish (package-with-python2
9261 (strip-python2-variant python-jellyfish))))
9262 (package (inherit jellyfish)
9263 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9264 ,@(package-native-inputs jellyfish))))))
9266 (define-public python2-unicodecsv
9268 (name "python2-unicodecsv")
9272 ;; The test suite is not included in the PyPi release.
9273 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9274 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9275 "archive/" version ".tar.gz"))
9276 (file-name (string-append name "-" version ".tar.gz"))
9279 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9280 (build-system python-build-system)
9282 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9283 #:python ,python-2))
9285 `(("python2-unittest2" ,python2-unittest2)))
9286 (home-page "https://github.com/jdunck/python-unicodecsv")
9287 (synopsis "Unicode CSV module for Python 2")
9288 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9289 module, adding support for Unicode strings.")
9290 (license license:bsd-2)))
9292 (define-public python-rarfile
9294 (name "python-rarfile")
9298 (uri (pypi-uri "rarfile" version))
9301 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9302 (build-system python-build-system)
9305 (modify-phases %standard-phases
9307 ;; Many tests fail, but the installation proceeds.
9308 (lambda _ (invoke "make" "-C" "test" "test"))))))
9310 `(("which" ,which))) ; required for tests
9312 `(("libarchive" ,libarchive)))
9313 (home-page "https://github.com/markokr/rarfile")
9314 (synopsis "RAR archive reader for Python")
9315 (description "This is Python module for RAR archive reading. The interface
9316 is made as zipfile like as possible.")
9317 (license license:isc)))
9319 (define-public python2-rarfile
9320 (package-with-python2 python-rarfile))
9322 (define-public python-magic
9324 (name "python-magic")
9329 (uri (pypi-uri "python-magic" version))
9332 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9333 (file-name (string-append name "-" version "-checkout"))))
9334 (build-system python-build-system)
9336 ;; The tests are unreliable, so don't run them. The tests fail
9337 ;; under Python3 because they were written for Python2 and
9338 ;; contain import statements that do not work in Python3. One of
9339 ;; the tests fails under Python2 because its assertions are
9340 ;; overly stringent; it relies on comparing output strings which
9341 ;; are brittle and can change depending on the version of
9342 ;; libmagic being used and the system on which the test is
9343 ;; running. In my case, under GuixSD 0.10.0, only one test
9344 ;; failed, and it seems to have failed only because the version
9345 ;; of libmagic that is packaged in Guix outputs a slightly
9346 ;; different (but not wrong) string than the one that the test
9349 #:phases (modify-phases %standard-phases
9350 ;; Replace a specific method call with a hard-coded
9351 ;; path to the necessary libmagic.so file in the
9352 ;; store. If we don't do this, then the method call
9353 ;; will fail to find the libmagic.so file, which in
9354 ;; turn will cause any application using
9355 ;; python-magic to fail.
9356 (add-before 'build 'hard-code-path-to-libmagic
9357 (lambda* (#:key inputs #:allow-other-keys)
9358 (let ((file (assoc-ref inputs "file")))
9359 (substitute* "magic.py"
9360 (("ctypes.util.find_library\\('magic'\\)")
9361 (string-append "'" file "/lib/libmagic.so'")))
9363 (add-before 'install 'disable-egg-compression
9365 (let ((port (open-file "setup.cfg" "a")))
9366 (display "\n[easy_install]\nzip_ok = 0\n"
9371 ;; python-magic needs to be able to find libmagic.so.
9374 "https://github.com/ahupp/python-magic")
9376 "File type identification using libmagic")
9378 "This module uses ctypes to access the libmagic file type
9379 identification library. It makes use of the local magic database and
9380 supports both textual and MIME-type output. Note that this module and
9381 the python-file module both provide a \"magic.py\" file; these two
9382 modules, which are different and were developed separately, both serve
9383 the same purpose: to provide Python bindings for libmagic.")
9384 (license license:expat)))
9386 (define-public python2-magic
9387 (package-with-python2 python-magic))
9389 (define-public python2-s3cmd
9391 (name "python2-s3cmd")
9396 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9397 "s3cmd-" version ".tar.gz"))
9400 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9401 (build-system python-build-system)
9403 ;; s3cmd is written for python2 only and contains no tests.
9404 `(#:python ,python-2
9407 `(("python2-dateutil" ,python2-dateutil)
9408 ;; The python-file package also provides a magic.py module.
9409 ;; This is an unfortunate state of affairs; however, s3cmd
9410 ;; fails to install if it cannot find specifically the
9411 ;; python-magic package. Thus we include it, instead of using
9412 ;; python-file. Ironically, s3cmd sometimes works better
9413 ;; without libmagic bindings at all:
9414 ;; https://github.com/s3tools/s3cmd/issues/198
9415 ("python2-magic" ,python2-magic)))
9416 (home-page "http://s3tools.org/s3cmd")
9417 (synopsis "Command line tool for S3-compatible storage services")
9419 "S3cmd is a command line tool for uploading, retrieving and managing data
9420 in storage services that are compatible with the Amazon Simple Storage
9421 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9422 GnuPG encryption, and more. It also supports management of Amazon's
9423 CloudFront content delivery network.")
9424 (license license:gpl2+)))
9426 (define-public python-pkgconfig
9428 (name "python-pkgconfig")
9433 (uri (pypi-uri "pkgconfig" version))
9436 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9437 (build-system python-build-system)
9439 `(("python-nose" ,python-nose)))
9441 `(("pkg-config" ,pkg-config)))
9444 (modify-phases %standard-phases
9445 (add-before 'build 'patch
9446 ;; Hard-code the path to pkg-config.
9448 (substitute* "pkgconfig/pkgconfig.py"
9449 (("cmd = 'pkg-config")
9450 (string-append "cmd = '" (which "pkg-config"))))
9454 (invoke "nosetests" "test.py"))))))
9455 (home-page "https://github.com/matze/pkgconfig")
9456 (synopsis "Python interface for pkg-config")
9457 (description "This module provides a Python interface to pkg-config. It
9458 can be used to find all pkg-config packages, check if a package exists,
9459 check if a package meets certain version requirements, query CFLAGS and
9460 LDFLAGS and parse the output to build extensions with setup.py.")
9461 (license license:expat)))
9463 (define-public python2-pkgconfig
9464 (package-with-python2 python-pkgconfig))
9466 (define-public python-bz2file
9468 (name "python-bz2file")
9473 (uri (pypi-uri "bz2file" version))
9476 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9477 (build-system python-build-system)
9479 `(#:tests? #f)) ; Tests use deprecated python modules.
9480 (home-page "https://github.com/nvawda/bz2file")
9481 (synopsis "Read and write bzip2-compressed files")
9483 "Bz2file is a Python library for reading and writing bzip2-compressed
9484 files. It contains a drop-in replacement for the I/O interface in the
9485 standard library's @code{bz2} module, including features from the latest
9486 development version of CPython that are not available in older releases.")
9487 (license license:asl2.0)))
9489 (define-public python2-bz2file
9490 (package-with-python2 python-bz2file))
9492 (define-public python-future
9494 (name "python-future")
9499 (uri (pypi-uri "future" version))
9502 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9503 (build-system python-build-system)
9504 ;; Many tests connect to the network or are otherwise flawed.
9505 ;; https://github.com/PythonCharmers/python-future/issues/210
9508 (home-page "http://python-future.org")
9509 (synopsis "Single-source support for Python 3 and 2")
9511 "@code{python-future} is the missing compatibility layer between Python 2 and
9512 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9513 to support both Python 2 and Python 3 with minimal overhead.")
9514 (license license:expat)))
9516 (define-public python2-future
9517 (package-with-python2 python-future))
9519 (define-public python-cysignals
9521 (name "python-cysignals")
9526 (uri (pypi-uri "cysignals" version))
9529 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9530 (build-system python-build-system)
9532 `(("python-cython" ,python-cython)
9533 ("python-sphinx" ,python-sphinx)))
9535 `(("pari-gp" ,pari-gp)))
9537 `(#:modules ((guix build python-build-system)
9538 ((guix build gnu-build-system) #:prefix gnu:)
9540 ;; FIXME: Tests are executed after installation and currently fail
9541 ;; when not installing into standard locations; the author is working
9545 (modify-phases %standard-phases
9548 (assoc-ref gnu:%standard-phases 'configure)))))
9550 "https://github.com/sagemath/cysignals")
9552 "Handling of interrupts and signals for Cython")
9554 "The cysignals package provides mechanisms to handle interrupts (and
9555 other signals and errors) in Cython code, using two related approaches,
9556 for mixed Cython/Python code or external C libraries and pure Cython code,
9558 (license license:lgpl3+)))
9560 (define-public python2-cysignals
9561 (package-with-python2 python-cysignals))
9563 (define-public python2-shedskin
9565 (name "python2-shedskin")
9570 (uri (string-append "https://github.com/shedskin/shedskin/"
9571 "releases/download/v" version
9572 "/shedskin-" version ".tgz"))
9575 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9576 (build-system python-build-system)
9578 `(#:python ,python-2
9579 #:phases (modify-phases %standard-phases
9580 (add-after 'unpack 'fix-resulting-include-libs
9581 (lambda* (#:key inputs #:allow-other-keys)
9582 (let ((libgc (assoc-ref inputs "libgc"))
9583 (pcre (assoc-ref inputs "pcre")))
9584 (substitute* "shedskin/makefile.py"
9585 (("variable == 'CCFLAGS':[ ]*")
9586 (string-append "variable == 'CCFLAGS':\n"
9587 " line += ' -I " pcre "/include"
9588 " -I " libgc "/include'"))
9589 (("variable == 'LFLAGS':[ ]*")
9590 (string-append "variable == 'LFLAGS':\n"
9591 " line += ' -L" pcre "/lib"
9592 " -L " libgc "/lib'")))
9594 (inputs `(("pcre" ,pcre)
9596 (home-page "https://shedskin.github.io/")
9597 (synopsis "Experimental Python-2 to C++ Compiler")
9598 (description (string-append "This is an experimental compiler for a subset of
9599 Python. It generates C++ code and a Makefile."))
9600 (license (list license:gpl3 license:bsd-3 license:expat))))
9602 (define-public python2-rope
9604 (name "python2-rope")
9609 (uri (pypi-uri "rope" version))
9612 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9614 ;; Rope has only partial python3 support, see `python-rope'
9615 `(#:python ,python-2))
9616 (build-system python-build-system)
9618 `(("python2-unittest2" ,python2-unittest2)))
9619 (home-page "https://github.com/python-rope/rope")
9620 (synopsis "Refactoring library for Python")
9621 (description "Rope is a refactoring library for Python. It facilitates
9622 the renaming, moving and extracting of attributes, functions, modules, fields
9623 and parameters in Python 2 source code. These refactorings can also be applied
9624 to occurrences in strings and comments.")
9625 (license license:gpl2)))
9627 (define-public python-rope
9629 (inherit python2-rope)
9630 (name "python-rope")
9631 (arguments `(#:python ,python-wrapper
9632 ;; XXX: Only partial python3 support, results in some failing
9633 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9635 (properties `((python2-variant . ,(delay python2-rope))))))
9637 (define-public python-py3status
9639 (name "python-py3status")
9644 (uri (pypi-uri "py3status" version))
9647 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9648 (build-system python-build-system)
9653 (modify-phases %standard-phases
9654 ;; 'file' is used for detection of configuration file encoding
9655 ;; let's make link the dependency to particular input
9656 (add-before 'build 'patch-file-path
9657 (lambda* (#:key inputs #:allow-other-keys)
9658 (let ((file-path (assoc-ref inputs "file")))
9659 (substitute* "py3status/parse_config.py"
9660 (("\\['file', '-b'")
9661 (string-append "['" file-path "/bin/file', '-b'")))
9663 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9664 (home-page "https://github.com/ultrabug/py3status")
9665 (synopsis "Extensible i3status wrapper written in Python")
9666 (description "py3status is an i3status wrapper which extends i3status
9667 functionality in a modular way, allowing you to extend your panel with your
9668 own code, responding to click events and updating clock every second.")
9669 (license license:bsd-3)))
9671 (define-public python-tblib
9673 (name "python-tblib")
9677 (uri (pypi-uri "tblib" version))
9679 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9680 (build-system python-build-system)
9683 (modify-phases %standard-phases
9684 (add-before 'check 'adjust-tests
9686 (when (which "python3")
9687 ;; Adjust the example output to match that of Python 3.7:
9688 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9689 (substitute* "README.rst"
9690 (("Exception\\('fail',") "Exception('fail'"))
9694 ;; Upstream runs tests after installation and the package itself
9695 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9697 (setenv "PYTHONPATH"
9698 (string-append (getcwd) "/build/lib:"
9699 (getenv "PYTHONPATH")))
9700 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9702 `(("python-pytest" ,python-pytest)
9703 ("python-six" ,python-six)))
9704 (home-page "https://github.com/ionelmc/python-tblib")
9705 (synopsis "Traceback serialization library")
9707 "Traceback serialization allows you to:
9710 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9711 different processes. This allows better error handling when running code over
9712 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9714 @item Parse traceback strings and raise with the parsed tracebacks.
9716 (license license:bsd-3)))
9718 (define-public python2-tblib
9719 (package-with-python2 python-tblib))
9721 (define-public python-greenlet
9723 (name "python-greenlet")
9727 (uri (pypi-uri "greenlet" version))
9730 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9731 (build-system python-build-system)
9732 (home-page "https://greenlet.readthedocs.io/")
9733 (synopsis "Lightweight in-process concurrent programming")
9735 "Greenlet package is a spin-off of Stackless, a version of CPython
9736 that supports micro-threads called \"tasklets\". Tasklets run
9737 pseudo-concurrently (typically in a single or a few OS-level threads) and
9738 are synchronized with data exchanges on \"channels\".")
9739 (license (list license:psfl license:expat))))
9741 (define-public python2-greenlet
9742 (package-with-python2 python-greenlet))
9744 (define-public python-objgraph
9746 (name "python-objgraph")
9751 (uri (pypi-uri "objgraph" version))
9754 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9755 (build-system python-build-system)
9757 `(("python-graphviz" ,python-graphviz)))
9759 `(("python-mock" ,python-mock)
9760 ("graphviz" ,graphviz)))
9761 (home-page "https://mg.pov.lt/objgraph/")
9762 (synopsis "Draw Python object reference graphs with graphviz")
9764 "This package provides tools to draw Python object reference graphs with
9766 (license license:expat)))
9768 (define-public python-gevent
9770 (name "python-gevent")
9774 (uri (pypi-uri "gevent" version))
9777 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9778 (modules '((guix build utils)))
9781 ;; unbunding libev and c-ares
9782 (delete-file-recursively "deps")
9784 (build-system python-build-system)
9786 `(#:modules ((ice-9 ftw)
9790 (guix build python-build-system))
9791 #:phases (modify-phases %standard-phases
9792 (add-after 'unpack 'unpack-libev
9793 (lambda* (#:key inputs #:allow-other-keys)
9794 (mkdir-p "deps/libev")
9795 ;; FIXME: gevent requires building libev, even though
9796 ;; it only links against the proper one.
9797 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9798 "--strip-components=1" "-C" "deps/libev")))
9799 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9801 (substitute* "src/gevent/subprocess.py"
9802 (("/bin/sh") (which "sh")))
9803 (for-each (lambda (file)
9805 (("/bin/sh") (which "sh"))
9806 (("/bin/true") (which "true"))))
9807 (find-files "src/greentest" "\\.py$"))
9809 (add-before 'build 'do-not-use-bundled-sources
9810 (lambda* (#:key inputs #:allow-other-keys)
9811 (setenv "CONFIG_SHELL" (which "bash"))
9812 (setenv "LIBEV_EMBED" "false")
9813 (setenv "CARES_EMBED" "false")
9814 (setenv "EMBED" "false")
9816 (let ((greenlet (string-append
9817 (assoc-ref inputs "python-greenlet")
9819 (match (scandir greenlet
9821 (string-prefix? "python" item)))
9824 (string-append greenlet "/" python)))))
9826 (add-before 'check 'skip-timer-test
9828 ;; XXX: Skip 'TestTimerResolution', which appears to be
9830 (substitute* "src/greentest/test__core_timer.py"
9831 (("not greentest.RUNNING_ON_CI") "False"))
9835 ;; Make sure the build directory is on PYTHONPATH.
9836 (setenv "PYTHONPATH"
9838 (getenv "PYTHONPATH") ":"
9840 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9841 (with-directory-excursion "src/greentest"
9842 ;; XXX: Many tests require network access. Instead we only
9843 ;; run known-good tests. Unfortunately we cannot use
9844 ;; recursion here since this directory also contains
9845 ;; Python-version-specific subfolders.
9846 (apply invoke "python" "testrunner.py" "--config"
9848 (scandir "." (cut regexp-exec
9849 (make-regexp "test_+(subprocess|core)")
9852 `(("python-greenlet" ,python-greenlet)
9853 ("python-objgraph" ,python-objgraph)))
9855 `(("libev-source" ,(package-source libev))
9856 ("python-six" ,python-six)))
9858 `(("c-ares" ,c-ares)
9860 (home-page "http://www.gevent.org/")
9861 (synopsis "Coroutine-based network library")
9863 "gevent is a coroutine-based Python networking library that uses greenlet
9864 to provide a high-level synchronous API on top of the libev event loop.")
9865 (license license:expat)
9866 (properties `((python2-variant . ,(delay python2-gevent))))))
9868 (define-public python2-gevent
9869 (let ((base (package-with-python2
9870 (strip-python2-variant python-gevent))))
9873 (native-inputs `(,@(package-native-inputs python-gevent)
9874 ("python-mock" ,python2-mock))))))
9876 (define-public python-fastimport
9878 (name "python-fastimport")
9883 (uri (pypi-uri "fastimport" version))
9885 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9886 (build-system python-build-system)
9887 (home-page "https://github.com/jelmer/python-fastimport")
9888 (synopsis "VCS fastimport parser and generator in Python")
9889 (description "This package provides a parser for and generator of the Git
9890 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9892 (license license:gpl2+)))
9894 (define-public python2-fastimport
9895 (package-with-python2 python-fastimport))
9897 (define-public python-twisted
9899 (name "python-twisted")
9903 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9906 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9907 (build-system python-build-system)
9909 '(#:tests? #f)) ; FIXME: some tests fail
9911 `(("python-zope-interface" ,python-zope-interface)
9912 ("python-pyhamcrest" ,python-pyhamcrest)
9913 ("python-incremental" ,python-incremental)
9914 ("python-hyperlink" ,python-hyperlink)
9915 ("python-constantly" ,python-constantly)
9916 ("python-automat" ,python-automat)))
9917 (home-page "https://twistedmatrix.com/")
9918 (synopsis "Asynchronous networking framework written in Python")
9920 "Twisted is an extensible framework for Python programming, with special
9921 focus on event-based network programming and multiprotocol integration.")
9922 (license license:expat)))
9924 (define-public python2-twisted
9925 (package-with-python2 python-twisted))
9927 (define-public python-pika
9929 (name "python-pika")
9934 (uri (pypi-uri "pika" version))
9937 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9938 (build-system python-build-system)
9940 `(("python-pyev" ,python-pyev)
9941 ("python-tornado" ,python-tornado)
9942 ("python-twisted" ,python-twisted)))
9943 (home-page "https://pika.readthedocs.org")
9944 (synopsis "Pure Python AMQP Client Library")
9946 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9947 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9948 network support library.")
9949 (license license:bsd-3)))
9951 (define-public python2-pika
9952 (package-with-python2 python-pika))
9954 (define-public python-ply
9961 (uri (pypi-uri "ply" version))
9964 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9965 (build-system python-build-system)
9966 (home-page "http://www.dabeaz.com/ply/")
9967 (synopsis "Python Lex & Yacc")
9968 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9969 It uses LR parsing and does extensive error checking.")
9970 (license license:bsd-3)))
9972 (define-public python2-ply
9973 (package-with-python2 python-ply))
9975 (define-public python-tabulate
9977 (name "python-tabulate")
9981 (uri (pypi-uri "tabulate" version))
9984 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9985 (build-system python-build-system)
9987 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9988 ;; and the latest release is not tagged in the upstream repository.
9990 (home-page "https://bitbucket.org/astanin/python-tabulate")
9991 (synopsis "Pretty-print tabular data")
9993 "Tabulate is a library and command-line utility to pretty-print tabular
9995 (license license:expat)))
9997 (define-public python2-tabulate
9998 (package-with-python2 python-tabulate))
10000 (define-public python-kazoo
10002 (name "python-kazoo")
10007 (uri (pypi-uri "kazoo" version))
10010 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10011 (build-system python-build-system)
10012 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10014 `(("python-six" ,python-six)))
10015 (home-page "https://kazoo.readthedocs.org")
10016 (synopsis "High-level Zookeeper client library")
10018 "Kazoo is a Python client library for the Apache Zookeeper distributed
10019 application service. It is designed to be easy to use and to avoid common
10020 programming errors.")
10021 (license license:asl2.0)))
10023 (define-public python2-kazoo
10024 (package-with-python2 python-kazoo))
10026 (define-public python-pykafka
10028 (name "python-pykafka")
10032 (uri (pypi-uri "pykafka" version))
10035 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10036 (build-system python-build-system)
10037 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10039 `(("python-gevent" ,python-gevent)
10040 ("python-kazoo" ,python-kazoo)
10041 ("python-tabulate" ,python-tabulate)))
10043 `(("librdkafka" ,librdkafka)))
10044 (home-page "https://pykafka.readthedocs.io/")
10045 (synopsis "Apache Kafka client for Python")
10047 "PyKafka is a client for the Apache Kafka distributed messaging system.
10048 It includes Python implementations of Kafka producers and consumers, which
10049 are optionally backed by a C extension built on librdkafka.")
10050 (license license:asl2.0)))
10052 (define-public python2-pykafka
10053 (package-with-python2 python-pykafka))
10055 (define-public python-wcwidth
10057 (name "python-wcwidth")
10062 (uri (pypi-uri "wcwidth" version))
10065 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10066 (build-system python-build-system)
10067 (home-page "https://github.com/jquast/wcwidth")
10068 (synopsis "Measure number of terminal column cells of wide-character codes")
10069 (description "Wcwidth measures the number of terminal column cells of
10070 wide-character codes. It is useful for those implementing a terminal emulator,
10071 or programs that carefully produce output to be interpreted by one. It is a
10072 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10073 specified in POSIX.1-2001 and POSIX.1-2008.")
10074 (license license:expat)))
10076 (define-public python2-wcwidth
10077 (package-with-python2 python-wcwidth))
10079 (define-public python2-jsonrpclib
10081 (name "python2-jsonrpclib")
10085 (uri (pypi-uri "jsonrpclib" version))
10088 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10089 (build-system python-build-system)
10092 #:python ,python-2))
10093 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10094 (synopsis "Implementation of JSON-RPC specification for Python")
10096 "This library is an implementation of the JSON-RPC specification.
10097 It supports both the original 1.0 specification, as well as the
10098 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10100 (license license:asl2.0)))
10102 (define-public python-chai
10104 (name "python-chai")
10108 (uri (pypi-uri "chai" version))
10111 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10112 (build-system python-build-system)
10113 (home-page "https://github.com/agoragames/chai")
10114 (synopsis "Mocking framework for Python")
10116 "Chai provides an api for mocking, stubbing and spying your python
10117 objects, patterned after the Mocha library for Ruby.")
10118 (license license:bsd-3)))
10120 (define-public python2-chai
10121 (package-with-python2 python-chai))
10123 (define-public python-inflection
10125 (name "python-inflection")
10128 (origin (method url-fetch)
10129 (uri (pypi-uri "inflection" version))
10132 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10133 (build-system python-build-system)
10135 `(("python-pytest" ,python-pytest)))
10136 (home-page "https://github.com/jpvanhal/inflection")
10137 (synopsis "Python string transformation library")
10139 "Inflection is a string transformation library. It singularizes
10140 and pluralizes English words, and transforms strings from CamelCase to
10141 underscored string.")
10142 (license license:expat)))
10144 (define-public python2-inflection
10145 (package-with-python2 python-inflection))
10147 (define-public python-pylev
10149 (name "python-pylev")
10153 (uri (pypi-uri "pylev" version))
10156 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10157 (build-system python-build-system)
10158 (home-page "https://github.com/toastdriven/pylev")
10159 (synopsis "Levenshtein distance implementation in Python")
10160 (description "Pure Python Levenshtein implementation, based off the
10161 Wikipedia code samples at
10162 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10163 (license license:bsd-3)))
10165 (define-public python2-pylev
10166 (package-with-python2 python-pylev))
10168 (define-public python-cleo
10170 (name "python-cleo")
10174 (uri (pypi-uri "cleo" version))
10177 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10178 (build-system python-build-system)
10181 ("python-mock" ,python-mock)
10182 ("python-pytest-mock" ,python-pytest-mock)
10183 ("python-pytest" ,python-pytest)))
10185 `(("python-backpack" ,python-backpack)
10186 ("python-pastel" ,python-pastel)
10187 ("python-pylev" ,python-pylev)))
10188 (home-page "https://github.com/sdispater/cleo")
10189 (synopsis "Command-line arguments library for Python")
10191 "Cleo allows you to create command-line commands with signature in
10192 docstring and colored output.")
10193 (license license:expat)))
10195 (define-public python2-cleo
10196 (package-with-python2 python-cleo))
10198 (define-public python-lazy-object-proxy
10200 (name "python-lazy-object-proxy")
10204 (uri (pypi-uri "lazy-object-proxy" version))
10207 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10208 (build-system python-build-system)
10209 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10210 (synopsis "Lazy object proxy for python")
10212 "Lazy object proxy is an object that wraps a callable but defers the call
10213 until the object is actually required, and caches the result of said call.")
10214 (license license:bsd-2)))
10216 (define-public python2-lazy-object-proxy
10217 (package-with-python2 python-lazy-object-proxy))
10219 (define-public python-dnspython
10221 (name "python-dnspython")
10225 (uri (string-append "http://www.dnspython.org/kits/"
10226 version "/dnspython-" version ".tar.gz"))
10229 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10230 (build-system python-build-system)
10231 (arguments '(#:tests? #f)) ; XXX: requires internet access
10232 (home-page "http://www.dnspython.org")
10233 (synopsis "DNS toolkit for Python")
10235 "dnspython is a DNS toolkit for Python. It supports almost all record
10236 types. It can be used for queries, zone transfers, and dynamic updates.
10237 It supports TSIG authenticated messages and EDNS0.")
10238 (license license:expat)))
10240 (define-public python2-dnspython
10241 (package-with-python2 python-dnspython))
10243 (define-public python-email-validator
10245 (name "python-email-validator")
10248 (origin (method url-fetch)
10249 (uri (pypi-uri "email_validator" version))
10252 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10253 (build-system python-build-system)
10256 (modify-phases %standard-phases
10257 (add-before 'build 'use-dnspython
10259 (substitute* "setup.py"
10260 (("dnspython3") "dnspython"))
10263 `(("python-dnspython" ,python-dnspython)
10264 ("python-idna" ,python-idna)))
10265 (home-page "https://github.com/JoshData/python-email-validator")
10266 (synopsis "Email address validation library for Python")
10268 "This library validates email address syntax and deliverability.")
10269 (license license:cc0)))
10271 (define-public python2-email-validator
10272 (package-with-python2 python-email-validator))
10274 (define-public python-ukpostcodeparser
10276 (name "python-ukpostcodeparser")
10280 (uri (pypi-uri "UkPostcodeParser" version))
10283 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10284 (build-system python-build-system)
10285 (home-page "https://github.com/hamstah/ukpostcodeparser")
10286 (synopsis "UK Postcode parser for Python")
10288 "This library provides the @code{parse_uk_postcode} function for
10289 parsing UK postcodes.")
10290 (license license:expat)))
10292 (define-public python2-ukpostcodeparser
10293 (package-with-python2 python-ukpostcodeparser))
10295 (define-public python-faker
10297 (name "python-faker")
10301 (uri (pypi-uri "Faker" version))
10304 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10306 (search-patches "python-faker-fix-build-32bit.patch"))
10307 (modules '((guix build utils)))
10310 (for-each delete-file (find-files "." "\\.pyc$"))
10312 (build-system python-build-system)
10315 (modify-phases %standard-phases
10317 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10320 ("python-email-validator" ,python-email-validator)
10321 ("python-mock" ,python-mock)
10322 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10324 `(("python-dateutil" ,python-dateutil)
10325 ("python-six" ,python-six)))
10326 (home-page "https://github.com/joke2k/faker")
10327 (synopsis "Python package that generates fake data")
10329 "Faker is a Python package that generates fake data such as names,
10330 addresses, and phone numbers.")
10331 (license license:expat)
10332 (properties `((python2-variant . ,(delay python2-faker))))))
10334 (define-public python2-faker
10335 (let ((base (package-with-python2 (strip-python2-variant
10340 `(("python2-ipaddress" ,python2-ipaddress)
10341 ,@(package-propagated-inputs base))))))
10343 (define-public python-pyaml
10345 (name "python-pyaml")
10346 (version "18.11.0")
10349 (uri (pypi-uri "pyaml" version))
10352 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10353 (build-system python-build-system)
10355 `(("python-unidecode" ,python-unidecode)))
10357 `(("python-pyyaml" ,python-pyyaml)))
10358 (home-page "https://github.com/mk-fg/pretty-yaml")
10359 (synopsis "YAML pretty-print library for Python")
10361 "pyaml is a PyYAML based python module to produce pretty and readable
10362 YAML-serialized data.")
10363 (license license:wtfpl2)))
10365 (define-public python2-pyaml
10366 (package-with-python2 python-pyaml))
10368 (define-public python-backpack
10370 (name "python-backpack")
10375 (uri (pypi-uri "backpack" version))
10378 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10379 (build-system python-build-system)
10381 `(("python-pytest" ,python-pytest)
10382 ("python-nose" ,python-nose)))
10384 `(("python-simplejson" ,python-simplejson)))
10385 (home-page "https://github.com/sdispater/backpack")
10386 (synopsis "Utilities for working with Python collections")
10387 (description "Backpack provides some useful utilities for working with
10388 collections of data.")
10389 (license license:expat)))
10391 (define-public python2-backpack
10392 (package-with-python2 python-backpack))
10394 (define-public python-prompt-toolkit
10396 (name "python-prompt-toolkit")
10401 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10404 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10405 (build-system python-build-system)
10408 (modify-phases %standard-phases
10410 (add-after 'install 'post-install-check
10411 (lambda* (#:key inputs outputs #:allow-other-keys)
10412 ;; HOME is needed for the test
10413 ;; "test_pathcompleter_can_expanduser".
10414 (setenv "HOME" "/tmp")
10415 (add-installed-pythonpath inputs outputs)
10416 (invoke "py.test"))))))
10418 `(("python-wcwidth" ,python-wcwidth)
10419 ("python-six" ,python-six)
10420 ("python-pygments" ,python-pygments)))
10422 `(("python-pytest" ,python-pytest)))
10423 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10424 (synopsis "Library for building command line interfaces in Python")
10426 "Prompt-Toolkit is a library for building interactive command line
10427 interfaces in Python. It's like GNU Readline but it also features syntax
10428 highlighting while typing, out-of-the-box multi-line input editing, advanced
10429 code completion, incremental search, support for Chinese double-width
10430 characters, mouse support, and auto suggestions.")
10431 (license license:bsd-3)))
10433 (define-public python2-prompt-toolkit
10434 (package-with-python2 python-prompt-toolkit))
10436 (define-public python-prompt-toolkit-1
10437 (package (inherit python-prompt-toolkit)
10442 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10445 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10447 (define-public python2-prompt-toolkit-1
10448 (package-with-python2 python-prompt-toolkit-1))
10450 (define-public python-jedi
10452 (name "python-jedi")
10457 (uri (pypi-uri "jedi" version))
10460 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10461 (build-system python-build-system)
10463 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10464 ;; https://github.com/davidhalter/jedi/issues/1263)
10467 (modify-phases %standard-phases
10469 (lambda* (#:key tests? #:allow-other-keys)
10471 (invoke "py.test" "-vv")))))))
10473 `(("python-pytest" ,python-pytest)
10474 ("python-docopt" ,python-docopt)))
10476 `(("python-parso" ,python-parso)))
10477 (home-page "https://github.com/davidhalter/jedi")
10478 (synopsis "Autocompletion and static analysis library for Python")
10480 "Jedi is a static analysis tool for Python that can be used in Integrated
10481 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10482 on a deeper level than many other static analysis frameworks for Python.
10484 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10486 (license license:expat)))
10488 (define-public python2-jedi
10489 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10492 (arguments (substitute-keyword-arguments (package-arguments base)
10493 ((#:tests? _) #t))))))
10495 (define-public ptpython
10501 (uri (pypi-uri "ptpython" version))
10504 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10505 (build-system python-build-system)
10507 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10509 `(("python-docopt" ,python-docopt)
10510 ("python-jedi" ,python-jedi)
10511 ("python-prompt-toolkit" ,python-prompt-toolkit)
10512 ("python-pygments" ,python-pygments)))
10513 (home-page "https://github.com/jonathanslenders/ptpython")
10514 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10516 "ptpython is a Python read-eval-print loop with IDE-like features.
10517 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10518 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10520 (license license:bsd-3)
10521 (properties `((python2-variant . ,(delay ptpython-2))))))
10523 (define-public ptpython-2
10524 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10527 (name "ptpython2"))))
10529 (define-public python-stem
10531 (name "python-stem")
10536 (uri (pypi-uri "stem" version))
10539 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10540 (build-system python-build-system)
10543 (modify-phases %standard-phases
10546 (invoke "./run_tests.py" "--unit")
10549 `(("python-mock" ,python-mock)
10550 ("python-pycodestyle" ,python-pycodestyle)
10551 ("python-pyflakes" ,python-pyflakes)))
10552 (home-page "https://stem.torproject.org/")
10554 "Python controller library that allows applications to interact with Tor")
10556 "Stem is a Python controller library for Tor. With it you can use Tor's
10557 control protocol to script against the Tor process and read descriptor data
10558 relays publish about themselves.")
10559 (license license:lgpl3)))
10561 (define-public python2-stem
10562 (package-with-python2 python-stem))
10564 (define-public python-pyserial
10566 (name "python-pyserial")
10571 (uri (pypi-uri "pyserial" version))
10574 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10575 (build-system python-build-system)
10577 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10579 ;; (modify-phases %standard-phases
10582 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10584 "https://github.com/pyserial/pyserial")
10585 (synopsis "Python Serial Port Bindings")
10586 (description "@code{pyserial} provide serial port bindings for Python. It
10587 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10588 and/or Xon/Xoff. The port is accessed in RAW mode.")
10589 (license license:bsd-3)))
10591 (define-public python2-pyserial
10592 (package-with-python2 python-pyserial))
10594 (define-public python-kivy
10596 (name "python-kivy")
10601 (uri (pypi-uri "Kivy" version))
10602 (file-name (string-append name "-" version ".tar.gz"))
10605 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10606 (build-system python-build-system)
10608 `(#:tests? #f ; Tests require many optional packages
10610 (modify-phases %standard-phases
10611 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10612 (lambda* (#:key inputs #:allow-other-keys)
10613 (setenv "KIVY_SDL2_PATH"
10614 (string-append (assoc-ref inputs "sdl-union")
10619 ("pkg-config" ,pkg-config)
10620 ("python-cython" ,python-cython)))
10622 `(("gstreamer" ,gstreamer)
10625 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10626 (home-page "http://kivy.org")
10628 "Multitouch application framework")
10630 "A software library for rapid development of
10631 hardware-accelerated multitouch applications.")
10632 (license license:expat)))
10634 (define-public python2-kivy
10635 (package-with-python2 python-kivy))
10637 (define-public python-kivy-next
10638 (deprecated-package "python-kivy-next" python-kivy))
10640 (define-public python2-kivy-next
10641 (deprecated-package "python2-kivy-next" python2-kivy))
10643 (define-public python-binaryornot
10645 (name "python-binaryornot")
10649 (uri (pypi-uri "binaryornot" version))
10652 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10653 (build-system python-build-system)
10655 `(("python-chardet" ,python-chardet)
10656 ("python-hypothesis" ,python-hypothesis)))
10657 (home-page "https://github.com/audreyr/binaryornot")
10658 (synopsis "Package to check if a file is binary or text")
10659 (description "Ultra-lightweight pure Python package to check if a file is
10661 (license license:bsd-3)
10662 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10664 (define-public python2-binaryornot
10665 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10666 (package (inherit base)
10668 `(("python2-enum34" ,python2-enum34)
10669 ,@(package-propagated-inputs base))))))
10671 (define-public python-nltk
10673 (name "python-nltk")
10677 (uri (pypi-uri "nltk" version))
10680 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10681 (build-system python-build-system)
10683 '(;; The tests require some extra resources to be downloaded.
10684 ;; TODO Try packaging these resources.
10686 (home-page "http://nltk.org/")
10687 (synopsis "Natural Language Toolkit")
10688 (description "It provides interfaces to over 50 corpora and lexical
10689 resources such as WordNet, along with a suite of text processing libraries
10690 for classification, tokenization, stemming, tagging, parsing, and semantic
10691 reasoning, wrappers for natural language processing libraries.")
10692 (license license:asl2.0)))
10694 (define-public python2-nltk
10695 (package-with-python2 python-nltk))
10697 (define-public python-pymongo
10699 (name "python-pymongo")
10703 (uri (pypi-uri "pymongo" version))
10706 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10707 (build-system python-build-system)
10709 `(("python-certifi" ,python-certifi)))
10710 (home-page "https://github.com/mongodb/mongo-python-driver")
10711 (synopsis "Python driver for MongoDB")
10712 (description "Python driver for MongoDB.")
10713 (license license:asl2.0)))
10715 (define-public python2-pymongo
10716 (package-with-python2 python-pymongo))
10718 (define-public python-consul
10720 (name "python-consul")
10725 (uri (pypi-uri "python-consul" version))
10728 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10729 (build-system python-build-system)
10731 '(#:tests? #f)) ; The tests are not distributed
10733 `(("python-requests" ,python-requests)
10734 ("python-six" ,python-six)))
10735 (home-page "https://github.com/cablehead/python-consul")
10736 (synopsis "Python client for Consul")
10738 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10739 discovery, monitoring and configuration.")
10740 (license license:expat)))
10742 (define-public python2-consul
10743 (package-with-python2 python-consul))
10745 (define-public python-schematics
10747 (name "python-schematics")
10752 (uri (git-reference
10753 (url "https://github.com/schematics/schematics.git")
10754 (commit (string-append "v" version))))
10755 (file-name (git-file-name name version))
10757 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10758 (build-system python-build-system)
10760 `(("python-six" ,python-six)))
10762 ;; The tests require a bunch of not very nice packages with fixed
10763 ;; version requirements (e.g. python-coveralls).
10765 (home-page "https://github.com/schematics/schematics")
10766 (synopsis "Python Data Structures for Humans")
10767 (description "Python Data Structures for Humans.")
10768 (license license:bsd-3)))
10770 (define-public python2-schematics
10771 (package-with-python2 python-schematics))
10773 (define-public python-odfpy
10775 (name "python-odfpy")
10779 (uri (pypi-uri "odfpy" version))
10782 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10784 `(#:modules ((srfi srfi-1)
10785 (guix build python-build-system)
10786 (guix build utils))
10788 (modify-phases %standard-phases
10790 ;; The test runner invokes python2 and python3 for test*.py.
10791 ;; To avoid having both in inputs, we replicate it here.
10793 (for-each (lambda (test-file) (invoke "python" test-file))
10794 (find-files "tests" "^test.*\\.py$"))
10796 (build-system python-build-system)
10797 (home-page "https://github.com/eea/odfpy")
10798 (synopsis "Python API and tools to manipulate OpenDocument files")
10799 (description "Collection of libraries and utility programs written in
10800 Python to manipulate OpenDocument 1.2 files.")
10802 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10803 ;; number of files with other licenses.
10804 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10806 (define-public python2-odfpy
10807 (package-with-python2 python-odfpy))
10809 (define-public python-natsort
10811 (name "python-natsort")
10815 (uri (pypi-uri "natsort" version))
10818 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10819 (build-system python-build-system)
10821 `(#:modules ((guix build utils)
10822 (guix build python-build-system)
10827 (modify-phases %standard-phases
10828 (add-before 'check 'set-cachedir
10829 ;; Tests require write access to $HOME by default
10830 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10833 (let ((cwd (getcwd)))
10834 (setenv "PYTHONPATH"
10837 (find (cut string-prefix? "lib" <>)
10838 (scandir (string-append cwd "/build")))
10840 (getenv "PYTHONPATH")))
10841 (invoke "pytest" "-v")))))))
10843 `(("python-hypothesis" ,python-hypothesis)
10844 ("python-pytest-cov" ,python-pytest-cov)
10845 ("python-pytest-mock" ,python-pytest-mock)
10846 ("python-pytest" ,python-pytest)))
10847 (propagated-inputs ; TODO: Add python-fastnumbers.
10848 `(("python-pyicu" ,python-pyicu)))
10849 (home-page "https://github.com/SethMMorton/natsort")
10850 (synopsis "Natural sorting for python and shell")
10852 "Natsort lets you apply natural sorting on lists instead of
10853 lexicographical. If you use the built-in @code{sorted} method in python
10854 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10855 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10856 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10857 identifies numbers and sorts them separately from strings. It can also sort
10858 version numbers, real numbers, mixed types and more, and comes with a shell
10859 command @command{natsort} that exposes this functionality in the command line.")
10860 (license license:expat)
10861 (properties `((python2-variant . ,(delay python2-natsort))))))
10863 (define-public python2-natsort
10864 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10865 (package (inherit base)
10867 `(("python2-pathlib" ,python2-pathlib)
10868 ,@(package-native-inputs base))))))
10870 (define-public python-glances
10872 (name "python-glances")
10877 (uri (pypi-uri "Glances" version))
10880 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10881 (build-system python-build-system)
10883 `(("python-psutil" ,python-psutil)))
10885 "https://github.com/nicolargo/glances")
10887 "A cross-platform curses-based monitoring tool")
10889 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10890 Glances uses the PsUtil library to get information from your system. It monitors
10891 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10892 (license license:lgpl3+)))
10894 (define-public python2-glances
10895 (package-with-python2 python-glances))
10897 (define-public python-graphql-core
10899 (name "python-graphql-core")
10904 (uri (pypi-uri "graphql-core" version))
10907 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10908 (build-system python-build-system)
10910 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10912 (modify-phases %standard-phases
10913 (add-after 'unpack 'patch-hardcoded-version
10914 (lambda _ (substitute*
10916 (("'gevent==1.1rc1'") "'gevent'"))
10919 `(("python-gevent" ,python-gevent)
10920 ("python-mock" ,python-mock)
10921 ("python-pytest-mock" ,python-pytest-mock)))
10923 `(("python-promise" ,python-promise)
10924 ("python-six" ,python-six)))
10925 (home-page "https://github.com/graphql-python/graphql-core")
10926 (synopsis "GraphQL implementation for Python")
10928 "GraphQL implementation for Python. GraphQL is a data query language and
10929 runtime designed and used to request and deliver data to mobile and web apps.
10930 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10932 (license license:expat)))
10934 (define-public python2-graphql-core
10935 (package-with-python2 python-graphql-core))
10937 (define-public python-graphql-relay
10939 (name "python-graphql-relay")
10944 (uri (pypi-uri "graphql-relay" version))
10947 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10948 (build-system python-build-system)
10950 '(#:tests? #f)) ; The tests are not distributed
10952 `(("python-graphql-core" ,python-graphql-core)
10953 ("python-promise" ,python-promise)
10954 ("python-six" ,python-six)))
10955 (home-page "https://github.com/graphql-python/graphql-relay-py")
10956 (synopsis "Relay implementation for Python")
10958 "This is a library to allow the easy creation of Relay-compliant servers
10959 using the GraphQL Python reference implementation of a GraphQL server. It
10960 should be noted that the code is a exact port of the original
10961 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10963 (license license:expat)))
10965 (define-public python2-graphql-relay
10966 (package-with-python2 python-graphql-relay))
10968 (define-public python-graphene
10970 (name "python-graphene")
10975 (uri (pypi-uri "graphene" version))
10978 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10979 (build-system python-build-system)
10981 `(("python-graphql-core" ,python-graphql-core)
10982 ("python-graphql-relay" ,python-graphql-relay)
10983 ("python-iso8601" ,python-iso8601)
10984 ("python-promise" ,python-promise)
10985 ("python-six" ,python-six)))
10987 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10988 (home-page "http://graphene-python.org/")
10989 (synopsis "GraphQL Framework for Python")
10991 "Graphene is a Python library for building GraphQL schemas/types.
10992 A GraphQL schema describes your data model, and provides a GraphQL server
10993 with an associated set of resolve methods that know how to fetch data.")
10994 (properties `((python2-variant . ,(delay python2-graphene))))
10995 (license license:expat)))
10997 (define-public python2-graphene
10998 (let ((base (package-with-python2
10999 (strip-python2-variant python-graphene))))
11000 (package (inherit base)
11002 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11003 ,@(package-native-inputs base))))))
11005 (define-public python-nautilus
11007 (name "python-nautilus")
11012 (uri (pypi-uri "nautilus" version))
11015 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11016 (build-system python-build-system)
11017 (arguments `(#:tests? #f)) ; fails to import test modules
11019 `(("python-bcrypt" ,python-bcrypt)
11020 ("python-click" ,python-click)
11021 ("python-consul" ,python-consul)
11022 ("python-graphene" ,python-graphene)
11023 ("python-jinja2" ,python-jinja2)
11024 ("python-peewee" ,python-peewee)
11025 ("python-pika" ,python-pika)
11026 ("python-tornado" ,python-tornado)
11027 ("python-wtforms" ,python-wtforms)))
11029 `(("python-nose2" ,python-nose2)))
11030 (home-page "https://github.com/AlecAivazis/nautilus")
11031 (synopsis "Library for creating microservice applications")
11033 "Nautilus is a framework for flux based microservices that looks to
11034 provide extendible implementations of common aspects of a cloud so that you can
11035 focus on building massively scalable web applications.")
11036 (license license:expat)))
11038 (define-public python-snowballstemmer
11040 (name "python-snowballstemmer")
11044 (uri (pypi-uri "snowballstemmer" version))
11047 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11048 (build-system python-build-system)
11050 `(;; No tests exist
11052 (home-page "https://github.com/shibukawa/snowball_py")
11053 (synopsis "Snowball stemming library collection for Python")
11054 (description "This package provides 16 word stemmer algorithms generated
11055 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11057 (license license:bsd-3)))
11059 (define-public python2-snowballstemmer
11060 (package-with-python2 python-snowballstemmer))
11062 (define-public python-setproctitle
11064 (name "python-setproctitle")
11069 (uri (pypi-uri "setproctitle" version))
11072 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11073 (build-system python-build-system)
11076 (modify-phases %standard-phases
11077 (add-before 'check 'patch-Makefile
11078 ;; Stricly this is only required for the python2 variant.
11079 ;; But adding a phase in an inherited package seems to be
11080 ;; cumbersum. So we patch even for python3.
11082 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11084 (substitute* "Makefile"
11085 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11086 (string-append nose "/bin/nosetests "))))
11090 (setenv "PYTHON" (or (which "python3") (which "python")))
11091 (setenv "PYCONFIG" (or (which "python3-config")
11092 (which "python-config")))
11093 (setenv "CC" "gcc")
11094 ;; No need to extend PYTHONPATH to find the built package, since
11095 ;; the Makefile will build anyway
11096 (invoke "make" "check"))))))
11098 `(("procps" ,procps))) ; required for tests
11100 "https://github.com/dvarrazzo/py-setproctitle")
11102 "Setproctitle implementation for Python to customize the process title")
11103 (description "The library allows a process to change its title (as displayed
11104 by system tools such as ps and top).
11106 Changing the title is mostly useful in multi-process systems, for
11107 example when a master process is forked: changing the children's title
11108 allows to identify the task each process is busy with. The technique
11109 is used by PostgreSQL and the OpenSSH Server for example.")
11110 (license license:bsd-3)
11111 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11113 (define-public python2-setproctitle
11114 (let ((base (package-with-python2
11115 (strip-python2-variant python-setproctitle))))
11118 (native-inputs `(("python2-nose" ,python2-nose)
11119 ,@(package-native-inputs base))))))
11121 (define-public python-validictory
11123 (name "python-validictory")
11128 (uri (pypi-uri "validictory" version))
11131 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11132 (build-system python-build-system)
11135 (modify-phases %standard-phases
11136 (add-after 'unpack 'bootstrap
11137 ;; Move the tests out of the package directory to avoid
11140 (rename-file "validictory/tests" "tests")
11141 (delete-file "tests/__init__.py")))
11144 ;; Extend PYTHONPATH so the built package will be found.
11145 (setenv "PYTHONPATH"
11146 (string-append (getcwd) "/build/lib:"
11147 (getenv "PYTHONPATH")))
11148 (invoke "py.test" "-vv" ))))))
11150 `(("python-pytest" ,python-pytest)))
11152 "https://github.com/jamesturk/validictory")
11153 (synopsis "General purpose Python data validator")
11154 (description "It allows validation of arbitrary Python data structures.
11156 The schema format is based on the JSON Schema
11157 proposal (http://json-schema.org), so combined with json the library is also
11158 useful as a validator for JSON data.")
11159 (license license:expat)))
11161 (define-public python2-validictory
11162 (package-with-python2 python-validictory))
11164 (define-public python-pyelftools
11166 (name "python-pyelftools")
11171 (uri (pypi-uri "pyelftools" version))
11174 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11175 (build-system python-build-system)
11178 (modify-phases %standard-phases
11179 (add-before 'check 'set-pythonpath
11181 (setenv "PYTHONPATH"
11184 ":" (getenv "PYTHONPATH")))
11187 "https://github.com/eliben/pyelftools")
11189 "Analyze binary and library file information")
11190 (description "This Python library provides interfaces for parsing and
11191 analyzing two binary and library file formats; the Executable and Linking
11192 Format (ELF), and debugging information in the Debugging With Attributed
11193 Record Format (DWARF).")
11194 (license license:public-domain)))
11196 (define-public python-pyev
11198 (name "python-pyev")
11203 (uri (pypi-uri "pyev" version))
11206 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11207 (build-system python-build-system)
11209 `(#:tests? #f ; no test suite
11211 (modify-phases %standard-phases
11212 (add-after 'unpack 'patch
11213 (lambda* (#:key inputs #:allow-other-keys)
11214 (let ((libev (string-append (assoc-ref inputs "libev")
11215 "/lib/libev.so.4")))
11216 (substitute* "setup.py"
11217 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11218 (string-append "libev_dll_name = \"" libev "\"")))))))))
11220 `(("libev" ,libev)))
11221 (home-page "http://pythonhosted.org/pyev/")
11222 (synopsis "Python libev interface")
11223 (description "Pyev provides a Python interface to libev.")
11224 (license license:gpl3)))
11226 (define-public python2-pyev
11227 (package-with-python2 python-pyev))
11229 (define-public python-imagesize
11231 (name "python-imagesize")
11236 (uri (pypi-uri "imagesize" version))
11239 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11240 (build-system python-build-system)
11241 (home-page "https://github.com/shibukawa/imagesize_py")
11242 (synopsis "Gets image size of files in various formats in Python")
11244 "This package allows determination of image size from
11245 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11246 (license license:expat)))
11248 (define-public python2-imagesize
11249 (package-with-python2 python-imagesize))
11251 (define-public python-termstyle
11253 (name "python-termstyle")
11258 (uri (pypi-uri "termstyle" version))
11261 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11262 (build-system python-build-system)
11265 (modify-phases %standard-phases
11268 (invoke "python" "test3.py"))))))
11269 (home-page "https://github.com/gfxmonk/termstyle")
11270 (synopsis "Console text coloring for Python")
11271 (description "This package provides console text coloring for Python.")
11272 (license license:bsd-3)))
11274 (define-public python-argcomplete
11276 (name "python-argcomplete")
11281 (uri (pypi-uri "argcomplete" version))
11284 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11285 (build-system python-build-system)
11287 `(("python-pexpect" ,python-pexpect)
11289 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11290 (home-page "https://github.com/kislyuk/argcomplete")
11291 (synopsis "Shell tab completion for Python argparse")
11292 (description "argcomplete provides extensible command line tab completion
11293 of arguments and options for Python scripts using @code{argparse}. It's
11294 particularly useful for programs with many options or sub-parsers that can
11295 dynamically suggest completions; for example, when browsing resources over the
11297 (license license:asl2.0)))
11299 (define-public python2-argcomplete
11300 (package-with-python2 python-argcomplete))
11302 (define-public python-xopen
11304 (name "python-xopen")
11309 (uri (pypi-uri "xopen" version))
11312 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11313 (build-system python-build-system)
11315 `(("python-setuptools-scm" ,python-setuptools-scm)))
11316 (home-page "https://github.com/marcelm/xopen/")
11317 (synopsis "Open compressed files transparently")
11318 (description "This module provides an @code{xopen} function that works like
11319 Python's built-in @code{open} function, but can also deal with compressed files.
11320 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11321 recognized by their file extensions. The focus is on being as efficient as
11322 possible on all supported Python versions.")
11323 (license license:expat)))
11325 (define-public python2-xopen
11326 (let ((base (package-with-python2
11327 (strip-python2-variant python-xopen))))
11330 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11331 ,@(package-propagated-inputs base))))))
11333 (define-public python-cheetah
11335 (name "python-cheetah")
11340 (uri (pypi-uri "Cheetah3" version))
11343 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11344 (build-system python-build-system)
11346 `(#:modules ((guix build utils)
11347 (guix build python-build-system)
11351 #:phases (modify-phases %standard-phases
11352 (add-after 'unpack 'use-absolute-python
11354 (substitute* "Cheetah/CheetahWrapper.py"
11355 (("#!/usr/bin/env python")
11356 (string-append "#!" (which "python"))))
11360 (let ((cwd (getcwd)))
11361 (setenv "PYTHONPATH"
11364 (find (cut string-prefix? "lib" <>)
11365 (scandir (string-append cwd "/build")))
11366 ":" (getenv "PYTHONPATH")))
11368 (string-append (getenv "PATH")
11370 (setenv "TMPDIR" "/tmp")
11372 (substitute* "Cheetah/Tests/Test.py"
11373 (("unittest.TextTestRunner\\(\\)")
11374 "unittest.TextTestRunner(verbosity=2)"))
11376 (invoke "python" "Cheetah/Tests/Test.py")))))))
11378 `(("python-markdown" ,python-markdown))) ;optional
11379 (home-page "http://cheetahtemplate.org/")
11380 (synopsis "Template engine")
11381 (description "Cheetah is a text-based template engine and Python code
11384 Cheetah can be used as a standalone templating utility or referenced as
11385 a library from other Python applications. It has many potential uses,
11386 but web developers looking for a viable alternative to ASP, JSP, PHP and
11387 PSP are expected to be its principle user group.
11391 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11393 @item Cleanly separates content, graphic design, and program code.
11394 @item Blends the power and flexibility of Python with a simple template language
11395 that non-programmers can understand.
11396 @item Gives template writers full access to any Python data structure, module,
11397 function, object, or method in their templates.
11398 @item Makes code reuse easy by providing an object-orientated interface to
11399 templates that is accessible from Python code or other Cheetah templates.
11400 One template can subclass another and selectively reimplement sections of it.
11401 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11402 improve the performance of a dynamic website.
11403 @item Compiles templates into optimized, yet readable, Python code.
11405 (license (license:x11-style "file://LICENSE"))))
11407 (define-public python2-cheetah
11408 (package-with-python2 python-cheetah))
11410 (define-public python-dulwich
11412 (name "python-dulwich")
11417 (uri (list (string-append "https://www.dulwich.io/releases/"
11418 "dulwich-" version ".tar.gz")
11419 (pypi-uri "dulwich" version)))
11422 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11423 (build-system python-build-system)
11426 (modify-phases %standard-phases
11427 (add-before 'check 'fix-tests
11428 (lambda* (#:key inputs #:allow-other-keys)
11429 ;; The tests use Popen with a custom environment which doesn't
11431 (substitute* "dulwich/tests/compat/utils.py"
11432 (("'git'") (string-append "'"
11435 (substitute* '("dulwich/tests/test_repository.py"
11436 "dulwich/tests/test_hooks.py")
11437 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11438 (setenv "TEST_RUNNER" "unittest")
11439 (setenv "PYTHONHASHSEED" "random")
11442 `(("python-fastimport" ,python-fastimport)))
11444 `(("python-mock" ,python-mock)
11445 ("python-geventhttpclient" ,python-geventhttpclient)
11447 (home-page "https://www.dulwich.io/")
11448 (synopsis "Git implementation in Python")
11449 (description "Dulwich is an implementation of the Git file formats and
11450 protocols written in pure Python.")
11451 ;; Can be used with either license.
11452 (license (list license:asl2.0 license:gpl2+))))
11454 (define-public python2-dulwich
11455 (package-with-python2 python-dulwich))
11457 (define-public python-pbkdf2
11459 (name "python-pbkdf2")
11464 (uri (pypi-uri "pbkdf2" version))
11467 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11468 (build-system python-build-system)
11471 (modify-phases %standard-phases
11474 (setenv "PYTHONPATH"
11475 (string-append (getcwd) "/build/lib:"
11476 (getenv "PYTHONPATH")))
11477 (invoke "python" "test/test_pbkdf2.py"))))))
11479 `(("python-pycrypto" ,python-pycrypto))) ; optional
11480 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11481 (synopsis "Password-based key derivation")
11482 (description "This module implements the password-based key derivation
11483 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11485 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11486 is part of the RSA Public Key Cryptography Standards series. The provided
11487 implementation takes a password or a passphrase and a salt value (and
11488 optionally a iteration count, a digest module, and a MAC module) and provides
11489 a file-like object from which an arbitrarly-sized key can be read.")
11490 (license license:expat)))
11492 (define-public python2-pbkdf2
11493 (package-with-python2 python-pbkdf2))
11495 (define-public python-qrcode
11497 (name "python-qrcode")
11502 (uri (pypi-uri "qrcode" version))
11504 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11505 (build-system python-build-system)
11507 ;; FIXME: Tests require packaging 'pymaging'.
11510 `(("python-lxml" ,python-lxml) ; for SVG output
11511 ("python-pillow" ,python-pillow) ; for PNG output
11512 ("python-six" ,python-six)))
11513 (home-page "https://github.com/lincolnloop/python-qrcode")
11514 (synopsis "QR Code image generator")
11515 (description "This package provides a pure Python QR Code generator
11516 module. It uses the Python Imaging Library (PIL) to allow for the generation
11519 In addition this package provides a command line tool to generate QR codes and
11520 either write these QR codes to a file or do the output as ascii art at the
11522 (license license:bsd-3)))
11524 (define-public python2-qrcode
11525 (package-with-python2 python-qrcode))
11527 (define-public python-rst2ansi
11529 (name "python-rst2ansi")
11534 (uri (pypi-uri "rst2ansi" version))
11537 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11538 (build-system python-build-system)
11540 `(("python-docutils" ,python-docutils)))
11541 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11542 (synopsis "Convert RST to ANSI-decorated console output")
11544 "Python module dedicated to rendering RST (reStructuredText) documents
11545 to ansi-escaped strings suitable for display in a terminal.")
11546 (license license:expat)))
11548 (define-public python-ansi2html
11550 (name "python-ansi2html")
11555 (uri (pypi-uri "ansi2html" version))
11558 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11559 (build-system python-build-system)
11561 `(("python-mock" ,python-mock)
11562 ("python-nose" ,python-nose)))
11564 `(("python-six" ,python-six)))
11565 (home-page "https://github.com/ralphbean/ansi2html")
11566 (synopsis "Convert ANSI-decorated console output to HTML")
11568 "@command{ansi2html} is a Python library and command line utility for
11569 convering text with ANSI color codes to HTML or LaTeX.")
11570 (license license:gpl3+)))
11572 (define-public python2-ansi2html
11573 (package-with-python2 python-ansi2html))
11575 (define-public python-ddt
11577 (name "python-ddt")
11582 (uri (pypi-uri "ddt" version))
11585 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11586 (build-system python-build-system)
11588 `(("python-mock" ,python-mock)
11589 ("python-nose" ,python-nose)))
11591 `(("python-six" ,python-six)
11592 ("python-pyyaml" ,python-pyyaml)))
11593 (home-page "https://github.com/txels/ddt")
11594 (synopsis "Data-Driven Tests")
11596 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11597 running it with different test data, and make it appear as multiple test
11599 (license license:expat)))
11601 (define-public python2-ddt
11602 (package-with-python2 python-ddt))
11604 (define-public python-pycountry
11606 (name "python-pycountry")
11607 (version "18.5.26")
11611 (uri (pypi-uri "pycountry" version))
11614 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11615 (build-system python-build-system)
11616 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11617 (synopsis "ISO databases for languages, countries, currencies, etc.")
11619 "@code{pycountry} provides the ISO databases for the standards:
11621 @item 639-3 (Languages)
11622 @item 3166 (Countries)
11623 @item 3166-3 (Deleted Countries)
11624 @item 3166-2 (Subdivisions of countries)
11625 @item 4217 (Currencies)
11626 @item 15924 (Scripts)
11628 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11629 through a Python API.")
11630 (license license:lgpl2.1+)))
11632 (define-public python2-pycountry
11633 (package-with-python2 python-pycountry))
11635 (define-public python-pycosat
11637 (name "python-pycosat")
11642 (uri (pypi-uri "pycosat" version))
11645 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11646 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11647 (build-system python-build-system)
11648 (home-page "https://github.com/ContinuumIO/pycosat")
11649 (synopsis "Bindings to picosat (a SAT solver)")
11651 "This package provides efficient Python bindings to @code{picosat} on
11652 the C level. When importing pycosat, the @code{picosat} solver becomes part
11653 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11654 Problem} (SAT) solver.")
11655 (license license:expat)))
11657 (define-public python2-pycosat
11658 (package-with-python2 python-pycosat))
11660 (define-public python2-ruamel.ordereddict
11662 (name "python2-ruamel.ordereddict")
11667 (uri (pypi-uri "ruamel.ordereddict" version))
11670 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11671 (build-system python-build-system)
11673 `(#:python ,python-2
11675 (modify-phases %standard-phases
11677 (add-after 'install 'check
11678 (lambda* (#:key inputs outputs #:allow-other-keys)
11679 (add-installed-pythonpath inputs outputs)
11680 (invoke "python" "test/testordereddict.py"))))))
11681 (home-page "https://bitbucket.org/ruamel/ordereddict")
11682 (synopsis "Version of dict that keeps keys in insertion order")
11684 "This is an implementation of an ordered dictionary with @dfn{Key
11685 Insertion Order} (KIO: updates of values do not affect the position of the
11686 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11687 removed and put at the back). The standard library module @code{OrderedDict},
11688 implemented later, implements a subset of @code{ordereddict} functionality.
11689 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11690 Order} (KSO, no sorting function can be specified, but a transform can be
11691 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11692 (license license:expat)))
11694 (define-public python-pypeg2
11696 (name "python-pypeg2")
11701 (uri (pypi-uri "pyPEG2" version))
11704 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11705 (build-system python-build-system)
11706 (propagated-inputs `(("python-lxml" ,python-lxml)))
11708 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11710 (home-page "https://fdik.org/pyPEG/")
11711 (synopsis "Parsering Expression Grammars in Python")
11712 (description "PyPEG is an intrinsic parser interpreter framework for
11713 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11714 parse many formal languages.")
11715 (license license:gpl2)))
11717 (define-public python-incremental
11719 (name "python-incremental")
11724 (uri (pypi-uri "incremental" version))
11727 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11728 (build-system python-build-system)
11729 (home-page "https://github.com/hawkowl/incremental")
11730 (synopsis "Library for versioning Python projects")
11731 (description "Incremental is a small library that versions your Python
11733 (license license:expat)))
11735 (define-public python2-incremental
11736 (package-with-python2 python-incremental))
11738 (define-public python-invoke
11740 (name "python-invoke")
11741 (home-page "http://www.pyinvoke.org/")
11745 (uri (pypi-uri "invoke" version))
11748 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11749 (build-system python-build-system)
11751 ;; XXX: Requires many dependencies that are not yet in Guix.
11753 (synopsis "Pythonic task execution")
11755 "Invoke is a Python task execution tool and library, drawing inspiration
11756 from various sources to arrive at a powerful and clean feature set. It is
11757 evolved from the Fabric project, but focuses on local and abstract concerns
11758 instead of servers and network commands.")
11759 (license license:bsd-3)))
11761 (define-public python2-invoke
11762 (package-with-python2 python-invoke))
11764 (define-public python-automat
11766 (name "python-automat")
11770 (uri (pypi-uri "Automat" version))
11773 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11774 (build-system python-build-system)
11775 ;; We disable the tests because they require python-twisted, while
11776 ;; python-twisted depends on python-automat. Twisted is optional, but the
11777 ;; tests fail if it is not available. Also see
11778 ;; <https://github.com/glyph/automat/issues/71>.
11779 (arguments '(#:tests? #f))
11781 `(("python-m2r" ,python-m2r)
11782 ("python-setuptools-scm" ,python-setuptools-scm)
11783 ("python-graphviz" ,python-graphviz)))
11785 `(("python-six" ,python-six)
11786 ("python-attrs" ,python-attrs)))
11787 (home-page "https://github.com/glyph/Automat")
11788 (synopsis "Self-service finite-state machines")
11789 (description "Automat is a library for concise, idiomatic Python
11790 expression of finite-state automata (particularly deterministic finite-state
11792 (license license:expat)))
11794 (define-public python2-automat
11795 (package-with-python2 python-automat))
11797 (define-public python-m2r
11799 (name "python-m2r")
11803 (uri (pypi-uri "m2r" version))
11806 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11807 (build-system python-build-system)
11809 `(("python-docutils" ,python-docutils)
11810 ("python-mistune" ,python-mistune)))
11812 `(("python-pygments" ,python-pygments)
11813 ("python-mock" ,python-mock)))
11814 (home-page "https://github.com/miyakogi/m2r")
11815 (synopsis "Markdown to reStructuredText converter")
11816 (description "M2R converts a markdown file including reST markups to valid
11818 (license license:expat)))
11820 (define-public python2-m2r
11821 (package-with-python2 python-m2r))
11823 (define-public python-constantly
11825 (name "python-constantly")
11829 (uri (pypi-uri "constantly" version))
11832 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11833 (build-system python-build-system)
11834 (home-page "https://github.com/twisted/constantly")
11835 (synopsis "Symbolic constants in Python")
11836 (description "Constantly is a Python library that provides symbolic
11837 constant support. It includes collections and constants with text, numeric,
11838 and bit flag values.")
11839 (license license:expat)))
11841 (define-public python2-constantly
11842 (package-with-python2 python-constantly))
11844 (define-public python-attrs
11846 (name "python-attrs")
11850 (uri (pypi-uri "attrs" version))
11853 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11854 (build-system python-build-system)
11856 `(#:modules ((guix build utils)
11857 (guix build python-build-system)
11861 #:phases (modify-phases %standard-phases
11864 (let ((cwd (getcwd)))
11865 (setenv "PYTHONPATH"
11868 (find (cut string-prefix? "lib" <>)
11869 (scandir (string-append cwd "/build")))
11871 (getenv "PYTHONPATH")))
11872 (invoke "python" "-m" "pytest")))))))
11874 `(("python-coverage" ,python-coverage)
11875 ("python-hypothesis" ,python-hypothesis)
11876 ("python-pympler" ,python-pympler)
11877 ("python-pytest" ,python-pytest)
11878 ("python-six" ,python-six)
11879 ("python-sphinx" ,python-sphinx)
11880 ("python-zope-interface" ,python-zope-interface)))
11881 (home-page "https://github.com/python-attrs/attrs/")
11882 (synopsis "Attributes without boilerplate")
11883 (description "@code{attrs} is a Python package with class decorators that
11884 ease the chores of implementing the most common attribute-related object
11886 (license license:expat)))
11888 (define-public python2-attrs
11889 (package-with-python2 python-attrs))
11891 (define-public python-attrs-bootstrap
11893 (inherit python-attrs)
11894 (name "python-attrs-bootstrap")
11895 (native-inputs `())
11896 (arguments `(#:tests? #f))))
11898 (define-public python2-attrs-bootstrap
11899 (package-with-python2 python-attrs-bootstrap))
11901 (define-public python2-cliapp
11903 (name "python2-cliapp")
11904 (version "1.20180812.1")
11908 (uri (string-append
11909 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11910 version ".tar.gz"))
11913 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11914 (build-system python-build-system)
11916 `(#:python ,python-2
11918 (modify-phases %standard-phases
11919 ;; check phase needs to be run before the build phase. If not,
11920 ;; coverage-test-runner looks for tests for the built source files,
11923 (add-before 'build 'check
11925 ;; Disable python3 tests
11926 (substitute* "check"
11927 (("python3") "# python3"))
11928 (invoke "./check"))))))
11930 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11931 ("python2-pep8" ,python2-pep8)))
11933 `(("python2-pyaml" ,python2-pyaml)))
11934 (home-page "https://liw.fi/cliapp/")
11935 (synopsis "Python framework for command line programs")
11936 (description "@code{python2-cliapp} is a python framework for
11937 command line programs. It contains the typical stuff such programs
11938 need to do, such as parsing the command line for options, and
11939 iterating over input files.")
11940 (license license:gpl2+)))
11942 (define-public python2-ttystatus
11944 (name "python2-ttystatus")
11949 (uri (string-append
11950 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11951 version ".tar.gz"))
11954 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11955 (build-system python-build-system)
11957 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11958 ("python2-pep8" ,python2-pep8)))
11960 `(#:python ,python-2
11962 (modify-phases %standard-phases
11963 ;; check phase needs to be run before the build phase. If not,
11964 ;; coverage-test-runner looks for tests for the built source files,
11967 (add-before 'build 'check
11968 (lambda _ (invoke "make" "check"))))))
11969 (home-page "https://liw.fi/ttystatus/")
11970 (synopsis "Python library for showing progress reporting and
11971 status updates on terminals")
11972 (description "@code{python2-ttystatus} is a python library for
11973 showing progress reporting and status updates on terminals, for
11974 command line programs. Output is automatically adapted to the width
11975 of the terminal: truncated if it does not fit, and resized if the
11976 terminal size changes.")
11977 (license license:gpl3+)))
11979 (define-public python2-tracing
11981 (name "python2-tracing")
11986 (uri (string-append
11987 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11988 version ".tar.gz"))
11991 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11992 (build-system python-build-system)
11994 `(#:python ,python-2))
11995 (home-page "https://liw.fi/tracing/")
11996 (synopsis "Python debug logging helper")
11997 (description "@code{python2-tracing} is a python library for
11998 logging debug messages. It provides a way to turn debugging messages
11999 on and off, based on the filename they occur in. It is much faster
12000 than using @code{logging.Filter} to accomplish the same thing, which
12001 matters when code is run in production mode. The actual logging still
12002 happens using the @code{logging} library.")
12003 (license license:gpl3+)))
12005 (define-public python2-larch
12007 (name "python2-larch")
12008 (version "1.20151025")
12012 (uri (string-append
12013 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12014 version ".tar.gz"))
12015 (patches (search-patches
12016 "python2-larch-coverage-4.0a6-compatibility.patch"))
12019 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12020 (build-system python-build-system)
12022 `(#:python ,python-2
12024 (modify-phases %standard-phases
12025 ;; check phase needs to be run before the build phase. If not,
12026 ;; coverage-test-runner looks for tests for the built source files,
12029 (add-before 'build 'check
12030 (lambda _ (invoke "make" "check"))))))
12032 `(("cmdtest" ,cmdtest)
12033 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12035 `(("python2-tracing" ,python2-tracing)))
12036 (home-page "https://liw.fi/larch/")
12037 (synopsis "Python copy-on-write B-tree library")
12038 (description "@code{python2-larch} is an implementation of
12039 particular kind of B-tree, based on research by Ohad Rodeh. See
12040 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12041 on the data structure.
12043 The distinctive feature of this B-tree is that a node is never
12044 (conceptually) modified. Instead, all updates are done by
12045 copy-on-write. This makes it easy to clone a tree, and modify only the
12046 clone, while other processes access the original tree.")
12047 (license license:gpl3+)))
12049 (define-public python-astroid
12051 (name "python-astroid")
12056 (uri (pypi-uri "astroid" version))
12059 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12060 (build-system python-build-system)
12062 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12063 ("python-six" ,python-six)
12064 ("python-wrapt" ,python-wrapt)))
12066 `(("python-dateutil" ,python-dateutil)
12067 ("python-nose" ,python-nose)
12068 ("python-pytest" ,python-pytest)
12069 ("python-pytest-runner" ,python-pytest-runner)))
12072 (modify-phases %standard-phases
12073 (add-after 'unpack 'remove-spurious-test
12075 ;; This can be removed after upgrading from python-3.7
12076 ;; https://github.com/PyCQA/astroid/issues/593
12077 ;; https://bugs.python.org/issue34056
12078 (delete-file "astroid/tests/unittest_modutils.py")
12082 (invoke "pytest" "astroid"))))))
12083 (home-page "https://github.com/PyCQA/astroid")
12084 (synopsis "Common base representation of python source code for pylint and
12086 (description "@code{python-astroid} provides a common base representation
12087 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12089 It provides a compatible representation which comes from the _ast module. It
12090 rebuilds the tree generated by the builtin _ast module by recursively walking
12091 down the AST and building an extended ast. The new node classes have
12092 additional methods and attributes for different usages. They include some
12093 support for static inference and local name scopes. Furthermore, astroid
12094 builds partial trees by inspecting living objects.")
12095 (license license:lgpl2.1+)
12096 (properties `((python2-variant . ,(delay python2-astroid))))))
12098 (define-public python2-astroid
12099 (let ((base (package-with-python2
12100 (strip-python2-variant python-astroid))))
12101 (package (inherit base)
12102 ;; Version 2.x removes python2 support.
12107 (uri (pypi-uri "astroid" version))
12110 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12112 (substitute-keyword-arguments (package-arguments base)
12114 `(modify-phases ,phases
12115 (add-after 'unpack 'remove-spurious-test
12117 ;; https://github.com/PyCQA/astroid/issues/276
12118 (delete-file "astroid/tests/unittest_brain.py")
12122 (invoke"python" "-m" "unittest" "discover"
12123 "-p" "unittest*.py")))))))
12124 (native-inputs `())
12126 `(("python2-backports-functools-lru-cache"
12127 ,python2-backports-functools-lru-cache)
12128 ("python2-enum34" ,python2-enum34)
12129 ("python2-singledispatch" ,python2-singledispatch)
12130 ,@(package-propagated-inputs base))))))
12132 (define-public python-isort
12134 (name "python-isort")
12139 (uri (git-reference
12140 ;; Tests pass only from the Github sources
12141 (url "https://github.com/timothycrosley/isort")
12143 (file-name (git-file-name name version))
12146 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12147 (build-system python-build-system)
12149 `(("python-mock" ,python-mock)
12150 ("python-pytest" ,python-pytest)))
12151 (home-page "https://github.com/timothycrosley/isort")
12152 (synopsis "Python utility/library to sort python imports")
12153 (description "@code{python-isort} is a python utility/library to sort
12154 imports alphabetically, and automatically separated into sections. It
12155 provides a command line utility, a python library and plugins for various
12157 (license license:expat)
12158 (properties `((python2-variant . ,(delay python2-isort))))))
12160 (define-public python2-isort
12161 (let ((base (package-with-python2
12162 (strip-python2-variant python-isort))))
12163 (package (inherit base)
12165 `(("python2-futures" ,python2-futures)
12166 ,@(package-native-inputs base))))))
12168 (define-public python2-backports-functools-lru-cache
12170 (name "python2-backports-functools-lru-cache")
12175 ;; only the pypi tarballs contain the necessary metadata
12176 (uri (pypi-uri "backports.functools_lru_cache" version))
12179 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12180 (build-system python-build-system)
12182 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12184 `(#:python ,python-2))
12185 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12186 (synopsis "Backport of functools.lru_cache from Python 3.3")
12187 (description "@code{python2-backports-functools-lru-cache} is a backport
12188 of @code{functools.lru_cache} from python 3.3.")
12189 (license license:expat)))
12191 (define-public python-configparser
12193 (name "python-configparser")
12198 (uri (pypi-uri "configparser" version))
12201 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12202 (build-system python-build-system)
12203 (home-page "https://github.com/jaraco/configparser/")
12204 (synopsis "Backport of configparser from python 3.5")
12205 (description "@code{python-configparser} is a backport of
12206 @code{configparser} from Python 3.5 so that it can be used directly
12207 in other versions.")
12208 (license license:expat)))
12210 (define-public python2-configparser
12211 (package-with-python2 python-configparser))
12213 (define-public python-mando
12215 (name "python-mando")
12219 (uri (pypi-uri "mando" version))
12222 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12223 (build-system python-build-system)
12225 `(("python-rst2ansi" ,python-rst2ansi)
12226 ("python-six" ,python-six)))
12228 `(("python-pytest" ,python-pytest)))
12229 (home-page "https://mando.readthedocs.org/")
12231 "Wrapper around argparse, allowing creation of complete CLI applications")
12233 "This package is a wrapper around argparse, allowing you to write complete CLI
12234 applications in seconds while maintaining all the flexibility.")
12235 (license license:expat)))
12237 (define-public python2-mando
12238 (package-with-python2 python-mando))
12240 (define-public python2-argparse
12242 (name "python2-argparse")
12247 (uri (pypi-uri "argparse" version))
12250 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12251 (build-system python-build-system)
12253 `(#:python ,python-2))
12254 (home-page "https://github.com/ThomasWaldmann/argparse/")
12255 (synopsis "Python command-line parsing library")
12257 "This package is mostly for people who want to have @code{argparse} on
12258 older Pythons because it was not part of the standard library back then.")
12259 (license license:psfl)))
12261 (define-public python-fudge
12263 (name "python-fudge")
12264 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12265 ;; package, which is currently the only use of this package.
12270 (uri (pypi-uri "fudge" version))
12273 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12274 (build-system python-build-system)
12276 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12277 (home-page "https://github.com/fudge-py/fudge")
12278 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12280 "Fudge is a Python module for using fake objects (mocks and stubs) to
12283 In readable Python code, you declare the methods available on your fake object
12284 and how they should be called. Then you inject that into your application and
12285 start testing. This declarative approach means you don’t have to record and
12286 playback actions and you don’t have to inspect your fakes after running code.
12287 If the fake object was used incorrectly then you’ll see an informative
12288 exception message with a traceback that points to the culprit.")
12289 (license license:expat)))
12291 (define-public python2-fudge
12292 (package-with-python2 python-fudge))
12294 (define-public python-mwclient
12296 (name "python-mwclient")
12301 ;; The PyPI version wouldn't contain tests.
12302 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12303 "v" version ".tar.gz"))
12304 (file-name (string-append name "-" version ".tar.gz"))
12307 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12308 (build-system python-build-system)
12310 `(("python-requests" ,python-requests)
12311 ("python-requests-oauthlib"
12312 ,python-requests-oauthlib)
12313 ("python-six" ,python-six)))
12315 `(("python-mock" ,python-mock)
12316 ("python-pytest" ,python-pytest)
12317 ("python-pytest-pep8" ,python-pytest-pep8)
12318 ("python-pytest-cache" ,python-pytest-cache)
12319 ("python-pytest-cov" ,python-pytest-cov)
12320 ("python-responses" ,python-responses)))
12321 (home-page "https://github.com/btongminh/mwclient")
12322 (synopsis "MediaWiki API client")
12323 (description "This package provides a MediaWiki API client.")
12324 (license license:expat)))
12326 (define-public python2-mwclient
12327 (package-with-python2 python-mwclient))
12329 (define-public python-utils
12331 (name "python-utils")
12335 (uri (pypi-uri "python-utils" version))
12338 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12339 (build-system python-build-system)
12341 `(("pytest-runner" ,python-pytest-runner)
12342 ("pytest" ,python-pytest)
12343 ("six" ,python-six)))
12344 (home-page "https://github.com/WoLpH/python-utils")
12345 (synopsis "Convenient utilities not included with the standard Python install")
12347 "Python Utils is a collection of small Python functions and classes which
12348 make common patterns shorter and easier.")
12349 (license license:bsd-2)))
12351 (define-public python2-utils
12352 (package-with-python2 python-utils))
12354 (define-public python-diff-match-patch
12356 (name "python-diff-match-patch")
12357 (version "20121119")
12361 (uri (pypi-uri "diff-match-patch" version))
12364 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12365 (build-system python-build-system)
12366 (home-page "https://code.google.com/p/google-diff-match-patch")
12367 (synopsis "Synchronize plain text")
12368 (description "Diff Match and Patch libraries offer robust algorithms to
12369 perform the operations required for synchronizing plain text.")
12370 (license license:asl2.0)))
12372 (define-public python2-diff-match-patch
12373 (package-with-python2 python-diff-match-patch))
12375 (define-public python-dirsync
12377 (name "python-dirsync")
12382 (uri (pypi-uri "dirsync" version))
12385 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12386 (build-system python-build-system)
12388 `(("six" ,python-six)))
12389 (home-page "https://bitbucket.org/tkhyn/dirsync")
12390 (synopsis "Advanced directory tree synchronisation tool")
12391 (description "Advanced directory tree synchronisation tool.")
12392 (license license:expat)))
12394 (define-public python2-dirsync
12395 (package-with-python2 python-dirsync))
12397 (define-public python-levenshtein
12399 (name "python-levenshtein")
12404 (uri (pypi-uri "python-Levenshtein" version))
12407 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12408 (build-system python-build-system)
12409 (home-page "https://github.com/ztane/python-Levenshtein")
12410 (synopsis "Fast computation of Levenshtein distance and string similarity")
12412 "The Levenshtein Python C extension module contains functions for fast computation of
12414 @item Levenshtein (edit) distance, and edit operations
12415 @item string similarity
12416 @item approximate median strings, and generally string averaging
12417 @item string sequence and set similarity
12419 It supports both normal and Unicode strings.")
12420 (license license:gpl2+)))
12422 (define-public python2-levenshtein
12423 (package-with-python2 python-levenshtein))
12425 (define-public python-scandir
12427 (name "python-scandir")
12432 (uri (pypi-uri "scandir" version))
12434 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12435 (build-system python-build-system)
12437 `(#:phases (modify-phases %standard-phases
12440 (invoke "python" "test/run_tests.py"))))))
12441 (home-page "https://github.com/benhoyt/scandir")
12442 (synopsis "Directory iteration function")
12444 "Directory iteration function like os.listdir(), except that instead of
12445 returning a list of bare filenames, it yields DirEntry objects that include
12446 file type and stat information along with the name. Using scandir() increases
12447 the speed of os.walk() by 2-20 times (depending on the platform and file
12448 system) by avoiding unnecessary calls to os.stat() in most cases.
12450 This package is part of the Python standard library since version 3.5.")
12451 (license license:bsd-3)))
12453 (define-public python2-scandir
12454 (package-with-python2 python-scandir))
12456 (define-public python2-stemming
12458 (name "python2-stemming")
12463 (uri (pypi-uri "stemming" version))
12465 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12466 (build-system python-build-system)
12468 `(#:python ,python-2))
12469 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12470 (synopsis "Python implementations of various stemming algorithms")
12472 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12473 stemming algorithms for English. These implementations are straightforward and
12474 efficient, unlike some Python versions of the same algorithms available on the
12475 Web. This package is an extraction of the stemming code included in the Whoosh
12477 (license license:public-domain)))
12479 (define-public python-factory-boy
12481 (name "python-factory-boy")
12486 (uri (pypi-uri "factory_boy" version))
12488 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12489 (build-system python-build-system)
12491 ;; Tests are not included in the tarball.
12494 `(("faker" ,python-faker)))
12495 (home-page "https://github.com/benhoyt/scandir")
12496 (synopsis "Versatile test fixtures replacement")
12498 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12500 As a fixtures replacement tool, it aims to replace static, hard to maintain
12501 fixtures with easy-to-use factories for complex object.
12503 Instead of building an exhaustive test setup with every possible combination
12504 of corner cases, factory_boy allows you to use objects customized for the
12505 current test, while only declaring the test-specific fields")
12506 (license license:expat)))
12508 (define-public python2-factory-boy
12509 (package-with-python2 python-factory-boy))
12511 (define-public python-translate-toolkit
12513 (name "python-translate-toolkit")
12518 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12520 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12521 (build-system python-build-system)
12523 `(("python-pytest" ,python-pytest)
12524 ("python-sphinx" ,python-sphinx)))
12526 `(("python-babel" ,python-babel)
12527 ("python-beautifulsoup4" ,python-beautifulsoup4)
12528 ("python-chardet" ,python-chardet)
12529 ("python-diff-match-patch" ,python-diff-match-patch)
12530 ("python-levenshtein" ,python-levenshtein)
12531 ("python-lxml" ,python-lxml)
12532 ("python-six" ,python-six)
12533 ("python-vobject" ,python-vobject)
12534 ("python-pyyaml" ,python-pyyaml)))
12536 ;; TODO: tests are not run, because they end with
12537 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12539 ;; during test setup.
12541 (home-page "https://toolkit.translatehouse.org")
12542 (synopsis "Tools and API for translation and localization engineering")
12544 "Tools and API for translation and localization engineering. It contains
12545 several utilities, as well as an API for building localization tools.")
12546 (license license:gpl2+)))
12548 (define-public python2-translate-toolkit
12549 (package-with-python2 python-translate-toolkit))
12551 (define-public python-packaging
12553 (name "python-packaging")
12558 (uri (pypi-uri "packaging" version))
12561 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12562 (build-system python-build-system)
12564 `(#:phases (modify-phases %standard-phases
12566 (lambda _ (invoke "py.test" "-vv"))))))
12568 `(("python-pretend" ,python-pretend)
12569 ("python-pytest" ,python-pytest)))
12571 `(("python-pyparsing" ,python-pyparsing)
12572 ("python-six" ,python-six)))
12573 (home-page "https://github.com/pypa/packaging")
12574 (synopsis "Core utilities for Python packages")
12575 (description "Packaging is a Python module for dealing with Python packages.
12576 It offers an interface for working with package versions, names, and dependency
12578 ;; From 'LICENSE': This software is made available under the terms of
12579 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12580 ;; Contributions to this software is made under the terms of *both* these
12582 (license (list license:asl2.0 license:bsd-2))))
12584 (define-public python2-packaging
12585 (package-with-python2 python-packaging))
12587 (define-public python-relatorio
12589 (name "python-relatorio")
12594 (uri (pypi-uri "relatorio" version))
12597 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12598 (build-system python-build-system)
12600 `(("python-lxml" ,python-lxml)
12601 ("python-genshi" ,python-genshi)))
12603 `(("python-magic" ,python-magic)))
12604 (home-page "https://relatorio.tryton.org/")
12605 (synopsis "Templating library able to output ODT and PDF files")
12606 (description "Relatorio is a templating library which provides a way to
12607 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12608 for more filetypes can be easily added by creating plugins for them.")
12609 (license license:gpl3+)))
12611 (define-public python2-relatorio
12612 (package-with-python2 python-relatorio))
12614 (define-public python-radon
12616 (name "python-radon")
12621 (uri (pypi-uri "radon" version))
12624 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12625 (build-system python-build-system)
12627 `(#:phases (modify-phases %standard-phases
12630 (invoke "python" "radon/tests/run.py"))))))
12632 `(("python-colorama" ,python-colorama)
12633 ("python-flake8-polyfill" ,python-flake8-polyfill)
12634 ("python-mando" ,python-mando)))
12636 `(("python-pytest" ,python-pytest)
12637 ("python-pytest-mock" ,python-pytest-mock)))
12638 (home-page "https://radon.readthedocs.org/")
12639 (synopsis "Code Metrics in Python")
12640 (description "Radon is a Python tool which computes various code metrics.
12641 Supported metrics are:
12643 @item raw metrics: SLOC, comment lines, blank lines, &c.
12644 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12645 @item Halstead metrics (all of them)
12646 @item the Maintainability Index (a Visual Studio metric)
12648 (license license:expat)))
12650 (define-public python2-radon
12651 (package-with-python2 python-radon))
12653 (define-public python-sure
12655 (name "python-sure")
12660 (uri (pypi-uri "sure" version))
12663 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12664 (build-system python-build-system)
12666 `(("python-mock" ,python-mock)
12667 ("python-six" ,python-six)))
12669 `(("python-nose" ,python-nose)))
12670 (home-page "https://github.com/gabrielfalcao/sure")
12671 (synopsis "Automated testing library in python for python")
12673 "Sure is a python library that leverages a DSL for writing assertions.
12674 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12675 (license license:gpl3+)))
12677 (define-public python2-sure
12678 (package-with-python2 python-sure))
12680 (define-public python2-couleur
12681 ;; This package does not seem to support python3 at all, hence,
12682 ;; only the python2 variant definition is provided.
12684 (name "python2-couleur")
12689 (uri (pypi-uri "couleur" version))
12692 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12693 (build-system python-build-system)
12695 `(#:python ,python-2))
12696 (home-page "https://github.com/gabrielfalcao/couleur")
12698 "ANSI terminal tool for python, colored shell and other handy fancy features")
12700 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12701 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12702 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12703 ;; https://github.com/gabrielfalcao/couleur/issues/11
12704 (license license:lgpl3+)))
12706 (define-public python-misaka
12708 (name "python-misaka")
12713 (uri (pypi-uri "misaka" version))
12716 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12717 (build-system python-build-system)
12719 `(;; Line 37 of setup.py calls self.run_command('develop')
12720 ;; in the 'check' phase. This command seems to be trying
12722 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12723 ;; for which it does not have the permission to write.
12726 `(("python-cffi" ,python-cffi)))
12727 (home-page "https://github.com/FSX/misaka")
12728 (synopsis "Python binding for Hoedown")
12730 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12731 library written in C. It features a fast HTML renderer and functionality to make custom
12732 renderers (e.g. man pages or LaTeX).")
12733 (license license:expat)))
12735 (define-public python2-misaka
12736 (package-with-python2 python-misaka))
12738 (define-public python2-steadymark
12739 ;; This is forced into being a python2 only variant
12740 ;; due to its dependence on couleur that has no support
12743 (name "python2-steadymark")
12748 (uri (pypi-uri "steadymark" version))
12751 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12752 (build-system python-build-system)
12754 `(("python-couleur" ,python2-couleur)
12755 ("python-sure" ,python2-sure)
12756 ("python-misaka" ,python2-misaka)))
12758 `(#:python ,python-2
12760 (modify-phases %standard-phases
12761 (add-before 'build 'patch-setup-py
12763 ;; Update requirements from dependency==version
12764 ;; to dependency>=version
12765 (substitute* "setup.py"
12768 (home-page "https://github.com/gabrielfalcao/steadymark")
12769 (synopsis "Markdown-based test runner for python")
12771 "@code{Steadymark} allows documentation to be written in github-flavoured
12772 markdown. The documentation may contain snippets of code surrounded by python
12773 code blocks and @code{Steadymark} will find these snippets and run them, making
12774 sure that there are no old malfunctional examples in the documentation examples.")
12775 (license license:expat)))
12777 (define-public python-jsonpointer
12779 (name "python-jsonpointer")
12784 (uri (pypi-uri "jsonpointer" version))
12787 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12788 (build-system python-build-system)
12789 (home-page "https://github.com/stefankoegl/python-json-pointer")
12790 (synopsis "Identify specific nodes in a JSON document")
12791 (description "@code{jsonpointer} allows you to access specific nodes
12792 by path in a JSON document (see RFC 6901).")
12793 (license license:bsd-3)))
12795 (define-public python2-jsonpointer
12796 (package-with-python2 python-jsonpointer))
12798 (define-public python-jsonpatch
12800 (name "python-jsonpatch")
12805 ;; pypi version lacks tests.js
12806 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12807 "archive/v" version ".tar.gz"))
12808 (file-name (string-append name "-" version ".tar.gz"))
12811 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12812 (build-system python-build-system)
12814 `(("python-jsonpointer" ,python-jsonpointer)))
12815 (home-page "https://github.com/stefankoegl/python-json-patch")
12816 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12817 (description "@code{jsonpatch} is a library and program that allows
12818 applying JSON Patches according to RFC 6902.")
12819 (license license:bsd-3)))
12821 (define-public python2-jsonpatch
12822 (package-with-python2 python-jsonpatch))
12824 (define-public python-jsonpatch-0.4
12825 (package (inherit python-jsonpatch)
12826 (name "python-jsonpatch")
12831 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12832 "archive/v" version ".tar.gz"))
12833 (file-name (string-append name "-" version ".tar.gz"))
12836 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12838 (define-public python2-jsonpatch-0.4
12839 (package-with-python2 python-jsonpatch-0.4))
12841 (define-public python-rfc3986
12843 (name "python-rfc3986")
12847 (uri (pypi-uri "rfc3986" version))
12850 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12851 (build-system python-build-system)
12853 `(#:modules ((guix build utils)
12854 (guix build python-build-system)
12859 (modify-phases %standard-phases
12862 (let ((cwd (getcwd)))
12863 (setenv "PYTHONPATH"
12864 (string-append cwd "/build/"
12865 (find (cut string-prefix? "lib" <>)
12866 (scandir (string-append cwd "/build")))
12868 (getenv "PYTHONPATH")))
12869 (invoke "pytest" "-v")))))))
12871 `(("python-pytest" ,python-pytest)))
12872 (home-page "https://rfc3986.readthedocs.io/")
12873 (synopsis "Parse and validate URI references")
12875 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12876 validation and authority parsing. This module also supports RFC@tie{}6874
12877 which adds support for zone identifiers to IPv6 addresses.")
12878 (license license:asl2.0)))
12880 (define-public python2-rfc3986
12881 (package-with-python2 python-rfc3986))
12883 (define-public python-rfc3987
12885 (name "python-rfc3987")
12890 (uri (pypi-uri "rfc3987" version))
12893 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12894 (build-system python-build-system)
12895 (home-page "https://pypi.python.org/pypi/rfc3987")
12896 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12897 (description "@code{rfc3987} provides routines for parsing and
12898 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12899 (license license:gpl3+)))
12901 (define-public python2-rfc3987
12902 (package-with-python2 python-rfc3987))
12904 (define-public python-validate-email
12906 (name "python-validate-email")
12911 (uri (pypi-uri "validate_email" version))
12914 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12915 (build-system python-build-system)
12916 (home-page "https://github.com/syrusakbary/validate_email")
12917 (synopsis "Verifies if an email address is valid and really exists")
12918 (description "@code{validate_email} can be used to verify if an email
12919 address is valid and really exists.")
12920 (license license:lgpl3+)))
12922 (define-public python2-validate-email
12923 (package-with-python2 python-validate-email))
12925 (define-public python-flex
12927 (name "python-flex")
12932 (uri (pypi-uri "flex" version))
12935 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12936 (build-system python-build-system)
12938 `(("python-click" ,python-click)
12939 ("python-iso8601" ,python-iso8601)
12940 ("python-jsonpointer" ,python-jsonpointer)
12941 ("python-pyyaml" ,python-pyyaml)
12942 ("python-requests" ,python-requests)
12943 ("python-rfc3987" ,python-rfc3987)
12944 ("python-six" ,python-six)
12945 ("python-validate-email" ,python-validate-email)))
12946 (home-page "https://github.com/pipermerriam/flex")
12947 (synopsis "Validates Swagger schemata")
12948 (description "@code{flex} can be used to validate Swagger schemata.")
12949 (license license:bsd-3)))
12951 (define-public python2-flex
12952 (package-with-python2 python-flex))
12954 (define-public python-marshmallow
12956 (name "python-marshmallow")
12957 (version "3.0.0b14")
12961 (uri (pypi-uri "marshmallow" version))
12964 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12965 (build-system python-build-system)
12967 `(("python-dateutil" ,python-dateutil)
12968 ("python-simplejson" ,python-simplejson)))
12970 `(("python-pytest" ,python-pytest)
12971 ("python-pytz" ,python-pytz)))
12972 (home-page "https://github.com/marshmallow-code/marshmallow")
12973 (synopsis "Convert complex datatypes to and from native
12974 Python datatypes.")
12975 (description "@code{marshmallow} provides a library for converting
12976 complex datatypes to and from native Python datatypes.")
12977 (license license:expat)))
12979 (define-public python2-marshmallow
12980 (package-with-python2 python-marshmallow))
12982 (define-public python-apispec
12984 (name "python-apispec")
12989 (uri (pypi-uri "apispec" version))
12992 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12993 (build-system python-build-system)
12995 `(("python-pyyaml" ,python-pyyaml)))
12997 `(("python-pytest" ,python-pytest)
12998 ("python-flask" ,python-flask)
12999 ("python-marshmallow" ,python-marshmallow)
13000 ("python-tornado" ,python-tornado)
13001 ("python-bottle" ,python-bottle)
13002 ("python-mock" ,python-mock)))
13003 (home-page "https://github.com/marshmallow-code/apispec")
13004 (synopsis "Swagger 2.0 API specification generator")
13005 (description "@code{python-apispec} is a pluggable API specification
13006 generator. Currently supports the OpenAPI specification (f.k.a.
13008 (license license:expat)))
13010 (define-public python2-apispec
13011 (package-with-python2 python-apispec))
13013 (define-public python-flasgger
13015 (name "python-flasgger")
13020 (uri (git-reference
13021 (url "https://github.com/rochacbruno/flasgger.git")
13023 (file-name (git-file-name name version))
13025 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13026 (build-system python-build-system)
13029 (modify-phases %standard-phases
13031 (lambda* (#:key inputs outputs #:allow-other-keys)
13032 (substitute* "Makefile"
13033 (("flake8 flasgger --ignore=F403")
13034 "flake8 flasgger --ignore=E731,F403"))
13035 (setenv "PYTHONPATH" (string-append (getcwd)
13037 (getenv "PYTHONPATH")))
13038 (invoke "py.test"))))))
13040 `(("python-flask" ,python-flask)
13041 ("python-pyyaml" ,python-pyyaml)
13042 ("python-jsonschema" ,python-jsonschema)
13043 ("python-mistune" ,python-mistune)
13044 ("python-six" ,python-six)))
13046 `(("python-decorator" ,python-decorator)
13047 ("python-flake8" ,python-flake8)
13048 ("python-flask-restful" ,python-flask-restful)
13049 ("python-flex" ,python-flex)
13050 ("python-pytest" ,python-pytest)
13051 ("python-pytest-cov" ,python-pytest-cov)
13052 ("python-marshmallow" ,python-marshmallow)
13053 ("python-apispec" ,python-apispec)))
13054 (home-page "https://github.com/rochacbruno/flasgger/")
13055 (synopsis "Extract Swagger specs from your Flask project")
13056 (description "@code{python-flasgger} allows extracting Swagger specs
13057 from your Flask project. It is a fork of Flask-Swagger.")
13058 (license license:expat)))
13060 (define-public python2-flasgger
13061 (package-with-python2 python-flasgger))
13063 (define-public python-swagger-spec-validator
13065 (name "python-swagger-spec-validator")
13070 (uri (pypi-uri "swagger-spec-validator" version))
13073 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13074 (build-system python-build-system)
13076 `(("python-jsonschema" ,python-jsonschema)
13077 ("python-six" ,python-six)))
13079 "https://github.com/Yelp/swagger_spec_validator")
13080 (synopsis "Validation of Swagger specifications")
13081 (description "@code{swagger_spec_validator} provides a library for
13082 validating Swagger API specifications.")
13083 (license license:asl2.0)))
13085 (define-public python2-swagger-spec-validator
13086 (package-with-python2 python-swagger-spec-validator))
13088 (define-public python-apache-libcloud
13090 (name "python-apache-libcloud")
13095 (uri (pypi-uri "apache-libcloud" version))
13098 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13099 (build-system python-build-system)
13102 (modify-phases %standard-phases
13103 (add-after 'unpack 'patch-ssh
13104 (lambda* (#:key inputs #:allow-other-keys)
13105 (substitute* "libcloud/compute/ssh.py"
13106 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13109 (add-after 'unpack 'patch-tests
13111 (substitute* "./libcloud/test/test_file_fixtures.py"
13112 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13113 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13114 return (httplib.OK,
13116 {\"test\": \"value\"},
13117 httplib.responses[httplib.OK])
13119 (substitute* "libcloud/test/compute/test_ssh_client.py"
13120 (("class ShellOutSSHClientTests")
13121 "@unittest.skip(\"Guix container doesn't have ssh service\")
13122 class ShellOutSSHClientTests")
13123 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13124 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13125 (("'.xF0', '.x90', '.x8D', '.x88'")
13126 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13128 (add-before 'check 'copy-secret
13130 (copy-file "libcloud/test/secrets.py-dist"
13131 "libcloud/test/secrets.py")
13134 `(("openssh" ,openssh)))
13136 `(("python-paramiko" ,python-paramiko)
13137 ("python-requests" ,python-requests)))
13139 `(("python-lockfile" ,python-lockfile)
13140 ("python-mock" ,python-mock)
13141 ("python-pytest" ,python-pytest)
13142 ("python-pytest-runner" ,python-pytest-runner)
13143 ("python-requests-mock" ,python-requests-mock)))
13144 (home-page "https://libcloud.apache.org/")
13145 (synopsis "Unified Cloud API")
13146 (description "@code{libcloud} is a Python library for interacting with
13147 many of the popular cloud service providers using a unified API.")
13148 (license license:asl2.0)))
13150 (define-public python2-apache-libcloud
13151 (package-with-python2 python-apache-libcloud))
13153 (define-public python-smmap2
13155 (name "python-smmap2")
13160 (uri (pypi-uri "smmap2" version))
13163 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13164 (build-system python-build-system)
13166 `(("python-nosexcover" ,python-nosexcover)))
13167 (home-page "https://github.com/Byron/smmap")
13168 (synopsis "Python sliding window memory map manager")
13169 (description "@code{smmap2} is a pure Python implementation of a sliding
13170 window memory map manager.")
13171 (license license:bsd-3)))
13173 (define-public python2-smmap2
13174 (package-with-python2 python-smmap2))
13176 (define-public python-regex
13178 (name "python-regex")
13179 (version "2019.04.14")
13182 (uri (pypi-uri "regex" version))
13185 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13186 ;; TODO: Fix and enable regex_test.py tests that complain about the
13187 ;; test.support module not existing.
13188 (build-system python-build-system)
13189 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13190 (synopsis "Alternative regular expression module")
13191 (description "This regular expression implementation is backwards-
13192 compatible with the standard @code{re} module, but offers additional
13193 functionality like full case-folding for case-insensitive matches in Unicode.")
13194 (license license:psfl)))
13196 (define-public python2-regex
13197 (package-with-python2 python-regex))
13199 (define-public python2-pyopengl
13201 (name "python2-pyopengl")
13206 (uri (pypi-uri "PyOpenGL" version))
13209 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13211 `(#:python ,python-2))
13212 (build-system python-build-system)
13213 (home-page "http://pyopengl.sourceforge.net")
13214 (synopsis "Standard OpenGL bindings for Python")
13216 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13217 related APIs. The binding is created using the standard @code{ctypes}
13219 (license license:bsd-3)))
13221 (define-public python2-pyopengl-accelerate
13223 (inherit python2-pyopengl)
13224 (name "python2-pyopengl-accelerate")
13229 (uri (pypi-uri "PyOpenGL-accelerate" version))
13232 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13233 (synopsis "Acceleration code for PyOpenGL")
13235 "This is the Cython-coded accelerator module for PyOpenGL.")))
13237 (define-public python-rencode
13239 (name "python-rencode")
13244 (uri (pypi-uri "rencode" version))
13247 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13248 (build-system python-build-system)
13251 (modify-phases %standard-phases
13252 (add-before 'check 'delete-bogus-test
13253 ;; This test requires /home/aresch/Downloads, which is not provided by
13254 ;; the build environment.
13256 (delete-file "rencode/t.py")
13258 (native-inputs `(("pkg-config" ,pkg-config)
13259 ("python-cython" ,python-cython)))
13260 (home-page "https://github.com/aresch/rencode")
13261 (synopsis "Serialization of heterogeneous data structures")
13263 "The @code{rencode} module is a data structure serialization library,
13264 similar to @code{bencode} from the BitTorrent project. For complex,
13265 heterogeneous data structures with many small elements, r-encoding stake up
13266 significantly less space than b-encodings. This version of rencode is a
13267 complete rewrite in Cython to attempt to increase the performance over the
13268 pure Python module.")
13269 (license license:bsd-3)))
13271 (define-public python2-rencode
13272 (package-with-python2 python-rencode))
13274 (define-public python-xenon
13276 (name "python-xenon")
13281 (uri (pypi-uri "xenon" version))
13284 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13285 (build-system python-build-system)
13287 `(("python-pyyaml" ,python-pyyaml)
13288 ("python-radon" ,python-radon)
13289 ("python-requests" ,python-requests)
13290 ("python-flake8" ,python-flake8)
13291 ("python-tox" ,python-tox)))
13294 (modify-phases %standard-phases
13295 (add-before 'build 'patch-test-requirements
13297 ;; Remove httpretty dependency for tests.
13298 (substitute* "setup.py"
13299 (("httpretty") ""))
13301 (home-page "https://xenon.readthedocs.org/")
13302 (synopsis "Monitor code metrics for Python on your CI server")
13304 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13305 Ideally, @code{xenon} is run every time code is committed. Through command
13306 line options, various thresholds can be set for the complexity of code. It
13307 will fail (i.e. it will exit with a non-zero exit code) when any of these
13308 requirements is not met.")
13309 (license license:expat)))
13311 (define-public python2-xenon
13312 (package-with-python2 python-xenon))
13314 (define-public python-pysocks
13316 (name "python-pysocks")
13321 (uri (pypi-uri "PySocks" version))
13324 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13325 (build-system python-build-system)
13326 (arguments `(#:tests? #f))
13327 (home-page "https://github.com/Anorov/PySocks")
13328 (synopsis "SOCKS client module")
13329 (description "@code{pysocks} is an updated and semi-actively maintained
13330 version of @code{SocksiPy} with bug fixes and extra features.")
13331 (license license:bsd-3)))
13333 (define-public python2-pysocks
13334 (package-with-python2 python-pysocks))
13336 (define-public python-pydiff
13338 (name "python-pydiff")
13343 (uri (pypi-uri "pydiff" version))
13346 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13347 (build-system python-build-system)
13348 (home-page "https://github.com/myint/pydiff")
13349 (synopsis "Library to diff two Python files at the bytecode level")
13351 "@code{pydiff} makes it easy to look for actual code changes while
13352 ignoring formatting changes.")
13353 (license license:expat)))
13355 (define-public python2-pydiff
13356 (package-with-python2 python-pydiff))
13358 (define-public python-tqdm
13360 (name "python-tqdm")
13365 (uri (pypi-uri "tqdm" version))
13368 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13369 (build-system python-build-system)
13371 `(("python-flake8" ,python-flake8)
13372 ("python-nose" ,python-nose)
13373 ("python-coverage" ,python-coverage)))
13374 (home-page "https://github.com/tqdm/tqdm")
13375 (synopsis "Fast, extensible progress meter")
13377 "Make loops show a progress bar on the console by just wrapping any
13378 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13379 design and layout.")
13380 (license (list license:mpl2.0 license:expat))))
13382 (define-public python2-tqdm
13383 (package-with-python2 python-tqdm))
13385 (define-public python-pkginfo
13387 (name "python-pkginfo")
13392 (uri (pypi-uri "pkginfo" version))
13395 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13396 (build-system python-build-system)
13398 ;; The tests are broken upstream.
13401 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13403 "Query metadatdata from sdists, bdists, and installed packages")
13405 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13406 source distriubtion (an sdist) or a binary distribution (e.g., created by
13407 running bdist_egg). It can also query the EGG-INFO directory of an installed
13408 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13409 created by running @code{python setup.py develop}).")
13410 (license license:expat)))
13412 (define-public python2-pkginfo
13413 (package-with-python2 python-pkginfo))
13415 (define-public python-twine
13417 (name "python-twine")
13422 (uri (pypi-uri "twine" version))
13425 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13426 (build-system python-build-system)
13428 `(("python-tqdm" ,python-tqdm)
13429 ("python-pkginfo" ,python-pkginfo)
13430 ("python-requests" ,python-requests)
13431 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13432 (home-page "https://github.com/pypa/twine")
13433 (synopsis "Collection of utilities for interacting with PyPI")
13435 "@code{twine} currently supports registering projects and uploading
13436 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13437 their files and supports any packaging format (including wheels).")
13438 (license license:asl2.0)))
13440 (define-public python2-twine
13441 (package-with-python2 python-twine))
13443 (define-public python-linecache2
13445 (name "python-linecache2")
13450 (uri (pypi-uri "linecache2" version))
13453 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13454 (build-system python-build-system)
13456 `(;; The tests depend on unittest2, and our version is a bit too old.
13459 `(("python-pbr" ,python-pbr-minimal)))
13461 "https://github.com/testing-cabal/linecache2")
13462 (synopsis "Backports of the linecache module")
13464 "The linecache module allows one to get any line from any file, while
13465 attempting to optimize internally, using a cache, the common case where many
13466 lines are read from a single file.")
13467 (license license:psfl)))
13469 (define-public python2-linecache2
13470 (package-with-python2 python-linecache2))
13472 (define-public python-traceback2
13474 (name "python-traceback2")
13479 (uri (pypi-uri "traceback2" version))
13482 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13483 (build-system python-build-system)
13485 `(;; python-traceback2 and python-unittest2 depend on one another.
13488 `(("python-pbr" ,python-pbr-minimal)))
13490 `(("python-linecache2" ,python-linecache2)))
13492 "https://github.com/testing-cabal/traceback2")
13493 (synopsis "Backports of the traceback module")
13495 "This module provides a standard interface to extract, format and print
13496 stack traces of Python programs. It exactly mimics the behavior of the Python
13497 interpreter when it prints a stack trace.")
13498 (license license:psfl)))
13500 (define-public python2-traceback2
13501 (package-with-python2 python-traceback2))
13503 (define-public python-ratelimiter
13505 (name "python-ratelimiter")
13510 (uri (pypi-uri "ratelimiter" version))
13513 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13514 (build-system python-build-system)
13516 '(#:tests? #f)) ; There are no tests in the pypi archive.
13517 (home-page "https://github.com/RazerM/ratelimiter")
13518 (synopsis "Simple rate limiting object")
13520 "The @code{ratelimiter} module ensures that an operation will not be
13521 executed more than a given number of times during a given period.")
13522 (license license:asl2.0)))
13524 (define-public python2-ratelimiter
13525 (package-with-python2 python-ratelimiter))
13527 (define-public python-dukpy
13529 (name "python-dukpy")
13534 (uri (git-reference
13535 (url "https://github.com/kovidgoyal/dukpy.git")
13536 (commit (string-append "v" version))))
13537 (file-name (git-file-name name version))
13539 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13540 (build-system python-build-system)
13541 (home-page "https://github.com/kovidgoyal/dukpy")
13542 (synopsis "Run JavaScript in python")
13544 "dukpy is a JavaScript runtime environment for Python using the duktape
13545 embeddable JavaScript engine.")
13546 ;; Dukpy is licensed under MIT like the embedded duktape library,
13547 ;; with 'errors.c' as GPL3.
13548 (license (list license:expat license:gpl3))))
13550 (define-public python2-dukpy
13551 (package-with-python2 python-dukpy))
13553 (define-public python-jsonrpclib-pelix
13555 (name "python-jsonrpclib-pelix")
13560 (uri (pypi-uri "jsonrpclib-pelix" version))
13563 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13564 (build-system python-build-system)
13566 `(#:tests? #f)) ; no tests in PyPI tarball
13567 (home-page "https://github.com/tcalmant/jsonrpclib/")
13568 (synopsis "JSON-RPC 2.0 client library for Python")
13570 "This library implements the JSON-RPC v2.0
13571 specification (backwards-compatible) as a client library for Python. This
13572 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13574 (license license:asl2.0)))
13576 (define-public python2-jsonrpclib-pelix
13577 (package-with-python2 python-jsonrpclib-pelix))
13579 (define-public python-setuptools-scm-git-archive
13581 (name "python-setuptools-scm-git-archive")
13586 (uri (pypi-uri "setuptools_scm_git_archive" version))
13589 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13590 (build-system python-build-system)
13592 `(("python-pytest" ,python-pytest)))
13594 `(("python-setuptools-scm" ,python-setuptools-scm)))
13595 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13596 (synopsis "Setuptools_scm plugin for git archives")
13598 "The setuptools_scm_git_archive package is a plugin to
13599 setuptools_scm, which supports obtaining versions from git archives that
13600 belong to tagged versions.")
13601 (license license:expat)))
13603 (define-public python2-setuptools-scm-git-archive
13604 (package-with-python2 python-setuptools-scm-git-archive))
13606 (define-public python-setuptools-git
13608 (name "python-setuptools-git")
13613 (uri (pypi-uri "setuptools-git" version))
13616 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13617 (build-system python-build-system)
13620 (modify-phases %standard-phases
13621 ;; This is needed for tests.
13622 (add-after 'unpack 'configure-git
13624 (setenv "HOME" "/tmp")
13625 (invoke "git" "config" "--global" "user.email" "guix")
13626 (invoke "git" "config" "--global" "user.name" "guix")
13629 `(("git" ,git-minimal)))
13630 (home-page "https://github.com/msabramo/setuptools-git")
13631 (synopsis "Setuptools revision control system plugin for Git")
13633 "This package provides a plugin for Setuptools for revision control with
13635 (license license:bsd-3)))
13637 (define-public python-pyclipper
13639 (name "python-pyclipper")
13640 (version "1.1.0.post1")
13644 (uri (pypi-uri "pyclipper" version ".zip"))
13647 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13648 (modules '((guix build utils)))
13651 ;; This file is generated by Cython.
13652 (delete-file "pyclipper/pyclipper.cpp") #t))))
13653 (build-system python-build-system)
13656 (modify-phases %standard-phases
13657 (add-before 'build 'cythonize-sources
13659 (with-directory-excursion "pyclipper"
13660 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13662 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13664 `(("python-cython" ,python-cython)
13665 ("python-pytest" ,python-pytest)
13666 ("python-pytest-runner" ,python-pytest-runner)
13667 ("python-unittest2" ,python-unittest2)
13669 (home-page "https://github.com/greginvm/pyclipper")
13670 (synopsis "Wrapper for Angus Johnson's Clipper library")
13672 "Pyclipper is a Cython wrapper for the C++ translation of the
13673 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13674 (license license:expat)))
13676 (define-public python2-pyclipper
13677 (package-with-python2 python-pyclipper))
13679 (define-public python2-booleanoperations
13681 (name "python2-booleanoperations")
13686 (uri (pypi-uri "booleanOperations" version ".zip"))
13689 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13690 (build-system python-build-system)
13692 `(#:python ,python-2))
13695 ("python2-pytest" ,python2-pytest)
13696 ("python2-pytest-runner" ,python2-pytest-runner)))
13698 `(("python-fonttools" ,python2-fonttools)
13699 ("python-pyclipper" ,python2-pyclipper)
13700 ("python-ufolib" ,python2-ufolib)))
13701 (home-page "https://github.com/typemytype/booleanOperations")
13702 (synopsis "Boolean operations on paths")
13704 "BooleanOperations provides a Python library that enables
13705 boolean operations on paths.")
13706 (license license:expat)))
13708 (define-public python-tempdir
13710 (name "python-tempdir")
13715 (uri (pypi-uri "tempdir" version))
13718 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13719 (build-system python-build-system)
13720 (home-page "https://pypi.org/project/tempdir/")
13722 ;; the package has no tests
13724 (synopsis "Python library for managing temporary directories")
13726 "This library manages temporary directories that are automatically
13727 deleted with all their contents when they are no longer needed. It is
13728 particularly convenient for use in tests.")
13729 (license license:expat)))
13731 (define-public python2-tempdir
13732 (package-with-python2 python-tempdir))
13734 (define-public python-activepapers
13736 (name "python-activepapers")
13741 (uri (pypi-uri "ActivePapers.Py" version))
13744 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13745 (build-system python-build-system)
13747 `(#:modules ((ice-9 ftw)
13750 (guix build python-build-system))
13753 (modify-phases %standard-phases
13754 (add-after 'unpack 'delete-python2-code
13756 (for-each delete-file
13757 '("lib/activepapers/builtins2.py"
13758 "lib/activepapers/standardlib2.py"
13759 "lib/activepapers/utility2.py"))))
13762 ;; Deactivate the test cases that download files
13763 (setenv "NO_NETWORK_ACCESS" "1")
13764 ;; For some strange reason, some tests fail if nosetests runs all
13765 ;; test modules in a single execution. They pass if each test
13766 ;; module is run individually.
13767 (for-each (lambda (filename)
13768 (invoke "nosetests"
13769 (string-append "tests/" filename)))
13772 (string-suffix? ".py" filename)))))))))
13774 `(("python-tempdir" ,python-tempdir)
13775 ("python-nose" ,python-nose)))
13777 `(("python-h5py" ,python-h5py)))
13778 (home-page "http://www.activepapers.org/")
13779 (synopsis "Executable papers for scientific computing")
13781 "ActivePapers is a tool for working with executable papers, which
13782 combine data, code, and documentation in single-file packages,
13783 suitable for publication as supplementary material or on repositories
13784 such as figshare or Zenodo.")
13785 (properties `((python2-variant . ,(delay python2-activepapers))))
13786 (license license:bsd-3)))
13788 (define-public python2-activepapers
13789 (let ((base (package-with-python2
13790 (strip-python2-variant python-activepapers))))
13794 (substitute-keyword-arguments (package-arguments base)
13796 `(modify-phases ,phases
13797 (delete 'delete-python2-code)
13798 (add-after 'unpack 'delete-python3-code
13800 (for-each delete-file
13801 '("lib/activepapers/builtins3.py"
13802 "lib/activepapers/standardlib3.py"
13803 "lib/activepapers/utility3.py")))))))))))
13805 (define-public python-semver
13807 (name "python-semver")
13812 (uri (pypi-uri "semver" version))
13815 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13816 (build-system python-build-system)
13819 (modify-phases %standard-phases
13820 (add-after 'unpack 'patch-test-requirements
13822 (substitute* "setup.py"
13823 ;; Our Python is new enough.
13824 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13827 `(("python-tox" ,python-tox)
13828 ("python-virtualenv" ,python-virtualenv)))
13829 (home-page "https://github.com/k-bx/python-semver")
13830 (synopsis "Python helper for Semantic Versioning")
13831 (description "This package provides a Python library for
13832 @url{Semantic Versioning, http://semver.org/}.")
13833 (license license:bsd-3)))
13835 (define-public python2-semver
13836 (package-with-python2 python-semver))
13838 (define-public python-pyro4
13840 (name "python-pyro4")
13845 (uri (pypi-uri "Pyro4" version))
13847 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13848 (build-system python-build-system)
13850 `(("python-serpent" ,python-serpent)))
13851 (home-page "https://pyro4.readthedocs.io")
13852 (synopsis "Distributed object middleware for Python")
13854 "Pyro enables you to build applications in which objects can talk to each
13855 other over the network. You can just use normal Python method calls to call
13856 objects on other machines, also known as remote procedure calls (RPC).")
13857 (license license:expat)))
13859 (define-public python2-pyro
13861 (name "python2-pyro")
13866 (uri (pypi-uri "Pyro" version))
13867 (file-name (string-append "Pyro-" version ".tar.gz"))
13870 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13871 (build-system python-build-system)
13873 ;; Pyro is not compatible with Python 3
13874 `(#:python ,python-2
13875 ;; Pyro has no test cases for automatic execution
13877 (home-page "http://pythonhosted.org/Pyro/")
13878 (synopsis "Distributed object manager for Python")
13879 (description "Pyro is a Distributed Object Technology system
13880 written in Python that is designed to be easy to use. It resembles
13881 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13882 which is a system and language independent Distributed Object Technology
13883 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13884 longer maintained. New projects should use Pyro4 instead, which
13885 is the new Pyro version that is actively developed.")
13886 (license license:expat)))
13888 (define-public python2-scientific
13890 (name "python2-scientific")
13895 (uri (string-append "https://bitbucket.org/khinsen/"
13896 "scientificpython/downloads/ScientificPython-"
13897 version ".tar.gz"))
13898 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13901 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13902 (build-system python-build-system)
13904 `(("netcdf" ,netcdf)))
13906 `(("python-numpy" ,python2-numpy-1.8)
13907 ("python-pyro" ,python2-pyro)))
13909 ;; ScientificPython is not compatible with Python 3
13910 `(#:python ,python-2
13911 #:tests? #f ; No test suite
13913 (modify-phases %standard-phases
13915 (lambda* (#:key inputs #:allow-other-keys)
13916 (invoke "python" "setup.py" "build"
13917 (string-append "--netcdf_prefix="
13918 (assoc-ref inputs "netcdf"))))))))
13919 (home-page "https://bitbucket.org/khinsen/scientificpython")
13920 (synopsis "Python modules for scientific computing")
13921 (description "ScientificPython is a collection of Python modules that are
13922 useful for scientific computing. Most modules are rather general (Geometry,
13923 physical units, automatic derivatives, ...) whereas others are more
13924 domain-specific (e.g. netCDF and PDB support). The library is currently
13925 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13926 (license license:cecill-c)))
13928 (define-public python2-mmtk
13930 (name "python2-mmtk")
13935 (uri (string-append "https://bitbucket.org/khinsen/"
13936 "mmtk/downloads/MMTK-" version ".tar.gz"))
13937 (file-name (string-append "MMTK-" version ".tar.gz"))
13940 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13941 (build-system python-build-system)
13943 `(("netcdf" ,netcdf)))
13945 `(("python-scientific" ,python2-scientific)
13946 ("python-tkinter" ,python-2 "tk")))
13948 `(#:python ,python-2
13951 (modify-phases %standard-phases
13952 (add-before 'build 'includes-from-scientific
13953 (lambda* (#:key inputs #:allow-other-keys)
13954 (mkdir-p "Include/Scientific")
13957 (assoc-ref inputs "python-scientific")
13958 "/include/python2.7/Scientific")
13959 "Include/Scientific"))))))
13960 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13961 (synopsis "Python library for molecular simulation")
13962 (description "MMTK is a library for molecular simulations with an emphasis
13963 on biomolecules. It provides widely used methods such as Molecular Dynamics
13964 and normal mode analysis, but also basic routines for implementing new methods
13965 for simulation and analysis. The library is currently not actively maintained
13966 and works only with Python 2 and NumPy < 1.9.")
13967 (license license:cecill-c)))
13969 (define-public python-phonenumbers
13971 (name "python-phonenumbers")
13976 (uri (pypi-uri "phonenumbers" version))
13979 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13980 (build-system python-build-system)
13982 "https://github.com/daviddrysdale/python-phonenumbers")
13984 "Python library for dealing with international phone numbers")
13986 "This package provides a Python port of Google's libphonenumber library.")
13987 (license license:asl2.0)))
13989 (define-public python2-phonenumbers
13990 (package-with-python2 python-phonenumbers))
13992 (define-public python-send2trash
13994 (name "python-send2trash")
13997 (origin (method git-fetch)
13998 ;; Source tarball on PyPI doesn't include tests.
13999 (uri (git-reference
14000 (url "https://github.com/hsoft/send2trash.git")
14002 (file-name (git-file-name name version))
14005 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14006 (build-system python-build-system)
14009 (modify-phases %standard-phases
14010 (add-before 'check 'pre-check
14012 (mkdir-p "/tmp/foo")
14013 (setenv "HOME" "/tmp/foo")
14015 (home-page "https://github.com/hsoft/send2trash")
14016 (synopsis "Send files to the user's @file{~/Trash} directory")
14017 (description "This package provides a Python library to send files to the
14018 user's @file{~/Trash} directory.")
14019 (properties `((python2-variant . ,(delay python2-send2trash))))
14020 (license license:bsd-3)))
14022 (define-public python2-send2trash
14024 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14026 (substitute-keyword-arguments (package-arguments python-send2trash)
14028 `(modify-phases ,phases
14029 (add-before 'check 'setenv
14031 (setenv "PYTHONPATH"
14032 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14035 (define-public python-yapf
14037 (name "python-yapf")
14042 (uri (pypi-uri "yapf" version))
14045 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14046 (build-system python-build-system)
14047 (home-page "https://github.com/google/yapf")
14048 (synopsis "Formatter for Python code")
14049 (description "YAPF is a formatter for Python code. It's based off of
14050 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14051 takes the code and reformats it to the best formatting that conforms to the
14052 style guide, even if the original code didn't violate the style guide.")
14053 (license license:asl2.0)))
14055 (define-public python2-yapf
14056 (package-with-python2 python-yapf))
14058 (define-public python-gyp
14059 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14062 (name "python-gyp")
14063 ;; Google does not release versions,
14064 ;; based on second most recent commit date.
14065 (version (git-version "0.0.0" revision commit))
14068 ;; Google does not release tarballs,
14069 ;; git checkout is needed.
14071 (uri (git-reference
14072 (url "https://chromium.googlesource.com/external/gyp")
14074 (file-name (git-file-name name version))
14077 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14078 (build-system python-build-system)
14079 (home-page "https://gyp.gsrc.io/")
14080 (synopsis "GYP is a Meta-Build system")
14082 "GYP builds build systems for large, cross platform applications.
14083 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14084 files, and Makefiles.")
14085 (license license:bsd-3))))
14087 (define-public python2-gyp
14088 (package-with-python2 python-gyp))
14090 (define-public python-whatever
14092 (name "python-whatever")
14097 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14101 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14102 (file-name (string-append name "-" version ".tar.gz"))))
14103 (build-system python-build-system)
14106 (modify-phases %standard-phases
14109 (invoke "py.test"))))))
14111 `(("python-pytest" ,python-pytest)))
14112 (home-page "http://github.com/Suor/whatever")
14113 (synopsis "Make anonymous functions by partial application of operators")
14114 (description "@code{whatever} provides an easy way to make anonymous
14115 functions by partial application of operators.")
14116 (license license:bsd-3)))
14118 (define-public python2-whatever
14119 (package-with-python2 python-whatever))
14121 (define-public python-funcy
14123 (name "python-funcy")
14128 (uri (git-reference
14129 (url "https://github.com/Suor/funcy.git")
14132 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14133 (file-name (git-file-name name version))))
14134 (build-system python-build-system)
14137 (modify-phases %standard-phases
14140 (invoke "py.test"))))))
14142 `(("python-pytest" ,python-pytest)
14143 ("python-whatever" ,python-whatever)))
14144 (home-page "http://github.com/Suor/funcy")
14145 (synopsis "Functional tools")
14146 (description "@code{funcy} is a library that provides functional tools.
14149 @item merge - Merges collections of the same type
14150 @item walk - Type-preserving map
14151 @item select - Selects a part of a collection
14152 @item take - Takes the first n items of a collection
14153 @item first - Takes the first item of a collection
14154 @item remove - Predicated-removes items of a collection
14155 @item concat - Concatenates two collections
14156 @item flatten - Flattens a collection with subcollections
14157 @item distinct - Returns only distinct items
14158 @item split - Predicated-splits a collection
14159 @item split_at - Splits a collection at a given item
14160 @item group_by - Groups items by group
14161 @item pairwise - Pairs off adjacent items
14162 @item partial - Partially-applies a function
14163 @item curry - Curries a function
14164 @item compose - Composes functions
14165 @item complement - Complements a predicate
14166 @item all_fn - \"all\" with predicate
14168 (license license:bsd-3)))
14170 (define-public python2-funcy
14171 (package-with-python2 python-funcy))
14173 (define-public python-isoweek
14175 (name "python-isoweek")
14180 (uri (pypi-uri "isoweek" version))
14183 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14184 (build-system python-build-system)
14185 (home-page "https://github.com/gisle/isoweek")
14186 (synopsis "Objects representing a week")
14187 (description "The @code{isoweek} module provide the class Week that
14188 implements the week definition of ISO 8601. This standard also defines
14189 a notation for identifying weeks; yyyyWww (where the W is a literal).
14190 Week instances stringify to this form.")
14191 (license license:bsd-3)))
14193 (define-public python2-isoweek
14194 (package-with-python2 python-isoweek))
14196 (define-public python-tokenize-rt
14198 (name "python-tokenize-rt")
14203 (uri (pypi-uri "tokenize-rt" version))
14206 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14207 (build-system python-build-system)
14208 (home-page "https://github.com/asottile/tokenize-rt")
14209 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14211 "This Python library is a wrapper around @code{tokenize} from the Python
14212 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14213 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14214 and @code{tokens_to_src} to roundtrip.")
14215 (license license:expat)))
14217 (define-public python-future-fstrings
14219 (name "python-future-fstrings")
14224 (uri (pypi-uri "future_fstrings" version))
14227 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14228 (build-system python-build-system)
14230 `(("python-tokenize-rt" ,python-tokenize-rt)))
14231 (home-page "https://github.com/asottile/future-fstrings")
14232 (synopsis "Backport of fstrings to Python < 3.6")
14234 "This package provides a UTF-8 compatible encoding
14235 @code{future_fstrings}, which performs source manipulation. It decodes the
14236 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14237 @code{f} strings.")
14238 (license license:expat)))
14240 (define-public python-typed-ast
14242 (name "python-typed-ast")
14247 (uri (pypi-uri "typed-ast" version))
14250 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14251 (build-system python-build-system)
14253 `(#:modules ((guix build utils)
14254 (guix build python-build-system)
14259 (modify-phases %standard-phases
14262 (let ((cwd (getcwd)))
14263 (setenv "PYTHONPATH"
14264 (string-append cwd "/build/"
14265 (find (cut string-prefix? "lib" <>)
14266 (scandir (string-append cwd "/build")))
14268 (getenv "PYTHONPATH"))))
14271 (native-inputs `(("python-pytest" ,python-pytest)))
14272 (home-page "https://github.com/python/typed_ast")
14273 (synopsis "Fork of Python @code{ast} modules with type comment support")
14274 (description "This package provides a parser similar to the standard
14275 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14276 include PEP 484 type comments and are independent of the version of Python
14277 under which they are run. The @code{typed_ast} parsers produce the standard
14278 Python AST (plus type comments), and are both fast and correct, as they are
14279 based on the CPython 2.7 and 3.7 parsers.")
14280 ;; See the file "LICENSE" for the details.
14281 (license (list license:psfl
14283 license:expat)))) ;ast27/Parser/spark.py
14285 (define-public python-typing
14287 (name "python-typing")
14292 (uri (pypi-uri "typing" version))
14295 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14296 (build-system python-build-system)
14297 (home-page "https://docs.python.org/3/library/typing.html")
14298 (synopsis "Type hints for Python")
14299 (description "This is a backport of the standard library @code{typing}
14300 module to Python versions older than 3.5. Typing defines a standard notation
14301 for Python function and variable type annotations. The notation can be used
14302 for documenting code in a concise, standard format, and it has been designed
14303 to also be used by static and runtime type checkers, static analyzers, IDEs
14305 (license license:psfl)))
14307 (define-public python2-typing
14308 (package-with-python2 python-typing))
14310 (define-public python-typing-extensions
14312 (name "python-typing-extensions")
14317 (uri (pypi-uri "typing_extensions" version))
14320 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14321 (build-system python-build-system)
14323 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14324 (synopsis "Experimental type hints for Python")
14326 "The typing_extensions module contains additional @code{typing} hints not
14327 yet present in the of the @code{typing} standard library.
14328 Included are implementations of:
14331 @item ContextManager
14342 @item TYPE_CHECKING
14343 @item AsyncGenerator
14345 (license license:psfl)))
14347 (define-public bpython
14354 (uri (pypi-uri "bpython" version))
14357 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14358 (build-system python-build-system)
14361 (modify-phases %standard-phases
14362 (add-after 'unpack 'remove-failing-test
14364 ;; Remove failing test. FIXME: make it pass
14365 (delete-file "bpython/test/test_args.py")
14367 (add-after 'wrap 'add-aliases
14368 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14369 (lambda* (#:key outputs #:allow-other-keys)
14370 (let ((out (assoc-ref outputs "out")))
14373 (symlink old (string-append out "/bin/" new)))
14374 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14375 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14378 `(("python-pygments" ,python-pygments)
14379 ("python-requests" ,python-requests)
14380 ("python-babel" ,python-babel) ; optional, for internationalization
14381 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14382 ("python-greenlet" ,python-greenlet)
14383 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14384 ("python-six" ,python-six)))
14386 `(("python-sphinx" ,python-sphinx)
14387 ("python-mock" ,python-mock)))
14388 (home-page "https://bpython-interpreter.org/")
14389 (synopsis "Fancy interface to the Python interpreter")
14390 (description "Bpython is a fancy interface to the Python
14391 interpreter. bpython's main features are
14394 @item in-line syntax highlighting,
14395 @item readline-like autocomplete with suggestions displayed as you type,
14396 @item expected parameter list for any Python function,
14397 @item \"rewind\" function to pop the last line of code from memory and
14399 @item send the code you've entered off to a pastebin,
14400 @item save the code you've entered to a file, and
14401 @item auto-indentation.
14403 (license license:expat)))
14405 (define-public bpython2
14406 (let ((base (package-with-python2
14407 (strip-python2-variant bpython))))
14408 (package (inherit base)
14411 `(#:python ,python-2
14413 (modify-phases %standard-phases
14414 (add-after 'unpack 'remove-failing-test
14416 ;; Remove failing test. FIXME: make it pass
14417 (delete-file "bpython/test/test_args.py")
14418 ;; Disable failing test-cases (renaming inhibits they are
14420 (substitute* "bpython/test/test_curtsies_repl.py"
14421 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14422 (string-append a "xxx_off_" b))
14423 (("^(\\s*def )(test_complex\\W)" _ a b)
14424 (string-append a "xxx_off_" b)))
14426 (add-before 'build 'rename-scripts
14427 ;; rename the scripts to bypthon2, bpdb2, etc.
14429 (substitute* "setup.py"
14430 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14431 (string-append name "2" rest "\n"))
14432 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14433 (string-append name "2" (or sub "") rest "\n")))
14436 (define-public python-pyinotify
14438 (name "python-pyinotify")
14442 (uri (pypi-uri "pyinotify" version))
14445 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14446 (build-system python-build-system)
14447 (arguments `(#:tests? #f)) ;no tests
14448 (home-page "https://github.com/seb-m/pyinotify")
14449 (synopsis "Python library for monitoring inotify events")
14451 "@code{pyinotify} provides a Python interface for monitoring
14452 file system events on Linux.")
14453 (license license:expat)))
14455 (define-public python2-pyinotify
14456 (package-with-python2 python-pyinotify))
14458 ;; Ada parser uses this version.
14459 (define-public python2-quex-0.67.3
14461 (name "python2-quex")
14466 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14467 (version-major+minor version)
14468 "/quex-" version ".zip"))
14471 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14472 (build-system python-build-system)
14474 `(("unzip" ,unzip)))
14476 `(#:python ,python-2
14479 (modify-phases %standard-phases
14480 (delete 'configure)
14483 (lambda* (#:key outputs #:allow-other-keys)
14484 (let* ((out (assoc-ref outputs "out"))
14485 (share/quex (string-append out "/share/quex"))
14486 (bin (string-append out "/bin")))
14487 (copy-recursively "." share/quex)
14489 (symlink (string-append share/quex "/quex-exe.py")
14490 (string-append bin "/quex"))
14492 (native-search-paths
14493 (list (search-path-specification
14494 (variable "QUEX_PATH")
14495 (files '("share/quex")))))
14496 (home-page "http://quex.sourceforge.net/")
14497 (synopsis "Lexical analyzer generator in Python")
14498 (description "@code{quex} is a lexical analyzer generator in Python.")
14499 (license license:lgpl2.1+))) ; Non-military
14501 (define-public python2-quex
14502 (package (inherit python2-quex-0.67.3)
14503 (name "python2-quex")
14508 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14511 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14512 (file-name (string-append name "-" version ".tar.gz"))))))
14514 (define-public python-more-itertools
14516 (name "python-more-itertools")
14521 (uri (pypi-uri "more-itertools" version))
14524 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14525 (build-system python-build-system)
14526 (home-page "https://github.com/erikrose/more-itertools")
14527 (synopsis "More routines for operating on iterables, beyond itertools")
14528 (description "Python's built-in @code{itertools} module implements a
14529 number of iterator building blocks inspired by constructs from APL, Haskell,
14530 and SML. @code{more-itertools} includes additional building blocks for
14531 working with iterables.")
14532 (properties `((python2-variant . ,(delay python2-more-itertools))))
14533 (license license:expat)))
14535 ;; The 5.x series are the last versions supporting Python 2.7.
14536 (define-public python2-more-itertools
14538 (inherit python-more-itertools)
14539 (name "python2-more-itertools")
14543 (uri (pypi-uri "more-itertools" version))
14546 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14548 `(#:python ,python2-minimal))
14550 `(("python2-six" ,python2-six-bootstrap)))))
14552 (define-public python-latexcodec
14554 (name "python-latexcodec")
14559 (uri (pypi-uri "latexcodec" version))
14561 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14562 (build-system python-build-system)
14564 `(("python-six" ,python-six)))
14565 (home-page "https://readthedocs.org/projects/latexcodec/")
14566 (synopsis "Work with LaTeX code in Python")
14567 (description "Lexer and codec to work with LaTeX code in Python.")
14568 (license license:expat)))
14570 (define-public python-pybtex
14572 (name "python-pybtex")
14577 (uri (pypi-uri "pybtex" version))
14580 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14581 (build-system python-build-system)
14583 `(("python-nose" ,python-nose)))
14585 `(("python-latexcodec" ,python-latexcodec)
14586 ("python-pyyaml" ,python-pyyaml)
14587 ("python-six" ,python-six)))
14589 `(#:test-target "nosetests"))
14590 (home-page "https://pybtex.org/")
14591 (synopsis "BibTeX-compatible bibliography processor")
14592 (description "Pybtex is a BibTeX-compatible bibliography processor written
14593 in Python. You can simply type pybtex instead of bibtex.")
14594 (license license:expat)))
14596 (define-public python-onetimepass
14598 (name "python-onetimepass")
14603 (uri (pypi-uri "onetimepass" version))
14605 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14606 (build-system python-build-system)
14607 (propagated-inputs `(("python-six" ,python-six)))
14608 (home-page "https://github.com/tadeck/onetimepass/")
14609 (synopsis "One-time password library")
14610 (description "Python one-time password library for HMAC-based (HOTP) and
14611 time-based (TOTP) passwords.")
14612 (license license:expat)))
14614 (define-public python-parso
14616 (name "python-parso")
14621 (uri (pypi-uri "parso" version))
14624 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14626 `(("python-pytest" ,python-pytest)))
14627 (build-system python-build-system)
14628 (home-page "https://github.com/davidhalter/parso")
14629 (synopsis "Python Parser")
14630 (description "Parso is a Python parser that supports error recovery and
14631 round-trip parsing for different Python versions (in multiple Python versions).
14632 Parso is also able to list multiple syntax errors in your Python file.")
14633 (license license:expat)))
14635 (define-public python2-parso
14636 (package-with-python2 python-parso))
14638 (define-public python-async-generator
14640 (name "python-async-generator")
14645 (uri (pypi-uri "async_generator" version))
14648 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14649 (build-system python-build-system)
14651 `(("python-pytest" ,python-pytest)))
14652 (home-page "https://github.com/python-trio/async_generator")
14653 (synopsis "Async generators and context managers for Python 3.5+")
14654 (description "@code{async_generator} back-ports Python 3.6's native async
14655 generators and Python 3.7's context managers into Python 3.5.")
14657 (license (list license:expat license:asl2.0))))
14659 (define-public python-async-timeout
14661 (name "python-async-timeout")
14666 (uri (pypi-uri "async-timeout" version))
14669 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14670 (build-system python-build-system)
14671 (home-page "https://github.com/aio-libs/async_timeout/")
14672 (synopsis "Timeout context manager for asyncio programs")
14673 (description "@code{async-timeout} provides a timeout timeout context
14674 manager compatible with @code{asyncio}.")
14675 (license license:asl2.0)))
14677 (define-public python-glob2
14679 (name "python-glob2")
14684 (uri (git-reference
14685 (url "https://github.com/miracle2k/python-glob2.git")
14687 (file-name (git-file-name name version))
14689 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14690 (build-system python-build-system)
14691 (home-page "https://github.com/miracle2k/python-glob2/")
14692 (synopsis "Extended Version of the python buildin glob module")
14693 (description "This is an extended version of the Python
14694 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14698 @item The ability to capture the text matched by glob patterns, and return
14699 those matches alongside the file names.
14700 @item A recursive @code{**} globbing syntax, akin for example to the
14701 @code{globstar} option of Bash.
14702 @item The ability to replace the file system functions used, in order to glob
14703 on virtual file systems.
14704 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14707 Glob2 currently based on the glob code from Python 3.3.1.")
14708 (license license:bsd-2)))
14710 (define-public python2-glob2
14711 (package-with-python2 python-glob2))
14713 (define-public python-gipc
14715 (name "python-gipc")
14720 (uri (pypi-uri "gipc" version ".zip"))
14723 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14724 (build-system python-build-system)
14726 `(("unzip" ,unzip)))
14728 `(("python-gevent" ,python-gevent)))
14729 (home-page "http://gehrcke.de/gipc")
14730 (synopsis "Child process management in the context of gevent")
14731 (description "Usage of Python's multiprocessing package in a
14732 gevent-powered application may raise problems. With @code{gipc},
14733 process-based child processes can safely be created anywhere within a
14734 gevent-powered application.")
14735 (license license:expat)))
14737 (define-public python2-gipc
14738 (package-with-python2 python-gipc))
14740 (define-public python-fusepy
14742 (name "python-fusepy")
14747 (uri (pypi-uri "fusepy" version))
14750 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14751 (build-system python-build-system)
14754 (modify-phases %standard-phases
14755 (add-before 'build 'set-library-file-name
14756 (lambda* (#:key inputs #:allow-other-keys)
14757 (let ((fuse (assoc-ref inputs "fuse")))
14758 (substitute* "fuse.py"
14759 (("find_library\\('fuse'\\)")
14760 (string-append "'" fuse "/lib/libfuse.so'")))
14764 (home-page "https://github.com/fusepy/fusepy")
14765 (synopsis "Simple ctypes bindings for FUSE")
14766 (description "Python module that provides a simple interface to FUSE and
14767 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14768 (license license:isc)))
14770 (define-public python2-fusepy
14771 (package-with-python2 python-fusepy))
14773 (define-public python2-gdrivefs
14775 (name "python2-gdrivefs")
14780 (uri (pypi-uri "gdrivefs" version))
14783 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14784 (build-system python-build-system)
14786 `(#:python ,python-2
14788 (modify-phases %standard-phases
14789 (add-before 'build 'patch-setup-py
14791 ;; Update requirements from dependency==version
14792 ;; to dependency>=version
14793 (substitute* "gdrivefs/resources/requirements.txt"
14797 `(("python2-gipc" ,python2-gipc)
14798 ("python2-gevent" ,python2-gevent)
14799 ("python2-greenlet" ,python2-greenlet)
14800 ("python2-httplib2" ,python2-httplib2)
14801 ("python2-uritemplate" ,python2-uritemplate)
14802 ("python2-oauth2client" ,python2-oauth2client)
14803 ("python2-six" ,python2-six)))
14805 `(("python2-dateutil" ,python2-dateutil)
14806 ("python2-fusepy" ,python2-fusepy)
14807 ("python2-google-api-client" ,python2-google-api-client)))
14808 (home-page "https://github.com/dsoprea/GDriveFS")
14809 (synopsis "Mount Google Drive as a local file system")
14810 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14811 under Python 2.7.")
14812 (license license:gpl2)))
14814 (define-public pybind11
14820 (uri (git-reference
14821 (url "https://github.com/pybind/pybind11.git")
14822 (commit (string-append "v" version))))
14825 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14826 (file-name (git-file-name name version))))
14827 (build-system cmake-build-system)
14829 `(("python" ,python)
14830 ("python-pytest" ,python-pytest)))
14832 `(#:test-target "check"))
14833 (home-page "https://github.com/pybind/pybind11/")
14834 (synopsis "Seamless operability between C++11 and Python")
14835 (description "pybind11 is a lightweight header-only library that exposes
14836 C++ types in Python and vice versa, mainly to create Python bindings of
14837 existing C++ code. Its goals and syntax are similar to the excellent
14838 Boost.Python library by David Abrahams: to minimize boilerplate code in
14839 traditional extension modules by inferring type information using compile-time
14841 (license license:expat)))
14843 (define-public python-fasteners
14845 (name "python-fasteners")
14850 (uri (pypi-uri "fasteners" version))
14853 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14854 (build-system python-build-system)
14856 `(("python-monotonic" ,python-monotonic)
14857 ("python-six" ,python-six)
14858 ("python-testtools" ,python-testtools)))
14859 (home-page "https://github.com/harlowja/fasteners")
14860 (synopsis "Python package that provides useful locks")
14862 "This package provides a Python program that provides following locks:
14865 @item Locking decorator
14866 @item Reader-writer locks
14867 @item Inter-process locks
14868 @item Generic helpers
14870 (properties `((python2-variant . ,(delay python2-fasteners))))
14871 (license license:asl2.0)))
14873 (define-public python2-fasteners
14874 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14878 `(("python2-futures" ,python2-futures)
14879 ,@(package-propagated-inputs base))))))
14881 (define-public python-requests-file
14883 (name "python-requests-file")
14888 (uri (pypi-uri "requests-file" version))
14891 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14892 (build-system python-build-system)
14894 `(("python-requests" ,python-requests)
14895 ("python-six" ,python-six)))
14897 "https://github.com/dashea/requests-file")
14898 (synopsis "File transport adapter for Requests")
14900 "Requests-File is a transport adapter for use with the Requests Python
14901 library to allow local file system access via @code{file://} URLs.")
14902 (license license:asl2.0)))
14904 (define-public python2-requests-file
14905 (package-with-python2 python-requests-file))
14907 (define-public python-tldextract
14909 (name "python-tldextract")
14914 (uri (pypi-uri "tldextract" version))
14917 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14918 (build-system python-build-system)
14920 `(("python-pytest" ,python-pytest)
14921 ("python-responses" ,python-responses)))
14923 `(("python-idna" ,python-idna)
14924 ("python-requests" ,python-requests)
14925 ("python-requests-file" ,python-requests-file)))
14927 "https://github.com/john-kurkowski/tldextract")
14929 "Separate the TLD from the registered domain and subdomains of a URL")
14931 "TLDExtract accurately separates the TLD from the registered domain and
14932 subdomains of a URL, using the Public Suffix List. By default, this includes
14933 the public ICANN TLDs and their exceptions. It can optionally support the
14934 Public Suffix List's private domains as well.")
14935 (license license:bsd-3)))
14937 (define-public python2-tldextract
14938 (package-with-python2 python-tldextract))
14940 (define-public python-pynamecheap
14942 (name "python-pynamecheap")
14947 (uri (pypi-uri "PyNamecheap" version))
14950 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14951 (build-system python-build-system)
14953 `(("python-requests" ,python-requests)))
14955 "https://github.com/Bemmu/PyNamecheap")
14957 "Namecheap API client in Python")
14959 "PyNamecheap is a Namecheap API client in Python.")
14960 (license license:expat)))
14962 (define-public python2-pynamecheap
14963 (package-with-python2 python-pynamecheap))
14965 (define-public python-dns-lexicon
14967 (name "python-dns-lexicon")
14972 (uri (pypi-uri "dns-lexicon" version))
14975 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14976 (build-system python-build-system)
14978 `(#:tests? #f)) ;requires internet access
14980 `(("python-future" ,python-future)
14981 ("python-pynamecheap" ,python-pynamecheap)
14982 ("python-requests" ,python-requests)
14983 ("python-tldextract" ,python-tldextract)
14984 ("python-urllib3" ,python-urllib3)))
14985 (home-page "https://github.com/AnalogJ/lexicon")
14987 "Manipulate DNS records on various DNS providers")
14989 "Lexicon provides a way to manipulate DNS records on multiple DNS
14990 providers in a standardized way. It has a CLI but it can also be used as a
14991 Python library. It was designed to be used in automation, specifically with
14993 (license license:expat)))
14995 (define-public python2-dns-lexicon
14996 (package-with-python2 python-dns-lexicon))
14998 (define-public python-commandlines
15000 (name "python-commandlines")
15005 (uri (pypi-uri "commandlines" version))
15008 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15009 (build-system python-build-system)
15010 (home-page "https://github.com/chrissimpkins/commandlines")
15011 (synopsis "Command line argument to object parsing library")
15013 "@code{Commandlines} is a Python library for command line application
15014 development that supports command line argument parsing, command string
15015 validation testing and application logic.")
15016 (license license:expat)))
15018 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15019 ;; python-numba. They have a very unflexible relationship.
15020 (define-public python-numba
15022 (name "python-numba")
15027 (uri (pypi-uri "numba" version))
15030 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15031 (build-system python-build-system)
15033 `(#:modules ((guix build utils)
15034 (guix build python-build-system)
15039 (modify-phases %standard-phases
15040 (add-after 'unpack 'disable-proprietary-features
15042 (setenv "NUMBA_DISABLE_HSA" "1")
15043 (setenv "NUMBA_DISABLE_CUDA" "1")
15045 (add-after 'unpack 'remove-failing-tests
15047 ;; FIXME: these tests fail for unknown reasons:
15048 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15049 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15050 (substitute* "numba/tests/test_dispatcher.py"
15051 (("def test(_non_writable_pycache)" _ m)
15052 (string-append "def guix_skip" m))
15053 (("def test(_non_creatable_pycache)" _ m)
15054 (string-append "def guix_skip" m))
15055 (("def test(_frozen)" _ m)
15056 (string-append "def guix_skip" m)))
15058 ;; These tests fail because we don't run the tests from the build
15059 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15060 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15061 (substitute* "numba/tests/test_pycc.py"
15062 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15063 (string-append "def guix_skip" m)))
15067 (let ((cwd (getcwd)))
15068 (setenv "PYTHONPATH"
15069 (string-append cwd "/build/"
15070 (find (cut string-prefix? "lib" <>)
15071 (scandir (string-append cwd "/build")))
15073 (getenv "PYTHONPATH")))
15074 ;; Something is wrong with the PYTHONPATH when running the
15075 ;; tests from the build directory, as it complains about not being
15076 ;; able to import certain modules.
15077 (with-directory-excursion "/tmp"
15078 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15081 `(("python-llvmlite" ,python-llvmlite)
15082 ("python-numpy" ,python-numpy)
15083 ("python-singledispatch" ,python-singledispatch)))
15084 ;; Needed for tests.
15086 `(("python-jinja2" ,python-jinja2)
15087 ("python-pygments" ,python-pygments)))
15088 (home-page "https://numba.pydata.org")
15089 (synopsis "Compile Python code using LLVM")
15090 (description "Numba gives you the power to speed up your applications with
15091 high performance functions written directly in Python. With a few
15092 annotations, array-oriented and math-heavy Python code can be just-in-time
15093 compiled to native machine instructions, similar in performance to C, C++ and
15094 Fortran, without having to switch languages or Python interpreters.
15096 Numba works by generating optimized machine code using the LLVM compiler
15097 infrastructure at import time, runtime, or statically (using the included pycc
15099 (license license:bsd-3)))
15101 (define-public python-anndata
15103 (name "python-anndata")
15108 (uri (pypi-uri "anndata" version))
15111 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15112 (build-system python-build-system)
15114 `(("python-h5py" ,python-h5py)
15115 ("python-natsort" ,python-natsort)
15116 ("python-pandas" ,python-pandas)
15117 ("python-scipy" ,python-scipy)))
15118 (home-page "https://github.com/theislab/anndata")
15119 (synopsis "Annotated data for data analysis pipelines")
15120 (description "Anndata is a package for simple (functional) high-level APIs
15121 for data analysis pipelines. In this context, it provides an efficient,
15122 scalable way of keeping track of data together with learned annotations and
15123 reduces the code overhead typically encountered when using a mostly
15124 object-oriented library such as @code{scikit-learn}.")
15125 (license license:bsd-3)))
15127 (define-public python-dill
15129 (name "python-dill")
15134 (uri (pypi-uri "dill" version))
15136 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15137 (build-system python-build-system)
15138 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15139 (arguments '(#:tests? #f))
15140 (home-page "https://pypi.org/project/dill")
15141 (synopsis "Serialize all of Python")
15142 (description "Dill extends Python's @code{pickle} module for serializing
15143 and de-serializing Python objects to the majority of the built-in Python
15144 types. Dill provides the user the same interface as the @code{pickle} module,
15145 and also includes some additional features. In addition to pickling Python
15146 objects, @code{dill} provides the ability to save the state of an interpreter
15147 session in a single command. Hence, it would be feasible to save a
15148 interpreter session, close the interpreter, ship the pickled file to another
15149 computer, open a new interpreter, unpickle the session and thus continue from
15150 the saved state of the original interpreter session.")
15151 (license license:bsd-3)))
15153 (define-public python-multiprocess
15155 (name "python-multiprocess")
15156 (version "0.70.6.1")
15160 (uri (pypi-uri "multiprocess" version))
15163 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15164 (build-system python-build-system)
15166 `(("python-dill" ,python-dill)))
15167 (home-page "https://pypi.org/project/multiprocess")
15168 (synopsis "Multiprocessing and multithreading in Python")
15170 "This package is a fork of the multiprocessing Python package, a package
15171 which supports the spawning of processes using the API of the standard
15172 library's @code{threading} module.")
15173 (license license:bsd-3)))
15175 (define-public python-toolz
15177 (name "python-toolz")
15182 (uri (pypi-uri "toolz" version))
15185 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15186 (build-system python-build-system)
15187 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15188 ;; unregistered loader type"
15189 (arguments '(#:tests? #f))
15190 (home-page "https://github.com/pytoolz/toolz/")
15191 (synopsis "List processing tools and functional utilities")
15193 "This package provides a set of utility functions for iterators,
15194 functions, and dictionaries.")
15195 (license license:bsd-3)))
15197 (define-public python2-toolz
15198 (package-with-python2 python-toolz))
15200 (define-public python-cytoolz
15202 (name "python-cytoolz")
15203 (version "0.9.0.1")
15207 (uri (pypi-uri "cytoolz" version))
15210 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15211 (build-system python-build-system)
15212 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15214 (arguments '(#:tests? #f))
15216 `(("python-toolz" ,python-toolz)))
15218 `(("python-cython" ,python-cython)))
15219 (home-page "https://github.com/pytoolz/cytoolz")
15220 (synopsis "High performance functional utilities")
15222 "The cytoolz package implements the same API as provided by toolz. The
15223 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15224 that is accessible to other projects developed in Cython.")
15225 (license license:bsd-3)))
15227 (define-public python-sortedcontainers
15229 (name "python-sortedcontainers")
15234 (uri (pypi-uri "sortedcontainers" version))
15237 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15238 (build-system python-build-system)
15240 `(("python-tox" ,python-tox)))
15241 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15242 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15244 "This package provides a sorted collections library, written in
15246 (license license:asl2.0)))
15248 (define-public python-cloudpickle
15250 (name "python-cloudpickle")
15255 (uri (pypi-uri "cloudpickle" version))
15258 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15259 (build-system python-build-system)
15260 ;; FIXME: there are 5 errors in 122 tests:
15261 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15262 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15263 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15264 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15265 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15266 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15267 (arguments '(#:tests? #f))
15269 `(("python-pytest" ,python-pytest)
15270 ("python-mock" ,python-mock)
15271 ("python-tornado" ,python-tornado)))
15272 (home-page "https://github.com/cloudpipe/cloudpickle")
15273 (synopsis "Extended pickling support for Python objects")
15275 "Cloudpickle makes it possible to serialize Python constructs not
15276 supported by the default pickle module from the Python standard library. It
15277 is especially useful for cluster computing where Python expressions are
15278 shipped over the network to execute on remote hosts, possibly close to the
15280 (license license:bsd-3)))
15282 (define-public python2-cloudpickle
15283 (package-with-python2 python-cloudpickle))
15285 (define-public python-locket
15287 (name "python-locket")
15292 (uri (pypi-uri "locket" version))
15295 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15296 (build-system python-build-system)
15297 (home-page "https://github.com/mwilliamson/locket.py")
15298 (synopsis "File-based locks for Python")
15300 "Locket implements a lock that can be used by multiple processes provided
15301 they use the same path.")
15302 (license license:bsd-2)))
15304 (define-public python2-locket
15305 (package-with-python2 python-locket))
15307 (define-public python-blosc
15309 (name "python-blosc")
15314 (uri (pypi-uri "blosc" version))
15317 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15318 (build-system python-build-system)
15319 ;; FIXME: all tests pass, but then this error is printed:
15320 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15321 (arguments '(#:tests? #f))
15323 `(("python-numpy" ,python-numpy)))
15324 (home-page "https://github.com/blosc/python-blosc")
15325 (synopsis "Python wrapper for the Blosc data compressor library")
15326 (description "Blosc is a high performance compressor optimized for binary
15327 data. It has been designed to transmit data to the processor cache faster
15328 than the traditional, non-compressed, direct memory fetch approach via a
15329 @code{memcpy()} system call.
15331 Blosc works well for compressing numerical arrays that contains data with
15332 relatively low entropy, like sparse data, time series, grids with
15333 regular-spaced values, etc.
15335 This Python package wraps the Blosc library.")
15336 (license license:bsd-3)))
15338 (define-public python2-blosc
15339 (package-with-python2 python-blosc))
15341 (define-public python-partd
15343 (name "python-partd")
15348 (uri (pypi-uri "partd" version))
15351 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15352 (build-system python-build-system)
15354 `(("python-blosc" ,python-blosc)
15355 ("python-locket" ,python-locket)
15356 ("python-numpy" ,python-numpy)
15357 ("python-pandas" ,python-pandas)
15358 ("python-pyzmq" ,python-pyzmq)
15359 ("python-toolz" ,python-toolz)))
15360 (home-page "https://github.com/dask/partd/")
15361 (synopsis "Appendable key-value storage")
15362 (description "Partd stores key-value pairs. Values are raw bytes. We
15363 append on old values. Partd excels at shuffling operations.")
15364 (license license:bsd-3)))
15366 (define-public python2-partd
15367 (package-with-python2 python-partd))
15369 (define-public python-dask
15371 (name "python-dask")
15376 (uri (pypi-uri "dask" version))
15378 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15379 (build-system python-build-system)
15380 ;; A single test out of 5000+ fails. This test is marked as xfail when
15381 ;; pytest-xdist is used.
15384 (modify-phases %standard-phases
15385 (add-after 'unpack 'disable-broken-test
15387 (substitute* "dask/tests/test_threaded.py"
15388 (("def test_interrupt\\(\\)" m)
15389 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15391 (when (which "python2")
15392 ;; This test fails with recent Pandas:
15393 ;; <https://github.com/dask/dask/issues/3794>.
15394 (substitute* "dask/dataframe/tests/test_dataframe.py"
15395 (("def test_info\\(\\)" m)
15396 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15400 (lambda _ (invoke "pytest" "-vv"))))))
15402 `(("python-cloudpickle" ,python-cloudpickle)
15403 ("python-numpy" ,python-numpy)
15404 ("python-pandas" ,python-pandas)
15405 ("python-partd" ,python-partd)
15406 ("python-toolz" ,python-toolz)
15407 ("python-pyyaml" ,python-pyyaml)))
15409 `(("python-pytest" ,python-pytest)
15410 ("python-pytest-runner" ,python-pytest-runner)))
15411 (home-page "https://github.com/dask/dask/")
15412 (synopsis "Parallel computing with task scheduling")
15414 "Dask is a flexible parallel computing library for analytics. It
15415 consists of two components: dynamic task scheduling optimized for computation,
15416 and large data collections like parallel arrays, dataframes, and lists that
15417 extend common interfaces like NumPy, Pandas, or Python iterators to
15418 larger-than-memory or distributed environments. These parallel collections
15419 run on top of the dynamic task schedulers. ")
15420 (license license:bsd-3)))
15422 (define-public python2-dask
15423 (package-with-python2 python-dask))
15425 (define-public python-ilinkedlist
15427 (name "python-ilinkedlist")
15432 (uri (pypi-uri "ilinkedlist" version))
15435 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15436 (build-system python-build-system)
15437 (native-inputs `(("python-pytest" ,python-pytest)))
15438 (inputs `(("python" ,python)))
15439 (home-page "https://github.com/luther9/ilinkedlist-py")
15440 (synopsis "Immutable linked list library")
15442 "This is a implementation of immutable linked lists for Python. It
15443 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15444 Since a linked list is treated as immutable, it is hashable, and its length
15445 can be retrieved in constant time. Some of the terminology is inspired by
15446 LISP. It is possible to create an improper list by creating a @code{Pair}
15447 with a non-list @code{cdr}.")
15448 (license license:gpl3+)))
15450 (define-public python-readlike
15452 (name "python-readlike")
15457 (uri (pypi-uri "readlike" version))
15459 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15460 (build-system python-build-system)
15461 (home-page "https://github.com/jangler/readlike")
15462 (synopsis "GNU Readline-like line editing module")
15464 "This Python module provides line editing functions similar to the default
15465 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15466 @code{readline} package, this one allows access to those capabilties in settings
15467 outside of a standard command-line interface. It is especially well-suited to
15468 interfacing with Urwid, due to a shared syntax for describing key inputs.
15470 Currently, all stateless Readline commands are implemented. Yanking and history
15471 are not supported.")
15472 (license license:expat)))
15474 (define-public python2-readlike
15475 (package-with-python2 python-readlike))
15477 (define-public python-reparser
15479 (name "python-reparser")
15484 (uri (pypi-uri "ReParser" version))
15486 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15487 (build-system python-build-system)
15488 (home-page "https://github.com/xmikos/reparser")
15489 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15491 "This Python library provides a simple lexer/parser for inline markup based
15492 on regular expressions.")
15493 (license license:expat)))
15495 (define-public python2-reparser
15496 (let ((reparser (package-with-python2
15497 (strip-python2-variant python-reparser))))
15498 (package (inherit reparser)
15500 `(("python2-enum34" ,python2-enum34)
15501 ,@(package-propagated-inputs reparser))))))
15503 (define-public python-precis-i18n
15505 (name "python-precis-i18n")
15510 (uri (pypi-uri "precis_i18n" version))
15513 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15514 (build-system python-build-system)
15515 (home-page "https://github.com/byllyfish/precis_i18n")
15516 (synopsis "Implementation of the PRECIS framework")
15518 "This module implements the PRECIS Framework as described in RFC 8264,
15519 RFC 8265 and RFC 8266.")
15520 (license license:expat)))
15522 (define-public python-absl-py
15524 (name "python-absl-py")
15529 (uri (pypi-uri "absl-py" version))
15532 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15533 (build-system python-build-system)
15535 `(("python-six" ,python-six)))
15536 (home-page "https://github.com/abseil/abseil-py")
15537 (synopsis "Abseil Python common libraries")
15539 "This package provides the Abseil Python Common Libraries, a collection
15540 of Python libraries for building Python applications.")
15541 (license license:asl2.0)))
15543 (define-public python-astor
15545 (name "python-astor")
15550 (uri (pypi-uri "astor" version))
15553 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15554 (build-system python-build-system)
15555 ;; FIXME: There are two errors and two test failures.
15556 (arguments `(#:tests? #f))
15557 (home-page "https://github.com/berkerpeksag/astor")
15558 (synopsis "Read and write Python ASTs")
15559 (description "Astor is designed to allow easy manipulation of Python
15560 source via the Abstract Syntax Tree.")
15561 (license license:bsd-3)))
15563 (define-public python2-astor
15564 (package-with-python2 python-astor))
15566 (define-public python-grpcio
15568 (name "python-grpcio")
15573 (uri (pypi-uri "grpcio" version))
15576 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15577 (build-system python-build-system)
15579 `(("python-six" ,python-six)))
15580 (home-page "https://grpc.io")
15581 (synopsis "HTTP/2-based RPC framework")
15582 (description "This package provides a Python library for communicating
15583 with the HTTP/2-based RPC framework gRPC.")
15584 (license license:asl2.0)))
15586 (define-public python-astunparse
15588 (name "python-astunparse")
15593 (uri (pypi-uri "astunparse" version))
15595 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15596 (build-system python-build-system)
15597 (arguments '(#:tests? #f)) ; there are none
15599 `(("python-six" ,python-six)
15600 ("python-wheel" ,python-wheel)))
15601 (home-page "https://github.com/simonpercivall/astunparse")
15602 (synopsis "AST unparser for Python")
15603 (description "This package provides an AST unparser for Python. It is a
15604 factored out version of @code{unparse} found in the Python source
15606 (license license:bsd-3)))
15608 (define-public python-gast
15610 (name "python-gast")
15615 (uri (pypi-uri "gast" version))
15617 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15618 (build-system python-build-system)
15620 `(("python-astunparse" ,python-astunparse)))
15621 (home-page "https://pypi.org/project/gast/")
15622 (synopsis "Generic Python AST that abstracts the underlying Python version")
15624 "GAST provides a compatibility layer between the AST of various Python
15625 versions, as produced by @code{ast.parse} from the standard @code{ast}
15627 (license license:bsd-3)))
15629 (define-public python-wikidata
15631 (name "python-wikidata")
15636 (uri (pypi-uri "Wikidata" version))
15639 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15640 (build-system python-build-system)
15642 `(("python-babel" ,python-babel)))
15643 (home-page "https://github.com/dahlia/wikidata")
15644 (synopsis "Wikidata client library")
15646 "This package provides a Python interface to
15647 @url{https://www.wikidata.org/, Wikidata}.")
15648 (properties '((upstream-name . "Wikidata")))
15649 (license license:gpl3+)))
15651 (define-public python-doctest-ignore-unicode
15653 (name "python-doctest-ignore-unicode")
15658 (uri (pypi-uri "doctest-ignore-unicode" version))
15661 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15662 (build-system python-build-system)
15664 `(("python-nose" ,python-nose)))
15665 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15666 (synopsis "Ignore Unicode literal prefixes in doctests")
15668 "This package adds support for a flag to ignore Unicode literal prefixes
15670 (license license:asl2.0)))
15672 (define-public python-attr
15674 (name "python-attr")
15679 (uri (pypi-uri "attr" version))
15682 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15683 (build-system python-build-system)
15684 (home-page "https://github.com/denis-ryzhkov/attr")
15685 (synopsis "Decorator for attributes of target function or class")
15686 (description "Simple decorator to set attributes of target function or
15687 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15688 (license license:expat)))
15690 (define-public python-construct
15692 (name "python-construct")
15697 (uri (pypi-uri "construct" version))
15700 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15701 (build-system python-build-system)
15703 `(#:tests? #f)) ; No tests exist.
15705 `(("python-extras" ,python-extras)
15706 ("python-arrow" ,python-arrow)
15707 ("python-numpy" ,python-numpy)
15708 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15709 (home-page "http://construct.readthedocs.io")
15710 (synopsis "Declarative and symmetrical parser and builder for binary data")
15712 "This package provides both simple, atomic constructs (such as
15713 integers of various sizes), as well as composite ones which allow you
15714 form hierarchical and sequential structures of increasing complexity.
15715 It features bit and byte granularity, easy debugging and testing, an
15716 easy-to-extend subclass system, and lots of primitive constructs to
15717 make your work easier.")
15718 (license license:expat)))
15720 (define-public python-humanize
15722 (name "python-humanize")
15727 (uri (pypi-uri "humanize" version))
15730 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15732 '(#:tests? #f)) ; tests not in pypi archive
15733 (build-system python-build-system)
15734 (home-page "https://github.com/jmoiron/humanize")
15735 (synopsis "Print numerical information in a human-readable form")
15736 (description "This package provides a Python module that displays numbers
15737 and dates in \"human readable\" forms. For example, it would display
15738 \"12345591313\" as \"12.3 billion\".")
15739 (license license:expat)))
15741 (define-public python-txaio
15743 (name "python-txaio")
15748 (uri (pypi-uri "txaio" version))
15751 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15752 (build-system python-build-system)
15754 `(("python-twisted" ,python-twisted)
15755 ("python-six" ,python-six)))
15756 (home-page "https://github.com/crossbario/txaio")
15757 (synopsis "Compatibility layer between Python asyncio and Twisted")
15758 (description "Txaio provides a compatibility layer between the Python
15759 @code{asyncio} module and @code{Twisted}.")
15760 (license license:expat)))
15762 (define-public python-toolshed
15764 (name "python-toolshed")
15769 (uri (pypi-uri "toolshed" version))
15772 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15773 (build-system python-build-system)
15775 `(("python-nose" ,python-nose)))
15776 (home-page "https://github.com/brentp/toolshed/")
15777 (synopsis "Collection of modules and functions for working with data")
15778 (description "This is a collection of well-tested, simple modules and
15779 functions that aim to reduce boilerplate when working with data.")
15780 (license license:bsd-2)))
15782 (define-public python-annoy
15784 (name "python-annoy")
15789 (uri (pypi-uri "annoy" version))
15792 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15793 (build-system python-build-system)
15795 `(("python-nose" ,python-nose)))
15796 (home-page "https://github.com/spotify/annoy/")
15797 (synopsis "Approximate nearest neighbors library")
15799 "Annoy is a C++ library with Python bindings to search for points in
15800 space that are close to a given query point. It also creates large read-only
15801 file-based data structures that are @code{mmap}ped into memory so that many
15802 processes may share the same data.")
15803 (license license:asl2.0)))
15805 (define-public python-pylzma
15807 (name "python-pylzma")
15812 (uri (pypi-uri "pylzma" version))
15815 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15816 (build-system python-build-system)
15817 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15818 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15819 (description "This package provides Python bindings for the LZMA library
15821 (license license:lgpl2.1+)))
15823 (define-public python2-pylzma
15824 (package-with-python2 python-pylzma))
15826 (define-public python2-zeroconf
15828 (name "python2-zeroconf")
15830 ;; This is the last version that supports Python 2.x.
15835 (uri (pypi-uri "zeroconf" version))
15838 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15839 (build-system python-build-system)
15841 `(#:python ,python-2
15843 (modify-phases %standard-phases
15844 (add-after 'unpack 'patch-requires
15845 (lambda* (#:key inputs #:allow-other-keys)
15846 (substitute* "setup.py"
15851 `(("python2-six" ,python2-six)
15852 ("python2-enum32" ,python2-enum34)
15853 ("python2-netifaces" ,python2-netifaces)
15854 ("python2-typing" ,python2-typing)))
15855 (home-page "https://github.com/jstasiak/python-zeroconf")
15856 (synopsis "Pure Python mDNS service discovery")
15858 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15860 (license license:lgpl2.1+)))
15862 (define-public python-bsddb3
15864 (name "python-bsddb3")
15869 (uri (pypi-uri "bsddb3" version))
15872 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15873 (build-system python-build-system)
15878 (modify-phases %standard-phases
15879 (add-after 'unpack 'configure-locations
15880 (lambda* (#:key inputs #:allow-other-keys)
15881 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15882 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15886 (invoke "python3" "test3.py" "-v"))))))
15887 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15888 (synopsis "Python bindings for Oracle Berkeley DB")
15890 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15891 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15892 Transaction objects, and each of these is exposed as a Python type in the
15893 bsddb3.db module. The database objects can use various access methods: btree,
15894 hash, recno, and queue. Complete support of Berkeley DB distributed
15895 transactions. Complete support for Berkeley DB Replication Manager.
15896 Complete support for Berkeley DB Base Replication. Support for RPC.")
15897 (license license:bsd-3)))
15899 (define-public python-dbfread
15901 (name "python-dbfread")
15905 (uri (pypi-uri "dbfread" version))
15908 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15909 (build-system python-build-system)
15911 `(("python-pytest" ,python-pytest)))
15912 (home-page "https://dbfread.readthedocs.io")
15913 (synopsis "Read DBF Files with Python")
15915 "This library reads DBF files and returns the data as native Python data
15916 types for further processing. It is primarily intended for batch jobs and
15918 (license license:expat)))