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 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>
64 ;;; This file is part of GNU Guix.
66 ;;; GNU Guix is free software; you can redistribute it and/or modify it
67 ;;; under the terms of the GNU General Public License as published by
68 ;;; the Free Software Foundation; either version 3 of the License, or (at
69 ;;; your option) any later version.
71 ;;; GNU Guix is distributed in the hope that it will be useful, but
72 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
73 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74 ;;; GNU General Public License for more details.
76 ;;; You should have received a copy of the GNU General Public License
77 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
79 (define-module (gnu packages python-xyz)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (gnu packages)
82 #:use-module (gnu packages algebra)
83 #:use-module (gnu packages adns)
84 #:use-module (gnu packages attr)
85 #:use-module (gnu packages backup)
86 #:use-module (gnu packages bash)
87 #:use-module (gnu packages check)
88 #:use-module (gnu packages compression)
89 #:use-module (gnu packages crypto)
90 #:use-module (gnu packages databases)
91 #:use-module (gnu packages file)
92 #:use-module (gnu packages fontutils)
93 #:use-module (gnu packages gcc)
94 #:use-module (gnu packages geo)
95 #:use-module (gnu packages ghostscript)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages glib)
98 #:use-module (gnu packages graphviz)
99 #:use-module (gnu packages graphics)
100 #:use-module (gnu packages gstreamer)
101 #:use-module (gnu packages gtk)
102 #:use-module (gnu packages icu4c)
103 #:use-module (gnu packages image)
104 #:use-module (gnu packages imagemagick)
105 #:use-module (gnu packages libevent)
106 #:use-module (gnu packages libffi)
107 #:use-module (gnu packages linux)
108 #:use-module (gnu packages llvm)
109 #:use-module (gnu packages man)
110 #:use-module (gnu packages maths)
111 #:use-module (gnu packages monitoring)
112 #:use-module (gnu packages multiprecision)
113 #:use-module (gnu packages networking)
114 #:use-module (gnu packages ncurses)
115 #:use-module (gnu packages openstack)
116 #:use-module (gnu packages pcre)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages pkg-config)
119 #:use-module (gnu packages python)
120 #:use-module (gnu packages python-check)
121 #:use-module (gnu packages python-crypto)
122 #:use-module (gnu packages python-web)
123 #:use-module (gnu packages qt)
124 #:use-module (gnu packages readline)
125 #:use-module (gnu packages sdl)
126 #:use-module (gnu packages search)
127 #:use-module (gnu packages shells)
128 #:use-module (gnu packages sphinx)
129 #:use-module (gnu packages ssh)
130 #:use-module (gnu packages terminals)
131 #:use-module (gnu packages tex)
132 #:use-module (gnu packages texinfo)
133 #:use-module (gnu packages time)
134 #:use-module (gnu packages tls)
135 #:use-module (gnu packages version-control)
136 #:use-module (gnu packages video)
137 #:use-module (gnu packages web)
138 #:use-module (gnu packages base)
139 #:use-module (gnu packages xml)
140 #:use-module (gnu packages xorg)
141 #:use-module (gnu packages xdisorg)
142 #:use-module (gnu packages tcl)
143 #:use-module (gnu packages bdw-gc)
144 #:use-module (gnu packages serialization)
145 #:use-module (guix packages)
146 #:use-module (guix download)
147 #:use-module (guix git-download)
148 #:use-module (guix hg-download)
149 #:use-module (guix utils)
150 #:use-module (guix build-system gnu)
151 #:use-module (guix build-system cmake)
152 #:use-module (guix build-system python)
153 #:use-module (guix build-system trivial)
154 #:use-module (srfi srfi-1)
155 #:use-module (srfi srfi-26))
157 (define-public python-psutil
159 (name "python-psutil")
164 (uri (pypi-uri "psutil" version))
167 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
168 (build-system python-build-system)
170 ;; FIXME: some tests does not return and times out.
172 (home-page "https://www.github.com/giampaolo/psutil")
173 (synopsis "Library for retrieving information on running processes")
175 "psutil (Python system and process utilities) is a library for retrieving
176 information on running processes and system utilization (CPU, memory, disks,
177 network) in Python. It is useful mainly for system monitoring, profiling and
178 limiting process resources and management of running processes. It implements
179 many functionalities offered by command line tools such as: ps, top, lsof,
180 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
181 pidof, tty, taskset, pmap.")
182 (properties `((python2-variant . ,(delay python2-psutil))))
183 (license license:bsd-3)))
185 (define-public python2-psutil
186 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
190 `(("python2-enum34" ,python2-enum34) ;optional
191 ,@(package-propagated-inputs base))))))
193 (define-public python-shapely
195 (name "python-shapely")
196 (version "1.6.4.post2")
200 (uri (pypi-uri "Shapely" version))
203 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
204 (build-system python-build-system)
206 `(("python-cython" ,python-cython)
207 ("python-matplotlib" ,python-matplotlib)
208 ("python-pytest" ,python-pytest)
209 ("python-pytest-cov" ,python-pytest-cov)))
213 `(("python-numpy" ,python-numpy)))
216 (modify-phases %standard-phases
217 (add-after 'unpack 'patch-geos-path
218 (lambda* (#:key inputs #:allow-other-keys)
219 (let ((geos (assoc-ref inputs "geos"))
220 (glibc (assoc-ref inputs ,(if (%current-target-system)
221 "cross-libc" "libc"))))
222 (substitute* "shapely/geos.py"
223 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
224 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
225 geos "/lib/libgeos_c.so'])"))
226 (("free = load_dll\\('c'\\)\\.free")
227 (string-append "free = load_dll('c', fallbacks=['"
228 glibc "/lib/libc.so.6']).free"))))
230 (home-page "https://github.com/Toblerity/Shapely")
231 (synopsis "Library for the manipulation and analysis of geometric objects")
232 (description "Shapely is a Python package for manipulation and analysis of
233 planar geometric objects. It is based on the @code{GEOS} library.")
234 (license license:bsd-3)))
236 (define-public python-shortuuid
238 (name "python-shortuuid")
243 (uri (pypi-uri "shortuuid" version))
246 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
247 (build-system python-build-system)
249 `(("python-pep8" ,python-pep8)))
250 (home-page "https://github.com/skorokithakis/shortuuid")
251 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
253 "@code{shortuuid} is a Python library for generating concise, unambiguous
254 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
255 module and then similar looking characters are removed.")
256 (license license:bsd-3)))
258 (define-public python-logwrap
260 (name "python-logwrap")
265 (uri (pypi-uri "logwrap" version ".zip"))
268 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
269 (build-system python-build-system)
271 `(("python-six" ,python-six)
272 ("python-typing" ,python-typing)))
275 ("python-cython" ,python-cython)
276 ("python-pytest" ,python-pytest)
277 ("python-pytest-cov" ,python-pytest-cov)
278 ("python-pytest-runner" ,python-pytest-runner)))
279 (home-page "https://github.com/penguinolog/logwrap")
280 (synopsis "Decorator for logging function arguments")
281 (description "This package provides a decorator to log function arguments
282 and function call return values in a human-readable way.")
283 (license license:asl2.0)))
285 (define-public python2-shapely
286 (package-with-python2 python-shapely))
288 (define-public python-clyent
290 (name "python-clyent")
295 (uri (pypi-uri "clyent" version))
298 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
299 (build-system python-build-system)
301 `(("python-mock" ,python-mock)))
302 (home-page "https://github.com/binstar/clyent")
303 (synopsis "Command line client library")
304 (description "Clyent is a Python command line utiliy library. It is used
305 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
306 (license license:bsd-3)))
308 (define-public python2-clyent
309 (package-with-python2 python-clyent))
311 (define-public python-babel
313 (name "python-babel")
318 (uri (pypi-uri "Babel" version))
321 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
322 (build-system python-build-system)
324 `(("python-freezegun" ,python-freezegun)
325 ("python-pytest" ,python-pytest)))
327 `(("python-pytz" ,python-pytz)))
329 `(#:phases (modify-phases %standard-phases
331 (lambda _ (invoke "pytest" "-vv"))))))
332 (home-page "http://babel.pocoo.org/")
334 "Tools for internationalizing Python applications")
336 "Babel is composed of two major parts:
337 - tools to build and work with gettext message catalogs
338 - a Python interface to the CLDR (Common Locale Data Repository), providing
339 access to various locale display names, localized number and date formatting,
341 (license license:bsd-3)))
343 (define-public python2-babel
344 (package-with-python2 python-babel))
346 (define-public python2-backport-ssl-match-hostname
348 (name "python2-backport-ssl-match-hostname")
353 (uri (pypi-uri "backports.ssl_match_hostname" version))
356 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
357 (build-system python-build-system)
360 #:tests? #f)) ; no test target
361 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
362 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
364 "This backport brings the ssl.match_hostname() function to users of
365 earlier versions of Python. The function checks the hostname in the
366 certificate returned by the server to which a connection has been established,
367 and verifies that it matches the intended target hostname.")
368 (license license:psfl)))
370 (define-public python-hdf4
377 (uri (pypi-uri name version))
380 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
381 (build-system python-build-system)
382 (native-inputs `(("nose" ,python-nose)))
383 (propagated-inputs `(("numpy" ,python-numpy)))
390 (modify-phases %standard-phases
393 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
394 ;; on to import numpy. Somehow this works on their CI system.
395 ;; Let's just manage PYTHONPATH here instead.
396 (substitute* "runexamples.sh"
397 (("export PYTHONPATH=.*") ""))
399 (string-append (getcwd) ":"
400 (getenv "PYTHONPATH")))
401 (invoke "./runexamples.sh")
402 (invoke "nosetests" "-v"))))))
403 (home-page "https://github.com/fhs/python-hdf4")
404 (synopsis "Python interface to the NCSA HDF4 library")
406 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
407 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
408 NetCDF files can also be read and modified. Python-HDF4 is a fork of
409 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
410 (license license:expat)))
412 (define-public python2-hdf4
413 (package-with-python2 python-hdf4))
415 (define-public python-h5py
422 (uri (pypi-uri "h5py" version))
425 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
426 (build-system python-build-system)
428 `(#:tests? #f ; no test target
430 (modify-phases %standard-phases
431 (add-after 'unpack 'fix-hdf5-paths
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((prefix (assoc-ref inputs "hdf5")))
434 (substitute* "setup_build.py"
435 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
436 (string-append "['" prefix "/lib" "']"))
437 (("'/opt/local/include', '/usr/local/include'")
438 (string-append "'" prefix "/include" "'")))
439 (substitute* "setup_configure.py"
440 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
441 (string-append "['" prefix "/lib" "']")))
444 `(("python-six" ,python-six)
445 ("python-numpy" ,python-numpy)))
449 `(("python-cython" ,python-cython)
450 ("python-pkgconfig" ,python-pkgconfig)))
451 (home-page "http://www.h5py.org/")
452 (synopsis "Read and write HDF5 files from Python")
454 "The h5py package provides both a high- and low-level interface to the
455 HDF5 library from Python. The low-level interface is intended to be a
456 complete wrapping of the HDF5 API, while the high-level component supports
457 access to HDF5 files, datasets and groups using established Python and NumPy
459 (license license:bsd-3)))
461 (define-public python2-h5py
462 (package-with-python2 python-h5py))
464 (define-public python-sh
471 (uri (pypi-uri "sh" version))
474 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
475 (build-system python-build-system)
478 (modify-phases %standard-phases
481 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
482 (setenv "HOME" "/tmp")
483 (invoke "python" "sh.py" "test"))))))
485 `(("python-coverage" ,python-coverage)))
486 (home-page "https://github.com/amoffat/sh")
487 (synopsis "Python subprocess replacement")
488 (description "This package provides a replacement for Python's
489 @code{subprocess} feature.")
490 (license license:expat)))
492 (define-public python2-sh
493 (package-with-python2 python-sh))
495 (define-public python-cftime
497 (name "python-cftime")
502 (uri (pypi-uri "cftime" version))
505 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
506 (build-system python-build-system)
508 `(("python-numpy" ,python-numpy)))
510 `(("python-coveralls" ,python-coveralls)
511 ("python-cython" ,python-cython)
512 ("python-pytest-cov" ,python-pytest-cov)))
513 (home-page "https://github.com/Unidata/cftime")
514 (synopsis "Library for time handling")
516 "This package provides time-handling functionality that used to be part
517 of the netcdf4 package before.")
518 ;; This package claims to include code under the GPLv3 but is released
520 (license (list license:isc license:gpl3+))))
522 (define-public python-netcdf4
524 (name "python-netcdf4")
529 (uri (pypi-uri "netCDF4" version))
532 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
533 (build-system python-build-system)
536 (modify-phases %standard-phases
537 (add-after 'unpack 'configure-locations
538 (lambda* (#:key inputs #:allow-other-keys)
539 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
542 `(("python-cython" ,python-cython)))
544 `(("python-numpy" ,python-numpy)
545 ("python-cftime" ,python-cftime)))
550 (home-page "https://github.com/Unidata/netcdf4-python")
551 (synopsis "Python/numpy interface to the netCDF library")
552 (description "Netcdf4-python is a Python interface to the netCDF C
553 library. netCDF version 4 has many features not found in earlier
554 versions of the library and is implemented on top of HDF5. This module
555 can read and write files in both the new netCDF 4 and the old netCDF 3
556 format, and can create files that are readable by HDF5 clients. The
557 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
558 to users of that module.")
559 ;; The software is mainly ISC, but includes some files covered
560 ;; by the Expat license.
561 (license (list license:isc license:expat))))
563 (define-public python2-netcdf4
564 (package-with-python2 python-netcdf4))
566 (define-public python-lockfile
568 (name "python-lockfile")
573 (uri (pypi-uri "lockfile" version))
576 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
577 (build-system python-build-system)
578 (arguments '(#:test-target "check"))
580 `(("python-pbr" ,python-pbr)))
581 (home-page "https://launchpad.net/pylockfile")
582 (synopsis "Platform-independent file locking module")
584 "The lockfile package exports a LockFile class which provides a simple
585 API for locking files.")
586 (license license:expat)))
588 (define-public python2-lockfile
589 (package-with-python2 python-lockfile))
591 (define-public python-semantic-version
593 (name "python-semantic-version")
598 (uri (pypi-uri "semantic_version" version))
601 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
602 (build-system python-build-system)
604 `(#:tests? #f)) ; PyPI tarball lacks tests
605 (home-page "https://github.com/rbarrois/python-semanticversion")
606 (synopsis "Semantic versioning module for Python")
608 "The @code{semantic_version} class is a small library for handling
609 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
611 It can compare versions, generate a new version that represents a bump in one of
612 the version levels, and check whether any given string is a proper semantic
613 version identifier.")
614 (license license:bsd-3)))
616 (define-public python2-semantic-version
617 (package-with-python2 python-semantic-version))
619 (define-public python-serpent
621 (name "python-serpent")
626 (uri (pypi-uri "serpent" version))
628 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
629 (build-system python-build-system)
631 `(("python-attrs" ,python-attrs)
632 ("python-pytz" ,python-pytz)))
633 (home-page "https://github.com/irmen/Serpent")
634 (synopsis "Serializer for literal Python expressions")
636 "Serpent provides @code{ast.literal_eval()}-compatible object tree
637 serialization. It serializes an object tree into bytes (an utf-8 encoded
638 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
639 to rebuild the original object tree.
641 Because only safe literals are encoded, it is safe to send serpent data to
642 other machines, such as over the network.")
643 (license license:expat)))
645 (define-public python-setuptools
647 (name "python-setuptools")
652 (uri (pypi-uri "setuptools" version ".zip"))
655 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
656 (modules '((guix build utils)))
659 ;; Remove included binaries which are used to build self-extracting
660 ;; installers for Windows.
661 ;; TODO: Find some way to build them ourself so we can include them.
662 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
664 (build-system python-build-system)
665 ;; FIXME: Tests require pytest, which itself relies on setuptools.
666 ;; One could bootstrap with an internal untested setuptools.
669 (home-page "https://pypi.python.org/pypi/setuptools")
671 "Library designed to facilitate packaging Python projects")
673 "Setuptools is a fully-featured, stable library designed to facilitate
674 packaging Python projects, where packaging includes:
675 Python package and module definitions,
676 distribution package metadata,
678 project installation,
679 platform-specific details,
681 ;; TODO: setuptools now bundles the following libraries:
682 ;; packaging, pyparsing, six and appdirs. How to unbundle?
683 (license (list license:psfl ; setuptools itself
684 license:expat ; six, appdirs, pyparsing
685 license:asl2.0 ; packaging is dual ASL2/BSD-2
688 (define-public python2-setuptools
689 (package-with-python2 python-setuptools))
691 (define-public python-uniseg
693 (name "python-uniseg")
698 (uri (pypi-uri "uniseg" version ".zip"))
701 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
702 (build-system python-build-system)
704 '(#:tests? #f)) ; The test suite requires network access.
708 "https://bitbucket.org/emptypage/uniseg-python")
710 "Python library to determine Unicode text segmentations")
712 "Uniseg is a Python package used to determine Unicode text segmentations.
713 Supported segmentations include:
715 @item @dfn{Code point} (any value in the Unicode codespace)
716 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
717 multiple Unicode code points, e.g. \"G\" + acute-accent)
722 (license license:expat)))
724 (define-public python2-uniseg
725 (package-with-python2 python-uniseg))
727 (define-public python-humanfriendly
729 (name "python-humanfriendly")
734 (uri (pypi-uri "humanfriendly" version))
737 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
738 (build-system python-build-system)
740 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
743 `(("python-monotonic" ,python-monotonic)))
744 (home-page "https://humanfriendly.readthedocs.io")
745 (synopsis "Human-friendly input and output in Python")
747 "The functions and classes in @code{humanfriendly} can be used to make
748 text interfaces more user-friendly. It includes tools to parse and format
749 numbers, file sizes, and timespans, timers for long-running operations, menus
750 to allow the user to choose from a list of options, and terminal interaction
752 (license license:expat)))
754 (define-public python2-humanfriendly
755 (package-with-python2 python-humanfriendly))
757 (define-public python-capturer
759 (name "python-capturer")
764 (uri (pypi-uri "capturer" version))
767 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
768 (build-system python-build-system)
772 `(("python-humanfriendly" ,python-humanfriendly)))
773 (home-page "https://capturer.readthedocs.io")
774 (synopsis "Capture stdout and stderr streams of the current process")
776 "The capturer package makes it easy to capture the stdout and stderr
777 streams of the current process and subprocesses. Output can be relayed
778 to the terminal in real time but is also available to the Python program
779 for additional processing.")
780 (license license:expat)))
782 (define-public python2-capturer
783 (package-with-python2 python-capturer))
785 (define-public python-case
792 (uri (pypi-uri "case" version))
795 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
796 (build-system python-build-system)
798 `(("python-mock" ,python-mock)
799 ("python-nose" ,python-nose)
800 ("python-six" ,python-six)
801 ("python-unittest2" ,python-unittest2)))
803 `(("python-coverage" ,python-coverage)))
804 (home-page "https://github.com/celery/case")
805 (synopsis "Unittest utilities and convenience methods")
807 "The @code{case} package provides utilities on top of unittest, including
808 some helpful Python 2 compatibility convenience methods.")
809 (license license:bsd-3)))
811 (define-public python-verboselogs
813 (name "python-verboselogs")
818 (uri (pypi-uri "verboselogs" version))
821 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
822 (build-system python-build-system)
824 `(("python-mock" ,python-mock)
825 ("python-astroid" ,python-astroid)
826 ("python-pylint" ,python-pylint)))
827 (home-page "https://verboselogs.readthedocs.io")
828 (synopsis "Verbose logging level for Python's logging module")
830 "The @code{verboselogs} package extends Python's @code{logging} module to
831 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
832 (license license:expat)))
834 (define-public python2-verboselogs
835 (package-with-python2 python-verboselogs))
837 (define-public python-coloredlogs
839 (name "python-coloredlogs")
844 (uri (pypi-uri "coloredlogs" version))
847 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
848 (build-system python-build-system)
850 `(;Tests require some updated modules
853 `(("python-capturer" ,python-capturer)))
854 (home-page "https://coloredlogs.readthedocs.io")
855 (synopsis "Colored stream handler for Python's logging module")
857 "The @code{coloredlogs} package enables colored terminal output for
858 Python's logging module. The @code{ColoredFormatter} class inherits from
859 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
861 (license license:expat)))
863 (define-public python2-coloredlogs
864 (package-with-python2 python-coloredlogs))
866 (define-public python-et-xmlfile
868 (name "python-et-xmlfile")
873 (uri (pypi-uri "et_xmlfile" version))
876 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
877 (build-system python-build-system)
879 `(#:phases (modify-phases %standard-phases
882 (invoke "pytest"))))))
884 `(("python-pytest" ,python-pytest)
885 ("python-lxml" ,python-lxml))) ;used for the tests
886 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
887 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
888 (description "This Python library is based upon the @code{xmlfile} module
889 from @code{lxml}. It aims to provide a low memory, compatible implementation
891 (license license:expat)))
893 (define-public python2-et-xmlfile
894 (package-with-python2 python-et-xmlfile))
896 (define-public python-openpyxl
898 (name "python-openpyxl")
902 ;; We use the upstream repository, as the tests are not included in the
906 (url "https://bitbucket.org/openpyxl/openpyxl")
907 (changeset version)))
908 (file-name (string-append name "-" version "-checkout"))
910 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
911 (build-system python-build-system)
913 `(#:phases (modify-phases %standard-phases
916 (invoke "pytest"))))))
918 ;; For the test suite.
919 `(("python-lxml" ,python-lxml)
920 ("python-pillow" ,python-pillow)
921 ("python-pytest" ,python-pytest)))
923 `(("python-et-xmlfile" ,python-et-xmlfile)
924 ("python-jdcal" ,python-jdcal)))
925 (home-page "https://openpyxl.readthedocs.io")
926 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
927 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
928 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
930 (license license:expat)))
932 (define-public python-eventlet
934 (name "python-eventlet")
939 (uri (pypi-uri "eventlet" version))
942 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
943 (build-system python-build-system)
945 `(("python-greenlet" ,python-greenlet)))
947 ;; TODO: Requires unpackaged 'enum-compat'.
949 (home-page "http://eventlet.net")
950 (synopsis "Concurrent networking library for Python")
952 "Eventlet is a concurrent networking library for Python that
953 allows you to change how you run your code, not how you write it.
954 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
955 Coroutines ensure that the developer uses a blocking style of programming
956 that is similar to threading, but provide the benefits of non-blocking I/O.
957 The event dispatch is implicit, which means you can easily use @code{Eventlet}
958 from the Python interpreter, or as a small part of a larger application.")
959 (license license:expat)))
961 (define-public python2-eventlet
962 (let ((base (package-with-python2
963 (strip-python2-variant python-eventlet))))
964 (package (inherit base)
966 `(("python2-enum34" ,python2-enum34)
967 ,@(package-propagated-inputs base))))))
969 (define-public python-six
976 (uri (pypi-uri "six" version))
979 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
980 (build-system python-build-system)
983 (modify-phases %standard-phases
986 (invoke "py.test" "-v"))))))
988 `(("python-py" ,python-py)
989 ("python-pytest" ,python-pytest-bootstrap)))
990 (home-page "https://pypi.python.org/pypi/six/")
991 (synopsis "Python 2 and 3 compatibility utilities")
993 "Six is a Python 2 and 3 compatibility library. It provides utility
994 functions for smoothing over the differences between the Python versions with
995 the goal of writing Python code that is compatible on both Python versions.
996 Six supports every Python version since 2.5. It is contained in only one
997 Python file, so it can be easily copied into your project.")
998 (license license:x11)))
1000 (define-public python2-six
1001 (package-with-python2 python-six))
1003 (define-public python-six-bootstrap
1005 (inherit python-six)
1006 (name "python-six-bootstrap")
1008 (arguments `(#:tests? #f))))
1010 (define-public python2-six-bootstrap
1011 (package-with-python2 python-six-bootstrap))
1013 (define-public python-schedule
1015 (name "python-schedule")
1020 (uri (pypi-uri "schedule" version))
1023 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1024 (build-system python-build-system)
1026 `(("python-pytest" ,python-pytest)
1027 ("python-mock" ,python-mock)))
1028 (home-page "https://github.com/dbader/schedule")
1029 (synopsis "Schedule periodic function calls in Python")
1031 "Schedule is an in-process scheduler for periodic jobs that uses the
1032 builder pattern for configuration. Schedule lets you run Python functions (or
1033 any other callable) periodically at pre-determined intervals using a simple,
1034 human-friendly syntax.")
1035 (license license:expat)))
1037 (define-public python2-schedule
1038 (package-with-python2 python-schedule))
1040 (define-public python-pandas
1042 (name "python-pandas")
1047 (uri (pypi-uri "pandas" version))
1049 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1050 (build-system python-build-system)
1052 `(#:modules ((guix build utils)
1053 (guix build python-build-system)
1056 #:phases (modify-phases %standard-phases
1057 (add-after 'unpack 'patch-which
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (let ((which (assoc-ref inputs "which")))
1060 (substitute* "pandas/io/clipboard/__init__.py"
1061 (("^CHECK_CMD = .*")
1062 (string-append "CHECK_CMD = \"" which "\"\n"))))
1066 (let ((build-directory
1069 (car (scandir "build"
1070 (cut string-prefix? "lib." <>))))))
1071 ;; Disable the "strict data files" option which causes
1072 ;; the build to error out if required data files are
1073 ;; not available (as is the case with PyPI archives).
1074 (substitute* "setup.cfg"
1075 (("addopts = --strict-data-files") "addopts = "))
1076 (with-directory-excursion build-directory
1077 ;; Delete tests that require "moto" which is not yet
1079 (for-each delete-file
1080 '("pandas/tests/io/conftest.py"
1081 "pandas/tests/io/json/test_compression.py"
1082 "pandas/tests/io/parser/test_network.py"
1083 "pandas/tests/io/test_parquet.py"))
1084 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1085 "--skip-network" "-k"
1086 ;; XXX: Due to the deleted tests above.
1087 "not test_read_s3_jsonl"))))))))
1089 `(("python-numpy" ,python-numpy)
1090 ("python-openpyxl" ,python-openpyxl)
1091 ("python-pytz" ,python-pytz)
1092 ("python-dateutil" ,python-dateutil)
1093 ("python-xlrd" ,python-xlrd)))
1095 `(("which" ,which)))
1097 `(("python-cython" ,python-cython)
1098 ("python-beautifulsoup4" ,python-beautifulsoup4)
1099 ("python-lxml" ,python-lxml)
1100 ("python-html5lib" ,python-html5lib)
1101 ("python-nose" ,python-nose)
1102 ("python-pytest" ,python-pytest)
1103 ("python-pytest-mock" ,python-pytest-mock)))
1104 (home-page "https://pandas.pydata.org")
1105 (synopsis "Data structures for data analysis, time series, and statistics")
1107 "Pandas is a Python package providing fast, flexible, and expressive data
1108 structures designed to make working with structured (tabular,
1109 multidimensional, potentially heterogeneous) and time series data both easy
1110 and intuitive. It aims to be the fundamental high-level building block for
1111 doing practical, real world data analysis in Python.")
1112 (license license:bsd-3)))
1114 (define-public python2-pandas
1115 (package-with-python2 python-pandas))
1117 (define-public python2-mechanize
1119 (name "python2-mechanize")
1124 (uri (pypi-uri "mechanize" version))
1127 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1128 (build-system python-build-system)
1130 `(#:python ,python-2 ; apparently incompatible with Python 3
1132 ;; test fails with message
1133 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1134 ;; (python-3.3.2) or
1135 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1137 ;; The source code is from March 2011 and probably not up-to-date
1138 ;; with respect to python unit tests.
1139 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1141 "Stateful programmatic web browsing in Python")
1143 "Mechanize implements stateful programmatic web browsing in Python,
1144 after Andy Lester’s Perl module WWW::Mechanize.")
1145 (license (license:non-copyleft
1147 "See COPYING in the distribution."))))
1150 (define-public python-simplejson
1152 (name "python-simplejson")
1157 (uri (pypi-uri "simplejson" version))
1160 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1161 (build-system python-build-system)
1162 (home-page "http://simplejson.readthedocs.org/en/latest/")
1164 "Json library for Python")
1166 "JSON (JavaScript Object Notation) is a subset of JavaScript
1167 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1170 Simplejson exposes an API familiar to users of the standard library marshal
1171 and pickle modules. It is the externally maintained version of the json
1172 library contained in Python 2.6, but maintains compatibility with Python 2.5
1173 and (currently) has significant performance advantages, even without using
1174 the optional C extension for speedups. Simplejson is also supported on
1176 (license license:x11)))
1178 (define-public python2-simplejson
1179 (package-with-python2 python-simplejson))
1182 (define-public python-pyicu
1184 (name "python-pyicu")
1189 (uri (pypi-uri "PyICU" version))
1192 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1193 (build-system python-build-system)
1195 `(("icu4c" ,icu4c)))
1197 `(("python-pytest" ,python-pytest)
1198 ("python-six" ,python-six)))
1199 (home-page "https://github.com/ovalhub/pyicu")
1200 (synopsis "Python extension wrapping the ICU C++ API")
1202 "PyICU is a python extension wrapping the ICU C++ API.")
1203 (properties `((python2-variant . ,(delay python2-pyicu))))
1204 (license license:x11)))
1206 (define-public python2-pyicu
1207 (let ((base (package-with-python2
1208 (strip-python2-variant python-pyicu))))
1212 `(,@(package-arguments base)
1214 (modify-phases %standard-phases
1215 (add-before 'check 'delete-failing-test
1217 ;; XXX: This fails due to Unicode issues unique to Python 2,
1218 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1219 (delete-file "test/test_Script.py")
1222 (define-public python2-dogtail
1223 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1224 ;; spaces in indentation" with Python 3.
1226 (name "python2-dogtail")
1230 (uri (pypi-uri "dogtail" version))
1233 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1234 (build-system python-build-system)
1235 (arguments `(#:python ,python-2
1236 #:tests? #f)) ; invalid command "test"
1237 ;; Currently no offical homepage.
1238 (home-page "https://pypi.python.org/pypi/dogtail/")
1239 (synopsis "GUI test tool and automation framework written in Python")
1241 "Dogtail is a GUI test tool and automation framework written in Python.
1242 It uses Accessibility (a11y) technologies to communicate with desktop
1243 applications. dogtail scripts are written in Python and executed like any
1244 other Python program.")
1245 (license license:gpl2+)))
1247 (define-public python-empy
1249 (name "python-empy")
1253 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1257 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1258 (build-system python-build-system)
1260 `(#:tests? #f)) ; python2 only
1261 (home-page "http://www.alcyone.com/software/empy/")
1262 (synopsis "Templating system for Python")
1264 "EmPy is a system for embedding Python expressions and statements in
1265 template text; it takes an EmPy source file, processes it, and produces
1266 output. This is accomplished via expansions, which are special signals to the
1267 EmPy system and are set off by a special prefix (by default the at sign, @@).
1268 EmPy can expand arbitrary Python expressions and statements in this way, as
1269 well as a variety of special forms. Textual data not explicitly delimited in
1270 this way is sent unaffected to the output, allowing Python to be used in
1271 effect as a markup language. Also supported are callbacks via hooks,
1272 recording and playback via diversions, and dynamic, chainable filters. The
1273 system is highly configurable via command line options and embedded
1275 (license license:lgpl2.1+)))
1277 (define-public python2-empy
1278 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1281 (arguments `(,@(package-arguments base)
1284 (define-public python2-element-tree
1286 (name "python2-element-tree")
1291 "http://effbot.org/media/downloads/elementtree-"
1292 version "-20050316.tar.gz"))
1295 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1296 (build-system python-build-system)
1298 `(#:python ,python-2 ; seems to be part of Python 3
1299 #:tests? #f)) ; no 'test' sub-command
1300 (synopsis "Toolkit for XML processing in Python")
1302 "ElementTree is a Python library supporting lightweight XML processing.")
1303 (home-page "http://effbot.org/zone/element-index.htm")
1304 (license (license:x11-style
1305 "http://docs.python.org/2/license.html"
1306 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1308 (define-public python2-pybugz
1310 (name "python2-pybugz")
1315 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1319 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1320 (patches (search-patches "pybugz-stty.patch"
1321 "pybugz-encode-error.patch"))))
1322 (build-system python-build-system)
1324 `(#:python ,python-2 ; SyntaxError with Python 3
1325 #:tests? #f)) ; no 'test' sub-command
1327 `(("element-tree" ,python2-element-tree)))
1328 (synopsis "Python and command-line interface to Bugzilla")
1330 "PyBugz is a Python library and command-line tool to query the Bugzilla
1331 bug tracking system. It is meant as an aid to speed up interaction with the
1333 (home-page "http://www.liquidx.net/pybugz/")
1334 (license license:gpl2)))
1336 (define-public python2-enum
1338 (name "python2-enum")
1342 (uri (pypi-uri "enum" version))
1345 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1346 (build-system python-build-system)
1348 `(#:python ,python-2))
1349 (home-page "http://pypi.python.org/pypi/enum/")
1350 (synopsis "Robust enumerated type support in Python")
1352 "This provides a module for robust enumerations in Python. It has
1353 been superseded by the Python standard library and is provided only for
1355 ;; Choice of either license.
1356 (license (list license:gpl3+ license:psfl))))
1358 (define-public python-enum34
1360 (name "python-enum34")
1365 (uri (pypi-uri "enum34" version))
1368 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1369 (build-system python-build-system)
1370 (home-page "https://pypi.python.org/pypi/enum34")
1371 (synopsis "Backported Python 3.4 Enum")
1373 "Enum34 is the new Python stdlib enum module available in Python 3.4
1374 backported for previous versions of Python from 2.4 to 3.3.")
1375 (license license:bsd-3)))
1377 (define-public python2-enum34
1378 (package-with-python2 python-enum34))
1380 (define-public python-parse-type
1382 (name "python-parse-type")
1387 (uri (pypi-uri "parse_type" version))
1390 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1391 (build-system python-build-system)
1393 `(("python-six" ,python-six)
1394 ("python-parse" ,python-parse)))
1396 `(("python-pytest" ,python-pytest)
1397 ("python-pytest-runner" ,python-pytest-runner)))
1398 (home-page "https://github.com/jenisys/parse_type")
1399 (synopsis "Extended parse module")
1401 "Parse_type extends the python parse module.")
1403 `((python2-variant . ,(delay python2-parse-type))))
1404 (license license:bsd-3)))
1406 (define-public python2-parse-type
1407 (let ((base (package-with-python2
1408 (strip-python2-variant python-parse-type))))
1409 (package (inherit base)
1411 `(("python2-enum34" ,python2-enum34)
1412 ,@(package-propagated-inputs base))))))
1414 (define-public python-parse
1416 (name "python-parse")
1421 (uri (pypi-uri "parse" version))
1424 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1425 (build-system python-build-system)
1428 (modify-phases %standard-phases
1430 (lambda _ (invoke "python" "test_parse.py"))))))
1431 (home-page "https://github.com/r1chardj0n3s/parse")
1432 (synopsis "Parse strings")
1434 "Parse strings using a specification based on the Python @code{format()}
1436 (license license:x11)))
1438 (define-public python-polib
1440 (name "python-polib")
1444 (uri (pypi-uri "polib" version))
1447 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1448 (build-system python-build-system)
1449 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1450 (synopsis "Manipulate, create and modify gettext files")
1451 (description "Polib can manipulate any gettext format (po, pot and mo)
1452 files. It can be used to create po files from scratch or to modify
1454 (license license:expat)))
1456 (define-public python2-polib
1457 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1460 (arguments `(,@(package-arguments base)
1461 ;; Tests don't work with python2.
1464 (define-public scons
1471 (url "https://github.com/SCons/scons.git")
1473 (file-name (git-file-name name version))
1476 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1477 (build-system python-build-system)
1479 `(#:use-setuptools? #f ; still relies on distutils
1480 #:tests? #f ; no 'python setup.py test' command
1482 (modify-phases %standard-phases
1483 (add-before 'build 'bootstrap
1485 (substitute* "src/engine/SCons/compat/__init__.py"
1486 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1487 "sys.modules[new] = __import__(old)"))
1488 (substitute* "src/engine/SCons/Platform/__init__.py"
1489 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1490 "mod = __import__(full_name)"))
1491 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1492 (chdir "build/scons")
1494 (home-page "http://scons.org/")
1495 (synopsis "Software construction tool written in Python")
1497 "SCons is a software construction tool. Think of SCons as an improved,
1498 cross-platform substitute for the classic Make utility with integrated
1499 functionality similar to autoconf/automake and compiler caches such as ccache.
1500 In short, SCons is an easier, more reliable and faster way to build
1502 (license license:x11)))
1504 (define-public scons-python2
1506 (inherit (package-with-python2 scons))
1507 (name "scons-python2")))
1509 (define-public python-extras
1511 (name "python-extras")
1516 (uri (pypi-uri "extras" version))
1519 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1520 (build-system python-build-system)
1522 ;; FIXME: Circular dependency on testtools.
1524 (home-page "https://github.com/testing-cabal/extras")
1525 (synopsis "Useful extensions to the Python standard library")
1527 "Extras is a set of extensions to the Python standard library.")
1528 (license license:expat)))
1530 (define-public python2-extras
1531 (package-with-python2 python-extras))
1533 (define-public python-mimeparse
1535 (name "python-mimeparse")
1540 (uri (pypi-uri "python-mimeparse" version))
1543 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1544 (build-system python-build-system)
1547 (modify-phases %standard-phases
1550 (invoke "./mimeparse_test.py"))))))
1552 "https://github.com/dbtsai/python-mimeparse")
1553 (synopsis "Python library for parsing MIME types")
1555 "Mimeparse provides basic functions for parsing MIME type names and
1556 matching them against a list of media-ranges.")
1557 (license license:expat)))
1559 (define-public python2-mimeparse
1560 (package-with-python2 python-mimeparse))
1562 (define-public python-miniboa
1564 (name "python-miniboa")
1569 (uri (pypi-uri "miniboa" version))
1572 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1573 (build-system python-build-system)
1574 (home-page "https://github.com/shmup/miniboa")
1575 (synopsis "Simple, single-threaded Telnet server")
1577 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1579 (license license:asl2.0)))
1581 (define-public python2-miniboa
1582 (package-with-python2 python-miniboa))
1584 (define-public python-pafy
1586 (name "python-pafy")
1591 (uri (pypi-uri "pafy" version))
1594 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1595 (build-system python-build-system)
1597 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1599 ;; Youtube-dl is a python package which is imported in the file
1600 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1601 `(("youtube-dl" ,youtube-dl)))
1602 (home-page "https://np1.github.io/pafy/")
1603 (synopsis "Retrieve YouTube content and metadata")
1605 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1606 (license license:lgpl3+)))
1608 (define-public python2-funcsigs
1610 (name "python2-funcsigs")
1614 (uri (pypi-uri "funcsigs" version))
1617 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1618 (build-system python-build-system)
1620 `(#:python ,python-2))
1622 `(("python2-unittest2" ,python2-unittest2)))
1623 (home-page "http://funcsigs.readthedocs.org")
1624 (synopsis "Python function signatures from PEP362")
1626 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1627 (license license:asl2.0)))
1629 (define-public python2-funcsigs-bootstrap
1631 (inherit python2-funcsigs)
1632 (name "python2-funcsigs-bootstrap")
1636 ,@(package-arguments python2-funcsigs)))))
1638 (define-public python-py
1645 (uri (pypi-uri "py" version))
1648 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1649 (build-system python-build-system)
1651 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1652 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1653 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1654 ;; Is this module globally installed?"
1657 `(("python-setuptools-scm" ,python-setuptools-scm)))
1658 (home-page "https://github.com/pytest-dev/py")
1659 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1661 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1662 code introspection, and logging.")
1663 (license license:expat)))
1665 (define-public python2-py
1666 (package-with-python2 python-py))
1668 ;; Recent versions of python-fixtures and python-testrepository need
1669 ;; python-pbr for packaging, which itself needs these two packages for
1671 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1672 ;; same source, just without any test dependencies and with tests disabled.
1673 ;; python-pbr-minmal is then used to package python-fixtures and
1674 ;; python-testrepository.
1675 ;; Strictly speaking we currently could remove the test-requirements from the
1676 ;; normal python-pbr package (and save this package) since test are disabled
1677 ;; there anyway. But this may change in future.
1678 (define-public python-pbr-minimal
1680 (name "python-pbr-minimal")
1685 (uri (pypi-uri "pbr" version))
1688 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1689 (build-system python-build-system)
1692 (home-page "http://docs.openstack.org/developer/pbr/")
1693 (synopsis "Minimal build of python-pbr used for bootstrapping")
1695 "Used only for bootstrapping python2-pbr, you should not need this.")
1696 (license license:asl2.0)))
1698 (define-public python2-pbr-minimal
1699 (package-with-python2 python-pbr-minimal))
1701 (define-public python-pbr
1703 (inherit python-pbr-minimal)
1706 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1708 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1710 `(("python-fixtures" ,python-fixtures-bootstrap)
1711 ;; discover, coverage, hacking, subunit
1712 ("python-mock" ,python-mock)
1713 ("python-six" ,python-six)
1714 ("python-sphinx" ,python-sphinx)
1715 ("python-testrepository" ,python-testrepository-bootstrap)
1716 ("python-testresources" ,python-testresources-bootstrap)
1717 ("python-testscenarios" ,python-testscenarios-bootstrap)
1718 ("python-testtools" ,python-testtools-bootstrap)
1719 ("python-virtualenv" ,python-virtualenv)))
1720 (synopsis "Enhance the default behavior of Python’s setuptools")
1722 "Python Build Reasonableness (PBR) is a library that injects some useful
1723 and sensible default behaviors into your setuptools run. It will set
1724 versions, process requirements files and generate AUTHORS and ChangeLog file
1725 from git information.
1728 (define-public python2-pbr
1729 (package-with-python2 python-pbr))
1731 (define-public python-pyrsistent
1733 (name "python-pyrsistent")
1735 (home-page "https://github.com/tobgu/pyrsistent")
1738 (uri (pypi-uri "pyrsistent" version))
1741 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1742 (build-system python-build-system)
1744 `(("python-hypothesis" ,python-hypothesis)
1745 ("python-pytest" ,python-pytest)
1746 ("python-pytest-runner" ,python-pytest-runner)))
1748 `(("python-six" ,python-six)))
1749 (synopsis "Persistent data structures for Python")
1751 "Pyrsistent is a number of persistent collections (by some referred to as
1752 functional data structures). Persistent in the sense that they are immutable.
1754 All methods on a data structure that would normally mutate it instead return a
1755 new copy of the structure containing the requested updates. The original
1756 structure is left untouched.")
1757 (license license:expat)))
1759 (define-public python2-pyrsistent
1760 (package-with-python2 python-pyrsistent))
1762 (define-public python-exif-read
1764 (name "python-exif-read")
1768 (uri (pypi-uri "ExifRead" version))
1771 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; no tests
1774 (home-page "https://github.com/ianare/exif-py")
1775 (synopsis "Python library to extract EXIF data from image files")
1777 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1779 (license license:bsd-3)))
1781 (define-public python2-exif-read
1782 (package-with-python2 python-exif-read))
1784 (define-public python-pyld
1786 (name "python-pyld")
1790 (uri (pypi-uri "PyLD" version))
1793 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1794 (build-system python-build-system)
1795 (home-page "https://github.com/digitalbazaar/pyld")
1796 (synopsis "Python implementation of the JSON-LD specification")
1798 "PyLD is an implementation of the JSON-LD specification.")
1799 (license license:bsd-3)))
1801 (define-public python2-pyld
1802 (package-with-python2 python-pyld))
1804 (define-public python-click
1806 (name "python-click")
1811 (uri (pypi-uri "click" version))
1814 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1815 (build-system python-build-system)
1818 (modify-phases %standard-phases
1819 (add-after 'unpack 'fix-paths
1820 (lambda* (#:key inputs #:allow-other-keys)
1821 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1822 "cross-libc" "libc"))))
1823 (substitute* "click/_unicodefun.py"
1825 (string-append "'" glibc "/bin/locale'"))))
1829 (invoke "python" "-m" "pytest"))))))
1831 `(("python-pytest" ,python-pytest)))
1832 (home-page "https://palletsprojects.com/p/click/")
1833 (synopsis "Command line library for Python")
1835 "Click is a Python package for creating command line interfaces in a
1836 composable way with as little code as necessary. Its name stands for
1837 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1838 with sensible defaults out of the box.")
1839 (license license:bsd-3)))
1841 (define-public python2-click
1842 (package-with-python2 python-click))
1844 (define-public python-wheel
1846 (name "python-wheel")
1851 (uri (pypi-uri "wheel" version))
1854 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1855 (build-system python-build-system)
1857 `(("python-jsonschema" ,python-jsonschema)
1858 ("python-pytest-cov" ,python-pytest-cov)))
1859 (home-page "https://bitbucket.org/pypa/wheel/")
1860 (synopsis "Format for built Python packages")
1862 "A wheel is a ZIP-format archive with a specially formatted filename and
1863 the @code{.whl} extension. It is designed to contain all the files for a PEP
1864 376 compatible install in a way that is very close to the on-disk format. Many
1865 packages will be properly installed with only the @code{Unpack} step and the
1866 unpacked archive preserves enough information to @code{Spread} (copy data and
1867 scripts to their final locations) at any later time. Wheel files can be
1868 installed with a newer @code{pip} or with wheel's own command line utility.")
1869 (license license:expat)
1870 (properties `((python2-variant . ,(delay python2-wheel))))))
1872 (define-public python2-wheel
1873 (let ((wheel (package-with-python2
1874 (strip-python2-variant python-wheel))))
1875 (package (inherit wheel)
1876 (native-inputs `(("python2-functools32" ,python2-functools32)
1877 ,@(package-native-inputs wheel))))))
1879 (define-public python-vcversioner
1881 (name "python-vcversioner")
1882 (version "2.16.0.0")
1886 (uri (pypi-uri "vcversioner" version))
1889 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1890 (build-system python-build-system)
1891 (synopsis "Python library for version number discovery")
1892 (description "Vcversioner is a Python library that inspects tagging
1893 information in a variety of version control systems in order to discover
1895 (home-page "https://github.com/habnabit/vcversioner")
1896 (license license:isc)))
1898 (define-public python2-vcversioner
1899 (package-with-python2 python-vcversioner))
1901 (define-public python-jdcal
1903 (name "python-jdcal")
1908 (uri (pypi-uri "jdcal" version))
1911 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1912 (build-system python-build-system)
1914 `(#:phases (modify-phases %standard-phases
1917 (invoke "pytest"))))))
1919 `(("python-pytest" ,python-pytest)))
1920 (home-page "https://github.com/phn/jdcal")
1921 (synopsis "Functions to convert between Julian dates Gregorian dates")
1922 (description "This Python library provides functions for converting
1923 between Julian dates and Gregorian dates.")
1924 (license license:bsd-2)))
1926 (define-public python2-jdcal
1927 (package-with-python2 python-jdcal))
1929 (define-public python-jsonschema
1931 (name "python-jsonschema")
1935 (uri (pypi-uri "jsonschema" version))
1938 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1939 (build-system python-build-system)
1942 (modify-phases %standard-phases
1945 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1946 (invoke "trial" "jsonschema"))))))
1948 `(("python-setuptools_scm" ,python-setuptools-scm)
1949 ("python-twisted" ,python-twisted)))
1951 `(("python-attrs" ,python-attrs)
1952 ("python-pyrsistent" ,python-pyrsistent)
1953 ("python-six" ,python-six)))
1954 (home-page "https://github.com/Julian/jsonschema")
1955 (synopsis "Implementation of JSON Schema for Python")
1957 "Jsonschema is an implementation of JSON Schema for Python.")
1958 (license license:expat)
1959 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1961 (define-public python2-jsonschema
1962 (let ((jsonschema (package-with-python2
1963 (strip-python2-variant python-jsonschema))))
1964 (package (inherit jsonschema)
1966 `(("python2-functools32" ,python2-functools32)
1967 ,@(package-propagated-inputs jsonschema))))))
1969 (define-public python-schema
1971 (name "python-schema")
1976 (uri (pypi-uri "schema" version))
1979 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1980 (build-system python-build-system)
1982 `(("python-pytest" ,python-pytest)))
1983 (home-page "https://github.com/keleshev/schema")
1984 (synopsis "Simple data validation library")
1986 "@code{python-schema} is a library for validating Python data
1987 structures, such as those obtained from config-files, forms, external
1988 services or command-line parsing, converted from JSON/YAML (or
1989 something else) to Python data-types.")
1990 (license license:psfl)))
1992 (define-public python2-schema
1993 (package-with-python2 python-schema))
1995 (define-public python-schema-0.5
1996 (package (inherit python-schema)
2001 (uri (pypi-uri "schema" version))
2004 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2006 (define-public python2-schema-0.5
2007 (package-with-python2 python-schema-0.5))
2009 (define-public python-kitchen
2011 (name "python-kitchen")
2016 (uri (pypi-uri "kitchen" version))
2019 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2020 (build-system python-build-system)
2022 `(("python-chardet" ,python-chardet)))
2023 (home-page "https://github.com/fedora-infra/kitchen")
2024 (synopsis "Python API for snippets")
2025 (description "@code{kitchen} module provides a python API for all sorts of
2026 little useful snippets of code that everybody ends up writing for their projects
2027 but never seem big enough to build an independent release. Use kitchen and stop
2028 cutting and pasting that code over and over.")
2029 (license (list license:lgpl2.1+
2030 ;; subprocess.py, test_subprocess.py,
2031 ;; kitchen/pycompat25/defaultdict.py:
2034 (define-public python2-kitchen
2035 (package-with-python2 python-kitchen))
2037 (define-public python-unidecode
2039 (name "python-unidecode")
2043 (uri (pypi-uri "Unidecode" version))
2046 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2047 (build-system python-build-system)
2048 (home-page "https://pypi.python.org/pypi/Unidecode")
2049 (synopsis "ASCII transliterations of Unicode text")
2051 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2052 useful when integrating with legacy code that doesn't support Unicode, or for
2053 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2054 machine identifiers from human-readable Unicode strings that should still be
2055 somewhat intelligible.")
2056 (license license:gpl2+)))
2058 (define-public python2-unidecode
2059 (package-with-python2 python-unidecode))
2061 (define-public python-pyjwt
2063 (name "python-pyjwt")
2068 (uri (pypi-uri "PyJWT" version))
2071 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2072 (modules '((guix build utils)))
2075 (for-each delete-file-recursively
2076 (find-files "." "\\.pyc$"))
2078 (build-system python-build-system)
2080 `(("python-pytest" ,python-pytest)
2081 ("python-pytest-cov" ,python-pytest-cov)
2082 ("python-pytest-runner" ,python-pytest-runner)))
2083 (home-page "https://github.com/progrium/pyjwt")
2084 (synopsis "JSON Web Token implementation in Python")
2086 "PyJWT is a JSON Web Token implementation written in Python.")
2087 (license license:expat)))
2089 (define-public python2-pyjwt
2090 (package-with-python2 python-pyjwt))
2092 (define-public python-pykka
2094 (name "python-pykka")
2099 (uri (pypi-uri "Pykka" version))
2102 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2103 (build-system python-build-system)
2105 `(("python-mock" ,python-mock)
2106 ("python-nose" ,python-nose)
2107 ("python-gevent" ,python-gevent)
2108 ("python-eventlet" ,python-eventlet)))
2109 (home-page "https://www.pykka.org/")
2110 (synopsis "Pykka is a Python implementation of the actor model")
2112 "Pykka is a Python implementation of the actor model.
2113 The actor model introduces some simple rules to control the sharing
2114 of state and cooperation between execution units, which makes it
2115 easier to build concurrent applications.")
2116 (license license:asl2.0)))
2118 (define-public python2-pykka
2119 (package-with-python2 python-pykka))
2121 (define-public python-pymsgbox
2123 (name "python-pymsgbox")
2129 ;; LICENSE.txt is not present on pypi
2130 (url "https://github.com/asweigart/PyMsgBox")
2131 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2132 (file-name (git-file-name name version))
2135 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2137 ;; Circular dependency to run tests:
2138 ;; Tests need pyautogui, which depends on pymsgbox.
2140 (build-system python-build-system)
2141 (home-page "https://github.com/asweigart/PyMsgBox")
2142 (synopsis "Python module for JavaScript-like message boxes")
2144 "PyMsgBox is a simple, cross-platform, pure Python module for
2145 JavaScript-like message boxes. Types of dialog boxes include:
2153 (license license:bsd-3)))
2155 (define-public python-pympler
2157 (name "python-pympler")
2158 (home-page "https://pythonhosted.org/Pympler/")
2162 (uri (pypi-uri "Pympler" version))
2165 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2166 (build-system python-build-system)
2168 `(#:phases (modify-phases %standard-phases
2170 (add-after 'install 'check
2171 (lambda* (#:key inputs outputs #:allow-other-keys)
2172 (add-installed-pythonpath inputs outputs)
2173 (invoke "python" "setup.py" "test"))))))
2174 (synopsis "Measure, monitor and analyze memory behavior")
2176 "Pympler is a development tool to measure, monitor and analyze
2177 the memory behavior of Python objects in a running Python application.
2179 By pympling a Python application, detailed insight in the size and the
2180 lifetime of Python objects can be obtained. Undesirable or unexpected
2181 runtime behavior like memory bloat and other @samp{pymples} can easily
2184 A web profiling frontend exposes process statistics, garbage
2185 visualisation and class tracker statistics.")
2186 (license license:asl2.0)))
2188 (define-public python2-pympler
2189 (package-with-python2 python-pympler))
2191 (define-public python-itsdangerous
2193 (name "python-itsdangerous")
2198 (uri (pypi-uri "itsdangerous" version))
2201 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2202 (build-system python-build-system)
2203 (home-page "https://palletsprojects.com/p/itsdangerous/")
2204 (synopsis "Python library for passing data to/from untrusted environments")
2206 "Itsdangerous provides various helpers to pass trusted data to untrusted
2207 environments and back.")
2208 (license license:bsd-3)))
2210 (define-public python2-itsdangerous
2211 (package-with-python2 python-itsdangerous))
2213 (define-public python-pyyaml
2215 (name "python-pyyaml")
2220 (uri (pypi-uri "PyYAML" version))
2223 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2224 (build-system python-build-system)
2226 `(("libyaml" ,libyaml)))
2227 (home-page "http://pyyaml.org/wiki/PyYAML")
2228 (synopsis "YAML parser and emitter for Python")
2230 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2231 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2232 API, and sensible error messages. PyYAML supports standard YAML tags and
2233 provides Python-specific tags that allow to represent an arbitrary Python
2235 (license license:expat)))
2237 (define-public python2-pyyaml
2238 (package-with-python2 python-pyyaml))
2240 (define-public python-vine
2242 (name "python-vine")
2247 (uri (pypi-uri "vine" version))
2250 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2251 (build-system python-build-system)
2253 `(("python-pytest" ,python-pytest)
2254 ("python-case" ,python-case)))
2255 (home-page "https://github.com/celery/vine")
2256 (synopsis "Promises for Python")
2258 "@code{vine} provides a special implementation of promises in that it can
2259 be used both for \"promise of a value\" and lazy evaluation. The biggest
2260 upside for this is that everything in a promise can also be a promise,
2261 e.g. filters, callbacks and errbacks can all be promises.")
2262 (license license:bsd-3)))
2264 (define-public python-virtualenv
2266 (name "python-virtualenv")
2271 (uri (pypi-uri "virtualenv" version))
2274 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2275 (build-system python-build-system)
2278 (modify-phases %standard-phases
2279 (add-before 'check 'disable-failing-test
2281 ;; Disable failing test. See upstream bug report
2282 ;; https://github.com/pypa/virtualenv/issues/957
2283 (substitute* "tests/test_virtualenv.py"
2284 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2287 `(("python-mock" ,python-mock)
2288 ("python-pytest" ,python-pytest)))
2289 (home-page "https://virtualenv.pypa.io/")
2290 (synopsis "Virtual Python environment builder")
2292 "Virtualenv is a tool to create isolated Python environments.")
2293 (license license:expat)))
2295 (define-public python2-virtualenv
2296 (package-with-python2 python-virtualenv))
2298 (define-public python-markupsafe
2300 (name "python-markupsafe")
2305 (uri (pypi-uri "MarkupSafe" version))
2308 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2309 (build-system python-build-system)
2310 (home-page "https://github.com/mitsuhiko/markupsafe")
2311 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2313 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2315 (license license:bsd-3)))
2317 (define-public python2-markupsafe
2318 (package-with-python2 python-markupsafe))
2320 (define-public python-jinja2
2322 (name "python-jinja2")
2327 (uri (pypi-uri "Jinja2" version))
2330 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2331 (build-system python-build-system)
2333 `(("python-markupsafe" ,python-markupsafe)))
2334 (home-page "http://jinja.pocoo.org/")
2335 (synopsis "Python template engine")
2337 "Jinja2 is a small but fast and easy to use stand-alone template engine
2338 written in pure Python.")
2339 (license license:bsd-3)))
2341 (define-public python2-jinja2
2342 (package-with-python2 python-jinja2))
2344 (define-public python-pystache
2346 (name "python-pystache")
2350 (uri (pypi-uri "pystache" version))
2353 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2354 (build-system python-build-system)
2356 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2357 (home-page "http://defunkt.io/pystache/")
2358 (synopsis "Python logic-less template engine")
2360 "Pystache is a Python implementation of the framework agnostic,
2361 logic-free templating system Mustache.")
2362 (license license:expat)
2363 (properties `((python2-variant . ,(delay python2-pystache))))))
2365 (define-public python2-pystache
2366 (package (inherit (package-with-python2
2367 (strip-python2-variant python-pystache)))
2369 `(#:python ,python-2
2371 (modify-phases %standard-phases
2374 (invoke "python" "test_pystache.py"))))))))
2376 (define-public python-joblib
2378 (name "python-joblib")
2382 (uri (pypi-uri "joblib" version))
2385 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2386 (build-system python-build-system)
2389 (modify-phases %standard-phases
2391 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2393 `(("python-pytest" ,python-pytest)))
2394 (home-page "https://joblib.readthedocs.io/")
2395 (synopsis "Using Python functions as pipeline jobs")
2397 "Joblib is a set of tools to provide lightweight pipelining in Python.
2398 In particular, joblib offers: transparent disk-caching of the output values
2399 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2400 logging and tracing of the execution.")
2401 (license license:bsd-3)))
2403 (define-public python2-joblib
2404 (package-with-python2 python-joblib))
2406 (define-public python-daemon
2408 (name "python-daemon")
2413 (uri (pypi-uri "python-daemon" version))
2416 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2417 (build-system python-build-system)
2420 (modify-phases %standard-phases
2421 (add-before 'check 'disable-tests
2423 ;; FIXME: Determine why test fails
2424 (substitute* "test/test_daemon.py"
2425 (("test_detaches_process_context")
2426 "skip_test_detaches_process_context"))
2429 `(("python-lockfile" ,python-lockfile)))
2431 `(("python-unittest2" ,python-unittest2)
2432 ("python-testtools" ,python-testtools)
2433 ("python-testscenarios" ,python-testscenarios)
2434 ("python-mock" ,python-mock)
2435 ("python-docutils" ,python-docutils)))
2436 (home-page "https://pagure.io/python-daemon/")
2437 (synopsis "Python library for making a Unix daemon process")
2438 (description "Python-daemon is a library that assists a Python program to
2439 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2441 This library provides a @code{DaemonContext} class that manages the following
2442 important tasks for becoming a daemon process:
2444 @item Detach the process into its own process group.
2445 @item Set process environment appropriate for running inside a chroot.
2446 @item Renounce suid and sgid privileges.
2447 @item Close all open file descriptors.
2448 @item Change the working directory, uid, gid, and umask.
2449 @item Set appropriate signal handlers.
2450 @item Open new file descriptors for stdin, stdout, and stderr.
2451 @item Manage a specified PID lock file.
2452 @item Register cleanup functions for at-exit processing.
2454 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2455 (license (list license:asl2.0 license:gpl3+))))
2457 (define-public python-docutils
2459 (name "python-docutils")
2464 (uri (pypi-uri "docutils" version))
2467 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2468 (build-system python-build-system)
2470 '(#:tests? #f)) ; no setup.py test command
2471 (home-page "http://docutils.sourceforge.net/")
2472 (synopsis "Python Documentation Utilities")
2474 "Docutils is a modular system for processing documentation into useful
2475 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2477 ;; Most of the source code is public domain, but some source files are
2478 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2479 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2481 (define-public python2-docutils
2482 (package-with-python2 python-docutils))
2484 (define-public python-pygments
2486 (name "python-pygments")
2491 (uri (pypi-uri "Pygments" version))
2494 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2495 (build-system python-build-system)
2497 ;; FIXME: Tests require sphinx, which depends on this.
2499 (home-page "http://pygments.org/")
2500 (synopsis "Syntax highlighting")
2502 "Pygments is a syntax highlighting package written in Python.")
2503 (license license:bsd-2)))
2505 (define-public python2-pygments
2506 (package-with-python2 python-pygments))
2508 (define-public python-bumpversion
2510 (name "python-bumpversion")
2515 (uri (pypi-uri "bumpversion" version))
2518 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2519 (build-system python-build-system)
2520 (home-page "https://github.com/peritus/bumpversion")
2521 (synopsis "Tool to bump software version")
2522 (description "This tool provides a command-line interface (CLI) to bump a
2523 software version simply.")
2524 (license license:expat)))
2526 (define-public python-deprecated
2528 (name "python-deprecated")
2534 (url "https://github.com/tantale/deprecated.git")
2535 (commit (string-append "v" version))))
2536 (file-name (git-file-name name version))
2539 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2540 (build-system python-build-system)
2542 `(#:phases (modify-phases %standard-phases
2545 (invoke "pytest"))))))
2547 `(("python-wrapt" ,python-wrapt)))
2549 `(("python-bumpversion" ,python-bumpversion)
2550 ("python-pytest" ,python-pytest)
2551 ("python-pytest-cov" ,python-pytest-cov)
2552 ("python-sphinx" ,python-sphinx)
2553 ("python-tox" ,python-tox)))
2554 (home-page "https://github.com/tantale/deprecated")
2555 (synopsis "Python decorator to deprecate classes, functions or methods")
2556 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2557 to deprecate classes, functions or methods.")
2558 (license license:expat)))
2560 (define-public python-pygithub
2562 (name "python-pygithub")
2565 ;; We fetch from the Git repo because there are no tests in the PyPI
2570 (url "https://github.com/PyGithub/PyGithub.git")
2571 (commit (string-append "v" version))))
2572 (file-name (git-file-name name version))
2575 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2576 (build-system python-build-system)
2578 `(#:phases (modify-phases %standard-phases
2579 ;; Some tests rely on the network.
2580 (add-after 'unpack 'disable-failing-tests
2582 (substitute* "tests/Issue142.py"
2583 (("testDecodeJson") "disabled_testDecodeJson"))
2585 (add-before 'check 'prepare-for-tests
2587 (for-each (lambda (f)
2589 (find-files "./tests"))
2590 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2591 (setenv "PYTHONPATH"
2592 (string-append "./tests:" (getenv "PYTHONPATH")))
2595 `(("python-deprecated" ,python-deprecated)
2596 ("python-pyjwt" ,python-pyjwt)
2597 ("python-requests" ,python-requests)))
2598 (native-inputs `(("python-httpretty" ,python-httpretty)))
2599 (home-page "https://pygithub.readthedocs.io/en/latest/")
2600 (synopsis "Python library for the GitHub API")
2601 (description "This library allows managing GitHub resources such as
2602 repositories, user profiles, and organizations in your Python applications,
2603 using version 3 of the GitHub application programming interface (API).")
2604 (license license:lgpl3+)))
2606 (define-public python-rellu
2608 (name "python-rellu")
2613 (uri (pypi-uri "rellu" version))
2616 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2617 (build-system python-build-system)
2619 `(("python-invoke" ,python-invoke)
2620 ("python-pygithub" ,python-pygithub)))
2621 (home-page "https://github.com/robotframework/rellu")
2622 (synopsis "Utilities to create PyPI releases")
2623 (description "This collection of utilities contains tooling and templates
2624 to assist in creating releases on GitHub and publishing them on PyPI. It is
2625 designed to be used by Robot Framework and tools and libraries in its
2626 ecosystem, but can naturally be used also by other projects.")
2627 (license license:asl2.0)))
2629 (define-public python-robotframework
2631 (name "python-robotframework")
2633 ;; There are no tests in the PyPI archive.
2638 (url "https://github.com/robotframework/robotframework.git")
2639 (commit (string-append "v" version))))
2640 (file-name (git-file-name name version))
2643 "1aaiamc9l35m5sf7xl2qc5q9308v7sz3p1qgzcslsjxzddphyn4v"))
2644 (patches (search-patches
2645 "python-robotframework-honor-source-date-epoch.patch"))))
2646 (build-system python-build-system)
2648 `(#:phases (modify-phases %standard-phases
2649 (add-before 'build 'build-and-install-doc
2650 (lambda* (#:key outputs #:allow-other-keys)
2651 (let* ((doc-output (assoc-ref outputs "doc"))
2652 (doc (string-append doc-output "/share/"
2653 ,name "-" ,version "/")))
2654 (invoke "invoke" "library-docs" "all")
2656 (copy-recursively "doc/libraries"
2657 (string-append doc "/libraries"))
2661 (invoke "python" "utest/run.py"))))))
2663 `(("python-invoke" ,python-invoke)
2664 ("python-rellu" ,python-rellu)
2665 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2666 (outputs '("out" "doc"))
2667 (home-page "https://robotframework.org")
2668 (synopsis "Generic automation framework")
2669 (description "Robot Framework is a generic automation framework for
2670 acceptance testing, acceptance test driven development (ATDD), and robotic
2671 process automation (RPA).")
2672 (license license:asl2.0)))
2674 (define-public python-robotframework-lint
2675 ;; There is no properly tagged release; the commit below seems to correspond
2676 ;; to the 0.9 stable release available from PyPI. The tests are not
2677 ;; included in the PyPI archive, so we fetch the sources from the upstream
2679 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2682 (name "python-robotframework-lint")
2683 (version (git-version "0.9.0" revision commit))
2688 (url "https://github.com/boakley/robotframework-lint.git")
2690 (file-name (git-file-name name version))
2693 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2694 (build-system python-build-system)
2697 (modify-phases %standard-phases
2700 (invoke "python" "-m" "robot" "-A"
2701 "tests/conf/default.args" "tests"))))))
2703 `(("python-robotframework" ,python-robotframework)))
2704 (home-page "https://github.com/boakley/robotframework-lint/")
2705 (synopsis "Static analysis tool (linter) for Robot Framework")
2706 (description "This package provides the @code{rflint} command-line
2707 utility, a static analysis tool (linter) for Robot Framework source files.")
2708 (license license:asl2.0))))
2710 (define-public python-robotframework-sshlibrary
2712 (name "python-robotframework-sshlibrary")
2714 ;; There are no tests in the PyPI archive.
2719 (url "https://github.com/robotframework/SSHLibrary.git")
2720 (commit (string-append "v" version))))
2721 (file-name (git-file-name name version))
2724 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2725 (build-system python-build-system)
2728 (modify-phases %standard-phases
2729 (add-before 'build 'build-and-install-doc
2730 (lambda* (#:key outputs #:allow-other-keys)
2731 (let* ((doc-output (assoc-ref outputs "doc"))
2732 (doc (string-append doc-output "/share/"
2733 ,name "-" ,version "/")))
2734 (invoke "chmod" "-R" "+w" "docs")
2735 (invoke "invoke" "kw-docs" "project-docs")
2737 (for-each delete-file (find-files "docs" "\\.rst"))
2738 (copy-recursively "docs" doc)
2742 ;; Some tests require an SSH server; we remove them.
2743 (delete-file "utest/test_client_api.py")
2744 (delete-file "utest/test_scp.py")
2745 (invoke "python" "utest/run.py"))))))
2747 `(("python-robotframework" ,python-robotframework)
2748 ("python-paramiko" ,python-paramiko)
2749 ("python-scp" ,python-scp)))
2751 `(("openssh" ,openssh)
2753 ;; To generate the documentation
2754 ("python-docutils" ,python-docutils)
2755 ("python-invoke" ,python-invoke)
2756 ("python-pygments" ,python-pygments)
2757 ("python-rellu" ,python-rellu)))
2758 (outputs '("out" "doc"))
2759 (home-page "https://github.com/robotframework/SSHLibrary")
2760 (synopsis "Robot Framework library for SSH and SFTP")
2761 (description "SSHLibrary is a Robot Framework library providing support
2762 for SSH and SFTP. It has the following main usages:
2764 @item Executing commands on the remote machine, either blocking or non-blocking.
2765 @item Writing and reading in an interactive shell.
2766 @item Transferring files and directories over SFTP.
2767 @item Ensuring that files and directories exist on the remote machine.
2769 (license license:asl2.0)))
2771 (define-public python-scp
2778 (uri (pypi-uri "scp" version))
2781 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2782 (build-system python-build-system)
2784 '(#:tests? #f)) ;tests require an SSH server
2786 `(("python-paramiko" ,python-paramiko)))
2787 (home-page "https://github.com/jbardin/scp.py")
2788 (synopsis "SCP protocol module for Python and Paramiko")
2789 (description "The scp module extends the Paramiko library to send and
2790 receive files via the SCP1 protocol, as implemented by the OpenSSH
2791 @command{scp} program.")
2792 (license license:gpl2+)))
2794 (define-public python-rst.linker
2796 (name "python-rst.linker")
2801 (uri (pypi-uri "rst.linker" version))
2804 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2805 (build-system python-build-system)
2807 `(("python-dateutil" ,python-dateutil)
2808 ("python-six" ,python-six)))
2810 `(("python-setuptools-scm" ,python-setuptools-scm)))
2811 ;; Test would require path.py, which would introduce a cyclic dependence.
2812 (arguments `(#:tests? #f))
2813 ;; Note: As of version 1.7 the documentation is not worth building.
2814 (home-page "https://github.com/jaraco/rst.linker")
2815 (synopsis "Sphinx plugin to add links and timestamps")
2816 (description "rst.linker allows to automatically replace text by a
2817 reStructuredText external reference or timestamps. It's primary purpose is to
2818 augment the changelog, but it can be used for other documents, too.")
2819 (license license:expat)))
2821 (define-public python2-rst.linker
2822 (package-with-python2 python-rst.linker))
2824 (define-public python-feedgenerator
2826 (name "python-feedgenerator")
2831 (uri (pypi-uri "feedgenerator" version))
2834 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2835 (modules '((guix build utils)))
2838 ;; Remove pre-compiled .pyc files from source.
2839 (for-each delete-file-recursively
2840 (find-files "." "__pycache__" #:directories? #t))
2841 (for-each delete-file (find-files "." "\\.pyc$"))
2843 (build-system python-build-system)
2845 `(("python-pytz" ,python-pytz)
2846 ("python-six" ,python-six)))
2847 (home-page "https://github.com/getpelican/feedgenerator")
2849 "Standalone version of Django's Atom/RSS feed generator")
2851 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2852 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2853 (license license:bsd-3)))
2855 (define-public python2-feedgenerator
2856 (package-with-python2 python-feedgenerator))
2858 (define-public python-toml
2860 (name "python-toml")
2865 (uri (pypi-uri "toml" version))
2868 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2869 (build-system python-build-system)
2871 `(#:tests? #f)) ;no tests suite in release
2872 (home-page "https://github.com/uiri/toml")
2873 (synopsis "Library for TOML")
2875 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2876 Language (TOML) configuration files.")
2877 (license license:expat)))
2879 (define-public python-jsonrpc-server
2881 (name "python-jsonrpc-server")
2886 (uri (pypi-uri "python-jsonrpc-server" version))
2889 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2890 (build-system python-build-system)
2892 `(("python-future" ,python-future)
2893 ("python-mock" ,python-mock)
2894 ("python-pytest" ,python-pytest)))
2896 "https://github.com/palantir/python-jsonrpc-server")
2897 (synopsis "JSON RPC 2.0 server library")
2899 "This package provides a JSON RPC 2.0 server library for Python.")
2900 (license license:expat)))
2902 (define-public python-pydocstyle
2904 (name "python-pydocstyle")
2909 (uri (pypi-uri "pydocstyle" version))
2912 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2913 (build-system python-build-system)
2915 `(("python-six" ,python-six)
2916 ("python-snowballstemmer" ,python-snowballstemmer)))
2918 "https://github.com/PyCQA/pydocstyle/")
2919 (synopsis "Python docstring style checker")
2921 "This package provides a style checker for the Python Language
2923 (license license:expat)))
2925 (define-public python-language-server
2927 (name "python-language-server")
2932 (uri (pypi-uri "python-language-server" version))
2935 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
2936 (build-system python-build-system)
2938 `(("python-pluggy" ,python-pluggy)
2939 ("python-jsonrpc-server" ,python-jsonrpc-server)
2940 ("python-jedi" ,python-jedi)
2941 ("python-yapf" ,python-yapf)
2942 ("python-pyflakes" ,python-pyflakes)
2943 ("python-pydocstyle" ,python-pydocstyle)
2944 ("python-pycodestyle" ,python-pycodestyle)
2945 ("python-mccabe" ,python-mccabe)
2946 ("python-rope" ,python-rope)
2947 ("python-autopep8" ,python-autopep8)
2948 ("python-pylint" ,python-pylint)))
2949 (home-page "https://github.com/palantir/python-language-server")
2950 (synopsis "Python implementation of the Language Server Protocol")
2952 "The Python Language Server (pyls) is an implementation of the Python 3
2953 language specification for the Language Server Protocol (LSP). This tool is
2954 used in text editing environments to provide a complete and integrated
2955 feature-set for programming Python effectively.")
2956 (license license:expat)))
2958 (define-public python-black
2960 (name "python-black")
2965 (uri (pypi-uri "black" version))
2968 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2969 (build-system python-build-system)
2972 (modify-phases %standard-phases
2973 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2975 (let ((python3 (which "python3")))
2976 (substitute* '("tests/data/fmtonoff.py"
2977 "tests/data/string_prefixes.py"
2978 "tests/data/function.py")
2979 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2980 (string-append "#!" python3 (if (string? minor-version)
2984 `(("python-click" ,python-click)
2985 ("python-attrs" ,python-attrs)
2986 ("python-appdirs" ,python-appdirs)
2987 ("python-toml" ,python-toml)))
2988 (home-page "https://github.com/ambv/black")
2989 (synopsis "The uncompromising code formatter")
2990 (description "Black is the uncompromising Python code formatter.")
2991 (license license:expat)))
2993 (define-public python-blinker
2995 (name "python-blinker")
3000 (uri (pypi-uri "blinker" version))
3003 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3004 (build-system python-build-system)
3005 (home-page "http://pythonhosted.org/blinker/")
3006 (synopsis "Fast, simple object-to-object and broadcast signaling")
3008 "Blinker provides a fast dispatching system that allows any number of
3009 interested parties to subscribe to events, or \"signals\".")
3010 (license license:expat)))
3012 (define-public python2-blinker
3013 (package-with-python2 python-blinker))
3015 (define-public pelican
3022 (uri (pypi-uri "pelican" version))
3025 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3026 (build-system python-build-system)
3028 `(("python-feedgenerator" ,python-feedgenerator)
3029 ("python-jinja2" ,python-jinja2)
3030 ("python-pygments" ,python-pygments)
3031 ("python-docutils" ,python-docutils)
3032 ("python-pytz" ,python-pytz)
3033 ("python-blinker" ,python-blinker)
3034 ("python-unidecode" ,python-unidecode)
3035 ("python-six" ,python-six)
3036 ("python-dateutil" ,python-dateutil)
3037 ("python-markdown" ,python-markdown)))
3038 (home-page "https://getpelican.com/")
3040 `(;; XXX Requires a lot more packages to do unit tests :P
3042 #:phases (modify-phases %standard-phases
3044 'install 'adjust-requires
3045 ;; Since feedgenerator is installed from git, it doesn't
3046 ;; conform to the version requirements.
3048 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3049 ;; version requirement so setuptools doesn't get confused.
3051 (substitute* "setup.py"
3052 (("['\"]feedgenerator.*?['\"]")
3053 "'feedgenerator'")))))))
3054 (synopsis "Python-based static site publishing system")
3056 "Pelican is a tool to generate a static blog from reStructuredText,
3057 Markdown input files, and more. Pelican uses Jinja2 for templating
3058 and is very extensible.")
3059 (license license:agpl3+)))
3061 (define-public mallard-ducktype
3063 (name "mallard-ducktype")
3068 ;; git-reference because a proper source tarball is not available
3069 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3071 (url "https://github.com/projectmallard/mallard-ducktype.git")
3073 (file-name (git-file-name name version))
3076 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3077 (build-system python-build-system)
3078 (home-page "http://projectmallard.org")
3079 (synopsis "Convert Ducktype to Mallard documentation markup")
3081 "Ducktype is a lightweight syntax that can represent all the semantics
3082 of the Mallard XML documentation system. Ducktype files can be converted to
3083 Mallard using the @command{ducktype} tool. The yelp-tools package
3084 provides additional functionality on the produced Mallard documents.")
3085 (license license:expat)))
3087 (define-public python-scikit-image
3089 (name "python-scikit-image")
3094 (uri (pypi-uri "scikit-image" version))
3096 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3097 (build-system python-build-system)
3099 ;; TODO: Some tests require running X11 server. Disable them?
3101 ;; See DEPENDS.txt for the list of build and run time requiremnts
3103 `(("python-cloudpickle" ,python-cloudpickle)
3104 ("python-dask" ,python-dask)
3105 ("python-matplotlib" ,python-matplotlib)
3106 ("python-networkx" ,python-networkx)
3107 ("python-numpy" ,python-numpy)
3108 ("python-pillow" ,python-pillow)
3109 ("python-pywavelets" ,python-pywavelets)
3110 ("python-scipy" ,python-scipy)
3111 ("python-six" ,python-six)))
3113 `(("python-cython" ,python-cython)))
3114 (home-page "http://scikit-image.org/")
3115 (synopsis "Image processing in Python")
3117 "Scikit-image is a collection of algorithms for image processing.")
3118 (license license:bsd-3)))
3120 (define-public python2-scikit-image
3121 (package-with-python2 python-scikit-image))
3123 (define-public python-cython
3125 (name "python-cython")
3130 (uri (pypi-uri "Cython" version))
3133 "1bp7cn0pp5qy63k9hbp4ka34fm01kvysh478phpkhr68npqk6pbc"))))
3134 (build-system python-build-system)
3135 ;; we need the full python package and not just the python-wrapper
3136 ;; because we need libpython3.3m.so
3138 `(("python" ,python)))
3141 (modify-phases %standard-phases
3142 (add-before 'check 'set-HOME
3143 ;; some tests require access to "$HOME/.cython"
3144 (lambda _ (setenv "HOME" "/tmp") #t))
3146 ;; FIXME: These tests started failing on armhf after the 0.28 update
3147 ;; (commit c69d11c5930), both with an error such as this:
3148 ;; compiling (cpp) and running dictcomp ...
3149 ;; === C/C++ compiler error output: ===
3151 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3152 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3153 ,@(if (target-arm32?)
3154 `((add-before 'check 'disable-failing-tests
3156 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3157 (for-each (lambda (test)
3158 (format disabled-tests "~a\n" test))
3159 '("memslice" "dictcomp"))
3160 (close-port disabled-tests)))))
3165 (invoke "python" "runtests.py" "-vv"))))))
3166 (home-page "https://cython.org/")
3167 (synopsis "C extensions for Python")
3168 (description "Cython is an optimising static compiler for both the Python
3169 programming language and the extended Cython programming language. It makes
3170 writing C extensions for Python as easy as Python itself.")
3171 (license license:asl2.0)
3172 (properties `((python2-variant . ,(delay python2-cython))))))
3174 (define-public python2-cython
3175 (package (inherit (package-with-python2
3176 (strip-python2-variant python-cython)))
3177 (name "python2-cython")
3179 `(("python-2" ,python-2))))) ; this is not automatically changed
3181 ;; The RPython toolchain currently does not support Python 3.
3182 (define-public python2-rpython
3184 (name "python2-rpython")
3189 (uri (pypi-uri "rpython" version))
3192 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3193 (build-system python-build-system)
3194 (arguments `(#:python ,python-2))
3196 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3197 (home-page "https://rpython.readthedocs.org")
3198 (synopsis "Framework for implementing interpreters and virtual machines")
3199 (description "RPython is a translation and support framework for
3200 producing implementations of dynamic languages, emphasizing a clean separation
3201 between language specification and implementation aspects.")
3202 (license license:expat)))
3204 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3205 ;; python-scipy still build, as these three packages are often used together.
3206 (define-public python-numpy
3208 (name "python-numpy")
3214 "https://github.com/numpy/numpy/releases/download/v"
3215 version "/numpy-" version ".tar.gz"))
3218 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3219 (build-system python-build-system)
3221 `(("openblas" ,openblas)
3222 ("lapack" ,lapack)))
3224 `(("python-cython" ,python-cython)
3225 ("python-pytest" ,python-pytest)
3226 ("gfortran" ,gfortran)))
3229 (modify-phases %standard-phases
3230 (add-before 'build 'configure-blas-lapack
3231 (lambda* (#:key inputs #:allow-other-keys)
3232 (call-with-output-file "site.cfg"
3236 libraries = openblas
3237 library_dirs = ~a/lib
3238 include_dirs = ~a/include
3240 # backslash-n to make emacs happy
3242 lapack_libs = lapack
3243 library_dirs = ~a/lib
3244 include_dirs = ~a/include
3246 (assoc-ref inputs "openblas")
3247 (assoc-ref inputs "openblas")
3248 (assoc-ref inputs "lapack")
3249 (assoc-ref inputs "lapack"))))
3251 (add-before 'build 'fix-executable-paths
3252 (lambda* (#:key inputs #:allow-other-keys)
3253 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3254 ;; instead of /bin/sh.
3255 (substitute* "numpy/distutils/exec_command.py"
3256 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3257 (string-append match-start (assoc-ref inputs "bash") match-end)))
3258 ;; Use "gcc" executable, not "cc".
3259 (substitute* "numpy/distutils/system_info.py"
3260 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3261 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3263 ;; Tests can only be run after the library has been installed and not
3264 ;; within the source directory.
3266 (add-after 'install 'check
3267 (lambda* (#:key outputs inputs #:allow-other-keys)
3268 ;; Make installed package available for running the tests
3269 (add-installed-pythonpath inputs outputs)
3270 ;; Make sure "f2py" etc is found.
3271 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3272 ":" (getenv "PATH")))
3273 (with-directory-excursion "/tmp"
3274 (invoke "python" "-c"
3275 "import numpy; numpy.test(verbose=2)")))))))
3276 (home-page "http://www.numpy.org/")
3277 (synopsis "Fundamental package for scientific computing with Python")
3278 (description "NumPy is the fundamental package for scientific computing
3279 with Python. It contains among other things: a powerful N-dimensional array
3280 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3281 and Fortran code, useful linear algebra, Fourier transform, and random number
3283 (license license:bsd-3)))
3285 (define-public python2-numpy
3286 (package-with-python2 python-numpy))
3288 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3289 ;; interest only for legacy code going back to NumPy's predecessor
3291 (define-public python2-numpy-1.8
3292 (package (inherit python2-numpy)
3298 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3299 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3302 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3304 (substitute-keyword-arguments (package-arguments python2-numpy)
3306 `(modify-phases ,phases
3307 (replace 'configure-blas-lapack
3308 (lambda* (#:key inputs #:allow-other-keys)
3309 (call-with-output-file "site.cfg"
3313 libraries = openblas,lapack
3314 library_dirs = ~a/lib:~a/lib
3315 include_dirs = ~a/include:~a/include
3317 (assoc-ref inputs "openblas")
3318 (assoc-ref inputs "lapack")
3319 (assoc-ref inputs "openblas")
3320 (assoc-ref inputs "lapack"))))
3323 `(("python2-nose" ,python2-nose)))
3324 (description "NumPy is the fundamental package for scientific computing
3325 with Python. It contains among other things: a powerful N-dimensional array
3326 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3327 and Fortran code, useful linear algebra, Fourier transform, and random number
3328 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3329 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3331 (license license:bsd-3)))
3333 (define-public python-munch
3335 (name "python-munch")
3340 (uri (pypi-uri "munch" version))
3343 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3344 (build-system python-build-system)
3345 (home-page "https://github.com/Infinidat/munch")
3346 (synopsis "Dot-accessible dictionary")
3347 (description "Munch is a dot-accessible dictionary similar to JavaScript
3349 (license license:expat)))
3351 (define-public python2-munch
3352 (package-with-python2 python-munch))
3354 (define-public python-colormath
3356 (name "python-colormath")
3361 (uri (pypi-uri "colormath" version))
3364 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3365 (build-system python-build-system)
3367 `(("python-networkx" ,python-networkx)
3368 ("python-numpy" ,python-numpy)))
3369 (home-page "https://github.com/gtaylor/python-colormath")
3370 (synopsis "Color math and conversion library")
3372 "This is a Python library for color math and conversions.")
3373 (license license:bsd-3)))
3375 (define-public python2-colormath
3376 (package-with-python2 python-colormath))
3378 (define-public python-spectra
3380 (name "python-spectra")
3385 (uri (pypi-uri "spectra" version))
3388 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3389 (build-system python-build-system)
3392 (modify-phases %standard-phases
3394 (lambda _ (invoke "nosetests" "-v"))))))
3396 `(("python-colormath" ,python-colormath)))
3398 `(("python-nose" ,python-nose)))
3399 (home-page "https://github.com/jsvine/spectra")
3400 (synopsis "Color scales and color conversion")
3402 "This package provides a Python library intended to make color math,
3403 color scales, and color space conversion easy. It has support for:
3408 @item Color blending
3409 @item Brightening/darkening colors
3410 @item Saturating/desaturating colors
3411 @item Conversion to/from multiple color spaces.
3413 (license license:expat)))
3415 (define-public python2-spectra
3416 (package-with-python2 python-spectra))
3418 (define-public python-numpy-documentation
3420 (name "python-numpy-documentation")
3421 (version (package-version python-numpy))
3422 (source (package-source python-numpy))
3423 (build-system python-build-system)
3425 `(("python-matplotlib" ,python-matplotlib)
3426 ("python-numpy" ,python-numpy)
3427 ("pkg-config" ,pkg-config)
3428 ("python-sphinx" ,python-sphinx)
3429 ("python-numpydoc" ,python-numpydoc)
3430 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3431 texlive-fonts-cm-super
3433 texlive-generic-ifxetex
3434 texlive-generic-pdftex
3435 texlive-latex-amsfonts
3436 texlive-latex-capt-of
3438 texlive-latex-environ
3439 texlive-latex-eqparbox
3440 texlive-latex-etoolbox
3441 texlive-latex-expdlist
3442 texlive-latex-fancyhdr
3443 texlive-latex-fancyvrb
3444 texlive-latex-fncychap
3446 texlive-latex-framed
3447 texlive-latex-geometry
3448 texlive-latex-graphics
3449 texlive-latex-hyperref
3450 texlive-latex-mdwtools
3451 texlive-latex-multirow
3452 texlive-latex-needspace
3453 texlive-latex-oberdiek
3454 texlive-latex-parskip
3455 texlive-latex-preview
3456 texlive-latex-tabulary
3457 texlive-latex-threeparttable
3458 texlive-latex-titlesec
3459 texlive-latex-trimspaces
3461 texlive-latex-upquote
3463 texlive-latex-varwidth
3464 texlive-latex-wrapfig)))
3465 ("texinfo" ,texinfo)
3467 ("scipy-sphinx-theme"
3468 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3471 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3472 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3475 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3476 ,@(package-native-inputs python-numpy)))
3478 `(#:tests? #f ; we're only generating the documentation
3480 (modify-phases %standard-phases
3483 (lambda* (#:key inputs outputs #:allow-other-keys)
3484 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3486 data "/doc/" ,name "-"
3487 ,(package-version python-numpy)))
3488 (info-reader (string-append data "/info"))
3489 (html (string-append doc "/html"))
3490 (scipy-sphinx-theme "scipy-sphinx-theme")
3491 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3492 (pyver ,(string-append "PYVER=")))
3494 ;; FIXME: this is needed to for texlive-union to generate
3495 ;; fonts, which are not found.
3496 (setenv "HOME" "/tmp")
3498 (with-directory-excursion "doc"
3499 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3501 (invoke "make" "html" pyver)
3502 (invoke "make" "latex" "PAPER=a4" pyver)
3503 (invoke "make" "-C" "build/latex"
3504 "all-pdf" "PAPER=a4" pyver)
3505 ;; FIXME: Generation of the info file fails.
3506 ;; (invoke "make" "info" pyver)
3508 ;; (copy-file "build/texinfo/numpy.info"
3509 ;; (string-append info "/numpy.info"))
3510 (for-each (lambda (file)
3511 (copy-file (string-append "build/latex" file)
3512 (string-append doc file)))
3513 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3514 (with-directory-excursion "build/html"
3515 (for-each (lambda (file)
3516 (let* ((dir (dirname file))
3517 (tgt-dir (string-append html "/" dir)))
3518 (unless (equal? "." dir)
3520 (install-file file html)))
3521 (find-files "." ".*")))))
3523 (home-page (package-home-page python-numpy))
3524 (synopsis "Documentation for the python-numpy package")
3525 (description (package-description python-numpy))
3526 (license (package-license python-numpy))))
3528 (define-public python2-numpy-documentation
3529 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3531 (inherit numpy-documentation)
3532 (native-inputs `(("python2-functools32" ,python2-functools32)
3533 ,@(package-native-inputs numpy-documentation))))))
3535 (define-public python-pygit2
3537 (name "python-pygit2")
3542 (uri (pypi-uri "pygit2" version))
3544 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
3545 (build-system python-build-system)
3547 '(#:tests? #f)) ; tests don't run correctly in our environment
3549 `(("python-six" ,python-six)
3550 ("python-cffi" ,python-cffi)
3551 ("libgit2" ,libgit2)
3552 ("python-tox" ,python-tox)))
3554 `(("python-pytest" ,python-pytest)))
3555 (home-page "https://github.com/libgit2/pygit2")
3556 (synopsis "Python bindings for libgit2")
3557 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3558 library, libgit2 implements Git plumbing.")
3559 ;; GPL2.0 only, with linking exception.
3560 (license license:gpl2)))
3562 (define-public python2-pygit2
3563 (package-with-python2 python-pygit2))
3565 (define-public python-pyparsing
3567 (name "python-pyparsing")
3572 (uri (pypi-uri "pyparsing" version))
3574 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3575 (build-system python-build-system)
3576 (outputs '("out" "doc"))
3578 `(#:tests? #f ; no test target
3580 (modify-phases %standard-phases
3581 (add-after 'install 'install-doc
3582 (lambda* (#:key outputs #:allow-other-keys)
3583 (let* ((doc (string-append (assoc-ref outputs "doc")
3584 "/share/doc/" ,name "-" ,version))
3585 (html-doc (string-append doc "/html"))
3586 (examples (string-append doc "/examples")))
3592 (install-file file tgt))
3593 (find-files dir ".*")))
3594 (list "docs" "htmldoc" "examples")
3595 (list doc html-doc examples))
3597 (home-page "https://github.com/pyparsing/pyparsing")
3598 (synopsis "Python parsing class library")
3600 "The pyparsing module is an alternative approach to creating and
3601 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3602 of regular expressions. The pyparsing module provides a library of classes
3603 that client code uses to construct the grammar directly in Python code.")
3604 (license license:expat)))
3606 (define-public python2-pyparsing
3607 (package-with-python2 python-pyparsing))
3609 (define-public python-numpydoc
3611 (name "python-numpydoc")
3616 (uri (pypi-uri "numpydoc" version))
3619 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3620 (build-system python-build-system)
3622 `(("python-sphinx" ,python-sphinx)))
3624 `(("python-nose" ,python-nose)))
3625 (home-page "https://pypi.python.org/pypi/numpydoc")
3627 "Numpy's Sphinx extensions")
3629 "Sphinx extension to support docstrings in Numpy format.")
3630 (license license:bsd-2)))
3632 (define-public python2-numpydoc
3633 (package-with-python2 python-numpydoc))
3635 (define-public python-numexpr
3637 (name "python-numexpr")
3642 (uri (pypi-uri "numexpr" version))
3645 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3646 (build-system python-build-system)
3647 (arguments `(#:tests? #f)) ; no tests included
3649 `(("python-numpy" ,python-numpy)))
3650 (home-page "https://github.com/pydata/numexpr")
3651 (synopsis "Fast numerical expression evaluator for NumPy")
3653 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3654 expressions that operate on arrays are accelerated and use less memory than
3655 doing the same calculation in Python. In addition, its multi-threaded
3656 capabilities can make use of all your cores, which may accelerate
3657 computations, most specially if they are not memory-bounded (e.g. those using
3658 transcendental functions).")
3659 (license license:expat)))
3661 (define-public python2-numexpr
3662 (package-with-python2 python-numexpr))
3664 (define-public python-cycler
3666 (name "python-cycler")
3670 (uri (pypi-uri "cycler" version))
3673 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3674 (build-system python-build-system)
3676 ;; XXX: The current version requires 'coveralls' which we don't have.
3677 ;; Enable this for the next release which uses 'python-pytest'.
3680 `(("python-six" ,python-six)))
3681 (home-page "http://matplotlib.org/cycler/")
3682 (synopsis "Composable keyword argument iterator")
3684 "When using @code{matplotlib} and plotting more than one line, it is
3685 common to want to be able to want to be able to cycle over one or more artist
3686 styles; but the plotting logic can quickly become involved.
3687 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3688 @code{Cycler} class was developed.")
3689 (license license:bsd-3)))
3691 (define-public python2-cycler
3692 (package-with-python2 python-cycler))
3694 (define-public python-colorspacious
3696 (name "python-colorspacious")
3702 (url "https://github.com/njsmith/colorspacious.git")
3703 (commit (string-append "v" version))))
3704 (file-name (git-file-name name version))
3706 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3707 (build-system python-build-system)
3709 `(("python-numpy" ,python-numpy)))
3711 `(("python-nose" ,python-nose)))
3714 (modify-phases %standard-phases
3717 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3718 (home-page "https://github.com/njsmith/colorspacious")
3719 (synopsis "Python library for colorspace conversions")
3720 (description "@code{colorspacious} is a Python library that lets you
3721 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3722 (license license:expat)))
3724 (define-public python2-colorspacious
3725 (package-with-python2 python-colorspacious))
3727 (define-public python-matplotlib
3729 (name "python-matplotlib")
3734 (uri (pypi-uri "matplotlib" version))
3737 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3738 (build-system python-build-system)
3739 (propagated-inputs ; the following packages are all needed at run time
3740 `(("python-cycler" ,python-cycler)
3741 ("python-kiwisolver" ,python-kiwisolver)
3742 ("python-pyparsing" ,python-pyparsing)
3743 ("python-pygobject" ,python-pygobject)
3744 ("gobject-introspection" ,gobject-introspection)
3745 ("python-tkinter" ,python "tk")
3746 ("python-dateutil" ,python-dateutil)
3747 ("python-numpy" ,python-numpy)
3748 ("python-pillow" ,python-pillow)
3749 ("python-pytz" ,python-pytz)
3750 ("python-six" ,python-six)
3751 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3752 ;; from 'gtk+') provides the required 'typelib' files used by
3753 ;; 'gobject-introspection'. The location of these files is set with the
3754 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3755 ;; is done automatically by a 'native-search-path' procedure. However,
3756 ;; at run-time the user must set this variable as follows:
3758 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3760 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3761 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3762 ;; object. For this reason we need to import both libraries.
3763 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3764 ("python-pycairo" ,python-pycairo)
3765 ;; XXX: qtwebkit cannot be built reliably.
3766 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3767 ("python-cairocffi" ,python-cairocffi)))
3769 `(("libpng" ,libpng)
3770 ("imagemagick" ,imagemagick)
3771 ("freetype" ,freetype)
3774 ;; FIXME: Add backends when available.
3775 ;("python-wxpython" ,python-wxpython)
3779 `(("pkg-config" ,pkg-config)
3780 ("python-nose" ,python-nose)
3781 ("python-mock" ,python-mock)))
3784 (modify-phases %standard-phases
3785 (add-before 'build 'configure-environment
3786 (lambda* (#:key outputs inputs #:allow-other-keys)
3787 (let ((cairo (assoc-ref inputs "cairo"))
3788 (gtk+ (assoc-ref inputs "gtk+")))
3789 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3791 (setenv "LD_LIBRARY_PATH"
3792 (string-append cairo "/lib:" gtk+ "/lib"))
3793 (setenv "HOME" (getcwd))
3794 (call-with-output-file "setup.cfg"
3796 (format port "[directories]~%
3797 basedirlist = ~a,~a~%
3800 (assoc-ref inputs "tcl")
3801 (assoc-ref inputs "tk")))))
3803 (home-page "http://matplotlib.org")
3804 (synopsis "2D plotting library for Python")
3806 "Matplotlib is a Python 2D plotting library which produces publication
3807 quality figures in a variety of hardcopy formats and interactive environments
3808 across platforms. Matplotlib can be used in Python scripts, the python and
3809 ipython shell, web application servers, and six graphical user interface
3811 (license license:psfl)
3812 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3814 (define-public python2-matplotlib
3815 (let ((matplotlib (package-with-python2
3816 (strip-python2-variant python-matplotlib))))
3817 (package (inherit matplotlib)
3818 ;; Make sure to use special packages for Python 2 instead
3819 ;; of those automatically rewritten by package-with-python2.
3821 `(("python2-pycairo" ,python2-pycairo)
3822 ("python2-backports-functools-lru-cache"
3823 ,python2-backports-functools-lru-cache)
3824 ("python2-functools32" ,python2-functools32)
3825 ("python2-pygobject-2" ,python2-pygobject-2)
3826 ("python2-subprocess32" ,python2-subprocess32)
3827 ("python2-tkinter" ,python-2 "tk")
3828 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3829 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3831 (define-public python-matplotlib-documentation
3833 (name "python-matplotlib-documentation")
3834 (version (package-version python-matplotlib))
3835 (source (package-source python-matplotlib))
3836 (build-system python-build-system)
3838 `(("python-matplotlib" ,python-matplotlib)
3839 ("python-colorspacious" ,python-colorspacious)
3840 ("python-sphinx" ,python-sphinx)
3841 ("python-sphinx-gallery" ,python-sphinx-gallery)
3842 ("python-numpydoc" ,python-numpydoc)
3843 ("python-ipython" ,python-ipython)
3844 ("python-ipykernel" ,python-ipykernel)
3845 ("python-mock" ,python-mock)
3846 ("graphviz" ,graphviz)
3847 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3848 texlive-latex-amsmath
3849 texlive-latex-enumitem
3850 texlive-latex-expdlist
3851 texlive-latex-geometry
3852 texlive-latex-preview
3853 texlive-latex-type1cm
3856 texlive-generic-pdftex
3858 texlive-fonts-amsfonts
3860 texlive-fonts-adobe-times
3861 texlive-fonts-txfonts)))
3862 ("texinfo" ,texinfo)
3863 ,@(package-native-inputs python-matplotlib)))
3865 `(#:tests? #f ; we're only generating documentation
3867 (modify-phases %standard-phases
3871 (setenv "PYTHONPATH"
3872 (string-append (getenv "PYTHONPATH")
3873 ":" (getcwd) "/../examples/units"))
3874 (substitute* "conf.py"
3876 (("^SHA = check_output.*")
3877 (string-append "SHA = \"" ,version "\"\n"))
3878 ;; Don't fetch intersphinx files from the Internet
3879 (("^explicit_order_folders" m)
3880 (string-append "intersphinx_mapping = {}\n" m))
3881 (("'sphinx.ext.intersphinx',") "")
3882 ;; Disable URL embedding which requires internet access.
3883 (("'https://docs.scipy.org/doc/numpy'") "None")
3884 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3886 "SPHINXBUILD=sphinx-build"
3887 "SPHINXOPTS=" ; don't abort on warnings
3890 (lambda* (#:key inputs outputs #:allow-other-keys)
3891 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3892 (doc (string-append data "/doc/python-matplotlib-" ,version))
3893 (info (string-append data "/info"))
3894 (html (string-append doc "/html")))
3897 (copy-recursively "build/html" html)
3898 (symlink (string-append html "/_images")
3899 (string-append info "/matplotlib-figures"))
3900 (with-directory-excursion "build/texinfo"
3901 (substitute* "matplotlib.texi"
3902 (("@image\\{([^,]*)" all file)
3903 (string-append "@image{matplotlib-figures/" file)))
3904 (symlink (string-append html "/_images")
3905 "./matplotlib-figures")
3906 (invoke "makeinfo" "--no-split"
3907 "-o" "matplotlib.info" "matplotlib.texi"))
3908 (install-file "build/texinfo/matplotlib.info" info))
3910 (home-page (package-home-page python-matplotlib))
3911 (synopsis "Documentation for the python-matplotlib package")
3912 (description (package-description python-matplotlib))
3913 (license (package-license python-matplotlib))))
3915 (define-public python2-matplotlib-documentation
3916 (package-with-python2 python-matplotlib-documentation))
3918 (define-public python2-pysnptools
3920 (name "python2-pysnptools")
3925 (uri (pypi-uri "pysnptools" version))
3928 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3929 (build-system python-build-system)
3931 `(#:python ,python-2 ; only Python 2.7 is supported
3932 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3934 `(("python2-numpy" ,python2-numpy)
3935 ("python2-scipy" ,python2-scipy)
3936 ("python2-pandas" ,python2-pandas)))
3938 `(("python2-cython" ,python2-cython)))
3939 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3940 (synopsis "Library for reading and manipulating genetic data")
3942 "PySnpTools is a library for reading and manipulating genetic data. It
3943 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3944 those files. It can also efficiently manipulate ranges of integers using set
3945 operators such as union, intersection, and difference.")
3946 (license license:asl2.0)))
3948 (define-public python-scipy
3950 (name "python-scipy")
3955 (uri (pypi-uri "scipy" version))
3958 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3959 (build-system python-build-system)
3961 `(("python-numpy" ,python-numpy)
3962 ("python-matplotlib" ,python-matplotlib)
3963 ("python-pyparsing" ,python-pyparsing)))
3965 `(("lapack" ,lapack)
3966 ("openblas" ,openblas)))
3968 `(("python-cython" ,python-cython)
3969 ("python-pytest" ,python-pytest)
3970 ("python-sphinx" ,python-sphinx)
3971 ("python-numpydoc" ,python-numpydoc)
3972 ("gfortran" ,gfortran)
3975 (outputs '("out" "doc"))
3978 (modify-phases %standard-phases
3979 (add-after 'unpack 'disable-broken-tests
3981 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3982 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3983 (string-append indent
3984 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3986 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3987 (("^def test_parallel_threads\\(\\):" m)
3988 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3991 (add-before 'build 'configure-openblas
3992 (lambda* (#:key inputs #:allow-other-keys)
3993 (call-with-output-file "site.cfg"
3997 libraries = openblas
3998 library_dirs = ~a/lib
3999 include_dirs = ~a/include
4001 # backslash-n to make emacs happy
4003 library_dirs = ~a/lib
4004 atlas_libs = openblas
4006 (assoc-ref inputs "openblas")
4007 (assoc-ref inputs "openblas")
4008 (assoc-ref inputs "openblas"))))
4010 (add-after 'install 'install-doc
4011 (lambda* (#:key inputs outputs #:allow-other-keys)
4012 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4013 (doc (string-append data "/doc/" ,name "-" ,version))
4014 (html (string-append doc "/html"))
4015 (pyver ,(string-append "PYVER=" (version-major+minor
4016 (package-version python))))
4017 ;; By default it tries to run sphinx-build through the Python
4018 ;; interpreter which won't work with our shell wrapper.
4019 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4020 ;; Make installed package available for building the
4022 (add-installed-pythonpath inputs outputs)
4023 (with-directory-excursion "doc"
4024 ;; Fix generation of images for mathematical expressions.
4025 (substitute* (find-files "source" "conf\\.py")
4026 (("pngmath_use_preview = True")
4027 "pngmath_use_preview = False"))
4029 (invoke "make" "html" pyver sphinxbuild)
4030 (with-directory-excursion "build/html"
4031 (for-each (lambda (file)
4032 (let* ((dir (dirname file))
4033 (tgt-dir (string-append html "/" dir)))
4034 (install-file file html)))
4035 (find-files "." ".*")))))
4037 ;; Tests can only be run after the library has been installed and not
4038 ;; within the source directory.
4040 (add-after 'install 'check
4041 (lambda* (#:key inputs outputs #:allow-other-keys)
4042 (add-installed-pythonpath inputs outputs)
4043 (with-directory-excursion "/tmp"
4044 (invoke "python" "-c"
4045 "import scipy; scipy.test(verbose=2)")))))))
4046 (home-page "https://www.scipy.org/")
4047 (synopsis "The Scipy library provides efficient numerical routines")
4048 (description "The SciPy library is one of the core packages that make up
4049 the SciPy stack. It provides many user-friendly and efficient numerical
4050 routines such as routines for numerical integration and optimization.")
4051 (properties `((python2-variant . ,(delay python2-scipy))))
4052 (license license:bsd-3)))
4054 (define-public python2-scipy
4055 (package-with-python2
4056 (strip-python2-variant python-scipy)))
4058 (define-public python-socksipy-branch
4060 (name "python-socksipy-branch")
4065 (uri (pypi-uri "SocksiPy-branch" version))
4068 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4069 (build-system python-build-system)
4071 `(#:tests? #f)) ; There are no tests
4072 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4073 (synopsis "Python SOCKS module")
4075 "SocksiPy - A Python SOCKS client module. It provides a
4076 socket-like interface that supports connections to any TCP
4077 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4078 The original version was developed by Dan Haim, this is a
4079 branch created by Mario Vilas to address some open issues,
4080 as the original project seems to have been abandoned circa 2007.")
4081 (license license:bsd-3)))
4083 (define-public python2-socksipy-branch
4084 (package-with-python2 python-socksipy-branch))
4086 (define-public python-pycodestyle
4088 (name "python-pycodestyle")
4093 (uri (pypi-uri "pycodestyle" version))
4096 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4097 (build-system python-build-system)
4098 (home-page "https://pycodestyle.readthedocs.io/")
4099 (synopsis "Python style guide checker")
4100 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4101 Python code against some of the style conventions in
4102 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4103 (license license:expat)))
4105 (define-public python2-pycodestyle
4106 (package-with-python2 python-pycodestyle))
4108 (define-public python-multidict
4110 (name "python-multidict")
4115 (uri (pypi-uri "multidict" version))
4118 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4119 (build-system python-build-system)
4121 `(("python-pytest" ,python-pytest)
4122 ("python-pytest-runner" ,python-pytest-runner)))
4123 (home-page "https://github.com/aio-libs/multidict/")
4124 (synopsis "Multidict implementation")
4125 (description "Multidict is dict-like collection of key-value pairs
4126 where key might be occurred more than once in the container.")
4127 (license license:asl2.0)))
4129 (define-public python-orderedmultidict
4131 (name "python-orderedmultidict")
4136 (uri (pypi-uri "orderedmultidict" version))
4139 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4140 (build-system python-build-system)
4143 (modify-phases %standard-phases
4144 (add-after 'unpack 'fix-tests
4146 ;; The package uses nosetest for running the tests.
4147 ;; Adding this initfile allows to run the test suite
4148 ;; without requiring nosetest.
4149 (with-output-to-file "tests/__init__.py" newline)
4152 `(("python-six" ,python-six)))
4154 `(("python-pycodestyle" ,python-pycodestyle)))
4155 (home-page "https://github.com/gruns/orderedmultidict")
4156 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4157 (description "This package contains a library for ordered multivalue
4158 dictionaries. A multivalue dictionary is a dictionary that can store
4159 multiple values for the same key. An ordered multivalue dictionary is a
4160 multivalue dictionary that retains the order of insertions and deletions.")
4161 (license license:unlicense)))
4163 (define-public python2-orderedmultidict
4164 (package-with-python2 python-orderedmultidict))
4166 (define-public python-autopep8
4168 (name "python-autopep8")
4173 (uri (pypi-uri "autopep8" version))
4176 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4177 (build-system python-build-system)
4179 `(("python-pycodestyle" ,python-pycodestyle)))
4180 (home-page "https://github.com/hhatto/autopep8")
4181 (synopsis "Format Python code according to the PEP 8 style guide")
4183 "@code{autopep8} automatically formats Python code to conform to
4184 the PEP 8 style guide. It uses the pycodestyle utility to determine
4185 what parts of the code needs to be formatted. @code{autopep8} is
4186 capable of fixing most of the formatting issues that can be reported
4188 (license (license:non-copyleft
4189 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4191 (define-public python2-autopep8
4192 (package-with-python2 python-autopep8))
4194 (define-public python-distutils-extra
4196 (name "python-distutils-extra")
4201 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4202 version "/+download/python-distutils-extra-"
4206 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4207 (build-system python-build-system)
4208 (home-page "https://launchpad.net/python-distutils-extra/")
4209 (synopsis "Enhancements to Python's distutils")
4211 "The python-distutils-extra module enables you to easily integrate
4212 gettext support, themed icons, and scrollkeeper-based documentation into
4213 Python's distutils.")
4214 (license license:gpl2)))
4216 (define-public python2-distutils-extra
4217 (package-with-python2 python-distutils-extra))
4219 (define-public python2-elib.intl
4221 (name "python2-elib.intl")
4225 ;; This project doesn't tag releases or publish tarballs, so we take
4226 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4229 (url "https://github.com/dieterv/elib.intl.git")
4230 (commit "d09997cfef")))
4231 (file-name (string-append name "-" version "-checkout"))
4234 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4235 (build-system python-build-system)
4237 ;; incompatible with Python 3 (exception syntax)
4238 `(#:python ,python-2
4240 (home-page "https://github.com/dieterv/elib.intl")
4241 (synopsis "Enhanced internationalization for Python")
4243 "The elib.intl module provides enhanced internationalization (I18N)
4244 services for your Python modules and applications.")
4245 (license license:lgpl3+)))
4247 (define-public python-olefile
4249 (name "python-olefile")
4254 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4256 (file-name (string-append name "-" version ".tar.gz"))
4259 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4260 (build-system python-build-system)
4262 "https://www.decalage.info/python/olefileio")
4263 (synopsis "Read and write Microsoft OLE2 files.")
4265 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4266 Storage or Compound Document, Microsoft Office). It is an improved version of
4267 the OleFileIO module from PIL, the Python Image Library.")
4268 (license license:bsd-3)))
4270 (define-public python2-olefile
4271 (package-with-python2 python-olefile))
4273 (define-public python-pillow
4275 (name "python-pillow")
4280 (uri (pypi-uri "Pillow" version))
4283 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4284 (build-system python-build-system)
4286 `(("python-pytest" ,python-pytest)))
4288 `(("freetype" ,freetype)
4291 ("libjpeg" ,libjpeg)
4292 ("openjpeg" ,openjpeg)
4293 ("libtiff" ,libtiff)
4294 ("libwebp" ,libwebp)))
4296 `(("python-olefile" ,python-olefile)))
4299 (modify-phases %standard-phases
4300 (add-after 'unpack 'patch-ldconfig
4302 (substitute* "setup.py"
4303 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4304 (delete 'check) ; We must run checks after python-pillow is installed.
4305 (add-after 'install 'check-installed
4306 (lambda* (#:key outputs inputs #:allow-other-keys)
4308 (setenv "HOME" (getcwd))
4309 ;; Make installed package available for running the tests.
4310 (add-installed-pythonpath inputs outputs)
4311 (invoke "python" "selftest.py" "--installed")
4312 (invoke "python" "-m" "pytest" "-vv")))))))
4313 (home-page "https://python-pillow.org")
4314 (synopsis "Fork of the Python Imaging Library")
4316 "The Python Imaging Library adds image processing capabilities to your
4317 Python interpreter. This library provides extensive file format support, an
4318 efficient internal representation, and fairly powerful image processing
4319 capabilities. The core image library is designed for fast access to data
4320 stored in a few basic pixel formats. It should provide a solid foundation for
4321 a general image processing tool.")
4322 (license (license:x11-style
4323 "http://www.pythonware.com/products/pil/license.htm"
4324 "The PIL Software License"))))
4326 (define-public python2-pillow
4327 (package-with-python2 python-pillow))
4329 (define-public python-pycparser
4331 (name "python-pycparser")
4336 (uri (pypi-uri "pycparser" version))
4339 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4340 (outputs '("out" "doc"))
4341 (build-system python-build-system)
4343 `(("pkg-config" ,pkg-config)))
4346 (modify-phases %standard-phases
4349 (with-directory-excursion "tests"
4350 (invoke "python" "all_tests.py"))
4352 (add-after 'install 'install-doc
4353 (lambda* (#:key outputs #:allow-other-keys)
4354 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4355 (doc (string-append data "/doc/" ,name "-" ,version))
4356 (examples (string-append doc "/examples")))
4358 (for-each (lambda (file)
4359 (copy-file (string-append "." file)
4360 (string-append doc file)))
4361 '("/README.rst" "/CHANGES" "/LICENSE"))
4362 (copy-recursively "examples" examples)))))))
4363 (home-page "https://github.com/eliben/pycparser")
4364 (synopsis "C parser in Python")
4366 "Pycparser is a complete parser of the C language, written in pure Python
4367 using the PLY parsing library. It parses C code into an AST and can serve as
4368 a front-end for C compilers or analysis tools.")
4369 (license license:bsd-3)))
4371 (define-public python2-pycparser
4372 (package-with-python2 python-pycparser))
4374 (define-public python-pywavelets
4376 (name "python-pywavelets")
4378 (home-page "https://github.com/PyWavelets/pywt")
4381 (uri (pypi-uri "PyWavelets" version))
4384 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4385 (build-system python-build-system)
4387 '(#:modules ((ice-9 ftw)
4391 (guix build python-build-system))
4392 #:phases (modify-phases %standard-phases
4395 (let ((cwd (getcwd))
4396 (libdir (find (cut string-prefix? "lib." <>)
4397 (scandir "build"))))
4398 (with-directory-excursion (string-append cwd "/build/" libdir)
4399 (invoke "nosetests" "-v" "."))))))))
4401 `(("python-matplotlib" ,python-matplotlib) ;for tests
4402 ("python-nose" ,python-nose)))
4404 `(("python-numpy" ,python-numpy)))
4405 (synopsis "Wavelet transforms in Python")
4407 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4408 mathematical basis functions that are localized in both time and frequency.
4409 Wavelet transforms are time-frequency transforms employing wavelets. They are
4410 similar to Fourier transforms, the difference being that Fourier transforms are
4411 localized only in frequency instead of in time and frequency.")
4412 (license license:expat)))
4414 (define-public python2-pywavelets
4415 (package-with-python2 python-pywavelets))
4417 (define-public python-xcffib
4419 (name "python-xcffib")
4424 (uri (pypi-uri "xcffib" version))
4427 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4428 (build-system python-build-system)
4430 `(("libxcb" ,libxcb)))
4432 `(("python-cffi" ,python-cffi) ; used at run time
4433 ("python-six" ,python-six)))
4435 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4438 (modify-phases %standard-phases
4439 (add-after 'unpack 'fix-libxcb-path
4440 (lambda* (#:key inputs #:allow-other-keys)
4441 (let ((libxcb (assoc-ref inputs "libxcb")))
4442 (substitute* '("xcffib/__init__.py")
4443 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4445 (add-after 'install 'install-doc
4446 (lambda* (#:key outputs #:allow-other-keys)
4447 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4448 "/doc/" ,name "-" ,version)))
4450 (copy-file "README.md"
4451 (string-append doc "/README.md"))
4453 (home-page "https://github.com/tych0/xcffib")
4454 (synopsis "XCB Python bindings")
4456 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4457 support for Python 3 and PyPy. It is based on cffi.")
4458 (license license:expat)))
4460 (define-public python2-xcffib
4461 (package-with-python2 python-xcffib))
4463 (define-public python-cairocffi
4465 (name "python-cairocffi")
4470 (uri (pypi-uri "cairocffi" version))
4473 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4474 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4475 (build-system python-build-system)
4476 (outputs '("out" "doc"))
4480 ("gdk-pixbuf" ,gdk-pixbuf)
4484 `(("pkg-config" ,pkg-config)
4485 ("python-pytest" ,python-pytest)
4486 ("python-pytest-cov" ,python-pytest-cov)
4487 ("python-pytest-runner" ,python-pytest-runner)
4488 ("python-sphinx" ,python-sphinx)
4489 ("python-docutils" ,python-docutils)))
4491 `(("python-xcffib" ,python-xcffib))) ; used at run time
4494 (modify-phases %standard-phases
4495 (add-after 'unpack 'patch-paths
4496 (lambda* (#:key inputs outputs #:allow-other-keys)
4497 (substitute* (find-files "." "\\.py$")
4498 (("dlopen\\(ffi, 'cairo'")
4499 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4500 "/lib/libcairo.so.2'"))
4501 (("dlopen\\(ffi, 'gdk-3'")
4502 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4503 "/lib/libgtk-3.so.0'"))
4504 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4505 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4506 "/lib/libgdk_pixbuf-2.0.so.0'"))
4507 (("dlopen\\(ffi, 'glib-2.0'")
4508 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4509 "/lib/libglib-2.0.so.0'"))
4510 (("dlopen\\(ffi, 'gobject-2.0'")
4511 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4512 "/lib/libgobject-2.0.so.0'"))
4513 (("dlopen\\(ffi, 'pangocairo-1.0'")
4514 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4515 "/lib/libpangocairo-1.0.so.0'"))
4516 (("dlopen\\(ffi, 'pango-1.0'")
4517 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4518 "/lib/libpango-1.0.so.0'")))
4520 (add-after 'install 'install-doc
4521 (lambda* (#:key inputs outputs #:allow-other-keys)
4522 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4523 (doc (string-append data "/doc/" ,name "-" ,version))
4524 (html (string-append doc "/html")))
4525 (setenv "LD_LIBRARY_PATH"
4526 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4527 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4528 (setenv "LANG" "en_US.UTF-8")
4530 (for-each (lambda (file)
4531 (copy-file (string-append "." file)
4532 (string-append doc file)))
4533 '("/README.rst" "/CHANGES" "/LICENSE"))
4534 (system* "python" "setup.py" "build_sphinx")
4535 (copy-recursively "docs/_build/html" html)
4537 (home-page "https://github.com/Kozea/cairocffi")
4538 (synopsis "Python bindings and object-oriented API for Cairo")
4540 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4541 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4542 graphics library with support for multiple backends including image buffers,
4543 PNG, PostScript, PDF, and SVG file output.")
4544 (license license:bsd-3)))
4546 (define-public python2-cairocffi
4547 (package-with-python2 python-cairocffi))
4549 (define-public python-decorator
4551 (name "python-decorator")
4556 (uri (pypi-uri "decorator" version))
4558 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4559 (build-system python-build-system)
4560 (home-page "https://pypi.python.org/pypi/decorator/")
4561 (synopsis "Python module to simplify usage of decorators")
4563 "The aim of the decorator module is to simplify the usage of decorators
4564 for the average programmer, and to popularize decorators usage giving examples
4565 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4566 etc. The core of this module is a decorator factory.")
4567 (license license:expat)))
4569 (define-public python2-decorator
4570 (package-with-python2 python-decorator))
4572 (define-public python-drmaa
4574 (name "python-drmaa")
4579 (uri (pypi-uri "drmaa" version))
4581 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4582 (build-system python-build-system)
4583 ;; The test suite requires libdrmaa which is provided by the cluster
4584 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4585 ;; should be set to the path of the libdrmaa library.
4586 (arguments '(#:tests? #f))
4588 `(("python-nose" ,python-nose)))
4589 (home-page "https://pypi.python.org/pypi/drmaa")
4590 (synopsis "Python bindings for the DRMAA library")
4592 "A Python package for Distributed Resource Management (DRM) job
4593 submission and control. This package is an implementation of the DRMAA 1.0
4594 Python language binding specification.")
4595 (license license:bsd-3)))
4597 (define-public python2-drmaa
4598 (package-with-python2 python-drmaa))
4600 (define-public python-grako
4602 (name "python-grako")
4608 (pypi-uri "grako" version ".zip"))
4611 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4612 (build-system python-build-system)
4613 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4616 ("python-pytest" ,python-pytest)
4617 ("python-pytest-runner" ,python-pytest-runner)))
4618 (home-page "https://bitbucket.org/neogeny/grako")
4619 (synopsis "EBNF parser generator")
4621 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4622 memoizing PEG/Packrat parser in Python.")
4623 (license license:bsd-3)))
4625 (define-public python2-grako
4626 (package-with-python2 python-grako))
4628 (define-public python-gridmap
4630 (name "python-gridmap")
4636 (url "https://github.com/pygridtools/gridmap.git")
4637 (commit (string-append "v" version))))
4638 (file-name (git-file-name name version))
4640 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4641 (build-system python-build-system)
4643 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4645 `(("python-psutil" ,python-psutil)
4646 ("python-drmaa" ,python-drmaa)
4647 ("python-pyzmq" ,python-pyzmq)))
4648 (home-page "https://github.com/pygridtools/gridmap")
4649 (synopsis "Create jobs on a cluster directly from Python")
4651 "Gridmap is a Python package to allow you to easily create jobs on the
4652 cluster directly from Python. You can directly map Python functions onto the
4653 cluster without needing to write any wrapper code yourself.")
4654 (license license:gpl3+)))
4656 (define-public python2-gridmap
4657 (package-with-python2 python-gridmap))
4659 (define-public python-honcho
4661 (name "python-honcho")
4667 (url "https://github.com/nickstenning/honcho.git")
4668 (commit (string-append "v" version))))
4669 (file-name (git-file-name name version))
4671 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4672 (build-system python-build-system)
4674 `(("python-pytest" ,python-pytest)
4675 ("python-mock" ,python-mock)
4676 ("python-tox" ,python-tox)
4677 ("which" ,which))) ;for tests
4679 `(("python-jinja2" ,python-jinja2)))
4682 (modify-phases %standard-phases
4684 (add-after 'install 'check
4685 (lambda* (#:key outputs inputs #:allow-other-keys)
4686 ;; fix honcho path in testsuite
4687 (substitute* "tests/conftest.py"
4688 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4689 "/bin/honcho" "'")))
4690 ;; It's easier to run tests after install.
4691 ;; Make installed package available for running the tests
4692 (add-installed-pythonpath inputs outputs)
4693 (invoke "py.test" "-v"))))))
4694 (home-page "https://github.com/nickstenning/honcho")
4695 (synopsis "Manage Procfile-based applications")
4697 "A Procfile is a file which describes how to run an application
4698 consisting of several processes. honcho starts all listed processes.
4699 The output of all running processes is collected by honcho and
4701 (license license:expat)))
4703 (define-public python2-honcho
4704 (package-with-python2 python-honcho))
4706 (define-public python-pexpect
4708 (name "python-pexpect")
4713 (uri (pypi-uri "pexpect" version))
4715 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4716 (build-system python-build-system)
4719 (modify-phases %standard-phases
4720 (add-before 'check 'prepare-tests
4722 (substitute* (find-files "tests")
4723 (("/bin/ls") (which "ls"))
4724 (("/bin/echo") (which "echo"))
4725 (("/bin/which") (which "which"))
4726 ;; Many tests try to use the /bin directory which
4727 ;; is not present in the build environment.
4728 ;; Use one that's non-empty and unlikely to change.
4729 (("/bin'") "/dev'"))
4730 ;; XXX: Socket connection test gets "Connection reset by peer".
4731 ;; Why does it not work? Delete for now.
4732 (delete-file "tests/test_socket.py")
4734 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4736 `(("python-nose" ,python-nose)
4737 ("python-pytest" ,python-pytest)
4740 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4742 `(("python-ptyprocess" ,python-ptyprocess)))
4743 (home-page "http://pexpect.readthedocs.org/")
4744 (synopsis "Controlling interactive console applications")
4746 "Pexpect is a pure Python module for spawning child applications;
4747 controlling them; and responding to expected patterns in their output.
4748 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4749 child application and control it as if a human were typing commands.")
4750 (license license:isc)))
4752 (define-public python2-pexpect
4753 (package-with-python2 python-pexpect))
4755 (define-public python-setuptools-scm
4757 (name "python-setuptools-scm")
4761 (uri (pypi-uri "setuptools_scm" version))
4764 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4765 (build-system python-build-system)
4766 (home-page "https://github.com/pypa/setuptools_scm/")
4767 (synopsis "Manage Python package versions in SCM metadata")
4769 "Setuptools_scm handles managing your Python package versions in
4770 @dfn{software configuration management} (SCM) metadata instead of declaring
4771 them as the version argument or in a SCM managed file.")
4772 (license license:expat)))
4774 (define-public python2-setuptools-scm
4775 (package-with-python2 python-setuptools-scm))
4777 (define-public python-pathpy
4779 (name "python-pathpy")
4784 (uri (pypi-uri "path.py" version))
4786 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4787 ;; (outputs '("out" "doc"))
4788 (build-system python-build-system)
4790 `(("python-appdirs" ,python-appdirs)))
4792 `(("python-setuptools-scm" ,python-setuptools-scm)
4793 ("python-sphinx" ,python-sphinx)
4794 ("python-rst.linker" ,python-rst.linker)
4795 ("python-pytest" ,python-pytest)
4796 ("python-pytest-runner" ,python-pytest-runner)))
4798 ;; FIXME: Documentation and tests require "jaraco.packaging".
4801 ;; (modify-phases %standard-phases
4802 ;; (add-after 'build 'build-doc
4804 ;; (setenv "LANG" "en_US.UTF-8")
4805 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4806 ;; (add-after 'install 'install-doc
4807 ;; (lambda* (#:key outputs #:allow-other-keys)
4808 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4809 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4810 ;; (html (string-append doc "/html")))
4812 ;; (for-each (lambda (file)
4813 ;; (copy-file file (string-append doc "/" file)))
4814 ;; '("README.rst" "CHANGES.rst"))
4815 ;; (copy-recursively "build/sphinx/html" html)))))))
4816 (home-page "https://github.com/jaraco/path.py")
4817 (synopsis "Python module wrapper for built-in os.path")
4819 "@code{path.py} implements path objects as first-class entities, allowing
4820 common operations on files to be invoked on those path objects directly.")
4821 (license license:expat)))
4823 (define-public python2-pathpy
4824 (package-with-python2 python-pathpy))
4826 (define-public python-simplegeneric
4828 (name "python-simplegeneric")
4833 (uri (pypi-uri "simplegeneric" version ".zip"))
4835 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4836 (build-system python-build-system)
4838 `(("unzip" ,unzip)))
4839 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4840 (synopsis "Python module for simple generic functions")
4842 "The simplegeneric module lets you define simple single-dispatch generic
4843 functions, akin to Python’s built-in generic functions like @code{len()},
4844 @code{iter()} and so on. However, instead of using specially-named methods,
4845 these generic functions use simple lookup tables, akin to those used by
4846 e.g. @code{pickle.dump()} and other generic functions found in the Python
4848 (license license:zpl2.1)))
4850 (define-public python2-simplegeneric
4851 (package-with-python2 python-simplegeneric))
4853 (define-public python-ipython-genutils
4854 ;; TODO: This package is retired, check if can be removed, see description.
4856 (name "python-ipython-genutils")
4861 (uri (pypi-uri "ipython_genutils" version))
4863 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4864 (build-system python-build-system)
4865 (arguments `(#:tests? #f)) ; no tests
4866 (home-page "https://ipython.org")
4867 (synopsis "Vestigial utilities from IPython")
4869 "This package provides retired utilities from IPython. No packages
4870 outside IPython/Jupyter should depend on it.
4872 This package shouldn't exist. It contains some common utilities shared by
4873 Jupyter and IPython projects during The Big Split. As soon as possible, those
4874 packages will remove their dependency on this, and this package will go
4876 (license license:bsd-3)))
4878 (define-public python2-ipython-genutils
4879 (package-with-python2 python-ipython-genutils))
4881 (define-public python-traitlets
4883 (name "python-traitlets")
4888 (uri (pypi-uri "traitlets" version))
4891 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4892 (build-system python-build-system)
4895 (modify-phases %standard-phases
4896 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4898 `(("python-ipython-genutils" ,python-ipython-genutils)
4899 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4901 `(("python-pytest" ,python-pytest)))
4902 (properties `((python2-variant . ,(delay python2-traitlets))))
4903 (home-page "https://ipython.org")
4904 (synopsis "Configuration system for Python applications")
4906 "Traitlets is a framework that lets Python classes have attributes with
4907 type checking, dynamically calculated default values, and ‘on change’
4908 callbacks. The package also includes a mechanism to use traitlets for
4909 configuration, loading values from files or from command line arguments. This
4910 is a distinct layer on top of traitlets, so you can use traitlets in your code
4911 without using the configuration machinery.")
4912 (license license:bsd-3)))
4914 (define-public python2-traitlets
4915 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4919 `(("python2-enum34" ,python2-enum34)
4920 ,@(package-propagated-inputs traitlets))))))
4922 (define-public python-jupyter-core
4924 (name "python-jupyter-core")
4929 (uri (string-append (pypi-uri "jupyter_core" version)))
4932 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4933 (build-system python-build-system)
4934 ;; FIXME: not sure how to run the tests
4935 (arguments `(#:tests? #f))
4937 `(("python-traitlets" ,python-traitlets)))
4938 (home-page "http://jupyter.org/")
4939 (synopsis "Jupyter base package")
4941 "Jupyter core is the base package on which Jupyter projects rely.")
4942 (license license:bsd-3)))
4944 (define-public python2-jupyter-core
4945 (package-with-python2 python-jupyter-core))
4947 (define-public python-jupyter-client
4949 (name "python-jupyter-client")
4954 (uri (pypi-uri "jupyter_client" version))
4957 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4958 (build-system python-build-system)
4959 ;; Tests fail because of missing native python kernel which I assume is
4960 ;; provided by the ipython package, which we cannot use because it would
4961 ;; cause a dependency cycle.
4962 (arguments `(#:tests? #f))
4964 `(("python-pyzmq" ,python-pyzmq)
4965 ("python-traitlets" ,python-traitlets)
4966 ("python-jupyter-core" ,python-jupyter-core)))
4967 (home-page "http://jupyter.org/")
4968 (synopsis "Jupyter protocol implementation and client libraries")
4970 "The @code{jupyter_client} package contains the reference implementation
4971 of the Jupyter protocol. It also provides client and kernel management APIs
4972 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4973 installing @code{kernelspec}s for use with Jupyter frontends.")
4974 (license license:bsd-3)))
4976 (define-public python2-jupyter-client
4977 (package-with-python2 python-jupyter-client))
4979 (define-public python-ipykernel
4981 (name "python-ipykernel")
4986 (uri (pypi-uri "ipykernel" version))
4988 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4989 (build-system python-build-system)
4992 (modify-phases %standard-phases
4995 (setenv "HOME" "/tmp")
4996 (invoke "pytest" "-v")
4999 `(("python-ipython" ,python-ipython)
5000 ;; imported at runtime during connect
5001 ("python-jupyter-client" ,python-jupyter-client)))
5003 `(("python-pytest" ,python-pytest)
5004 ("python-nose" ,python-nose)))
5005 (home-page "https://ipython.org")
5006 (synopsis "IPython Kernel for Jupyter")
5008 "This package provides the IPython kernel for Jupyter.")
5009 (license license:bsd-3)))
5011 (define-public python2-ipykernel
5012 (package-with-python2 python-ipykernel))
5014 (define-public python-pari-jupyter
5016 (name "python-pari-jupyter")
5021 (uri (pypi-uri "pari_jupyter" version))
5024 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5025 (build-system python-build-system)
5027 `(("python-ipykernel" ,python-ipykernel)))
5029 `(("pari-gp" ,pari-gp)
5030 ("readline" ,readline)))
5032 `(#:tests? #f)) ; no test suite
5034 "https://github.com/jdemeyer/pari_jupyter")
5035 (synopsis "A Jupyter kernel for PARI/GP")
5036 (description "The package provides a PARI/GP kernel for Jupyter.")
5037 (license license:gpl3+)))
5039 ;; This is the latest release of the LTS version of ipython with support for
5040 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5041 ;; dropped support for Python 2.7. We may want to rename this package.
5042 (define-public python-ipython
5044 (name "python-ipython")
5049 (uri (pypi-uri "ipython" version ".tar.gz"))
5051 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5052 (build-system python-build-system)
5053 (outputs '("out" "doc"))
5055 `(("python-pyzmq" ,python-pyzmq)
5056 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
5057 ("python-terminado" ,python-terminado)
5058 ("python-matplotlib" ,python-matplotlib)
5059 ("python-numpy" ,python-numpy)
5060 ("python-numpydoc" ,python-numpydoc)
5061 ("python-jinja2" ,python-jinja2)
5062 ("python-mistune" ,python-mistune)
5063 ("python-pexpect" ,python-pexpect)
5064 ("python-pickleshare" ,python-pickleshare)
5065 ("python-simplegeneric" ,python-simplegeneric)
5066 ("python-jsonschema" ,python-jsonschema)
5067 ("python-traitlets" ,python-traitlets)
5068 ("python-nbformat" ,python-nbformat)
5069 ("python-pygments" ,python-pygments)))
5071 `(("readline" ,readline)
5074 `(("graphviz" ,graphviz)
5075 ("pkg-config" ,pkg-config)
5076 ("python-requests" ,python-requests) ;; for tests
5077 ("python-testpath" ,python-testpath)
5078 ("python-nose" ,python-nose)
5079 ("python-sphinx" ,python-sphinx)
5080 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5081 ;; FIXME: It's possible that a smaller union would work just as well.
5082 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5084 texlive-generic-ifxetex
5085 texlive-generic-pdftex
5086 texlive-latex-amsfonts
5087 texlive-latex-capt-of
5089 texlive-latex-environ
5090 texlive-latex-eqparbox
5091 texlive-latex-etoolbox
5092 texlive-latex-expdlist
5093 texlive-latex-fancyhdr
5094 texlive-latex-fancyvrb
5095 texlive-latex-fncychap
5097 texlive-latex-framed
5098 texlive-latex-geometry
5099 texlive-latex-graphics
5100 texlive-latex-hyperref
5101 texlive-latex-mdwtools
5102 texlive-latex-multirow
5103 texlive-latex-oberdiek
5104 texlive-latex-parskip
5105 texlive-latex-preview
5106 texlive-latex-tabulary
5107 texlive-latex-threeparttable
5108 texlive-latex-titlesec
5109 texlive-latex-trimspaces
5111 texlive-latex-upquote
5113 texlive-latex-varwidth
5114 texlive-latex-wrapfig)))
5115 ("texinfo" ,texinfo)))
5118 (modify-phases %standard-phases
5119 (add-after 'install 'install-doc
5120 (lambda* (#:key inputs outputs #:allow-other-keys)
5121 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5122 (doc (string-append data "/doc/" ,name "-" ,version))
5123 (html (string-append doc "/html"))
5124 (man1 (string-append data "/man/man1"))
5125 (info (string-append data "/info"))
5126 (examples (string-append doc "/examples"))
5127 (python-arg (string-append "PYTHON=" (which "python"))))
5128 (setenv "LANG" "en_US.utf8")
5129 ;; Make installed package available for running the tests
5130 (add-installed-pythonpath inputs outputs)
5131 (with-directory-excursion "docs"
5132 ;; FIXME: pdf fails to build
5133 ;;(system* "make" "pdf" "PAPER=a4")
5134 (system* "make" python-arg "html")
5135 (system* "make" python-arg "info"))
5136 (copy-recursively "docs/man" man1)
5137 (copy-recursively "examples" examples)
5138 (copy-recursively "docs/build/html" html)
5139 ;; (copy-file "docs/build/latex/ipython.pdf"
5140 ;; (string-append doc "/ipython.pdf"))
5142 (copy-file "docs/build/texinfo/ipython.info"
5143 (string-append info "/ipython.info"))
5144 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5146 ;; Tests can only be run after the library has been installed and not
5147 ;; within the source directory.
5149 (add-after 'install 'check
5150 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5153 ;; Make installed package available for running the tests
5154 (add-installed-pythonpath inputs outputs)
5155 (setenv "HOME" "/tmp/") ;; required by a test
5156 ;; We only test the core because one of the other tests
5157 ;; tries to import ipykernel.
5158 (invoke "python" "IPython/testing/iptest.py"
5159 "-v" "IPython/core/tests"))
5161 (add-before 'check 'fix-tests
5162 (lambda* (#:key inputs #:allow-other-keys)
5163 (substitute* "./IPython/utils/_process_posix.py"
5164 (("/usr/bin/env', 'which") (which "which")))
5165 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5166 (("#!/usr/bin/env python")
5167 (string-append "#!" (which "python"))))
5168 ;; Disable 1 failing test
5169 (substitute* "./IPython/core/tests/test_magic.py"
5170 (("def test_dirops\\(\\):" all)
5171 (string-append "@dec.skipif(True)\n" all)))
5172 ;; This test introduces a circular dependency on ipykernel
5173 ;; (which depends on ipython).
5174 (delete-file "IPython/core/tests/test_display.py")
5175 ;; These tests throw errors for unknown reasons.
5176 (delete-file "IPython/extensions/tests/test_storemagic.py")
5177 (delete-file "IPython/core/tests/test_displayhook.py")
5178 (delete-file "IPython/core/tests/test_interactiveshell.py")
5179 (delete-file "IPython/core/tests/test_pylabtools.py")
5180 (delete-file "IPython/core/tests/test_paths.py")
5182 (home-page "https://ipython.org")
5183 (synopsis "IPython is a tool for interactive computing in Python")
5185 "IPython provides a rich architecture for interactive computing with:
5186 Powerful interactive shells, a browser-based notebook, support for interactive
5187 data visualization, embeddable interpreters and tools for parallel
5189 (license license:bsd-3)
5190 (properties `((python2-variant . ,(delay python2-ipython))))))
5192 (define-public python2-ipython
5193 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5196 ;; FIXME: add pyreadline once available.
5198 `(("python2-backports-shutil-get-terminal-size"
5199 ,python2-backports-shutil-get-terminal-size)
5200 ("python2-pathlib2" ,python2-pathlib2)
5201 ,@(package-propagated-inputs ipython)))
5203 `(("python2-mock" ,python2-mock)
5204 ,@(package-native-inputs ipython))))))
5206 (define-public python-urwid
5208 (name "python-urwid")
5213 (uri (pypi-uri "urwid" version))
5216 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5217 (build-system python-build-system)
5218 (home-page "http://urwid.org")
5219 (synopsis "Console user interface library for Python")
5221 "Urwid is a curses-based UI/widget library for Python. It includes many
5222 features useful for text console applications.")
5223 (license license:lgpl2.1+)))
5225 (define-public python2-urwid
5226 (package-with-python2 python-urwid))
5228 (define-public python-urwidtrees
5230 (name "python-urwidtrees")
5235 ;; package author intends on distributing via github rather than pypi:
5236 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5237 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5239 (file-name (string-append name "-" version ".tar.gz"))
5242 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5243 (build-system python-build-system)
5245 '(#:tests? #f)) ; no tests
5246 (propagated-inputs `(("python-urwid" ,python-urwid)))
5247 (home-page "https://github.com/pazz/urwidtrees")
5248 (synopsis "Tree widgets for urwid")
5249 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5250 toolkit. Use it to build trees of widgets.")
5251 (license license:gpl3+)))
5253 (define-public python2-urwidtrees
5254 (package-with-python2 python-urwidtrees))
5256 (define-public python-ua-parser
5258 (name "python-ua-parser")
5263 (uri (pypi-uri "ua-parser" version))
5266 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5267 (build-system python-build-system)
5269 `(#:tests? #f)) ;no test suite in release
5271 `(("python-pyyaml" ,python-pyyaml)))
5272 (home-page "https://github.com/ua-parser/uap-python")
5273 (synopsis "User agent parser")
5275 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5276 (license license:asl2.0)))
5278 (define-public python2-ua-parser
5279 (package-with-python2 python-ua-parser))
5281 (define-public python-user-agents
5283 (name "python-user-agents")
5288 (uri (pypi-uri "user-agents" version))
5291 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5292 (build-system python-build-system)
5294 `(#:tests? #f)) ;missing devices.json test file in release
5296 `(("python-ua-parser" ,python-ua-parser)))
5297 (home-page "https://github.com/selwin/python-user-agents")
5298 (synopsis "User Agent strings parsing library")
5300 "A library to identify devices (phones, tablets) and their capabilities by
5301 parsing (browser/HTTP) user agent strings.")
5302 (license license:expat)))
5304 (define-public python2-user-agents
5305 (package-with-python2 python-user-agents))
5307 (define-public python-dbus
5309 (name "python-dbus")
5314 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5315 "dbus-python-" version ".tar.gz"))
5318 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5319 (build-system gnu-build-system)
5322 (modify-phases %standard-phases
5326 ;; XXX: For the missing '/etc/machine-id'.
5327 (substitute* "test/run-test.sh"
5328 (("DBUS_FATAL_WARNINGS=1")
5329 "DBUS_FATAL_WARNINGS=0"))
5332 `(("pkg-config" ,pkg-config)))
5334 `(("python" ,python-wrapper)
5335 ("dbus-glib" ,dbus-glib)))
5336 (synopsis "Python bindings for D-bus")
5337 (description "python-dbus provides bindings for libdbus, the reference
5338 implementation of D-Bus.")
5339 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5340 (license license:expat)))
5342 (define-public python2-dbus
5343 (package (inherit python-dbus)
5344 (name "python2-dbus")
5345 (inputs `(("python" ,python-2)
5346 ,@(alist-delete "python"
5347 (package-inputs python-dbus)
5349 ;; FIXME: on Python 2, the test_utf8 fails with:
5350 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5351 (arguments `(#:tests? #f))))
5353 (define-public python-lxml
5355 (name "python-lxml")
5360 (uri (pypi-uri "lxml" version))
5363 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5364 (build-system python-build-system)
5366 `(("libxml2" ,libxml2)
5367 ("libxslt" ,libxslt)))
5368 (home-page "http://lxml.de/")
5370 "Python XML processing library")
5372 "The lxml XML toolkit is a Pythonic binding for the C libraries
5373 libxml2 and libxslt.")
5374 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5376 (define-public python2-lxml
5377 (package-with-python2 python-lxml))
5379 ;; beautifulsoup4 has a totally different namespace than 3.x,
5380 ;; and pypi seems to put it under its own name, so I guess we should too
5381 (define-public python-beautifulsoup4
5383 (name "python-beautifulsoup4")
5388 (uri (pypi-uri "beautifulsoup4" version))
5391 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5392 (build-system python-build-system)
5395 (modify-phases %standard-phases
5396 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5397 ;; must use this conversion script when building with Python 3. The
5398 ;; conversion script also runs the tests.
5399 ;; For more information, see the file 'convert-py3k' in the source
5402 (lambda _ (invoke "./convert-py3k"))))))
5404 `(("python-soupsieve" ,python-soupsieve)))
5406 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5408 "Python screen-scraping library")
5410 "Beautiful Soup is a Python library designed for rapidly setting up
5411 screen-scraping projects. It offers Pythonic idioms for navigating,
5412 searching, and modifying a parse tree, providing a toolkit for
5413 dissecting a document and extracting what you need. It automatically
5414 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5415 (license license:expat)
5416 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5418 (define-public python2-beautifulsoup4
5420 (inherit (package-with-python2
5421 (strip-python2-variant python-beautifulsoup4)))
5422 (arguments `(#:python ,python-2))))
5424 (define-public python-soupsieve
5426 (name "python-soupsieve")
5431 (uri (pypi-uri "soupsieve" version))
5434 "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj"))))
5435 (build-system python-build-system)
5436 (arguments `(#:tests? #f))
5437 ;;XXX: 2 tests fail currently despite claming they were to be
5438 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5439 ;;don't want to create a circular dependency.
5440 (home-page "https://github.com/facelessuser/soupsieve")
5441 (synopsis "CSS selector library")
5443 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5444 Soup 4. It aims to provide selecting, matching, and filtering using modern
5445 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5446 specifications up through the latest CSS level 4 drafts and beyond (though
5447 some are not yet implemented).")
5448 (properties `((python2-variant . ,(delay python2-soupsieve))))
5449 (license license:expat)))
5451 (define-public python2-soupsieve
5452 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5456 `(("python2-backports-functools-lru-cache"
5457 ,python2-backports-functools-lru-cache)
5458 ,@(package-propagated-inputs base))))))
5460 (define-public python-netifaces
5462 (name "python-netifaces")
5467 (uri (pypi-uri "netifaces" version))
5470 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5471 (build-system python-build-system)
5472 (home-page "https://github.com/al45tair/netifaces")
5474 "Python module for portable network interface information")
5476 "Netifaces is a Python module providing information on network
5477 interfaces in an easy and portable manner.")
5478 (license license:expat)))
5480 (define-public python2-netifaces
5481 (package-with-python2 python-netifaces))
5483 (define-public python-networkx
5485 (name "python-networkx")
5490 (uri (pypi-uri "networkx" version ".zip"))
5492 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5493 (build-system python-build-system)
5494 ;; python-decorator is needed at runtime.
5496 `(("python-decorator" ,python-decorator)))
5498 `(("python-nose" ,python-nose)
5500 (home-page "https://networkx.github.io/")
5501 (synopsis "Python module for creating and manipulating graphs and networks")
5503 "NetworkX is a Python package for the creation, manipulation, and study
5504 of the structure, dynamics, and functions of complex networks.")
5505 (license license:bsd-3)))
5507 (define-public python2-networkx
5508 (package-with-python2 python-networkx))
5510 (define-public python-datrie
5512 (name "python-datrie")
5517 (uri (pypi-uri "datrie" version))
5520 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5521 (build-system python-build-system)
5523 `(#:phases (modify-phases %standard-phases
5524 (add-before 'build 'cythonize
5526 ;; Regenerate Cython classes to solve ABI issues with Python
5527 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5528 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5529 "src/stdio_ext.pxd" "-a"))))))
5531 `(("python-cython" ,python-cython)
5532 ("python-hypothesis" ,python-hypothesis)
5533 ("python-pytest" ,python-pytest)
5534 ("python-pytest-runner" ,python-pytest-runner)))
5535 (home-page "https://github.com/kmike/datrie")
5536 (synopsis "Fast, efficiently stored trie for Python")
5538 "This package provides a fast, efficiently stored trie implementation for
5540 (license license:lgpl2.1+)))
5542 (define-public snakemake
5549 (uri (pypi-uri "snakemake" version))
5551 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5552 (build-system python-build-system)
5554 ;; TODO: Package missing test dependencies.
5557 (modify-phases %standard-phases
5558 ;; For cluster execution Snakemake will call Python. Since there is
5559 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5560 ;; this by calling the snakemake wrapper instead.
5561 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5562 (lambda* (#:key outputs #:allow-other-keys)
5563 (substitute* "snakemake/executors.py"
5564 (("\\{sys.executable\\} -m snakemake")
5565 (string-append (assoc-ref outputs "out")
5569 `(("python-gitpython" ,python-gitpython)
5570 ("python-wrapt" ,python-wrapt)
5571 ("python-requests" ,python-requests)
5572 ("python-appdirs" ,python-appdirs)
5573 ("python-configargparse" ,python-configargparse)
5574 ("python-datrie" ,python-datrie)
5575 ("python-docutils" ,python-docutils)
5576 ("python-jinja2" ,python-jinja2)
5577 ("python-jsonschema" ,python-jsonschema)
5578 ("python-networkx" ,python-networkx)
5579 ("python-pyyaml" ,python-pyyaml)
5580 ("python-ratelimiter" ,python-ratelimiter)))
5581 (home-page "https://snakemake.readthedocs.io")
5582 (synopsis "Python-based execution environment for make-like workflows")
5584 "Snakemake aims to reduce the complexity of creating workflows by
5585 providing a clean and modern domain specific specification language (DSL) in
5586 Python style, together with a fast and comfortable execution environment.")
5587 (license license:expat)))
5589 ;; This is currently needed for the pigx-* packages.
5590 (define-public snakemake-4
5591 (package (inherit snakemake)
5596 (uri (pypi-uri "snakemake" version))
5598 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5600 `(("python-wrapt" ,python-wrapt)
5601 ("python-requests" ,python-requests)
5602 ("python-appdirs" ,python-appdirs)
5603 ("python-configargparse" ,python-configargparse)
5604 ("python-pyyaml" ,python-pyyaml)
5605 ("python-ratelimiter" ,python-ratelimiter)))))
5607 (define-public python-pyqrcode
5609 (name "python-pyqrcode")
5614 (uri (pypi-uri "PyQRCode" version))
5617 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5618 (build-system python-build-system)
5620 "https://github.com/mnooner256/pyqrcode")
5621 (synopsis "QR code generator")
5623 "Pyqrcode is a QR code generator written purely in Python with
5624 SVG, EPS, PNG and terminal output.")
5625 (license license:bsd-3)))
5627 (define-public python-seaborn
5629 (name "python-seaborn")
5634 (uri (pypi-uri "seaborn" version))
5636 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5637 (build-system python-build-system)
5640 (modify-phases %standard-phases
5641 (add-before 'check 'start-xserver
5642 (lambda* (#:key inputs #:allow-other-keys)
5643 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5644 ;; There must be a running X server and make check doesn't
5645 ;; start one. Therefore we must do it.
5646 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5647 (setenv "DISPLAY" ":1")
5649 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5651 `(("python-pandas" ,python-pandas)
5652 ("python-matplotlib" ,python-matplotlib)
5653 ("python-numpy" ,python-numpy)
5654 ("python-scipy" ,python-scipy)))
5656 `(("python-pytest" ,python-pytest)
5657 ("xorg-server" ,xorg-server)))
5658 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5659 (synopsis "Statistical data visualization")
5661 "Seaborn is a library for making attractive and informative statistical
5662 graphics in Python. It is built on top of matplotlib and tightly integrated
5663 with the PyData stack, including support for numpy and pandas data structures
5664 and statistical routines from scipy and statsmodels.")
5665 (license license:bsd-3)))
5667 (define-public python2-seaborn
5668 (package-with-python2 python-seaborn))
5670 (define-public python-mpmath
5672 (name "python-mpmath")
5676 (uri (string-append "http://mpmath.org/files/mpmath-"
5680 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5681 (build-system python-build-system)
5684 (modify-phases %standard-phases
5687 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5688 (home-page "http://mpmath.org")
5689 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5691 "@code{mpmath} can be used as an arbitrary-precision substitute for
5692 Python's float/complex types and math/cmath modules, but also does much
5693 more advanced mathematics.")
5694 (license license:bsd-3)))
5696 (define-public python2-mpmath
5697 (package-with-python2 python-mpmath))
5699 (define-public python-bigfloat
5701 (name "python-bigfloat")
5706 (uri (pypi-uri "bigfloat" version))
5708 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5709 (build-system python-build-system)
5712 (home-page "https://github.com/mdickinson/bigfloat")
5713 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5715 "This package provides a Python interface to the MPFR library for
5716 multiprecision arithmetic.")
5717 (license license:lgpl3+)))
5719 (define-public python2-bigfloat
5720 (package-with-python2 python-bigfloat))
5722 (define-public python-sympy
5724 (name "python-sympy")
5730 "https://github.com/sympy/sympy/releases/download/sympy-"
5731 version "/sympy-" version ".tar.gz"))
5733 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5734 (build-system python-build-system)
5737 (modify-phases %standard-phases
5738 ;; Run the core tests after installation. By default it would run
5739 ;; *all* tests, which take a very long time to complete and are known
5742 (add-after 'install 'check
5743 (lambda* (#:key outputs #:allow-other-keys)
5744 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5747 `(("python-mpmath" ,python-mpmath)))
5748 (home-page "http://www.sympy.org/")
5749 (synopsis "Python library for symbolic mathematics")
5751 "SymPy is a Python library for symbolic mathematics. It aims to become a
5752 full-featured computer algebra system (CAS) while keeping the code as simple
5753 as possible in order to be comprehensible and easily extensible.")
5754 (license license:bsd-3)))
5756 (define-public python2-sympy
5758 (inherit (package-with-python2 python-sympy))
5761 (modify-phases %standard-phases
5762 ;; Run the core tests after installation. By default it would run
5763 ;; *all* tests, which take a very long time to complete and are known
5766 (add-after 'install 'check
5767 (lambda* (#:key outputs #:allow-other-keys)
5768 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5771 (define-public python-q
5778 (uri (pypi-uri "q" version))
5781 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5782 (build-system python-build-system)
5783 (home-page "https://github.com/zestyping/q")
5784 (synopsis "Quick-and-dirty debugging output for tired programmers")
5786 "q is a Python module for \"print\" style of debugging Python code. It
5787 provides convenient short API for print out of values, tracebacks, and
5788 falling into the Python interpreter.")
5789 (license license:asl2.0)))
5791 (define-public python2-q
5792 (package-with-python2 python-q))
5794 (define-public python2-xlib
5796 (name "python2-xlib")
5800 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5802 "python-xlib-" version ".tar.gz"))
5805 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5806 (build-system python-build-system)
5808 `(#:python ,python-2 ;Python 2 only
5809 #:tests? #f)) ;no tests
5810 (home-page "http://python-xlib.sourceforge.net/")
5811 (synopsis "Python X11 client library")
5813 "The Python X Library is intended to be a fully functional X client
5814 library for Python programs. It is useful to implement low-level X clients.
5815 It is written entirely in Python.")
5816 (license license:gpl2+)))
5818 (define-public python-singledispatch
5820 (name "python-singledispatch")
5825 (uri (pypi-uri "singledispatch" version))
5828 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5829 (build-system python-build-system)
5831 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5833 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5834 (synopsis "Backport of singledispatch feature from Python 3.4")
5836 "This library brings functools.singledispatch from Python 3.4 to Python
5838 (license license:expat)))
5840 (define-public python2-singledispatch
5841 (package-with-python2 python-singledispatch))
5843 ;; the python- version can be removed with python-3.5
5844 (define-public python-backports-abc
5846 (name "python-backports-abc")
5851 (uri (pypi-uri "backports_abc" version))
5854 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5855 (build-system python-build-system)
5856 (home-page "https://github.com/cython/backports_abc")
5857 (synopsis "Backport of additions to the 'collections.abc' module")
5859 "Python-backports-abc provides a backport of additions to the
5860 @code{collections.abc} module in Python-3.5.")
5861 (license license:psfl)))
5863 (define-public python2-backports-abc
5864 (package-with-python2 python-backports-abc))
5866 (define-public python-backports-csv
5868 (name "python-backports-csv")
5873 (uri (pypi-uri "backports.csv" version))
5876 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5877 (build-system python-build-system)
5878 (home-page "https://github.com/ryanhiebert/backports.csv")
5879 (synopsis "Backport of Python 3's csv module for Python 2")
5881 "Provides a backport of Python 3's @code{csv} module for parsing
5882 comma separated values. The API of the @code{csv} module in Python 2
5883 is drastically different from the @code{csv} module in Python 3.
5884 This is due, for the most part, to the difference between str in
5885 Python 2 and Python 3.")
5886 (license license:psfl)))
5888 (define-public python2-backports-csv
5889 (package-with-python2 python-backports-csv))
5891 (define-public python2-backports-shutil-get-terminal-size
5893 (name "python2-backports-shutil-get-terminal-size")
5898 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5901 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5902 (build-system python-build-system)
5904 `(#:python ,python-2
5906 (modify-phases %standard-phases
5909 (invoke "py.test" "-v"))))))
5911 `(("python2-pytest" ,python2-pytest)))
5912 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5913 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5915 "This package provides a backport of the @code{get_terminal_size
5916 function} from Python 3.3's @code{shutil}.
5917 Unlike the original version it is written in pure Python rather than C,
5918 so it might be a tiny bit slower.")
5919 (license license:expat)))
5921 (define-public python-waf
5927 (uri (string-append "https://waf.io/"
5928 "waf-" version ".tar.bz2"))
5931 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5932 (build-system python-build-system)
5935 (modify-phases %standard-phases
5938 (invoke "python" "waf-light" "configure" "build")))
5941 (invoke "python" "waf" "--version")))
5943 (lambda* (#:key outputs #:allow-other-keys)
5944 (let ((out (assoc-ref outputs "out")))
5945 (install-file "waf" (string-append out "/bin")))
5947 ;; waf breaks when it is wrapped.
5949 (home-page "https://waf.io/")
5950 (synopsis "Python-based build system")
5952 "Waf is a Python-based framework for configuring, compiling and installing
5954 (license license:bsd-3)))
5956 (define-public python2-waf
5957 (package-with-python2 python-waf))
5959 (define-public python-pyzmq
5961 (name "python-pyzmq")
5966 (uri (pypi-uri "pyzmq" version))
5968 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5969 (build-system python-build-system)
5972 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5973 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5974 ;; --inplace' for 'python setup.py test' to work.
5977 `(("zeromq" ,zeromq)))
5979 `(("pkg-config" ,pkg-config)
5980 ("python-nose" ,python-nose)))
5981 (home-page "https://github.com/zeromq/pyzmq")
5982 (synopsis "Python bindings for 0MQ")
5984 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5985 (license license:bsd-4)))
5987 (define-public python2-pyzmq
5988 (package-with-python2 python-pyzmq))
5990 (define-public python-pep8
5991 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5992 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5993 ;; some dependents' test suites, and nothing more.
5995 (name "python-pep8")
6000 (uri (pypi-uri "pep8" version))
6003 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6004 (build-system python-build-system)
6005 (home-page "https://pep8.readthedocs.org/")
6006 (synopsis "Python style guide checker")
6008 "This tools checks Python code against some of the style conventions in
6010 (license license:expat)))
6012 (define-public python2-pep8
6013 (package-with-python2 python-pep8))
6015 (define-public python-pyflakes
6017 (name "python-pyflakes")
6022 (uri (pypi-uri "pyflakes" version))
6025 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6026 (build-system python-build-system)
6028 "https://github.com/pyflakes/pyflakes")
6029 (synopsis "Passive checker of Python programs")
6031 "Pyflakes statically checks Python source code for common errors.")
6032 (license license:expat)))
6034 (define-public python2-pyflakes
6035 (package-with-python2 python-pyflakes))
6037 (define-public python-mccabe
6039 (name "python-mccabe")
6044 (uri (pypi-uri "mccabe" version))
6047 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6048 (build-system python-build-system)
6050 `(("python-pytest" ,python-pytest-bootstrap)
6051 ("python-pytest-runner" ,python-pytest-runner)))
6052 (home-page "https://github.com/flintwork/mccabe")
6053 (synopsis "McCabe checker, plugin for flake8")
6055 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6056 complexity of Python source code.")
6057 (license license:expat)))
6059 (define-public python2-mccabe
6060 (package-with-python2 python-mccabe))
6062 (define-public python-mccabe-0.2.1
6063 (package (inherit python-mccabe)
6068 (uri (pypi-uri "mccabe" version))
6071 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6073 (define-public python2-mccabe-0.2.1
6074 (package-with-python2 python-mccabe-0.2.1))
6076 ;; Flake8 2.4.1 requires an older version of pep8.
6077 ;; This should be removed ASAP.
6078 (define-public python-pep8-1.5.7
6079 (package (inherit python-pep8)
6084 (uri (pypi-uri "pep8" version))
6087 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6089 ;; XXX Tests not compatible with Python 3.5.
6092 (define-public python2-pep8-1.5.7
6093 (package-with-python2 python-pep8-1.5.7))
6095 ;; Flake8 2.4.1 requires an older version of pyflakes.
6096 ;; This should be removed ASAP.
6097 (define-public python-pyflakes-0.8.1
6098 (package (inherit python-pyflakes)
6103 (uri (pypi-uri "pyflakes" version))
6106 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6108 ;; XXX Tests not compatible with Python 3.5.
6111 (define-public python2-pyflakes-0.8.1
6112 (package-with-python2 python-pyflakes-0.8.1))
6114 ;; This package is used by hypothesis which has thousands of dependent packages.
6115 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6116 (define-public python-flake8-3.5
6118 (name "python-flake8")
6123 (uri (pypi-uri "flake8" version))
6126 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6127 (build-system python-build-system)
6130 (modify-phases %standard-phases
6131 ;; Two errors don't seem to have assigned codes.
6132 (add-after 'unpack 'delete-broken-test
6133 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6134 (add-after 'unpack 'fix-problem-with-pycodestyle
6136 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6137 ;; This should no longer be needed with the next release.
6138 (substitute* "setup.py"
6139 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6140 "PEP8_PLUGIN('break_after_binary_operator'),\
6141 PEP8_PLUGIN('break_before_binary_operator'),"))
6144 (add-after 'install 'check
6145 (lambda* (#:key inputs outputs #:allow-other-keys)
6146 (add-installed-pythonpath inputs outputs)
6147 (invoke "pytest" "-v")
6150 `(("python-pycodestyle" ,python-pycodestyle)
6151 ("python-pyflakes" ,python-pyflakes)
6152 ("python-mccabe" ,python-mccabe)))
6154 `(("python-mock" ,python-mock)
6155 ("python-pytest" ,python-pytest-bootstrap)
6156 ("python-pytest-runner" ,python-pytest-runner)))
6157 (home-page "https://gitlab.com/pycqa/flake8")
6159 "The modular source code checker: pep8, pyflakes and co")
6161 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6162 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6163 (license license:expat)))
6165 (define-public python2-flake8-3.5
6166 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6167 (package (inherit base)
6169 `(("python2-configparser" ,python2-configparser)
6170 ("python2-enum34" ,python2-enum34)
6171 ,@(package-propagated-inputs base))))))
6173 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6174 ;; this newer version. Keep it as a separate variable for now to avoid
6175 ;; rebuilding "python-hypothesis"; this should be removed in the next
6177 (define-public python-flake8
6179 (inherit python-flake8-3.5)
6183 (uri (pypi-uri "flake8" version))
6186 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6188 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6190 `(modify-phases ,phases
6191 (delete 'delete-broken-test)
6192 (delete 'fix-problem-with-pycodestyle)))))
6193 (properties `((python2-variant . ,(delay python2-flake8))))))
6195 (define-public python2-flake8
6196 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6197 (package (inherit base)
6199 (package-propagated-inputs python2-flake8-3.5)))))
6201 ;; python-hacking requires flake8 <2.6.0.
6202 (define-public python-flake8-2.5
6204 (inherit python-flake8)
6208 (uri (pypi-uri "flake8" version))
6211 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6213 `(("python-pep8" ,python-pep8)
6214 ,@(package-propagated-inputs python-flake8)))
6215 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6217 (define-public python2-flake8-2.5
6219 (inherit python2-flake8)
6220 (version (package-version python-flake8-2.5))
6222 (inherit (package-source python-flake8-2.5))))
6224 `(("python2-pep8" ,python2-pep8)
6225 ,@(package-propagated-inputs python2-flake8)))))
6227 (define-public python-flake8-polyfill
6229 (name "python-flake8-polyfill")
6234 (uri (pypi-uri "flake8-polyfill" version))
6237 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6238 (build-system python-build-system)
6241 (modify-phases %standard-phases
6244 (setenv "PYTHONPATH"
6245 (string-append (getcwd) "/build/lib:"
6246 (getenv "PYTHONPATH")))
6247 (invoke "py.test" "-v"))))))
6249 `(("python-flake8" ,python-flake8)
6250 ("python-mock" ,python-mock)
6251 ("python-pep8" ,python-pep8)
6252 ("python-pycodestyle" ,python-pycodestyle)
6253 ("python-pytest" ,python-pytest)))
6254 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6255 (synopsis "Polyfill package for Flake8 plugins")
6257 "This package that provides some compatibility helpers for Flake8
6258 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6259 (license license:expat)))
6261 (define-public python2-flake8-polyfill
6262 (package-with-python2 python-flake8-polyfill))
6264 (define-public python-mistune
6266 (name "python-mistune")
6271 (uri (pypi-uri "mistune" version))
6274 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6275 (build-system python-build-system)
6277 `(("python-nose" ,python-nose)
6278 ("python-cython" ,python-cython)))
6279 (home-page "https://github.com/lepture/mistune")
6280 (synopsis "Markdown parser in pure Python")
6281 (description "This package provides a fast markdown parser in pure
6283 (license license:bsd-3)))
6285 (define-public python2-mistune
6286 (package-with-python2 python-mistune))
6288 (define-public python-markdown
6290 (name "python-markdown")
6295 (uri (pypi-uri "Markdown" version))
6298 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6299 (build-system python-build-system)
6301 `(("python-nose" ,python-nose)
6302 ("python-pyyaml" ,python-pyyaml)))
6303 (home-page "https://python-markdown.github.io/")
6304 (synopsis "Python implementation of Markdown")
6306 "This package provides a Python implementation of John Gruber's
6307 Markdown. The library features international input, various Markdown
6308 extensions, and several HTML output formats. A command line wrapper
6309 markdown_py is also provided to convert Markdown files to HTML.")
6310 (license license:bsd-3)))
6312 (define-public python2-markdown
6313 (package-with-python2 python-markdown))
6315 (define-public python-ptyprocess
6317 (name "python-ptyprocess")
6322 (uri (pypi-uri "ptyprocess" version))
6325 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6326 (build-system python-build-system)
6328 `(("python-nose" ,python-nose)))
6331 (modify-phases %standard-phases
6333 (lambda _ (invoke "nosetests"))))))
6334 (home-page "https://github.com/pexpect/ptyprocess")
6335 (synopsis "Run a subprocess in a pseudo terminal")
6337 "This package provides a Python library used to launch a subprocess in a
6338 pseudo terminal (pty), and interact with both the process and its pty.")
6339 (license license:isc)))
6341 (define-public python2-ptyprocess
6342 (package-with-python2 python-ptyprocess))
6344 (define-public python-cram
6346 (name "python-cram")
6348 (home-page "https://bitheap.org/cram/")
6351 (uri (list (string-append home-page "cram-"
6353 (pypi-uri "cram" version)))
6356 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6359 (modify-phases %standard-phases
6360 (add-after 'unpack 'patch-source
6362 (substitute* (find-files "cram" ".*\\.py$")
6363 ;; Replace default shell path.
6364 (("/bin/sh") (which "sh")))
6365 (substitute* (find-files "tests" ".*\\.t$")
6367 (("/bin/bash") (which "bash"))
6368 (("/bin/sh") (which "sh")))
6369 (substitute* "cram/_test.py"
6370 ;; This hack works around a bug triggered by substituting
6371 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6372 ;; "cram -h", which breaks the output at 80 characters. This
6373 ;; causes the line showing the default shell to break into two
6374 ;; lines, but the test expects a single line...
6375 (("env\\['COLUMNS'\\] = '80'")
6376 "env['COLUMNS'] = '160'"))
6379 (add-after 'install 'check
6380 ;; The test phase uses the built library and executable.
6381 ;; It's easier to run it after install since the build
6382 ;; directory contains version-specific PATH.
6383 (lambda* (#:key inputs outputs #:allow-other-keys)
6384 (add-installed-pythonpath inputs outputs)
6385 (setenv "PATH" (string-append (getenv "PATH") ":"
6386 (assoc-ref outputs "out") "/bin"))
6387 (invoke "make" "test"))))))
6388 (build-system python-build-system)
6390 `(("python-coverage" ,python-coverage)
6392 (synopsis "Simple testing framework for command line applications")
6394 "Cram is a functional testing framework for command line applications.
6395 Cram tests look like snippets of interactive shell sessions. Cram runs each
6396 command and compares the command output in the test with the command’s actual
6398 (license license:gpl2+)))
6400 (define-public python2-cram
6401 (package-with-python2 python-cram))
6403 (define-public python-straight-plugin
6405 (name "python-straight-plugin")
6410 (uri (pypi-uri "straight.plugin" version))
6413 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6414 (build-system python-build-system)
6415 (home-page "https://github.com/ironfroggy/straight.plugin")
6416 (synopsis "Simple namespaced plugin facility")
6417 (description "Straight Plugin provides a type of plugin you can create from
6418 almost any existing Python modules, and an easy way for outside developers to
6419 add functionality and customization to your projects with their own plugins.")
6420 (license license:expat)))
6422 (define-public python2-straight-plugin
6423 (package-with-python2 python-straight-plugin))
6425 (define-public python-fonttools
6427 (name "python-fonttools")
6431 (uri (pypi-uri "fonttools" version ".zip"))
6434 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6435 (build-system python-build-system)
6438 ("python-pytest" ,python-pytest)
6439 ("python-pytest-runner" ,python-pytest-runner)))
6440 (home-page "https://github.com/behdad/fonttools")
6441 (synopsis "Tools to manipulate font files")
6443 "FontTools/TTX is a library to manipulate font files from Python. It
6444 supports reading and writing of TrueType/OpenType fonts, reading and writing
6445 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6446 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6447 from an XML-based format.")
6448 (license license:expat)))
6450 (define-public python2-fonttools
6451 (package-with-python2 python-fonttools))
6453 (define-public python-ly
6460 (uri (pypi-uri name version))
6463 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6464 (build-system python-build-system)
6466 ;; FIXME: Some tests need network access.
6468 (synopsis "Tool and library for manipulating LilyPond files")
6469 (description "This package provides a Python library to parse, manipulate
6470 or create documents in LilyPond format. A command line program ly is also
6471 provided that can be used to do various manipulations with LilyPond files.")
6472 (home-page "https://pypi.python.org/pypi/python-ly")
6473 (license license:gpl2+)))
6475 (define-public python-appdirs
6477 (name "python-appdirs")
6482 (uri (pypi-uri "appdirs" version))
6485 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6486 (build-system python-build-system)
6487 (home-page "https://github.com/ActiveState/appdirs")
6489 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6491 "This module provides a portable way of finding out where user data
6492 should be stored on various operating systems.")
6493 (license license:expat)))
6495 (define-public python2-appdirs
6496 (package-with-python2 python-appdirs))
6498 (define-public python-llfuse
6500 (name "python-llfuse")
6504 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6507 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6508 (build-system python-build-system)
6513 `(("pkg-config" ,pkg-config)))
6514 (synopsis "Python bindings for FUSE")
6516 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6517 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6518 (license license:lgpl2.0+)
6519 (properties `((python2-variant . ,(delay python2-llfuse))))))
6521 (define-public python2-llfuse
6522 (package (inherit (package-with-python2
6523 (strip-python2-variant python-llfuse)))
6524 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6527 (define-public python-llfuse-0.41
6528 (package (inherit python-llfuse)
6533 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6534 "llfuse-" version ".tar.bz2"))
6537 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6538 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6539 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6540 (license (list license:expat license:lgpl2.0+))))
6542 (define-public python-msgpack
6544 (name "python-msgpack")
6548 (uri (pypi-uri "msgpack" version))
6551 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6552 (build-system python-build-system)
6554 `(#:modules ((guix build utils)
6555 (guix build python-build-system)
6560 (modify-phases %standard-phases
6563 (let ((cwd (getcwd)))
6564 (setenv "PYTHONPATH"
6565 (string-append cwd "/build/"
6566 (find (cut string-prefix? "lib" <>)
6567 (scandir (string-append cwd "/build")))
6569 (getenv "PYTHONPATH")))
6570 (invoke "pytest" "-v" "test")))))))
6572 `(("python-pytest" ,python-pytest)))
6573 (synopsis "MessagePack (de)serializer")
6574 (description "MessagePack is a fast, compact binary serialization format,
6575 suitable for similar data to JSON. This package provides CPython bindings for
6576 reading and writing MessagePack data.")
6577 (home-page "https://pypi.python.org/pypi/msgpack/")
6578 (license license:asl2.0)))
6580 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6581 ;; release 0.5. Some packages like borg still call it by the old name for now.
6582 ;; <https://bugs.gnu.org/30662>
6583 (define-public python-msgpack-transitional
6585 (inherit python-msgpack)
6586 (name "python-msgpack-transitional")
6588 (substitute-keyword-arguments (package-arguments python-msgpack)
6590 `(modify-phases ,phases
6591 (add-after 'unpack 'configure-transitional
6593 ;; Keep using the old name.
6594 (substitute* "setup.py"
6595 (("TRANSITIONAL = False")
6596 "TRANSITIONAL = 1"))
6599 (define-public python2-msgpack
6600 (package-with-python2 python-msgpack))
6602 (define-public python-netaddr
6604 (name "python-netaddr")
6609 (uri (pypi-uri "netaddr" version))
6612 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6613 (build-system python-build-system)
6614 (arguments `(#:tests? #f)) ;; No tests.
6615 (home-page "https://github.com/drkjam/netaddr/")
6616 (synopsis "Pythonic manipulation of network addresses")
6618 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6619 and MAC network addresses.")
6620 (license license:bsd-3)))
6622 (define-public python2-netaddr
6623 (package-with-python2 python-netaddr))
6625 (define-public python-wrapt
6627 (name "python-wrapt")
6632 (uri (pypi-uri "wrapt" version))
6635 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6636 (build-system python-build-system)
6638 ;; Tests are not included in the tarball, they are only available in the
6641 (home-page "https://github.com/GrahamDumpleton/wrapt")
6642 (synopsis "Module for decorators, wrappers and monkey patching")
6644 "The aim of the wrapt module is to provide a transparent object proxy for
6645 Python, which can be used as the basis for the construction of function
6646 wrappers and decorator functions.")
6647 (license license:bsd-2)))
6649 (define-public python2-wrapt
6650 (package-with-python2 python-wrapt))
6652 (define-public python-xlrd
6654 (name "python-xlrd")
6658 (uri (pypi-uri "xlrd" version))
6661 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6662 (build-system python-build-system)
6665 (modify-phases %standard-phases
6666 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6667 ;; run tests instead for now.
6668 (replace 'check (lambda _ (invoke "nosetests"))))))
6669 (native-inputs `(("python-nose" ,python-nose)))
6670 (home-page "http://www.python-excel.org/")
6671 (synopsis "Library for extracting data from Excel files")
6672 (description "This package provides a library to extract data from
6673 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6674 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6675 Unicode-aware. It is not intended as an end-user tool.")
6676 (license license:bsd-3)))
6678 (define-public python2-xlrd
6679 (package-with-python2 python-xlrd))
6681 (define-public python-prettytable
6683 (name "python-prettytable")
6688 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6691 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6692 (build-system python-build-system)
6693 (home-page "http://code.google.com/p/prettytable/")
6694 (synopsis "Display tabular data in an ASCII table format")
6696 "A library designed to represent tabular data in visually appealing ASCII
6697 tables. PrettyTable allows for selection of which columns are to be printed,
6698 independent alignment of columns (left or right justified or centred) and
6699 printing of sub-tables by specifying a row range.")
6700 (license license:bsd-3)))
6702 (define-public python2-prettytable
6703 (package-with-python2 python-prettytable))
6705 (define-public python-tables
6707 (name "python-tables")
6712 (uri (pypi-uri "tables" version))
6715 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6716 (modules '((guix build utils)))
6719 ;; Remove pre-compiled .pyc files from source.
6720 (for-each delete-file-recursively
6721 (find-files "." "__pycache__" #:directories? #t))
6722 (for-each delete-file (find-files "." "\\.pyc$"))
6724 (build-system python-build-system)
6726 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6727 ;; or "check", so we must override the build and check phases.
6729 (modify-phases %standard-phases
6730 (add-after 'unpack 'use-gcc
6732 (substitute* "setup.py"
6733 (("compiler = new_compiler\\(\\)" line)
6735 "\ncompiler.set_executables(compiler='gcc',"
6736 "compiler_so='gcc',"
6738 "linker_so='gcc -shared')")))
6741 (lambda* (#:key inputs #:allow-other-keys)
6742 (invoke "python" "setup.py" "build"
6743 (string-append "--hdf5="
6744 (assoc-ref inputs "hdf5")))))
6746 (lambda* (#:key inputs #:allow-other-keys)
6747 (invoke "python" "setup.py" "check"
6748 (string-append "--hdf5="
6749 (assoc-ref inputs "hdf5"))))))))
6751 `(("python-numexpr" ,python-numexpr)
6752 ("python-numpy" ,python-numpy)))
6754 `(("python-cython" ,python-cython)
6755 ("pkg-config" ,pkg-config)))
6760 (home-page "http://www.pytables.org/")
6761 (synopsis "Hierarchical datasets for Python")
6762 (description "PyTables is a package for managing hierarchical datasets and
6763 designed to efficiently cope with extremely large amounts of data.")
6764 (license license:bsd-3)))
6766 (define-public python2-tables
6767 (package-with-python2 python-tables))
6769 (define-public python-pyasn1
6771 (name "python-pyasn1")
6776 (uri (pypi-uri "pyasn1" version))
6779 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6780 (build-system python-build-system)
6781 (home-page "http://pyasn1.sourceforge.net/")
6782 (synopsis "ASN.1 types and codecs")
6784 "This is an implementation of ASN.1 types and codecs in Python. It is
6785 suitable for a wide range of protocols based on the ASN.1 specification.")
6786 (license license:bsd-2)))
6788 (define-public python2-pyasn1
6789 (package-with-python2 python-pyasn1))
6791 (define-public python-pyasn1-modules
6793 (name "python-pyasn1-modules")
6798 (uri (pypi-uri "pyasn1-modules" version))
6801 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6802 (build-system python-build-system)
6804 `(("python-pyasn1" ,python-pyasn1)))
6805 (home-page "https://sourceforge.net/projects/pyasn1/")
6806 (synopsis "ASN.1 codec implementations")
6808 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6809 implementations of ASN.1-based codecs and protocols.")
6810 (license license:bsd-3)))
6812 (define-public python2-pyasn1-modules
6813 (package-with-python2 python-pyasn1-modules))
6815 (define-public python-ipaddress
6817 (name "python-ipaddress")
6821 (uri (pypi-uri "ipaddress" version))
6824 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6825 (build-system python-build-system)
6826 (home-page "https://github.com/phihag/ipaddress")
6827 (synopsis "IP address manipulation library")
6829 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6830 in Python. This library is used to create, poke at, and manipulate IPv4 and
6831 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6832 module to older versions of Python.")
6833 (license license:psfl)))
6835 (define-public python2-ipaddress
6836 (package-with-python2 python-ipaddress))
6838 (define-public python2-ipaddr
6840 (name "python2-ipaddr")
6845 (uri (pypi-uri "ipaddr" version))
6847 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6848 (build-system python-build-system)
6850 `(#:python ,python-2 ;version 2 only
6852 (modify-phases %standard-phases
6854 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6855 (home-page "https://github.com/google/ipaddr-py")
6856 (synopsis "IP address manipulation library")
6858 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6859 IPv6 addresses and networks.
6861 For new implementations you may prefer to use the standard module
6862 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6863 versions of Python.")
6864 (license license:asl2.0)))
6866 (define-public python-idna
6868 (name "python-idna")
6873 (uri (pypi-uri "idna" version))
6876 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
6877 (build-system python-build-system)
6878 (home-page "https://github.com/kjd/idna")
6879 (synopsis "Internationalized domain names in applications")
6881 "This is a library to support the Internationalised Domain Names in
6882 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6883 protocol is often referred to as “IDNA2008” and can produce different results
6884 from the earlier standard from 2003. The library is also intended to act as a
6885 suitable drop-in replacement for the “encodings.idna” module that comes with
6886 the Python standard library but currently only supports the older 2003
6888 (license license:bsd-4)))
6890 (define-public python2-idna
6891 (package-with-python2 python-idna))
6893 (define-public python-idna-ssl
6895 (name "python-idna-ssl")
6900 (uri (pypi-uri "idna-ssl" version))
6903 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6904 (build-system python-build-system)
6906 `(#:tests? #f)) ;circular dependency with python-aiohttp
6907 (home-page "https://github.com/aio-libs/idna-ssl")
6908 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6909 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6911 (license license:expat)))
6913 (define-public python-pretend
6915 (name "python-pretend")
6920 (uri (pypi-uri "pretend" version))
6923 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6924 (build-system python-build-system)
6925 (home-page "https://github.com/alex/pretend")
6926 (synopsis "Library for stubbing in Python")
6928 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6929 technique for writing tests. You may hear the term mixed up with mocks,
6930 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6931 responses, rather than doing any computation.")
6932 (license license:bsd-3)))
6934 (define-public python2-pretend
6935 (package-with-python2 python-pretend))
6937 (define-public python-pip
6944 (uri (pypi-uri "pip" version))
6947 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6948 (build-system python-build-system)
6950 '(#:tests? #f)) ; there are no tests in the pypi archive.
6951 (home-page "https://pip.pypa.io/")
6952 (synopsis "Package manager for Python software")
6954 "Pip is a package manager for Python software, that finds packages on the
6955 Python Package Index (PyPI).")
6956 (license license:expat)))
6958 (define-public python2-pip
6959 (package-with-python2 python-pip))
6961 (define-public python-tlsh
6963 (name "python-tlsh")
6965 (home-page "https://github.com/trendmicro/tlsh")
6970 (url "https://github.com/trendmicro/tlsh.git")
6971 (commit (string-append "v" version))))
6972 (file-name (git-file-name name version))
6974 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
6975 (build-system cmake-build-system)
6977 '(#:out-of-source? #f
6978 #:phases (modify-phases %standard-phases
6981 (lambda* (#:key outputs #:allow-other-keys)
6982 ;; Build and install the Python bindings. The underlying
6983 ;; C++ library is apparently not meant to be installed.
6984 (let ((out (assoc-ref outputs "out")))
6985 (with-directory-excursion "py_ext"
6986 (and (system* "python" "setup.py" "build")
6987 (system* "python" "setup.py" "install"
6988 (string-append "--prefix=" out))))))))))
6989 (inputs `(("python" ,python-wrapper))) ;for the bindings
6990 (synopsis "Fuzzy matching library for Python")
6992 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6993 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6994 value which can be used for similarity comparisons. Similar objects have
6995 similar hash values, which allows for the detection of similar objects by
6996 comparing their hash values. The byte stream should have a sufficient amount
6997 of complexity; for example, a byte stream of identical bytes will not generate
6999 (license license:asl2.0)))
7001 (define-public python2-tlsh
7003 (inherit python-tlsh)
7004 (name "python2-tlsh")
7005 (inputs `(("python" ,python-2)))))
7007 (define-public python-termcolor
7009 (name "python-termcolor")
7014 (uri (pypi-uri "termcolor" version))
7017 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7018 (build-system python-build-system)
7020 ;; There are no tests.
7022 (home-page "https://pypi.python.org/pypi/termcolor")
7023 (synopsis "ANSII Color formatting for terminal output")
7025 "This package provides ANSII Color formatting for output in terminals.")
7026 (license license:expat)))
7028 (define-public python2-termcolor
7029 (package-with-python2 python-termcolor))
7031 (define-public python-libarchive-c
7033 (name "python-libarchive-c")
7037 (uri (pypi-uri "libarchive-c" version))
7040 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7041 (build-system python-build-system)
7043 '(#:phases (modify-phases %standard-phases
7045 'build 'reference-libarchive
7046 (lambda* (#:key inputs #:allow-other-keys)
7047 ;; Retain the absolute file name of libarchive.so.
7048 (let ((libarchive (assoc-ref inputs "libarchive")))
7049 (substitute* "libarchive/ffi.py"
7050 (("find_library\\('archive'\\)")
7051 (string-append "'" libarchive
7052 "/lib/libarchive.so'"))))))
7054 (lambda _ (invoke "pytest" "-vv"))))))
7056 `(("python-mock" ,python-mock)
7057 ("python-pytest" ,python-pytest)))
7059 `(("libarchive" ,libarchive)))
7060 (home-page "https://github.com/Changaco/python-libarchive-c")
7061 (synopsis "Python interface to libarchive")
7063 "This package provides Python bindings to libarchive, a C library to
7064 access possibly compressed archives in many different formats. It uses
7065 Python's @code{ctypes} foreign function interface (FFI).")
7066 (license license:lgpl2.0+)))
7068 (define-public python2-libarchive-c
7069 (package-with-python2 python-libarchive-c))
7071 (define-public python-file
7074 (name "python-file")
7075 (build-system python-build-system)
7077 '(#:tests? #f ;no tests
7078 #:configure-flags '("--single-version-externally-managed" "--root=/")
7079 #:phases (modify-phases %standard-phases
7080 (add-before 'build 'change-directory
7084 (add-before 'build 'set-library-file-name
7085 (lambda* (#:key inputs #:allow-other-keys)
7086 (let ((file (assoc-ref inputs "file")))
7087 (substitute* "magic.py"
7088 (("find_library\\('magic'\\)")
7089 (string-append "'" file "/lib/libmagic.so'")))
7091 (inputs `(("file" ,file)))
7092 (native-inputs (if (%current-target-system)
7093 `(("self" ,this-package))
7095 (synopsis "Python bindings to the libmagic file type guesser. Note that
7096 this module and the python-magic module both provide a \"magic.py\" file;
7097 these two modules, which are different and were developed separately, both
7098 serve the same purpose: provide Python bindings for libmagic.")))
7100 (define-public python2-file
7101 (package-with-python2 python-file))
7103 (define-public python-debian
7105 (name "python-debian")
7106 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7111 (uri (pypi-uri name version))
7114 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7115 (build-system python-build-system)
7117 `(("python-six" ,python-six)))
7118 (synopsis "Debian package related modules")
7120 ;; XXX: Use @enumerate instead of @itemize to work around
7121 ;; <http://bugs.gnu.org/21772>.
7122 "This package provides Python modules that abstract many formats of
7123 Debian-related files, such as:
7126 @item Debtags information;
7127 @item @file{debian/changelog} files;
7128 @item packages files, pdiffs;
7129 @item control files of single or multiple RFC822-style paragraphs---e.g.
7130 @file{debian/control}, @file{.changes}, @file{.dsc};
7131 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7132 contained files and meta-information.
7135 ;; Modules are either GPLv2+ or GPLv3+.
7136 (license license:gpl3+)))
7138 (define-public python2-debian
7139 (package-with-python2 python-debian))
7141 (define-public python-nbformat
7143 (name "python-nbformat")
7148 (uri (pypi-uri "nbformat" version))
7151 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7152 (build-system python-build-system)
7153 (arguments `(#:tests? #f)) ; no test target
7155 `(("python-ipython-genutils" ,python-ipython-genutils)
7156 ("python-jsonschema" ,python-jsonschema)
7157 ("python-jupyter-core" ,python-jupyter-core)
7158 ("python-traitlets" ,python-traitlets)))
7159 (home-page "http://jupyter.org")
7160 (synopsis "Jupyter Notebook format")
7161 (description "This package provides the reference implementation of the
7162 Jupyter Notebook format and Python APIs for working with notebooks.")
7163 (license license:bsd-3)))
7165 (define-public python2-nbformat
7166 (package-with-python2 python-nbformat))
7168 (define-public python-bleach
7170 (name "python-bleach")
7175 (uri (pypi-uri "bleach" version))
7178 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7179 (build-system python-build-system)
7181 `(("python-html5lib" ,python-html5lib-0.9)
7182 ("python-six" ,python-six)))
7184 `(("python-nose" ,python-nose)))
7185 (home-page "https://github.com/jsocol/bleach")
7186 (synopsis "Whitelist-based HTML-sanitizing tool")
7187 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7188 (license license:asl2.0)))
7190 (define-public python2-bleach
7191 (package-with-python2 python-bleach))
7193 (define-public python-entrypoints
7195 (name "python-entrypoints")
7200 (uri (pypi-uri "entrypoints" version))
7203 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7204 (build-system python-build-system)
7205 ;; The package does not come with a setup.py file, so we have to generate
7210 (modify-phases %standard-phases
7211 (add-after 'unpack 'create-setup.py
7213 (call-with-output-file "setup.py"
7216 from setuptools import setup
7217 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7219 (home-page "https://github.com/takluyver/entrypoints")
7220 (synopsis "Discover and load entry points from installed Python packages")
7221 (description "Entry points are a way for Python packages to advertise
7222 objects with some common interface. The most common examples are
7223 @code{console_scripts} entry points, which define shell commands by
7224 identifying a Python function to run. The @code{entrypoints} module contains
7225 functions to find and load entry points.")
7226 (license license:expat)))
7228 (define-public python2-entrypoints
7229 (package-with-python2 python-entrypoints))
7231 (define-public python-nbconvert
7233 (name "python-nbconvert")
7238 (uri (pypi-uri "nbconvert" version))
7241 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7242 (build-system python-build-system)
7244 `(;; The "bdist_egg" target is disabled by default, causing the installation
7246 #:configure-flags (list "bdist_egg")
7247 ;; FIXME: 5 failures, 40 errors.
7250 ;; (modify-phases %standard-phases
7253 ;; (zero? (system* "py.test" "-v")))))
7255 `(("python-pytest" ,python-pytest)))
7257 `(("python-bleach" ,python-bleach)
7258 ("python-entrypoints" ,python-entrypoints)
7259 ("python-jinja2" ,python-jinja2)
7260 ("python-jupyter-core" ,python-jupyter-core)
7261 ("python-mistune" ,python-mistune)
7262 ("python-nbformat" ,python-nbformat)
7263 ("python-pygments" ,python-pygments)
7264 ("python-traitlets" ,python-traitlets)))
7265 (home-page "http://jupyter.org")
7266 (synopsis "Converting Jupyter Notebooks")
7267 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7268 notebooks to various other formats via Jinja templates. It allows you to
7269 convert an @code{.ipynb} notebook file into various static formats including:
7277 @item ReStructured Text (rst)
7278 @item executable script
7280 (license license:bsd-3)))
7282 (define-public python2-nbconvert
7283 (package-with-python2 python-nbconvert))
7285 (define-public python-notebook
7287 (name "python-notebook")
7291 (uri (pypi-uri "notebook" version))
7294 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7295 (build-system python-build-system)
7298 (modify-phases %standard-phases
7301 ;; These tests require a browser
7302 (delete-file-recursively "notebook/tests/selenium")
7303 ;; Some tests need HOME
7304 (setenv "HOME" "/tmp")
7305 ;; This file contains "warningfilters", which are not supported
7306 ;; by this version of nose.
7307 (delete-file "setup.cfg")
7308 (with-directory-excursion "/tmp"
7309 (invoke "nosetests" "-v"))
7312 `(("python-jupyter-core" ,python-jupyter-core)
7313 ("python-nbformat" ,python-nbformat)
7314 ("python-nbconvert" ,python-nbconvert)
7315 ("python-prometheus-client" ,python-prometheus-client)
7316 ("python-send2trash" ,python-send2trash)
7317 ("python-terminado" ,python-terminado)))
7319 `(("python-nose" ,python-nose)
7320 ("python-sphinx" ,python-sphinx)
7321 ("python-requests" ,python-requests)))
7322 (home-page "http://jupyter.org/")
7323 (synopsis "Web-based notebook environment for interactive computing")
7325 "The Jupyter HTML notebook is a web-based notebook environment for
7326 interactive computing.")
7327 (properties `((python2-variant . ,(delay python2-notebook))))
7328 (license license:bsd-3)))
7330 (define-public python2-notebook
7331 (let ((base (package-with-python2
7332 (strip-python2-variant python-notebook))))
7333 (package (inherit base)
7335 `(("python2-mock" ,python2-mock)
7336 ,@(package-native-inputs base)))
7338 (substitute-keyword-arguments (package-arguments base)
7340 `(modify-phases ,phases
7341 (add-before 'check 'disable-test-case
7342 ;; The test requires network access to localhost. Curiously it
7343 ;; fails with Python 2 only. Simply make the test-case return
7347 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7348 (("formats = self.nbconvert_api") "return #")))))))))))
7350 (define-public python-widgetsnbextension
7352 (name "python-widgetsnbextension")
7357 (uri (pypi-uri "widgetsnbextension" version))
7360 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7361 (build-system python-build-system)
7363 `(("python-ipykernel" ,python-ipykernel)
7364 ("python-notebook" ,python-notebook)))
7366 `(("python-certifi" ,python-certifi)
7367 ("python-nose" ,python-nose)))
7368 (home-page "https://ipython.org")
7369 (synopsis "IPython HTML widgets for Jupyter")
7370 (description "This package provides interactive HTML widgets for Jupyter
7372 (license license:bsd-3)))
7374 (define-public python2-widgetsnbextension
7375 (package-with-python2 python-widgetsnbextension))
7377 (define-public python-ipywidgets
7379 (name "python-ipywidgets")
7384 (uri (pypi-uri "ipywidgets" version))
7387 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7388 (build-system python-build-system)
7390 `(("python-ipython" ,python-ipython)
7391 ("python-traitlets" ,python-traitlets)
7392 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7394 `(("python-nose" ,python-nose)
7395 ("python-pytest" ,python-pytest)))
7396 (home-page "https://ipython.org")
7397 (synopsis "IPython HTML widgets for Jupyter")
7398 (description "Ipywidgets are interactive HTML widgets for Jupyter
7399 notebooks and the IPython kernel. Notebooks come alive when interactive
7400 widgets are used. Users gain control of their data and can visualize changes
7402 (license license:bsd-3)))
7404 (define-public python2-ipywidgets
7405 (package-with-python2 python-ipywidgets))
7407 (define-public python-jupyter-console
7409 (name "python-jupyter-console")
7414 (uri (pypi-uri "jupyter_console" version))
7417 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7418 (build-system python-build-system)
7419 ;; Tests only run in an TTY.
7420 (arguments `(#:tests? #f))
7422 `(("python-ipykernel" ,python-ipykernel)
7423 ("python-jupyter-client" ,python-jupyter-client)
7424 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7425 ("python-pygments" ,python-pygments)))
7427 `(("python-nose" ,python-nose)))
7428 (home-page "https://jupyter.org")
7429 (synopsis "Jupyter terminal console")
7430 (description "This package provides a terminal-based console frontend for
7431 Jupyter kernels. It also allows for console-based interaction with non-Python
7432 Jupyter kernels such as IJulia and IRKernel.")
7433 (license license:bsd-3)))
7435 (define-public python2-jupyter-console
7436 (package-with-python2 python-jupyter-console))
7438 ;; The python-ipython and python-jupyter-console require each other. To get
7439 ;; the functionality in both packages working, strip down the
7440 ;; python-jupyter-console package when using it as an input to python-ipython.
7441 (define python-jupyter-console-minimal
7443 (inherit python-jupyter-console)
7444 (name "python-jupyter-console-minimal")
7446 (substitute-keyword-arguments
7447 (package-arguments python-jupyter-console)
7449 `(modify-phases ,phases
7450 (add-after 'install 'delete-bin
7451 (lambda* (#:key outputs #:allow-other-keys)
7452 ;; Delete the bin files, to avoid conflicts in profiles
7453 ;; where python-ipython and python-jupyter-console are
7455 (delete-file-recursively
7457 (assoc-ref outputs "out") "/bin"))))))))
7458 ;; Remove the python-ipython propagated input, to avoid the cycle
7462 (package-propagated-inputs python-jupyter-console)))))
7464 (define-public python-qtconsole
7466 (name "python-qtconsole")
7471 (uri (pypi-uri "qtconsole" version))
7474 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7475 (build-system python-build-system)
7477 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7478 ;; but we only have the LTS version 5.x. This means that there might be
7479 ;; runtime errors, but since this is a dependency of the Jupyter package,
7480 ;; and Jupyter can be used without the qtconsole we can overlook this for
7484 (modify-phases %standard-phases
7485 (add-before 'check 'pre-check
7487 (setenv "QT_QPA_PLATFORM" "offscreen")
7490 `(("python-ipykernel" ,python-ipykernel)
7491 ("python-ipython" ,python-ipython)))
7493 `(("python-pytest" ,python-pytest)))
7494 (home-page "http://jupyter.org")
7495 (synopsis "Jupyter Qt console")
7496 (description "This package provides a Qt-based console for Jupyter with
7497 support for rich media output.")
7498 (license license:bsd-3)))
7500 (define-public jupyter
7507 (uri (pypi-uri "jupyter" version))
7510 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7511 (build-system python-build-system)
7512 (arguments '(#:tests? #f)) ; there are none.
7514 `(("python-ipykernel" ,python-ipykernel)
7515 ("python-ipywidgets" ,python-ipywidgets)
7516 ("python-jupyter-console" ,python-jupyter-console)
7517 ("python-nbconvert" ,python-nbconvert)
7518 ("python-notebook" ,python-notebook)
7519 ("python-qtconsole" ,python-qtconsole)))
7520 (native-search-paths
7521 (list (search-path-specification
7522 (variable "JUPYTER_PATH")
7523 (files '("share/jupyter")))))
7524 (home-page "https://jupyter.org")
7525 (synopsis "Web application for interactive documents")
7527 "The Jupyter Notebook is a web application that allows you to create and
7528 share documents that contain live code, equations, visualizations and
7529 explanatory text. Uses include: data cleaning and transformation, numerical
7530 simulation, statistical modeling, machine learning and much more.")
7531 (license license:bsd-3)))
7533 (define-public python-chardet
7535 (name "python-chardet")
7540 (uri (pypi-uri "chardet" version))
7543 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7545 `(("python-hypothesis" ,python-hypothesis)
7546 ("python-pytest" ,python-pytest)
7547 ("python-pytest-runner" ,python-pytest-runner)))
7548 (build-system python-build-system)
7549 (home-page "https://github.com/chardet/chardet")
7550 (synopsis "Universal encoding detector for Python 2 and 3")
7552 "This package provides @code{chardet}, a Python module that can
7553 automatically detect a wide range of file encodings.")
7554 (license license:lgpl2.1+)))
7556 (define-public python2-chardet
7557 (package-with-python2 python-chardet))
7559 (define-public python-docopt
7561 (name "python-docopt")
7566 ;; The release on PyPI does not include tests.
7568 "https://github.com/docopt/docopt/archive/"
7570 (file-name (string-append name "-" version ".tar.gz"))
7573 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7574 (build-system python-build-system)
7576 `(("python-pytest" ,python-pytest)))
7579 (modify-phases %standard-phases
7581 (lambda _ (invoke "py.test"))))))
7582 (home-page "http://docopt.org")
7583 (synopsis "Command-line interface description language for Python")
7584 (description "This library allows the user to define a command-line
7585 interface from a program's help message rather than specifying it
7586 programmatically with command-line parsers like @code{getopt} and
7588 (license license:expat)))
7590 (define-public python2-docopt
7591 (package-with-python2 python-docopt))
7593 (define-public python-pythondialog
7595 (name "python-pythondialog")
7600 (uri (pypi-uri "pythondialog" version))
7603 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7604 (build-system python-build-system)
7607 (modify-phases %standard-phases
7608 (add-after 'unpack 'patch-path
7609 (lambda* (#:key inputs #:allow-other-keys)
7610 (let* ((dialog (assoc-ref inputs "dialog")))
7611 ;; Since this library really wants to grovel the search path, we
7612 ;; must hardcode dialog's store path into it.
7613 (substitute* "dialog.py"
7614 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7615 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7617 #:tests? #f)) ; no test suite
7619 `(("dialog" ,dialog)))
7620 (home-page "http://pythondialog.sourceforge.net/")
7621 (synopsis "Python interface to the UNIX dialog utility")
7622 (description "A Python wrapper for the dialog utility. Its purpose is to
7623 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7624 This allows one to make simple text-mode user interfaces on Unix-like systems")
7625 (license license:lgpl2.1)
7626 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7628 (define-public python2-pythondialog
7629 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7632 (version (package-version python-pythondialog))
7635 (uri (pypi-uri "python2-pythondialog" version))
7638 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7640 (define-public python-configobj
7642 (name "python-configobj")
7646 (uri (pypi-uri "configobj" version))
7649 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7650 ;; Patch setup.py so it looks for python-setuptools, which is
7651 ;; required to parse the keyword 'install_requires' in setup.py.
7652 (patches (search-patches "python-configobj-setuptools.patch"))))
7653 (build-system python-build-system)
7655 `(("python-six" ,python-six)))
7656 (synopsis "Config file reading, writing and validation")
7657 (description "ConfigObj is a simple but powerful config file reader and
7658 writer: an ini file round tripper. Its main feature is that it is very easy to
7659 use, with a straightforward programmer’s interface and a simple syntax for
7661 (home-page "https://github.com/DiffSK/configobj")
7662 (license license:bsd-3)))
7664 (define-public python2-configobj
7665 (package-with-python2 python-configobj))
7667 (define-public python-configargparse
7669 (name "python-configargparse")
7673 (uri (pypi-uri "ConfigArgParse" version))
7676 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
7677 (build-system python-build-system)
7679 `(("python-pyyaml" ,python-pyyaml)))
7682 (modify-phases %standard-phases
7685 ;; Bypass setuptools-shim because one test relies on "setup.py"
7686 ;; being the first argument passed to the python call.
7688 ;; NOTE: Many tests do not run because they rely on Python's
7689 ;; built-in test.test_argparse, but we remove the unit tests from
7690 ;; our Python installation.
7691 (invoke "python" "setup.py" "test"))))))
7692 (synopsis "Replacement for argparse")
7693 (description "A drop-in replacement for argparse that allows options to also
7694 be set via config files and/or environment variables.")
7695 (home-page "https://github.com/bw2/ConfigArgParse")
7696 (license license:expat)))
7698 (define-public python2-configargparse
7699 (package-with-python2 python-configargparse))
7701 (define-public python-argparse-manpage
7703 (name "python-argparse-manpage")
7708 (uri (pypi-uri "argparse-manpage" version))
7711 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7712 (build-system python-build-system)
7713 (home-page "https://github.com/praiskup/argparse-manpage")
7714 (synopsis "Build manual page from Python's ArgumentParser object")
7716 "This package provides tools to build manual pages from Python's
7717 @code{ArgumentParser} object.")
7718 (license license:asl2.0)))
7720 (define-public python2-contextlib2
7722 (name "python2-contextlib2")
7727 (uri (pypi-uri "contextlib2" version))
7730 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7731 (build-system python-build-system)
7733 `(#:python ,python-2
7735 (modify-phases %standard-phases
7737 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7739 `(("python2-unittest2" ,python2-unittest2)))
7740 (home-page "http://contextlib2.readthedocs.org/")
7741 (synopsis "Tools for decorators and context managers")
7742 (description "This module is primarily a backport of the Python
7743 3.2 contextlib to earlier Python versions. Like contextlib, it
7744 provides utilities for common tasks involving decorators and context
7745 managers. It also contains additional features that are not part of
7746 the standard library.")
7747 (license license:psfl)))
7749 (define-public python-texttable
7751 (name "python-texttable")
7756 (uri (pypi-uri "texttable" version))
7759 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7760 (build-system python-build-system)
7761 (arguments '(#:tests? #f)) ; no tests
7762 (home-page "https://github.com/foutaise/texttable/")
7763 (synopsis "Python module for creating simple ASCII tables")
7764 (description "Texttable is a Python module for creating simple ASCII
7766 (license license:lgpl2.1+)))
7768 (define-public python2-texttable
7769 (package-with-python2 python-texttable))
7771 (define-public python-atomicwrites
7773 (name "python-atomicwrites")
7777 (uri (pypi-uri "atomicwrites" version))
7780 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7781 (build-system python-build-system)
7782 (synopsis "Atomic file writes in Python")
7783 (description "Library for atomic file writes using platform dependent tools
7784 for atomic file system operations.")
7785 (home-page "https://github.com/untitaker/python-atomicwrites")
7786 (license license:expat)))
7788 (define-public python2-atomicwrites
7789 (package-with-python2 python-atomicwrites))
7791 (define-public python-click-threading
7793 (name "python-click-threading")
7797 (uri (pypi-uri "click-threading" version))
7800 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7801 (build-system python-build-system)
7803 `(("python-click" ,python-click)))
7804 (synopsis "Utilities for multithreading in Click")
7805 (description "This package provides utilities for multithreading in Click
7807 (home-page "https://github.com/click-contrib/click-threading")
7808 (license license:expat)))
7810 (define-public python-click-log
7812 (name "python-click-log")
7816 (uri (pypi-uri "click-log" version))
7819 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7820 (build-system python-build-system)
7822 `(("python-click" ,python-click)))
7823 (synopsis "Logging for click applications")
7824 (description "This package provides a Python library for logging Click
7826 (home-page "https://github.com/click-contrib/click-log")
7827 (license license:expat)))
7829 (define-public python-apipkg
7831 (name "python-apipkg")
7835 (uri (pypi-uri "apipkg" version))
7838 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7839 (build-system python-build-system)
7841 `(("python-pytest" ,python-pytest)))
7842 (synopsis "Namespace control and lazy-import mechanism")
7843 (description "With apipkg you can control the exported namespace of a Python
7844 package and greatly reduce the number of imports for your users. It is a small
7845 pure Python module that works on virtually all Python versions.")
7846 (home-page "https://github.com/pytest-dev/apipkg")
7847 (license license:expat)))
7849 (define-public python2-apipkg
7850 (package-with-python2 python-apipkg))
7852 (define-public python-execnet
7854 (name "python-execnet")
7858 (uri (pypi-uri "execnet" version))
7861 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7862 (build-system python-build-system)
7864 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7865 ;; The two test failures are caused by the lack of an `ssh` executable.
7866 ;; The test suite can be run with pytest after the 'install' phase.
7869 `(("python-pytest" ,python-pytest)
7870 ("python-setuptools-scm" ,python-setuptools-scm)))
7872 `(("python-apipkg" ,python-apipkg)))
7873 (synopsis "Rapid multi-Python deployment")
7874 (description "Execnet provides a share-nothing model with
7875 channel-send/receive communication for distributing execution across many
7876 Python interpreters across version, platform and network barriers. It has a
7877 minimal and fast API targeting the following uses:
7879 @item distribute tasks to (many) local or remote CPUs
7880 @item write and deploy hybrid multi-process applications
7881 @item write scripts to administer multiple environments
7883 (home-page "http://codespeak.net/execnet/")
7884 (license license:expat)))
7886 (define-public python2-execnet
7887 (package-with-python2 python-execnet))
7889 (define-public python-icalendar
7891 (name "python-icalendar")
7895 (uri (pypi-uri "icalendar" version))
7898 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7899 (build-system python-build-system)
7901 `(("python-dateutil" ,python-dateutil)
7902 ("python-pytz" ,python-pytz)))
7903 (synopsis "Python library for parsing iCalendar files")
7904 (description "The icalendar package is a parser/generator of iCalendar
7905 files for use with Python.")
7906 (home-page "https://github.com/collective/icalendar")
7907 (license license:bsd-2)))
7909 (define-public python-args
7911 (name "python-args")
7915 (uri (pypi-uri "args" version))
7918 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7919 (build-system python-build-system)
7920 (home-page "https://github.com/kennethreitz/args")
7921 (synopsis "Command-line argument parser")
7923 "This library provides a Python module to parse command-line arguments.")
7924 (license license:bsd-3)))
7926 (define-public python2-args
7927 (package-with-python2 python-args))
7929 (define-public python-clint
7931 (name "python-clint")
7935 (uri (pypi-uri "clint" version))
7938 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7939 (build-system python-build-system)
7942 (modify-phases %standard-phases
7944 (lambda _ (invoke "py.test" "-v"))))))
7946 `(("python-pytest" ,python-pytest)))
7948 `(("python-args" ,python-args)))
7949 (home-page "https://github.com/kennethreitz/clint")
7950 (synopsis "Command-line interface tools")
7952 "Clint is a Python module filled with a set of tools for developing
7953 command-line applications, including tools for colored and indented
7954 output, progress bar display, and pipes.")
7955 (license license:isc)))
7957 (define-public python2-clint
7958 (package-with-python2 python-clint))
7960 (define-public python-rply
7962 (name "python-rply")
7966 (uri (pypi-uri "rply" version))
7969 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7970 (build-system python-build-system)
7972 `(("python-appdirs" ,python-appdirs)))
7973 (home-page "https://github.com/alex/rply")
7974 (synopsis "Parser generator for Python")
7976 "This package provides a pure Python based parser generator, that also
7977 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7978 with a new public API, and RPython support.")
7979 (license license:bsd-3)))
7981 (define-public python2-rply
7982 (package-with-python2 python-rply))
7984 (define-public python-hy
7990 (uri (pypi-uri "hy" version))
7993 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7994 (build-system python-build-system)
7997 (modify-phases %standard-phases
8000 ;; Tests require write access to HOME.
8001 (setenv "HOME" "/tmp")
8002 (invoke "nosetests"))))))
8004 `(("python-coverage" ,python-coverage)
8005 ("python-nose" ,python-nose)))
8007 `(("python-astor" ,python-astor)
8008 ("python-clint" ,python-clint)
8009 ("python-rply" ,python-rply)))
8010 (home-page "http://hylang.org/")
8011 (synopsis "Lisp frontend to Python")
8013 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8014 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8015 Python at your fingertips, in Lisp form.")
8016 (license license:expat)))
8018 (define-public python2-hy
8019 (package-with-python2 python-hy))
8021 (define-public python2-functools32
8023 (name "python2-functools32")
8028 (uri (pypi-uri "functools32" version))
8031 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8032 (build-system python-build-system)
8034 `(#:python ,python-2
8035 #:tests? #f)) ; no test target
8036 (home-page "https://github.com/MiCHiLU/python-functools32")
8038 "Backport of the functools module from Python 3.2.3")
8040 "This package is a backport of the @code{functools} module from Python
8041 3.2.3 for use with older versions of Python and PyPy.")
8042 (license license:expat)))
8044 (define-public python2-subprocess32
8046 (name "python2-subprocess32")
8050 (uri (pypi-uri "subprocess32" version))
8053 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8055 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8056 (build-system python-build-system)
8058 `(#:python ,python-2
8059 ;; The test suite fails with Python > 2.7.13:
8060 ;; import test.support
8061 ;; ImportError: No module named support
8064 (modify-phases %standard-phases
8065 (add-after 'unpack 'patch-/bin/sh
8067 (substitute* '("subprocess32.py"
8068 "test_subprocess32.py")
8069 (("/bin/sh") (which "sh")))
8071 (home-page "https://github.com/google/python-subprocess32")
8072 (synopsis "Backport of the subprocess module from Python 3.2")
8074 "This is a backport of the @code{subprocess} standard library module
8075 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8076 new features. On POSIX systems it is guaranteed to be reliable when used
8077 in threaded applications. It includes timeout support from Python 3.3 but
8078 otherwise matches 3.2’s API.")
8079 (license license:psfl)))
8081 (define-public python2-futures
8083 (name "python2-futures")
8088 (uri (pypi-uri "futures" version))
8091 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8092 (build-system python-build-system)
8093 (arguments `(#:python ,python-2
8094 ;; FIXME: Python 2.7.14 moved the test.support library,
8095 ;; but our package has not yet been adjusted. Enable
8096 ;; tests when the python2 package has been fixed.
8098 (home-page "https://github.com/agronholm/pythonfutures")
8100 "Backport of the concurrent.futures package from Python 3.2")
8102 "The concurrent.futures module provides a high-level interface for
8103 asynchronously executing callables. This package backports the
8104 concurrent.futures package from Python 3.2")
8105 (license license:bsd-3)))
8107 (define-public python-promise
8109 (name "python-promise")
8114 (uri (pypi-uri "promise" version))
8117 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8118 (build-system python-build-system)
8119 ;; Tests wants python-futures, which is a python2 only program, and
8120 ;; can't be found by python-promise at test time.
8121 (arguments `(#:tests? #f))
8122 (home-page "https://github.com/syrusakbary/promise")
8123 (synopsis "Promises/A+ implementation for Python")
8125 "Promises/A+ implementation for Python")
8126 (properties `((python2-variant . ,(delay python2-promise))))
8127 (license license:expat)))
8129 (define-public python2-promise
8130 (let ((promise (package-with-python2
8131 (strip-python2-variant python-promise))))
8132 (package (inherit promise)
8133 (arguments (substitute-keyword-arguments (package-arguments promise)
8136 `(("python2-futures" ,python2-futures)
8137 ("python2-pytest" ,python2-pytest)
8138 ,@(package-native-inputs promise))))))
8140 (define-public python-colorama
8142 (name "python-colorama")
8147 (uri (pypi-uri "colorama" version))
8150 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8151 (build-system python-build-system)
8152 (synopsis "Colored terminal text rendering for Python")
8153 (description "Colorama is a Python library for rendering colored terminal
8155 (home-page "https://pypi.python.org/pypi/colorama")
8156 (license license:bsd-3)))
8158 (define-public python2-colorama
8159 (package-with-python2 python-colorama))
8161 (define-public python-rsa
8168 (uri (pypi-uri "rsa" version))
8171 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8172 (build-system python-build-system)
8174 `(("python-pyasn1" ,python-pyasn1)))
8175 (synopsis "Pure-Python RSA implementation")
8176 (description "Python-RSA is a pure-Python RSA implementation. It supports
8177 encryption and decryption, signing and verifying signatures, and key
8178 generation according to PKCS#1 version 1.5. It can be used as a Python
8179 library as well as on the command line.")
8180 (home-page "https://stuvel.eu/rsa")
8181 (license license:asl2.0)))
8183 (define-public python2-rsa
8184 (package-with-python2 python-rsa))
8186 (define-public python-pluggy
8188 (name "python-pluggy")
8193 (uri (pypi-uri "pluggy" version))
8196 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8197 (build-system python-build-system)
8199 `(("python-setuptools-scm" ,python-setuptools-scm)))
8200 (synopsis "Plugin and hook calling mechanism for Python")
8201 (description "Pluggy is an extraction of the plugin manager as used by
8202 Pytest but stripped of Pytest specific details.")
8203 (home-page "https://pypi.python.org/pypi/pluggy")
8204 (license license:expat)))
8206 (define-public python2-pluggy
8207 (package-with-python2 python-pluggy))
8209 (define-public python-tox
8216 (uri (pypi-uri "tox" version))
8219 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8220 (build-system python-build-system)
8222 ;; FIXME: Tests require pytest-timeout, which itself requires
8223 ;; pytest>=2.8.0 for installation.
8226 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8227 ("python-py" ,python-py)
8228 ("python-virtualenv" ,python-virtualenv)))
8230 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8231 ("python-pytest" ,python-pytest) ; >= 2.3.5
8232 ("python-setuptools-scm" ,python-setuptools-scm)))
8233 (home-page "http://tox.testrun.org/")
8234 (synopsis "Virtualenv-based automation of test activities")
8235 (description "Tox is a generic virtualenv management and test command line
8236 tool. It can be used to check that a package installs correctly with
8237 different Python versions and interpreters, or run tests in each type of
8238 supported environment, or act as a frontend to continuous integration
8240 (license license:expat)))
8242 (define-public python2-tox
8243 (package-with-python2 python-tox))
8245 (define-public python-jmespath
8247 (name "python-jmespath")
8252 (uri (pypi-uri "jmespath" version))
8255 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8256 (build-system python-build-system)
8258 `(("python-nose" ,python-nose)))
8259 (synopsis "JSON Matching Expressions")
8260 (description "JMESPath (pronounced “james path”) is a Python library that
8261 allows one to declaratively specify how to extract elements from a JSON
8263 (home-page "https://github.com/jmespath/jmespath.py")
8264 (license license:expat)))
8266 (define-public python2-jmespath
8267 (package-with-python2 python-jmespath))
8269 (define-public python-botocore
8271 (name "python-botocore")
8276 (uri (pypi-uri "botocore" version))
8279 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8280 (build-system python-build-system)
8282 ;; FIXME: Many tests are failing.
8285 `(("python-dateutil" ,python-dateutil)
8286 ("python-docutils" ,python-docutils)
8287 ("python-jmespath" ,python-jmespath)))
8289 `(("python-mock" ,python-mock)
8290 ("python-nose" ,python-nose)
8292 ("python-tox" ,python-tox)
8293 ("python-wheel" ,python-wheel)))
8294 (home-page "https://github.com/boto/botocore")
8295 (synopsis "Low-level interface to AWS")
8296 (description "Botocore is a Python library that provides a low-level
8297 interface to the Amazon Web Services (AWS) API.")
8298 (license license:asl2.0)))
8300 (define-public python2-botocore
8301 (package-with-python2 python-botocore))
8303 (define-public python-xdo
8310 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8311 "python-xdo_" version ".orig.tar.gz"))
8314 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8315 (build-system python-build-system)
8318 (modify-phases %standard-phases
8319 (add-before 'install 'patch-libxdo-path
8320 ;; Hardcode the path of dynamically loaded libxdo library.
8321 (lambda* (#:key inputs #:allow-other-keys)
8322 (let ((libxdo (string-append
8323 (assoc-ref inputs "xdotool")
8325 (substitute* "xdo/_xdo.py"
8326 (("find_library\\(\"xdo\"\\)")
8327 (simple-format #f "\"~a\"" libxdo)))
8329 #:tests? #f)) ; no tests provided
8331 `(("python-six" ,python-six)))
8333 `(("xdotool" ,xdotool)
8334 ("libX11" ,libx11)))
8335 (home-page "https://tracker.debian.org/pkg/python-xdo")
8336 (synopsis "Python library for simulating X11 keyboard/mouse input")
8337 (description "Provides bindings to libxdo for manipulating X11 via simulated
8338 input. (Note that this is mostly a legacy library; you may wish to look at
8339 python-xdo for newer bindings.)")
8340 (license license:bsd-3)))
8342 (define-public python2-xdo
8343 (package-with-python2 python-xdo))
8345 (define-public python-mako
8347 (name "python-mako")
8352 (uri (pypi-uri "Mako" version))
8355 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8356 (build-system python-build-system)
8358 `(("python-markupsafe" ,python-markupsafe)))
8360 `(("python-mock" ,python-mock)
8361 ("python-nose" ,python-nose)
8362 ("python-pytest" ,python-pytest)))
8363 (home-page "https://www.makotemplates.org/")
8364 (synopsis "Templating language for Python")
8365 (description "Mako is a templating language for Python that compiles
8366 templates into Python modules.")
8367 (license license:expat)))
8369 (define-public python2-mako
8370 (package-with-python2 python-mako))
8372 (define-public python-waitress
8374 (name "python-waitress")
8379 (uri (pypi-uri "waitress" version))
8380 (patches (search-patches "python-waitress-fix-tests.patch"))
8383 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8384 (build-system python-build-system)
8385 (home-page "https://github.com/Pylons/waitress")
8386 (synopsis "Waitress WSGI server")
8387 (description "Waitress is meant to be a production-quality pure-Python WSGI
8388 server with very acceptable performance.")
8389 (license license:zpl2.1)))
8391 (define-public python2-waitress
8392 (package-with-python2 python-waitress))
8394 (define-public python-pyquery
8396 (name "python-pyquery")
8401 (uri (pypi-uri "pyquery" version))
8404 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8405 (build-system python-build-system)
8407 `(("python-webob" ,python-webob)
8408 ("python-webtest" ,python-webtest)))
8410 `(("python-lxml" ,python-lxml)
8411 ("python-cssselect" ,python-cssselect)))
8412 (home-page "https://github.com/gawel/pyquery")
8413 (synopsis "Make jQuery-like queries on xml documents")
8414 (description "pyquery allows you to make jQuery queries on xml documents.
8415 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8416 fast xml and html manipulation.")
8417 (license license:bsd-3)))
8419 (define-public python-anyjson
8421 (name "python-anyjson")
8426 (uri (pypi-uri "anyjson" version))
8429 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8430 (build-system python-build-system)
8432 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8433 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8434 ;; whatever) so this transformation needs to be done before the tests
8435 ;; can be run. Maybe we could add a build step to transform beforehand
8436 ;; but it could be annoying/difficult.
8437 ;; We can enable tests for the Python 2 version, though, and do below.
8439 (home-page "https://bitbucket.org/runeh/anyjson/")
8441 "Wraps best available JSON implementation in a common interface")
8443 "Anyjson loads whichever is the fastest JSON module installed
8444 and provides a uniform API regardless of which JSON implementation is used.")
8445 (license license:bsd-3)
8446 (properties `((python2-variant . ,(delay python2-anyjson))))))
8448 (define-public python2-anyjson
8449 (let ((anyjson (package-with-python2
8450 (strip-python2-variant python-anyjson))))
8453 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8455 ,@(package-arguments anyjson)))
8456 (native-inputs `(("python2-nose" ,python2-nose))))))
8458 (define-public python-amqp
8460 (name "python-amqp")
8465 (uri (pypi-uri "amqp" version))
8468 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8469 (build-system python-build-system)
8471 `(("python-case" ,python-case)
8472 ("python-pytest-sugar" ,python-pytest-sugar)
8473 ("python-mock" ,python-mock)))
8475 `(("python-vine" ,python-vine)))
8476 (home-page "https://github.com/celery/py-amqp")
8478 "Low-level AMQP client for Python (fork of amqplib)")
8480 "This is a fork of amqplib which was originally written by Barry Pederson.
8481 It is maintained by the Celery project, and used by kombu as a pure python
8482 alternative when librabbitmq is not available.")
8483 (license license:lgpl2.1+)
8484 (properties `((python2-variant . ,(delay python2-amqp))))))
8486 (define-public python2-amqp
8487 (let ((amqp (package-with-python2
8488 (strip-python2-variant python-amqp))))
8491 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8492 ;; unmaintained. Weirdly, does not do this on the python 3
8495 ,@(package-arguments amqp))))))
8497 (define-public python-txamqp
8499 (name "python-txamqp")
8504 (uri (pypi-uri "txAMQP" version))
8507 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8508 (build-system python-build-system)
8510 `(("python-six" ,python-six)
8511 ("python-twisted" ,python-twisted)))
8512 (home-page "https://github.com/txamqp/txamqp")
8513 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8515 "This package provides a Python library for communicating with AMQP peers
8516 and brokers using the asynchronous networking framework Twisted. It contains
8517 all the necessary code to connect, send and receive messages to/from an
8518 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8519 also includes support for using Thrift RPC over AMQP in Twisted
8521 (license license:asl2.0)))
8523 (define-public python2-txamqp
8524 (package-with-python2 python-txamqp))
8526 (define-public python-kombu
8528 (name "python-kombu")
8533 (uri (pypi-uri "kombu" version))
8536 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8537 (build-system python-build-system)
8539 `(("python-mock" ,python-mock)
8540 ("python-case" ,python-case)
8541 ("python-pyro4" ,python-pyro4)
8542 ("python-pytest-sugar" ,python-pytest-sugar)
8543 ("python-pytz" ,python-pytz)))
8545 `(("python-anyjson" ,python-anyjson)
8546 ("python-amqp" ,python-amqp)
8547 ("python-redis" ,python-redis)))
8548 (home-page "https://kombu.readthedocs.io")
8549 (synopsis "Message passing library for Python")
8550 (description "The aim of Kombu is to make messaging in Python as easy as
8551 possible by providing an idiomatic high-level interface for the AMQ protocol,
8552 and also provide proven and tested solutions to common messaging problems.
8553 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8554 message orientation, queuing, routing, reliability and security, for which the
8555 RabbitMQ messaging server is the most popular implementation.")
8556 (license license:bsd-3)
8557 (properties `((python2-variant . ,(delay python2-kombu))))))
8559 (define-public python2-kombu
8560 (let ((kombu (package-with-python2
8561 (strip-python2-variant python-kombu))))
8564 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8565 ;; It works fine on the python3 variant.
8567 ,@(package-arguments kombu)))
8568 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8569 ,@(package-native-inputs kombu))))))
8571 (define-public python-billiard
8573 (name "python-billiard")
8578 (uri (pypi-uri "billiard" version))
8581 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8582 (build-system python-build-system)
8584 `(("python-case" ,python-case)
8585 ("python-pytest" ,python-pytest)))
8586 (home-page "https://github.com/celery/billiard")
8588 "Python multiprocessing fork with improvements and bugfixes")
8590 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8591 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8592 pyprocessing package. This standalone variant is intended to be compatible with
8593 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8594 (license license:bsd-3)
8595 (properties `((python2-variant . ,(delay python2-billiard))))))
8597 (define-public python2-billiard
8598 (let ((billiard (package-with-python2
8599 (strip-python2-variant python-billiard))))
8602 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8603 ("python2-mock" ,python2-mock)
8604 ,@(package-native-inputs billiard))))))
8606 (define-public python-celery
8608 (name "python-celery")
8613 (uri (pypi-uri "celery" version))
8616 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8617 (build-system python-build-system)
8619 '(;; TODO The tests fail with Python 3.7
8620 ;; https://github.com/celery/celery/issues/4849
8623 (modify-phases %standard-phases
8624 (add-after 'unpack 'patch-requirements
8626 (substitute* "requirements/test.txt"
8627 (("pytest>=3\\.0,<3\\.3")
8631 `(("python-case" ,python-case)
8632 ("python-pytest" ,python-pytest)))
8634 `(("python-pytz" ,python-pytz)
8635 ("python-billiard" ,python-billiard)
8636 ("python-kombu" ,python-kombu)))
8637 (home-page "https://celeryproject.org")
8638 (synopsis "Distributed Task Queue")
8639 (description "Celery is an asynchronous task queue/job queue based on
8640 distributed message passing. It is focused on real-time operation, but
8641 supports scheduling as well. The execution units, called tasks, are executed
8642 concurrently on a single or more worker servers using multiprocessing,
8643 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8644 synchronously (wait until ready).")
8645 (license license:bsd-3)
8646 (properties `((python2-variant . ,(delay python2-celery))))))
8648 (define-public python2-celery
8649 (let ((celery (package-with-python2
8650 (strip-python2-variant python-celery))))
8653 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8654 ("python2-mock" ,python2-mock)
8655 ,@(package-native-inputs celery))))))
8657 (define-public python-translitcodec
8659 (name "python-translitcodec")
8664 (uri (pypi-uri "translitcodec" version))
8667 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8668 (build-system python-build-system)
8670 `(#:tests? #f)) ; no tests provided
8672 "https://github.com/claudep/translitcodec")
8674 "Unicode to 8-bit charset transliteration codec")
8676 "This package contains codecs for transliterating ISO 10646 texts into
8677 best-effort representations using smaller coded character sets (ASCII,
8679 (license license:expat)))
8681 (define-public python2-translitcodec
8682 (package-with-python2 python-translitcodec))
8684 (define-public python-editor
8686 (name "python-editor")
8691 (uri (pypi-uri "python-editor" version))
8694 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8695 (build-system python-build-system)
8697 "https://github.com/fmoo/python-editor")
8699 "Programmatically open an editor, capture the result")
8701 "python-editor is a library that provides the editor module for
8702 programmatically interfacing with your system's $EDITOR.")
8703 (license license:asl2.0)))
8705 (define-public python2-editor
8706 (package-with-python2 python-editor))
8708 (define-public python-vobject
8710 (name "python-vobject")
8714 (uri (pypi-uri "vobject" version))
8717 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8718 (build-system python-build-system)
8720 '(;; The test suite relies on some non-portable Windows interfaces.
8723 `(("python-dateutil" ,python-dateutil)
8724 ("python-pyicu" ,python-pyicu)))
8725 (synopsis "Parse and generate vCard and vCalendar files")
8726 (description "Vobject is intended to be a full featured Python package for
8727 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8728 are supported and well tested. vCard 3.0 files are supported, and all data
8729 should be imported, but only a few components are understood in a sophisticated
8731 (home-page "http://eventable.github.io/vobject/")
8732 (license license:asl2.0)))
8734 (define-public python2-vobject
8735 (package-with-python2 python-vobject))
8737 (define-public python-munkres
8739 (name "python-munkres")
8743 (uri (pypi-uri "munkres" version))
8746 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8747 (build-system python-build-system)
8749 '(#:tests? #f)) ; no test suite
8750 (home-page "http://software.clapper.org/munkres/")
8751 (synopsis "Implementation of the Munkres algorithm")
8752 (description "The Munkres module provides an implementation of the Munkres
8753 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8754 useful for solving the Assignment Problem.")
8755 (license license:bsd-3)))
8757 (define-public python2-munkres
8758 (package-with-python2 python-munkres))
8760 (define-public python-whoosh
8762 (name "python-whoosh")
8767 (uri (pypi-uri "Whoosh" version))
8770 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8771 (build-system python-build-system)
8773 `(("python-pytest" ,python-pytest)))
8774 (home-page "https://bitbucket.org/mchaput/whoosh")
8775 (synopsis "Full text indexing, search, and spell checking library")
8777 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8779 (license license:bsd-2)))
8781 (define-public python2-whoosh
8782 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8783 (package (inherit whoosh)
8785 `(("python2-backport-ssl-match-hostname"
8786 ,python2-backport-ssl-match-hostname)
8787 ,@(package-propagated-inputs whoosh))))))
8789 (define-public python-pathlib
8791 (name "python-pathlib")
8795 (uri (pypi-uri "pathlib" version))
8798 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8799 (build-system python-build-system)
8800 ;; The tests depend on the internal "test" module, which does not provide
8801 ;; a stable interface.
8802 (arguments `(#:tests? #f))
8803 (home-page "https://pathlib.readthedocs.org/")
8804 (synopsis "Object-oriented file system paths")
8805 (description "Pathlib offers a set of classes to handle file system paths.
8806 It offers the following advantages over using string objects:
8809 @item No more cumbersome use of os and os.path functions. Everything can
8810 be done easily through operators, attribute accesses, and method calls.
8811 @item Embodies the semantics of different path types. For example,
8812 comparing Windows paths ignores casing.
8813 @item Well-defined semantics, eliminating any inconsistencies or
8814 ambiguities (forward vs. backward slashes, etc.).
8817 Note: In Python 3.4, pathlib is now part of the standard library. For other
8818 Python versions please consider python-pathlib2 instead, which tracks the
8819 standard library module. This module (python-pathlib) isn't maintained
8821 (license license:expat)))
8823 (define-public python2-pathlib
8824 (package-with-python2 python-pathlib))
8826 (define-public python2-pathlib2
8828 (name "python2-pathlib2")
8832 (uri (pypi-uri "pathlib2" version))
8835 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8836 (build-system python-build-system)
8837 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8838 ;; version is 3.4 which already includes this package as part of the
8839 ;; standard library.
8841 `(#:python ,python-2))
8843 `(("python2-scandir" ,python2-scandir)
8844 ("python2-six" ,python2-six)))
8845 (home-page "https://pypi.python.org/pypi/pathlib2/")
8846 (synopsis "Object-oriented file system paths - backport of standard
8848 (description "The goal of pathlib2 is to provide a backport of standard
8849 pathlib module which tracks the standard library module, so all the newest
8850 features of the standard pathlib can be used also on older Python versions.
8852 Pathlib offers a set of classes to handle file system paths. It offers the
8853 following advantages over using string objects:
8856 @item No more cumbersome use of os and os.path functions. Everything can
8857 be done easily through operators, attribute accesses, and method calls.
8858 @item Embodies the semantics of different path types. For example,
8859 comparing Windows paths ignores casing.
8860 @item Well-defined semantics, eliminating any inconsistencies or
8861 ambiguities (forward vs. backward slashes, etc.).
8863 (license license:expat)))
8865 (define-public python2-pathlib2-bootstrap
8868 (inherit python2-pathlib2)
8869 (name "python2-pathlib2-bootstrap")
8871 `(("python2-scandir" ,python2-scandir)
8872 ("python2-six" ,python2-six-bootstrap))))))
8874 (define-public python-jellyfish
8876 (name "python-jellyfish")
8880 (uri (pypi-uri "jellyfish" version))
8883 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8884 (build-system python-build-system)
8886 `(("python-pytest" ,python-pytest)))
8887 (home-page "https://github.com/jamesturk/jellyfish")
8888 (synopsis "Approximate and phonetic matching of strings")
8889 (description "Jellyfish uses a variety of string comparison and phonetic
8890 encoding algorithms to do fuzzy string matching.")
8891 (license license:bsd-2)
8892 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8894 (define-public python2-jellyfish
8895 (let ((jellyfish (package-with-python2
8896 (strip-python2-variant python-jellyfish))))
8897 (package (inherit jellyfish)
8898 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8899 ,@(package-native-inputs jellyfish))))))
8901 (define-public python2-unicodecsv
8903 (name "python2-unicodecsv")
8907 ;; The test suite is not included in the PyPi release.
8908 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8909 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8910 "archive/" version ".tar.gz"))
8911 (file-name (string-append name "-" version ".tar.gz"))
8914 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8915 (build-system python-build-system)
8917 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8918 #:python ,python-2))
8920 `(("python2-unittest2" ,python2-unittest2)))
8921 (home-page "https://github.com/jdunck/python-unicodecsv")
8922 (synopsis "Unicode CSV module for Python 2")
8923 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8924 module, adding support for Unicode strings.")
8925 (license license:bsd-2)))
8927 (define-public python-rarfile
8929 (name "python-rarfile")
8933 (uri (pypi-uri "rarfile" version))
8936 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8937 (build-system python-build-system)
8940 (modify-phases %standard-phases
8942 ;; Many tests fail, but the installation proceeds.
8943 (lambda _ (invoke "make" "-C" "test" "test"))))))
8945 `(("which" ,which))) ; required for tests
8947 `(("libarchive" ,libarchive)))
8948 (home-page "https://github.com/markokr/rarfile")
8949 (synopsis "RAR archive reader for Python")
8950 (description "This is Python module for RAR archive reading. The interface
8951 is made as zipfile like as possible.")
8952 (license license:isc)))
8954 (define-public python2-rarfile
8955 (package-with-python2 python-rarfile))
8957 (define-public python-magic
8959 (name "python-magic")
8964 (uri (pypi-uri "python-magic" version))
8967 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8968 (file-name (string-append name "-" version "-checkout"))))
8969 (build-system python-build-system)
8971 ;; The tests are unreliable, so don't run them. The tests fail
8972 ;; under Python3 because they were written for Python2 and
8973 ;; contain import statements that do not work in Python3. One of
8974 ;; the tests fails under Python2 because its assertions are
8975 ;; overly stringent; it relies on comparing output strings which
8976 ;; are brittle and can change depending on the version of
8977 ;; libmagic being used and the system on which the test is
8978 ;; running. In my case, under GuixSD 0.10.0, only one test
8979 ;; failed, and it seems to have failed only because the version
8980 ;; of libmagic that is packaged in Guix outputs a slightly
8981 ;; different (but not wrong) string than the one that the test
8984 #:phases (modify-phases %standard-phases
8985 ;; Replace a specific method call with a hard-coded
8986 ;; path to the necessary libmagic.so file in the
8987 ;; store. If we don't do this, then the method call
8988 ;; will fail to find the libmagic.so file, which in
8989 ;; turn will cause any application using
8990 ;; python-magic to fail.
8991 (add-before 'build 'hard-code-path-to-libmagic
8992 (lambda* (#:key inputs #:allow-other-keys)
8993 (let ((file (assoc-ref inputs "file")))
8994 (substitute* "magic.py"
8995 (("ctypes.util.find_library\\('magic'\\)")
8996 (string-append "'" file "/lib/libmagic.so'")))
8998 (add-before 'install 'disable-egg-compression
9000 (let ((port (open-file "setup.cfg" "a")))
9001 (display "\n[easy_install]\nzip_ok = 0\n"
9006 ;; python-magic needs to be able to find libmagic.so.
9009 "https://github.com/ahupp/python-magic")
9011 "File type identification using libmagic")
9013 "This module uses ctypes to access the libmagic file type
9014 identification library. It makes use of the local magic database and
9015 supports both textual and MIME-type output. Note that this module and
9016 the python-file module both provide a \"magic.py\" file; these two
9017 modules, which are different and were developed separately, both serve
9018 the same purpose: to provide Python bindings for libmagic.")
9019 (license license:expat)))
9021 (define-public python2-magic
9022 (package-with-python2 python-magic))
9024 (define-public python2-s3cmd
9026 (name "python2-s3cmd")
9031 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9032 "s3cmd-" version ".tar.gz"))
9035 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9036 (build-system python-build-system)
9038 ;; s3cmd is written for python2 only and contains no tests.
9039 `(#:python ,python-2
9042 `(("python2-dateutil" ,python2-dateutil)
9043 ;; The python-file package also provides a magic.py module.
9044 ;; This is an unfortunate state of affairs; however, s3cmd
9045 ;; fails to install if it cannot find specifically the
9046 ;; python-magic package. Thus we include it, instead of using
9047 ;; python-file. Ironically, s3cmd sometimes works better
9048 ;; without libmagic bindings at all:
9049 ;; https://github.com/s3tools/s3cmd/issues/198
9050 ("python2-magic" ,python2-magic)))
9051 (home-page "http://s3tools.org/s3cmd")
9052 (synopsis "Command line tool for S3-compatible storage services")
9054 "S3cmd is a command line tool for uploading, retrieving and managing data
9055 in storage services that are compatible with the Amazon Simple Storage
9056 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9057 GnuPG encryption, and more. It also supports management of Amazon's
9058 CloudFront content delivery network.")
9059 (license license:gpl2+)))
9061 (define-public python-pkgconfig
9063 (name "python-pkgconfig")
9068 (uri (pypi-uri "pkgconfig" version))
9071 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9072 (build-system python-build-system)
9074 `(("python-nose" ,python-nose)))
9076 `(("pkg-config" ,pkg-config)))
9079 (modify-phases %standard-phases
9080 (add-before 'build 'patch
9081 ;; Hard-code the path to pkg-config.
9083 (substitute* "pkgconfig/pkgconfig.py"
9084 (("cmd = 'pkg-config")
9085 (string-append "cmd = '" (which "pkg-config"))))
9089 (invoke "nosetests" "test.py"))))))
9090 (home-page "https://github.com/matze/pkgconfig")
9091 (synopsis "Python interface for pkg-config")
9092 (description "This module provides a Python interface to pkg-config. It
9093 can be used to find all pkg-config packages, check if a package exists,
9094 check if a package meets certain version requirements, query CFLAGS and
9095 LDFLAGS and parse the output to build extensions with setup.py.")
9096 (license license:expat)))
9098 (define-public python2-pkgconfig
9099 (package-with-python2 python-pkgconfig))
9101 (define-public python-bz2file
9103 (name "python-bz2file")
9108 (uri (pypi-uri "bz2file" version))
9111 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9112 (build-system python-build-system)
9114 `(#:tests? #f)) ; Tests use deprecated python modules.
9115 (home-page "https://github.com/nvawda/bz2file")
9116 (synopsis "Read and write bzip2-compressed files")
9118 "Bz2file is a Python library for reading and writing bzip2-compressed
9119 files. It contains a drop-in replacement for the I/O interface in the
9120 standard library's @code{bz2} module, including features from the latest
9121 development version of CPython that are not available in older releases.")
9122 (license license:asl2.0)))
9124 (define-public python2-bz2file
9125 (package-with-python2 python-bz2file))
9127 (define-public python-future
9129 (name "python-future")
9134 (uri (pypi-uri "future" version))
9137 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9138 (build-system python-build-system)
9139 ;; Many tests connect to the network or are otherwise flawed.
9140 ;; https://github.com/PythonCharmers/python-future/issues/210
9143 (home-page "http://python-future.org")
9144 (synopsis "Single-source support for Python 3 and 2")
9146 "@code{python-future} is the missing compatibility layer between Python 2 and
9147 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9148 to support both Python 2 and Python 3 with minimal overhead.")
9149 (license license:expat)))
9151 (define-public python2-future
9152 (package-with-python2 python-future))
9154 (define-public python-cysignals
9156 (name "python-cysignals")
9161 (uri (pypi-uri "cysignals" version))
9164 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9165 (build-system python-build-system)
9167 `(("python-cython" ,python-cython)
9168 ("python-sphinx" ,python-sphinx)))
9170 `(("pari-gp" ,pari-gp)))
9172 `(#:modules ((guix build python-build-system)
9173 ((guix build gnu-build-system) #:prefix gnu:)
9175 ;; FIXME: Tests are executed after installation and currently fail
9176 ;; when not installing into standard locations; the author is working
9180 (modify-phases %standard-phases
9183 (assoc-ref gnu:%standard-phases 'configure)))))
9185 "https://github.com/sagemath/cysignals")
9187 "Handling of interrupts and signals for Cython")
9189 "The cysignals package provides mechanisms to handle interrupts (and
9190 other signals and errors) in Cython code, using two related approaches,
9191 for mixed Cython/Python code or external C libraries and pure Cython code,
9193 (license license:lgpl3+)))
9195 (define-public python2-cysignals
9196 (package-with-python2 python-cysignals))
9198 (define-public python2-shedskin
9200 (name "python2-shedskin")
9205 (uri (string-append "https://github.com/shedskin/shedskin/"
9206 "releases/download/v" version
9207 "/shedskin-" version ".tgz"))
9210 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9211 (build-system python-build-system)
9213 `(#:python ,python-2
9214 #:phases (modify-phases %standard-phases
9215 (add-after 'unpack 'fix-resulting-include-libs
9216 (lambda* (#:key inputs #:allow-other-keys)
9217 (let ((libgc (assoc-ref inputs "libgc"))
9218 (pcre (assoc-ref inputs "pcre")))
9219 (substitute* "shedskin/makefile.py"
9220 (("variable == 'CCFLAGS':[ ]*")
9221 (string-append "variable == 'CCFLAGS':\n"
9222 " line += ' -I " pcre "/include"
9223 " -I " libgc "/include'"))
9224 (("variable == 'LFLAGS':[ ]*")
9225 (string-append "variable == 'LFLAGS':\n"
9226 " line += ' -L" pcre "/lib"
9227 " -L " libgc "/lib'")))
9229 (inputs `(("pcre" ,pcre)
9231 (home-page "https://shedskin.github.io/")
9232 (synopsis "Experimental Python-2 to C++ Compiler")
9233 (description (string-append "This is an experimental compiler for a subset of
9234 Python. It generates C++ code and a Makefile."))
9235 (license (list license:gpl3 license:bsd-3 license:expat))))
9237 (define-public python2-rope
9239 (name "python2-rope")
9244 (uri (pypi-uri "rope" version))
9247 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9249 ;; Rope has only partial python3 support, see `python-rope'
9250 `(#:python ,python-2))
9251 (build-system python-build-system)
9253 `(("python2-unittest2" ,python2-unittest2)))
9254 (home-page "https://github.com/python-rope/rope")
9255 (synopsis "Refactoring library for Python")
9256 (description "Rope is a refactoring library for Python. It facilitates
9257 the renaming, moving and extracting of attributes, functions, modules, fields
9258 and parameters in Python 2 source code. These refactorings can also be applied
9259 to occurrences in strings and comments.")
9260 (license license:gpl2)))
9262 (define-public python-rope
9264 (inherit python2-rope)
9265 (name "python-rope")
9266 (arguments `(#:python ,python-wrapper
9267 ;; XXX: Only partial python3 support, results in some failing
9268 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9270 (properties `((python2-variant . ,(delay python2-rope))))))
9272 (define-public python-py3status
9274 (name "python-py3status")
9279 (uri (pypi-uri "py3status" version))
9282 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9283 (build-system python-build-system)
9288 (modify-phases %standard-phases
9289 ;; 'file' is used for detection of configuration file encoding
9290 ;; let's make link the dependency to particular input
9291 (add-before 'build 'patch-file-path
9292 (lambda* (#:key inputs #:allow-other-keys)
9293 (let ((file-path (assoc-ref inputs "file")))
9294 (substitute* "py3status/parse_config.py"
9295 (("\\['file', '-b'")
9296 (string-append "['" file-path "/bin/file', '-b'")))
9298 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9299 (home-page "https://github.com/ultrabug/py3status")
9300 (synopsis "Extensible i3status wrapper written in Python")
9301 (description "py3status is an i3status wrapper which extends i3status
9302 functionality in a modular way, allowing you to extend your panel with your
9303 own code, responding to click events and updating clock every second.")
9304 (license license:bsd-3)))
9306 (define-public python-tblib
9308 (name "python-tblib")
9312 (uri (pypi-uri "tblib" version))
9314 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9315 (build-system python-build-system)
9318 (modify-phases %standard-phases
9319 (add-before 'check 'adjust-tests
9321 (when (which "python3")
9322 ;; Adjust the example output to match that of Python 3.7:
9323 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9324 (substitute* "README.rst"
9325 (("Exception\\('fail',") "Exception('fail'"))
9329 ;; Upstream runs tests after installation and the package itself
9330 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9332 (setenv "PYTHONPATH"
9333 (string-append (getcwd) "/build/lib:"
9334 (getenv "PYTHONPATH")))
9335 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9337 `(("python-pytest" ,python-pytest)
9338 ("python-six" ,python-six)))
9339 (home-page "https://github.com/ionelmc/python-tblib")
9340 (synopsis "Traceback serialization library")
9342 "Traceback serialization allows you to:
9345 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9346 different processes. This allows better error handling when running code over
9347 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9349 @item Parse traceback strings and raise with the parsed tracebacks.
9351 (license license:bsd-3)))
9353 (define-public python2-tblib
9354 (package-with-python2 python-tblib))
9356 (define-public python-greenlet
9358 (name "python-greenlet")
9362 (uri (pypi-uri "greenlet" version))
9365 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9366 (build-system python-build-system)
9367 (home-page "https://greenlet.readthedocs.io/")
9368 (synopsis "Lightweight in-process concurrent programming")
9370 "Greenlet package is a spin-off of Stackless, a version of CPython
9371 that supports micro-threads called \"tasklets\". Tasklets run
9372 pseudo-concurrently (typically in a single or a few OS-level threads) and
9373 are synchronized with data exchanges on \"channels\".")
9374 (license (list license:psfl license:expat))))
9376 (define-public python2-greenlet
9377 (package-with-python2 python-greenlet))
9379 (define-public python-objgraph
9381 (name "python-objgraph")
9386 (uri (pypi-uri "objgraph" version))
9389 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9390 (build-system python-build-system)
9392 `(("python-graphviz" ,python-graphviz)))
9394 `(("python-mock" ,python-mock)
9395 ("graphviz" ,graphviz)))
9396 (home-page "https://mg.pov.lt/objgraph/")
9397 (synopsis "Draw Python object reference graphs with graphviz")
9399 "This package provides tools to draw Python object reference graphs with
9401 (license license:expat)))
9403 (define-public python-gevent
9405 (name "python-gevent")
9409 (uri (pypi-uri "gevent" version))
9412 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9413 (modules '((guix build utils)))
9416 ;; unbunding libev and c-ares
9417 (delete-file-recursively "deps")
9419 (build-system python-build-system)
9421 `(#:modules ((ice-9 ftw)
9425 (guix build python-build-system))
9426 #:phases (modify-phases %standard-phases
9427 (add-after 'unpack 'unpack-libev
9428 (lambda* (#:key inputs #:allow-other-keys)
9429 (mkdir-p "deps/libev")
9430 ;; FIXME: gevent requires building libev, even though
9431 ;; it only links against the proper one.
9432 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9433 "--strip-components=1" "-C" "deps/libev")))
9434 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9436 (substitute* "src/gevent/subprocess.py"
9437 (("/bin/sh") (which "sh")))
9438 (for-each (lambda (file)
9440 (("/bin/sh") (which "sh"))
9441 (("/bin/true") (which "true"))))
9442 (find-files "src/greentest" "\\.py$"))
9444 (add-before 'build 'do-not-use-bundled-sources
9445 (lambda* (#:key inputs #:allow-other-keys)
9446 (setenv "CONFIG_SHELL" (which "bash"))
9447 (setenv "LIBEV_EMBED" "false")
9448 (setenv "CARES_EMBED" "false")
9449 (setenv "EMBED" "false")
9451 (let ((greenlet (string-append
9452 (assoc-ref inputs "python-greenlet")
9454 (match (scandir greenlet
9456 (string-prefix? "python" item)))
9459 (string-append greenlet "/" python)))))
9461 (add-before 'check 'skip-timer-test
9463 ;; XXX: Skip 'TestTimerResolution', which appears to be
9465 (substitute* "src/greentest/test__core_timer.py"
9466 (("not greentest.RUNNING_ON_CI") "False"))
9470 ;; Make sure the build directory is on PYTHONPATH.
9471 (setenv "PYTHONPATH"
9473 (getenv "PYTHONPATH") ":"
9475 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9476 (with-directory-excursion "src/greentest"
9477 ;; XXX: Many tests require network access. Instead we only
9478 ;; run known-good tests. Unfortunately we cannot use
9479 ;; recursion here since this directory also contains
9480 ;; Python-version-specific subfolders.
9481 (apply invoke "python" "testrunner.py" "--config"
9483 (scandir "." (cut regexp-exec
9484 (make-regexp "test_+(subprocess|core)")
9487 `(("python-greenlet" ,python-greenlet)
9488 ("python-objgraph" ,python-objgraph)))
9490 `(("libev-source" ,(package-source libev))
9491 ("python-six" ,python-six)))
9493 `(("c-ares" ,c-ares)
9495 (home-page "http://www.gevent.org/")
9496 (synopsis "Coroutine-based network library")
9498 "gevent is a coroutine-based Python networking library that uses greenlet
9499 to provide a high-level synchronous API on top of the libev event loop.")
9500 (license license:expat)
9501 (properties `((python2-variant . ,(delay python2-gevent))))))
9503 (define-public python2-gevent
9504 (let ((base (package-with-python2
9505 (strip-python2-variant python-gevent))))
9508 (native-inputs `(,@(package-native-inputs python-gevent)
9509 ("python-mock" ,python2-mock))))))
9511 (define-public python-fastimport
9513 (name "python-fastimport")
9518 (uri (pypi-uri "fastimport" version))
9520 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9521 (build-system python-build-system)
9522 (home-page "https://github.com/jelmer/python-fastimport")
9523 (synopsis "VCS fastimport parser and generator in Python")
9524 (description "This package provides a parser for and generator of the Git
9525 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9527 (license license:gpl2+)))
9529 (define-public python2-fastimport
9530 (package-with-python2 python-fastimport))
9532 (define-public python-twisted
9534 (name "python-twisted")
9538 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9541 "1gmb8d57s13d8znvqnxi47vqzqz141z443dbxg9wjkp8ia9f220p"))))
9542 (build-system python-build-system)
9544 '(#:tests? #f)) ; FIXME: Some tests are failing.
9546 `(("python-zope-interface" ,python-zope-interface)
9547 ("python-pyhamcrest" ,python-pyhamcrest)
9548 ("python-incremental" ,python-incremental)
9549 ("python-hyperlink" ,python-hyperlink)
9550 ("python-constantly" ,python-constantly)
9551 ("python-automat" ,python-automat)))
9552 (home-page "https://twistedmatrix.com/")
9553 (synopsis "Asynchronous networking framework written in Python")
9555 "Twisted is an extensible framework for Python programming, with special
9556 focus on event-based network programming and multiprotocol integration.")
9557 (license license:expat)))
9559 (define-public python2-twisted
9560 (package-with-python2 python-twisted))
9562 (define-public python-pika
9564 (name "python-pika")
9569 (uri (pypi-uri "pika" version))
9572 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9573 (build-system python-build-system)
9575 `(("python-pyev" ,python-pyev)
9576 ("python-tornado" ,python-tornado)
9577 ("python-twisted" ,python-twisted)))
9578 (home-page "https://pika.readthedocs.org")
9579 (synopsis "Pure Python AMQP Client Library")
9581 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9582 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9583 network support library.")
9584 (license license:bsd-3)))
9586 (define-public python2-pika
9587 (package-with-python2 python-pika))
9589 (define-public python-ply
9596 (uri (pypi-uri "ply" version))
9599 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9600 (build-system python-build-system)
9601 (home-page "http://www.dabeaz.com/ply/")
9602 (synopsis "Python Lex & Yacc")
9603 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9604 It uses LR parsing and does extensive error checking.")
9605 (license license:bsd-3)))
9607 (define-public python2-ply
9608 (package-with-python2 python-ply))
9610 (define-public python-tabulate
9612 (name "python-tabulate")
9616 (uri (pypi-uri "tabulate" version))
9619 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9620 (build-system python-build-system)
9622 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9623 ;; and the latest release is not tagged in the upstream repository.
9625 (home-page "https://bitbucket.org/astanin/python-tabulate")
9626 (synopsis "Pretty-print tabular data")
9628 "Tabulate is a library and command-line utility to pretty-print tabular
9630 (license license:expat)))
9632 (define-public python2-tabulate
9633 (package-with-python2 python-tabulate))
9635 (define-public python-kazoo
9637 (name "python-kazoo")
9642 (uri (pypi-uri "kazoo" version))
9645 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9646 (build-system python-build-system)
9647 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9649 `(("python-six" ,python-six)))
9650 (home-page "https://kazoo.readthedocs.org")
9651 (synopsis "High-level Zookeeper client library")
9653 "Kazoo is a Python client library for the Apache Zookeeper distributed
9654 application service. It is designed to be easy to use and to avoid common
9655 programming errors.")
9656 (license license:asl2.0)))
9658 (define-public python2-kazoo
9659 (package-with-python2 python-kazoo))
9661 (define-public python-pykafka
9663 (name "python-pykafka")
9667 (uri (pypi-uri "pykafka" version))
9670 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9671 (build-system python-build-system)
9672 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9674 `(("python-gevent" ,python-gevent)
9675 ("python-kazoo" ,python-kazoo)
9676 ("python-tabulate" ,python-tabulate)))
9678 `(("librdkafka" ,librdkafka)))
9679 (home-page "https://pykafka.readthedocs.io/")
9680 (synopsis "Apache Kafka client for Python")
9682 "PyKafka is a client for the Apache Kafka distributed messaging system.
9683 It includes Python implementations of Kafka producers and consumers, which
9684 are optionally backed by a C extension built on librdkafka.")
9685 (license license:asl2.0)))
9687 (define-public python2-pykafka
9688 (package-with-python2 python-pykafka))
9690 (define-public python-wcwidth
9692 (name "python-wcwidth")
9697 (uri (pypi-uri "wcwidth" version))
9700 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9701 (build-system python-build-system)
9702 (home-page "https://github.com/jquast/wcwidth")
9703 (synopsis "Measure number of terminal column cells of wide-character codes")
9704 (description "Wcwidth measures the number of terminal column cells of
9705 wide-character codes. It is useful for those implementing a terminal emulator,
9706 or programs that carefully produce output to be interpreted by one. It is a
9707 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9708 specified in POSIX.1-2001 and POSIX.1-2008.")
9709 (license license:expat)))
9711 (define-public python2-wcwidth
9712 (package-with-python2 python-wcwidth))
9714 (define-public python2-jsonrpclib
9716 (name "python2-jsonrpclib")
9720 (uri (pypi-uri "jsonrpclib" version))
9723 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9724 (build-system python-build-system)
9727 #:python ,python-2))
9728 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9729 (synopsis "Implementation of JSON-RPC specification for Python")
9731 "This library is an implementation of the JSON-RPC specification.
9732 It supports both the original 1.0 specification, as well as the
9733 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9735 (license license:asl2.0)))
9737 (define-public python-chai
9739 (name "python-chai")
9743 (uri (pypi-uri "chai" version))
9746 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9747 (build-system python-build-system)
9748 (home-page "https://github.com/agoragames/chai")
9749 (synopsis "Mocking framework for Python")
9751 "Chai provides an api for mocking, stubbing and spying your python
9752 objects, patterned after the Mocha library for Ruby.")
9753 (license license:bsd-3)))
9755 (define-public python2-chai
9756 (package-with-python2 python-chai))
9758 (define-public python-inflection
9760 (name "python-inflection")
9763 (origin (method url-fetch)
9764 (uri (pypi-uri "inflection" version))
9767 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9768 (build-system python-build-system)
9770 `(("python-pytest" ,python-pytest)))
9771 (home-page "https://github.com/jpvanhal/inflection")
9772 (synopsis "Python string transformation library")
9774 "Inflection is a string transformation library. It singularizes
9775 and pluralizes English words, and transforms strings from CamelCase to
9776 underscored string.")
9777 (license license:expat)))
9779 (define-public python2-inflection
9780 (package-with-python2 python-inflection))
9782 (define-public python-pylev
9784 (name "python-pylev")
9788 (uri (pypi-uri "pylev" version))
9791 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9792 (build-system python-build-system)
9793 (home-page "https://github.com/toastdriven/pylev")
9794 (synopsis "Levenshtein distance implementation in Python")
9795 (description "Pure Python Levenshtein implementation, based off the
9796 Wikipedia code samples at
9797 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9798 (license license:bsd-3)))
9800 (define-public python2-pylev
9801 (package-with-python2 python-pylev))
9803 (define-public python-cleo
9805 (name "python-cleo")
9809 (uri (pypi-uri "cleo" version))
9812 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9813 (build-system python-build-system)
9816 ("python-mock" ,python-mock)
9817 ("python-pytest-mock" ,python-pytest-mock)
9818 ("python-pytest" ,python-pytest)))
9820 `(("python-backpack" ,python-backpack)
9821 ("python-pastel" ,python-pastel)
9822 ("python-pylev" ,python-pylev)))
9823 (home-page "https://github.com/sdispater/cleo")
9824 (synopsis "Command-line arguments library for Python")
9826 "Cleo allows you to create command-line commands with signature in
9827 docstring and colored output.")
9828 (license license:expat)))
9830 (define-public python2-cleo
9831 (package-with-python2 python-cleo))
9833 (define-public python-lazy-object-proxy
9835 (name "python-lazy-object-proxy")
9839 (uri (pypi-uri "lazy-object-proxy" version))
9842 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9843 (build-system python-build-system)
9844 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9845 (synopsis "Lazy object proxy for python")
9847 "Lazy object proxy is an object that wraps a callable but defers the call
9848 until the object is actually required, and caches the result of said call.")
9849 (license license:bsd-2)))
9851 (define-public python2-lazy-object-proxy
9852 (package-with-python2 python-lazy-object-proxy))
9854 (define-public python-dnspython
9856 (name "python-dnspython")
9860 (uri (string-append "http://www.dnspython.org/kits/"
9861 version "/dnspython-" version ".tar.gz"))
9864 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9865 (build-system python-build-system)
9866 (arguments '(#:tests? #f)) ; XXX: requires internet access
9867 (home-page "http://www.dnspython.org")
9868 (synopsis "DNS toolkit for Python")
9870 "dnspython is a DNS toolkit for Python. It supports almost all record
9871 types. It can be used for queries, zone transfers, and dynamic updates.
9872 It supports TSIG authenticated messages and EDNS0.")
9873 (license license:expat)))
9875 (define-public python2-dnspython
9876 (package-with-python2 python-dnspython))
9878 (define-public python-email-validator
9880 (name "python-email-validator")
9883 (origin (method url-fetch)
9884 (uri (pypi-uri "email_validator" version))
9887 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9888 (build-system python-build-system)
9891 (modify-phases %standard-phases
9892 (add-before 'build 'use-dnspython
9894 (substitute* "setup.py"
9895 (("dnspython3") "dnspython"))
9898 `(("python-dnspython" ,python-dnspython)
9899 ("python-idna" ,python-idna)))
9900 (home-page "https://github.com/JoshData/python-email-validator")
9901 (synopsis "Email address validation library for Python")
9903 "This library validates email address syntax and deliverability.")
9904 (license license:cc0)))
9906 (define-public python2-email-validator
9907 (package-with-python2 python-email-validator))
9909 (define-public python-ukpostcodeparser
9911 (name "python-ukpostcodeparser")
9915 (uri (pypi-uri "UkPostcodeParser" version))
9918 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9919 (build-system python-build-system)
9920 (home-page "https://github.com/hamstah/ukpostcodeparser")
9921 (synopsis "UK Postcode parser for Python")
9923 "This library provides the @code{parse_uk_postcode} function for
9924 parsing UK postcodes.")
9925 (license license:expat)))
9927 (define-public python2-ukpostcodeparser
9928 (package-with-python2 python-ukpostcodeparser))
9930 (define-public python-faker
9932 (name "python-faker")
9936 (uri (pypi-uri "Faker" version))
9939 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9941 (search-patches "python-faker-fix-build-32bit.patch"))
9942 (modules '((guix build utils)))
9945 (for-each delete-file (find-files "." "\\.pyc$"))
9947 (build-system python-build-system)
9950 (modify-phases %standard-phases
9952 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9955 ("python-email-validator" ,python-email-validator)
9956 ("python-mock" ,python-mock)
9957 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9959 `(("python-dateutil" ,python-dateutil)
9960 ("python-six" ,python-six)))
9961 (home-page "https://github.com/joke2k/faker")
9962 (synopsis "Python package that generates fake data")
9964 "Faker is a Python package that generates fake data such as names,
9965 addresses, and phone numbers.")
9966 (license license:expat)
9967 (properties `((python2-variant . ,(delay python2-faker))))))
9969 (define-public python2-faker
9970 (let ((base (package-with-python2 (strip-python2-variant
9975 `(("python2-ipaddress" ,python2-ipaddress)
9976 ,@(package-propagated-inputs base))))))
9978 (define-public python-pyaml
9980 (name "python-pyaml")
9984 (uri (pypi-uri "pyaml" version))
9987 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9988 (build-system python-build-system)
9990 `(("python-unidecode" ,python-unidecode)))
9992 `(("python-pyyaml" ,python-pyyaml)))
9993 (home-page "https://github.com/mk-fg/pretty-yaml")
9994 (synopsis "YAML pretty-print library for Python")
9996 "pyaml is a PyYAML based python module to produce pretty and readable
9997 YAML-serialized data.")
9998 (license license:wtfpl2)))
10000 (define-public python2-pyaml
10001 (package-with-python2 python-pyaml))
10003 (define-public python-backpack
10005 (name "python-backpack")
10010 (uri (pypi-uri "backpack" version))
10013 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10014 (build-system python-build-system)
10016 `(("python-pytest" ,python-pytest)
10017 ("python-nose" ,python-nose)))
10019 `(("python-simplejson" ,python-simplejson)))
10020 (home-page "https://github.com/sdispater/backpack")
10021 (synopsis "Utilities for working with Python collections")
10022 (description "Backpack provides some useful utilities for working with
10023 collections of data.")
10024 (license license:expat)))
10026 (define-public python2-backpack
10027 (package-with-python2 python-backpack))
10029 (define-public python-prompt-toolkit
10031 (name "python-prompt-toolkit")
10036 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10039 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10040 (build-system python-build-system)
10043 (modify-phases %standard-phases
10045 (add-after 'install 'post-install-check
10046 (lambda* (#:key inputs outputs #:allow-other-keys)
10047 ;; HOME is needed for the test
10048 ;; "test_pathcompleter_can_expanduser".
10049 (setenv "HOME" "/tmp")
10050 (add-installed-pythonpath inputs outputs)
10051 (invoke "py.test"))))))
10053 `(("python-wcwidth" ,python-wcwidth)
10054 ("python-six" ,python-six)
10055 ("python-pygments" ,python-pygments)))
10057 `(("python-pytest" ,python-pytest)))
10058 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10059 (synopsis "Library for building command line interfaces in Python")
10061 "Prompt-Toolkit is a library for building interactive command line
10062 interfaces in Python. It's like GNU Readline but it also features syntax
10063 highlighting while typing, out-of-the-box multi-line input editing, advanced
10064 code completion, incremental search, support for Chinese double-width
10065 characters, mouse support, and auto suggestions.")
10066 (license license:bsd-3)))
10068 (define-public python2-prompt-toolkit
10069 (package-with-python2 python-prompt-toolkit))
10071 (define-public python-prompt-toolkit-1
10072 (package (inherit python-prompt-toolkit)
10077 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10080 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10082 (define-public python2-prompt-toolkit-1
10083 (package-with-python2 python-prompt-toolkit-1))
10085 (define-public python-jedi
10087 (name "python-jedi")
10092 (uri (pypi-uri "jedi" version))
10095 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10096 (build-system python-build-system)
10098 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10099 ;; https://github.com/davidhalter/jedi/issues/1263)
10102 (modify-phases %standard-phases
10104 (lambda* (#:key tests? #:allow-other-keys)
10106 (invoke "py.test" "-vv")))))))
10108 `(("python-pytest" ,python-pytest)
10109 ("python-docopt" ,python-docopt)))
10111 `(("python-parso" ,python-parso)))
10112 (home-page "https://github.com/davidhalter/jedi")
10113 (synopsis "Autocompletion and static analysis library for Python")
10115 "Jedi is a static analysis tool for Python that can be used in Integrated
10116 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10117 on a deeper level than many other static analysis frameworks for Python.
10119 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10121 (license license:expat)))
10123 (define-public python2-jedi
10124 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10127 (arguments (substitute-keyword-arguments (package-arguments base)
10128 ((#:tests? _) #t))))))
10130 (define-public ptpython
10136 (uri (pypi-uri "ptpython" version))
10139 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10140 (build-system python-build-system)
10142 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10144 `(("python-docopt" ,python-docopt)
10145 ("python-jedi" ,python-jedi)
10146 ("python-prompt-toolkit" ,python-prompt-toolkit)
10147 ("python-pygments" ,python-pygments)))
10148 (home-page "https://github.com/jonathanslenders/ptpython")
10149 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10151 "ptpython is a Python read-eval-print loop with IDE-like features.
10152 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10153 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10155 (license license:bsd-3)
10156 (properties `((python2-variant . ,(delay ptpython-2))))))
10158 (define-public ptpython-2
10159 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10162 (name "ptpython2"))))
10164 (define-public python-stem
10166 (name "python-stem")
10171 (uri (pypi-uri "stem" version))
10174 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10175 (build-system python-build-system)
10178 (modify-phases %standard-phases
10181 (invoke "./run_tests.py" "--unit")
10184 `(("python-mock" ,python-mock)
10185 ("python-pycodestyle" ,python-pycodestyle)
10186 ("python-pyflakes" ,python-pyflakes)))
10187 (home-page "https://stem.torproject.org/")
10189 "Python controller library that allows applications to interact with Tor")
10191 "Stem is a Python controller library for Tor. With it you can use Tor's
10192 control protocol to script against the Tor process and read descriptor data
10193 relays publish about themselves.")
10194 (license license:lgpl3)))
10196 (define-public python2-stem
10197 (package-with-python2 python-stem))
10199 (define-public python-pyserial
10201 (name "python-pyserial")
10206 (uri (pypi-uri "pyserial" version))
10209 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10210 (build-system python-build-system)
10212 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10214 ;; (modify-phases %standard-phases
10217 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10219 "https://github.com/pyserial/pyserial")
10220 (synopsis "Python Serial Port Bindings")
10221 (description "@code{pyserial} provide serial port bindings for Python. It
10222 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10223 and/or Xon/Xoff. The port is accessed in RAW mode.")
10224 (license license:bsd-3)))
10226 (define-public python2-pyserial
10227 (package-with-python2 python-pyserial))
10229 (define-public python-kivy
10231 (name "python-kivy")
10236 (uri (pypi-uri "Kivy" version))
10237 (file-name (string-append name "-" version ".tar.gz"))
10240 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10241 (build-system python-build-system)
10243 `(#:tests? #f ; Tests require many optional packages
10245 (modify-phases %standard-phases
10246 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10247 (lambda* (#:key inputs #:allow-other-keys)
10248 (setenv "KIVY_SDL2_PATH"
10249 (string-append (assoc-ref inputs "sdl-union")
10254 ("pkg-config" ,pkg-config)
10255 ("python-cython" ,python-cython)))
10257 `(("gstreamer" ,gstreamer)
10260 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10261 (home-page "http://kivy.org")
10263 "Multitouch application framework")
10265 "A software library for rapid development of
10266 hardware-accelerated multitouch applications.")
10267 (license license:expat)))
10269 (define-public python2-kivy
10270 (package-with-python2 python-kivy))
10272 (define-public python-kivy-next
10273 (deprecated-package "python-kivy-next" python-kivy))
10275 (define-public python2-kivy-next
10276 (deprecated-package "python2-kivy-next" python2-kivy))
10278 (define-public python-binaryornot
10280 (name "python-binaryornot")
10284 (uri (pypi-uri "binaryornot" version))
10287 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10288 (build-system python-build-system)
10290 `(("python-chardet" ,python-chardet)
10291 ("python-hypothesis" ,python-hypothesis)))
10292 (home-page "https://github.com/audreyr/binaryornot")
10293 (synopsis "Package to check if a file is binary or text")
10294 (description "Ultra-lightweight pure Python package to check if a file is
10296 (license license:bsd-3)
10297 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10299 (define-public python2-binaryornot
10300 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10301 (package (inherit base)
10303 `(("python2-enum34" ,python2-enum34)
10304 ,@(package-propagated-inputs base))))))
10306 (define-public python-nltk
10308 (name "python-nltk")
10312 (uri (pypi-uri "nltk" version))
10315 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10316 (build-system python-build-system)
10318 '(;; The tests require some extra resources to be downloaded.
10319 ;; TODO Try packaging these resources.
10321 (home-page "http://nltk.org/")
10322 (synopsis "Natural Language Toolkit")
10323 (description "It provides interfaces to over 50 corpora and lexical
10324 resources such as WordNet, along with a suite of text processing libraries
10325 for classification, tokenization, stemming, tagging, parsing, and semantic
10326 reasoning, wrappers for natural language processing libraries.")
10327 (license license:asl2.0)))
10329 (define-public python2-nltk
10330 (package-with-python2 python-nltk))
10332 (define-public python-pymongo
10334 (name "python-pymongo")
10338 (uri (pypi-uri "pymongo" version))
10341 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10342 (build-system python-build-system)
10344 `(("python-certifi" ,python-certifi)))
10345 (home-page "https://github.com/mongodb/mongo-python-driver")
10346 (synopsis "Python driver for MongoDB")
10347 (description "Python driver for MongoDB.")
10348 (license license:asl2.0)))
10350 (define-public python2-pymongo
10351 (package-with-python2 python-pymongo))
10353 (define-public python-consul
10355 (name "python-consul")
10360 (uri (pypi-uri "python-consul" version))
10363 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10364 (build-system python-build-system)
10366 '(#:tests? #f)) ; The tests are not distributed
10368 `(("python-requests" ,python-requests)
10369 ("python-six" ,python-six)))
10370 (home-page "https://github.com/cablehead/python-consul")
10371 (synopsis "Python client for Consul")
10373 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10374 discovery, monitoring and configuration.")
10375 (license license:expat)))
10377 (define-public python2-consul
10378 (package-with-python2 python-consul))
10380 (define-public python-schematics
10382 (name "python-schematics")
10387 (uri (git-reference
10388 (url "https://github.com/schematics/schematics.git")
10389 (commit (string-append "v" version))))
10390 (file-name (git-file-name name version))
10392 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10393 (build-system python-build-system)
10395 `(("python-six" ,python-six)))
10397 ;; The tests require a bunch of not very nice packages with fixed
10398 ;; version requirements (e.g. python-coveralls).
10400 (home-page "https://github.com/schematics/schematics")
10401 (synopsis "Python Data Structures for Humans")
10402 (description "Python Data Structures for Humans.")
10403 (license license:bsd-3)))
10405 (define-public python2-schematics
10406 (package-with-python2 python-schematics))
10408 (define-public python-odfpy
10410 (name "python-odfpy")
10414 (uri (pypi-uri "odfpy" version))
10417 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10419 `(#:modules ((srfi srfi-1)
10420 (guix build python-build-system)
10421 (guix build utils))
10423 (modify-phases %standard-phases
10425 ;; The test runner invokes python2 and python3 for test*.py.
10426 ;; To avoid having both in inputs, we replicate it here.
10428 (for-each (lambda (test-file) (invoke "python" test-file))
10429 (find-files "tests" "^test.*\\.py$"))
10431 (build-system python-build-system)
10432 (home-page "https://github.com/eea/odfpy")
10433 (synopsis "Python API and tools to manipulate OpenDocument files")
10434 (description "Collection of libraries and utility programs written in
10435 Python to manipulate OpenDocument 1.2 files.")
10437 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10438 ;; number of files with other licenses.
10439 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10441 (define-public python2-odfpy
10442 (package-with-python2 python-odfpy))
10444 (define-public python-natsort
10446 (name "python-natsort")
10450 (uri (pypi-uri "natsort" version))
10453 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10454 (build-system python-build-system)
10456 `(#:modules ((guix build utils)
10457 (guix build python-build-system)
10462 (modify-phases %standard-phases
10463 (add-before 'check 'set-cachedir
10464 ;; Tests require write access to $HOME by default
10465 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10468 (let ((cwd (getcwd)))
10469 (setenv "PYTHONPATH"
10472 (find (cut string-prefix? "lib" <>)
10473 (scandir (string-append cwd "/build")))
10475 (getenv "PYTHONPATH")))
10476 (invoke "pytest" "-v")))))))
10478 `(("python-hypothesis" ,python-hypothesis)
10479 ("python-pytest-cov" ,python-pytest-cov)
10480 ("python-pytest-mock" ,python-pytest-mock)
10481 ("python-pytest" ,python-pytest)))
10482 (propagated-inputs ; TODO: Add python-fastnumbers.
10483 `(("python-pyicu" ,python-pyicu)))
10484 (home-page "https://github.com/SethMMorton/natsort")
10485 (synopsis "Natural sorting for python and shell")
10487 "Natsort lets you apply natural sorting on lists instead of
10488 lexicographical. If you use the built-in @code{sorted} method in python
10489 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10490 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10491 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10492 identifies numbers and sorts them separately from strings. It can also sort
10493 version numbers, real numbers, mixed types and more, and comes with a shell
10494 command @command{natsort} that exposes this functionality in the command line.")
10495 (license license:expat)
10496 (properties `((python2-variant . ,(delay python2-natsort))))))
10498 (define-public python2-natsort
10499 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10500 (package (inherit base)
10502 `(("python2-pathlib" ,python2-pathlib)
10503 ,@(package-native-inputs base))))))
10505 (define-public python-glances
10507 (name "python-glances")
10512 (uri (pypi-uri "Glances" version))
10515 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10516 (build-system python-build-system)
10518 `(("python-psutil" ,python-psutil)))
10520 "https://github.com/nicolargo/glances")
10522 "A cross-platform curses-based monitoring tool")
10524 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10525 Glances uses the PsUtil library to get information from your system. It monitors
10526 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10527 (license license:lgpl3+)))
10529 (define-public python2-glances
10530 (package-with-python2 python-glances))
10532 (define-public python-graphql-core
10534 (name "python-graphql-core")
10539 (uri (pypi-uri "graphql-core" version))
10542 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10543 (build-system python-build-system)
10545 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10547 (modify-phases %standard-phases
10548 (add-after 'unpack 'patch-hardcoded-version
10549 (lambda _ (substitute*
10551 (("'gevent==1.1rc1'") "'gevent'"))
10554 `(("python-gevent" ,python-gevent)
10555 ("python-mock" ,python-mock)
10556 ("python-pytest-mock" ,python-pytest-mock)))
10558 `(("python-promise" ,python-promise)
10559 ("python-six" ,python-six)))
10560 (home-page "https://github.com/graphql-python/graphql-core")
10561 (synopsis "GraphQL implementation for Python")
10563 "GraphQL implementation for Python. GraphQL is a data query language and
10564 runtime designed and used to request and deliver data to mobile and web apps.
10565 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10567 (license license:expat)))
10569 (define-public python2-graphql-core
10570 (package-with-python2 python-graphql-core))
10572 (define-public python-graphql-relay
10574 (name "python-graphql-relay")
10579 (uri (pypi-uri "graphql-relay" version))
10582 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10583 (build-system python-build-system)
10585 '(#:tests? #f)) ; The tests are not distributed
10587 `(("python-graphql-core" ,python-graphql-core)
10588 ("python-promise" ,python-promise)
10589 ("python-six" ,python-six)))
10590 (home-page "https://github.com/graphql-python/graphql-relay-py")
10591 (synopsis "Relay implementation for Python")
10593 "This is a library to allow the easy creation of Relay-compliant servers
10594 using the GraphQL Python reference implementation of a GraphQL server. It
10595 should be noted that the code is a exact port of the original
10596 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10598 (license license:expat)))
10600 (define-public python2-graphql-relay
10601 (package-with-python2 python-graphql-relay))
10603 (define-public python-graphene
10605 (name "python-graphene")
10610 (uri (pypi-uri "graphene" version))
10613 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10614 (build-system python-build-system)
10616 `(("python-graphql-core" ,python-graphql-core)
10617 ("python-graphql-relay" ,python-graphql-relay)
10618 ("python-iso8601" ,python-iso8601)
10619 ("python-promise" ,python-promise)
10620 ("python-six" ,python-six)))
10622 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10623 (home-page "http://graphene-python.org/")
10624 (synopsis "GraphQL Framework for Python")
10626 "Graphene is a Python library for building GraphQL schemas/types.
10627 A GraphQL schema describes your data model, and provides a GraphQL server
10628 with an associated set of resolve methods that know how to fetch data.")
10629 (properties `((python2-variant . ,(delay python2-graphene))))
10630 (license license:expat)))
10632 (define-public python2-graphene
10633 (let ((base (package-with-python2
10634 (strip-python2-variant python-graphene))))
10635 (package (inherit base)
10637 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10638 ,@(package-native-inputs base))))))
10640 (define-public python-nautilus
10642 (name "python-nautilus")
10647 (uri (pypi-uri "nautilus" version))
10650 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10651 (build-system python-build-system)
10652 (arguments `(#:tests? #f)) ; fails to import test modules
10654 `(("python-bcrypt" ,python-bcrypt)
10655 ("python-click" ,python-click)
10656 ("python-consul" ,python-consul)
10657 ("python-graphene" ,python-graphene)
10658 ("python-jinja2" ,python-jinja2)
10659 ("python-peewee" ,python-peewee)
10660 ("python-pika" ,python-pika)
10661 ("python-tornado" ,python-tornado)
10662 ("python-wtforms" ,python-wtforms)))
10664 `(("python-nose2" ,python-nose2)))
10665 (home-page "https://github.com/AlecAivazis/nautilus")
10666 (synopsis "Library for creating microservice applications")
10668 "Nautilus is a framework for flux based microservices that looks to
10669 provide extendible implementations of common aspects of a cloud so that you can
10670 focus on building massively scalable web applications.")
10671 (license license:expat)))
10673 (define-public python-snowballstemmer
10675 (name "python-snowballstemmer")
10679 (uri (pypi-uri "snowballstemmer" version))
10682 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10683 (build-system python-build-system)
10685 `(;; No tests exist
10687 (home-page "https://github.com/shibukawa/snowball_py")
10688 (synopsis "Snowball stemming library collection for Python")
10689 (description "This package provides 16 word stemmer algorithms generated
10690 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10692 (license license:bsd-3)))
10694 (define-public python2-snowballstemmer
10695 (package-with-python2 python-snowballstemmer))
10697 (define-public python-setproctitle
10699 (name "python-setproctitle")
10704 (uri (pypi-uri "setproctitle" version))
10707 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10708 (build-system python-build-system)
10711 (modify-phases %standard-phases
10712 (add-before 'check 'patch-Makefile
10713 ;; Stricly this is only required for the python2 variant.
10714 ;; But adding a phase in an inherited package seems to be
10715 ;; cumbersum. So we patch even for python3.
10717 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10719 (substitute* "Makefile"
10720 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10721 (string-append nose "/bin/nosetests "))))
10725 (setenv "PYTHON" (or (which "python3") (which "python")))
10726 (setenv "PYCONFIG" (or (which "python3-config")
10727 (which "python-config")))
10728 (setenv "CC" "gcc")
10729 ;; No need to extend PYTHONPATH to find the built package, since
10730 ;; the Makefile will build anyway
10731 (invoke "make" "check"))))))
10733 `(("procps" ,procps))) ; required for tests
10735 "https://github.com/dvarrazzo/py-setproctitle")
10737 "Setproctitle implementation for Python to customize the process title")
10738 (description "The library allows a process to change its title (as displayed
10739 by system tools such as ps and top).
10741 Changing the title is mostly useful in multi-process systems, for
10742 example when a master process is forked: changing the children's title
10743 allows to identify the task each process is busy with. The technique
10744 is used by PostgreSQL and the OpenSSH Server for example.")
10745 (license license:bsd-3)
10746 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10748 (define-public python2-setproctitle
10749 (let ((base (package-with-python2
10750 (strip-python2-variant python-setproctitle))))
10753 (native-inputs `(("python2-nose" ,python2-nose)
10754 ,@(package-native-inputs base))))))
10756 (define-public python-validictory
10758 (name "python-validictory")
10763 (uri (pypi-uri "validictory" version))
10766 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10767 (build-system python-build-system)
10770 (modify-phases %standard-phases
10771 (add-after 'unpack 'bootstrap
10772 ;; Move the tests out of the package directory to avoid
10775 (rename-file "validictory/tests" "tests")
10776 (delete-file "tests/__init__.py")))
10779 ;; Extend PYTHONPATH so the built package will be found.
10780 (setenv "PYTHONPATH"
10781 (string-append (getcwd) "/build/lib:"
10782 (getenv "PYTHONPATH")))
10783 (invoke "py.test" "-vv" ))))))
10785 `(("python-pytest" ,python-pytest)))
10787 "https://github.com/jamesturk/validictory")
10788 (synopsis "General purpose Python data validator")
10789 (description "It allows validation of arbitrary Python data structures.
10791 The schema format is based on the JSON Schema
10792 proposal (http://json-schema.org), so combined with json the library is also
10793 useful as a validator for JSON data.")
10794 (license license:expat)))
10796 (define-public python2-validictory
10797 (package-with-python2 python-validictory))
10799 (define-public python-pyelftools
10801 (name "python-pyelftools")
10806 (uri (pypi-uri "pyelftools" version))
10809 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10810 (build-system python-build-system)
10813 (modify-phases %standard-phases
10814 (add-before 'check 'set-pythonpath
10816 (setenv "PYTHONPATH"
10819 ":" (getenv "PYTHONPATH")))
10822 "https://github.com/eliben/pyelftools")
10824 "Analyze binary and library file information")
10825 (description "This Python library provides interfaces for parsing and
10826 analyzing two binary and library file formats; the Executable and Linking
10827 Format (ELF), and debugging information in the Debugging With Attributed
10828 Record Format (DWARF).")
10829 (license license:public-domain)))
10831 (define-public python-pyev
10833 (name "python-pyev")
10838 (uri (pypi-uri "pyev" version))
10841 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10842 (build-system python-build-system)
10844 `(#:tests? #f ; no test suite
10846 (modify-phases %standard-phases
10847 (add-after 'unpack 'patch
10848 (lambda* (#:key inputs #:allow-other-keys)
10849 (let ((libev (string-append (assoc-ref inputs "libev")
10850 "/lib/libev.so.4")))
10851 (substitute* "setup.py"
10852 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10853 (string-append "libev_dll_name = \"" libev "\"")))))))))
10855 `(("libev" ,libev)))
10856 (home-page "http://pythonhosted.org/pyev/")
10857 (synopsis "Python libev interface")
10858 (description "Pyev provides a Python interface to libev.")
10859 (license license:gpl3)))
10861 (define-public python2-pyev
10862 (package-with-python2 python-pyev))
10864 (define-public python-imagesize
10866 (name "python-imagesize")
10871 (uri (pypi-uri "imagesize" version))
10874 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10875 (build-system python-build-system)
10876 (home-page "https://github.com/shibukawa/imagesize_py")
10877 (synopsis "Gets image size of files in various formats in Python")
10879 "This package allows determination of image size from
10880 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10881 (license license:expat)))
10883 (define-public python2-imagesize
10884 (package-with-python2 python-imagesize))
10886 (define-public python-termstyle
10888 (name "python-termstyle")
10893 (uri (pypi-uri "termstyle" version))
10896 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10897 (build-system python-build-system)
10900 (modify-phases %standard-phases
10903 (invoke "python" "test3.py"))))))
10904 (home-page "https://github.com/gfxmonk/termstyle")
10905 (synopsis "Console text coloring for Python")
10906 (description "This package provides console text coloring for Python.")
10907 (license license:bsd-3)))
10909 (define-public python-argcomplete
10911 (name "python-argcomplete")
10916 (uri (pypi-uri "argcomplete" version))
10919 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10920 (build-system python-build-system)
10922 `(("python-pexpect" ,python-pexpect)
10924 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10925 (home-page "https://github.com/kislyuk/argcomplete")
10926 (synopsis "Shell tab completion for Python argparse")
10927 (description "argcomplete provides extensible command line tab completion
10928 of arguments and options for Python scripts using @code{argparse}. It's
10929 particularly useful for programs with many options or sub-parsers that can
10930 dynamically suggest completions; for example, when browsing resources over the
10932 (license license:asl2.0)))
10934 (define-public python2-argcomplete
10935 (package-with-python2 python-argcomplete))
10937 (define-public python-xopen
10939 (name "python-xopen")
10944 (uri (pypi-uri "xopen" version))
10947 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
10948 (build-system python-build-system)
10950 `(("python-setuptools-scm" ,python-setuptools-scm)))
10951 (home-page "https://github.com/marcelm/xopen/")
10952 (synopsis "Open compressed files transparently")
10953 (description "This module provides an @code{xopen} function that works like
10954 Python's built-in @code{open} function, but can also deal with compressed files.
10955 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10956 recognized by their file extensions. The focus is on being as efficient as
10957 possible on all supported Python versions.")
10958 (license license:expat)))
10960 (define-public python2-xopen
10961 (let ((base (package-with-python2
10962 (strip-python2-variant python-xopen))))
10965 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10966 ,@(package-propagated-inputs base))))))
10968 (define-public python-cheetah
10970 (name "python-cheetah")
10975 (uri (pypi-uri "Cheetah3" version))
10978 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10979 (build-system python-build-system)
10981 `(#:modules ((guix build utils)
10982 (guix build python-build-system)
10986 #:phases (modify-phases %standard-phases
10987 (add-after 'unpack 'use-absolute-python
10989 (substitute* "Cheetah/CheetahWrapper.py"
10990 (("#!/usr/bin/env python")
10991 (string-append "#!" (which "python"))))
10995 (let ((cwd (getcwd)))
10996 (setenv "PYTHONPATH"
10999 (find (cut string-prefix? "lib" <>)
11000 (scandir (string-append cwd "/build")))
11001 ":" (getenv "PYTHONPATH")))
11003 (string-append (getenv "PATH")
11005 (setenv "TMPDIR" "/tmp")
11007 (substitute* "Cheetah/Tests/Test.py"
11008 (("unittest.TextTestRunner\\(\\)")
11009 "unittest.TextTestRunner(verbosity=2)"))
11011 (invoke "python" "Cheetah/Tests/Test.py")))))))
11013 `(("python-markdown" ,python-markdown))) ;optional
11014 (home-page "http://cheetahtemplate.org/")
11015 (synopsis "Template engine")
11016 (description "Cheetah is a text-based template engine and Python code
11019 Cheetah can be used as a standalone templating utility or referenced as
11020 a library from other Python applications. It has many potential uses,
11021 but web developers looking for a viable alternative to ASP, JSP, PHP and
11022 PSP are expected to be its principle user group.
11026 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11028 @item Cleanly separates content, graphic design, and program code.
11029 @item Blends the power and flexibility of Python with a simple template language
11030 that non-programmers can understand.
11031 @item Gives template writers full access to any Python data structure, module,
11032 function, object, or method in their templates.
11033 @item Makes code reuse easy by providing an object-orientated interface to
11034 templates that is accessible from Python code or other Cheetah templates.
11035 One template can subclass another and selectively reimplement sections of it.
11036 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11037 improve the performance of a dynamic website.
11038 @item Compiles templates into optimized, yet readable, Python code.
11040 (license (license:x11-style "file://LICENSE"))))
11042 (define-public python2-cheetah
11043 (package-with-python2 python-cheetah))
11045 (define-public python-dulwich
11047 (name "python-dulwich")
11052 (uri (list (string-append "https://www.dulwich.io/releases/"
11053 "dulwich-" version ".tar.gz")
11054 (pypi-uri "dulwich" version)))
11057 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11058 (build-system python-build-system)
11061 (modify-phases %standard-phases
11062 (add-before 'check 'fix-tests
11063 (lambda* (#:key inputs #:allow-other-keys)
11064 ;; The tests use Popen with a custom environment which doesn't
11066 (substitute* "dulwich/tests/compat/utils.py"
11067 (("'git'") (string-append "'"
11070 (substitute* '("dulwich/tests/test_repository.py"
11071 "dulwich/tests/test_hooks.py")
11072 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11073 (setenv "TEST_RUNNER" "unittest")
11074 (setenv "PYTHONHASHSEED" "random")
11077 `(("python-fastimport" ,python-fastimport)))
11079 `(("python-mock" ,python-mock)
11080 ("python-geventhttpclient" ,python-geventhttpclient)
11082 (home-page "https://www.dulwich.io/")
11083 (synopsis "Git implementation in Python")
11084 (description "Dulwich is an implementation of the Git file formats and
11085 protocols written in pure Python.")
11086 ;; Can be used with either license.
11087 (license (list license:asl2.0 license:gpl2+))))
11089 (define-public python2-dulwich
11090 (package-with-python2 python-dulwich))
11092 (define-public python-pbkdf2
11094 (name "python-pbkdf2")
11099 (uri (pypi-uri "pbkdf2" version))
11102 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11103 (build-system python-build-system)
11106 (modify-phases %standard-phases
11109 (setenv "PYTHONPATH"
11110 (string-append (getcwd) "/build/lib:"
11111 (getenv "PYTHONPATH")))
11112 (invoke "python" "test/test_pbkdf2.py"))))))
11114 `(("python-pycrypto" ,python-pycrypto))) ; optional
11115 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11116 (synopsis "Password-based key derivation")
11117 (description "This module implements the password-based key derivation
11118 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11120 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11121 is part of the RSA Public Key Cryptography Standards series. The provided
11122 implementation takes a password or a passphrase and a salt value (and
11123 optionally a iteration count, a digest module, and a MAC module) and provides
11124 a file-like object from which an arbitrarly-sized key can be read.")
11125 (license license:expat)))
11127 (define-public python2-pbkdf2
11128 (package-with-python2 python-pbkdf2))
11130 (define-public python-qrcode
11132 (name "python-qrcode")
11137 (uri (pypi-uri "qrcode" version))
11139 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11140 (build-system python-build-system)
11142 ;; FIXME: Tests require packaging 'pymaging'.
11145 `(("python-lxml" ,python-lxml) ; for SVG output
11146 ("python-pillow" ,python-pillow) ; for PNG output
11147 ("python-six" ,python-six)))
11148 (home-page "https://github.com/lincolnloop/python-qrcode")
11149 (synopsis "QR Code image generator")
11150 (description "This package provides a pure Python QR Code generator
11151 module. It uses the Python Imaging Library (PIL) to allow for the generation
11154 In addition this package provides a command line tool to generate QR codes and
11155 either write these QR codes to a file or do the output as ascii art at the
11157 (license license:bsd-3)))
11159 (define-public python2-qrcode
11160 (package-with-python2 python-qrcode))
11162 (define-public python-rst2ansi
11164 (name "python-rst2ansi")
11169 (uri (pypi-uri "rst2ansi" version))
11172 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11173 (build-system python-build-system)
11175 `(("python-docutils" ,python-docutils)))
11176 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11177 (synopsis "Convert RST to ANSI-decorated console output")
11179 "Python module dedicated to rendering RST (reStructuredText) documents
11180 to ansi-escaped strings suitable for display in a terminal.")
11181 (license license:expat)))
11183 (define-public python-ansi2html
11185 (name "python-ansi2html")
11190 (uri (pypi-uri "ansi2html" version))
11193 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11194 (build-system python-build-system)
11196 `(("python-mock" ,python-mock)
11197 ("python-nose" ,python-nose)))
11199 `(("python-six" ,python-six)))
11200 (home-page "https://github.com/ralphbean/ansi2html")
11201 (synopsis "Convert ANSI-decorated console output to HTML")
11203 "@command{ansi2html} is a Python library and command line utility for
11204 convering text with ANSI color codes to HTML or LaTeX.")
11205 (license license:gpl3+)))
11207 (define-public python2-ansi2html
11208 (package-with-python2 python-ansi2html))
11210 (define-public python-ddt
11212 (name "python-ddt")
11217 (uri (pypi-uri "ddt" version))
11220 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11221 (build-system python-build-system)
11223 `(("python-mock" ,python-mock)
11224 ("python-nose" ,python-nose)))
11226 `(("python-six" ,python-six)
11227 ("python-pyyaml" ,python-pyyaml)))
11228 (home-page "https://github.com/txels/ddt")
11229 (synopsis "Data-Driven Tests")
11231 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11232 running it with different test data, and make it appear as multiple test
11234 (license license:expat)))
11236 (define-public python2-ddt
11237 (package-with-python2 python-ddt))
11239 (define-public python-pycountry
11241 (name "python-pycountry")
11242 (version "18.5.26")
11246 (uri (pypi-uri "pycountry" version))
11249 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11250 (build-system python-build-system)
11251 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11252 (synopsis "ISO databases for languages, countries, currencies, etc.")
11254 "@code{pycountry} provides the ISO databases for the standards:
11256 @item 639-3 (Languages)
11257 @item 3166 (Countries)
11258 @item 3166-3 (Deleted Countries)
11259 @item 3166-2 (Subdivisions of countries)
11260 @item 4217 (Currencies)
11261 @item 15924 (Scripts)
11263 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11264 through a Python API.")
11265 (license license:lgpl2.1+)))
11267 (define-public python2-pycountry
11268 (package-with-python2 python-pycountry))
11270 (define-public python-pycosat
11272 (name "python-pycosat")
11277 (uri (pypi-uri "pycosat" version))
11280 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11281 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11282 (build-system python-build-system)
11283 (home-page "https://github.com/ContinuumIO/pycosat")
11284 (synopsis "Bindings to picosat (a SAT solver)")
11286 "This package provides efficient Python bindings to @code{picosat} on
11287 the C level. When importing pycosat, the @code{picosat} solver becomes part
11288 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11289 Problem} (SAT) solver.")
11290 (license license:expat)))
11292 (define-public python2-pycosat
11293 (package-with-python2 python-pycosat))
11295 (define-public python2-ruamel.ordereddict
11297 (name "python2-ruamel.ordereddict")
11302 (uri (pypi-uri "ruamel.ordereddict" version))
11305 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11306 (build-system python-build-system)
11308 `(#:python ,python-2
11310 (modify-phases %standard-phases
11312 (add-after 'install 'check
11313 (lambda* (#:key inputs outputs #:allow-other-keys)
11314 (add-installed-pythonpath inputs outputs)
11315 (invoke "python" "test/testordereddict.py"))))))
11316 (home-page "https://bitbucket.org/ruamel/ordereddict")
11317 (synopsis "Version of dict that keeps keys in insertion order")
11319 "This is an implementation of an ordered dictionary with @dfn{Key
11320 Insertion Order} (KIO: updates of values do not affect the position of the
11321 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11322 removed and put at the back). The standard library module @code{OrderedDict},
11323 implemented later, implements a subset of @code{ordereddict} functionality.
11324 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11325 Order} (KSO, no sorting function can be specified, but a transform can be
11326 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11327 (license license:expat)))
11329 (define-public python-pypeg2
11331 (name "python-pypeg2")
11336 (uri (pypi-uri "pyPEG2" version))
11339 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11340 (build-system python-build-system)
11341 (propagated-inputs `(("python-lxml" ,python-lxml)))
11343 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11345 (home-page "https://fdik.org/pyPEG/")
11346 (synopsis "Parsering Expression Grammars in Python")
11347 (description "PyPEG is an intrinsic parser interpreter framework for
11348 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11349 parse many formal languages.")
11350 (license license:gpl2)))
11352 (define-public python-incremental
11354 (name "python-incremental")
11359 (uri (pypi-uri "incremental" version))
11362 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11363 (build-system python-build-system)
11364 (home-page "https://github.com/hawkowl/incremental")
11365 (synopsis "Library for versioning Python projects")
11366 (description "Incremental is a small library that versions your Python
11368 (license license:expat)))
11370 (define-public python2-incremental
11371 (package-with-python2 python-incremental))
11373 (define-public python-invoke
11375 (name "python-invoke")
11376 (home-page "http://www.pyinvoke.org/")
11380 (uri (pypi-uri "invoke" version))
11383 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11384 (build-system python-build-system)
11386 ;; XXX: Requires many dependencies that are not yet in Guix.
11388 (synopsis "Pythonic task execution")
11390 "Invoke is a Python task execution tool and library, drawing inspiration
11391 from various sources to arrive at a powerful and clean feature set. It is
11392 evolved from the Fabric project, but focuses on local and abstract concerns
11393 instead of servers and network commands.")
11394 (license license:bsd-3)))
11396 (define-public python2-invoke
11397 (package-with-python2 python-invoke))
11399 (define-public python-automat
11401 (name "python-automat")
11405 (uri (pypi-uri "Automat" version))
11408 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11409 (build-system python-build-system)
11410 ;; We disable the tests because they require python-twisted, while
11411 ;; python-twisted depends on python-automat. Twisted is optional, but the
11412 ;; tests fail if it is not available. Also see
11413 ;; <https://github.com/glyph/automat/issues/71>.
11414 (arguments '(#:tests? #f))
11416 `(("python-m2r" ,python-m2r)
11417 ("python-setuptools-scm" ,python-setuptools-scm)
11418 ("python-graphviz" ,python-graphviz)))
11420 `(("python-six" ,python-six)
11421 ("python-attrs" ,python-attrs)))
11422 (home-page "https://github.com/glyph/Automat")
11423 (synopsis "Self-service finite-state machines")
11424 (description "Automat is a library for concise, idiomatic Python
11425 expression of finite-state automata (particularly deterministic finite-state
11427 (license license:expat)))
11429 (define-public python2-automat
11430 (package-with-python2 python-automat))
11432 (define-public python-m2r
11434 (name "python-m2r")
11438 (uri (pypi-uri "m2r" version))
11441 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11442 (build-system python-build-system)
11444 `(("python-docutils" ,python-docutils)
11445 ("python-mistune" ,python-mistune)))
11447 `(("python-pygments" ,python-pygments)
11448 ("python-mock" ,python-mock)))
11449 (home-page "https://github.com/miyakogi/m2r")
11450 (synopsis "Markdown to reStructuredText converter")
11451 (description "M2R converts a markdown file including reST markups to valid
11453 (license license:expat)))
11455 (define-public python2-m2r
11456 (package-with-python2 python-m2r))
11458 (define-public python-constantly
11460 (name "python-constantly")
11464 (uri (pypi-uri "constantly" version))
11467 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11468 (build-system python-build-system)
11469 (home-page "https://github.com/twisted/constantly")
11470 (synopsis "Symbolic constants in Python")
11471 (description "Constantly is a Python library that provides symbolic
11472 constant support. It includes collections and constants with text, numeric,
11473 and bit flag values.")
11474 (license license:expat)))
11476 (define-public python2-constantly
11477 (package-with-python2 python-constantly))
11479 (define-public python-attrs
11481 (name "python-attrs")
11485 (uri (pypi-uri "attrs" version))
11488 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11489 (build-system python-build-system)
11491 `(#:modules ((guix build utils)
11492 (guix build python-build-system)
11496 #:phases (modify-phases %standard-phases
11499 (let ((cwd (getcwd)))
11500 (setenv "PYTHONPATH"
11503 (find (cut string-prefix? "lib" <>)
11504 (scandir (string-append cwd "/build")))
11506 (getenv "PYTHONPATH")))
11507 (invoke "python" "-m" "pytest")))))))
11509 `(("python-coverage" ,python-coverage)
11510 ("python-hypothesis" ,python-hypothesis)
11511 ("python-pympler" ,python-pympler)
11512 ("python-pytest" ,python-pytest)
11513 ("python-six" ,python-six)
11514 ("python-sphinx" ,python-sphinx)
11515 ("python-zope-interface" ,python-zope-interface)))
11516 (home-page "https://github.com/python-attrs/attrs/")
11517 (synopsis "Attributes without boilerplate")
11518 (description "@code{attrs} is a Python package with class decorators that
11519 ease the chores of implementing the most common attribute-related object
11521 (license license:expat)))
11523 (define-public python2-attrs
11524 (package-with-python2 python-attrs))
11526 (define-public python-attrs-bootstrap
11528 (inherit python-attrs)
11529 (name "python-attrs-bootstrap")
11530 ;; Keep this on a fixed version so python-attrs can be updated without
11531 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11535 (uri (pypi-uri "attrs" version))
11538 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11539 (native-inputs `())
11540 (arguments `(#:tests? #f))))
11542 (define-public python2-attrs-bootstrap
11543 (package-with-python2 python-attrs-bootstrap))
11545 (define-public python2-cliapp
11547 (name "python2-cliapp")
11548 (version "1.20180812.1")
11552 (uri (string-append
11553 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11554 version ".tar.gz"))
11557 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11558 (build-system python-build-system)
11560 `(#:python ,python-2
11562 (modify-phases %standard-phases
11563 ;; check phase needs to be run before the build phase. If not,
11564 ;; coverage-test-runner looks for tests for the built source files,
11567 (add-before 'build 'check
11569 ;; Disable python3 tests
11570 (substitute* "check"
11571 (("python3") "# python3"))
11572 (invoke "./check"))))))
11574 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11575 ("python2-pep8" ,python2-pep8)))
11577 `(("python2-pyaml" ,python2-pyaml)))
11578 (home-page "https://liw.fi/cliapp/")
11579 (synopsis "Python framework for command line programs")
11580 (description "@code{python2-cliapp} is a python framework for
11581 command line programs. It contains the typical stuff such programs
11582 need to do, such as parsing the command line for options, and
11583 iterating over input files.")
11584 (license license:gpl2+)))
11586 (define-public python2-ttystatus
11588 (name "python2-ttystatus")
11593 (uri (string-append
11594 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11595 version ".tar.gz"))
11598 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11599 (build-system python-build-system)
11601 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11602 ("python2-pep8" ,python2-pep8)))
11604 `(#:python ,python-2
11606 (modify-phases %standard-phases
11607 ;; check phase needs to be run before the build phase. If not,
11608 ;; coverage-test-runner looks for tests for the built source files,
11611 (add-before 'build 'check
11612 (lambda _ (invoke "make" "check"))))))
11613 (home-page "https://liw.fi/ttystatus/")
11614 (synopsis "Python library for showing progress reporting and
11615 status updates on terminals")
11616 (description "@code{python2-ttystatus} is a python library for
11617 showing progress reporting and status updates on terminals, for
11618 command line programs. Output is automatically adapted to the width
11619 of the terminal: truncated if it does not fit, and resized if the
11620 terminal size changes.")
11621 (license license:gpl3+)))
11623 (define-public python2-tracing
11625 (name "python2-tracing")
11630 (uri (string-append
11631 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11632 version ".tar.gz"))
11635 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11636 (build-system python-build-system)
11638 `(#:python ,python-2))
11639 (home-page "https://liw.fi/tracing/")
11640 (synopsis "Python debug logging helper")
11641 (description "@code{python2-tracing} is a python library for
11642 logging debug messages. It provides a way to turn debugging messages
11643 on and off, based on the filename they occur in. It is much faster
11644 than using @code{logging.Filter} to accomplish the same thing, which
11645 matters when code is run in production mode. The actual logging still
11646 happens using the @code{logging} library.")
11647 (license license:gpl3+)))
11649 (define-public python2-larch
11651 (name "python2-larch")
11652 (version "1.20151025")
11656 (uri (string-append
11657 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11658 version ".tar.gz"))
11659 (patches (search-patches
11660 "python2-larch-coverage-4.0a6-compatibility.patch"))
11663 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11664 (build-system python-build-system)
11666 `(#:python ,python-2
11668 (modify-phases %standard-phases
11669 ;; check phase needs to be run before the build phase. If not,
11670 ;; coverage-test-runner looks for tests for the built source files,
11673 (add-before 'build 'check
11674 (lambda _ (invoke "make" "check"))))))
11676 `(("cmdtest" ,cmdtest)
11677 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11679 `(("python2-tracing" ,python2-tracing)))
11680 (home-page "https://liw.fi/larch/")
11681 (synopsis "Python copy-on-write B-tree library")
11682 (description "@code{python2-larch} is an implementation of
11683 particular kind of B-tree, based on research by Ohad Rodeh. See
11684 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11685 on the data structure.
11687 The distinctive feature of this B-tree is that a node is never
11688 (conceptually) modified. Instead, all updates are done by
11689 copy-on-write. This makes it easy to clone a tree, and modify only the
11690 clone, while other processes access the original tree.")
11691 (license license:gpl3+)))
11693 (define-public python-astroid
11695 (name "python-astroid")
11700 (uri (pypi-uri "astroid" version))
11703 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11704 (build-system python-build-system)
11706 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11707 ("python-six" ,python-six)
11708 ("python-wrapt" ,python-wrapt)))
11710 `(("python-dateutil" ,python-dateutil)
11711 ("python-nose" ,python-nose)
11712 ("python-pytest" ,python-pytest)
11713 ("python-pytest-runner" ,python-pytest-runner)))
11716 (modify-phases %standard-phases
11717 (add-after 'unpack 'remove-spurious-test
11719 ;; This can be removed after upgrading from python-3.7
11720 ;; https://github.com/PyCQA/astroid/issues/593
11721 ;; https://bugs.python.org/issue34056
11722 (delete-file "astroid/tests/unittest_modutils.py")
11726 (invoke "pytest" "astroid"))))))
11727 (home-page "https://github.com/PyCQA/astroid")
11728 (synopsis "Common base representation of python source code for pylint and
11730 (description "@code{python-astroid} provides a common base representation
11731 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11733 It provides a compatible representation which comes from the _ast module. It
11734 rebuilds the tree generated by the builtin _ast module by recursively walking
11735 down the AST and building an extended ast. The new node classes have
11736 additional methods and attributes for different usages. They include some
11737 support for static inference and local name scopes. Furthermore, astroid
11738 builds partial trees by inspecting living objects.")
11739 (license license:lgpl2.1+)
11740 (properties `((python2-variant . ,(delay python2-astroid))))))
11742 (define-public python2-astroid
11743 (let ((base (package-with-python2
11744 (strip-python2-variant python-astroid))))
11745 (package (inherit base)
11746 ;; Version 2.x removes python2 support.
11751 (uri (pypi-uri "astroid" version))
11754 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11756 (substitute-keyword-arguments (package-arguments base)
11758 `(modify-phases ,phases
11759 (add-after 'unpack 'remove-spurious-test
11761 ;; https://github.com/PyCQA/astroid/issues/276
11762 (delete-file "astroid/tests/unittest_brain.py")
11766 (invoke"python" "-m" "unittest" "discover"
11767 "-p" "unittest*.py")))))))
11768 (native-inputs `())
11770 `(("python2-backports-functools-lru-cache"
11771 ,python2-backports-functools-lru-cache)
11772 ("python2-enum34" ,python2-enum34)
11773 ("python2-singledispatch" ,python2-singledispatch)
11774 ,@(package-propagated-inputs base))))))
11776 (define-public python-isort
11778 (name "python-isort")
11783 (uri (git-reference
11784 ;; Tests pass only from the Github sources
11785 (url "https://github.com/timothycrosley/isort")
11787 (file-name (git-file-name name version))
11790 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11791 (build-system python-build-system)
11793 `(("python-mock" ,python-mock)
11794 ("python-pytest" ,python-pytest)))
11795 (home-page "https://github.com/timothycrosley/isort")
11796 (synopsis "Python utility/library to sort python imports")
11797 (description "@code{python-isort} is a python utility/library to sort
11798 imports alphabetically, and automatically separated into sections. It
11799 provides a command line utility, a python library and plugins for various
11801 (license license:expat)
11802 (properties `((python2-variant . ,(delay python2-isort))))))
11804 (define-public python2-isort
11805 (let ((base (package-with-python2
11806 (strip-python2-variant python-isort))))
11807 (package (inherit base)
11809 `(("python2-futures" ,python2-futures)
11810 ,@(package-native-inputs base))))))
11812 (define-public python2-backports-functools-lru-cache
11814 (name "python2-backports-functools-lru-cache")
11819 ;; only the pypi tarballs contain the necessary metadata
11820 (uri (pypi-uri "backports.functools_lru_cache" version))
11823 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11824 (build-system python-build-system)
11826 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11828 `(#:python ,python-2))
11829 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11830 (synopsis "Backport of functools.lru_cache from Python 3.3")
11831 (description "@code{python2-backports-functools-lru-cache} is a backport
11832 of @code{functools.lru_cache} from python 3.3.")
11833 (license license:expat)))
11835 (define-public python-configparser
11837 (name "python-configparser")
11842 (uri (string-append
11843 "https://bitbucket.org/ambv/configparser/get/"
11844 version ".tar.bz2"))
11845 (file-name (string-append name "-" version ".tar.gz"))
11848 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11849 (build-system python-build-system)
11850 (home-page "https://github.com/jaraco/configparser/")
11851 (synopsis "Backport of configparser from python 3.5")
11852 (description "@code{python-configparser} is a backport of
11853 @code{configparser} from Python 3.5 so that it can be used directly
11854 in other versions.")
11855 (license license:expat)))
11857 (define-public python2-configparser
11858 (package-with-python2 python-configparser))
11860 (define-public python-mando
11862 (name "python-mando")
11866 (uri (pypi-uri "mando" version))
11869 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11870 (build-system python-build-system)
11872 `(("python-rst2ansi" ,python-rst2ansi)
11873 ("python-six" ,python-six)))
11875 `(("python-pytest" ,python-pytest)))
11876 (home-page "https://mando.readthedocs.org/")
11878 "Wrapper around argparse, allowing creation of complete CLI applications")
11880 "This package is a wrapper around argparse, allowing you to write complete CLI
11881 applications in seconds while maintaining all the flexibility.")
11882 (license license:expat)))
11884 (define-public python2-mando
11885 (package-with-python2 python-mando))
11887 (define-public python2-argparse
11889 (name "python2-argparse")
11894 (uri (pypi-uri "argparse" version))
11897 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11898 (build-system python-build-system)
11900 `(#:python ,python-2))
11901 (home-page "https://github.com/ThomasWaldmann/argparse/")
11902 (synopsis "Python command-line parsing library")
11904 "This package is mostly for people who want to have @code{argparse} on
11905 older Pythons because it was not part of the standard library back then.")
11906 (license license:psfl)))
11908 (define-public python-fudge
11910 (name "python-fudge")
11911 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11912 ;; package, which is currently the only use of this package.
11917 (uri (pypi-uri "fudge" version))
11920 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11921 (build-system python-build-system)
11923 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11924 (home-page "https://github.com/fudge-py/fudge")
11925 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11927 "Fudge is a Python module for using fake objects (mocks and stubs) to
11930 In readable Python code, you declare the methods available on your fake object
11931 and how they should be called. Then you inject that into your application and
11932 start testing. This declarative approach means you don’t have to record and
11933 playback actions and you don’t have to inspect your fakes after running code.
11934 If the fake object was used incorrectly then you’ll see an informative
11935 exception message with a traceback that points to the culprit.")
11936 (license license:expat)))
11938 (define-public python2-fudge
11939 (package-with-python2 python-fudge))
11941 (define-public python-mwclient
11943 (name "python-mwclient")
11948 ;; The PyPI version wouldn't contain tests.
11949 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11950 "v" version ".tar.gz"))
11951 (file-name (string-append name "-" version ".tar.gz"))
11954 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11955 (build-system python-build-system)
11957 `(("python-requests" ,python-requests)
11958 ("python-requests-oauthlib"
11959 ,python-requests-oauthlib)
11960 ("python-six" ,python-six)))
11962 `(("python-mock" ,python-mock)
11963 ("python-pytest" ,python-pytest)
11964 ("python-pytest-pep8" ,python-pytest-pep8)
11965 ("python-pytest-cache" ,python-pytest-cache)
11966 ("python-pytest-cov" ,python-pytest-cov)
11967 ("python-responses" ,python-responses)))
11968 (home-page "https://github.com/btongminh/mwclient")
11969 (synopsis "MediaWiki API client")
11970 (description "This package provides a MediaWiki API client.")
11971 (license license:expat)))
11973 (define-public python2-mwclient
11974 (package-with-python2 python-mwclient))
11976 (define-public python-utils
11978 (name "python-utils")
11982 (uri (pypi-uri "python-utils" version))
11985 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11986 (build-system python-build-system)
11988 `(("pytest-runner" ,python-pytest-runner)
11989 ("pytest" ,python-pytest)
11990 ("six" ,python-six)))
11991 (home-page "https://github.com/WoLpH/python-utils")
11992 (synopsis "Convenient utilities not included with the standard Python install")
11994 "Python Utils is a collection of small Python functions and classes which
11995 make common patterns shorter and easier.")
11996 (license license:bsd-2)))
11998 (define-public python2-utils
11999 (package-with-python2 python-utils))
12001 (define-public python-diff-match-patch
12003 (name "python-diff-match-patch")
12004 (version "20121119")
12008 (uri (pypi-uri "diff-match-patch" version))
12011 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12012 (build-system python-build-system)
12013 (home-page "https://code.google.com/p/google-diff-match-patch")
12014 (synopsis "Synchronize plain text")
12015 (description "Diff Match and Patch libraries offer robust algorithms to
12016 perform the operations required for synchronizing plain text.")
12017 (license license:asl2.0)))
12019 (define-public python2-diff-match-patch
12020 (package-with-python2 python-diff-match-patch))
12022 (define-public python-dirsync
12024 (name "python-dirsync")
12029 (uri (pypi-uri "dirsync" version))
12032 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12033 (build-system python-build-system)
12035 `(("six" ,python-six)))
12036 (home-page "https://bitbucket.org/tkhyn/dirsync")
12037 (synopsis "Advanced directory tree synchronisation tool")
12038 (description "Advanced directory tree synchronisation tool.")
12039 (license license:expat)))
12041 (define-public python2-dirsync
12042 (package-with-python2 python-dirsync))
12044 (define-public python-levenshtein
12046 (name "python-levenshtein")
12051 (uri (pypi-uri "python-Levenshtein" version))
12054 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12055 (build-system python-build-system)
12056 (home-page "https://github.com/ztane/python-Levenshtein")
12057 (synopsis "Fast computation of Levenshtein distance and string similarity")
12059 "The Levenshtein Python C extension module contains functions for fast computation of
12061 @item Levenshtein (edit) distance, and edit operations
12062 @item string similarity
12063 @item approximate median strings, and generally string averaging
12064 @item string sequence and set similarity
12066 It supports both normal and Unicode strings.")
12067 (license license:gpl2+)))
12069 (define-public python2-levenshtein
12070 (package-with-python2 python-levenshtein))
12072 (define-public python-scandir
12074 (name "python-scandir")
12079 (uri (pypi-uri "scandir" version))
12081 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12082 (build-system python-build-system)
12084 `(#:phases (modify-phases %standard-phases
12087 (invoke "python" "test/run_tests.py"))))))
12088 (home-page "https://github.com/benhoyt/scandir")
12089 (synopsis "Directory iteration function")
12091 "Directory iteration function like os.listdir(), except that instead of
12092 returning a list of bare filenames, it yields DirEntry objects that include
12093 file type and stat information along with the name. Using scandir() increases
12094 the speed of os.walk() by 2-20 times (depending on the platform and file
12095 system) by avoiding unnecessary calls to os.stat() in most cases.
12097 This package is part of the Python standard library since version 3.5.")
12098 (license license:bsd-3)))
12100 (define-public python2-scandir
12101 (package-with-python2 python-scandir))
12103 (define-public python2-stemming
12105 (name "python2-stemming")
12110 (uri (pypi-uri "stemming" version))
12112 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12113 (build-system python-build-system)
12115 `(#:python ,python-2))
12116 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12117 (synopsis "Python implementations of various stemming algorithms")
12119 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12120 stemming algorithms for English. These implementations are straightforward and
12121 efficient, unlike some Python versions of the same algorithms available on the
12122 Web. This package is an extraction of the stemming code included in the Whoosh
12124 (license license:public-domain)))
12126 (define-public python-factory-boy
12128 (name "python-factory-boy")
12133 (uri (pypi-uri "factory_boy" version))
12135 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12136 (build-system python-build-system)
12138 ;; Tests are not included in the tarball.
12141 `(("faker" ,python-faker)))
12142 (home-page "https://github.com/benhoyt/scandir")
12143 (synopsis "Versatile test fixtures replacement")
12145 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12147 As a fixtures replacement tool, it aims to replace static, hard to maintain
12148 fixtures with easy-to-use factories for complex object.
12150 Instead of building an exhaustive test setup with every possible combination
12151 of corner cases, factory_boy allows you to use objects customized for the
12152 current test, while only declaring the test-specific fields")
12153 (license license:expat)))
12155 (define-public python2-factory-boy
12156 (package-with-python2 python-factory-boy))
12158 (define-public python-translate-toolkit
12160 (name "python-translate-toolkit")
12165 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12167 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12168 (build-system python-build-system)
12170 `(("python-pytest" ,python-pytest)
12171 ("python-sphinx" ,python-sphinx)))
12173 `(("python-babel" ,python-babel)
12174 ("python-beautifulsoup4" ,python-beautifulsoup4)
12175 ("python-chardet" ,python-chardet)
12176 ("python-diff-match-patch" ,python-diff-match-patch)
12177 ("python-levenshtein" ,python-levenshtein)
12178 ("python-lxml" ,python-lxml)
12179 ("python-six" ,python-six)
12180 ("python-vobject" ,python-vobject)
12181 ("python-pyyaml" ,python-pyyaml)))
12183 ;; TODO: tests are not run, because they end with
12184 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12186 ;; during test setup.
12188 (home-page "http://toolkit.translatehouse.org")
12189 (synopsis "Tools and API for translation and localization engineering")
12191 "Tools and API for translation and localization engineering. It contains
12192 several utilities, as well as an API for building localization tools.")
12193 (license license:gpl2+)))
12195 (define-public python2-translate-toolkit
12196 (package-with-python2 python-translate-toolkit))
12198 (define-public python-packaging
12200 (name "python-packaging")
12205 (uri (pypi-uri "packaging" version))
12208 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12209 (build-system python-build-system)
12211 `(#:phases (modify-phases %standard-phases
12213 (lambda _ (invoke "py.test" "-vv"))))))
12215 `(("python-pretend" ,python-pretend)
12216 ("python-pytest" ,python-pytest)))
12218 `(("python-pyparsing" ,python-pyparsing)
12219 ("python-six" ,python-six)))
12220 (home-page "https://github.com/pypa/packaging")
12221 (synopsis "Core utilities for Python packages")
12222 (description "Packaging is a Python module for dealing with Python packages.
12223 It offers an interface for working with package versions, names, and dependency
12225 ;; From 'LICENSE': This software is made available under the terms of
12226 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12227 ;; Contributions to this software is made under the terms of *both* these
12229 (license (list license:asl2.0 license:bsd-2))))
12231 (define-public python2-packaging
12232 (package-with-python2 python-packaging))
12234 (define-public python-relatorio
12236 (name "python-relatorio")
12241 (uri (pypi-uri "relatorio" version))
12244 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12245 (build-system python-build-system)
12247 `(("python-lxml" ,python-lxml)
12248 ("python-genshi" ,python-genshi)))
12250 `(("python-magic" ,python-magic)))
12251 (home-page "https://relatorio.tryton.org/")
12252 (synopsis "Templating library able to output ODT and PDF files")
12253 (description "Relatorio is a templating library which provides a way to
12254 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12255 for more filetypes can be easily added by creating plugins for them.")
12256 (license license:gpl3+)))
12258 (define-public python2-relatorio
12259 (package-with-python2 python-relatorio))
12261 (define-public python-radon
12263 (name "python-radon")
12268 (uri (pypi-uri "radon" version))
12271 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12272 (build-system python-build-system)
12274 `(#:phases (modify-phases %standard-phases
12277 (invoke "python" "radon/tests/run.py"))))))
12279 `(("python-colorama" ,python-colorama)
12280 ("python-flake8-polyfill" ,python-flake8-polyfill)
12281 ("python-mando" ,python-mando)))
12283 `(("python-pytest" ,python-pytest)
12284 ("python-pytest-mock" ,python-pytest-mock)))
12285 (home-page "https://radon.readthedocs.org/")
12286 (synopsis "Code Metrics in Python")
12287 (description "Radon is a Python tool which computes various code metrics.
12288 Supported metrics are:
12290 @item raw metrics: SLOC, comment lines, blank lines, &c.
12291 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12292 @item Halstead metrics (all of them)
12293 @item the Maintainability Index (a Visual Studio metric)
12295 (license license:expat)))
12297 (define-public python2-radon
12298 (package-with-python2 python-radon))
12300 (define-public python-sure
12302 (name "python-sure")
12307 (uri (pypi-uri "sure" version))
12310 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12311 (build-system python-build-system)
12313 `(("python-mock" ,python-mock)
12314 ("python-six" ,python-six)))
12316 `(("python-nose" ,python-nose)))
12317 (home-page "https://github.com/gabrielfalcao/sure")
12318 (synopsis "Automated testing library in python for python")
12320 "Sure is a python library that leverages a DSL for writing assertions.
12321 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12322 (license license:gpl3+)))
12324 (define-public python2-sure
12325 (package-with-python2 python-sure))
12327 (define-public python2-couleur
12328 ;; This package does not seem to support python3 at all, hence,
12329 ;; only the python2 variant definition is provided.
12331 (name "python2-couleur")
12336 (uri (pypi-uri "couleur" version))
12339 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12340 (build-system python-build-system)
12342 `(#:python ,python-2))
12343 (home-page "https://github.com/gabrielfalcao/couleur")
12345 "ANSI terminal tool for python, colored shell and other handy fancy features")
12347 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12348 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12349 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12350 ;; https://github.com/gabrielfalcao/couleur/issues/11
12351 (license license:lgpl3+)))
12353 (define-public python-misaka
12355 (name "python-misaka")
12360 (uri (pypi-uri "misaka" version))
12363 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12364 (build-system python-build-system)
12366 `(;; Line 37 of setup.py calls self.run_command('develop')
12367 ;; in the 'check' phase. This command seems to be trying
12369 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12370 ;; for which it does not have the permission to write.
12373 `(("python-cffi" ,python-cffi)))
12374 (home-page "https://github.com/FSX/misaka")
12375 (synopsis "Python binding for Hoedown")
12377 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12378 library written in C. It features a fast HTML renderer and functionality to make custom
12379 renderers (e.g. man pages or LaTeX).")
12380 (license license:expat)))
12382 (define-public python2-misaka
12383 (package-with-python2 python-misaka))
12385 (define-public python2-steadymark
12386 ;; This is forced into being a python2 only variant
12387 ;; due to its dependence on couleur that has no support
12390 (name "python2-steadymark")
12395 (uri (pypi-uri "steadymark" version))
12398 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12399 (build-system python-build-system)
12401 `(("python-couleur" ,python2-couleur)
12402 ("python-sure" ,python2-sure)
12403 ("python-misaka" ,python2-misaka)))
12405 `(#:python ,python-2
12407 (modify-phases %standard-phases
12408 (add-before 'build 'patch-setup-py
12410 ;; Update requirements from dependency==version
12411 ;; to dependency>=version
12412 (substitute* "setup.py"
12415 (home-page "https://github.com/gabrielfalcao/steadymark")
12416 (synopsis "Markdown-based test runner for python")
12418 "@code{Steadymark} allows documentation to be written in github-flavoured
12419 markdown. The documentation may contain snippets of code surrounded by python
12420 code blocks and @code{Steadymark} will find these snippets and run them, making
12421 sure that there are no old malfunctional examples in the documentation examples.")
12422 (license license:expat)))
12424 (define-public python-jsonpointer
12426 (name "python-jsonpointer")
12431 (uri (pypi-uri "jsonpointer" version))
12434 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12435 (build-system python-build-system)
12436 (home-page "https://github.com/stefankoegl/python-json-pointer")
12437 (synopsis "Identify specific nodes in a JSON document")
12438 (description "@code{jsonpointer} allows you to access specific nodes
12439 by path in a JSON document (see RFC 6901).")
12440 (license license:bsd-3)))
12442 (define-public python2-jsonpointer
12443 (package-with-python2 python-jsonpointer))
12445 (define-public python-jsonpatch
12447 (name "python-jsonpatch")
12452 ;; pypi version lacks tests.js
12453 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12454 "archive/v" version ".tar.gz"))
12455 (file-name (string-append name "-" version ".tar.gz"))
12458 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12459 (build-system python-build-system)
12461 `(("python-jsonpointer" ,python-jsonpointer)))
12462 (home-page "https://github.com/stefankoegl/python-json-patch")
12463 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12464 (description "@code{jsonpatch} is a library and program that allows
12465 applying JSON Patches according to RFC 6902.")
12466 (license license:bsd-3)))
12468 (define-public python2-jsonpatch
12469 (package-with-python2 python-jsonpatch))
12471 (define-public python-jsonpatch-0.4
12472 (package (inherit python-jsonpatch)
12473 (name "python-jsonpatch")
12478 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12479 "archive/v" version ".tar.gz"))
12480 (file-name (string-append name "-" version ".tar.gz"))
12483 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12485 (define-public python2-jsonpatch-0.4
12486 (package-with-python2 python-jsonpatch-0.4))
12488 (define-public python-rfc3986
12490 (name "python-rfc3986")
12494 (uri (pypi-uri "rfc3986" version))
12497 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12498 (build-system python-build-system)
12500 `(#:modules ((guix build utils)
12501 (guix build python-build-system)
12506 (modify-phases %standard-phases
12509 (let ((cwd (getcwd)))
12510 (setenv "PYTHONPATH"
12511 (string-append cwd "/build/"
12512 (find (cut string-prefix? "lib" <>)
12513 (scandir (string-append cwd "/build")))
12515 (getenv "PYTHONPATH")))
12516 (invoke "pytest" "-v")))))))
12518 `(("python-pytest" ,python-pytest)))
12519 (home-page "https://rfc3986.readthedocs.io/")
12520 (synopsis "Parse and validate URI references")
12522 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12523 validation and authority parsing. This module also supports RFC@tie{}6874
12524 which adds support for zone identifiers to IPv6 addresses.")
12525 (license license:asl2.0)))
12527 (define-public python2-rfc3986
12528 (package-with-python2 python-rfc3986))
12530 (define-public python-rfc3987
12532 (name "python-rfc3987")
12537 (uri (pypi-uri "rfc3987" version))
12540 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12541 (build-system python-build-system)
12542 (home-page "https://pypi.python.org/pypi/rfc3987")
12543 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12544 (description "@code{rfc3987} provides routines for parsing and
12545 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12546 (license license:gpl3+)))
12548 (define-public python2-rfc3987
12549 (package-with-python2 python-rfc3987))
12551 (define-public python-validate-email
12553 (name "python-validate-email")
12558 (uri (pypi-uri "validate_email" version))
12561 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12562 (build-system python-build-system)
12563 (home-page "https://github.com/syrusakbary/validate_email")
12564 (synopsis "Verifies if an email address is valid and really exists")
12565 (description "@code{validate_email} can be used to verify if an email
12566 address is valid and really exists.")
12567 (license license:lgpl3+)))
12569 (define-public python2-validate-email
12570 (package-with-python2 python-validate-email))
12572 (define-public python-flex
12574 (name "python-flex")
12579 (uri (pypi-uri "flex" version))
12582 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12583 (build-system python-build-system)
12585 `(("python-click" ,python-click)
12586 ("python-iso8601" ,python-iso8601)
12587 ("python-jsonpointer" ,python-jsonpointer)
12588 ("python-pyyaml" ,python-pyyaml)
12589 ("python-requests" ,python-requests)
12590 ("python-rfc3987" ,python-rfc3987)
12591 ("python-six" ,python-six)
12592 ("python-validate-email" ,python-validate-email)))
12593 (home-page "https://github.com/pipermerriam/flex")
12594 (synopsis "Validates Swagger schemata")
12595 (description "@code{flex} can be used to validate Swagger schemata.")
12596 (license license:bsd-3)))
12598 (define-public python2-flex
12599 (package-with-python2 python-flex))
12601 (define-public python-marshmallow
12603 (name "python-marshmallow")
12604 (version "3.0.0b14")
12608 (uri (pypi-uri "marshmallow" version))
12611 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12612 (build-system python-build-system)
12614 `(("python-dateutil" ,python-dateutil)
12615 ("python-simplejson" ,python-simplejson)))
12617 `(("python-pytest" ,python-pytest)
12618 ("python-pytz" ,python-pytz)))
12619 (home-page "https://github.com/marshmallow-code/marshmallow")
12620 (synopsis "Convert complex datatypes to and from native
12621 Python datatypes.")
12622 (description "@code{marshmallow} provides a library for converting
12623 complex datatypes to and from native Python datatypes.")
12624 (license license:expat)))
12626 (define-public python2-marshmallow
12627 (package-with-python2 python-marshmallow))
12629 (define-public python-apispec
12631 (name "python-apispec")
12636 (uri (pypi-uri "apispec" version))
12639 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12640 (build-system python-build-system)
12642 `(("python-pyyaml" ,python-pyyaml)))
12644 `(("python-pytest" ,python-pytest)
12645 ("python-flask" ,python-flask)
12646 ("python-marshmallow" ,python-marshmallow)
12647 ("python-tornado" ,python-tornado)
12648 ("python-bottle" ,python-bottle)
12649 ("python-mock" ,python-mock)))
12650 (home-page "https://github.com/marshmallow-code/apispec")
12651 (synopsis "Swagger 2.0 API specification generator")
12652 (description "@code{python-apispec} is a pluggable API specification
12653 generator. Currently supports the OpenAPI specification (f.k.a.
12655 (license license:expat)))
12657 (define-public python2-apispec
12658 (package-with-python2 python-apispec))
12660 (define-public python-flasgger
12662 (name "python-flasgger")
12667 (uri (git-reference
12668 (url "https://github.com/rochacbruno/flasgger.git")
12670 (file-name (git-file-name name version))
12672 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
12673 (build-system python-build-system)
12676 (modify-phases %standard-phases
12678 (lambda* (#:key inputs outputs #:allow-other-keys)
12679 (substitute* "Makefile"
12680 (("flake8 flasgger --ignore=F403")
12681 "flake8 flasgger --ignore=E731,F403"))
12682 (setenv "PYTHONPATH" (string-append (getcwd)
12684 (getenv "PYTHONPATH")))
12685 (invoke "py.test"))))))
12687 `(("python-flask" ,python-flask)
12688 ("python-pyyaml" ,python-pyyaml)
12689 ("python-jsonschema" ,python-jsonschema)
12690 ("python-mistune" ,python-mistune)
12691 ("python-six" ,python-six)))
12693 `(("python-decorator" ,python-decorator)
12694 ("python-flake8" ,python-flake8)
12695 ("python-flask-restful" ,python-flask-restful)
12696 ("python-flex" ,python-flex)
12697 ("python-pytest" ,python-pytest)
12698 ("python-pytest-cov" ,python-pytest-cov)
12699 ("python-marshmallow" ,python-marshmallow)
12700 ("python-apispec" ,python-apispec)))
12701 (home-page "https://github.com/rochacbruno/flasgger/")
12702 (synopsis "Extract Swagger specs from your Flask project")
12703 (description "@code{python-flasgger} allows extracting Swagger specs
12704 from your Flask project. It is a fork of Flask-Swagger.")
12705 (license license:expat)))
12707 (define-public python2-flasgger
12708 (package-with-python2 python-flasgger))
12710 (define-public python-swagger-spec-validator
12712 (name "python-swagger-spec-validator")
12717 (uri (pypi-uri "swagger-spec-validator" version))
12720 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12721 (build-system python-build-system)
12723 `(("python-jsonschema" ,python-jsonschema)
12724 ("python-six" ,python-six)))
12726 "https://github.com/Yelp/swagger_spec_validator")
12727 (synopsis "Validation of Swagger specifications")
12728 (description "@code{swagger_spec_validator} provides a library for
12729 validating Swagger API specifications.")
12730 (license license:asl2.0)))
12732 (define-public python2-swagger-spec-validator
12733 (package-with-python2 python-swagger-spec-validator))
12735 (define-public python-apache-libcloud
12737 (name "python-apache-libcloud")
12742 (uri (pypi-uri "apache-libcloud" version))
12745 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12746 (build-system python-build-system)
12749 (modify-phases %standard-phases
12750 (add-after 'unpack 'patch-ssh
12751 (lambda* (#:key inputs #:allow-other-keys)
12752 (substitute* "libcloud/compute/ssh.py"
12753 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12756 (add-after 'unpack 'patch-tests
12758 (substitute* "./libcloud/test/test_file_fixtures.py"
12759 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12760 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12761 return (httplib.OK,
12763 {\"test\": \"value\"},
12764 httplib.responses[httplib.OK])
12766 (substitute* "libcloud/test/compute/test_ssh_client.py"
12767 (("class ShellOutSSHClientTests")
12768 "@unittest.skip(\"Guix container doesn't have ssh service\")
12769 class ShellOutSSHClientTests")
12770 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12771 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12772 (("'.xF0', '.x90', '.x8D', '.x88'")
12773 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12775 (add-before 'check 'copy-secret
12777 (copy-file "libcloud/test/secrets.py-dist"
12778 "libcloud/test/secrets.py")
12781 `(("openssh" ,openssh)))
12783 `(("python-paramiko" ,python-paramiko)
12784 ("python-requests" ,python-requests)))
12786 `(("python-lockfile" ,python-lockfile)
12787 ("python-mock" ,python-mock)
12788 ("python-pytest" ,python-pytest)
12789 ("python-pytest-runner" ,python-pytest-runner)
12790 ("python-requests-mock" ,python-requests-mock)))
12791 (home-page "https://libcloud.apache.org/")
12792 (synopsis "Unified Cloud API")
12793 (description "@code{libcloud} is a Python library for interacting with
12794 many of the popular cloud service providers using a unified API.")
12795 (license license:asl2.0)))
12797 (define-public python2-apache-libcloud
12798 (package-with-python2 python-apache-libcloud))
12800 (define-public python-smmap2
12802 (name "python-smmap2")
12807 (uri (pypi-uri "smmap2" version))
12810 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12811 (build-system python-build-system)
12813 `(("python-nosexcover" ,python-nosexcover)))
12814 (home-page "https://github.com/Byron/smmap")
12815 (synopsis "Python sliding window memory map manager")
12816 (description "@code{smmap2} is a pure Python implementation of a sliding
12817 window memory map manager.")
12818 (license license:bsd-3)))
12820 (define-public python2-smmap2
12821 (package-with-python2 python-smmap2))
12823 (define-public python-regex
12825 (name "python-regex")
12826 (version "2019.04.14")
12829 (uri (pypi-uri "regex" version))
12832 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
12833 ;; TODO: Fix and enable regex_test.py tests that complain about the
12834 ;; test.support module not existing.
12835 (build-system python-build-system)
12836 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12837 (synopsis "Alternative regular expression module")
12838 (description "This regular expression implementation is backwards-
12839 compatible with the standard @code{re} module, but offers additional
12840 functionality like full case-folding for case-insensitive matches in Unicode.")
12841 (license license:psfl)))
12843 (define-public python2-regex
12844 (package-with-python2 python-regex))
12846 (define-public python2-pyopengl
12848 (name "python2-pyopengl")
12853 (uri (pypi-uri "PyOpenGL" version))
12856 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12858 `(#:python ,python-2))
12859 (build-system python-build-system)
12860 (home-page "http://pyopengl.sourceforge.net")
12861 (synopsis "Standard OpenGL bindings for Python")
12863 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12864 related APIs. The binding is created using the standard @code{ctypes}
12866 (license license:bsd-3)))
12868 (define-public python2-pyopengl-accelerate
12870 (inherit python2-pyopengl)
12871 (name "python2-pyopengl-accelerate")
12876 (uri (pypi-uri "PyOpenGL-accelerate" version))
12879 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12880 (synopsis "Acceleration code for PyOpenGL")
12882 "This is the Cython-coded accelerator module for PyOpenGL.")))
12884 (define-public python-rencode
12886 (name "python-rencode")
12891 (uri (pypi-uri "rencode" version))
12894 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12895 (build-system python-build-system)
12898 (modify-phases %standard-phases
12899 (add-before 'check 'delete-bogus-test
12900 ;; This test requires /home/aresch/Downloads, which is not provided by
12901 ;; the build environment.
12903 (delete-file "rencode/t.py")
12905 (native-inputs `(("pkg-config" ,pkg-config)
12906 ("python-cython" ,python-cython)))
12907 (home-page "https://github.com/aresch/rencode")
12908 (synopsis "Serialization of heterogeneous data structures")
12910 "The @code{rencode} module is a data structure serialization library,
12911 similar to @code{bencode} from the BitTorrent project. For complex,
12912 heterogeneous data structures with many small elements, r-encoding stake up
12913 significantly less space than b-encodings. This version of rencode is a
12914 complete rewrite in Cython to attempt to increase the performance over the
12915 pure Python module.")
12916 (license license:bsd-3)))
12918 (define-public python2-rencode
12919 (package-with-python2 python-rencode))
12921 (define-public python-xenon
12923 (name "python-xenon")
12928 (uri (pypi-uri "xenon" version))
12931 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12932 (build-system python-build-system)
12934 `(("python-pyyaml" ,python-pyyaml)
12935 ("python-radon" ,python-radon)
12936 ("python-requests" ,python-requests)
12937 ("python-flake8" ,python-flake8)
12938 ("python-tox" ,python-tox)))
12941 (modify-phases %standard-phases
12942 (add-before 'build 'patch-test-requirements
12944 ;; Remove httpretty dependency for tests.
12945 (substitute* "setup.py"
12946 (("httpretty") ""))
12948 (home-page "https://xenon.readthedocs.org/")
12949 (synopsis "Monitor code metrics for Python on your CI server")
12951 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12952 Ideally, @code{xenon} is run every time code is committed. Through command
12953 line options, various thresholds can be set for the complexity of code. It
12954 will fail (i.e. it will exit with a non-zero exit code) when any of these
12955 requirements is not met.")
12956 (license license:expat)))
12958 (define-public python2-xenon
12959 (package-with-python2 python-xenon))
12961 (define-public python-pysocks
12963 (name "python-pysocks")
12968 (uri (pypi-uri "PySocks" version))
12971 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12972 (build-system python-build-system)
12973 (arguments `(#:tests? #f))
12974 (home-page "https://github.com/Anorov/PySocks")
12975 (synopsis "SOCKS client module")
12976 (description "@code{pysocks} is an updated and semi-actively maintained
12977 version of @code{SocksiPy} with bug fixes and extra features.")
12978 (license license:bsd-3)))
12980 (define-public python2-pysocks
12981 (package-with-python2 python-pysocks))
12983 (define-public python-pydiff
12985 (name "python-pydiff")
12990 (uri (pypi-uri "pydiff" version))
12993 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12994 (build-system python-build-system)
12995 (home-page "https://github.com/myint/pydiff")
12996 (synopsis "Library to diff two Python files at the bytecode level")
12998 "@code{pydiff} makes it easy to look for actual code changes while
12999 ignoring formatting changes.")
13000 (license license:expat)))
13002 (define-public python2-pydiff
13003 (package-with-python2 python-pydiff))
13005 (define-public python-tqdm
13007 (name "python-tqdm")
13012 (uri (pypi-uri "tqdm" version))
13015 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13016 (build-system python-build-system)
13018 `(("python-flake8" ,python-flake8)
13019 ("python-nose" ,python-nose)
13020 ("python-coverage" ,python-coverage)))
13021 (home-page "https://github.com/tqdm/tqdm")
13022 (synopsis "Fast, extensible progress meter")
13024 "Make loops show a progress bar on the console by just wrapping any
13025 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13026 design and layout.")
13027 (license (list license:mpl2.0 license:expat))))
13029 (define-public python2-tqdm
13030 (package-with-python2 python-tqdm))
13032 (define-public python-pkginfo
13034 (name "python-pkginfo")
13039 (uri (pypi-uri "pkginfo" version))
13042 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13043 (build-system python-build-system)
13045 ;; The tests are broken upstream.
13048 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13050 "Query metadatdata from sdists, bdists, and installed packages")
13052 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13053 source distriubtion (an sdist) or a binary distribution (e.g., created by
13054 running bdist_egg). It can also query the EGG-INFO directory of an installed
13055 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13056 created by running @code{python setup.py develop}).")
13057 (license license:expat)))
13059 (define-public python2-pkginfo
13060 (package-with-python2 python-pkginfo))
13062 (define-public python-twine
13064 (name "python-twine")
13069 (uri (pypi-uri "twine" version))
13072 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13073 (build-system python-build-system)
13075 `(("python-tqdm" ,python-tqdm)
13076 ("python-pkginfo" ,python-pkginfo)
13077 ("python-requests" ,python-requests)
13078 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13079 (home-page "https://github.com/pypa/twine")
13080 (synopsis "Collection of utilities for interacting with PyPI")
13082 "@code{twine} currently supports registering projects and uploading
13083 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13084 their files and supports any packaging format (including wheels).")
13085 (license license:asl2.0)))
13087 (define-public python2-twine
13088 (package-with-python2 python-twine))
13090 (define-public python-linecache2
13092 (name "python-linecache2")
13097 (uri (pypi-uri "linecache2" version))
13100 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13101 (build-system python-build-system)
13103 `(;; The tests depend on unittest2, and our version is a bit too old.
13106 `(("python-pbr" ,python-pbr-minimal)))
13108 "https://github.com/testing-cabal/linecache2")
13109 (synopsis "Backports of the linecache module")
13111 "The linecache module allows one to get any line from any file, while
13112 attempting to optimize internally, using a cache, the common case where many
13113 lines are read from a single file.")
13114 (license license:psfl)))
13116 (define-public python2-linecache2
13117 (package-with-python2 python-linecache2))
13119 (define-public python-traceback2
13121 (name "python-traceback2")
13126 (uri (pypi-uri "traceback2" version))
13129 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13130 (build-system python-build-system)
13132 `(;; python-traceback2 and python-unittest2 depend on one another.
13135 `(("python-pbr" ,python-pbr-minimal)))
13137 `(("python-linecache2" ,python-linecache2)))
13139 "https://github.com/testing-cabal/traceback2")
13140 (synopsis "Backports of the traceback module")
13142 "This module provides a standard interface to extract, format and print
13143 stack traces of Python programs. It exactly mimics the behavior of the Python
13144 interpreter when it prints a stack trace.")
13145 (license license:psfl)))
13147 (define-public python2-traceback2
13148 (package-with-python2 python-traceback2))
13150 (define-public python-ratelimiter
13152 (name "python-ratelimiter")
13157 (uri (pypi-uri "ratelimiter" version))
13160 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13161 (build-system python-build-system)
13163 '(#:tests? #f)) ; There are no tests in the pypi archive.
13164 (home-page "https://github.com/RazerM/ratelimiter")
13165 (synopsis "Simple rate limiting object")
13167 "The @code{ratelimiter} module ensures that an operation will not be
13168 executed more than a given number of times during a given period.")
13169 (license license:asl2.0)))
13171 (define-public python2-ratelimiter
13172 (package-with-python2 python-ratelimiter))
13174 (define-public python-dukpy
13176 (name "python-dukpy")
13181 (uri (git-reference
13182 (url "https://github.com/kovidgoyal/dukpy.git")
13183 (commit (string-append "v" version))))
13184 (file-name (git-file-name name version))
13186 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13187 (build-system python-build-system)
13188 (home-page "https://github.com/kovidgoyal/dukpy")
13189 (synopsis "Run JavaScript in python")
13191 "dukpy is a JavaScript runtime environment for Python using the duktape
13192 embeddable JavaScript engine.")
13193 ;; Dukpy is licensed under MIT like the embedded duktape library,
13194 ;; with 'errors.c' as GPL3.
13195 (license (list license:expat license:gpl3))))
13197 (define-public python2-dukpy
13198 (package-with-python2 python-dukpy))
13200 (define-public python-jsonrpclib-pelix
13202 (name "python-jsonrpclib-pelix")
13207 (uri (pypi-uri "jsonrpclib-pelix" version))
13210 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13211 (build-system python-build-system)
13213 `(#:tests? #f)) ; no tests in PyPI tarball
13214 (home-page "https://github.com/tcalmant/jsonrpclib/")
13215 (synopsis "JSON-RPC 2.0 client library for Python")
13217 "This library implements the JSON-RPC v2.0
13218 specification (backwards-compatible) as a client library for Python. This
13219 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13221 (license license:asl2.0)))
13223 (define-public python2-jsonrpclib-pelix
13224 (package-with-python2 python-jsonrpclib-pelix))
13226 (define-public python-setuptools-scm-git-archive
13228 (name "python-setuptools-scm-git-archive")
13233 (uri (pypi-uri "setuptools_scm_git_archive" version))
13236 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13237 (build-system python-build-system)
13239 `(("python-pytest" ,python-pytest)))
13241 `(("python-setuptools-scm" ,python-setuptools-scm)))
13242 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13243 (synopsis "Setuptools_scm plugin for git archives")
13245 "The setuptools_scm_git_archive package is a plugin to
13246 setuptools_scm, which supports obtaining versions from git archives that
13247 belong to tagged versions.")
13248 (license license:expat)))
13250 (define-public python2-setuptools-scm-git-archive
13251 (package-with-python2 python-setuptools-scm-git-archive))
13253 (define-public python-pyclipper
13255 (name "python-pyclipper")
13256 (version "1.1.0.post1")
13260 (uri (pypi-uri "pyclipper" version ".zip"))
13263 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13264 (modules '((guix build utils)))
13267 ;; This file is generated by Cython.
13268 (delete-file "pyclipper/pyclipper.cpp") #t))))
13269 (build-system python-build-system)
13272 (modify-phases %standard-phases
13273 (add-before 'build 'cythonize-sources
13275 (with-directory-excursion "pyclipper"
13276 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13278 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13280 `(("python-cython" ,python-cython)
13281 ("python-pytest" ,python-pytest)
13282 ("python-pytest-runner" ,python-pytest-runner)
13283 ("python-unittest2" ,python-unittest2)
13285 (home-page "https://github.com/greginvm/pyclipper")
13286 (synopsis "Wrapper for Angus Johnson's Clipper library")
13288 "Pyclipper is a Cython wrapper for the C++ translation of the
13289 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13290 (license license:expat)))
13292 (define-public python2-pyclipper
13293 (package-with-python2 python-pyclipper))
13295 (define-public python2-booleanoperations
13297 (name "python2-booleanoperations")
13302 (uri (pypi-uri "booleanOperations" version ".zip"))
13305 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13306 (build-system python-build-system)
13308 `(#:python ,python-2))
13311 ("python2-pytest" ,python2-pytest)
13312 ("python2-pytest-runner" ,python2-pytest-runner)))
13314 `(("python-fonttools" ,python2-fonttools)
13315 ("python-pyclipper" ,python2-pyclipper)
13316 ("python-ufolib" ,python2-ufolib)))
13317 (home-page "https://github.com/typemytype/booleanOperations")
13318 (synopsis "Boolean operations on paths")
13320 "BooleanOperations provides a Python library that enables
13321 boolean operations on paths.")
13322 (license license:expat)))
13324 (define-public python-tempdir
13326 (name "python-tempdir")
13331 (uri (pypi-uri "tempdir" version))
13334 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13335 (build-system python-build-system)
13336 (home-page "https://pypi.org/project/tempdir/")
13338 ;; the package has no tests
13340 (synopsis "Python library for managing temporary directories")
13342 "This library manages temporary directories that are automatically
13343 deleted with all their contents when they are no longer needed. It is
13344 particularly convenient for use in tests.")
13345 (license license:expat)))
13347 (define-public python2-tempdir
13348 (package-with-python2 python-tempdir))
13350 (define-public python-activepapers
13352 (name "python-activepapers")
13357 (uri (pypi-uri "ActivePapers.Py" version))
13360 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13361 (build-system python-build-system)
13363 `(#:modules ((ice-9 ftw)
13366 (guix build python-build-system))
13369 (modify-phases %standard-phases
13370 (add-after 'unpack 'delete-python2-code
13372 (for-each delete-file
13373 '("lib/activepapers/builtins2.py"
13374 "lib/activepapers/standardlib2.py"
13375 "lib/activepapers/utility2.py"))))
13378 ;; Deactivate the test cases that download files
13379 (setenv "NO_NETWORK_ACCESS" "1")
13380 ;; For some strange reason, some tests fail if nosetests runs all
13381 ;; test modules in a single execution. They pass if each test
13382 ;; module is run individually.
13383 (for-each (lambda (filename)
13384 (invoke "nosetests"
13385 (string-append "tests/" filename)))
13388 (string-suffix? ".py" filename)))))))))
13390 `(("python-tempdir" ,python-tempdir)
13391 ("python-nose" ,python-nose)))
13393 `(("python-h5py" ,python-h5py)))
13394 (home-page "http://www.activepapers.org/")
13395 (synopsis "Executable papers for scientific computing")
13397 "ActivePapers is a tool for working with executable papers, which
13398 combine data, code, and documentation in single-file packages,
13399 suitable for publication as supplementary material or on repositories
13400 such as figshare or Zenodo.")
13401 (properties `((python2-variant . ,(delay python2-activepapers))))
13402 (license license:bsd-3)))
13404 (define-public python2-activepapers
13405 (let ((base (package-with-python2
13406 (strip-python2-variant python-activepapers))))
13410 (substitute-keyword-arguments (package-arguments base)
13412 `(modify-phases ,phases
13413 (delete 'delete-python2-code)
13414 (add-after 'unpack 'delete-python3-code
13416 (for-each delete-file
13417 '("lib/activepapers/builtins3.py"
13418 "lib/activepapers/standardlib3.py"
13419 "lib/activepapers/utility3.py")))))))))))
13421 (define-public python-semver
13423 (name "python-semver")
13428 (uri (pypi-uri "semver" version))
13431 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13432 (build-system python-build-system)
13435 (modify-phases %standard-phases
13436 (add-after 'unpack 'patch-test-requirements
13438 (substitute* "setup.py"
13439 ;; Our Python is new enough.
13440 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13443 `(("python-tox" ,python-tox)
13444 ("python-virtualenv" ,python-virtualenv)))
13445 (home-page "https://github.com/k-bx/python-semver")
13446 (synopsis "Python helper for Semantic Versioning")
13447 (description "This package provides a Python library for
13448 @url{Semantic Versioning, http://semver.org/}.")
13449 (license license:bsd-3)))
13451 (define-public python2-semver
13452 (package-with-python2 python-semver))
13454 (define-public python-pyro4
13456 (name "python-pyro4")
13461 (uri (pypi-uri "Pyro4" version))
13463 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13464 (build-system python-build-system)
13466 `(("python-serpent" ,python-serpent)))
13467 (home-page "https://pyro4.readthedocs.io")
13468 (synopsis "Distributed object middleware for Python")
13470 "Pyro enables you to build applications in which objects can talk to each
13471 other over the network. You can just use normal Python method calls to call
13472 objects on other machines, also known as remote procedure calls (RPC).")
13473 (license license:expat)))
13475 (define-public python2-pyro
13477 (name "python2-pyro")
13482 (uri (pypi-uri "Pyro" version))
13483 (file-name (string-append "Pyro-" version ".tar.gz"))
13486 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13487 (build-system python-build-system)
13489 ;; Pyro is not compatible with Python 3
13490 `(#:python ,python-2
13491 ;; Pyro has no test cases for automatic execution
13493 (home-page "http://pythonhosted.org/Pyro/")
13494 (synopsis "Distributed object manager for Python")
13495 (description "Pyro is a Distributed Object Technology system
13496 written in Python that is designed to be easy to use. It resembles
13497 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13498 which is a system and language independent Distributed Object Technology
13499 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13500 longer maintained. New projects should use Pyro4 instead, which
13501 is the new Pyro version that is actively developed.")
13502 (license license:expat)))
13504 (define-public python2-scientific
13506 (name "python2-scientific")
13511 (uri (string-append "https://bitbucket.org/khinsen/"
13512 "scientificpython/downloads/ScientificPython-"
13513 version ".tar.gz"))
13514 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13517 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13518 (build-system python-build-system)
13520 `(("netcdf" ,netcdf)))
13522 `(("python-numpy" ,python2-numpy-1.8)
13523 ("python-pyro" ,python2-pyro)))
13525 ;; ScientificPython is not compatible with Python 3
13526 `(#:python ,python-2
13527 #:tests? #f ; No test suite
13529 (modify-phases %standard-phases
13531 (lambda* (#:key inputs #:allow-other-keys)
13532 (invoke "python" "setup.py" "build"
13533 (string-append "--netcdf_prefix="
13534 (assoc-ref inputs "netcdf"))))))))
13535 (home-page "https://bitbucket.org/khinsen/scientificpython")
13536 (synopsis "Python modules for scientific computing")
13537 (description "ScientificPython is a collection of Python modules that are
13538 useful for scientific computing. Most modules are rather general (Geometry,
13539 physical units, automatic derivatives, ...) whereas others are more
13540 domain-specific (e.g. netCDF and PDB support). The library is currently
13541 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13542 (license license:cecill-c)))
13544 (define-public python2-mmtk
13546 (name "python2-mmtk")
13551 (uri (string-append "https://bitbucket.org/khinsen/"
13552 "mmtk/downloads/MMTK-" version ".tar.gz"))
13553 (file-name (string-append "MMTK-" version ".tar.gz"))
13556 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13557 (build-system python-build-system)
13559 `(("netcdf" ,netcdf)))
13561 `(("python-scientific" ,python2-scientific)
13562 ("python-tkinter" ,python-2 "tk")))
13564 `(#:python ,python-2
13567 (modify-phases %standard-phases
13568 (add-before 'build 'includes-from-scientific
13569 (lambda* (#:key inputs #:allow-other-keys)
13570 (mkdir-p "Include/Scientific")
13573 (assoc-ref inputs "python-scientific")
13574 "/include/python2.7/Scientific")
13575 "Include/Scientific"))))))
13576 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13577 (synopsis "Python library for molecular simulation")
13578 (description "MMTK is a library for molecular simulations with an emphasis
13579 on biomolecules. It provides widely used methods such as Molecular Dynamics
13580 and normal mode analysis, but also basic routines for implementing new methods
13581 for simulation and analysis. The library is currently not actively maintained
13582 and works only with Python 2 and NumPy < 1.9.")
13583 (license license:cecill-c)))
13585 (define-public python-phonenumbers
13587 (name "python-phonenumbers")
13592 (uri (pypi-uri "phonenumbers" version))
13595 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13596 (build-system python-build-system)
13598 "https://github.com/daviddrysdale/python-phonenumbers")
13600 "Python library for dealing with international phone numbers")
13602 "This package provides a Python port of Google's libphonenumber library.")
13603 (license license:asl2.0)))
13605 (define-public python2-phonenumbers
13606 (package-with-python2 python-phonenumbers))
13608 (define-public python-send2trash
13610 (name "python-send2trash")
13613 (origin (method git-fetch)
13614 ;; Source tarball on PyPI doesn't include tests.
13615 (uri (git-reference
13616 (url "https://github.com/hsoft/send2trash.git")
13618 (file-name (git-file-name name version))
13621 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13622 (build-system python-build-system)
13625 (modify-phases %standard-phases
13626 (add-before 'check 'pre-check
13628 (mkdir-p "/tmp/foo")
13629 (setenv "HOME" "/tmp/foo")
13631 (home-page "https://github.com/hsoft/send2trash")
13632 (synopsis "Send files to the user's @file{~/Trash} directory")
13633 (description "This package provides a Python library to send files to the
13634 user's @file{~/Trash} directory.")
13635 (properties `((python2-variant . ,(delay python2-send2trash))))
13636 (license license:bsd-3)))
13638 (define-public python2-send2trash
13640 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
13642 (substitute-keyword-arguments (package-arguments python-send2trash)
13644 `(modify-phases ,phases
13645 (add-before 'check 'setenv
13647 (setenv "PYTHONPATH"
13648 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13651 (define-public python-yapf
13653 (name "python-yapf")
13658 (uri (pypi-uri "yapf" version))
13661 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13662 (build-system python-build-system)
13663 (home-page "https://github.com/google/yapf")
13664 (synopsis "Formatter for Python code")
13665 (description "YAPF is a formatter for Python code. It's based off of
13666 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13667 takes the code and reformats it to the best formatting that conforms to the
13668 style guide, even if the original code didn't violate the style guide.")
13669 (license license:asl2.0)))
13671 (define-public python2-yapf
13672 (package-with-python2 python-yapf))
13674 (define-public python-gyp
13675 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13678 (name "python-gyp")
13679 ;; Google does not release versions,
13680 ;; based on second most recent commit date.
13681 (version (git-version "0.0.0" revision commit))
13684 ;; Google does not release tarballs,
13685 ;; git checkout is needed.
13687 (uri (git-reference
13688 (url "https://chromium.googlesource.com/external/gyp")
13690 (file-name (git-file-name name version))
13693 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13694 (build-system python-build-system)
13695 (home-page "https://gyp.gsrc.io/")
13696 (synopsis "GYP is a Meta-Build system")
13698 "GYP builds build systems for large, cross platform applications.
13699 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13700 files, and Makefiles.")
13701 (license license:bsd-3))))
13703 (define-public python2-gyp
13704 (package-with-python2 python-gyp))
13706 (define-public python-whatever
13708 (name "python-whatever")
13713 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13717 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13718 (file-name (string-append name "-" version ".tar.gz"))))
13719 (build-system python-build-system)
13722 (modify-phases %standard-phases
13725 (invoke "py.test"))))))
13727 `(("python-pytest" ,python-pytest)))
13728 (home-page "http://github.com/Suor/whatever")
13729 (synopsis "Make anonymous functions by partial application of operators")
13730 (description "@code{whatever} provides an easy way to make anonymous
13731 functions by partial application of operators.")
13732 (license license:bsd-3)))
13734 (define-public python2-whatever
13735 (package-with-python2 python-whatever))
13737 (define-public python-funcy
13739 (name "python-funcy")
13744 (uri (git-reference
13745 (url "https://github.com/Suor/funcy.git")
13748 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13749 (file-name (git-file-name name version))))
13750 (build-system python-build-system)
13753 (modify-phases %standard-phases
13756 (invoke "py.test"))))))
13758 `(("python-pytest" ,python-pytest)
13759 ("python-whatever" ,python-whatever)))
13760 (home-page "http://github.com/Suor/funcy")
13761 (synopsis "Functional tools")
13762 (description "@code{funcy} is a library that provides functional tools.
13765 @item merge - Merges collections of the same type
13766 @item walk - Type-preserving map
13767 @item select - Selects a part of a collection
13768 @item take - Takes the first n items of a collection
13769 @item first - Takes the first item of a collection
13770 @item remove - Predicated-removes items of a collection
13771 @item concat - Concatenates two collections
13772 @item flatten - Flattens a collection with subcollections
13773 @item distinct - Returns only distinct items
13774 @item split - Predicated-splits a collection
13775 @item split_at - Splits a collection at a given item
13776 @item group_by - Groups items by group
13777 @item pairwise - Pairs off adjacent items
13778 @item partial - Partially-applies a function
13779 @item curry - Curries a function
13780 @item compose - Composes functions
13781 @item complement - Complements a predicate
13782 @item all_fn - \"all\" with predicate
13784 (license license:bsd-3)))
13786 (define-public python2-funcy
13787 (package-with-python2 python-funcy))
13789 (define-public python-isoweek
13791 (name "python-isoweek")
13796 (uri (pypi-uri "isoweek" version))
13799 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13800 (build-system python-build-system)
13801 (home-page "https://github.com/gisle/isoweek")
13802 (synopsis "Objects representing a week")
13803 (description "The @code{isoweek} module provide the class Week that
13804 implements the week definition of ISO 8601. This standard also defines
13805 a notation for identifying weeks; yyyyWww (where the W is a literal).
13806 Week instances stringify to this form.")
13807 (license license:bsd-3)))
13809 (define-public python2-isoweek
13810 (package-with-python2 python-isoweek))
13812 (define-public python-tokenize-rt
13814 (name "python-tokenize-rt")
13819 (uri (pypi-uri "tokenize-rt" version))
13822 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13823 (build-system python-build-system)
13824 (home-page "https://github.com/asottile/tokenize-rt")
13825 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13827 "This Python library is a wrapper around @code{tokenize} from the Python
13828 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13829 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13830 and @code{tokens_to_src} to roundtrip.")
13831 (license license:expat)))
13833 (define-public python-future-fstrings
13835 (name "python-future-fstrings")
13840 (uri (pypi-uri "future_fstrings" version))
13843 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13844 (build-system python-build-system)
13846 `(("python-tokenize-rt" ,python-tokenize-rt)))
13847 (home-page "https://github.com/asottile/future-fstrings")
13848 (synopsis "Backport of fstrings to Python < 3.6")
13850 "This package provides a UTF-8 compatible encoding
13851 @code{future_fstrings}, which performs source manipulation. It decodes the
13852 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13853 @code{f} strings.")
13854 (license license:expat)))
13856 (define-public python-typing
13858 (name "python-typing")
13863 (uri (pypi-uri "typing" version))
13866 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13867 (build-system python-build-system)
13868 (home-page "https://docs.python.org/3/library/typing.html")
13869 (synopsis "Type hints for Python")
13870 (description "This is a backport of the standard library @code{typing}
13871 module to Python versions older than 3.5. Typing defines a standard notation
13872 for Python function and variable type annotations. The notation can be used
13873 for documenting code in a concise, standard format, and it has been designed
13874 to also be used by static and runtime type checkers, static analyzers, IDEs
13876 (license license:psfl)))
13878 (define-public python2-typing
13879 (package-with-python2 python-typing))
13881 (define-public python-typing-extensions
13883 (name "python-typing-extensions")
13888 (uri (pypi-uri "typing_extensions" version))
13891 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13892 (build-system python-build-system)
13894 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13895 (synopsis "Experimental type hints for Python")
13897 "The typing_extensions module contains additional @code{typing} hints not
13898 yet present in the of the @code{typing} standard library.
13899 Included are implementations of:
13902 @item ContextManager
13913 @item TYPE_CHECKING
13914 @item AsyncGenerator
13916 (license license:psfl)))
13918 (define-public bpython
13925 (uri (pypi-uri "bpython" version))
13928 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13929 (build-system python-build-system)
13932 (modify-phases %standard-phases
13933 (add-after 'unpack 'remove-failing-test
13935 ;; Remove failing test. FIXME: make it pass
13936 (delete-file "bpython/test/test_args.py")
13938 (add-after 'wrap 'add-aliases
13939 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13940 (lambda* (#:key outputs #:allow-other-keys)
13941 (let ((out (assoc-ref outputs "out")))
13944 (symlink old (string-append out "/bin/" new)))
13945 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13946 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13949 `(("python-pygments" ,python-pygments)
13950 ("python-requests" ,python-requests)
13951 ("python-babel" ,python-babel) ; optional, for internationalization
13952 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13953 ("python-greenlet" ,python-greenlet)
13954 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13955 ("python-six" ,python-six)))
13957 `(("python-sphinx" ,python-sphinx)
13958 ("python-mock" ,python-mock)))
13959 (home-page "https://bpython-interpreter.org/")
13960 (synopsis "Fancy interface to the Python interpreter")
13961 (description "Bpython is a fancy interface to the Python
13962 interpreter. bpython's main features are
13965 @item in-line syntax highlighting,
13966 @item readline-like autocomplete with suggestions displayed as you type,
13967 @item expected parameter list for any Python function,
13968 @item \"rewind\" function to pop the last line of code from memory and
13970 @item send the code you've entered off to a pastebin,
13971 @item save the code you've entered to a file, and
13972 @item auto-indentation.
13974 (license license:expat)))
13976 (define-public bpython2
13977 (let ((base (package-with-python2
13978 (strip-python2-variant bpython))))
13979 (package (inherit base)
13982 `(#:python ,python-2
13984 (modify-phases %standard-phases
13985 (add-after 'unpack 'remove-failing-test
13987 ;; Remove failing test. FIXME: make it pass
13988 (delete-file "bpython/test/test_args.py")
13989 ;; Disable failing test-cases (renaming inhibits they are
13991 (substitute* "bpython/test/test_curtsies_repl.py"
13992 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13993 (string-append a "xxx_off_" b))
13994 (("^(\\s*def )(test_complex\\W)" _ a b)
13995 (string-append a "xxx_off_" b)))
13997 (add-before 'build 'rename-scripts
13998 ;; rename the scripts to bypthon2, bpdb2, etc.
14000 (substitute* "setup.py"
14001 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14002 (string-append name "2" rest "\n"))
14003 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14004 (string-append name "2" (or sub "") rest "\n")))
14007 (define-public python-pyinotify
14009 (name "python-pyinotify")
14013 (uri (pypi-uri "pyinotify" version))
14016 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14017 (build-system python-build-system)
14018 (arguments `(#:tests? #f)) ;no tests
14019 (home-page "https://github.com/seb-m/pyinotify")
14020 (synopsis "Python library for monitoring inotify events")
14022 "@code{pyinotify} provides a Python interface for monitoring
14023 file system events on Linux.")
14024 (license license:expat)))
14026 (define-public python2-pyinotify
14027 (package-with-python2 python-pyinotify))
14029 ;; Ada parser uses this version.
14030 (define-public python2-quex-0.67.3
14032 (name "python2-quex")
14037 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14038 (version-major+minor version)
14039 "/quex-" version ".zip"))
14042 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14043 (build-system python-build-system)
14045 `(("unzip" ,unzip)))
14047 `(#:python ,python-2
14050 (modify-phases %standard-phases
14051 (delete 'configure)
14054 (lambda* (#:key outputs #:allow-other-keys)
14055 (let* ((out (assoc-ref outputs "out"))
14056 (share/quex (string-append out "/share/quex"))
14057 (bin (string-append out "/bin")))
14058 (copy-recursively "." share/quex)
14060 (symlink (string-append share/quex "/quex-exe.py")
14061 (string-append bin "/quex"))
14063 (native-search-paths
14064 (list (search-path-specification
14065 (variable "QUEX_PATH")
14066 (files '("share/quex")))))
14067 (home-page "http://quex.sourceforge.net/")
14068 (synopsis "Lexical analyzer generator in Python")
14069 (description "@code{quex} is a lexical analyzer generator in Python.")
14070 (license license:lgpl2.1+))) ; Non-military
14072 (define-public python2-quex
14073 (package (inherit python2-quex-0.67.3)
14074 (name "python2-quex")
14079 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14082 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14083 (file-name (string-append name "-" version ".tar.gz"))))))
14085 (define-public python-more-itertools
14087 (name "python-more-itertools")
14092 (uri (pypi-uri "more-itertools" version))
14095 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14096 (build-system python-build-system)
14098 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14099 (%current-target-system)))
14102 (modify-phases %standard-phases
14103 ;; This is required for 32-bit hardware.
14104 ;; TODO: Try to remove this when upgrading.
14105 (add-after 'unpack 'patch-test
14107 (substitute* "more_itertools/tests/test_more.py"
14108 (("10 \\*\\* 10") "9 ** 9"))
14112 `(("python-six" ,python-six-bootstrap)))
14113 (home-page "https://github.com/erikrose/more-itertools")
14114 (synopsis "More routines for operating on iterables, beyond itertools")
14115 (description "Python's built-in @code{itertools} module implements a
14116 number of iterator building blocks inspired by constructs from APL, Haskell,
14117 and SML. @code{more-itertools} includes additional building blocks for
14118 working with iterables.")
14119 (license license:expat)))
14121 (define-public python2-more-itertools
14122 (package-with-python2 python-more-itertools))
14124 (define-public python-latexcodec
14126 (name "python-latexcodec")
14131 (uri (pypi-uri "latexcodec" version))
14133 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14134 (build-system python-build-system)
14136 `(("python-six" ,python-six)))
14137 (home-page "https://readthedocs.org/projects/latexcodec/")
14138 (synopsis "Work with LaTeX code in Python")
14139 (description "Lexer and codec to work with LaTeX code in Python.")
14140 (license license:expat)))
14142 (define-public python-pybtex
14144 (name "python-pybtex")
14149 (uri (pypi-uri "pybtex" version))
14152 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14153 (build-system python-build-system)
14155 `(("python-nose" ,python-nose)))
14157 `(("python-latexcodec" ,python-latexcodec)
14158 ("python-pyyaml" ,python-pyyaml)
14159 ("python-six" ,python-six)))
14161 `(#:test-target "nosetests"))
14162 (home-page "https://pybtex.org/")
14163 (synopsis "BibTeX-compatible bibliography processor")
14164 (description "Pybtex is a BibTeX-compatible bibliography processor written
14165 in Python. You can simply type pybtex instead of bibtex.")
14166 (license license:expat)))
14168 (define-public python-onetimepass
14170 (name "python-onetimepass")
14175 (uri (pypi-uri "onetimepass" version))
14177 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14178 (build-system python-build-system)
14179 (propagated-inputs `(("python-six" ,python-six)))
14180 (home-page "https://github.com/tadeck/onetimepass/")
14181 (synopsis "One-time password library")
14182 (description "Python one-time password library for HMAC-based (HOTP) and
14183 time-based (TOTP) passwords.")
14184 (license license:expat)))
14186 (define-public python-parso
14188 (name "python-parso")
14193 (uri (pypi-uri "parso" version))
14196 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14198 `(("python-pytest" ,python-pytest)))
14199 (build-system python-build-system)
14200 (home-page "https://github.com/davidhalter/parso")
14201 (synopsis "Python Parser")
14202 (description "Parso is a Python parser that supports error recovery and
14203 round-trip parsing for different Python versions (in multiple Python versions).
14204 Parso is also able to list multiple syntax errors in your Python file.")
14205 (license license:expat)))
14207 (define-public python2-parso
14208 (package-with-python2 python-parso))
14210 (define-public python-async-generator
14212 (name "python-async-generator")
14217 (uri (pypi-uri "async_generator" version))
14220 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14221 (build-system python-build-system)
14223 `(("python-pytest" ,python-pytest)))
14224 (home-page "https://github.com/python-trio/async_generator")
14225 (synopsis "Async generators and context managers for Python 3.5+")
14226 (description "@code{async_generator} back-ports Python 3.6's native async
14227 generators and Python 3.7's context managers into Python 3.5.")
14229 (license (list license:expat license:asl2.0))))
14231 (define-public python-async-timeout
14233 (name "python-async-timeout")
14238 (uri (pypi-uri "async-timeout" version))
14241 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14242 (build-system python-build-system)
14243 (home-page "https://github.com/aio-libs/async_timeout/")
14244 (synopsis "Timeout context manager for asyncio programs")
14245 (description "@code{async-timeout} provides a timeout timeout context
14246 manager compatible with @code{asyncio}.")
14247 (license license:asl2.0)))
14249 (define-public python-glob2
14251 (name "python-glob2")
14256 (uri (git-reference
14257 (url "https://github.com/miracle2k/python-glob2.git")
14259 (file-name (git-file-name name version))
14261 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14262 (build-system python-build-system)
14263 (home-page "https://github.com/miracle2k/python-glob2/")
14264 (synopsis "Extended Version of the python buildin glob module")
14265 (description "This is an extended version of the Python
14266 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14270 @item The ability to capture the text matched by glob patterns, and return
14271 those matches alongside the file names.
14272 @item A recursive @code{**} globbing syntax, akin for example to the
14273 @code{globstar} option of Bash.
14274 @item The ability to replace the file system functions used, in order to glob
14275 on virtual file systems.
14276 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14279 Glob2 currently based on the glob code from Python 3.3.1.")
14280 (license license:bsd-2)))
14282 (define-public python2-glob2
14283 (package-with-python2 python-glob2))
14285 (define-public python-gipc
14287 (name "python-gipc")
14292 (uri (pypi-uri "gipc" version ".zip"))
14295 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14296 (build-system python-build-system)
14298 `(("unzip" ,unzip)))
14300 `(("python-gevent" ,python-gevent)))
14301 (home-page "http://gehrcke.de/gipc")
14302 (synopsis "Child process management in the context of gevent")
14303 (description "Usage of Python's multiprocessing package in a
14304 gevent-powered application may raise problems. With @code{gipc},
14305 process-based child processes can safely be created anywhere within a
14306 gevent-powered application.")
14307 (license license:expat)))
14309 (define-public python2-gipc
14310 (package-with-python2 python-gipc))
14312 (define-public python-fusepy
14314 (name "python-fusepy")
14319 (uri (pypi-uri "fusepy" version))
14322 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14323 (build-system python-build-system)
14326 (modify-phases %standard-phases
14327 (add-before 'build 'set-library-file-name
14328 (lambda* (#:key inputs #:allow-other-keys)
14329 (let ((fuse (assoc-ref inputs "fuse")))
14330 (substitute* "fuse.py"
14331 (("find_library\\('fuse'\\)")
14332 (string-append "'" fuse "/lib/libfuse.so'")))
14336 (home-page "https://github.com/fusepy/fusepy")
14337 (synopsis "Simple ctypes bindings for FUSE")
14338 (description "Python module that provides a simple interface to FUSE and
14339 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14340 (license license:isc)))
14342 (define-public python2-fusepy
14343 (package-with-python2 python-fusepy))
14345 (define-public python2-gdrivefs
14347 (name "python2-gdrivefs")
14352 (uri (pypi-uri "gdrivefs" version))
14355 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14356 (build-system python-build-system)
14358 `(#:python ,python-2
14360 (modify-phases %standard-phases
14361 (add-before 'build 'patch-setup-py
14363 ;; Update requirements from dependency==version
14364 ;; to dependency>=version
14365 (substitute* "gdrivefs/resources/requirements.txt"
14369 `(("python2-gipc" ,python2-gipc)
14370 ("python2-gevent" ,python2-gevent)
14371 ("python2-greenlet" ,python2-greenlet)
14372 ("python2-httplib2" ,python2-httplib2)
14373 ("python2-uritemplate" ,python2-uritemplate)
14374 ("python2-oauth2client" ,python2-oauth2client)
14375 ("python2-six" ,python2-six)))
14377 `(("python2-dateutil" ,python2-dateutil)
14378 ("python2-fusepy" ,python2-fusepy)
14379 ("python2-google-api-client" ,python2-google-api-client)))
14380 (home-page "https://github.com/dsoprea/GDriveFS")
14381 (synopsis "Mount Google Drive as a local file system")
14382 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14383 under Python 2.7.")
14384 (license license:gpl2)))
14386 (define-public pybind11
14392 (uri (git-reference
14393 (url "https://github.com/pybind/pybind11.git")
14394 (commit (string-append "v" version))))
14397 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14398 (file-name (git-file-name name version))))
14399 (build-system cmake-build-system)
14401 `(("python" ,python)
14402 ("python-pytest" ,python-pytest)))
14404 `(#:test-target "check"))
14405 (home-page "https://github.com/pybind/pybind11/")
14406 (synopsis "Seamless operability between C++11 and Python")
14407 (description "pybind11 is a lightweight header-only library that exposes
14408 C++ types in Python and vice versa, mainly to create Python bindings of
14409 existing C++ code. Its goals and syntax are similar to the excellent
14410 Boost.Python library by David Abrahams: to minimize boilerplate code in
14411 traditional extension modules by inferring type information using compile-time
14413 (license license:expat)))
14415 (define-public python-fasteners
14417 (name "python-fasteners")
14422 (uri (pypi-uri "fasteners" version))
14425 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14426 (build-system python-build-system)
14428 `(("python-monotonic" ,python-monotonic)
14429 ("python-six" ,python-six)
14430 ("python-testtools" ,python-testtools)))
14431 (home-page "https://github.com/harlowja/fasteners")
14432 (synopsis "Python package that provides useful locks")
14434 "This package provides a Python program that provides following locks:
14437 @item Locking decorator
14438 @item Reader-writer locks
14439 @item Inter-process locks
14440 @item Generic helpers
14442 (properties `((python2-variant . ,(delay python2-fasteners))))
14443 (license license:asl2.0)))
14445 (define-public python2-fasteners
14446 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14450 `(("python2-futures" ,python2-futures)
14451 ,@(package-propagated-inputs base))))))
14453 (define-public python-requests-file
14455 (name "python-requests-file")
14460 (uri (pypi-uri "requests-file" version))
14463 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14464 (build-system python-build-system)
14466 `(("python-requests" ,python-requests)
14467 ("python-six" ,python-six)))
14469 "https://github.com/dashea/requests-file")
14470 (synopsis "File transport adapter for Requests")
14472 "Requests-File is a transport adapter for use with the Requests Python
14473 library to allow local file system access via @code{file://} URLs.")
14474 (license license:asl2.0)))
14476 (define-public python2-requests-file
14477 (package-with-python2 python-requests-file))
14479 (define-public python-tldextract
14481 (name "python-tldextract")
14486 (uri (pypi-uri "tldextract" version))
14489 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14490 (build-system python-build-system)
14492 `(("python-pytest" ,python-pytest)
14493 ("python-responses" ,python-responses)))
14495 `(("python-idna" ,python-idna)
14496 ("python-requests" ,python-requests)
14497 ("python-requests-file" ,python-requests-file)))
14499 "https://github.com/john-kurkowski/tldextract")
14501 "Separate the TLD from the registered domain and subdomains of a URL")
14503 "TLDExtract accurately separates the TLD from the registered domain and
14504 subdomains of a URL, using the Public Suffix List. By default, this includes
14505 the public ICANN TLDs and their exceptions. It can optionally support the
14506 Public Suffix List's private domains as well.")
14507 (license license:bsd-3)))
14509 (define-public python2-tldextract
14510 (package-with-python2 python-tldextract))
14512 (define-public python-pynamecheap
14514 (name "python-pynamecheap")
14519 (uri (pypi-uri "PyNamecheap" version))
14522 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14523 (build-system python-build-system)
14525 `(("python-requests" ,python-requests)))
14527 "https://github.com/Bemmu/PyNamecheap")
14529 "Namecheap API client in Python")
14531 "PyNamecheap is a Namecheap API client in Python.")
14532 (license license:expat)))
14534 (define-public python2-pynamecheap
14535 (package-with-python2 python-pynamecheap))
14537 (define-public python-dns-lexicon
14539 (name "python-dns-lexicon")
14544 (uri (pypi-uri "dns-lexicon" version))
14547 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14548 (build-system python-build-system)
14550 `(#:tests? #f)) ;requires internet access
14552 `(("python-future" ,python-future)
14553 ("python-pynamecheap" ,python-pynamecheap)
14554 ("python-requests" ,python-requests)
14555 ("python-tldextract" ,python-tldextract)
14556 ("python-urllib3" ,python-urllib3)))
14557 (home-page "https://github.com/AnalogJ/lexicon")
14559 "Manipulate DNS records on various DNS providers")
14561 "Lexicon provides a way to manipulate DNS records on multiple DNS
14562 providers in a standardized way. It has a CLI but it can also be used as a
14563 Python library. It was designed to be used in automation, specifically with
14565 (license license:expat)))
14567 (define-public python2-dns-lexicon
14568 (package-with-python2 python-dns-lexicon))
14570 (define-public python-commandlines
14572 (name "python-commandlines")
14577 (uri (pypi-uri "commandlines" version))
14580 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14581 (build-system python-build-system)
14582 (home-page "https://github.com/chrissimpkins/commandlines")
14583 (synopsis "Command line argument to object parsing library")
14585 "@code{Commandlines} is a Python library for command line application
14586 development that supports command line argument parsing, command string
14587 validation testing and application logic.")
14588 (license license:expat)))
14590 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14591 ;; python-numba. They have a very unflexible relationship.
14592 (define-public python-numba
14594 (name "python-numba")
14599 (uri (pypi-uri "numba" version))
14602 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
14603 (build-system python-build-system)
14605 `(#:modules ((guix build utils)
14606 (guix build python-build-system)
14611 (modify-phases %standard-phases
14612 (add-after 'unpack 'disable-proprietary-features
14614 (setenv "NUMBA_DISABLE_HSA" "1")
14615 (setenv "NUMBA_DISABLE_CUDA" "1")
14617 (add-after 'unpack 'remove-failing-tests
14619 ;; FIXME: these tests fail for unknown reasons:
14620 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14621 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14622 (substitute* "numba/tests/test_dispatcher.py"
14623 (("def test(_non_writable_pycache)" _ m)
14624 (string-append "def guix_skip" m))
14625 (("def test(_non_creatable_pycache)" _ m)
14626 (string-append "def guix_skip" m))
14627 (("def test(_frozen)" _ m)
14628 (string-append "def guix_skip" m)))
14630 ;; These tests fail because we don't run the tests from the build
14631 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14632 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14633 (substitute* "numba/tests/test_pycc.py"
14634 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14635 (string-append "def guix_skip" m)))
14639 (let ((cwd (getcwd)))
14640 (setenv "PYTHONPATH"
14641 (string-append cwd "/build/"
14642 (find (cut string-prefix? "lib" <>)
14643 (scandir (string-append cwd "/build")))
14645 (getenv "PYTHONPATH")))
14646 ;; Something is wrong with the PYTHONPATH when running the
14647 ;; tests from the build directory, as it complains about not being
14648 ;; able to import certain modules.
14649 (with-directory-excursion "/tmp"
14650 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14653 `(("python-llvmlite" ,python-llvmlite)
14654 ("python-numpy" ,python-numpy)
14655 ("python-singledispatch" ,python-singledispatch)))
14656 ;; Needed for tests.
14658 `(("python-jinja2" ,python-jinja2)
14659 ("python-pygments" ,python-pygments)))
14660 (home-page "https://numba.pydata.org")
14661 (synopsis "Compile Python code using LLVM")
14662 (description "Numba gives you the power to speed up your applications with
14663 high performance functions written directly in Python. With a few
14664 annotations, array-oriented and math-heavy Python code can be just-in-time
14665 compiled to native machine instructions, similar in performance to C, C++ and
14666 Fortran, without having to switch languages or Python interpreters.
14668 Numba works by generating optimized machine code using the LLVM compiler
14669 infrastructure at import time, runtime, or statically (using the included pycc
14671 (license license:bsd-3)))
14673 (define-public python-anndata
14675 (name "python-anndata")
14680 (uri (pypi-uri "anndata" version))
14683 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
14684 (build-system python-build-system)
14686 `(("python-h5py" ,python-h5py)
14687 ("python-natsort" ,python-natsort)
14688 ("python-pandas" ,python-pandas)
14689 ("python-scipy" ,python-scipy)))
14690 (home-page "https://github.com/theislab/anndata")
14691 (synopsis "Annotated data for data analysis pipelines")
14692 (description "Anndata is a package for simple (functional) high-level APIs
14693 for data analysis pipelines. In this context, it provides an efficient,
14694 scalable way of keeping track of data together with learned annotations and
14695 reduces the code overhead typically encountered when using a mostly
14696 object-oriented library such as @code{scikit-learn}.")
14697 (license license:bsd-3)))
14699 (define-public python-dill
14701 (name "python-dill")
14706 (uri (pypi-uri "dill" version))
14708 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
14709 (build-system python-build-system)
14710 ;; FIXME: The check phase fails with "don't know how to make test from: …".
14711 (arguments '(#:tests? #f))
14712 (home-page "https://pypi.org/project/dill")
14713 (synopsis "Serialize all of Python")
14714 (description "Dill extends Python's @code{pickle} module for serializing
14715 and de-serializing Python objects to the majority of the built-in Python
14716 types. Dill provides the user the same interface as the @code{pickle} module,
14717 and also includes some additional features. In addition to pickling Python
14718 objects, @code{dill} provides the ability to save the state of an interpreter
14719 session in a single command. Hence, it would be feasible to save a
14720 interpreter session, close the interpreter, ship the pickled file to another
14721 computer, open a new interpreter, unpickle the session and thus continue from
14722 the saved state of the original interpreter session.")
14723 (license license:bsd-3)))
14725 (define-public python-multiprocess
14727 (name "python-multiprocess")
14728 (version "0.70.6.1")
14732 (uri (pypi-uri "multiprocess" version))
14735 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14736 (build-system python-build-system)
14738 `(("python-dill" ,python-dill)))
14739 (home-page "https://pypi.org/project/multiprocess")
14740 (synopsis "Multiprocessing and multithreading in Python")
14742 "This package is a fork of the multiprocessing Python package, a package
14743 which supports the spawning of processes using the API of the standard
14744 library's @code{threading} module.")
14745 (license license:bsd-3)))
14747 (define-public python-toolz
14749 (name "python-toolz")
14754 (uri (pypi-uri "toolz" version))
14757 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14758 (build-system python-build-system)
14759 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14760 ;; unregistered loader type"
14761 (arguments '(#:tests? #f))
14762 (home-page "https://github.com/pytoolz/toolz/")
14763 (synopsis "List processing tools and functional utilities")
14765 "This package provides a set of utility functions for iterators,
14766 functions, and dictionaries.")
14767 (license license:bsd-3)))
14769 (define-public python2-toolz
14770 (package-with-python2 python-toolz))
14772 (define-public python-cytoolz
14774 (name "python-cytoolz")
14775 (version "0.9.0.1")
14779 (uri (pypi-uri "cytoolz" version))
14782 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14783 (build-system python-build-system)
14784 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14786 (arguments '(#:tests? #f))
14788 `(("python-toolz" ,python-toolz)))
14790 `(("python-cython" ,python-cython)))
14791 (home-page "https://github.com/pytoolz/cytoolz")
14792 (synopsis "High performance functional utilities")
14794 "The cytoolz package implements the same API as provided by toolz. The
14795 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14796 that is accessible to other projects developed in Cython.")
14797 (license license:bsd-3)))
14799 (define-public python-sortedcontainers
14801 (name "python-sortedcontainers")
14806 (uri (pypi-uri "sortedcontainers" version))
14809 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14810 (build-system python-build-system)
14812 `(("python-tox" ,python-tox)))
14813 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14814 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14816 "This package provides a sorted collections library, written in
14818 (license license:asl2.0)))
14820 (define-public python-cloudpickle
14822 (name "python-cloudpickle")
14827 (uri (pypi-uri "cloudpickle" version))
14830 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14831 (build-system python-build-system)
14832 ;; FIXME: there are 5 errors in 122 tests:
14833 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14834 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14835 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14836 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14837 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14838 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14839 (arguments '(#:tests? #f))
14841 `(("python-pytest" ,python-pytest)
14842 ("python-mock" ,python-mock)
14843 ("python-tornado" ,python-tornado)))
14844 (home-page "https://github.com/cloudpipe/cloudpickle")
14845 (synopsis "Extended pickling support for Python objects")
14847 "Cloudpickle makes it possible to serialize Python constructs not
14848 supported by the default pickle module from the Python standard library. It
14849 is especially useful for cluster computing where Python expressions are
14850 shipped over the network to execute on remote hosts, possibly close to the
14852 (license license:bsd-3)))
14854 (define-public python2-cloudpickle
14855 (package-with-python2 python-cloudpickle))
14857 (define-public python-locket
14859 (name "python-locket")
14864 (uri (pypi-uri "locket" version))
14867 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14868 (build-system python-build-system)
14869 (home-page "https://github.com/mwilliamson/locket.py")
14870 (synopsis "File-based locks for Python")
14872 "Locket implements a lock that can be used by multiple processes provided
14873 they use the same path.")
14874 (license license:bsd-2)))
14876 (define-public python2-locket
14877 (package-with-python2 python-locket))
14879 (define-public python-blosc
14881 (name "python-blosc")
14886 (uri (pypi-uri "blosc" version))
14889 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14890 (build-system python-build-system)
14891 ;; FIXME: all tests pass, but then this error is printed:
14892 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14893 (arguments '(#:tests? #f))
14895 `(("python-numpy" ,python-numpy)))
14896 (home-page "https://github.com/blosc/python-blosc")
14897 (synopsis "Python wrapper for the Blosc data compressor library")
14898 (description "Blosc is a high performance compressor optimized for binary
14899 data. It has been designed to transmit data to the processor cache faster
14900 than the traditional, non-compressed, direct memory fetch approach via a
14901 @code{memcpy()} system call.
14903 Blosc works well for compressing numerical arrays that contains data with
14904 relatively low entropy, like sparse data, time series, grids with
14905 regular-spaced values, etc.
14907 This Python package wraps the Blosc library.")
14908 (license license:bsd-3)))
14910 (define-public python2-blosc
14911 (package-with-python2 python-blosc))
14913 (define-public python-partd
14915 (name "python-partd")
14920 (uri (pypi-uri "partd" version))
14923 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14924 (build-system python-build-system)
14926 `(("python-blosc" ,python-blosc)
14927 ("python-locket" ,python-locket)
14928 ("python-numpy" ,python-numpy)
14929 ("python-pandas" ,python-pandas)
14930 ("python-pyzmq" ,python-pyzmq)
14931 ("python-toolz" ,python-toolz)))
14932 (home-page "https://github.com/dask/partd/")
14933 (synopsis "Appendable key-value storage")
14934 (description "Partd stores key-value pairs. Values are raw bytes. We
14935 append on old values. Partd excels at shuffling operations.")
14936 (license license:bsd-3)))
14938 (define-public python2-partd
14939 (package-with-python2 python-partd))
14941 (define-public python-dask
14943 (name "python-dask")
14948 (uri (pypi-uri "dask" version))
14951 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
14952 (build-system python-build-system)
14953 ;; A single test out of 5000+ fails. This test is marked as xfail when
14954 ;; pytest-xdist is used.
14957 (modify-phases %standard-phases
14958 (add-after 'unpack 'disable-broken-test
14960 (substitute* "dask/tests/test_threaded.py"
14961 (("def test_interrupt\\(\\)" m)
14962 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14964 (when (which "python2")
14965 ;; This test fails with recent Pandas:
14966 ;; <https://github.com/dask/dask/issues/3794>.
14967 (substitute* "dask/dataframe/tests/test_dataframe.py"
14968 (("def test_info\\(\\)" m)
14969 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14973 (lambda _ (invoke "pytest" "-vv"))))))
14975 `(("python-cloudpickle" ,python-cloudpickle)
14976 ("python-numpy" ,python-numpy)
14977 ("python-pandas" ,python-pandas)
14978 ("python-partd" ,python-partd)
14979 ("python-toolz" ,python-toolz)
14980 ("python-pyyaml" ,python-pyyaml)))
14982 `(("python-pytest" ,python-pytest)
14983 ("python-pytest-runner" ,python-pytest-runner)))
14984 (home-page "https://github.com/dask/dask/")
14985 (synopsis "Parallel computing with task scheduling")
14987 "Dask is a flexible parallel computing library for analytics. It
14988 consists of two components: dynamic task scheduling optimized for computation,
14989 and large data collections like parallel arrays, dataframes, and lists that
14990 extend common interfaces like NumPy, Pandas, or Python iterators to
14991 larger-than-memory or distributed environments. These parallel collections
14992 run on top of the dynamic task schedulers. ")
14993 (license license:bsd-3)))
14995 (define-public python2-dask
14996 (package-with-python2 python-dask))
14998 (define-public python-ilinkedlist
15000 (name "python-ilinkedlist")
15005 (uri (pypi-uri "ilinkedlist" version))
15008 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15009 (build-system python-build-system)
15010 (native-inputs `(("python-pytest" ,python-pytest)))
15011 (inputs `(("python" ,python)))
15012 (home-page "https://github.com/luther9/ilinkedlist-py")
15013 (synopsis "Immutable linked list library")
15015 "This is a implementation of immutable linked lists for Python. It
15016 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15017 Since a linked list is treated as immutable, it is hashable, and its length
15018 can be retrieved in constant time. Some of the terminology is inspired by
15019 LISP. It is possible to create an improper list by creating a @code{Pair}
15020 with a non-list @code{cdr}.")
15021 (license license:gpl3+)))
15023 (define-public python-readlike
15025 (name "python-readlike")
15030 (uri (pypi-uri "readlike" version))
15032 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15033 (build-system python-build-system)
15034 (home-page "https://github.com/jangler/readlike")
15035 (synopsis "GNU Readline-like line editing module")
15037 "This Python module provides line editing functions similar to the default
15038 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15039 @code{readline} package, this one allows access to those capabilties in settings
15040 outside of a standard command-line interface. It is especially well-suited to
15041 interfacing with Urwid, due to a shared syntax for describing key inputs.
15043 Currently, all stateless Readline commands are implemented. Yanking and history
15044 are not supported.")
15045 (license license:expat)))
15047 (define-public python2-readlike
15048 (package-with-python2 python-readlike))
15050 (define-public python-reparser
15052 (name "python-reparser")
15057 (uri (pypi-uri "ReParser" version))
15059 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15060 (build-system python-build-system)
15061 (home-page "https://github.com/xmikos/reparser")
15062 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15064 "This Python library provides a simple lexer/parser for inline markup based
15065 on regular expressions.")
15066 (license license:expat)))
15068 (define-public python2-reparser
15069 (let ((reparser (package-with-python2
15070 (strip-python2-variant python-reparser))))
15071 (package (inherit reparser)
15073 `(("python2-enum34" ,python2-enum34)
15074 ,@(package-propagated-inputs reparser))))))
15076 (define-public python-precis-i18n
15078 (name "python-precis-i18n")
15083 (uri (pypi-uri "precis_i18n" version))
15086 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15087 (build-system python-build-system)
15088 (home-page "https://github.com/byllyfish/precis_i18n")
15089 (synopsis "Implementation of the PRECIS framework")
15091 "This module implements the PRECIS Framework as described in RFC 8264,
15092 RFC 8265 and RFC 8266.")
15093 (license license:expat)))
15095 (define-public python-absl-py
15097 (name "python-absl-py")
15102 (uri (pypi-uri "absl-py" version))
15105 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15106 (build-system python-build-system)
15108 `(("python-six" ,python-six)))
15109 (home-page "https://github.com/abseil/abseil-py")
15110 (synopsis "Abseil Python common libraries")
15112 "This package provides the Abseil Python Common Libraries, a collection
15113 of Python libraries for building Python applications.")
15114 (license license:asl2.0)))
15116 (define-public python-astor
15118 (name "python-astor")
15123 (uri (pypi-uri "astor" version))
15126 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15127 (build-system python-build-system)
15128 ;; FIXME: There are two errors and two test failures.
15129 (arguments `(#:tests? #f))
15130 (home-page "https://github.com/berkerpeksag/astor")
15131 (synopsis "Read and write Python ASTs")
15132 (description "Astor is designed to allow easy manipulation of Python
15133 source via the Abstract Syntax Tree.")
15134 (license license:bsd-3)))
15136 (define-public python2-astor
15137 (package-with-python2 python-astor))
15139 (define-public python-grpcio
15141 (name "python-grpcio")
15146 (uri (pypi-uri "grpcio" version))
15149 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15150 (build-system python-build-system)
15152 `(("python-six" ,python-six)))
15153 (home-page "https://grpc.io")
15154 (synopsis "HTTP/2-based RPC framework")
15155 (description "This package provides a Python library for communicating
15156 with the HTTP/2-based RPC framework gRPC.")
15157 (license license:asl2.0)))
15159 (define-public python-astunparse
15161 (name "python-astunparse")
15166 (uri (pypi-uri "astunparse" version))
15169 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15170 (build-system python-build-system)
15171 (arguments '(#:tests? #f)) ; there are none
15173 `(("python-six" ,python-six)
15174 ("python-wheel" ,python-wheel)))
15175 (home-page "https://github.com/simonpercivall/astunparse")
15176 (synopsis "AST unparser for Python")
15177 (description "This package provides an AST unparser for Python. It is a
15178 factored out version of @code{unparse} found in the Python source
15180 (license license:bsd-3)))
15182 (define-public python-gast
15184 (name "python-gast")
15189 (uri (pypi-uri "gast" version))
15191 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15192 (build-system python-build-system)
15194 `(("python-astunparse" ,python-astunparse)))
15195 (home-page "https://pypi.org/project/gast/")
15196 (synopsis "Generic Python AST that abstracts the underlying Python version")
15198 "GAST provides a compatibility layer between the AST of various Python
15199 versions, as produced by @code{ast.parse} from the standard @code{ast}
15201 (license license:bsd-3)))
15203 (define-public python-wikidata
15205 (name "python-wikidata")
15210 (uri (pypi-uri "Wikidata" version))
15213 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15214 (build-system python-build-system)
15216 `(("python-babel" ,python-babel)))
15217 (home-page "https://github.com/dahlia/wikidata")
15218 (synopsis "Wikidata client library")
15220 "This package provides a Python interface to
15221 @url{https://www.wikidata.org/, Wikidata}.")
15222 (properties '((upstream-name . "Wikidata")))
15223 (license license:gpl3+)))
15225 (define-public python-doctest-ignore-unicode
15227 (name "python-doctest-ignore-unicode")
15232 (uri (pypi-uri "doctest-ignore-unicode" version))
15235 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15236 (build-system python-build-system)
15238 `(("python-nose" ,python-nose)))
15239 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15240 (synopsis "Ignore Unicode literal prefixes in doctests")
15242 "This package adds support for a flag to ignore Unicode literal prefixes
15244 (license license:asl2.0)))
15246 (define-public python-attr
15248 (name "python-attr")
15253 (uri (pypi-uri "attr" version))
15256 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15257 (build-system python-build-system)
15258 (home-page "https://github.com/denis-ryzhkov/attr")
15259 (synopsis "Decorator for attributes of target function or class")
15260 (description "Simple decorator to set attributes of target function or
15261 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15262 (license license:expat)))
15264 (define-public python-construct
15266 (name "python-construct")
15271 (uri (pypi-uri "construct" version))
15274 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15275 (build-system python-build-system)
15277 `(#:tests? #f)) ; No tests exist.
15279 `(("python-extras" ,python-extras)
15280 ("python-arrow" ,python-arrow)
15281 ("python-numpy" ,python-numpy)
15282 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15283 (home-page "http://construct.readthedocs.io")
15284 (synopsis "Declarative and symmetrical parser and builder for binary data")
15286 "This package provides both simple, atomic constructs (such as
15287 integers of various sizes), as well as composite ones which allow you
15288 form hierarchical and sequential structures of increasing complexity.
15289 It features bit and byte granularity, easy debugging and testing, an
15290 easy-to-extend subclass system, and lots of primitive constructs to
15291 make your work easier.")
15292 (license license:expat)))
15294 (define-public python-humanize
15296 (name "python-humanize")
15301 (uri (pypi-uri "humanize" version))
15304 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15306 '(#:tests? #f)) ; tests not in pypi archive
15307 (build-system python-build-system)
15308 (home-page "https://github.com/jmoiron/humanize")
15309 (synopsis "Print numerical information in a human-readable form")
15310 (description "This package provides a Python module that displays numbers
15311 and dates in \"human readable\" forms. For example, it would display
15312 \"12345591313\" as \"12.3 billion\".")
15313 (license license:expat)))
15315 (define-public python-txaio
15317 (name "python-txaio")
15322 (uri (pypi-uri "txaio" version))
15325 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15326 (build-system python-build-system)
15328 `(("python-twisted" ,python-twisted)
15329 ("python-six" ,python-six)))
15330 (home-page "https://github.com/crossbario/txaio")
15331 (synopsis "Compatibility layer between Python asyncio and Twisted")
15332 (description "Txaio provides a compatibility layer between the Python
15333 @code{asyncio} module and @code{Twisted}.")
15334 (license license:expat)))
15336 (define-public python-toolshed
15338 (name "python-toolshed")
15343 (uri (pypi-uri "toolshed" version))
15346 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15347 (build-system python-build-system)
15349 `(("python-nose" ,python-nose)))
15350 (home-page "https://github.com/brentp/toolshed/")
15351 (synopsis "Collection of modules and functions for working with data")
15352 (description "This is a collection of well-tested, simple modules and
15353 functions that aim to reduce boilerplate when working with data.")
15354 (license license:bsd-2)))
15356 (define-public python-annoy
15358 (name "python-annoy")
15363 (uri (pypi-uri "annoy" version))
15366 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15367 (build-system python-build-system)
15369 `(("python-nose" ,python-nose)))
15370 (home-page "https://github.com/spotify/annoy/")
15371 (synopsis "Approximate nearest neighbors library")
15373 "Annoy is a C++ library with Python bindings to search for points in
15374 space that are close to a given query point. It also creates large read-only
15375 file-based data structures that are @code{mmap}ped into memory so that many
15376 processes may share the same data.")
15377 (license license:asl2.0)))
15379 (define-public python-pylzma
15381 (name "python-pylzma")
15386 (uri (pypi-uri "pylzma" version))
15389 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15390 (build-system python-build-system)
15391 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15392 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15393 (description "This package provides Python bindings for the LZMA library
15395 (license license:lgpl2.1+)))
15397 (define-public python2-pylzma
15398 (package-with-python2 python-pylzma))