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-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 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, 2019 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, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
71 ;;; This file is part of GNU Guix.
73 ;;; GNU Guix is free software; you can redistribute it and/or modify it
74 ;;; under the terms of the GNU General Public License as published by
75 ;;; the Free Software Foundation; either version 3 of the License, or (at
76 ;;; your option) any later version.
78 ;;; GNU Guix is distributed in the hope that it will be useful, but
79 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81 ;;; GNU General Public License for more details.
83 ;;; You should have received a copy of the GNU General Public License
84 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86 (define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
98 #:use-module (gnu packages dbm)
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages graphviz)
108 #:use-module (gnu packages graphics)
109 #:use-module (gnu packages gstreamer)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages icu4c)
112 #:use-module (gnu packages image)
113 #:use-module (gnu packages imagemagick)
114 #:use-module (gnu packages libevent)
115 #:use-module (gnu packages libffi)
116 #:use-module (gnu packages linux)
117 #:use-module (gnu packages llvm)
118 #:use-module (gnu packages man)
119 #:use-module (gnu packages maths)
120 #:use-module (gnu packages monitoring)
121 #:use-module (gnu packages multiprecision)
122 #:use-module (gnu packages networking)
123 #:use-module (gnu packages ncurses)
124 #:use-module (gnu packages openstack)
125 #:use-module (gnu packages pcre)
126 #:use-module (gnu packages perl)
127 #:use-module (gnu packages pkg-config)
128 #:use-module (gnu packages python)
129 #:use-module (gnu packages python-check)
130 #:use-module (gnu packages python-compression)
131 #:use-module (gnu packages python-crypto)
132 #:use-module (gnu packages python-science)
133 #:use-module (gnu packages python-web)
134 #:use-module (gnu packages qt)
135 #:use-module (gnu packages readline)
136 #:use-module (gnu packages sdl)
137 #:use-module (gnu packages search)
138 #:use-module (gnu packages shells)
139 #:use-module (gnu packages sphinx)
140 #:use-module (gnu packages ssh)
141 #:use-module (gnu packages terminals)
142 #:use-module (gnu packages tex)
143 #:use-module (gnu packages texinfo)
144 #:use-module (gnu packages time)
145 #:use-module (gnu packages tls)
146 #:use-module (gnu packages version-control)
147 #:use-module (gnu packages video)
148 #:use-module (gnu packages web)
149 #:use-module (gnu packages base)
150 #:use-module (gnu packages xml)
151 #:use-module (gnu packages xorg)
152 #:use-module (gnu packages xdisorg)
153 #:use-module (gnu packages tcl)
154 #:use-module (gnu packages bdw-gc)
155 #:use-module (gnu packages serialization)
156 #:use-module (guix packages)
157 #:use-module (guix download)
158 #:use-module (guix git-download)
159 #:use-module (guix hg-download)
160 #:use-module (guix utils)
161 #:use-module (guix build-system gnu)
162 #:use-module (guix build-system cmake)
163 #:use-module (guix build-system python)
164 #:use-module (guix build-system trivial)
165 #:use-module (srfi srfi-1)
166 #:use-module (srfi srfi-26))
168 (define-public python-psutil
170 (name "python-psutil")
175 (uri (pypi-uri "psutil" version))
177 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
178 (build-system python-build-system)
180 ;; FIXME: some tests does not return and times out.
182 (home-page "https://www.github.com/giampaolo/psutil")
183 (synopsis "Library for retrieving information on running processes")
185 "psutil (Python system and process utilities) is a library for retrieving
186 information on running processes and system utilization (CPU, memory, disks,
187 network) in Python. It is useful mainly for system monitoring, profiling and
188 limiting process resources and management of running processes. It implements
189 many functionalities offered by command line tools such as: ps, top, lsof,
190 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
191 pidof, tty, taskset, pmap.")
192 (properties `((python2-variant . ,(delay python2-psutil))))
193 (license license:bsd-3)))
195 (define-public python2-psutil
196 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
200 `(("python2-enum34" ,python2-enum34) ;optional
201 ,@(package-propagated-inputs base))))))
203 (define-public python-shapely
205 (name "python-shapely")
206 (version "1.6.4.post2")
210 (uri (pypi-uri "Shapely" version))
213 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
214 (build-system python-build-system)
216 `(("python-cython" ,python-cython)
217 ("python-matplotlib" ,python-matplotlib)
218 ("python-pytest" ,python-pytest)
219 ("python-pytest-cov" ,python-pytest-cov)))
223 `(("python-numpy" ,python-numpy)))
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-geos-path
228 (lambda* (#:key inputs #:allow-other-keys)
229 (let ((geos (assoc-ref inputs "geos"))
230 (glibc (assoc-ref inputs ,(if (%current-target-system)
231 "cross-libc" "libc"))))
232 (substitute* "shapely/geos.py"
233 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
234 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
235 geos "/lib/libgeos_c.so'])"))
236 (("free = load_dll\\('c'\\)\\.free")
237 (string-append "free = load_dll('c', fallbacks=['"
238 glibc "/lib/libc.so.6']).free"))))
240 (home-page "https://github.com/Toblerity/Shapely")
241 (synopsis "Library for the manipulation and analysis of geometric objects")
242 (description "Shapely is a Python package for manipulation and analysis of
243 planar geometric objects. It is based on the @code{GEOS} library.")
244 (license license:bsd-3)))
246 (define-public python-shortuuid
248 (name "python-shortuuid")
253 (uri (pypi-uri "shortuuid" version))
256 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
257 (build-system python-build-system)
259 `(("python-pep8" ,python-pep8)))
260 (home-page "https://github.com/skorokithakis/shortuuid")
261 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
263 "@code{shortuuid} is a Python library for generating concise, unambiguous
264 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
265 module and then similar looking characters are removed.")
266 (license license:bsd-3)))
268 (define-public python-logwrap
270 (name "python-logwrap")
275 (uri (pypi-uri "logwrap" version ".zip"))
278 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
279 (build-system python-build-system)
281 `(("python-six" ,python-six)
282 ("python-typing" ,python-typing)))
285 ("python-cython" ,python-cython)
286 ("python-pytest" ,python-pytest)
287 ("python-pytest-cov" ,python-pytest-cov)
288 ("python-pytest-runner" ,python-pytest-runner)))
289 (home-page "https://github.com/penguinolog/logwrap")
290 (synopsis "Decorator for logging function arguments")
291 (description "This package provides a decorator to log function arguments
292 and function call return values in a human-readable way.")
293 (license license:asl2.0)))
295 (define-public python2-shapely
296 (package-with-python2 python-shapely))
298 (define-public python-clyent
300 (name "python-clyent")
305 (uri (pypi-uri "clyent" version))
308 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
309 (build-system python-build-system)
311 `(("python-mock" ,python-mock)))
312 (home-page "https://github.com/binstar/clyent")
313 (synopsis "Command line client library")
314 (description "Clyent is a Python command line utiliy library. It is used
315 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
316 (license license:bsd-3)))
318 (define-public python2-clyent
319 (package-with-python2 python-clyent))
321 (define-public python-babel
323 (name "python-babel")
328 (uri (pypi-uri "Babel" version))
331 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
332 (build-system python-build-system)
334 `(("python-freezegun" ,python-freezegun)
335 ("python-pytest" ,python-pytest)))
337 `(("python-pytz" ,python-pytz)))
339 `(#:phases (modify-phases %standard-phases
342 (invoke "pytest" "-vv" "-k"
344 ;; XXX: These tests fail when using Pytest 4.x and
345 ;; Babel 2.6.0. Try removing this for later versions.
346 "not test_no_inherit_metazone_marker_never_in_output"
347 " and not test_smoke_dates"
348 " and not test_smoke_numbers")))))))
349 (home-page "http://babel.pocoo.org/")
351 "Tools for internationalizing Python applications")
353 "Babel is composed of two major parts:
354 - tools to build and work with gettext message catalogs
355 - a Python interface to the CLDR (Common Locale Data Repository), providing
356 access to various locale display names, localized number and date formatting,
358 (license license:bsd-3)))
360 (define-public python2-babel
361 (package-with-python2 python-babel))
363 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
364 (define-public python2-babel-2.6
366 (inherit python2-babel)
370 (uri (pypi-uri "Babel" version))
373 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
375 (define-public python2-backport-ssl-match-hostname
377 (name "python2-backport-ssl-match-hostname")
382 (uri (pypi-uri "backports.ssl_match_hostname" version))
385 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
386 (build-system python-build-system)
389 #:tests? #f)) ; no test target
390 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
391 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
393 "This backport brings the ssl.match_hostname() function to users of
394 earlier versions of Python. The function checks the hostname in the
395 certificate returned by the server to which a connection has been established,
396 and verifies that it matches the intended target hostname.")
397 (license license:psfl)))
399 (define-public python-boolean.py
401 (name "python-boolean.py")
405 ;; There's no source tarball on PyPI.
408 (url "https://github.com/bastikr/boolean.py")
409 (commit (string-append "v" version))))
410 (file-name (git-file-name name version))
412 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
413 (build-system python-build-system)
414 (home-page "https://github.com/bastikr/boolean.py")
415 (synopsis "Boolean algebra in one Python module")
417 "This is a small Python library that implements boolean algebra.
418 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
419 @code{Symbol} class that can take on one of these two values. Calculations
420 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
421 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
422 Expressions are constructed from parsed strings or directly in Python.")
423 (license license:bsd-2)))
425 (define-public python-hdf4
432 (uri (pypi-uri name version))
435 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
436 (build-system python-build-system)
437 (native-inputs `(("nose" ,python-nose)))
438 (propagated-inputs `(("numpy" ,python-numpy)))
445 (modify-phases %standard-phases
448 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
449 ;; on to import numpy. Somehow this works on their CI system.
450 ;; Let's just manage PYTHONPATH here instead.
451 (substitute* "runexamples.sh"
452 (("export PYTHONPATH=.*") ""))
454 (string-append (getcwd) ":"
455 (getenv "PYTHONPATH")))
456 (invoke "./runexamples.sh")
457 (invoke "nosetests" "-v"))))))
458 (home-page "https://github.com/fhs/python-hdf4")
459 (synopsis "Python interface to the NCSA HDF4 library")
461 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
462 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
463 NetCDF files can also be read and modified. Python-HDF4 is a fork of
464 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
465 (license license:expat)))
467 (define-public python2-hdf4
468 (package-with-python2 python-hdf4))
470 (define-public python-h5py
477 (uri (pypi-uri "h5py" version))
480 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
481 (build-system python-build-system)
483 `(#:tests? #f ; no test target
485 (modify-phases %standard-phases
486 (add-after 'unpack 'fix-hdf5-paths
487 (lambda* (#:key inputs #:allow-other-keys)
488 (let ((prefix (assoc-ref inputs "hdf5")))
489 (substitute* "setup_build.py"
490 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
491 (string-append "['" prefix "/lib" "']"))
492 (("'/opt/local/include', '/usr/local/include'")
493 (string-append "'" prefix "/include" "'")))
494 (substitute* "setup_configure.py"
495 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']")))
499 `(("python-six" ,python-six)
500 ("python-numpy" ,python-numpy)))
504 `(("python-cython" ,python-cython)
505 ("python-pkgconfig" ,python-pkgconfig)))
506 (home-page "http://www.h5py.org/")
507 (synopsis "Read and write HDF5 files from Python")
509 "The h5py package provides both a high- and low-level interface to the
510 HDF5 library from Python. The low-level interface is intended to be a
511 complete wrapping of the HDF5 API, while the high-level component supports
512 access to HDF5 files, datasets and groups using established Python and NumPy
514 (license license:bsd-3)))
516 (define-public python2-h5py
517 (package-with-python2 python-h5py))
519 (define-public python-sh
526 (uri (pypi-uri "sh" version))
529 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
530 (build-system python-build-system)
533 (modify-phases %standard-phases
536 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
537 (setenv "HOME" "/tmp")
538 (invoke "python" "sh.py" "test"))))))
540 `(("python-coverage" ,python-coverage)))
541 (home-page "https://github.com/amoffat/sh")
542 (synopsis "Python subprocess replacement")
543 (description "This package provides a replacement for Python's
544 @code{subprocess} feature.")
545 (license license:expat)))
547 (define-public python2-sh
548 (package-with-python2 python-sh))
550 (define-public python-cftime
552 (name "python-cftime")
557 (uri (pypi-uri "cftime" version))
559 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
560 (build-system python-build-system)
562 `(("python-numpy" ,python-numpy)))
564 `(("python-coveralls" ,python-coveralls)
565 ("python-cython" ,python-cython)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (home-page "https://github.com/Unidata/cftime")
568 (synopsis "Library for time handling")
570 "This package provides time-handling functionality that used to be part
571 of the netcdf4 package before.")
572 ;; This package claims to include code under the GPLv3 but is released
574 (license (list license:isc license:gpl3+))))
576 (define-public python-netcdf4
578 (name "python-netcdf4")
583 (uri (pypi-uri "netCDF4" version))
586 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
587 (build-system python-build-system)
590 (modify-phases %standard-phases
591 (add-after 'unpack 'configure-locations
592 (lambda* (#:key inputs #:allow-other-keys)
593 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
596 `(("python-cython" ,python-cython)))
598 `(("python-numpy" ,python-numpy)
599 ("python-cftime" ,python-cftime)))
604 (home-page "https://github.com/Unidata/netcdf4-python")
605 (synopsis "Python/numpy interface to the netCDF library")
606 (description "Netcdf4-python is a Python interface to the netCDF C
607 library. netCDF version 4 has many features not found in earlier
608 versions of the library and is implemented on top of HDF5. This module
609 can read and write files in both the new netCDF 4 and the old netCDF 3
610 format, and can create files that are readable by HDF5 clients. The
611 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
612 to users of that module.")
613 ;; The software is mainly ISC, but includes some files covered
614 ;; by the Expat license.
615 (license (list license:isc license:expat))))
617 (define-public python2-netcdf4
618 (package-with-python2 python-netcdf4))
620 (define-public python-license-expression
622 (name "python-license-expression")
627 (uri (pypi-uri "license-expression" version))
629 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
630 (build-system python-build-system)
632 `(("python-boolean.py" ,python-boolean.py)))
633 (home-page "https://github.com/nexB/license-expression")
634 (synopsis "Apply boolean logic to license expressions")
636 "This Python module defines a tiny language to evaluate and compare
637 license expressions using boolean logic. Logical combinations of licenses can
638 be tested for equality, containment, and equivalence. They can be normalised
639 and simplified. It supports SPDX license expressions as well as other naming
640 conventions and aliases in the same expression.")
641 (license license:gpl2+)))
643 (define-public python-lockfile
645 (name "python-lockfile")
650 (uri (pypi-uri "lockfile" version))
653 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
654 (build-system python-build-system)
655 (arguments '(#:test-target "check"))
657 `(("python-pbr" ,python-pbr)))
658 (home-page "https://launchpad.net/pylockfile")
659 (synopsis "Platform-independent file locking module")
661 "The lockfile package exports a LockFile class which provides a simple
662 API for locking files.")
663 (license license:expat)))
665 (define-public python2-lockfile
666 (package-with-python2 python-lockfile))
668 (define-public python-semantic-version
670 (name "python-semantic-version")
675 (uri (pypi-uri "semantic_version" version))
678 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
679 (build-system python-build-system)
681 `(#:tests? #f)) ; PyPI tarball lacks tests
682 (home-page "https://github.com/rbarrois/python-semanticversion")
683 (synopsis "Semantic versioning module for Python")
685 "The @code{semantic_version} class is a small library for handling
686 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
688 It can compare versions, generate a new version that represents a bump in one of
689 the version levels, and check whether any given string is a proper semantic
690 version identifier.")
691 (license license:bsd-3)))
693 (define-public python2-semantic-version
694 (package-with-python2 python-semantic-version))
696 (define-public python-serpent
698 (name "python-serpent")
703 (uri (pypi-uri "serpent" version))
705 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
706 (build-system python-build-system)
708 `(("python-attrs" ,python-attrs)
709 ("python-pytz" ,python-pytz)))
710 (home-page "https://github.com/irmen/Serpent")
711 (synopsis "Serializer for literal Python expressions")
713 "Serpent provides @code{ast.literal_eval()}-compatible object tree
714 serialization. It serializes an object tree into bytes (an utf-8 encoded
715 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
716 to rebuild the original object tree.
718 Because only safe literals are encoded, it is safe to send serpent data to
719 other machines, such as over the network.")
720 (license license:expat)))
722 (define-public python-setuptools
724 (name "python-setuptools")
729 (uri (pypi-uri "setuptools" version ".zip"))
732 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
733 (modules '((guix build utils)))
736 ;; Remove included binaries which are used to build self-extracting
737 ;; installers for Windows.
738 ;; TODO: Find some way to build them ourself so we can include them.
739 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 (build-system python-build-system)
742 ;; FIXME: Tests require pytest, which itself relies on setuptools.
743 ;; One could bootstrap with an internal untested setuptools.
746 (home-page "https://pypi.python.org/pypi/setuptools")
748 "Library designed to facilitate packaging Python projects")
750 "Setuptools is a fully-featured, stable library designed to facilitate
751 packaging Python projects, where packaging includes:
752 Python package and module definitions,
753 distribution package metadata,
755 project installation,
756 platform-specific details,
758 ;; TODO: setuptools now bundles the following libraries:
759 ;; packaging, pyparsing, six and appdirs. How to unbundle?
760 (license (list license:psfl ; setuptools itself
761 license:expat ; six, appdirs, pyparsing
762 license:asl2.0 ; packaging is dual ASL2/BSD-2
765 (define-public python2-setuptools
766 (package-with-python2 python-setuptools))
768 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
769 (define-public python-setuptools-for-tensorflow
772 (inherit python-setuptools)
775 (inherit (package-source python-setuptools))
776 (uri (pypi-uri "setuptools" version ".zip"))
779 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
781 (define-public python-uniseg
783 (name "python-uniseg")
788 (uri (pypi-uri "uniseg" version ".zip"))
791 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
792 (build-system python-build-system)
794 '(#:tests? #f)) ; The test suite requires network access.
798 "https://bitbucket.org/emptypage/uniseg-python")
800 "Python library to determine Unicode text segmentations")
802 "Uniseg is a Python package used to determine Unicode text segmentations.
803 Supported segmentations include:
805 @item @dfn{Code point} (any value in the Unicode codespace)
806 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
807 multiple Unicode code points, e.g. \"G\" + acute-accent)
812 (license license:expat)))
814 (define-public python2-uniseg
815 (package-with-python2 python-uniseg))
817 (define-public python-humanfriendly
819 (name "python-humanfriendly")
824 (uri (pypi-uri "humanfriendly" version))
827 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
828 (build-system python-build-system)
830 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
833 `(("python-monotonic" ,python-monotonic)))
834 (home-page "https://humanfriendly.readthedocs.io")
835 (synopsis "Human-friendly input and output in Python")
837 "The functions and classes in @code{humanfriendly} can be used to make
838 text interfaces more user-friendly. It includes tools to parse and format
839 numbers, file sizes, and timespans, timers for long-running operations, menus
840 to allow the user to choose from a list of options, and terminal interaction
842 (license license:expat)))
844 (define-public python2-humanfriendly
845 (package-with-python2 python-humanfriendly))
847 (define-public python-capturer
849 (name "python-capturer")
854 (uri (pypi-uri "capturer" version))
857 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
858 (build-system python-build-system)
862 `(("python-humanfriendly" ,python-humanfriendly)))
863 (home-page "https://capturer.readthedocs.io")
864 (synopsis "Capture stdout and stderr streams of the current process")
866 "The capturer package makes it easy to capture the stdout and stderr
867 streams of the current process and subprocesses. Output can be relayed
868 to the terminal in real time but is also available to the Python program
869 for additional processing.")
870 (license license:expat)))
872 (define-public python2-capturer
873 (package-with-python2 python-capturer))
875 (define-public python-case
882 (uri (pypi-uri "case" version))
885 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
886 (build-system python-build-system)
888 `(("python-mock" ,python-mock)
889 ("python-nose" ,python-nose)
890 ("python-six" ,python-six)
891 ("python-unittest2" ,python-unittest2)))
893 `(("python-coverage" ,python-coverage)))
894 (home-page "https://github.com/celery/case")
895 (synopsis "Unittest utilities and convenience methods")
897 "The @code{case} package provides utilities on top of unittest, including
898 some helpful Python 2 compatibility convenience methods.")
899 (license license:bsd-3)))
901 (define-public python-verboselogs
903 (name "python-verboselogs")
908 (uri (pypi-uri "verboselogs" version))
911 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
912 (build-system python-build-system)
915 (modify-phases %standard-phases
918 ;; Do not run pylint plugin test, as astroid is an old
919 ;; unsupported version.
920 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
921 "verboselogs/tests.py"))))))
923 `(("python-mock" ,python-mock)
924 ("python-pytest" ,python-pytest)))
925 (home-page "https://verboselogs.readthedocs.io")
926 (synopsis "Verbose logging level for Python's logging module")
928 "The @code{verboselogs} package extends Python's @code{logging} module to
929 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
930 (license license:expat)))
932 (define-public python2-verboselogs
933 (package-with-python2 python-verboselogs))
935 (define-public python-coloredlogs
937 (name "python-coloredlogs")
942 (uri (pypi-uri "coloredlogs" version))
945 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
946 (build-system python-build-system)
948 `(;Tests require some updated modules
951 `(("python-capturer" ,python-capturer)))
952 (home-page "https://coloredlogs.readthedocs.io")
953 (synopsis "Colored stream handler for Python's logging module")
955 "The @code{coloredlogs} package enables colored terminal output for
956 Python's logging module. The @code{ColoredFormatter} class inherits from
957 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
959 (license license:expat)))
961 (define-public python2-coloredlogs
962 (package-with-python2 python-coloredlogs))
964 (define-public python-editorconfig
966 (name "python-editorconfig")
971 (uri (pypi-uri "EditorConfig" version))
974 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
975 (build-system python-build-system)
976 (home-page "https://editorconfig.org/")
977 (synopsis "EditorConfig bindings for python")
978 (description "The EditorConfig project consists of a file format for
979 defining coding styles and a collection of text editor plugins that enable
980 editors to read the file format and adhere to defined styles. EditorConfig
981 files are easily readable and they work nicely with version control systems.")
982 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
983 (license (list license:bsd-2 license:psfl))))
985 (define-public python-et-xmlfile
987 (name "python-et-xmlfile")
992 (uri (pypi-uri "et_xmlfile" version))
995 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
996 (build-system python-build-system)
998 `(#:phases (modify-phases %standard-phases
1001 (invoke "pytest"))))))
1003 `(("python-pytest" ,python-pytest)
1004 ("python-lxml" ,python-lxml))) ;used for the tests
1005 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1006 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1007 (description "This Python library is based upon the @code{xmlfile} module
1008 from @code{lxml}. It aims to provide a low memory, compatible implementation
1009 of @code{xmlfile}.")
1010 (license license:expat)))
1012 (define-public python2-et-xmlfile
1013 (package-with-python2 python-et-xmlfile))
1015 (define-public python-openpyxl
1017 (name "python-openpyxl")
1021 ;; We use the upstream repository, as the tests are not included in the
1025 (url "https://bitbucket.org/openpyxl/openpyxl")
1026 (changeset version)))
1027 (file-name (string-append name "-" version "-checkout"))
1029 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1030 (build-system python-build-system)
1032 `(#:phases (modify-phases %standard-phases
1035 (invoke "pytest"))))))
1037 ;; For the test suite.
1038 `(("python-lxml" ,python-lxml)
1039 ("python-pillow" ,python-pillow)
1040 ("python-pytest" ,python-pytest)))
1042 `(("python-et-xmlfile" ,python-et-xmlfile)
1043 ("python-jdcal" ,python-jdcal)))
1044 (home-page "https://openpyxl.readthedocs.io")
1045 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1046 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1047 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1049 (license license:expat)))
1051 (define-public python-eventlet
1053 (name "python-eventlet")
1058 (uri (pypi-uri "eventlet" version))
1061 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1062 (build-system python-build-system)
1064 `(("python-greenlet" ,python-greenlet)))
1066 ;; TODO: Requires unpackaged 'enum-compat'.
1068 (home-page "http://eventlet.net")
1069 (synopsis "Concurrent networking library for Python")
1071 "Eventlet is a concurrent networking library for Python that
1072 allows you to change how you run your code, not how you write it.
1073 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1074 Coroutines ensure that the developer uses a blocking style of programming
1075 that is similar to threading, but provide the benefits of non-blocking I/O.
1076 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1077 from the Python interpreter, or as a small part of a larger application.")
1078 (license license:expat)))
1080 (define-public python2-eventlet
1081 (let ((base (package-with-python2
1082 (strip-python2-variant python-eventlet))))
1083 (package (inherit base)
1085 `(("python2-enum34" ,python2-enum34)
1086 ,@(package-propagated-inputs base))))))
1088 (define-public python-six
1095 (uri (pypi-uri "six" version))
1098 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1099 (build-system python-build-system)
1102 (modify-phases %standard-phases
1105 (invoke "py.test" "-v"))))))
1107 `(("python-py" ,python-py)
1108 ("python-pytest" ,python-pytest-bootstrap)))
1109 (home-page "https://pypi.python.org/pypi/six/")
1110 (synopsis "Python 2 and 3 compatibility utilities")
1112 "Six is a Python 2 and 3 compatibility library. It provides utility
1113 functions for smoothing over the differences between the Python versions with
1114 the goal of writing Python code that is compatible on both Python versions.
1115 Six supports every Python version since 2.5. It is contained in only one
1116 Python file, so it can be easily copied into your project.")
1117 (license license:x11)))
1119 (define-public python2-six
1120 (package-with-python2 python-six))
1122 (define-public python-six-bootstrap
1124 (inherit python-six)
1125 (name "python-six-bootstrap")
1127 (arguments `(#:tests? #f))))
1129 (define-public python2-six-bootstrap
1130 (package-with-python2 python-six-bootstrap))
1132 (define-public python-schedule
1134 (name "python-schedule")
1139 (uri (pypi-uri "schedule" version))
1142 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1143 (build-system python-build-system)
1145 `(("python-pytest" ,python-pytest)
1146 ("python-mock" ,python-mock)))
1147 (home-page "https://github.com/dbader/schedule")
1148 (synopsis "Schedule periodic function calls in Python")
1150 "Schedule is an in-process scheduler for periodic jobs that uses the
1151 builder pattern for configuration. Schedule lets you run Python functions (or
1152 any other callable) periodically at pre-determined intervals using a simple,
1153 human-friendly syntax.")
1154 (license license:expat)))
1156 (define-public python2-schedule
1157 (package-with-python2 python-schedule))
1159 (define-public python2-mechanize
1161 (name "python2-mechanize")
1166 (uri (pypi-uri "mechanize" version))
1169 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1170 (build-system python-build-system)
1172 `(#:python ,python-2 ; apparently incompatible with Python 3
1174 ;; test fails with message
1175 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1176 ;; (python-3.3.2) or
1177 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1179 ;; The source code is from March 2011 and probably not up-to-date
1180 ;; with respect to python unit tests.
1181 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1183 "Stateful programmatic web browsing in Python")
1185 "Mechanize implements stateful programmatic web browsing in Python,
1186 after Andy Lester’s Perl module WWW::Mechanize.")
1187 (license (license:non-copyleft
1189 "See COPYING in the distribution."))))
1192 (define-public python-simplejson
1194 (name "python-simplejson")
1199 (uri (pypi-uri "simplejson" version))
1202 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1203 (build-system python-build-system)
1204 (home-page "http://simplejson.readthedocs.org/en/latest/")
1206 "Json library for Python")
1208 "JSON (JavaScript Object Notation) is a subset of JavaScript
1209 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1212 Simplejson exposes an API familiar to users of the standard library marshal
1213 and pickle modules. It is the externally maintained version of the json
1214 library contained in Python 2.6, but maintains compatibility with Python 2.5
1215 and (currently) has significant performance advantages, even without using
1216 the optional C extension for speedups. Simplejson is also supported on
1218 (license license:x11)))
1220 (define-public python2-simplejson
1221 (package-with-python2 python-simplejson))
1224 (define-public python-pyicu
1226 (name "python-pyicu")
1231 (uri (pypi-uri "PyICU" version))
1234 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1235 (build-system python-build-system)
1237 `(("icu4c" ,icu4c)))
1239 `(("python-pytest" ,python-pytest)
1240 ("python-six" ,python-six)))
1241 (home-page "https://github.com/ovalhub/pyicu")
1242 (synopsis "Python extension wrapping the ICU C++ API")
1244 "PyICU is a python extension wrapping the ICU C++ API.")
1245 (properties `((python2-variant . ,(delay python2-pyicu))))
1246 (license license:x11)))
1248 (define-public python2-pyicu
1249 (let ((base (package-with-python2
1250 (strip-python2-variant python-pyicu))))
1254 `(,@(package-arguments base)
1256 (modify-phases %standard-phases
1257 (add-before 'check 'delete-failing-test
1259 ;; XXX: This fails due to Unicode issues unique to Python 2,
1260 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1261 (delete-file "test/test_Script.py")
1264 (define-public python2-dogtail
1265 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1266 ;; spaces in indentation" with Python 3.
1268 (name "python2-dogtail")
1272 (uri (pypi-uri "dogtail" version))
1275 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1276 (build-system python-build-system)
1277 (arguments `(#:python ,python-2
1278 #:tests? #f)) ; invalid command "test"
1279 ;; Currently no offical homepage.
1280 (home-page "https://pypi.python.org/pypi/dogtail/")
1281 (synopsis "GUI test tool and automation framework written in Python")
1283 "Dogtail is a GUI test tool and automation framework written in Python.
1284 It uses Accessibility (a11y) technologies to communicate with desktop
1285 applications. dogtail scripts are written in Python and executed like any
1286 other Python program.")
1287 (license license:gpl2+)))
1289 (define-public python-empy
1291 (name "python-empy")
1295 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1299 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1300 (build-system python-build-system)
1302 `(#:tests? #f)) ; python2 only
1303 (home-page "http://www.alcyone.com/software/empy/")
1304 (synopsis "Templating system for Python")
1306 "EmPy is a system for embedding Python expressions and statements in
1307 template text; it takes an EmPy source file, processes it, and produces
1308 output. This is accomplished via expansions, which are special signals to the
1309 EmPy system and are set off by a special prefix (by default the at sign, @@).
1310 EmPy can expand arbitrary Python expressions and statements in this way, as
1311 well as a variety of special forms. Textual data not explicitly delimited in
1312 this way is sent unaffected to the output, allowing Python to be used in
1313 effect as a markup language. Also supported are callbacks via hooks,
1314 recording and playback via diversions, and dynamic, chainable filters. The
1315 system is highly configurable via command line options and embedded
1317 (license license:lgpl2.1+)))
1319 (define-public python2-empy
1320 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1323 (arguments `(,@(package-arguments base)
1326 (define-public python2-element-tree
1328 (name "python2-element-tree")
1333 "http://effbot.org/media/downloads/elementtree-"
1334 version "-20050316.tar.gz"))
1337 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1338 (build-system python-build-system)
1340 `(#:python ,python-2 ; seems to be part of Python 3
1341 #:tests? #f)) ; no 'test' sub-command
1342 (synopsis "Toolkit for XML processing in Python")
1344 "ElementTree is a Python library supporting lightweight XML processing.")
1345 (home-page "http://effbot.org/zone/element-index.htm")
1346 (license (license:x11-style
1347 "http://docs.python.org/2/license.html"
1348 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1350 (define-public python2-pybugz
1352 (name "python2-pybugz")
1357 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1361 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1362 (patches (search-patches "pybugz-stty.patch"
1363 "pybugz-encode-error.patch"))))
1364 (build-system python-build-system)
1366 `(#:python ,python-2 ; SyntaxError with Python 3
1367 #:tests? #f)) ; no 'test' sub-command
1369 `(("element-tree" ,python2-element-tree)))
1370 (synopsis "Python and command-line interface to Bugzilla")
1372 "PyBugz is a Python library and command-line tool to query the Bugzilla
1373 bug tracking system. It is meant as an aid to speed up interaction with the
1375 (home-page "http://www.liquidx.net/pybugz/")
1376 (license license:gpl2)))
1378 (define-public python2-enum
1380 (name "python2-enum")
1384 (uri (pypi-uri "enum" version))
1387 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1388 (build-system python-build-system)
1390 `(#:python ,python-2))
1391 (home-page "http://pypi.python.org/pypi/enum/")
1392 (synopsis "Robust enumerated type support in Python")
1394 "This provides a module for robust enumerations in Python. It has
1395 been superseded by the Python standard library and is provided only for
1397 ;; Choice of either license.
1398 (license (list license:gpl3+ license:psfl))))
1400 (define-public python-enum34
1402 (name "python-enum34")
1407 (uri (pypi-uri "enum34" version))
1410 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1411 (build-system python-build-system)
1412 (home-page "https://pypi.python.org/pypi/enum34")
1413 (synopsis "Backported Python 3.4 Enum")
1415 "Enum34 is the new Python stdlib enum module available in Python 3.4
1416 backported for previous versions of Python from 2.4 to 3.3.")
1417 (license license:bsd-3)))
1419 (define-public python2-enum34
1420 (package-with-python2 python-enum34))
1422 (define-public python-parse-type
1424 (name "python-parse-type")
1429 (uri (pypi-uri "parse_type" version))
1432 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1433 (build-system python-build-system)
1435 `(("python-six" ,python-six)
1436 ("python-parse" ,python-parse)))
1438 `(("python-pytest" ,python-pytest)
1439 ("python-pytest-runner" ,python-pytest-runner)))
1440 (home-page "https://github.com/jenisys/parse_type")
1441 (synopsis "Extended parse module")
1443 "Parse_type extends the python parse module.")
1445 `((python2-variant . ,(delay python2-parse-type))))
1446 (license license:bsd-3)))
1448 (define-public python2-parse-type
1449 (let ((base (package-with-python2
1450 (strip-python2-variant python-parse-type))))
1451 (package (inherit base)
1453 `(("python2-enum34" ,python2-enum34)
1454 ,@(package-propagated-inputs base))))))
1456 (define-public python-parse
1458 (name "python-parse")
1463 (uri (pypi-uri "parse" version))
1466 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1467 (build-system python-build-system)
1470 (modify-phases %standard-phases
1472 (lambda _ (invoke "python" "test_parse.py"))))))
1473 (home-page "https://github.com/r1chardj0n3s/parse")
1474 (synopsis "Parse strings")
1476 "Parse strings using a specification based on the Python @code{format()}
1478 (license license:x11)))
1480 (define-public python-polib
1482 (name "python-polib")
1486 (uri (pypi-uri "polib" version))
1489 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1490 (build-system python-build-system)
1491 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1492 (synopsis "Manipulate, create and modify gettext files")
1493 (description "Polib can manipulate any gettext format (po, pot and mo)
1494 files. It can be used to create po files from scratch or to modify
1496 (license license:expat)))
1498 (define-public python2-polib
1499 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1502 (arguments `(,@(package-arguments base)
1503 ;; Tests don't work with python2.
1506 (define-public python-poyo
1508 (name "python-poyo")
1513 (uri (pypi-uri "poyo" version))
1516 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1517 (build-system python-build-system)
1518 (home-page "https://github.com/hackebrot/poyo")
1519 (synopsis "Lightweight YAML Parser for Python")
1521 "This package provides a lightweight YAML Parser for Python. It supports
1522 only a chosen subset of the YAML format that is required to parse cookiecutter
1523 user configuration files. It does not have support for serializing into YAML
1524 and is not compatible with JSON.")
1525 (license license:expat)))
1527 (define-public scons
1534 (url "https://github.com/SCons/scons.git")
1536 (file-name (git-file-name name version))
1539 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1540 (build-system python-build-system)
1542 `(#:use-setuptools? #f ; still relies on distutils
1543 #:tests? #f ; no 'python setup.py test' command
1545 (modify-phases %standard-phases
1546 (add-before 'build 'bootstrap
1548 (substitute* "src/engine/SCons/compat/__init__.py"
1549 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1550 "sys.modules[new] = __import__(old)"))
1551 (substitute* "src/engine/SCons/Platform/__init__.py"
1552 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1553 "mod = __import__(full_name)"))
1554 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1555 (chdir "build/scons")
1557 (home-page "http://scons.org/")
1558 (synopsis "Software construction tool written in Python")
1560 "SCons is a software construction tool. Think of SCons as an improved,
1561 cross-platform substitute for the classic Make utility with integrated
1562 functionality similar to autoconf/automake and compiler caches such as ccache.
1563 In short, SCons is an easier, more reliable and faster way to build
1565 (license license:x11)))
1567 (define-public scons-python2
1569 (inherit (package-with-python2 scons))
1570 (name "scons-python2")))
1572 (define-public python-extras
1574 (name "python-extras")
1579 (uri (pypi-uri "extras" version))
1582 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1583 (build-system python-build-system)
1585 ;; FIXME: Circular dependency on testtools.
1587 (home-page "https://github.com/testing-cabal/extras")
1588 (synopsis "Useful extensions to the Python standard library")
1590 "Extras is a set of extensions to the Python standard library.")
1591 (license license:expat)))
1593 (define-public python2-extras
1594 (package-with-python2 python-extras))
1596 (define-public python-mimeparse
1598 (name "python-mimeparse")
1603 (uri (pypi-uri "python-mimeparse" version))
1606 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1607 (build-system python-build-system)
1610 (modify-phases %standard-phases
1613 (invoke "./mimeparse_test.py"))))))
1615 "https://github.com/dbtsai/python-mimeparse")
1616 (synopsis "Python library for parsing MIME types")
1618 "Mimeparse provides basic functions for parsing MIME type names and
1619 matching them against a list of media-ranges.")
1620 (license license:expat)))
1622 (define-public python2-mimeparse
1623 (package-with-python2 python-mimeparse))
1625 (define-public python-miniboa
1627 (name "python-miniboa")
1632 (uri (pypi-uri "miniboa" version))
1635 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1636 (build-system python-build-system)
1637 (home-page "https://github.com/shmup/miniboa")
1638 (synopsis "Simple, single-threaded Telnet server")
1640 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1642 (license license:asl2.0)))
1644 (define-public python2-miniboa
1645 (package-with-python2 python-miniboa))
1647 (define-public python-pafy
1649 (name "python-pafy")
1654 (uri (pypi-uri "pafy" version))
1657 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1658 (build-system python-build-system)
1660 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1662 ;; Youtube-dl is a python package which is imported in the file
1663 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1664 `(("youtube-dl" ,youtube-dl)))
1665 (home-page "https://np1.github.io/pafy/")
1666 (synopsis "Retrieve YouTube content and metadata")
1668 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1669 (license license:lgpl3+)))
1671 (define-public python2-funcsigs
1673 (name "python2-funcsigs")
1677 (uri (pypi-uri "funcsigs" version))
1680 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1681 (build-system python-build-system)
1683 `(#:python ,python-2))
1685 `(("python2-unittest2" ,python2-unittest2)))
1686 (home-page "http://funcsigs.readthedocs.org")
1687 (synopsis "Python function signatures from PEP362")
1689 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1690 (license license:asl2.0)))
1692 (define-public python2-funcsigs-bootstrap
1694 (inherit python2-funcsigs)
1695 (name "python2-funcsigs-bootstrap")
1699 ,@(package-arguments python2-funcsigs)))))
1701 (define-public python-py
1708 (uri (pypi-uri "py" version))
1711 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1712 (build-system python-build-system)
1714 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1715 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1716 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1717 ;; Is this module globally installed?"
1720 `(("python-setuptools-scm" ,python-setuptools-scm)))
1721 (home-page "https://github.com/pytest-dev/py")
1722 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1724 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1725 code introspection, and logging.")
1726 (license license:expat)))
1728 (define-public python2-py
1729 (package-with-python2 python-py))
1731 ;; Recent versions of python-fixtures and python-testrepository need
1732 ;; python-pbr for packaging, which itself needs these two packages for
1734 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1735 ;; same source, just without any test dependencies and with tests disabled.
1736 ;; python-pbr-minmal is then used to package python-fixtures and
1737 ;; python-testrepository.
1738 ;; Strictly speaking we currently could remove the test-requirements from the
1739 ;; normal python-pbr package (and save this package) since test are disabled
1740 ;; there anyway. But this may change in future.
1741 (define-public python-pbr-minimal
1743 (name "python-pbr-minimal")
1748 (uri (pypi-uri "pbr" version))
1751 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1752 (build-system python-build-system)
1755 (home-page "http://docs.openstack.org/developer/pbr/")
1756 (synopsis "Minimal build of python-pbr used for bootstrapping")
1758 "Used only for bootstrapping python2-pbr, you should not need this.")
1759 (license license:asl2.0)))
1761 (define-public python2-pbr-minimal
1762 (package-with-python2 python-pbr-minimal))
1764 (define-public python-pbr
1766 (inherit python-pbr-minimal)
1769 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1771 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1773 `(("python-fixtures" ,python-fixtures-bootstrap)
1774 ;; discover, coverage, hacking, subunit
1775 ("python-mock" ,python-mock)
1776 ("python-six" ,python-six)
1777 ("python-sphinx" ,python-sphinx)
1778 ("python-testrepository" ,python-testrepository-bootstrap)
1779 ("python-testresources" ,python-testresources-bootstrap)
1780 ("python-testscenarios" ,python-testscenarios-bootstrap)
1781 ("python-testtools" ,python-testtools-bootstrap)
1782 ("python-virtualenv" ,python-virtualenv)))
1783 (synopsis "Enhance the default behavior of Python’s setuptools")
1785 "Python Build Reasonableness (PBR) is a library that injects some useful
1786 and sensible default behaviors into your setuptools run. It will set
1787 versions, process requirements files and generate AUTHORS and ChangeLog file
1788 from git information.
1791 (define-public python2-pbr
1792 (package-with-python2 python-pbr))
1794 (define-public python-pyrsistent
1796 (name "python-pyrsistent")
1798 (home-page "https://github.com/tobgu/pyrsistent")
1801 (uri (pypi-uri "pyrsistent" version))
1804 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1805 (build-system python-build-system)
1807 `(("python-hypothesis" ,python-hypothesis)
1808 ("python-pytest" ,python-pytest)
1809 ("python-pytest-runner" ,python-pytest-runner)))
1811 `(("python-six" ,python-six)))
1812 (synopsis "Persistent data structures for Python")
1814 "Pyrsistent is a number of persistent collections (by some referred to as
1815 functional data structures). Persistent in the sense that they are immutable.
1817 All methods on a data structure that would normally mutate it instead return a
1818 new copy of the structure containing the requested updates. The original
1819 structure is left untouched.")
1820 (license license:expat)))
1822 (define-public python2-pyrsistent
1823 (package-with-python2 python-pyrsistent))
1825 (define-public python-exif-read
1827 (name "python-exif-read")
1831 (uri (pypi-uri "ExifRead" version))
1834 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1835 (build-system python-build-system)
1836 (arguments `(#:tests? #f)) ; no tests
1837 (home-page "https://github.com/ianare/exif-py")
1838 (synopsis "Python library to extract EXIF data from image files")
1840 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1842 (license license:bsd-3)))
1844 (define-public python2-exif-read
1845 (package-with-python2 python-exif-read))
1847 (define-public python-pyld
1849 (name "python-pyld")
1853 (uri (pypi-uri "PyLD" version))
1856 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1857 (build-system python-build-system)
1858 (home-page "https://github.com/digitalbazaar/pyld")
1859 (synopsis "Python implementation of the JSON-LD specification")
1861 "PyLD is an implementation of the JSON-LD specification.")
1862 (license license:bsd-3)))
1864 (define-public python2-pyld
1865 (package-with-python2 python-pyld))
1867 (define-public python-click
1869 (name "python-click")
1874 (uri (pypi-uri "click" version))
1877 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1878 (build-system python-build-system)
1881 (modify-phases %standard-phases
1882 (add-after 'unpack 'fix-paths
1883 (lambda* (#:key inputs #:allow-other-keys)
1884 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1885 "cross-libc" "libc"))))
1886 (substitute* "click/_unicodefun.py"
1888 (string-append "'" glibc "/bin/locale'"))))
1892 (invoke "python" "-m" "pytest"))))))
1894 `(("python-pytest" ,python-pytest)))
1895 (home-page "https://palletsprojects.com/p/click/")
1896 (synopsis "Command line library for Python")
1898 "Click is a Python package for creating command line interfaces in a
1899 composable way with as little code as necessary. Its name stands for
1900 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1901 with sensible defaults out of the box.")
1902 (license license:bsd-3)))
1904 (define-public python2-click
1905 (package-with-python2 python-click))
1907 (define-public python-wheel
1909 (name "python-wheel")
1914 (uri (pypi-uri "wheel" version))
1917 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1918 (build-system python-build-system)
1920 `(("python-jsonschema" ,python-jsonschema)
1921 ("python-pytest-cov" ,python-pytest-cov)))
1922 (home-page "https://bitbucket.org/pypa/wheel/")
1923 (synopsis "Format for built Python packages")
1925 "A wheel is a ZIP-format archive with a specially formatted filename and
1926 the @code{.whl} extension. It is designed to contain all the files for a PEP
1927 376 compatible install in a way that is very close to the on-disk format. Many
1928 packages will be properly installed with only the @code{Unpack} step and the
1929 unpacked archive preserves enough information to @code{Spread} (copy data and
1930 scripts to their final locations) at any later time. Wheel files can be
1931 installed with a newer @code{pip} or with wheel's own command line utility.")
1932 (license license:expat)
1933 (properties `((python2-variant . ,(delay python2-wheel))))))
1935 (define-public python2-wheel
1936 (let ((wheel (package-with-python2
1937 (strip-python2-variant python-wheel))))
1938 (package (inherit wheel)
1939 (native-inputs `(("python2-functools32" ,python2-functools32)
1940 ,@(package-native-inputs wheel))))))
1942 (define-public python-vcversioner
1944 (name "python-vcversioner")
1945 (version "2.16.0.0")
1949 (uri (pypi-uri "vcversioner" version))
1952 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1953 (build-system python-build-system)
1954 (synopsis "Python library for version number discovery")
1955 (description "Vcversioner is a Python library that inspects tagging
1956 information in a variety of version control systems in order to discover
1958 (home-page "https://github.com/habnabit/vcversioner")
1959 (license license:isc)))
1961 (define-public python2-vcversioner
1962 (package-with-python2 python-vcversioner))
1964 (define-public python-jdcal
1966 (name "python-jdcal")
1971 (uri (pypi-uri "jdcal" version))
1974 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1975 (build-system python-build-system)
1977 `(#:phases (modify-phases %standard-phases
1980 (invoke "pytest"))))))
1982 `(("python-pytest" ,python-pytest)))
1983 (home-page "https://github.com/phn/jdcal")
1984 (synopsis "Functions to convert between Julian dates Gregorian dates")
1985 (description "This Python library provides functions for converting
1986 between Julian dates and Gregorian dates.")
1987 (license license:bsd-2)))
1989 (define-public python2-jdcal
1990 (package-with-python2 python-jdcal))
1992 (define-public python-jsonschema
1994 (name "python-jsonschema")
1998 (uri (pypi-uri "jsonschema" version))
2001 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2002 (build-system python-build-system)
2005 (modify-phases %standard-phases
2008 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2009 (invoke "trial" "jsonschema"))))))
2011 `(("python-setuptools_scm" ,python-setuptools-scm)
2012 ("python-twisted" ,python-twisted)))
2014 `(("python-attrs" ,python-attrs)
2015 ("python-pyrsistent" ,python-pyrsistent)
2016 ("python-six" ,python-six)))
2017 (home-page "https://github.com/Julian/jsonschema")
2018 (synopsis "Implementation of JSON Schema for Python")
2020 "Jsonschema is an implementation of JSON Schema for Python.")
2021 (license license:expat)
2022 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2024 (define-public python2-jsonschema
2025 (let ((jsonschema (package-with-python2
2026 (strip-python2-variant python-jsonschema))))
2027 (package (inherit jsonschema)
2029 `(("python2-functools32" ,python2-functools32)
2030 ,@(package-propagated-inputs jsonschema))))))
2032 ;; This old version is still required by docker-compose as of 1.24.0.
2033 (define-public python-jsonschema-2.6
2035 (name "python-jsonschema")
2039 (uri (pypi-uri "jsonschema" version))
2042 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2043 (build-system python-build-system)
2046 (modify-phases %standard-phases
2047 (replace 'check (lambda _ (invoke "nosetests"))))))
2049 `(("python-nose" ,python-nose)
2050 ("python-vcversioner" ,python-vcversioner)))
2051 (home-page "https://github.com/Julian/jsonschema")
2052 (synopsis "Implementation of JSON Schema for Python")
2054 "Jsonschema is an implementation of JSON Schema for Python.")
2055 (license license:expat)
2056 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2058 (define-public python-schema
2060 (name "python-schema")
2065 (uri (pypi-uri "schema" version))
2068 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2069 (build-system python-build-system)
2071 `(("python-pytest" ,python-pytest)))
2072 (home-page "https://github.com/keleshev/schema")
2073 (synopsis "Simple data validation library")
2075 "@code{python-schema} is a library for validating Python data
2076 structures, such as those obtained from config-files, forms, external
2077 services or command-line parsing, converted from JSON/YAML (or
2078 something else) to Python data-types.")
2079 (license license:psfl)))
2081 (define-public python2-schema
2082 (package-with-python2 python-schema))
2084 (define-public python-schema-0.5
2085 (package (inherit python-schema)
2090 (uri (pypi-uri "schema" version))
2093 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2095 (define-public python2-schema-0.5
2096 (package-with-python2 python-schema-0.5))
2098 (define-public python-kitchen
2100 (name "python-kitchen")
2105 (uri (pypi-uri "kitchen" version))
2108 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2109 (build-system python-build-system)
2111 `(("python-chardet" ,python-chardet)))
2112 (home-page "https://github.com/fedora-infra/kitchen")
2113 (synopsis "Python API for snippets")
2114 (description "@code{kitchen} module provides a python API for all sorts of
2115 little useful snippets of code that everybody ends up writing for their projects
2116 but never seem big enough to build an independent release. Use kitchen and stop
2117 cutting and pasting that code over and over.")
2118 (license (list license:lgpl2.1+
2119 ;; subprocess.py, test_subprocess.py,
2120 ;; kitchen/pycompat25/defaultdict.py:
2123 (define-public python2-kitchen
2124 (package-with-python2 python-kitchen))
2126 (define-public python-unidecode
2128 (name "python-unidecode")
2132 (uri (pypi-uri "Unidecode" version))
2135 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2136 (build-system python-build-system)
2137 (home-page "https://pypi.python.org/pypi/Unidecode")
2138 (synopsis "ASCII transliterations of Unicode text")
2140 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2141 useful when integrating with legacy code that doesn't support Unicode, or for
2142 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2143 machine identifiers from human-readable Unicode strings that should still be
2144 somewhat intelligible.")
2145 (license license:gpl2+)))
2147 (define-public python2-unidecode
2148 (package-with-python2 python-unidecode))
2150 (define-public python-pyjwt
2152 (name "python-pyjwt")
2157 (uri (pypi-uri "PyJWT" version))
2160 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2161 (modules '((guix build utils)))
2164 (for-each delete-file-recursively
2165 (find-files "." "\\.pyc$"))
2167 (build-system python-build-system)
2169 `(("python-pytest" ,python-pytest)
2170 ("python-pytest-cov" ,python-pytest-cov)
2171 ("python-pytest-runner" ,python-pytest-runner)))
2172 (home-page "https://github.com/progrium/pyjwt")
2173 (synopsis "JSON Web Token implementation in Python")
2175 "PyJWT is a JSON Web Token implementation written in Python.")
2176 (license license:expat)))
2178 (define-public python2-pyjwt
2179 (package-with-python2 python-pyjwt))
2181 (define-public python-pykka
2183 (name "python-pykka")
2188 (uri (pypi-uri "Pykka" version))
2191 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2192 (build-system python-build-system)
2194 `(("python-mock" ,python-mock)
2195 ("python-nose" ,python-nose)
2196 ("python-gevent" ,python-gevent)
2197 ("python-eventlet" ,python-eventlet)))
2198 (home-page "https://www.pykka.org/")
2199 (synopsis "Pykka is a Python implementation of the actor model")
2201 "Pykka is a Python implementation of the actor model.
2202 The actor model introduces some simple rules to control the sharing
2203 of state and cooperation between execution units, which makes it
2204 easier to build concurrent applications.")
2205 (license license:asl2.0)))
2207 (define-public python2-pykka
2208 (package-with-python2 python-pykka))
2210 (define-public python-pymsgbox
2212 (name "python-pymsgbox")
2218 ;; LICENSE.txt is not present on pypi
2219 (url "https://github.com/asweigart/PyMsgBox")
2220 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2221 (file-name (git-file-name name version))
2224 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2226 ;; Circular dependency to run tests:
2227 ;; Tests need pyautogui, which depends on pymsgbox.
2229 (build-system python-build-system)
2230 (home-page "https://github.com/asweigart/PyMsgBox")
2231 (synopsis "Python module for JavaScript-like message boxes")
2233 "PyMsgBox is a simple, cross-platform, pure Python module for
2234 JavaScript-like message boxes. Types of dialog boxes include:
2242 (license license:bsd-3)))
2244 (define-public python-pympler
2246 (name "python-pympler")
2247 (home-page "https://pythonhosted.org/Pympler/")
2251 (uri (pypi-uri "Pympler" version))
2254 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2255 (build-system python-build-system)
2257 `(#:phases (modify-phases %standard-phases
2259 (add-after 'install 'check
2260 (lambda* (#:key inputs outputs #:allow-other-keys)
2261 (add-installed-pythonpath inputs outputs)
2262 (invoke "python" "setup.py" "test"))))))
2263 (synopsis "Measure, monitor and analyze memory behavior")
2265 "Pympler is a development tool to measure, monitor and analyze
2266 the memory behavior of Python objects in a running Python application.
2268 By pympling a Python application, detailed insight in the size and the
2269 lifetime of Python objects can be obtained. Undesirable or unexpected
2270 runtime behavior like memory bloat and other @samp{pymples} can easily
2273 A web profiling frontend exposes process statistics, garbage
2274 visualisation and class tracker statistics.")
2275 (license license:asl2.0)))
2277 (define-public python2-pympler
2278 (package-with-python2 python-pympler))
2280 (define-public python-itsdangerous
2282 (name "python-itsdangerous")
2287 (uri (pypi-uri "itsdangerous" version))
2290 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2291 (build-system python-build-system)
2292 (home-page "https://palletsprojects.com/p/itsdangerous/")
2293 (synopsis "Python library for passing data to/from untrusted environments")
2295 "Itsdangerous provides various helpers to pass trusted data to untrusted
2296 environments and back.")
2297 (license license:bsd-3)))
2299 (define-public python2-itsdangerous
2300 (package-with-python2 python-itsdangerous))
2302 (define-public python-pyyaml
2304 (name "python-pyyaml")
2309 (uri (pypi-uri "PyYAML" version))
2312 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2313 (build-system python-build-system)
2315 `(("libyaml" ,libyaml)))
2316 (home-page "http://pyyaml.org/wiki/PyYAML")
2317 (synopsis "YAML parser and emitter for Python")
2319 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2320 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2321 API, and sensible error messages. PyYAML supports standard YAML tags and
2322 provides Python-specific tags that allow to represent an arbitrary Python
2324 (license license:expat)))
2326 (define-public python2-pyyaml
2327 (package-with-python2 python-pyyaml))
2329 (define-public python-vine
2331 (name "python-vine")
2336 (uri (pypi-uri "vine" version))
2339 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2340 (build-system python-build-system)
2342 `(("python-pytest" ,python-pytest)
2343 ("python-case" ,python-case)))
2344 (home-page "https://github.com/celery/vine")
2345 (synopsis "Promises for Python")
2347 "@code{vine} provides a special implementation of promises in that it can
2348 be used both for \"promise of a value\" and lazy evaluation. The biggest
2349 upside for this is that everything in a promise can also be a promise,
2350 e.g. filters, callbacks and errbacks can all be promises.")
2351 (license license:bsd-3)))
2353 (define-public python-virtualenv
2355 (name "python-virtualenv")
2360 (uri (pypi-uri "virtualenv" version))
2363 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2364 (build-system python-build-system)
2367 (modify-phases %standard-phases
2368 (add-before 'check 'disable-failing-test
2370 ;; Disable failing test. See upstream bug report
2371 ;; https://github.com/pypa/virtualenv/issues/957
2372 (substitute* "tests/test_virtualenv.py"
2373 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2376 `(("python-mock" ,python-mock)
2377 ("python-pytest" ,python-pytest)))
2378 (home-page "https://virtualenv.pypa.io/")
2379 (synopsis "Virtual Python environment builder")
2381 "Virtualenv is a tool to create isolated Python environments.")
2382 (license license:expat)))
2384 (define-public python2-virtualenv
2385 (package-with-python2 python-virtualenv))
2387 (define-public python-markupsafe
2389 (name "python-markupsafe")
2394 (uri (pypi-uri "MarkupSafe" version))
2397 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2398 (build-system python-build-system)
2400 `(#:modules ((ice-9 ftw)
2404 (guix build python-build-system))
2405 #:phases (modify-phases %standard-phases
2408 (let ((cwd (getcwd))
2409 (libdir (find (cut string-prefix? "lib." <>)
2410 (scandir "build"))))
2411 (setenv "PYTHONPATH"
2412 (string-append cwd "/build/" libdir ":"
2413 (getenv "PYTHONPATH")))
2414 (invoke "pytest" "-vv")))))))
2416 `(("python-pytest" ,python-pytest)))
2417 (home-page "https://github.com/mitsuhiko/markupsafe")
2418 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2420 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2422 (license license:bsd-3)))
2424 (define-public python2-markupsafe
2425 (package-with-python2 python-markupsafe))
2427 (define-public python-jinja2
2429 (name "python-jinja2")
2434 (uri (pypi-uri "Jinja2" version))
2437 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2438 (build-system python-build-system)
2440 `(("python-markupsafe" ,python-markupsafe)))
2441 (home-page "http://jinja.pocoo.org/")
2442 (synopsis "Python template engine")
2444 "Jinja2 is a small but fast and easy to use stand-alone template engine
2445 written in pure Python.")
2446 (license license:bsd-3)))
2448 (define-public python2-jinja2
2449 (package-with-python2 python-jinja2))
2451 (define-public python-jinja2-time
2453 (name "python-jinja2-time")
2458 (uri (pypi-uri "jinja2-time" version))
2461 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2462 (build-system python-build-system)
2464 `(("python-arrow" ,python-arrow)
2465 ("python-jinja2" ,python-jinja2)))
2467 "https://github.com/hackebrot/jinja2-time")
2468 (synopsis "Jinja2 Extension for Dates and Times")
2470 "This package provides an extension for the template engine Jinja2. It
2471 adds a 'now' tag providing a convenient access to the arrow.now() API from
2472 templates. A format string can be provided to control the output.")
2473 (license license:expat)))
2475 (define-public python-pystache
2477 (name "python-pystache")
2481 (uri (pypi-uri "pystache" version))
2484 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2485 (build-system python-build-system)
2487 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2488 (home-page "http://defunkt.io/pystache/")
2489 (synopsis "Python logic-less template engine")
2491 "Pystache is a Python implementation of the framework agnostic,
2492 logic-free templating system Mustache.")
2493 (license license:expat)
2494 (properties `((python2-variant . ,(delay python2-pystache))))))
2496 (define-public python2-pystache
2497 (package (inherit (package-with-python2
2498 (strip-python2-variant python-pystache)))
2500 `(#:python ,python-2
2502 (modify-phases %standard-phases
2505 (invoke "python" "test_pystache.py"))))))))
2507 (define-public python-joblib
2509 (name "python-joblib")
2513 (uri (pypi-uri "joblib" version))
2516 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2517 (build-system python-build-system)
2520 (modify-phases %standard-phases
2522 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2524 `(("python-pytest" ,python-pytest)))
2525 (home-page "https://joblib.readthedocs.io/")
2526 (synopsis "Using Python functions as pipeline jobs")
2528 "Joblib is a set of tools to provide lightweight pipelining in Python.
2529 In particular, joblib offers: transparent disk-caching of the output values
2530 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2531 logging and tracing of the execution.")
2532 (license license:bsd-3)))
2534 (define-public python2-joblib
2535 (package-with-python2 python-joblib))
2537 (define-public python-daemon
2539 (name "python-daemon")
2544 (uri (pypi-uri "python-daemon" version))
2547 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2548 (build-system python-build-system)
2551 (modify-phases %standard-phases
2552 (add-before 'check 'disable-tests
2554 ;; FIXME: Determine why test fails
2555 (substitute* "test/test_daemon.py"
2556 (("test_detaches_process_context")
2557 "skip_test_detaches_process_context"))
2560 `(("python-lockfile" ,python-lockfile)))
2562 `(("python-unittest2" ,python-unittest2)
2563 ("python-testtools" ,python-testtools)
2564 ("python-testscenarios" ,python-testscenarios)
2565 ("python-mock" ,python-mock)
2566 ("python-docutils" ,python-docutils)))
2567 (home-page "https://pagure.io/python-daemon/")
2568 (synopsis "Python library for making a Unix daemon process")
2569 (description "Python-daemon is a library that assists a Python program to
2570 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2572 This library provides a @code{DaemonContext} class that manages the following
2573 important tasks for becoming a daemon process:
2575 @item Detach the process into its own process group.
2576 @item Set process environment appropriate for running inside a chroot.
2577 @item Renounce suid and sgid privileges.
2578 @item Close all open file descriptors.
2579 @item Change the working directory, uid, gid, and umask.
2580 @item Set appropriate signal handlers.
2581 @item Open new file descriptors for stdin, stdout, and stderr.
2582 @item Manage a specified PID lock file.
2583 @item Register cleanup functions for at-exit processing.
2585 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2586 (license (list license:asl2.0 license:gpl3+))))
2588 (define-public python-docutils
2590 (name "python-docutils")
2595 (uri (pypi-uri "docutils" version))
2598 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2599 (build-system python-build-system)
2601 '(#:tests? #f)) ; no setup.py test command
2602 (home-page "http://docutils.sourceforge.net/")
2603 (synopsis "Python Documentation Utilities")
2605 "Docutils is a modular system for processing documentation into useful
2606 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2608 ;; Most of the source code is public domain, but some source files are
2609 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2610 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2612 (define-public python2-docutils
2613 (package-with-python2 python-docutils))
2615 (define-public python-pygments
2617 (name "python-pygments")
2622 (uri (pypi-uri "Pygments" version))
2625 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2626 (build-system python-build-system)
2628 ;; FIXME: Tests require sphinx, which depends on this.
2630 (home-page "http://pygments.org/")
2631 (synopsis "Syntax highlighting")
2633 "Pygments is a syntax highlighting package written in Python.")
2634 (license license:bsd-2)))
2636 (define-public python2-pygments
2637 (package-with-python2 python-pygments))
2639 (define-public python-bumpversion
2641 (name "python-bumpversion")
2646 (uri (pypi-uri "bumpversion" version))
2649 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2650 (build-system python-build-system)
2651 (home-page "https://github.com/peritus/bumpversion")
2652 (synopsis "Tool to bump software version")
2653 (description "This tool provides a command-line interface (CLI) to bump a
2654 software version simply.")
2655 (license license:expat)))
2657 (define-public python-deprecated
2659 (name "python-deprecated")
2665 (url "https://github.com/tantale/deprecated.git")
2666 (commit (string-append "v" version))))
2667 (file-name (git-file-name name version))
2670 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2671 (build-system python-build-system)
2673 `(#:phases (modify-phases %standard-phases
2676 (invoke "pytest"))))))
2678 `(("python-wrapt" ,python-wrapt)))
2680 `(("python-bumpversion" ,python-bumpversion)
2681 ("python-pytest" ,python-pytest)
2682 ("python-pytest-cov" ,python-pytest-cov)
2683 ("python-sphinx" ,python-sphinx)
2684 ("python-tox" ,python-tox)))
2685 (home-page "https://github.com/tantale/deprecated")
2686 (synopsis "Python decorator to deprecate classes, functions or methods")
2687 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2688 to deprecate classes, functions or methods.")
2689 (license license:expat)))
2691 (define-public python-pygithub
2693 (name "python-pygithub")
2696 ;; We fetch from the Git repo because there are no tests in the PyPI
2701 (url "https://github.com/PyGithub/PyGithub.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2705 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2706 (build-system python-build-system)
2708 `(#:phases (modify-phases %standard-phases
2709 ;; Some tests rely on the network.
2710 (add-after 'unpack 'disable-failing-tests
2712 (substitute* "tests/Issue142.py"
2713 (("testDecodeJson") "disabled_testDecodeJson"))
2715 (add-before 'check 'prepare-for-tests
2717 (for-each (lambda (f)
2719 (find-files "./tests"))
2720 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2721 (setenv "PYTHONPATH"
2722 (string-append "./tests:" (getenv "PYTHONPATH")))
2725 `(("python-deprecated" ,python-deprecated)
2726 ("python-pyjwt" ,python-pyjwt)
2727 ("python-requests" ,python-requests)))
2728 (native-inputs `(("python-httpretty" ,python-httpretty)))
2729 (home-page "https://pygithub.readthedocs.io/en/latest/")
2730 (synopsis "Python library for the GitHub API")
2731 (description "This library allows managing GitHub resources such as
2732 repositories, user profiles, and organizations in your Python applications,
2733 using version 3 of the GitHub application programming interface (API).")
2734 (license license:lgpl3+)))
2736 (define-public python-rellu
2738 (name "python-rellu")
2743 (uri (pypi-uri "rellu" version))
2746 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2747 (build-system python-build-system)
2749 `(("python-invoke" ,python-invoke)
2750 ("python-pygithub" ,python-pygithub)))
2751 (home-page "https://github.com/robotframework/rellu")
2752 (synopsis "Utilities to create PyPI releases")
2753 (description "This collection of utilities contains tooling and templates
2754 to assist in creating releases on GitHub and publishing them on PyPI. It is
2755 designed to be used by Robot Framework and tools and libraries in its
2756 ecosystem, but can naturally be used also by other projects.")
2757 (license license:asl2.0)))
2759 (define-public python-robotframework
2761 (name "python-robotframework")
2763 ;; There are no tests in the PyPI archive.
2768 (url "https://github.com/robotframework/robotframework.git")
2769 (commit (string-append "v" version))))
2770 (file-name (git-file-name name version))
2772 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2773 (patches (search-patches
2774 "python-robotframework-honor-source-date-epoch.patch"))))
2775 (build-system python-build-system)
2777 `(#:phases (modify-phases %standard-phases
2778 (add-before 'build 'build-and-install-doc
2779 (lambda* (#:key outputs #:allow-other-keys)
2780 (let* ((doc-output (assoc-ref outputs "doc"))
2781 (doc (string-append doc-output "/share/"
2782 ,name "-" ,version "/")))
2783 (invoke "invoke" "library-docs" "all")
2785 (copy-recursively "doc/libraries"
2786 (string-append doc "/libraries"))
2790 (invoke "python" "utest/run.py"))))))
2792 `(("python-invoke" ,python-invoke)
2793 ("python-rellu" ,python-rellu)
2794 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2795 (outputs '("out" "doc"))
2796 (home-page "https://robotframework.org")
2797 (synopsis "Generic automation framework")
2798 (description "Robot Framework is a generic automation framework for
2799 acceptance testing, acceptance test driven development (ATDD), and robotic
2800 process automation (RPA).")
2801 (license license:asl2.0)))
2803 (define-public python-robotframework-lint
2804 ;; There is no properly tagged release; the commit below seems to correspond
2805 ;; to the 0.9 stable release available from PyPI. The tests are not
2806 ;; included in the PyPI archive, so we fetch the sources from the upstream
2808 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2811 (name "python-robotframework-lint")
2812 (version (git-version "0.9.0" revision commit))
2817 (url "https://github.com/boakley/robotframework-lint.git")
2819 (file-name (git-file-name name version))
2822 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2823 (build-system python-build-system)
2826 (modify-phases %standard-phases
2829 (invoke "python" "-m" "robot" "-A"
2830 "tests/conf/default.args" "tests"))))))
2832 `(("python-robotframework" ,python-robotframework)))
2833 (home-page "https://github.com/boakley/robotframework-lint/")
2834 (synopsis "Static analysis tool (linter) for Robot Framework")
2835 (description "This package provides the @code{rflint} command-line
2836 utility, a static analysis tool (linter) for Robot Framework source files.")
2837 (license license:asl2.0))))
2839 (define-public python-robotframework-sshlibrary
2841 (name "python-robotframework-sshlibrary")
2843 ;; There are no tests in the PyPI archive.
2848 (url "https://github.com/robotframework/SSHLibrary.git")
2849 (commit (string-append "v" version))))
2850 (file-name (git-file-name name version))
2853 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2854 (build-system python-build-system)
2857 (modify-phases %standard-phases
2858 (add-before 'build 'build-and-install-doc
2859 (lambda* (#:key outputs #:allow-other-keys)
2860 (let* ((doc-output (assoc-ref outputs "doc"))
2861 (doc (string-append doc-output "/share/"
2862 ,name "-" ,version "/")))
2863 (invoke "chmod" "-R" "+w" "docs")
2864 (invoke "invoke" "kw-docs" "project-docs")
2866 (for-each delete-file (find-files "docs" "\\.rst"))
2867 (copy-recursively "docs" doc)
2871 ;; Some tests require an SSH server; we remove them.
2872 (delete-file "utest/test_client_api.py")
2873 (delete-file "utest/test_scp.py")
2874 (invoke "python" "utest/run.py"))))))
2876 `(("python-robotframework" ,python-robotframework)
2877 ("python-paramiko" ,python-paramiko)
2878 ("python-scp" ,python-scp)))
2880 `(("openssh" ,openssh)
2882 ;; To generate the documentation
2883 ("python-docutils" ,python-docutils)
2884 ("python-invoke" ,python-invoke)
2885 ("python-pygments" ,python-pygments)
2886 ("python-rellu" ,python-rellu)))
2887 (outputs '("out" "doc"))
2888 (home-page "https://github.com/robotframework/SSHLibrary")
2889 (synopsis "Robot Framework library for SSH and SFTP")
2890 (description "SSHLibrary is a Robot Framework library providing support
2891 for SSH and SFTP. It has the following main usages:
2893 @item Executing commands on the remote machine, either blocking or non-blocking.
2894 @item Writing and reading in an interactive shell.
2895 @item Transferring files and directories over SFTP.
2896 @item Ensuring that files and directories exist on the remote machine.
2898 (license license:asl2.0)))
2900 (define-public python-scp
2907 (uri (pypi-uri "scp" version))
2910 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2911 (build-system python-build-system)
2913 '(#:tests? #f)) ;tests require an SSH server
2915 `(("python-paramiko" ,python-paramiko)))
2916 (home-page "https://github.com/jbardin/scp.py")
2917 (synopsis "SCP protocol module for Python and Paramiko")
2918 (description "The scp module extends the Paramiko library to send and
2919 receive files via the SCP1 protocol, as implemented by the OpenSSH
2920 @command{scp} program.")
2921 (license license:gpl2+)))
2923 (define-public python-rst.linker
2925 (name "python-rst.linker")
2930 (uri (pypi-uri "rst.linker" version))
2932 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2933 (build-system python-build-system)
2935 `(("python-dateutil" ,python-dateutil)
2936 ("python-six" ,python-six)))
2938 `(("python-setuptools-scm" ,python-setuptools-scm)))
2939 ;; Test would require path.py, which would introduce a cyclic dependence.
2940 (arguments `(#:tests? #f))
2941 ;; Note: As of version 1.7 the documentation is not worth building.
2942 (home-page "https://github.com/jaraco/rst.linker")
2943 (synopsis "Sphinx plugin to add links and timestamps")
2944 (description "rst.linker allows to automatically replace text by a
2945 reStructuredText external reference or timestamps. It's primary purpose is to
2946 augment the changelog, but it can be used for other documents, too.")
2947 (license license:expat)))
2949 (define-public python2-rst.linker
2950 (package-with-python2 python-rst.linker))
2952 (define-public python-feedgenerator
2954 (name "python-feedgenerator")
2959 (uri (pypi-uri "feedgenerator" version))
2962 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2963 (modules '((guix build utils)))
2966 ;; Remove pre-compiled .pyc files from source.
2967 (for-each delete-file-recursively
2968 (find-files "." "__pycache__" #:directories? #t))
2969 (for-each delete-file (find-files "." "\\.pyc$"))
2971 (build-system python-build-system)
2973 `(("python-pytz" ,python-pytz)
2974 ("python-six" ,python-six)))
2975 (home-page "https://github.com/getpelican/feedgenerator")
2977 "Standalone version of Django's Atom/RSS feed generator")
2979 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2980 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2981 (license license:bsd-3)))
2983 (define-public python2-feedgenerator
2984 (package-with-python2 python-feedgenerator))
2986 (define-public python-toml
2988 (name "python-toml")
2993 (uri (pypi-uri "toml" version))
2996 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2997 (build-system python-build-system)
2999 `(#:tests? #f)) ;no tests suite in release
3000 (home-page "https://github.com/uiri/toml")
3001 (synopsis "Library for TOML")
3003 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3004 Language (TOML) configuration files.")
3005 (license license:expat)))
3007 (define-public python-jsonrpc-server
3009 (name "python-jsonrpc-server")
3014 (uri (pypi-uri "python-jsonrpc-server" version))
3017 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3018 (build-system python-build-system)
3020 `(("python-future" ,python-future)
3021 ("python-mock" ,python-mock)
3022 ("python-pytest" ,python-pytest)))
3024 "https://github.com/palantir/python-jsonrpc-server")
3025 (synopsis "JSON RPC 2.0 server library")
3027 "This package provides a JSON RPC 2.0 server library for Python.")
3028 (license license:expat)))
3030 (define-public python-pydocstyle
3032 (name "python-pydocstyle")
3037 (uri (pypi-uri "pydocstyle" version))
3040 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3041 (build-system python-build-system)
3043 `(("python-six" ,python-six)
3044 ("python-snowballstemmer" ,python-snowballstemmer)))
3046 "https://github.com/PyCQA/pydocstyle/")
3047 (synopsis "Python docstring style checker")
3049 "This package provides a style checker for the Python Language
3051 (license license:expat)))
3053 (define-public python-language-server
3055 (name "python-language-server")
3060 (uri (pypi-uri "python-language-server" version))
3063 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3064 (build-system python-build-system)
3066 `(("python-pluggy" ,python-pluggy)
3067 ("python-jsonrpc-server" ,python-jsonrpc-server)
3068 ("python-jedi" ,python-jedi)
3069 ("python-yapf" ,python-yapf)
3070 ("python-pyflakes" ,python-pyflakes)
3071 ("python-pydocstyle" ,python-pydocstyle)
3072 ("python-pycodestyle" ,python-pycodestyle)
3073 ("python-mccabe" ,python-mccabe)
3074 ("python-rope" ,python-rope)
3075 ("python-autopep8" ,python-autopep8)
3076 ("python-flake8" ,python-flake8)
3077 ("python-pylint" ,python-pylint)))
3078 (home-page "https://github.com/palantir/python-language-server")
3079 (synopsis "Python implementation of the Language Server Protocol")
3081 "The Python Language Server (pyls) is an implementation of the Python 3
3082 language specification for the Language Server Protocol (LSP). This tool is
3083 used in text editing environments to provide a complete and integrated
3084 feature-set for programming Python effectively.")
3085 (license license:expat)))
3087 (define-public python-black
3089 (name "python-black")
3094 (uri (pypi-uri "black" version))
3097 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3098 (build-system python-build-system)
3101 (modify-phases %standard-phases
3102 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3104 (let ((python3 (which "python3")))
3105 (substitute* '("tests/data/fmtonoff.py"
3106 "tests/data/string_prefixes.py"
3107 "tests/data/function.py")
3108 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3109 (string-append "#!" python3 (if (string? minor-version)
3113 `(("python-click" ,python-click)
3114 ("python-attrs" ,python-attrs)
3115 ("python-appdirs" ,python-appdirs)
3116 ("python-toml" ,python-toml)))
3117 (home-page "https://github.com/ambv/black")
3118 (synopsis "The uncompromising code formatter")
3119 (description "Black is the uncompromising Python code formatter.")
3120 (license license:expat)))
3122 (define-public python-blinker
3124 (name "python-blinker")
3129 (uri (pypi-uri "blinker" version))
3132 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3133 (build-system python-build-system)
3134 (home-page "http://pythonhosted.org/blinker/")
3135 (synopsis "Fast, simple object-to-object and broadcast signaling")
3137 "Blinker provides a fast dispatching system that allows any number of
3138 interested parties to subscribe to events, or \"signals\".")
3139 (license license:expat)))
3141 (define-public python2-blinker
3142 (package-with-python2 python-blinker))
3144 (define-public pelican
3151 (uri (pypi-uri "pelican" version))
3154 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3155 (build-system python-build-system)
3157 `(("python-feedgenerator" ,python-feedgenerator)
3158 ("python-jinja2" ,python-jinja2)
3159 ("python-pygments" ,python-pygments)
3160 ("python-docutils" ,python-docutils)
3161 ("python-pytz" ,python-pytz)
3162 ("python-blinker" ,python-blinker)
3163 ("python-unidecode" ,python-unidecode)
3164 ("python-six" ,python-six)
3165 ("python-dateutil" ,python-dateutil)
3166 ("python-markdown" ,python-markdown)))
3167 (home-page "https://getpelican.com/")
3169 `(;; XXX Requires a lot more packages to do unit tests :P
3171 #:phases (modify-phases %standard-phases
3173 'install 'adjust-requires
3174 ;; Since feedgenerator is installed from git, it doesn't
3175 ;; conform to the version requirements.
3177 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3178 ;; version requirement so setuptools doesn't get confused.
3180 (substitute* "setup.py"
3181 (("['\"]feedgenerator.*?['\"]")
3182 "'feedgenerator'")))))))
3183 (synopsis "Python-based static site publishing system")
3185 "Pelican is a tool to generate a static blog from reStructuredText,
3186 Markdown input files, and more. Pelican uses Jinja2 for templating
3187 and is very extensible.")
3188 (license license:agpl3+)))
3190 (define-public mallard-ducktype
3192 (name "mallard-ducktype")
3197 ;; git-reference because tests are not included in pypi source tarball
3198 ;; https://issues.guix.gnu.org/issue/36755#2
3200 (url "https://github.com/projectmallard/mallard-ducktype.git")
3202 (file-name (git-file-name name version))
3205 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3206 (build-system python-build-system)
3209 (modify-phases %standard-phases
3212 (with-directory-excursion "tests"
3213 (invoke "sh" "runtests")))))))
3214 (home-page "http://projectmallard.org")
3215 (synopsis "Convert Ducktype to Mallard documentation markup")
3217 "Ducktype is a lightweight syntax that can represent all the semantics
3218 of the Mallard XML documentation system. Ducktype files can be converted to
3219 Mallard using the @command{ducktype} tool. The yelp-tools package
3220 provides additional functionality on the produced Mallard documents.")
3221 (license license:expat)))
3223 (define-public python-cython
3225 (name "python-cython")
3230 (uri (pypi-uri "Cython" version))
3233 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3234 (build-system python-build-system)
3235 ;; we need the full python package and not just the python-wrapper
3236 ;; because we need libpython3.3m.so
3238 `(("python" ,python)))
3241 (modify-phases %standard-phases
3242 (add-before 'check 'set-HOME
3243 ;; some tests require access to "$HOME/.cython"
3244 (lambda _ (setenv "HOME" "/tmp") #t))
3246 ;; FIXME: These tests started failing on armhf after the 0.28 update
3247 ;; (commit c69d11c5930), both with an error such as this:
3248 ;; compiling (cpp) and running dictcomp ...
3249 ;; === C/C++ compiler error output: ===
3251 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3252 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3253 ,@(if (target-arm32?)
3254 `((add-before 'check 'disable-failing-tests
3256 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3257 (for-each (lambda (test)
3258 (format disabled-tests "~a\n" test))
3259 '("memslice" "dictcomp"))
3260 (close-port disabled-tests)))))
3265 ;; Disable compiler optimizations to greatly reduce the running
3266 ;; time of the test suite.
3267 (setenv "CFLAGS" "-O0")
3269 (invoke "python" "runtests.py" "-vv"
3270 "-j" (number->string (parallel-job-count))))))))
3271 (home-page "https://cython.org/")
3272 (synopsis "C extensions for Python")
3273 (description "Cython is an optimising static compiler for both the Python
3274 programming language and the extended Cython programming language. It makes
3275 writing C extensions for Python as easy as Python itself.")
3276 (license license:asl2.0)
3277 (properties `((python2-variant . ,(delay python2-cython))))))
3279 (define-public python2-cython
3280 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3283 (name "python2-cython")
3285 `(("python-2" ,python-2))) ;this is not automatically changed
3287 (substitute-keyword-arguments (package-arguments base)
3289 `(modify-phases ,phases
3290 (add-before 'check 'adjust-test_embed
3292 (substitute* "runtests.py"
3293 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3294 ;; so it can give the right -L flag to GCC when embedding static
3295 ;; builds of Python. It is unaware that the Python "config"
3296 ;; directory (where the static library lives) was renamed in
3297 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3298 ;; which works fine, because that is where the shared library is.
3300 ;; It also appears to be unaware that the Makefile in Demos/embed
3301 ;; already unconditionally pass the static library location to GCC,
3302 ;; after checking sysconfig.get_config_var('LIBPL).
3304 ;; The effect is that the linker is unable to resolve libexpat
3305 ;; symbols when building for Python 2, because neither the Python 2
3306 ;; shared library nor Expat is available. To fix it, we can either
3307 ;; add Expat as an input and make it visible to the linker, or just
3308 ;; prevent it from overriding the Python shared library location.
3309 ;; The end result is identical, so we take the easy route.
3310 ((" or libname not in os\\.listdir\\(libdir\\)")
3314 ;; The RPython toolchain currently does not support Python 3.
3315 (define-public python2-rpython
3317 (name "python2-rpython")
3322 (uri (pypi-uri "rpython" version))
3325 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3326 (build-system python-build-system)
3327 (arguments `(#:python ,python-2))
3329 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3330 (home-page "https://rpython.readthedocs.org")
3331 (synopsis "Framework for implementing interpreters and virtual machines")
3332 (description "RPython is a translation and support framework for
3333 producing implementations of dynamic languages, emphasizing a clean separation
3334 between language specification and implementation aspects.")
3335 (license license:expat)))
3337 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3338 ;; python-scipy still build, as these three packages are often used together.
3339 (define-public python-numpy
3341 (name "python-numpy")
3347 "https://github.com/numpy/numpy/releases/download/v"
3348 version "/numpy-" version ".tar.gz"))
3351 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3352 (build-system python-build-system)
3354 `(("openblas" ,openblas)
3355 ("lapack" ,lapack)))
3357 `(("python-cython" ,python-cython)
3358 ("python-pytest" ,python-pytest)
3359 ("gfortran" ,gfortran)))
3362 (modify-phases %standard-phases
3363 (add-before 'build 'configure-blas-lapack
3364 (lambda* (#:key inputs #:allow-other-keys)
3365 (call-with-output-file "site.cfg"
3369 libraries = openblas
3370 library_dirs = ~a/lib
3371 include_dirs = ~a/include
3373 # backslash-n to make emacs happy
3375 lapack_libs = lapack
3376 library_dirs = ~a/lib
3377 include_dirs = ~a/include
3379 (assoc-ref inputs "openblas")
3380 (assoc-ref inputs "openblas")
3381 (assoc-ref inputs "lapack")
3382 (assoc-ref inputs "lapack"))))
3384 (add-before 'build 'fix-executable-paths
3385 (lambda* (#:key inputs #:allow-other-keys)
3386 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3387 ;; instead of /bin/sh.
3388 (substitute* "numpy/distutils/exec_command.py"
3389 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3390 (string-append match-start (assoc-ref inputs "bash") match-end)))
3391 ;; Use "gcc" executable, not "cc".
3392 (substitute* "numpy/distutils/system_info.py"
3393 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3394 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3396 ;; Tests can only be run after the library has been installed and not
3397 ;; within the source directory.
3399 (add-after 'install 'check
3400 (lambda* (#:key outputs inputs #:allow-other-keys)
3401 ;; Make installed package available for running the tests
3402 (add-installed-pythonpath inputs outputs)
3403 ;; Make sure "f2py" etc is found.
3404 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3405 ":" (getenv "PATH")))
3406 (with-directory-excursion "/tmp"
3407 (invoke "python" "-c"
3408 "import numpy; numpy.test(verbose=2)")))))))
3409 (home-page "http://www.numpy.org/")
3410 (synopsis "Fundamental package for scientific computing with Python")
3411 (description "NumPy is the fundamental package for scientific computing
3412 with Python. It contains among other things: a powerful N-dimensional array
3413 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3414 and Fortran code, useful linear algebra, Fourier transform, and random number
3416 (properties `((python2-variant . ,(delay python2-numpy))))
3417 (license license:bsd-3)))
3419 ;; Numpy 1.16.x are the last versions that support Python 2.
3420 (define-public python2-numpy
3421 (let ((numpy (package-with-python2
3422 (strip-python2-variant python-numpy))))
3429 "https://github.com/numpy/numpy/releases/download/v"
3430 version "/numpy-" version ".tar.gz"))
3433 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3435 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3436 ;; interest only for legacy code going back to NumPy's predecessor
3438 (define-public python2-numpy-1.8
3439 (package (inherit python2-numpy)
3445 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3446 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3449 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3451 (substitute-keyword-arguments (package-arguments python2-numpy)
3453 `(modify-phases ,phases
3454 (replace 'configure-blas-lapack
3455 (lambda* (#:key inputs #:allow-other-keys)
3456 (call-with-output-file "site.cfg"
3460 libraries = openblas,lapack
3461 library_dirs = ~a/lib:~a/lib
3462 include_dirs = ~a/include:~a/include
3464 (assoc-ref inputs "openblas")
3465 (assoc-ref inputs "lapack")
3466 (assoc-ref inputs "openblas")
3467 (assoc-ref inputs "lapack"))))
3470 `(("python2-nose" ,python2-nose)))
3471 (description "NumPy is the fundamental package for scientific computing
3472 with Python. It contains among other things: a powerful N-dimensional array
3473 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3474 and Fortran code, useful linear algebra, Fourier transform, and random number
3475 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3476 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3478 (license license:bsd-3)))
3480 (define-public python-munch
3482 (name "python-munch")
3487 (uri (pypi-uri "munch" version))
3490 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3491 (build-system python-build-system)
3492 (home-page "https://github.com/Infinidat/munch")
3493 (synopsis "Dot-accessible dictionary")
3494 (description "Munch is a dot-accessible dictionary similar to JavaScript
3496 (license license:expat)))
3498 (define-public python2-munch
3499 (package-with-python2 python-munch))
3501 (define-public python-colormath
3503 (name "python-colormath")
3508 (uri (pypi-uri "colormath" version))
3511 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3512 (build-system python-build-system)
3514 `(("python-networkx" ,python-networkx)
3515 ("python-numpy" ,python-numpy)))
3516 (home-page "https://github.com/gtaylor/python-colormath")
3517 (synopsis "Color math and conversion library")
3519 "This is a Python library for color math and conversions.")
3520 (license license:bsd-3)))
3522 (define-public python2-colormath
3523 (package-with-python2 python-colormath))
3525 (define-public python-spectra
3527 (name "python-spectra")
3532 (uri (pypi-uri "spectra" version))
3535 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3536 (build-system python-build-system)
3539 (modify-phases %standard-phases
3541 (lambda _ (invoke "nosetests" "-v"))))))
3543 `(("python-colormath" ,python-colormath)))
3545 `(("python-nose" ,python-nose)))
3546 (home-page "https://github.com/jsvine/spectra")
3547 (synopsis "Color scales and color conversion")
3549 "This package provides a Python library intended to make color math,
3550 color scales, and color space conversion easy. It has support for:
3555 @item Color blending
3556 @item Brightening/darkening colors
3557 @item Saturating/desaturating colors
3558 @item Conversion to/from multiple color spaces.
3560 (license license:expat)))
3562 (define-public python2-spectra
3563 (package-with-python2 python-spectra))
3565 (define-public python-numpy-documentation
3567 (name "python-numpy-documentation")
3568 (version (package-version python-numpy))
3569 (source (package-source python-numpy))
3570 (build-system python-build-system)
3572 `(("python-matplotlib" ,python-matplotlib)
3573 ("python-numpy" ,python-numpy)
3574 ("pkg-config" ,pkg-config)
3575 ("python-sphinx" ,python-sphinx)
3576 ("python-numpydoc" ,python-numpydoc)
3577 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3579 texlive-generic-ifxetex
3580 texlive-generic-pdftex
3582 texlive-latex-capt-of
3584 texlive-latex-environ
3585 texlive-latex-eqparbox
3586 texlive-latex-etoolbox
3587 texlive-latex-expdlist
3588 texlive-latex-fancyhdr
3589 texlive-latex-fancyvrb
3590 texlive-latex-fncychap
3592 texlive-latex-framed
3593 texlive-latex-geometry
3594 texlive-latex-graphics
3595 texlive-latex-hyperref
3596 texlive-latex-mdwtools
3597 texlive-latex-multirow
3598 texlive-latex-needspace
3599 texlive-latex-oberdiek
3600 texlive-latex-parskip
3601 texlive-latex-preview
3602 texlive-latex-tabulary
3603 texlive-latex-threeparttable
3604 texlive-latex-titlesec
3605 texlive-latex-trimspaces
3607 texlive-latex-upquote
3609 texlive-latex-varwidth
3610 texlive-latex-wrapfig)))
3611 ("texinfo" ,texinfo)
3613 ("scipy-sphinx-theme"
3614 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3617 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3618 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3621 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3622 ,@(package-native-inputs python-numpy)))
3624 `(#:tests? #f ; we're only generating the documentation
3626 (modify-phases %standard-phases
3629 (lambda* (#:key inputs outputs #:allow-other-keys)
3630 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3632 data "/doc/" ,name "-"
3633 ,(package-version python-numpy)))
3634 (info-reader (string-append data "/info"))
3635 (html (string-append doc "/html"))
3636 (scipy-sphinx-theme "scipy-sphinx-theme")
3637 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3638 (pyver ,(string-append "PYVER=")))
3640 ;; FIXME: this is needed to for texlive-union to generate
3641 ;; fonts, which are not found.
3642 (setenv "HOME" "/tmp")
3644 (with-directory-excursion "doc"
3645 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3647 (invoke "make" "html" pyver)
3648 (invoke "make" "latex" "PAPER=a4" pyver)
3649 (invoke "make" "-C" "build/latex"
3650 "all-pdf" "PAPER=a4" pyver)
3651 ;; FIXME: Generation of the info file fails.
3652 ;; (invoke "make" "info" pyver)
3654 ;; (copy-file "build/texinfo/numpy.info"
3655 ;; (string-append info "/numpy.info"))
3656 (for-each (lambda (file)
3657 (copy-file (string-append "build/latex" file)
3658 (string-append doc file)))
3659 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3660 (with-directory-excursion "build/html"
3661 (for-each (lambda (file)
3662 (let* ((dir (dirname file))
3663 (tgt-dir (string-append html "/" dir)))
3664 (unless (equal? "." dir)
3666 (install-file file html)))
3667 (find-files "." ".*")))))
3669 (home-page (package-home-page python-numpy))
3670 (synopsis "Documentation for the python-numpy package")
3671 (description (package-description python-numpy))
3672 (license (package-license python-numpy))))
3674 (define-public python2-numpy-documentation
3675 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3677 (inherit numpy-documentation)
3678 (native-inputs `(("python2-functools32" ,python2-functools32)
3679 ,@(package-native-inputs numpy-documentation))))))
3681 (define-public python-pygit2
3683 (name "python-pygit2")
3688 (uri (pypi-uri "pygit2" version))
3690 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3691 (build-system python-build-system)
3693 '(#:tests? #f)) ; tests don't run correctly in our environment
3695 `(("python-six" ,python-six)
3696 ("python-cffi" ,python-cffi)
3697 ("libgit2" ,libgit2)
3698 ("python-tox" ,python-tox)))
3700 `(("python-pytest" ,python-pytest)))
3701 (home-page "https://github.com/libgit2/pygit2")
3702 (synopsis "Python bindings for libgit2")
3703 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3704 library, libgit2 implements Git plumbing.")
3705 ;; GPL2.0 only, with linking exception.
3706 (license license:gpl2)))
3708 (define-public python2-pygit2
3709 (package-with-python2 python-pygit2))
3711 (define-public python-pyparsing
3713 (name "python-pyparsing")
3718 (uri (pypi-uri "pyparsing" version))
3720 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3721 (build-system python-build-system)
3722 (outputs '("out" "doc"))
3724 `(#:tests? #f ; no test target
3726 (modify-phases %standard-phases
3727 (add-after 'install 'install-doc
3728 (lambda* (#:key outputs #:allow-other-keys)
3729 (let* ((doc (string-append (assoc-ref outputs "doc")
3730 "/share/doc/" ,name "-" ,version))
3731 (html-doc (string-append doc "/html"))
3732 (examples (string-append doc "/examples")))
3738 (install-file file tgt))
3739 (find-files dir ".*")))
3740 (list "docs" "htmldoc" "examples")
3741 (list doc html-doc examples))
3743 (home-page "https://github.com/pyparsing/pyparsing")
3744 (synopsis "Python parsing class library")
3746 "The pyparsing module is an alternative approach to creating and
3747 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3748 of regular expressions. The pyparsing module provides a library of classes
3749 that client code uses to construct the grammar directly in Python code.")
3750 (license license:expat)))
3752 (define-public python2-pyparsing
3753 (package-with-python2 python-pyparsing))
3755 (define-public python-numpydoc
3757 (name "python-numpydoc")
3762 (uri (pypi-uri "numpydoc" version))
3765 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3766 (build-system python-build-system)
3768 `(("python-sphinx" ,python-sphinx)))
3770 `(("python-nose" ,python-nose)))
3771 (home-page "https://pypi.python.org/pypi/numpydoc")
3773 "Numpy's Sphinx extensions")
3775 "Sphinx extension to support docstrings in Numpy format.")
3776 (license license:bsd-2)))
3778 (define-public python2-numpydoc
3779 (package-with-python2 python-numpydoc))
3781 (define-public python-numexpr
3783 (name "python-numexpr")
3788 (uri (pypi-uri "numexpr" version))
3791 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3792 (build-system python-build-system)
3793 (arguments `(#:tests? #f)) ; no tests included
3795 `(("python-numpy" ,python-numpy)))
3796 (home-page "https://github.com/pydata/numexpr")
3797 (synopsis "Fast numerical expression evaluator for NumPy")
3799 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3800 expressions that operate on arrays are accelerated and use less memory than
3801 doing the same calculation in Python. In addition, its multi-threaded
3802 capabilities can make use of all your cores, which may accelerate
3803 computations, most specially if they are not memory-bounded (e.g. those using
3804 transcendental functions).")
3805 (license license:expat)))
3807 (define-public python2-numexpr
3808 (package-with-python2 python-numexpr))
3810 (define-public python-cycler
3812 (name "python-cycler")
3816 (uri (pypi-uri "cycler" version))
3819 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3820 (build-system python-build-system)
3822 ;; XXX: The current version requires 'coveralls' which we don't have.
3823 ;; Enable this for the next release which uses 'python-pytest'.
3826 `(("python-six" ,python-six)))
3827 (home-page "http://matplotlib.org/cycler/")
3828 (synopsis "Composable keyword argument iterator")
3830 "When using @code{matplotlib} and plotting more than one line, it is
3831 common to want to be able to want to be able to cycle over one or more artist
3832 styles; but the plotting logic can quickly become involved.
3833 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3834 @code{Cycler} class was developed.")
3835 (license license:bsd-3)))
3837 (define-public python2-cycler
3838 (package-with-python2 python-cycler))
3840 (define-public python-colorspacious
3842 (name "python-colorspacious")
3848 (url "https://github.com/njsmith/colorspacious.git")
3849 (commit (string-append "v" version))))
3850 (file-name (git-file-name name version))
3852 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3853 (build-system python-build-system)
3855 `(("python-numpy" ,python-numpy)))
3857 `(("python-nose" ,python-nose)))
3860 (modify-phases %standard-phases
3863 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3864 (home-page "https://github.com/njsmith/colorspacious")
3865 (synopsis "Python library for colorspace conversions")
3866 (description "@code{colorspacious} is a Python library that lets you
3867 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3868 (license license:expat)))
3870 (define-public python2-colorspacious
3871 (package-with-python2 python-colorspacious))
3873 (define-public python-matplotlib
3875 (name "python-matplotlib")
3880 (uri (pypi-uri "matplotlib" version))
3883 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3884 (build-system python-build-system)
3885 (propagated-inputs ; the following packages are all needed at run time
3886 `(("python-cycler" ,python-cycler)
3887 ("python-kiwisolver" ,python-kiwisolver)
3888 ("python-pyparsing" ,python-pyparsing)
3889 ("python-pygobject" ,python-pygobject)
3890 ("gobject-introspection" ,gobject-introspection)
3891 ("python-tkinter" ,python "tk")
3892 ("python-dateutil" ,python-dateutil)
3893 ("python-numpy" ,python-numpy)
3894 ("python-pillow" ,python-pillow)
3895 ("python-pytz" ,python-pytz)
3896 ("python-six" ,python-six)
3897 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3898 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3899 ;; object. For this reason we need to import both libraries.
3900 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3901 ("python-pycairo" ,python-pycairo)
3902 ("python-cairocffi" ,python-cairocffi)))
3904 `(("libpng" ,libpng)
3905 ("imagemagick" ,imagemagick)
3906 ("freetype" ,freetype)
3909 ;; FIXME: Add backends when available.
3910 ;("python-wxpython" ,python-wxpython)
3914 `(("pkg-config" ,pkg-config)
3915 ("python-pytest" ,python-pytest)
3916 ("python-mock" ,python-mock)
3921 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3924 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3927 (modify-phases %standard-phases
3928 ;; XXX We disable all image comparison tests because we're using a
3929 ;; newer version of FreeType than matplotlib expects. This leads to
3930 ;; minor differences throughout the tests.
3931 (add-after 'unpack 'fix-and-disable-failing-tests
3933 (substitute* (append (find-files "lib/matplotlib/tests/"
3935 (find-files "lib/mpl_toolkits/tests"
3937 (("^from matplotlib" match)
3938 (string-append "import pytest\n" match))
3939 (("( *)@image_comparison" match indent)
3940 (string-append indent
3941 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3943 (substitute* "lib/matplotlib/tests/test_animation.py"
3944 (("/bin/sh") (which "sh")))
3945 (for-each delete-file
3946 ;; test_normal_axes, test_get_tightbbox_polar
3947 '("lib/matplotlib/tests/test_axes.py"
3948 ;; We don't use the webagg backend and this test forces it.
3949 "lib/matplotlib/tests/test_backend_webagg.py"
3950 ;; test_outward_ticks
3951 "lib/matplotlib/tests/test_tightlayout.py"
3952 ;; test_hidden_axes fails with minor extent
3953 ;; differences, possibly due to the use of a
3954 ;; different version of FreeType.
3955 "lib/matplotlib/tests/test_constrainedlayout.py"
3956 ;; Fontconfig returns no fonts.
3957 "lib/matplotlib/tests/test_font_manager.py"))
3959 (add-before 'install 'install-jquery-ui
3960 (lambda* (#:key outputs inputs #:allow-other-keys)
3961 (let ((dir (string-append (assoc-ref outputs "out")
3962 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3965 (assoc-ref inputs "jquery-ui")
3969 (lambda* (#:key outputs inputs #:allow-other-keys)
3970 (add-installed-pythonpath inputs outputs)
3971 (invoke "python" "tests.py" "-v"
3972 "-m" "not network and not webagg")))
3973 (add-before 'build 'configure-environment
3974 (lambda* (#:key outputs inputs #:allow-other-keys)
3975 (let ((cairo (assoc-ref inputs "cairo")))
3976 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3978 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3979 (setenv "HOME" (getcwd))
3980 (call-with-output-file "setup.cfg"
3982 (format port "[directories]~%
3983 basedirlist = ~a,~a~%
3986 (assoc-ref inputs "tcl")
3987 (assoc-ref inputs "tk")))))
3989 (home-page "https://matplotlib.org/")
3990 (synopsis "2D plotting library for Python")
3992 "Matplotlib is a Python 2D plotting library which produces publication
3993 quality figures in a variety of hardcopy formats and interactive environments
3994 across platforms. Matplotlib can be used in Python scripts, the python and
3995 ipython shell, web application servers, and six graphical user interface
3997 (license license:psfl)
3998 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4000 (define-public python2-matplotlib
4001 (let ((matplotlib (package-with-python2
4002 (strip-python2-variant python-matplotlib))))
4003 (package (inherit matplotlib)
4008 (uri (pypi-uri "matplotlib" version))
4011 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4013 (substitute-keyword-arguments (package-arguments matplotlib)
4015 `(modify-phases ,phases
4016 (replace 'install-jquery-ui
4017 (lambda* (#:key outputs inputs #:allow-other-keys)
4018 (let ((dir (string-append (assoc-ref outputs "out")
4019 "/lib/python2.7/site-packages/"
4020 "matplotlib/backends/web_backend/")))
4023 (assoc-ref inputs "jquery-ui")
4026 (delete 'fix-and-disable-failing-tests)
4027 (delete 'check))))) ; These tests weren't run the the past.
4028 ;; Make sure to use special packages for Python 2 instead
4029 ;; of those automatically rewritten by package-with-python2.
4031 `(("python2-pycairo" ,python2-pycairo)
4032 ("python2-backports-functools-lru-cache"
4033 ,python2-backports-functools-lru-cache)
4034 ("python2-functools32" ,python2-functools32)
4035 ("python2-pygobject-2" ,python2-pygobject-2)
4036 ("python2-subprocess32" ,python2-subprocess32)
4037 ("python2-tkinter" ,python-2 "tk")
4038 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4039 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4041 (define-public python-matplotlib-documentation
4043 (name "python-matplotlib-documentation")
4044 (version (package-version python-matplotlib))
4045 (source (package-source python-matplotlib))
4046 (build-system python-build-system)
4048 `(("python-matplotlib" ,python-matplotlib)
4049 ("python-colorspacious" ,python-colorspacious)
4050 ("python-sphinx" ,python-sphinx)
4051 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4052 ("python-sphinx-gallery" ,python-sphinx-gallery)
4053 ("python-numpydoc" ,python-numpydoc)
4054 ("python-ipython" ,python-ipython)
4055 ("python-ipykernel" ,python-ipykernel)
4056 ("python-mock" ,python-mock)
4057 ("graphviz" ,graphviz)
4058 ("texlive" ,(texlive-union (list texlive-amsfonts
4059 texlive-latex-amsmath
4060 texlive-latex-enumitem
4061 texlive-latex-expdlist
4062 texlive-latex-geometry
4063 texlive-latex-preview
4064 texlive-latex-type1cm
4067 texlive-generic-pdftex
4070 texlive-fonts-adobe-times
4071 texlive-fonts-txfonts)))
4072 ("texinfo" ,texinfo)
4073 ,@(package-native-inputs python-matplotlib)))
4075 `(#:tests? #f ; we're only generating documentation
4077 (modify-phases %standard-phases
4078 ;; The tests in python-matplotlib are run after the install phase, so
4079 ;; we need to delete the extra phase here.
4084 (setenv "PYTHONPATH"
4085 (string-append (getenv "PYTHONPATH")
4086 ":" (getcwd) "/../examples/units"))
4087 (substitute* "conf.py"
4089 (("^SHA = check_output.*")
4090 (string-append "SHA = \"" ,version "\"\n"))
4091 ;; Don't fetch intersphinx files from the Internet
4092 (("^explicit_order_folders" m)
4093 (string-append "intersphinx_mapping = {}\n" m))
4094 (("'sphinx.ext.intersphinx',") "")
4095 ;; Disable URL embedding which requires internet access.
4096 (("'https://docs.scipy.org/doc/numpy'") "None")
4097 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4099 "SPHINXBUILD=sphinx-build"
4100 "SPHINXOPTS=" ; don't abort on warnings
4103 (lambda* (#:key inputs outputs #:allow-other-keys)
4104 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4105 (doc (string-append data "/doc/python-matplotlib-" ,version))
4106 (info (string-append data "/info"))
4107 (html (string-append doc "/html")))
4110 (copy-recursively "build/html" html)
4111 (symlink (string-append html "/_images")
4112 (string-append info "/matplotlib-figures"))
4113 (with-directory-excursion "build/texinfo"
4114 (substitute* "matplotlib.texi"
4115 (("@image\\{([^,]*)" all file)
4116 (string-append "@image{matplotlib-figures/" file)))
4117 (symlink (string-append html "/_images")
4118 "./matplotlib-figures")
4119 (invoke "makeinfo" "--no-split"
4120 "-o" "matplotlib.info" "matplotlib.texi"))
4121 (install-file "build/texinfo/matplotlib.info" info))
4123 (home-page (package-home-page python-matplotlib))
4124 (synopsis "Documentation for the python-matplotlib package")
4125 (description (package-description python-matplotlib))
4126 (license (package-license python-matplotlib))))
4128 (define-public python2-matplotlib-documentation
4129 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4133 (alist-delete "python-sphinx-copybutton"
4134 (package-native-inputs parent))))))
4136 (define-public python-matplotlib-venn
4138 (name "python-matplotlib-venn")
4143 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4146 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4147 (build-system python-build-system)
4148 (arguments '(#:tests? #f)) ; tests are not included
4150 `(("python-matplotlib" ,python-matplotlib)
4151 ("python-numpy" ,python-numpy)
4152 ("python-scipy" ,python-scipy)))
4154 `(("unzip" ,unzip)))
4155 (home-page "https://github.com/konstantint/matplotlib-venn")
4156 (synopsis "Plot area-proportional Venn diagrams")
4158 "This package provides tools for plotting area-proportional two- and
4159 three-way Venn diagrams in @code{matplotlib}.")
4160 (license license:expat)))
4162 (define-public python2-pysnptools
4164 (name "python2-pysnptools")
4169 (uri (pypi-uri "pysnptools" version))
4172 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4173 (build-system python-build-system)
4175 `(#:python ,python-2 ; only Python 2.7 is supported
4176 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4178 `(("python2-numpy" ,python2-numpy)
4179 ("python2-scipy" ,python2-scipy)
4180 ("python2-pandas" ,python2-pandas)))
4182 `(("python2-cython" ,python2-cython)))
4183 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4184 (synopsis "Library for reading and manipulating genetic data")
4186 "PySnpTools is a library for reading and manipulating genetic data. It
4187 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4188 those files. It can also efficiently manipulate ranges of integers using set
4189 operators such as union, intersection, and difference.")
4190 (license license:asl2.0)))
4192 (define-public python-socksipy-branch
4194 (name "python-socksipy-branch")
4199 (uri (pypi-uri "SocksiPy-branch" version))
4202 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4203 (build-system python-build-system)
4205 `(#:tests? #f)) ; There are no tests
4206 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4207 (synopsis "Python SOCKS module")
4209 "SocksiPy - A Python SOCKS client module. It provides a
4210 socket-like interface that supports connections to any TCP
4211 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4212 The original version was developed by Dan Haim, this is a
4213 branch created by Mario Vilas to address some open issues,
4214 as the original project seems to have been abandoned circa 2007.")
4215 (license license:bsd-3)))
4217 (define-public python2-socksipy-branch
4218 (package-with-python2 python-socksipy-branch))
4220 (define-public python-socksipychain
4222 (name "python-socksipychain")
4228 (url "https://github.com/pagekite/PySocksipyChain.git")
4229 (commit (string-append "v" version))))
4230 (file-name (git-file-name name version))
4233 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4234 (build-system python-build-system)
4236 `(#:tests? #f)) ; Tests try to access the network.
4237 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4238 (synopsis "Python SOCKS module with chained proxies support")
4240 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4241 adds support for arbitrary chaining of proxy servers and various modes of
4242 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4243 a simple netcat replacement with chaining support.")
4244 (license license:bsd-3)))
4246 (define-public python-pycodestyle
4248 (name "python-pycodestyle")
4253 (uri (pypi-uri "pycodestyle" version))
4256 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4257 (build-system python-build-system)
4258 (home-page "https://pycodestyle.readthedocs.io/")
4259 (synopsis "Python style guide checker")
4260 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4261 Python code against some of the style conventions in
4262 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4263 (license license:expat)))
4265 (define-public python2-pycodestyle
4266 (package-with-python2 python-pycodestyle))
4268 (define-public python-multidict
4270 (name "python-multidict")
4275 (uri (pypi-uri "multidict" version))
4278 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4279 (build-system python-build-system)
4281 `(("python-pytest" ,python-pytest)
4282 ("python-pytest-runner" ,python-pytest-runner)))
4283 (home-page "https://github.com/aio-libs/multidict/")
4284 (synopsis "Multidict implementation")
4285 (description "Multidict is dict-like collection of key-value pairs
4286 where key might be occurred more than once in the container.")
4287 (license license:asl2.0)))
4289 (define-public python-orderedmultidict
4291 (name "python-orderedmultidict")
4296 (uri (pypi-uri "orderedmultidict" version))
4299 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4300 (build-system python-build-system)
4303 (modify-phases %standard-phases
4304 (add-after 'unpack 'fix-tests
4306 ;; The package uses nosetest for running the tests.
4307 ;; Adding this initfile allows to run the test suite
4308 ;; without requiring nosetest.
4309 (with-output-to-file "tests/__init__.py" newline)
4312 `(("python-six" ,python-six)))
4314 `(("python-pycodestyle" ,python-pycodestyle)))
4315 (home-page "https://github.com/gruns/orderedmultidict")
4316 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4317 (description "This package contains a library for ordered multivalue
4318 dictionaries. A multivalue dictionary is a dictionary that can store
4319 multiple values for the same key. An ordered multivalue dictionary is a
4320 multivalue dictionary that retains the order of insertions and deletions.")
4321 (license license:unlicense)))
4323 (define-public python2-orderedmultidict
4324 (package-with-python2 python-orderedmultidict))
4326 (define-public python-autopep8
4328 (name "python-autopep8")
4333 (uri (pypi-uri "autopep8" version))
4336 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4337 (build-system python-build-system)
4339 `(("python-pycodestyle" ,python-pycodestyle)))
4340 (home-page "https://github.com/hhatto/autopep8")
4341 (synopsis "Format Python code according to the PEP 8 style guide")
4343 "@code{autopep8} automatically formats Python code to conform to
4344 the PEP 8 style guide. It uses the pycodestyle utility to determine
4345 what parts of the code needs to be formatted. @code{autopep8} is
4346 capable of fixing most of the formatting issues that can be reported
4348 (license (license:non-copyleft
4349 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4351 (define-public python2-autopep8
4352 (package-with-python2 python-autopep8))
4354 (define-public python-distutils-extra
4356 (name "python-distutils-extra")
4361 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4362 version "/+download/python-distutils-extra-"
4366 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4367 (build-system python-build-system)
4368 (home-page "https://launchpad.net/python-distutils-extra/")
4369 (synopsis "Enhancements to Python's distutils")
4371 "The python-distutils-extra module enables you to easily integrate
4372 gettext support, themed icons, and scrollkeeper-based documentation into
4373 Python's distutils.")
4374 (license license:gpl2)))
4376 (define-public python2-distutils-extra
4377 (package-with-python2 python-distutils-extra))
4379 (define-public python2-elib.intl
4381 (name "python2-elib.intl")
4385 ;; This project doesn't tag releases or publish tarballs, so we take
4386 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4389 (url "https://github.com/dieterv/elib.intl.git")
4390 (commit "d09997cfef")))
4391 (file-name (string-append name "-" version "-checkout"))
4394 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4395 (build-system python-build-system)
4397 ;; incompatible with Python 3 (exception syntax)
4398 `(#:python ,python-2
4400 (home-page "https://github.com/dieterv/elib.intl")
4401 (synopsis "Enhanced internationalization for Python")
4403 "The elib.intl module provides enhanced internationalization (I18N)
4404 services for your Python modules and applications.")
4405 (license license:lgpl3+)))
4407 (define-public python-olefile
4409 (name "python-olefile")
4414 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4415 "download/v" version "/olefile-" version ".tar.gz"))
4416 (file-name (string-append name "-" version ".tar.gz"))
4419 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4420 (build-system python-build-system)
4421 (home-page "https://www.decalage.info/python/olefileio")
4422 (synopsis "Read and write Microsoft OLE2 files.")
4424 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4425 Storage or Compound Document, Microsoft Office). It is an improved version of
4426 the OleFileIO module from PIL, the Python Image Library.")
4427 (license license:bsd-3)))
4429 (define-public python2-olefile
4430 (package-with-python2 python-olefile))
4432 (define-public python-pillow
4434 (name "python-pillow")
4439 (uri (pypi-uri "Pillow" version))
4442 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4443 (build-system python-build-system)
4445 `(("python-pytest" ,python-pytest)))
4447 `(("freetype" ,freetype)
4449 ("libjpeg" ,libjpeg)
4450 ("libtiff" ,libtiff)
4451 ("libwebp" ,libwebp)
4452 ("openjpeg" ,openjpeg)
4455 `(("python-olefile" ,python-olefile)))
4458 (modify-phases %standard-phases
4459 (add-after 'unpack 'patch-ldconfig
4461 (substitute* "setup.py"
4462 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4464 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4467 (setenv "HOME" (getcwd))
4468 ;; Make installed package available for running the tests.
4469 (add-installed-pythonpath inputs outputs)
4470 (invoke "python" "selftest.py" "--installed")
4471 (invoke "python" "-m" "pytest" "-vv"))
4473 (home-page "https://python-pillow.org")
4474 (synopsis "Fork of the Python Imaging Library")
4476 "The Python Imaging Library adds image processing capabilities to your
4477 Python interpreter. This library provides extensive file format support, an
4478 efficient internal representation, and fairly powerful image processing
4479 capabilities. The core image library is designed for fast access to data
4480 stored in a few basic pixel formats. It should provide a solid foundation for
4481 a general image processing tool.")
4482 (license (license:x11-style
4483 "http://www.pythonware.com/products/pil/license.htm"
4484 "The PIL Software License"))))
4486 (define-public python2-pillow
4487 (package-with-python2 python-pillow))
4489 (define-public python-pycparser
4491 (name "python-pycparser")
4496 (uri (pypi-uri "pycparser" version))
4499 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4500 (outputs '("out" "doc"))
4501 (build-system python-build-system)
4503 `(("pkg-config" ,pkg-config)))
4506 (modify-phases %standard-phases
4509 (with-directory-excursion "tests"
4510 (invoke "python" "all_tests.py"))
4512 (add-after 'install 'install-doc
4513 (lambda* (#:key outputs #:allow-other-keys)
4514 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4515 (doc (string-append data "/doc/" ,name "-" ,version))
4516 (examples (string-append doc "/examples")))
4518 (for-each (lambda (file)
4519 (copy-file (string-append "." file)
4520 (string-append doc file)))
4521 '("/README.rst" "/CHANGES" "/LICENSE"))
4522 (copy-recursively "examples" examples)
4524 (home-page "https://github.com/eliben/pycparser")
4525 (synopsis "C parser in Python")
4527 "Pycparser is a complete parser of the C language, written in pure Python
4528 using the PLY parsing library. It parses C code into an AST and can serve as
4529 a front-end for C compilers or analysis tools.")
4530 (license license:bsd-3)))
4532 (define-public python2-pycparser
4533 (package-with-python2 python-pycparser))
4535 (define-public python-pywavelets
4537 (name "python-pywavelets")
4539 (home-page "https://github.com/PyWavelets/pywt")
4542 (uri (pypi-uri "PyWavelets" version))
4545 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4546 (build-system python-build-system)
4548 '(#:modules ((ice-9 ftw)
4552 (guix build python-build-system))
4553 #:phases (modify-phases %standard-phases
4556 (let ((cwd (getcwd))
4557 (libdir (find (cut string-prefix? "lib." <>)
4558 (scandir "build"))))
4559 (with-directory-excursion (string-append cwd "/build/" libdir)
4560 (invoke "nosetests" "-v" "."))))))))
4562 `(("python-matplotlib" ,python-matplotlib) ;for tests
4563 ("python-nose" ,python-nose)))
4565 `(("python-numpy" ,python-numpy)))
4566 (synopsis "Wavelet transforms in Python")
4568 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4569 mathematical basis functions that are localized in both time and frequency.
4570 Wavelet transforms are time-frequency transforms employing wavelets. They are
4571 similar to Fourier transforms, the difference being that Fourier transforms are
4572 localized only in frequency instead of in time and frequency.")
4573 (license license:expat)))
4575 (define-public python2-pywavelets
4576 (package-with-python2 python-pywavelets))
4578 (define-public python-xcffib
4580 (name "python-xcffib")
4585 (uri (pypi-uri "xcffib" version))
4588 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4589 (build-system python-build-system)
4591 `(("libxcb" ,libxcb)))
4593 `(("python-cffi" ,python-cffi) ; used at run time
4594 ("python-six" ,python-six)))
4596 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4599 (modify-phases %standard-phases
4600 (add-after 'unpack 'fix-libxcb-path
4601 (lambda* (#:key inputs #:allow-other-keys)
4602 (let ((libxcb (assoc-ref inputs "libxcb")))
4603 (substitute* '("xcffib/__init__.py")
4604 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4606 (add-after 'install 'install-doc
4607 (lambda* (#:key outputs #:allow-other-keys)
4608 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4609 "/doc/" ,name "-" ,version)))
4611 (copy-file "README.md"
4612 (string-append doc "/README.md"))
4614 (home-page "https://github.com/tych0/xcffib")
4615 (synopsis "XCB Python bindings")
4617 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4618 support for Python 3 and PyPy. It is based on cffi.")
4619 (license license:expat)))
4621 (define-public python2-xcffib
4622 (package-with-python2 python-xcffib))
4624 (define-public python-cairocffi
4626 (name "python-cairocffi")
4631 (uri (pypi-uri "cairocffi" version))
4634 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4635 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4636 (build-system python-build-system)
4637 (outputs '("out" "doc"))
4641 ("gdk-pixbuf" ,gdk-pixbuf)
4645 `(("pkg-config" ,pkg-config)
4646 ("python-pytest" ,python-pytest)
4647 ("python-pytest-cov" ,python-pytest-cov)
4648 ("python-pytest-runner" ,python-pytest-runner)
4649 ("python-sphinx" ,python-sphinx)
4650 ("python-docutils" ,python-docutils)))
4652 `(("python-xcffib" ,python-xcffib))) ; used at run time
4655 (modify-phases %standard-phases
4656 (add-after 'unpack 'patch-paths
4657 (lambda* (#:key inputs outputs #:allow-other-keys)
4658 (substitute* (find-files "." "\\.py$")
4659 (("dlopen\\(ffi, 'cairo'")
4660 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4661 "/lib/libcairo.so.2'"))
4662 (("dlopen\\(ffi, 'gdk-3'")
4663 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4664 "/lib/libgtk-3.so.0'"))
4665 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4666 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4667 "/lib/libgdk_pixbuf-2.0.so.0'"))
4668 (("dlopen\\(ffi, 'glib-2.0'")
4669 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4670 "/lib/libglib-2.0.so.0'"))
4671 (("dlopen\\(ffi, 'gobject-2.0'")
4672 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4673 "/lib/libgobject-2.0.so.0'"))
4674 (("dlopen\\(ffi, 'pangocairo-1.0'")
4675 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4676 "/lib/libpangocairo-1.0.so.0'"))
4677 (("dlopen\\(ffi, 'pango-1.0'")
4678 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4679 "/lib/libpango-1.0.so.0'")))
4681 (add-after 'install 'install-doc
4682 (lambda* (#:key inputs outputs #:allow-other-keys)
4683 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4684 (doc (string-append data "/doc/" ,name "-" ,version))
4685 (html (string-append doc "/html")))
4686 (setenv "LD_LIBRARY_PATH"
4687 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4688 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4689 (setenv "LANG" "en_US.UTF-8")
4691 (for-each (lambda (file)
4692 (copy-file (string-append "." file)
4693 (string-append doc file)))
4694 '("/README.rst" "/CHANGES" "/LICENSE"))
4695 (system* "python" "setup.py" "build_sphinx")
4696 (copy-recursively "docs/_build/html" html)
4698 (home-page "https://github.com/Kozea/cairocffi")
4699 (synopsis "Python bindings and object-oriented API for Cairo")
4701 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4702 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4703 graphics library with support for multiple backends including image buffers,
4704 PNG, PostScript, PDF, and SVG file output.")
4705 (license license:bsd-3)))
4707 (define-public python2-cairocffi
4708 (package-with-python2 python-cairocffi))
4710 (define-public python-decorator
4712 (name "python-decorator")
4717 (uri (pypi-uri "decorator" version))
4719 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4720 (build-system python-build-system)
4721 (home-page "https://pypi.python.org/pypi/decorator/")
4722 (synopsis "Python module to simplify usage of decorators")
4724 "The aim of the decorator module is to simplify the usage of decorators
4725 for the average programmer, and to popularize decorators usage giving examples
4726 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4727 etc. The core of this module is a decorator factory.")
4728 (license license:expat)))
4730 (define-public python2-decorator
4731 (package-with-python2 python-decorator))
4733 (define-public python-drmaa
4735 (name "python-drmaa")
4740 (uri (pypi-uri "drmaa" version))
4742 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4743 (build-system python-build-system)
4744 ;; The test suite requires libdrmaa which is provided by the cluster
4745 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4746 ;; should be set to the path of the libdrmaa library.
4747 (arguments '(#:tests? #f))
4749 `(("python-nose" ,python-nose)))
4750 (home-page "https://pypi.python.org/pypi/drmaa")
4751 (synopsis "Python bindings for the DRMAA library")
4753 "A Python package for Distributed Resource Management (DRM) job
4754 submission and control. This package is an implementation of the DRMAA 1.0
4755 Python language binding specification.")
4756 (license license:bsd-3)))
4758 (define-public python2-drmaa
4759 (package-with-python2 python-drmaa))
4761 (define-public python-grako
4763 (name "python-grako")
4769 (pypi-uri "grako" version ".zip"))
4772 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4773 (build-system python-build-system)
4774 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4777 ("python-pytest" ,python-pytest)
4778 ("python-pytest-runner" ,python-pytest-runner)))
4779 (home-page "https://bitbucket.org/neogeny/grako")
4780 (synopsis "EBNF parser generator")
4782 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4783 memoizing PEG/Packrat parser in Python.")
4784 (license license:bsd-3)))
4786 (define-public python2-grako
4787 (package-with-python2 python-grako))
4789 (define-public python-gridmap
4791 (name "python-gridmap")
4797 (url "https://github.com/pygridtools/gridmap.git")
4798 (commit (string-append "v" version))))
4799 (file-name (git-file-name name version))
4801 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4802 (build-system python-build-system)
4804 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4806 `(("python-psutil" ,python-psutil)
4807 ("python-drmaa" ,python-drmaa)
4808 ("python-pyzmq" ,python-pyzmq)))
4809 (home-page "https://github.com/pygridtools/gridmap")
4810 (synopsis "Create jobs on a cluster directly from Python")
4812 "Gridmap is a Python package to allow you to easily create jobs on the
4813 cluster directly from Python. You can directly map Python functions onto the
4814 cluster without needing to write any wrapper code yourself.")
4815 (license license:gpl3+)))
4817 (define-public python2-gridmap
4818 (package-with-python2 python-gridmap))
4820 (define-public python-honcho
4822 (name "python-honcho")
4828 (url "https://github.com/nickstenning/honcho.git")
4829 (commit (string-append "v" version))))
4830 (file-name (git-file-name name version))
4832 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4833 (build-system python-build-system)
4835 `(("python-pytest" ,python-pytest)
4836 ("python-mock" ,python-mock)
4837 ("python-tox" ,python-tox)
4838 ("which" ,which))) ;for tests
4840 `(("python-jinja2" ,python-jinja2)))
4843 (modify-phases %standard-phases
4845 (add-after 'install 'check
4846 (lambda* (#:key outputs inputs #:allow-other-keys)
4847 ;; fix honcho path in testsuite
4848 (substitute* "tests/conftest.py"
4849 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4850 "/bin/honcho" "'")))
4851 ;; It's easier to run tests after install.
4852 ;; Make installed package available for running the tests
4853 (add-installed-pythonpath inputs outputs)
4854 (invoke "py.test" "-v"))))))
4855 (home-page "https://github.com/nickstenning/honcho")
4856 (synopsis "Manage Procfile-based applications")
4858 "A Procfile is a file which describes how to run an application
4859 consisting of several processes. honcho starts all listed processes.
4860 The output of all running processes is collected by honcho and
4862 (license license:expat)))
4864 (define-public python2-honcho
4865 (package-with-python2 python-honcho))
4867 (define-public python-pexpect
4869 (name "python-pexpect")
4874 (uri (pypi-uri "pexpect" version))
4876 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4877 (build-system python-build-system)
4880 (modify-phases %standard-phases
4881 (add-before 'check 'prepare-tests
4883 (substitute* (find-files "tests")
4884 (("/bin/ls") (which "ls"))
4885 (("/bin/echo") (which "echo"))
4886 (("/bin/which") (which "which"))
4887 ;; Many tests try to use the /bin directory which
4888 ;; is not present in the build environment.
4889 ;; Use one that's non-empty and unlikely to change.
4890 (("/bin'") "/dev'"))
4891 ;; XXX: Socket connection test gets "Connection reset by peer".
4892 ;; Why does it not work? Delete for now.
4893 (delete-file "tests/test_socket.py")
4895 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4897 `(("python-nose" ,python-nose)
4898 ("python-pytest" ,python-pytest)
4901 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4903 `(("python-ptyprocess" ,python-ptyprocess)))
4904 (home-page "http://pexpect.readthedocs.org/")
4905 (synopsis "Controlling interactive console applications")
4907 "Pexpect is a pure Python module for spawning child applications;
4908 controlling them; and responding to expected patterns in their output.
4909 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4910 child application and control it as if a human were typing commands.")
4911 (license license:isc)))
4913 (define-public python2-pexpect
4914 (package-with-python2 python-pexpect))
4916 (define-public python-setuptools-scm
4918 (name "python-setuptools-scm")
4922 (uri (pypi-uri "setuptools_scm" version))
4925 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4926 (build-system python-build-system)
4927 (home-page "https://github.com/pypa/setuptools_scm/")
4928 (synopsis "Manage Python package versions in SCM metadata")
4930 "Setuptools_scm handles managing your Python package versions in
4931 @dfn{software configuration management} (SCM) metadata instead of declaring
4932 them as the version argument or in a SCM managed file.")
4933 (license license:expat)))
4935 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4936 (define-public python-setuptools-scm-3.3
4938 (inherit python-setuptools-scm)
4942 (uri (pypi-uri "setuptools_scm" version))
4945 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4947 (define-public python2-setuptools-scm
4948 (package-with-python2 python-setuptools-scm))
4950 (define-public python-pathlib2
4952 (name "python-pathlib2")
4957 (uri (pypi-uri "pathlib2" version))
4960 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4961 (build-system python-build-system)
4963 `(("python-scandir" ,python-scandir)
4964 ("python-six" ,python-six)))
4965 (home-page "https://pypi.python.org/pypi/pathlib2/")
4966 (synopsis "Object-oriented file system paths")
4967 (description "The goal of pathlib2 is to provide a backport of the
4968 standard @code{pathlib} module which tracks the standard library module, so
4969 all the newest features of the standard @code{pathlib} can be used also on
4970 older Python versions.")
4971 (license license:expat)))
4973 (define-public python-importlib-metadata
4975 (name "python-importlib-metadata")
4980 (uri (pypi-uri "importlib_metadata" version))
4982 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4983 (build-system python-build-system)
4985 `(("python-configparser" ,python-configparser)
4986 ("python-contextlib2" ,python-contextlib2)
4987 ("python-docutils" ,python-docutils)
4988 ("python-pathlib2" ,python-pathlib2)
4989 ("python-rst.linker" ,python-rst.linker)
4990 ("python-zipp" ,python-zipp)))
4992 `(("python-setuptools-scm" ,python-setuptools-scm)
4993 ("python-sphinx" ,python-sphinx)))
4994 (home-page "https://importlib-metadata.readthedocs.io/")
4995 (synopsis "Read metadata from Python packages")
4997 "@code{importlib_metadata} is a library which provides an API for
4998 accessing an installed Python package's metadata, such as its entry points or
4999 its top-level name. This functionality intends to replace most uses of
5000 @code{pkg_resources} entry point API and metadata API. Along with
5001 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5002 need to use the older and less efficient @code{pkg_resources} package.")
5003 (license license:asl2.0)))
5005 (define-public python-jaraco-packaging
5007 (name "python-jaraco-packaging")
5012 (uri (pypi-uri "jaraco.packaging" version))
5015 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5016 (build-system python-build-system)
5018 `(("python-pytest" ,python-pytest)
5019 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5020 ("python-pytest-flake8" ,python-pytest-flake8)
5021 ("python-rst.linker" ,python-rst.linker)
5022 ("python-setuptools" ,python-setuptools)
5023 ("python-setuptools-scm" ,python-setuptools-scm)
5024 ("python-six" ,python-six)
5025 ("python-sphinx" ,python-sphinx)))
5026 (home-page "https://github.com/jaraco/jaraco.packaging")
5027 (synopsis "Tools to supplement packaging Python releases")
5029 "This package provides various tools to supplement packaging Python
5031 (license license:expat)))
5033 (define-public python-pathpy
5035 (name "python-pathpy")
5040 (uri (pypi-uri "path.py" version))
5042 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5043 (outputs '("out" "doc"))
5044 (build-system python-build-system)
5046 `(("python-appdirs" ,python-appdirs)
5047 ("python-importlib-metadata" ,python-importlib-metadata)))
5049 `(("python-setuptools-scm" ,python-setuptools-scm)
5050 ("python-sphinx" ,python-sphinx)
5051 ("python-rst.linker" ,python-rst.linker)
5052 ("python-pytest" ,python-pytest)
5053 ("python-pytest-runner" ,python-pytest-runner)
5054 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5057 (modify-phases %standard-phases
5058 (add-after 'build 'build-doc
5060 (setenv "LANG" "en_US.UTF-8")
5061 (invoke "python" "setup.py" "build_sphinx")))
5062 (add-after 'install 'install-doc
5063 (lambda* (#:key outputs #:allow-other-keys)
5064 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5065 (doc (string-append data "/doc/" ,name "-" ,version))
5066 (html (string-append doc "/html")))
5068 (for-each (lambda (file)
5069 (copy-file file (string-append doc "/" file)))
5070 '("README.rst" "CHANGES.rst"))
5071 (copy-recursively "build/sphinx/html" html)
5075 ;; The import time test aborts if an import takes longer than
5076 ;; 100ms. It may very well take a little longer than that.
5077 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5078 (home-page "https://github.com/jaraco/path.py")
5079 (synopsis "Python module wrapper for built-in os.path")
5081 "@code{path.py} implements path objects as first-class entities, allowing
5082 common operations on files to be invoked on those path objects directly.")
5083 (license license:expat)))
5085 (define-public python2-pathpy
5086 (package-with-python2 python-pathpy))
5088 (define-public python-simplegeneric
5090 (name "python-simplegeneric")
5095 (uri (pypi-uri "simplegeneric" version ".zip"))
5097 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5098 (build-system python-build-system)
5100 `(("unzip" ,unzip)))
5101 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5102 (synopsis "Python module for simple generic functions")
5104 "The simplegeneric module lets you define simple single-dispatch generic
5105 functions, akin to Python’s built-in generic functions like @code{len()},
5106 @code{iter()} and so on. However, instead of using specially-named methods,
5107 these generic functions use simple lookup tables, akin to those used by
5108 e.g. @code{pickle.dump()} and other generic functions found in the Python
5110 (license license:zpl2.1)))
5112 (define-public python2-simplegeneric
5113 (package-with-python2 python-simplegeneric))
5115 (define-public python-ipython-genutils
5116 ;; TODO: This package is retired, check if can be removed, see description.
5118 (name "python-ipython-genutils")
5123 (uri (pypi-uri "ipython_genutils" version))
5125 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5126 (build-system python-build-system)
5127 (arguments `(#:tests? #f)) ; no tests
5128 (home-page "https://ipython.org")
5129 (synopsis "Vestigial utilities from IPython")
5131 "This package provides retired utilities from IPython. No packages
5132 outside IPython/Jupyter should depend on it.
5134 This package shouldn't exist. It contains some common utilities shared by
5135 Jupyter and IPython projects during The Big Split. As soon as possible, those
5136 packages will remove their dependency on this, and this package will go
5138 (license license:bsd-3)))
5140 (define-public python2-ipython-genutils
5141 (package-with-python2 python-ipython-genutils))
5143 (define-public python-traitlets
5145 (name "python-traitlets")
5150 (uri (pypi-uri "traitlets" version))
5153 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5154 (build-system python-build-system)
5157 (modify-phases %standard-phases
5158 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5160 `(("python-ipython-genutils" ,python-ipython-genutils)
5161 ("python-decorator" ,python-decorator)))
5163 `(("python-pytest" ,python-pytest)))
5164 (properties `((python2-variant . ,(delay python2-traitlets))))
5165 (home-page "https://ipython.org")
5166 (synopsis "Configuration system for Python applications")
5168 "Traitlets is a framework that lets Python classes have attributes with
5169 type checking, dynamically calculated default values, and ‘on change’
5170 callbacks. The package also includes a mechanism to use traitlets for
5171 configuration, loading values from files or from command line arguments. This
5172 is a distinct layer on top of traitlets, so you can use traitlets in your code
5173 without using the configuration machinery.")
5174 (license license:bsd-3)))
5176 (define-public python2-traitlets
5177 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5181 `(("python2-enum34" ,python2-enum34)
5182 ,@(package-propagated-inputs traitlets))))))
5184 (define-public python-jupyter-core
5186 (name "python-jupyter-core")
5191 (uri (string-append (pypi-uri "jupyter_core" version)))
5194 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5195 (build-system python-build-system)
5196 ;; FIXME: not sure how to run the tests
5197 (arguments `(#:tests? #f))
5199 `(("python-traitlets" ,python-traitlets)))
5200 (home-page "http://jupyter.org/")
5201 (synopsis "Jupyter base package")
5203 "Jupyter core is the base package on which Jupyter projects rely.")
5204 (license license:bsd-3)))
5206 (define-public python2-jupyter-core
5207 (package-with-python2 python-jupyter-core))
5209 (define-public python-jupyter-client
5211 (name "python-jupyter-client")
5216 (uri (pypi-uri "jupyter_client" version))
5219 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5220 (build-system python-build-system)
5221 ;; Tests fail because of missing native python kernel which I assume is
5222 ;; provided by the ipython package, which we cannot use because it would
5223 ;; cause a dependency cycle.
5227 #:phases (modify-phases %standard-phases
5228 (add-after 'unpack 'set-tool-file-names
5229 (lambda* (#:key inputs #:allow-other-keys)
5230 (let ((iproute (assoc-ref inputs "iproute")))
5231 (substitute* "jupyter_client/localinterfaces.py"
5233 (string-append "'" iproute "/sbin/ip'")))
5236 `(("iproute" ,iproute)))
5238 `(("python-pyzmq" ,python-pyzmq)
5239 ("python-traitlets" ,python-traitlets)
5240 ("python-jupyter-core" ,python-jupyter-core)))
5241 (home-page "http://jupyter.org/")
5242 (synopsis "Jupyter protocol implementation and client libraries")
5244 "The @code{jupyter_client} package contains the reference implementation
5245 of the Jupyter protocol. It also provides client and kernel management APIs
5246 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5247 installing @code{kernelspec}s for use with Jupyter frontends.")
5248 (license license:bsd-3)))
5250 (define-public python2-jupyter-client
5251 (package-with-python2 python-jupyter-client))
5253 (define-public python-ipykernel
5255 (name "python-ipykernel")
5260 (uri (pypi-uri "ipykernel" version))
5262 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5263 (build-system python-build-system)
5266 (modify-phases %standard-phases
5269 (setenv "HOME" "/tmp")
5270 (invoke "pytest" "-v")
5272 (add-after 'install 'set-python-file-name
5273 (lambda* (#:key outputs #:allow-other-keys)
5274 ;; Record the absolute file name of the 'python' executable in
5276 (let ((out (assoc-ref outputs "out")))
5277 (substitute* (string-append out "/share/jupyter"
5278 "/kernels/python3/kernel.json")
5280 (string-append "\"" (which "python") "\"")))
5283 `(("python-ipython" ,python-ipython)
5284 ;; imported at runtime during connect
5285 ("python-jupyter-client" ,python-jupyter-client)))
5287 `(("python-flaky" ,python-flaky)
5288 ("python-nose" ,python-nose)
5289 ("python-pytest" ,python-pytest)))
5290 (home-page "https://ipython.org")
5291 (synopsis "IPython Kernel for Jupyter")
5293 "This package provides the IPython kernel for Jupyter.")
5294 (license license:bsd-3)))
5296 ;; Version 5.1.1 and above no longer support Python 2.
5297 (define-public python2-ipykernel
5299 (name "python2-ipykernel")
5304 (uri (pypi-uri "ipykernel" version))
5306 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5307 (build-system python-build-system)
5309 `(#:python ,python-2
5311 (modify-phases %standard-phases
5314 (setenv "HOME" "/tmp")
5315 (invoke "pytest" "-v")
5318 `(("python2-ipython" ,python2-ipython)
5319 ;; imported at runtime during connect
5320 ("python2-jupyter-client" ,python2-jupyter-client)))
5322 `(("python2-pytest" ,python2-pytest)
5323 ("python2-nose" ,python2-nose)))
5324 (home-page "https://ipython.org")
5325 (synopsis "IPython Kernel for Jupyter")
5327 "This package provides the IPython kernel for Jupyter.")
5328 (license license:bsd-3)))
5330 (define-public python-pari-jupyter
5332 (name "python-pari-jupyter")
5337 (uri (pypi-uri "pari_jupyter" version))
5340 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5341 (build-system python-build-system)
5343 `(("python-ipykernel" ,python-ipykernel)))
5345 `(("pari-gp" ,pari-gp)
5346 ("readline" ,readline)))
5348 `(#:tests? #f)) ; no test suite
5350 "https://github.com/jdemeyer/pari_jupyter")
5351 (synopsis "A Jupyter kernel for PARI/GP")
5352 (description "The package provides a PARI/GP kernel for Jupyter.")
5353 (license license:gpl3+)))
5355 (define-public python-backcall
5357 (name "python-backcall")
5362 (uri (pypi-uri "backcall" version))
5365 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5366 (build-system python-build-system)
5367 (home-page "https://github.com/takluyver/backcall/")
5368 (synopsis "Specifications for callback functions passed in to an API")
5370 "If your code lets other people supply callback functions, it's important
5371 to specify the function signature you expect, and check that functions support
5372 that. Adding extra parameters later would break other peoples code unless
5373 you're careful. The @code{backcall} package provides a way of specifying the
5374 callback signature using a prototype function.")
5375 (license license:bsd-3)))
5377 ;; This is the latest release of the LTS version of ipython with support for
5378 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5379 ;; dropped support for Python 2.7.
5380 (define-public python2-ipython
5382 (name "python2-ipython")
5387 (uri (pypi-uri "ipython" version ".tar.gz"))
5389 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5390 (build-system python-build-system)
5392 `(("python2-backports-shutil-get-terminal-size"
5393 ,python2-backports-shutil-get-terminal-size)
5394 ("python2-pathlib2" ,python2-pathlib2)
5395 ("python2-pyzmq" ,python2-pyzmq)
5396 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5397 ("python2-terminado" ,python2-terminado)
5398 ("python2-matplotlib" ,python2-matplotlib)
5399 ("python2-numpy" ,python2-numpy)
5400 ("python2-numpydoc" ,python2-numpydoc)
5401 ("python2-jinja2" ,python2-jinja2)
5402 ("python2-mistune" ,python2-mistune)
5403 ("python2-pexpect" ,python2-pexpect)
5404 ("python2-pickleshare" ,python2-pickleshare)
5405 ("python2-simplegeneric" ,python2-simplegeneric)
5406 ("python2-jsonschema" ,python2-jsonschema)
5407 ("python2-traitlets" ,python2-traitlets)
5408 ("python2-nbformat" ,python2-nbformat)
5409 ("python2-pygments" ,python2-pygments)))
5411 `(("readline" ,readline)
5414 `(("graphviz" ,graphviz)
5415 ("pkg-config" ,pkg-config)
5416 ("python2-requests" ,python2-requests) ;; for tests
5417 ("python2-testpath" ,python2-testpath)
5418 ("python2-mock" ,python2-mock)
5419 ("python2-nose" ,python2-nose)))
5421 `(#:python ,python-2
5423 (modify-phases %standard-phases
5424 (add-before 'check 'delete-broken-tests
5425 (lambda* (#:key inputs #:allow-other-keys)
5426 ;; These tests throw errors for unknown reasons.
5427 (delete-file "IPython/core/tests/test_profile.py")
5428 (delete-file "IPython/core/tests/test_interactiveshell.py")
5429 (delete-file "IPython/core/tests/test_magic.py")
5431 (home-page "https://ipython.org")
5432 (synopsis "IPython is a tool for interactive computing in Python")
5434 "IPython provides a rich architecture for interactive computing with:
5435 Powerful interactive shells, a browser-based notebook, support for interactive
5436 data visualization, embeddable interpreters and tools for parallel
5438 (license license:bsd-3)))
5440 (define-public python-ipython
5442 (name "python-ipython")
5447 (uri (pypi-uri "ipython" version ".tar.gz"))
5449 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5450 (build-system python-build-system)
5452 `(("python-backcall" ,python-backcall)
5453 ("python-pyzmq" ,python-pyzmq)
5454 ("python-prompt-toolkit" ,python-prompt-toolkit)
5455 ("python-terminado" ,python-terminado)
5456 ("python-matplotlib" ,python-matplotlib)
5457 ("python-numpy" ,python-numpy)
5458 ("python-numpydoc" ,python-numpydoc)
5459 ("python-jedi" ,python-jedi)
5460 ("python-jinja2" ,python-jinja2)
5461 ("python-mistune" ,python-mistune)
5462 ("python-pexpect" ,python-pexpect)
5463 ("python-pickleshare" ,python-pickleshare)
5464 ("python-simplegeneric" ,python-simplegeneric)
5465 ("python-jsonschema" ,python-jsonschema)
5466 ("python-traitlets" ,python-traitlets)
5467 ("python-nbformat" ,python-nbformat)
5468 ("python-pygments" ,python-pygments)))
5470 `(("readline" ,readline)
5473 `(("graphviz" ,graphviz)
5474 ("pkg-config" ,pkg-config)
5475 ("python-requests" ,python-requests) ;; for tests
5476 ("python-testpath" ,python-testpath)
5477 ("python-nose" ,python-nose)))
5480 (modify-phases %standard-phases
5481 (add-after 'unpack 'make-docs-reproducible
5483 (substitute* "IPython/sphinxext/ipython_directive.py"
5484 ((".*import datetime") "")
5485 ((".*datetime.datetime.now\\(\\)") "")
5486 (("%timeit") "# %timeit"))
5488 ;; Tests can only be run after the library has been installed and not
5489 ;; within the source directory.
5491 (add-after 'install 'check
5492 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5495 ;; Make installed package available for running the tests
5496 (add-installed-pythonpath inputs outputs)
5497 (setenv "HOME" "/tmp/") ;; required by a test
5498 ;; We only test the core because one of the other tests
5499 ;; tries to import ipykernel.
5500 (invoke "python" "IPython/testing/iptest.py"
5501 "-v" "IPython/core/tests"))
5503 (add-before 'check 'fix-tests
5504 (lambda* (#:key inputs #:allow-other-keys)
5505 (substitute* "./IPython/utils/_process_posix.py"
5506 (("/usr/bin/env', 'which") (which "which")))
5507 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5508 (("#!/usr/bin/env python")
5509 (string-append "#!" (which "python"))))
5510 ;; This test introduces a circular dependency on ipykernel
5511 ;; (which depends on ipython).
5512 (delete-file "IPython/core/tests/test_display.py")
5513 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5514 (delete-file "IPython/core/tests/test_interactiveshell.py")
5516 (home-page "https://ipython.org")
5517 (synopsis "IPython is a tool for interactive computing in Python")
5519 "IPython provides a rich architecture for interactive computing with:
5520 Powerful interactive shells, a browser-based notebook, support for interactive
5521 data visualization, embeddable interpreters and tools for parallel
5523 (license license:bsd-3)))
5525 (define-public python-ipython-documentation
5527 (inherit python-ipython)
5528 (name "python-ipython-documentation")
5529 (version (package-version python-ipython))
5532 (modify-phases %standard-phases
5536 (lambda* (#:key outputs #:allow-other-keys)
5537 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5538 (doc (string-append data "/doc/" ,name "-" ,version))
5539 (html (string-append doc "/html"))
5540 (man1 (string-append data "/man/man1"))
5541 (info (string-append data "/info"))
5542 (examples (string-append doc "/examples"))
5543 (python-arg (string-append "PYTHON=" (which "python"))))
5544 (setenv "LANG" "en_US.utf8")
5545 (with-directory-excursion "docs"
5546 ;; FIXME: pdf fails to build
5547 ;;(system* "make" "pdf" "PAPER=a4")
5548 (system* "make" python-arg "html")
5549 ;; FIXME: the generated texi file contains ^@^@, which trips
5551 ;; (system* "make" python-arg "info")
5553 (copy-recursively "docs/man" man1)
5554 (copy-recursively "examples" examples)
5555 (copy-recursively "docs/build/html" html)
5556 ;; (copy-file "docs/build/latex/ipython.pdf"
5557 ;; (string-append doc "/ipython.pdf"))
5559 ;; (copy-file "docs/build/texinfo/ipython.info"
5560 ;; (string-append info "/ipython.info"))
5561 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5564 `(("python-ipython" ,python-ipython)
5565 ("python-ipykernel" ,python-ipykernel)))
5567 `(("python-sphinx" ,python-sphinx)
5568 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5569 ;; FIXME: It's possible that a smaller union would work just as well.
5570 ("texlive" ,(texlive-union (list texlive-amsfonts
5572 texlive-generic-ifxetex
5573 texlive-generic-pdftex
5574 texlive-latex-capt-of
5576 texlive-latex-environ
5577 texlive-latex-eqparbox
5578 texlive-latex-etoolbox
5579 texlive-latex-expdlist
5580 texlive-latex-fancyhdr
5581 texlive-latex-fancyvrb
5582 texlive-latex-fncychap
5584 texlive-latex-framed
5585 texlive-latex-geometry
5586 texlive-latex-graphics
5587 texlive-latex-hyperref
5588 texlive-latex-mdwtools
5589 texlive-latex-multirow
5590 texlive-latex-needspace
5591 texlive-latex-oberdiek
5592 texlive-latex-parskip
5593 texlive-latex-preview
5594 texlive-latex-tabulary
5595 texlive-latex-threeparttable
5596 texlive-latex-titlesec
5597 texlive-latex-trimspaces
5599 texlive-latex-upquote
5601 texlive-latex-varwidth
5602 texlive-latex-wrapfig)))
5603 ("texinfo" ,texinfo)))))
5605 (define-public python-urwid
5607 (name "python-urwid")
5612 (uri (pypi-uri "urwid" version))
5615 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5616 (build-system python-build-system)
5617 (home-page "http://urwid.org")
5618 (synopsis "Console user interface library for Python")
5620 "Urwid is a curses-based UI/widget library for Python. It includes many
5621 features useful for text console applications.")
5622 (license license:lgpl2.1+)))
5624 (define-public python2-urwid
5625 (package-with-python2 python-urwid))
5627 (define-public python-urwidtrees
5629 (name "python-urwidtrees")
5634 ;; package author intends on distributing via github rather than pypi:
5635 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5636 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5638 (file-name (string-append name "-" version ".tar.gz"))
5641 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5642 (build-system python-build-system)
5644 '(#:tests? #f)) ; no tests
5645 (propagated-inputs `(("python-urwid" ,python-urwid)))
5646 (home-page "https://github.com/pazz/urwidtrees")
5647 (synopsis "Tree widgets for urwid")
5648 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5649 toolkit. Use it to build trees of widgets.")
5650 (license license:gpl3+)))
5652 (define-public python2-urwidtrees
5653 (package-with-python2 python-urwidtrees))
5655 (define-public python-ua-parser
5657 (name "python-ua-parser")
5662 (uri (pypi-uri "ua-parser" version))
5665 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5666 (build-system python-build-system)
5668 `(#:tests? #f)) ;no test suite in release
5670 `(("python-pyyaml" ,python-pyyaml)))
5671 (home-page "https://github.com/ua-parser/uap-python")
5672 (synopsis "User agent parser")
5674 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5675 (license license:asl2.0)))
5677 (define-public python2-ua-parser
5678 (package-with-python2 python-ua-parser))
5680 (define-public python-user-agents
5682 (name "python-user-agents")
5687 (uri (pypi-uri "user-agents" version))
5690 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5691 (build-system python-build-system)
5693 `(#:tests? #f)) ;missing devices.json test file in release
5695 `(("python-ua-parser" ,python-ua-parser)))
5696 (home-page "https://github.com/selwin/python-user-agents")
5697 (synopsis "User Agent strings parsing library")
5699 "A library to identify devices (phones, tablets) and their capabilities by
5700 parsing (browser/HTTP) user agent strings.")
5701 (license license:expat)))
5703 (define-public python2-user-agents
5704 (package-with-python2 python-user-agents))
5706 (define-public python-dbus
5708 (name "python-dbus")
5713 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5714 "dbus-python-" version ".tar.gz"))
5716 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5717 (build-system gnu-build-system)
5719 `(("pkg-config" ,pkg-config)))
5721 `(("python" ,python-wrapper)
5722 ("dbus-glib" ,dbus-glib)))
5723 (synopsis "Python bindings for D-bus")
5724 (description "python-dbus provides bindings for libdbus, the reference
5725 implementation of D-Bus.")
5726 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5727 (license license:expat)))
5729 (define-public python2-dbus
5730 (package (inherit python-dbus)
5731 (name "python2-dbus")
5732 (inputs `(("python" ,python-2)
5733 ,@(alist-delete "python"
5734 (package-inputs python-dbus)
5737 (define-public python-notify2
5739 (name "python-notify2")
5744 (uri (pypi-uri "notify2" version))
5747 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5748 (build-system python-build-system)
5749 (arguments `(#:tests? #f)) ; tests depend on system state
5751 `(("python-dbus" ,python-dbus)))
5752 (home-page "https://bitbucket.org/takluyver/pynotify2")
5753 (synopsis "Python interface to D-Bus notifications")
5755 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5756 It is a reimplementation of pynotify in pure Python, and an alternative to
5757 the GObject Introspection bindings to libnotify for non-GTK applications.")
5758 (license (list license:bsd-2
5759 license:lgpl2.1+))))
5761 (define-public python2-notify2
5762 (package-with-python2 python-notify2))
5764 (define-public python-lxml
5766 (name "python-lxml")
5771 (uri (pypi-uri "lxml" version))
5774 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5775 (build-system python-build-system)
5777 `(#:phases (modify-phases %standard-phases
5780 (invoke "make" "test"))))))
5782 `(("libxml2" ,libxml2)
5783 ("libxslt" ,libxslt)))
5784 (home-page "http://lxml.de/")
5786 "Python XML processing library")
5788 "The lxml XML toolkit is a Pythonic binding for the C libraries
5789 libxml2 and libxslt.")
5790 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5792 (define-public python2-lxml
5793 (package-with-python2 python-lxml))
5795 ;; beautifulsoup4 has a totally different namespace than 3.x,
5796 ;; and pypi seems to put it under its own name, so I guess we should too
5797 (define-public python-beautifulsoup4
5799 (name "python-beautifulsoup4")
5804 (uri (pypi-uri "beautifulsoup4" version))
5807 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5808 (build-system python-build-system)
5811 (modify-phases %standard-phases
5812 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5813 ;; must use this conversion script when building with Python 3. The
5814 ;; conversion script also runs the tests.
5815 ;; For more information, see the file 'convert-py3k' in the source
5818 (lambda _ (invoke "./convert-py3k"))))))
5820 `(("python-soupsieve" ,python-soupsieve)))
5822 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5824 "Python screen-scraping library")
5826 "Beautiful Soup is a Python library designed for rapidly setting up
5827 screen-scraping projects. It offers Pythonic idioms for navigating,
5828 searching, and modifying a parse tree, providing a toolkit for
5829 dissecting a document and extracting what you need. It automatically
5830 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5831 (license license:expat)
5832 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5834 (define-public python2-beautifulsoup4
5836 (inherit (package-with-python2
5837 (strip-python2-variant python-beautifulsoup4)))
5838 (arguments `(#:python ,python-2))))
5840 (define-public python-soupsieve
5842 (name "python-soupsieve")
5847 (uri (pypi-uri "soupsieve" version))
5850 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5851 (build-system python-build-system)
5852 (arguments `(#:tests? #f))
5853 ;;XXX: 2 tests fail currently despite claming they were to be
5854 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5855 ;;don't want to create a circular dependency.
5856 (home-page "https://github.com/facelessuser/soupsieve")
5857 (synopsis "CSS selector library")
5859 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5860 Soup 4. It aims to provide selecting, matching, and filtering using modern
5861 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5862 specifications up through the latest CSS level 4 drafts and beyond (though
5863 some are not yet implemented).")
5864 (properties `((python2-variant . ,(delay python2-soupsieve))))
5865 (license license:expat)))
5867 (define-public python2-soupsieve
5868 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5872 `(("python2-backports-functools-lru-cache"
5873 ,python2-backports-functools-lru-cache)
5874 ,@(package-propagated-inputs base))))))
5876 (define-public python-netifaces
5878 (name "python-netifaces")
5883 (uri (pypi-uri "netifaces" version))
5886 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5887 (build-system python-build-system)
5888 (home-page "https://github.com/al45tair/netifaces")
5890 "Python module for portable network interface information")
5892 "Netifaces is a Python module providing information on network
5893 interfaces in an easy and portable manner.")
5894 (license license:expat)))
5896 (define-public python2-netifaces
5897 (package-with-python2 python-netifaces))
5899 (define-public python-networkx
5901 (name "python-networkx")
5906 (uri (pypi-uri "networkx" version ".zip"))
5908 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5909 (build-system python-build-system)
5910 ;; python-decorator is needed at runtime.
5912 `(("python-decorator" ,python-decorator)))
5914 `(("python-nose" ,python-nose)
5916 (home-page "https://networkx.github.io/")
5917 (synopsis "Python module for creating and manipulating graphs and networks")
5919 "NetworkX is a Python package for the creation, manipulation, and study
5920 of the structure, dynamics, and functions of complex networks.")
5921 (license license:bsd-3)))
5923 (define-public python2-networkx
5924 (package-with-python2 python-networkx))
5926 (define-public python-datrie
5928 (name "python-datrie")
5933 (uri (pypi-uri "datrie" version))
5936 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5937 (build-system python-build-system)
5939 `(("python-cython" ,python-cython)
5940 ("python-hypothesis" ,python-hypothesis)
5941 ("python-pytest" ,python-pytest)
5942 ("python-pytest-runner" ,python-pytest-runner)))
5943 (home-page "https://github.com/kmike/datrie")
5944 (synopsis "Fast, efficiently stored trie for Python")
5946 "This package provides a fast, efficiently stored trie implementation for
5948 (license license:lgpl2.1+)))
5950 (define-public snakemake
5957 (uri (pypi-uri "snakemake" version))
5959 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5960 (build-system python-build-system)
5962 ;; TODO: Package missing test dependencies.
5965 (modify-phases %standard-phases
5966 ;; For cluster execution Snakemake will call Python. Since there is
5967 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5968 ;; this by calling the snakemake wrapper instead.
5969 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5970 (lambda* (#:key outputs #:allow-other-keys)
5971 (substitute* "snakemake/executors.py"
5972 (("\\{sys.executable\\} -m snakemake")
5973 (string-append (assoc-ref outputs "out")
5977 `(("python-appdirs" ,python-appdirs)
5978 ("python-configargparse" ,python-configargparse)
5979 ("python-datrie" ,python-datrie)
5980 ("python-docutils" ,python-docutils)
5981 ("python-gitpython" ,python-gitpython)
5982 ("python-jinja2" ,python-jinja2)
5983 ("python-jsonschema" ,python-jsonschema)
5984 ("python-networkx" ,python-networkx)
5985 ("python-psutil" ,python-psutil)
5986 ("python-pyyaml" ,python-pyyaml)
5987 ("python-ratelimiter" ,python-ratelimiter)
5988 ("python-requests" ,python-requests)
5989 ("python-wrapt" ,python-wrapt)))
5990 (home-page "https://snakemake.readthedocs.io")
5991 (synopsis "Python-based execution environment for make-like workflows")
5993 "Snakemake aims to reduce the complexity of creating workflows by
5994 providing a clean and modern domain specific specification language (DSL) in
5995 Python style, together with a fast and comfortable execution environment.")
5996 (license license:expat)))
5998 (define-public python-pyqrcode
6000 (name "python-pyqrcode")
6005 (uri (pypi-uri "PyQRCode" version))
6008 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6009 (build-system python-build-system)
6011 "https://github.com/mnooner256/pyqrcode")
6012 (synopsis "QR code generator")
6014 "Pyqrcode is a QR code generator written purely in Python with
6015 SVG, EPS, PNG and terminal output.")
6016 (license license:bsd-3)))
6018 (define-public python-seaborn
6020 (name "python-seaborn")
6025 (uri (pypi-uri "seaborn" version))
6027 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6031 ;; This has already been merged, but there is no new
6032 ;; release including this patch. It fixes problems
6033 ;; with axis rotation that would lead to test
6035 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6038 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6039 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6040 (build-system python-build-system)
6043 (modify-phases %standard-phases
6044 (add-before 'check 'start-xserver
6045 (lambda* (#:key inputs #:allow-other-keys)
6046 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6047 ;; There must be a running X server and make check doesn't
6048 ;; start one. Therefore we must do it.
6049 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6050 (setenv "DISPLAY" ":1")
6052 (add-after 'unpack 'fix-tests
6054 ;; test_cbar_ticks fails probably because of matplotlib's
6055 ;; expectation of using an older version of FreeType.
6056 (delete-file "seaborn/tests/test_matrix.py")
6058 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6060 `(("python-pandas" ,python-pandas)
6061 ("python-matplotlib" ,python-matplotlib)
6062 ("python-numpy" ,python-numpy)
6063 ("python-scipy" ,python-scipy)))
6065 `(("python-pytest" ,python-pytest)
6066 ("xorg-server" ,xorg-server-for-tests)))
6067 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6068 (synopsis "Statistical data visualization")
6070 "Seaborn is a library for making attractive and informative statistical
6071 graphics in Python. It is built on top of matplotlib and tightly integrated
6072 with the PyData stack, including support for numpy and pandas data structures
6073 and statistical routines from scipy and statsmodels.")
6074 (license license:bsd-3)))
6076 (define-public python2-seaborn
6077 (package-with-python2 python-seaborn))
6079 (define-public python-mpmath
6081 (name "python-mpmath")
6085 (uri (string-append "http://mpmath.org/files/mpmath-"
6089 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6090 (build-system python-build-system)
6093 (modify-phases %standard-phases
6096 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6097 (home-page "http://mpmath.org")
6098 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6100 "@code{mpmath} can be used as an arbitrary-precision substitute for
6101 Python's float/complex types and math/cmath modules, but also does much
6102 more advanced mathematics.")
6103 (license license:bsd-3)))
6105 (define-public python2-mpmath
6106 (package-with-python2 python-mpmath))
6108 (define-public python-bigfloat
6110 (name "python-bigfloat")
6115 (uri (pypi-uri "bigfloat" version))
6117 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6118 (build-system python-build-system)
6121 (home-page "https://github.com/mdickinson/bigfloat")
6122 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6124 "This package provides a Python interface to the MPFR library for
6125 multiprecision arithmetic.")
6126 (license license:lgpl3+)))
6128 (define-public python2-bigfloat
6129 (package-with-python2 python-bigfloat))
6131 (define-public python-sympy
6133 (name "python-sympy")
6139 "https://github.com/sympy/sympy/releases/download/sympy-"
6140 version "/sympy-" version ".tar.gz"))
6142 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6143 (build-system python-build-system)
6146 (modify-phases %standard-phases
6147 ;; Run the core tests after installation. By default it would run
6148 ;; *all* tests, which take a very long time to complete and are known
6151 (add-after 'install 'check
6152 (lambda* (#:key outputs #:allow-other-keys)
6153 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6156 `(("python-mpmath" ,python-mpmath)))
6157 (home-page "http://www.sympy.org/")
6158 (synopsis "Python library for symbolic mathematics")
6160 "SymPy is a Python library for symbolic mathematics. It aims to become a
6161 full-featured computer algebra system (CAS) while keeping the code as simple
6162 as possible in order to be comprehensible and easily extensible.")
6163 (license license:bsd-3)))
6165 (define-public python2-sympy
6167 (inherit (package-with-python2 python-sympy))
6170 (modify-phases %standard-phases
6171 ;; Run the core tests after installation. By default it would run
6172 ;; *all* tests, which take a very long time to complete and are known
6175 (add-after 'install 'check
6176 (lambda* (#:key outputs #:allow-other-keys)
6177 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6180 (define-public python-q
6187 (uri (pypi-uri "q" version))
6190 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6191 (build-system python-build-system)
6192 (home-page "https://github.com/zestyping/q")
6193 (synopsis "Quick-and-dirty debugging output for tired programmers")
6195 "q is a Python module for \"print\" style of debugging Python code. It
6196 provides convenient short API for print out of values, tracebacks, and
6197 falling into the Python interpreter.")
6198 (license license:asl2.0)))
6200 (define-public python2-q
6201 (package-with-python2 python-q))
6203 (define-public python2-xlib
6205 (name "python2-xlib")
6209 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6211 "python-xlib-" version ".tar.gz"))
6214 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6215 (build-system python-build-system)
6217 `(#:python ,python-2 ;Python 2 only
6218 #:tests? #f)) ;no tests
6219 (home-page "http://python-xlib.sourceforge.net/")
6220 (synopsis "Python X11 client library")
6222 "The Python X Library is intended to be a fully functional X client
6223 library for Python programs. It is useful to implement low-level X clients.
6224 It is written entirely in Python.")
6225 (license license:gpl2+)))
6227 (define-public python-singledispatch
6229 (name "python-singledispatch")
6234 (uri (pypi-uri "singledispatch" version))
6237 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6238 (build-system python-build-system)
6240 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6242 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6243 (synopsis "Backport of singledispatch feature from Python 3.4")
6245 "This library brings functools.singledispatch from Python 3.4 to Python
6247 (license license:expat)))
6249 (define-public python2-singledispatch
6250 (package-with-python2 python-singledispatch))
6252 ;; the python- version can be removed with python-3.5
6253 (define-public python-backports-abc
6255 (name "python-backports-abc")
6260 (uri (pypi-uri "backports_abc" version))
6263 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6264 (build-system python-build-system)
6265 (home-page "https://github.com/cython/backports_abc")
6266 (synopsis "Backport of additions to the 'collections.abc' module")
6268 "Python-backports-abc provides a backport of additions to the
6269 @code{collections.abc} module in Python-3.5.")
6270 (license license:psfl)))
6272 (define-public python2-backports-abc
6273 (package-with-python2 python-backports-abc))
6275 (define-public python-backports-csv
6277 (name "python-backports-csv")
6282 (uri (pypi-uri "backports.csv" version))
6285 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6286 (build-system python-build-system)
6287 (home-page "https://github.com/ryanhiebert/backports.csv")
6288 (synopsis "Backport of Python 3's csv module for Python 2")
6290 "Provides a backport of Python 3's @code{csv} module for parsing
6291 comma separated values. The API of the @code{csv} module in Python 2
6292 is drastically different from the @code{csv} module in Python 3.
6293 This is due, for the most part, to the difference between str in
6294 Python 2 and Python 3.")
6295 (license license:psfl)))
6297 (define-public python2-backports-csv
6298 (package-with-python2 python-backports-csv))
6300 (define-public python2-backports-shutil-get-terminal-size
6302 (name "python2-backports-shutil-get-terminal-size")
6307 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6310 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6311 (build-system python-build-system)
6313 `(#:python ,python-2
6315 (modify-phases %standard-phases
6318 (invoke "py.test" "-v"))))))
6320 `(("python2-pytest" ,python2-pytest)))
6321 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6322 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6324 "This package provides a backport of the @code{get_terminal_size
6325 function} from Python 3.3's @code{shutil}.
6326 Unlike the original version it is written in pure Python rather than C,
6327 so it might be a tiny bit slower.")
6328 (license license:expat)))
6330 (define-public python-waf
6336 (uri (string-append "https://waf.io/"
6337 "waf-" version ".tar.bz2"))
6340 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6341 (build-system python-build-system)
6344 (modify-phases %standard-phases
6347 (invoke "python" "waf-light" "configure" "build")))
6350 (invoke "python" "waf" "--version")))
6352 (lambda* (#:key outputs #:allow-other-keys)
6353 (let ((out (assoc-ref outputs "out")))
6354 (install-file "waf" (string-append out "/bin")))
6356 ;; waf breaks when it is wrapped.
6358 (home-page "https://waf.io/")
6359 (synopsis "Python-based build system")
6361 "Waf is a Python-based framework for configuring, compiling and installing
6363 (license license:bsd-3)))
6365 (define-public python2-waf
6366 (package-with-python2 python-waf))
6368 (define-public python-pyzmq
6370 (name "python-pyzmq")
6375 (uri (pypi-uri "pyzmq" version))
6377 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6378 (build-system python-build-system)
6381 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6382 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6383 ;; --inplace' for 'python setup.py test' to work.
6386 `(("zeromq" ,zeromq)))
6388 `(("pkg-config" ,pkg-config)
6389 ("python-nose" ,python-nose)))
6390 (home-page "https://github.com/zeromq/pyzmq")
6391 (synopsis "Python bindings for 0MQ")
6393 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6394 (license license:bsd-4)))
6396 (define-public python2-pyzmq
6397 (package-with-python2 python-pyzmq))
6399 (define-public python-pep8
6400 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6401 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6402 ;; some dependents' test suites, and nothing more.
6404 (name "python-pep8")
6409 (uri (pypi-uri "pep8" version))
6412 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6413 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6414 (build-system python-build-system)
6415 (home-page "https://pep8.readthedocs.org/")
6416 (synopsis "Python style guide checker")
6418 "This tools checks Python code against some of the style conventions in
6420 (license license:expat)))
6422 (define-public python2-pep8
6423 (package-with-python2 python-pep8))
6425 (define-public python-pyflakes
6427 (name "python-pyflakes")
6432 (uri (pypi-uri "pyflakes" version))
6435 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6436 (build-system python-build-system)
6438 "https://github.com/pyflakes/pyflakes")
6439 (synopsis "Passive checker of Python programs")
6441 "Pyflakes statically checks Python source code for common errors.")
6442 (license license:expat)))
6444 (define-public python2-pyflakes
6445 (package-with-python2 python-pyflakes))
6447 (define-public python-mccabe
6449 (name "python-mccabe")
6454 (uri (pypi-uri "mccabe" version))
6457 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6458 (build-system python-build-system)
6460 `(("python-pytest" ,python-pytest-bootstrap)
6461 ("python-pytest-runner" ,python-pytest-runner)))
6462 (home-page "https://github.com/flintwork/mccabe")
6463 (synopsis "McCabe checker, plugin for flake8")
6465 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6466 complexity of Python source code.")
6467 (license license:expat)))
6469 (define-public python2-mccabe
6470 (package-with-python2 python-mccabe))
6472 (define-public python-mccabe-0.2.1
6473 (package (inherit python-mccabe)
6478 (uri (pypi-uri "mccabe" version))
6481 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6483 (define-public python2-mccabe-0.2.1
6484 (package-with-python2 python-mccabe-0.2.1))
6486 ;; Flake8 2.4.1 requires an older version of pep8.
6487 ;; This should be removed ASAP.
6488 (define-public python-pep8-1.5.7
6489 (package (inherit python-pep8)
6494 (uri (pypi-uri "pep8" version))
6497 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6499 ;; XXX Tests not compatible with Python 3.5.
6502 (define-public python2-pep8-1.5.7
6503 (package-with-python2 python-pep8-1.5.7))
6505 ;; Flake8 2.4.1 requires an older version of pyflakes.
6506 ;; This should be removed ASAP.
6507 (define-public python-pyflakes-0.8.1
6508 (package (inherit python-pyflakes)
6513 (uri (pypi-uri "pyflakes" version))
6516 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6518 ;; XXX Tests not compatible with Python 3.5.
6521 (define-public python2-pyflakes-0.8.1
6522 (package-with-python2 python-pyflakes-0.8.1))
6524 (define-public python-flake8
6526 (name "python-flake8")
6530 (uri (pypi-uri "flake8" version))
6533 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6534 (build-system python-build-system)
6537 (modify-phases %standard-phases
6539 (add-after 'install 'check
6540 (lambda* (#:key inputs outputs #:allow-other-keys)
6541 (add-installed-pythonpath inputs outputs)
6542 (invoke "pytest" "-v")
6545 `(("python-pycodestyle" ,python-pycodestyle)
6546 ("python-entrypoints" ,python-entrypoints)
6547 ("python-pyflakes" ,python-pyflakes)
6548 ("python-mccabe" ,python-mccabe)))
6550 `(("python-mock" ,python-mock)
6551 ("python-pytest" ,python-pytest-bootstrap)
6552 ("python-pytest-runner" ,python-pytest-runner)))
6553 (home-page "https://gitlab.com/pycqa/flake8")
6555 "The modular source code checker: pep8, pyflakes and co")
6557 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6558 (properties `((python2-variant . ,(delay python2-flake8))))
6559 (license license:expat)))
6561 (define-public python2-flake8
6562 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6563 (package (inherit base)
6565 `(("python2-configparser" ,python2-configparser)
6566 ("python2-enum34" ,python2-enum34)
6567 ("python2-typing" ,python2-typing)
6568 ,@(package-propagated-inputs base))))))
6570 ;; python-hacking requires flake8 <2.6.0.
6571 (define-public python-flake8-2.5
6573 (inherit python-flake8)
6577 (uri (pypi-uri "flake8" version))
6580 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6582 `(("python-pep8" ,python-pep8)
6583 ,@(package-propagated-inputs python-flake8)))
6584 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6586 (define-public python2-flake8-2.5
6588 (inherit python2-flake8)
6589 (version (package-version python-flake8-2.5))
6591 (inherit (package-source python-flake8-2.5))))
6593 `(("python2-pep8" ,python2-pep8)
6594 ,@(package-propagated-inputs python2-flake8)))))
6596 (define-public python-flake8-polyfill
6598 (name "python-flake8-polyfill")
6603 (uri (pypi-uri "flake8-polyfill" version))
6606 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6607 (build-system python-build-system)
6610 (modify-phases %standard-phases
6613 ;; Be compatible with Pytest 4:
6614 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6615 (substitute* "setup.cfg"
6619 (setenv "PYTHONPATH"
6620 (string-append (getcwd) "/build/lib:"
6621 (getenv "PYTHONPATH")))
6622 (invoke "py.test" "-v"))))))
6624 `(("python-flake8" ,python-flake8)
6625 ("python-mock" ,python-mock)
6626 ("python-pep8" ,python-pep8)
6627 ("python-pycodestyle" ,python-pycodestyle)
6628 ("python-pytest" ,python-pytest)))
6629 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6630 (synopsis "Polyfill package for Flake8 plugins")
6632 "This package that provides some compatibility helpers for Flake8
6633 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6634 (license license:expat)))
6636 (define-public python2-flake8-polyfill
6637 (package-with-python2 python-flake8-polyfill))
6639 (define-public python-mistune
6641 (name "python-mistune")
6646 (uri (pypi-uri "mistune" version))
6649 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6650 (build-system python-build-system)
6652 `(("python-nose" ,python-nose)
6653 ("python-cython" ,python-cython)))
6654 (home-page "https://github.com/lepture/mistune")
6655 (synopsis "Markdown parser in pure Python")
6656 (description "This package provides a fast markdown parser in pure
6658 (license license:bsd-3)))
6660 (define-public python2-mistune
6661 (package-with-python2 python-mistune))
6663 (define-public python-markdown
6665 (name "python-markdown")
6670 (uri (pypi-uri "Markdown" version))
6673 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6674 (build-system python-build-system)
6676 `(("python-nose" ,python-nose)
6677 ("python-pyyaml" ,python-pyyaml)))
6678 (home-page "https://python-markdown.github.io/")
6679 (synopsis "Python implementation of Markdown")
6681 "This package provides a Python implementation of John Gruber's
6682 Markdown. The library features international input, various Markdown
6683 extensions, and several HTML output formats. A command line wrapper
6684 markdown_py is also provided to convert Markdown files to HTML.")
6685 (license license:bsd-3)))
6687 (define-public python2-markdown
6688 (package-with-python2 python-markdown))
6690 (define-public python-ptyprocess
6692 (name "python-ptyprocess")
6697 (uri (pypi-uri "ptyprocess" version))
6700 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6701 (build-system python-build-system)
6703 `(("python-nose" ,python-nose)))
6706 (modify-phases %standard-phases
6708 (lambda _ (invoke "nosetests"))))))
6709 (home-page "https://github.com/pexpect/ptyprocess")
6710 (synopsis "Run a subprocess in a pseudo terminal")
6712 "This package provides a Python library used to launch a subprocess in a
6713 pseudo terminal (pty), and interact with both the process and its pty.")
6714 (license license:isc)))
6716 (define-public python2-ptyprocess
6717 (package-with-python2 python-ptyprocess))
6719 (define-public python-cram
6721 (name "python-cram")
6723 (home-page "https://bitheap.org/cram/")
6726 (uri (list (string-append home-page "cram-"
6728 (pypi-uri "cram" version)))
6731 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6734 (modify-phases %standard-phases
6735 (add-after 'unpack 'patch-source
6737 (substitute* (find-files "cram" ".*\\.py$")
6738 ;; Replace default shell path.
6739 (("/bin/sh") (which "sh")))
6740 (substitute* (find-files "tests" ".*\\.t$")
6742 (("/bin/bash") (which "bash"))
6743 (("/bin/sh") (which "sh")))
6744 (substitute* "cram/_test.py"
6745 ;; This hack works around a bug triggered by substituting
6746 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6747 ;; "cram -h", which breaks the output at 80 characters. This
6748 ;; causes the line showing the default shell to break into two
6749 ;; lines, but the test expects a single line...
6750 (("env\\['COLUMNS'\\] = '80'")
6751 "env['COLUMNS'] = '160'"))
6753 (substitute* "Makefile"
6754 ;; Recent versions of python-coverage have caused the test
6755 ;; coverage to decrease (as of version 0.7). Allow that.
6756 (("--fail-under=100")
6761 ;; The test phase uses the built library and executable.
6762 (lambda* (#:key inputs outputs #:allow-other-keys)
6763 (add-installed-pythonpath inputs outputs)
6764 (setenv "PATH" (string-append (getenv "PATH") ":"
6765 (assoc-ref outputs "out") "/bin"))
6766 (invoke "make" "test"))))))
6767 (build-system python-build-system)
6769 `(("python-coverage" ,python-coverage)
6771 (synopsis "Simple testing framework for command line applications")
6773 "Cram is a functional testing framework for command line applications.
6774 Cram tests look like snippets of interactive shell sessions. Cram runs each
6775 command and compares the command output in the test with the command’s actual
6777 (license license:gpl2+)))
6779 (define-public python2-cram
6780 (package-with-python2 python-cram))
6782 (define-public python-straight-plugin
6784 (name "python-straight-plugin")
6789 (uri (pypi-uri "straight.plugin" version))
6792 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6793 (build-system python-build-system)
6794 (home-page "https://github.com/ironfroggy/straight.plugin")
6795 (synopsis "Simple namespaced plugin facility")
6796 (description "Straight Plugin provides a type of plugin you can create from
6797 almost any existing Python modules, and an easy way for outside developers to
6798 add functionality and customization to your projects with their own plugins.")
6799 (license license:expat)))
6801 (define-public python2-straight-plugin
6802 (package-with-python2 python-straight-plugin))
6804 (define-public python-fonttools
6806 (name "python-fonttools")
6810 (uri (pypi-uri "fonttools" version ".zip"))
6813 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6814 (build-system python-build-system)
6817 ("python-pytest" ,python-pytest)
6818 ("python-pytest-runner" ,python-pytest-runner)))
6819 (home-page "https://github.com/behdad/fonttools")
6820 (synopsis "Tools to manipulate font files")
6822 "FontTools/TTX is a library to manipulate font files from Python. It
6823 supports reading and writing of TrueType/OpenType fonts, reading and writing
6824 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6825 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6826 from an XML-based format.")
6827 (license license:expat)))
6829 (define-public python2-fonttools
6830 (package-with-python2 python-fonttools))
6832 (define-public python-ly
6839 (uri (pypi-uri name version))
6842 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6843 (build-system python-build-system)
6845 ;; FIXME: Some tests need network access.
6847 (synopsis "Tool and library for manipulating LilyPond files")
6848 (description "This package provides a Python library to parse, manipulate
6849 or create documents in LilyPond format. A command line program ly is also
6850 provided that can be used to do various manipulations with LilyPond files.")
6851 (home-page "https://pypi.python.org/pypi/python-ly")
6852 (license license:gpl2+)))
6854 (define-public python-appdirs
6856 (name "python-appdirs")
6861 (uri (pypi-uri "appdirs" version))
6864 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6865 (build-system python-build-system)
6866 (home-page "https://github.com/ActiveState/appdirs")
6868 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6870 "This module provides a portable way of finding out where user data
6871 should be stored on various operating systems.")
6872 (license license:expat)))
6874 (define-public python2-appdirs
6875 (package-with-python2 python-appdirs))
6877 (define-public python-llfuse
6879 (name "python-llfuse")
6883 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6886 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6887 (build-system python-build-system)
6892 `(("pkg-config" ,pkg-config)))
6893 (synopsis "Python bindings for FUSE")
6895 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6896 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6897 (license license:lgpl2.0+)
6898 (properties `((python2-variant . ,(delay python2-llfuse))))))
6900 (define-public python2-llfuse
6901 (package (inherit (package-with-python2
6902 (strip-python2-variant python-llfuse)))
6903 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6906 (define-public python-llfuse-0.41
6907 (package (inherit python-llfuse)
6912 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6913 "llfuse-" version ".tar.bz2"))
6916 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6917 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6918 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6919 (license (list license:expat license:lgpl2.0+))))
6921 (define-public python-msgpack
6923 (name "python-msgpack")
6927 (uri (pypi-uri "msgpack" version))
6930 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6931 (build-system python-build-system)
6933 `(#:modules ((guix build utils)
6934 (guix build python-build-system)
6939 (modify-phases %standard-phases
6942 (let ((cwd (getcwd)))
6943 (setenv "PYTHONPATH"
6944 (string-append cwd "/build/"
6945 (find (cut string-prefix? "lib" <>)
6946 (scandir (string-append cwd "/build")))
6948 (getenv "PYTHONPATH")))
6949 (invoke "pytest" "-v" "test")))))))
6951 `(("python-pytest" ,python-pytest)))
6952 (synopsis "MessagePack (de)serializer")
6953 (description "MessagePack is a fast, compact binary serialization format,
6954 suitable for similar data to JSON. This package provides CPython bindings for
6955 reading and writing MessagePack data.")
6956 (home-page "https://pypi.python.org/pypi/msgpack/")
6957 (license license:asl2.0)))
6959 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6960 ;; release 0.5. Some packages like borg still call it by the old name for now.
6961 ;; <https://bugs.gnu.org/30662>
6962 (define-public python-msgpack-transitional
6964 (inherit python-msgpack)
6965 (name "python-msgpack-transitional")
6967 (substitute-keyword-arguments (package-arguments python-msgpack)
6969 `(modify-phases ,phases
6970 (add-after 'unpack 'configure-transitional
6972 ;; Keep using the old name.
6973 (substitute* "setup.py"
6974 (("TRANSITIONAL = False")
6975 "TRANSITIONAL = 1"))
6978 (define-public python2-msgpack
6979 (package-with-python2 python-msgpack))
6981 (define-public python-netaddr
6983 (name "python-netaddr")
6988 (uri (pypi-uri "netaddr" version))
6991 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6992 (build-system python-build-system)
6993 (arguments `(#:tests? #f)) ;; No tests.
6994 (home-page "https://github.com/drkjam/netaddr/")
6995 (synopsis "Pythonic manipulation of network addresses")
6997 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6998 and MAC network addresses.")
6999 (license license:bsd-3)))
7001 (define-public python2-netaddr
7002 (package-with-python2 python-netaddr))
7004 (define-public python2-pyroute2
7006 (name "python2-pyroute2")
7011 (uri (pypi-uri "pyroute2" version))
7014 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7015 (build-system python-build-system)
7017 `(#:python ,python-2)) ;Python 3.x is not supported
7018 (home-page "https://github.com/svinota/pyroute2")
7019 (synopsis "Python netlink library")
7021 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7022 Supported netlink families and protocols include:
7024 @item rtnl, network settings - addresses, routes, traffic controls
7025 @item nfnetlink - netfilter API: ipset, nftables, ...
7026 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7027 @item devlink - manage and monitor devlink-enabled hardware
7028 @item generic - generic netlink families
7030 @item nl80211 - wireless functions API (basic support)
7031 @item taskstats - extended process statistics
7032 @item acpi_events - ACPI events monitoring
7033 @item thermal_events - thermal events monitoring
7034 @item VFS_DQUOT - disk quota events monitoring
7037 (license license:gpl2+)))
7039 (define-public python-wrapt
7041 (name "python-wrapt")
7046 (uri (pypi-uri "wrapt" version))
7049 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7050 (build-system python-build-system)
7052 ;; Tests are not included in the tarball, they are only available in the
7055 (home-page "https://github.com/GrahamDumpleton/wrapt")
7056 (synopsis "Module for decorators, wrappers and monkey patching")
7058 "The aim of the wrapt module is to provide a transparent object proxy for
7059 Python, which can be used as the basis for the construction of function
7060 wrappers and decorator functions.")
7061 (license license:bsd-2)))
7063 (define-public python2-wrapt
7064 (package-with-python2 python-wrapt))
7066 (define-public python-xlrd
7068 (name "python-xlrd")
7072 (uri (pypi-uri "xlrd" version))
7075 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7076 (build-system python-build-system)
7079 (modify-phases %standard-phases
7080 ;; Some tests depend on writing a temporary file to the user's home
7082 (add-after 'unpack 'fix-tests
7084 (delete-file "tests/test_open_workbook.py")
7086 (home-page "http://www.python-excel.org/")
7087 (synopsis "Library for extracting data from Excel files")
7088 (description "This package provides a library to extract data from
7089 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7090 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7091 Unicode-aware. It is not intended as an end-user tool.")
7092 (license license:bsd-3)))
7094 (define-public python2-xlrd
7095 (package-with-python2 python-xlrd))
7097 (define-public python-prettytable
7099 (name "python-prettytable")
7104 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7107 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7108 (build-system python-build-system)
7109 (home-page "http://code.google.com/p/prettytable/")
7110 (synopsis "Display tabular data in an ASCII table format")
7112 "A library designed to represent tabular data in visually appealing ASCII
7113 tables. PrettyTable allows for selection of which columns are to be printed,
7114 independent alignment of columns (left or right justified or centred) and
7115 printing of sub-tables by specifying a row range.")
7116 (license license:bsd-3)))
7118 (define-public python2-prettytable
7119 (package-with-python2 python-prettytable))
7121 (define-public python-tables
7123 (name "python-tables")
7128 (uri (pypi-uri "tables" version))
7131 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7132 (modules '((guix build utils)))
7135 ;; Remove pre-compiled .pyc files from source.
7136 (for-each delete-file-recursively
7137 (find-files "." "__pycache__" #:directories? #t))
7138 (for-each delete-file (find-files "." "\\.pyc$"))
7140 (build-system python-build-system)
7142 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7143 ;; or "check", so we must override the build and check phases.
7145 (modify-phases %standard-phases
7146 (add-after 'unpack 'use-gcc
7148 (substitute* "setup.py"
7149 (("compiler = new_compiler\\(\\)" line)
7151 "\ncompiler.set_executables(compiler='gcc',"
7152 "compiler_so='gcc',"
7154 "linker_so='gcc -shared')")))
7157 (lambda* (#:key inputs #:allow-other-keys)
7158 (invoke "python" "setup.py" "build"
7159 (string-append "--hdf5="
7160 (assoc-ref inputs "hdf5")))))
7162 (lambda* (#:key inputs #:allow-other-keys)
7163 (invoke "python" "setup.py" "check"
7164 (string-append "--hdf5="
7165 (assoc-ref inputs "hdf5"))))))))
7167 `(("python-numexpr" ,python-numexpr)
7168 ("python-numpy" ,python-numpy)))
7170 `(("python-cython" ,python-cython)
7171 ("pkg-config" ,pkg-config)))
7176 (home-page "http://www.pytables.org/")
7177 (synopsis "Hierarchical datasets for Python")
7178 (description "PyTables is a package for managing hierarchical datasets and
7179 designed to efficiently cope with extremely large amounts of data.")
7180 (license license:bsd-3)))
7182 (define-public python2-tables
7183 (package-with-python2 python-tables))
7185 (define-public python-pyasn1
7187 (name "python-pyasn1")
7192 (uri (pypi-uri "pyasn1" version))
7195 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7196 (build-system python-build-system)
7197 (home-page "http://pyasn1.sourceforge.net/")
7198 (synopsis "ASN.1 types and codecs")
7200 "This is an implementation of ASN.1 types and codecs in Python. It is
7201 suitable for a wide range of protocols based on the ASN.1 specification.")
7202 (license license:bsd-2)))
7204 (define-public python2-pyasn1
7205 (package-with-python2 python-pyasn1))
7207 (define-public python-pyasn1-modules
7209 (name "python-pyasn1-modules")
7214 (uri (pypi-uri "pyasn1-modules" version))
7217 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7218 (build-system python-build-system)
7220 `(("python-pyasn1" ,python-pyasn1)))
7221 (home-page "https://sourceforge.net/projects/pyasn1/")
7222 (synopsis "ASN.1 codec implementations")
7224 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7225 implementations of ASN.1-based codecs and protocols.")
7226 (license license:bsd-3)))
7228 (define-public python2-pyasn1-modules
7229 (package-with-python2 python-pyasn1-modules))
7231 (define-public python-ipaddress
7233 (name "python-ipaddress")
7237 (uri (pypi-uri "ipaddress" version))
7240 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7241 (build-system python-build-system)
7242 (home-page "https://github.com/phihag/ipaddress")
7243 (synopsis "IP address manipulation library")
7245 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7246 in Python. This library is used to create, poke at, and manipulate IPv4 and
7247 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7248 module to older versions of Python.")
7249 (license license:psfl)))
7251 (define-public python2-ipaddress
7252 (package-with-python2 python-ipaddress))
7254 (define-public python2-ipaddr
7256 (name "python2-ipaddr")
7261 (uri (pypi-uri "ipaddr" version))
7263 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7264 (build-system python-build-system)
7266 `(#:python ,python-2 ;version 2 only
7268 (modify-phases %standard-phases
7270 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7271 (home-page "https://github.com/google/ipaddr-py")
7272 (synopsis "IP address manipulation library")
7274 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7275 IPv6 addresses and networks.
7277 For new implementations you may prefer to use the standard module
7278 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7279 versions of Python.")
7280 (license license:asl2.0)))
7282 (define-public python-idna
7284 (name "python-idna")
7289 (uri (pypi-uri "idna" version))
7292 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7293 (build-system python-build-system)
7294 (home-page "https://github.com/kjd/idna")
7295 (synopsis "Internationalized domain names in applications")
7297 "This is a library to support the Internationalised Domain Names in
7298 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7299 protocol is often referred to as “IDNA2008” and can produce different results
7300 from the earlier standard from 2003. The library is also intended to act as a
7301 suitable drop-in replacement for the “encodings.idna” module that comes with
7302 the Python standard library but currently only supports the older 2003
7304 (license license:bsd-4)))
7306 (define-public python-idna-2.7
7307 (package (inherit python-idna)
7311 (uri (pypi-uri "idna" version))
7314 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7317 (define-public python2-idna
7318 (package-with-python2 python-idna))
7320 (define-public python-idna-ssl
7322 (name "python-idna-ssl")
7327 (uri (pypi-uri "idna-ssl" version))
7330 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7331 (build-system python-build-system)
7333 `(#:tests? #f)) ;circular dependency with python-aiohttp
7334 (home-page "https://github.com/aio-libs/idna-ssl")
7335 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7336 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7338 (license license:expat)))
7340 (define-public python-pretend
7342 (name "python-pretend")
7347 (uri (pypi-uri "pretend" version))
7350 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7351 (build-system python-build-system)
7352 (home-page "https://github.com/alex/pretend")
7353 (synopsis "Library for stubbing in Python")
7355 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7356 technique for writing tests. You may hear the term mixed up with mocks,
7357 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7358 responses, rather than doing any computation.")
7359 (license license:bsd-3)))
7361 (define-public python2-pretend
7362 (package-with-python2 python-pretend))
7364 (define-public python-pip
7371 (uri (pypi-uri "pip" version))
7374 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7375 (build-system python-build-system)
7377 '(#:tests? #f)) ; there are no tests in the pypi archive.
7378 (home-page "https://pip.pypa.io/")
7379 (synopsis "Package manager for Python software")
7381 "Pip is a package manager for Python software, that finds packages on the
7382 Python Package Index (PyPI).")
7383 (license license:expat)))
7385 (define-public python2-pip
7386 (package-with-python2 python-pip))
7388 (define-public python-tlsh
7390 (name "python-tlsh")
7392 (home-page "https://github.com/trendmicro/tlsh")
7397 (url "https://github.com/trendmicro/tlsh.git")
7398 (commit (string-append "v" version))))
7399 (file-name (git-file-name name version))
7401 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7402 (build-system cmake-build-system)
7404 '(#:out-of-source? #f
7405 #:phases (modify-phases %standard-phases
7408 (lambda* (#:key outputs #:allow-other-keys)
7409 ;; Build and install the Python bindings. The underlying
7410 ;; C++ library is apparently not meant to be installed.
7411 (let ((out (assoc-ref outputs "out")))
7412 (with-directory-excursion "py_ext"
7413 (and (system* "python" "setup.py" "build")
7414 (system* "python" "setup.py" "install"
7415 (string-append "--prefix=" out))))))))))
7416 (inputs `(("python" ,python-wrapper))) ;for the bindings
7417 (synopsis "Fuzzy matching library for Python")
7419 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7420 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7421 value which can be used for similarity comparisons. Similar objects have
7422 similar hash values, which allows for the detection of similar objects by
7423 comparing their hash values. The byte stream should have a sufficient amount
7424 of complexity; for example, a byte stream of identical bytes will not generate
7426 (license license:asl2.0)))
7428 (define-public python2-tlsh
7430 (inherit python-tlsh)
7431 (name "python2-tlsh")
7432 (inputs `(("python" ,python-2)))))
7434 (define-public python-termcolor
7436 (name "python-termcolor")
7441 (uri (pypi-uri "termcolor" version))
7444 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7445 (build-system python-build-system)
7447 ;; There are no tests.
7449 (home-page "https://pypi.python.org/pypi/termcolor")
7450 (synopsis "ANSII Color formatting for terminal output")
7452 "This package provides ANSII Color formatting for output in terminals.")
7453 (license license:expat)))
7455 (define-public python2-termcolor
7456 (package-with-python2 python-termcolor))
7458 (define-public python-libarchive-c
7460 (name "python-libarchive-c")
7464 (uri (pypi-uri "libarchive-c" version))
7467 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7468 (build-system python-build-system)
7470 '(#:phases (modify-phases %standard-phases
7472 'build 'reference-libarchive
7473 (lambda* (#:key inputs #:allow-other-keys)
7474 ;; Retain the absolute file name of libarchive.so.
7475 (let ((libarchive (assoc-ref inputs "libarchive")))
7476 (substitute* "libarchive/ffi.py"
7477 (("find_library\\('archive'\\)")
7478 (string-append "'" libarchive
7479 "/lib/libarchive.so'"))))))
7481 (lambda _ (invoke "pytest" "-vv"))))))
7483 `(("python-mock" ,python-mock)
7484 ("python-pytest" ,python-pytest)))
7486 `(("libarchive" ,libarchive)))
7487 (home-page "https://github.com/Changaco/python-libarchive-c")
7488 (synopsis "Python interface to libarchive")
7490 "This package provides Python bindings to libarchive, a C library to
7491 access possibly compressed archives in many different formats. It uses
7492 Python's @code{ctypes} foreign function interface (FFI).")
7493 (license license:lgpl2.0+)))
7495 (define-public python2-libarchive-c
7496 (package-with-python2 python-libarchive-c))
7498 (define-public python-file
7501 (name "python-file")
7502 (build-system python-build-system)
7504 '(#:tests? #f ;no tests
7505 #:configure-flags '("--single-version-externally-managed" "--root=/")
7506 #:phases (modify-phases %standard-phases
7507 (add-before 'build 'change-directory
7511 (add-before 'build 'set-library-file-name
7512 (lambda* (#:key inputs #:allow-other-keys)
7513 (let ((file (assoc-ref inputs "file")))
7514 (substitute* "magic.py"
7515 (("find_library\\('magic'\\)")
7516 (string-append "'" file "/lib/libmagic.so'")))
7518 (inputs `(("file" ,file)))
7519 (native-inputs (if (%current-target-system)
7520 `(("self" ,this-package))
7522 (synopsis "Python bindings to the libmagic file type guesser. Note that
7523 this module and the python-magic module both provide a \"magic.py\" file;
7524 these two modules, which are different and were developed separately, both
7525 serve the same purpose: provide Python bindings for libmagic.")))
7527 (define-public python2-file
7528 (package-with-python2 python-file))
7530 (define-public python-debian
7532 (name "python-debian")
7533 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7537 ;; Use git-fetch, as pypi doesn't include test suite.
7542 (file-name (git-file-name name version))
7545 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7546 (build-system python-build-system)
7548 `(#:phases (modify-phases %standard-phases
7549 (add-after 'unpack 'remove-debian-specific-tests
7550 ;; python-apt, apt and dpkg are not yet available in guix,
7551 ;; and these tests heavily depend on them.
7553 (delete-file "lib/debian/tests/test_deb822.py")
7554 (delete-file "lib/debian/tests/test_debfile.py")
7557 `(("python-six" ,python-six)
7558 ("python-chardet" ,python-chardet)))
7559 (synopsis "Debian package related modules")
7561 ;; XXX: Use @enumerate instead of @itemize to work around
7562 ;; <http://bugs.gnu.org/21772>.
7563 "This package provides Python modules that abstract many formats of
7564 Debian-related files, such as:
7567 @item Debtags information;
7568 @item @file{debian/changelog} files;
7569 @item packages files, pdiffs;
7570 @item control files of single or multiple RFC822-style paragraphs---e.g.
7571 @file{debian/control}, @file{.changes}, @file{.dsc};
7572 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7573 contained files and meta-information.
7576 ;; Modules are either GPLv2+ or GPLv3+.
7577 (license license:gpl3+)))
7579 (define-public python2-debian
7580 (package-with-python2 python-debian))
7582 (define-public python-nbformat
7584 (name "python-nbformat")
7589 (uri (pypi-uri "nbformat" version))
7592 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7593 (build-system python-build-system)
7594 (arguments `(#:tests? #f)) ; no test target
7596 `(("python-ipython-genutils" ,python-ipython-genutils)
7597 ("python-jsonschema" ,python-jsonschema)
7598 ("python-jupyter-core" ,python-jupyter-core)
7599 ("python-traitlets" ,python-traitlets)))
7600 (home-page "http://jupyter.org")
7601 (synopsis "Jupyter Notebook format")
7602 (description "This package provides the reference implementation of the
7603 Jupyter Notebook format and Python APIs for working with notebooks.")
7604 (license license:bsd-3)))
7606 (define-public python2-nbformat
7607 (package-with-python2 python-nbformat))
7609 (define-public python-bleach
7611 (name "python-bleach")
7616 (uri (pypi-uri "bleach" version))
7619 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7620 (build-system python-build-system)
7622 `(("python-webencodings" ,python-webencodings)
7623 ("python-six" ,python-six)))
7625 `(("python-pytest" ,python-pytest)
7626 ("python-pytest-runner" ,python-pytest-runner-2)))
7627 (home-page "https://github.com/jsocol/bleach")
7628 (synopsis "Whitelist-based HTML-sanitizing tool")
7629 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7630 (license license:asl2.0)))
7632 (define-public python2-bleach
7633 (package-with-python2 python-bleach))
7635 (define-public python-entrypoints
7637 (name "python-entrypoints")
7642 (uri (pypi-uri "entrypoints" version))
7645 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7646 (build-system python-build-system)
7647 ;; The package does not come with a setup.py file, so we have to generate
7652 (modify-phases %standard-phases
7653 (add-after 'unpack 'create-setup.py
7655 (call-with-output-file "setup.py"
7658 from setuptools import setup
7659 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7661 (home-page "https://github.com/takluyver/entrypoints")
7662 (synopsis "Discover and load entry points from installed Python packages")
7663 (description "Entry points are a way for Python packages to advertise
7664 objects with some common interface. The most common examples are
7665 @code{console_scripts} entry points, which define shell commands by
7666 identifying a Python function to run. The @code{entrypoints} module contains
7667 functions to find and load entry points.")
7668 (license license:expat)))
7670 (define-public python2-entrypoints
7671 (package-with-python2 python-entrypoints))
7673 (define-public python-nbconvert
7675 (name "python-nbconvert")
7680 (uri (pypi-uri "nbconvert" version))
7683 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7684 (build-system python-build-system)
7686 `(;; The "bdist_egg" target is disabled by default, causing the installation
7688 #:configure-flags (list "bdist_egg")
7689 ;; FIXME: 5 failures, 40 errors.
7692 ;; (modify-phases %standard-phases
7695 ;; (zero? (system* "py.test" "-v")))))
7697 `(("python-pytest" ,python-pytest)))
7699 `(("python-bleach" ,python-bleach)
7700 ("python-entrypoints" ,python-entrypoints)
7701 ("python-jinja2" ,python-jinja2)
7702 ("python-jupyter-core" ,python-jupyter-core)
7703 ("python-mistune" ,python-mistune)
7704 ("python-nbformat" ,python-nbformat)
7705 ("python-pygments" ,python-pygments)
7706 ("python-traitlets" ,python-traitlets)))
7707 (home-page "http://jupyter.org")
7708 (synopsis "Converting Jupyter Notebooks")
7709 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7710 notebooks to various other formats via Jinja templates. It allows you to
7711 convert an @code{.ipynb} notebook file into various static formats including:
7719 @item ReStructured Text (rst)
7720 @item executable script
7722 (license license:bsd-3)))
7724 (define-public python2-nbconvert
7725 (package-with-python2 python-nbconvert))
7727 (define-public python-notebook
7729 (name "python-notebook")
7733 (uri (pypi-uri "notebook" version))
7736 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7737 (build-system python-build-system)
7740 (modify-phases %standard-phases
7743 ;; These tests require a browser
7744 (delete-file-recursively "notebook/tests/selenium")
7745 ;; Some tests need HOME
7746 (setenv "HOME" "/tmp")
7747 ;; This file contains "warningfilters", which are not supported
7748 ;; by this version of nose.
7749 (delete-file "setup.cfg")
7750 (with-directory-excursion "/tmp"
7751 (invoke "nosetests" "-v"))
7754 `(("python-jupyter-core" ,python-jupyter-core)
7755 ("python-nbformat" ,python-nbformat)
7756 ("python-nbconvert" ,python-nbconvert)
7757 ("python-prometheus-client" ,python-prometheus-client)
7758 ("python-send2trash" ,python-send2trash)
7759 ("python-terminado" ,python-terminado)))
7761 `(("python-nose" ,python-nose)
7762 ("python-sphinx" ,python-sphinx)
7763 ("python-requests" ,python-requests)))
7764 (home-page "http://jupyter.org/")
7765 (synopsis "Web-based notebook environment for interactive computing")
7767 "The Jupyter HTML notebook is a web-based notebook environment for
7768 interactive computing.")
7769 (properties `((python2-variant . ,(delay python2-notebook))))
7770 (license license:bsd-3)))
7772 (define-public python2-notebook
7773 (let ((base (package-with-python2
7774 (strip-python2-variant python-notebook))))
7775 (package (inherit base)
7777 `(("python2-mock" ,python2-mock)
7778 ,@(package-native-inputs base)))
7780 (substitute-keyword-arguments (package-arguments base)
7782 `(modify-phases ,phases
7783 (add-before 'check 'disable-test-case
7784 ;; The test requires network access to localhost. Curiously it
7785 ;; fails with Python 2 only. Simply make the test-case return
7789 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7790 (("formats = self.nbconvert_api") "return #")))))))))))
7792 (define-public python-widgetsnbextension
7794 (name "python-widgetsnbextension")
7799 (uri (pypi-uri "widgetsnbextension" version))
7802 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7803 (build-system python-build-system)
7805 `(("python-ipykernel" ,python-ipykernel)
7806 ("python-notebook" ,python-notebook)))
7808 `(("python-certifi" ,python-certifi)
7809 ("python-nose" ,python-nose)))
7810 (home-page "https://ipython.org")
7811 (synopsis "IPython HTML widgets for Jupyter")
7812 (description "This package provides interactive HTML widgets for Jupyter
7814 (license license:bsd-3)))
7816 (define-public python2-widgetsnbextension
7817 (package-with-python2 python-widgetsnbextension))
7819 (define-public python-ipywidgets
7821 (name "python-ipywidgets")
7826 (uri (pypi-uri "ipywidgets" version))
7829 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7830 (build-system python-build-system)
7832 `(("python-ipython" ,python-ipython)
7833 ("python-traitlets" ,python-traitlets)
7834 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7836 `(("python-nose" ,python-nose)
7837 ("python-pytest" ,python-pytest)))
7838 (home-page "https://ipython.org")
7839 (synopsis "IPython HTML widgets for Jupyter")
7840 (description "Ipywidgets are interactive HTML widgets for Jupyter
7841 notebooks and the IPython kernel. Notebooks come alive when interactive
7842 widgets are used. Users gain control of their data and can visualize changes
7844 (license license:bsd-3)))
7846 (define-public python2-ipywidgets
7847 (package-with-python2 python-ipywidgets))
7849 (define-public python-jupyter-console
7851 (name "python-jupyter-console")
7856 (uri (pypi-uri "jupyter_console" version))
7859 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7860 (build-system python-build-system)
7862 `(("python-ipykernel" ,python-ipykernel)
7863 ("python-jupyter-client" ,python-jupyter-client)
7864 ("python-prompt-toolkit" ,python-prompt-toolkit)
7865 ("python-pygments" ,python-pygments)))
7867 `(("python-nose" ,python-nose)))
7868 (home-page "https://jupyter.org")
7869 (synopsis "Jupyter terminal console")
7870 (description "This package provides a terminal-based console frontend for
7871 Jupyter kernels. It also allows for console-based interaction with non-Python
7872 Jupyter kernels such as IJulia and IRKernel.")
7873 (license license:bsd-3)))
7875 (define-public python2-jupyter-console
7877 (name "python2-jupyter-console")
7882 (uri (pypi-uri "jupyter_console" version))
7885 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7886 (build-system python-build-system)
7887 ;; Tests only run in an TTY.
7888 (arguments `(#:tests? #f))
7890 `(("python2-ipykernel" ,python2-ipykernel)
7891 ("python2-jupyter-client" ,python2-jupyter-client)
7892 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7893 ("python2-pygments" ,python2-pygments)))
7895 `(("python2-nose" ,python2-nose)))
7896 (home-page "https://jupyter.org")
7897 (synopsis "Jupyter terminal console")
7898 (description "This package provides a terminal-based console frontend for
7899 Jupyter kernels. It also allows for console-based interaction with non-Python
7900 Jupyter kernels such as IJulia and IRKernel.")
7901 (license license:bsd-3)))
7903 ;; The python-ipython and python-jupyter-console require each other. To get
7904 ;; the functionality in both packages working, strip down the
7905 ;; python-jupyter-console package when using it as an input to python-ipython.
7906 (define python-jupyter-console-minimal
7908 (inherit python-jupyter-console)
7909 (name "python-jupyter-console-minimal")
7911 (substitute-keyword-arguments
7912 (package-arguments python-jupyter-console)
7914 `(modify-phases ,phases
7915 (add-after 'install 'delete-bin
7916 (lambda* (#:key outputs #:allow-other-keys)
7917 ;; Delete the bin files, to avoid conflicts in profiles
7918 ;; where python-ipython and python-jupyter-console are
7920 (delete-file-recursively
7922 (assoc-ref outputs "out") "/bin"))))))))
7923 ;; Remove the python-ipython propagated input, to avoid the cycle
7927 (package-propagated-inputs python-jupyter-console)))))
7929 (define-public python-qtconsole
7931 (name "python-qtconsole")
7936 (uri (pypi-uri "qtconsole" version))
7939 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7940 (build-system python-build-system)
7942 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7943 ;; but we only have the LTS version 5.x. This means that there might be
7944 ;; runtime errors, but since this is a dependency of the Jupyter package,
7945 ;; and Jupyter can be used without the qtconsole we can overlook this for
7949 (modify-phases %standard-phases
7950 (add-before 'check 'pre-check
7952 (setenv "QT_QPA_PLATFORM" "offscreen")
7955 `(("python-ipykernel" ,python-ipykernel)
7956 ("python-ipython" ,python-ipython)))
7958 `(("python-pytest" ,python-pytest)))
7959 (home-page "http://jupyter.org")
7960 (synopsis "Jupyter Qt console")
7961 (description "This package provides a Qt-based console for Jupyter with
7962 support for rich media output.")
7963 (license license:bsd-3)))
7965 (define-public python-jsbeautifier
7967 (name "python-jsbeautifier")
7969 (home-page "https://github.com/beautify-web/js-beautify")
7974 (commit (string-append "v" version))))
7975 (file-name (git-file-name name version))
7978 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7979 (build-system python-build-system)
7981 `(#:phases (modify-phases %standard-phases
7982 (add-after 'unpack 'chdir
7984 ;; The upstream Git repository contains all the code,
7985 ;; but this package only builds the python code.
7988 (add-after 'unpack 'patch-python-six-requirements
7990 (substitute* "python/setup.py"
7995 `(("python-editorconfig" ,python-editorconfig)
7996 ("python-six" ,python-six)))
7998 `(("python-pytest" ,python-pytest)))
7999 (synopsis "JavaScript unobfuscator and beautifier")
8000 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8001 popular online obfuscators.")
8002 (license license:expat)))
8004 (define-public jupyter
8011 (uri (pypi-uri "jupyter" version))
8014 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8015 (build-system python-build-system)
8016 (arguments '(#:tests? #f)) ; there are none.
8018 `(("python-ipykernel" ,python-ipykernel)
8019 ("python-ipywidgets" ,python-ipywidgets)
8020 ("python-jupyter-console" ,python-jupyter-console)
8021 ("python-nbconvert" ,python-nbconvert)
8022 ("python-notebook" ,python-notebook)
8023 ("python-qtconsole" ,python-qtconsole)))
8024 (native-search-paths
8025 (list (search-path-specification
8026 (variable "JUPYTER_PATH")
8027 (files '("share/jupyter")))))
8028 (home-page "https://jupyter.org")
8029 (synopsis "Web application for interactive documents")
8031 "The Jupyter Notebook is a web application that allows you to create and
8032 share documents that contain live code, equations, visualizations and
8033 explanatory text. Uses include: data cleaning and transformation, numerical
8034 simulation, statistical modeling, machine learning and much more.")
8035 (license license:bsd-3)))
8037 (define-public python-chardet
8039 (name "python-chardet")
8044 (uri (pypi-uri "chardet" version))
8047 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8049 `(("python-hypothesis" ,python-hypothesis)
8050 ("python-pytest" ,python-pytest)
8051 ("python-pytest-runner" ,python-pytest-runner)))
8052 (build-system python-build-system)
8053 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8054 (arguments `(#:tests? #f))
8055 (home-page "https://github.com/chardet/chardet")
8056 (synopsis "Universal encoding detector for Python 2 and 3")
8058 "This package provides @code{chardet}, a Python module that can
8059 automatically detect a wide range of file encodings.")
8060 (license license:lgpl2.1+)))
8062 (define-public python2-chardet
8063 (package-with-python2 python-chardet))
8065 (define-public python-docopt
8067 (name "python-docopt")
8072 ;; The release on PyPI does not include tests.
8074 "https://github.com/docopt/docopt/archive/"
8076 (file-name (string-append name "-" version ".tar.gz"))
8079 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8080 (build-system python-build-system)
8082 `(("python-pytest" ,python-pytest)))
8085 (modify-phases %standard-phases
8087 (lambda _ (invoke "py.test"))))))
8088 (home-page "http://docopt.org")
8089 (synopsis "Command-line interface description language for Python")
8090 (description "This library allows the user to define a command-line
8091 interface from a program's help message rather than specifying it
8092 programmatically with command-line parsers like @code{getopt} and
8094 (license license:expat)))
8096 (define-public python2-docopt
8097 (package-with-python2 python-docopt))
8099 (define-public python-pythondialog
8101 (name "python-pythondialog")
8106 (uri (pypi-uri "pythondialog" version))
8109 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8110 (build-system python-build-system)
8113 (modify-phases %standard-phases
8114 (add-after 'unpack 'patch-path
8115 (lambda* (#:key inputs #:allow-other-keys)
8116 (let* ((dialog (assoc-ref inputs "dialog")))
8117 ;; Since this library really wants to grovel the search path, we
8118 ;; must hardcode dialog's store path into it.
8119 (substitute* "dialog.py"
8120 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8121 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8123 #:tests? #f)) ; no test suite
8125 `(("dialog" ,dialog)))
8126 (home-page "http://pythondialog.sourceforge.net/")
8127 (synopsis "Python interface to the UNIX dialog utility")
8128 (description "A Python wrapper for the dialog utility. Its purpose is to
8129 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8130 This allows one to make simple text-mode user interfaces on Unix-like systems")
8131 (license license:lgpl2.1)
8132 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8134 (define-public python2-pythondialog
8135 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8138 (version (package-version python-pythondialog))
8141 (uri (pypi-uri "python2-pythondialog" version))
8144 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8146 (define-public python-configobj
8148 (name "python-configobj")
8152 (uri (pypi-uri "configobj" version))
8155 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8156 ;; Patch setup.py so it looks for python-setuptools, which is
8157 ;; required to parse the keyword 'install_requires' in setup.py.
8158 (patches (search-patches "python-configobj-setuptools.patch"))))
8159 (build-system python-build-system)
8161 `(("python-six" ,python-six)))
8162 (synopsis "Config file reading, writing and validation")
8163 (description "ConfigObj is a simple but powerful config file reader and
8164 writer: an ini file round tripper. Its main feature is that it is very easy to
8165 use, with a straightforward programmer’s interface and a simple syntax for
8167 (home-page "https://github.com/DiffSK/configobj")
8168 (license license:bsd-3)))
8170 (define-public python2-configobj
8171 (package-with-python2 python-configobj))
8173 (define-public python-configargparse
8175 (name "python-configargparse")
8179 (uri (pypi-uri "ConfigArgParse" version))
8182 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8183 (build-system python-build-system)
8185 `(("python-pyyaml" ,python-pyyaml)))
8188 (modify-phases %standard-phases
8191 ;; Bypass setuptools-shim because one test relies on "setup.py"
8192 ;; being the first argument passed to the python call.
8194 ;; NOTE: Many tests do not run because they rely on Python's
8195 ;; built-in test.test_argparse, but we remove the unit tests from
8196 ;; our Python installation.
8197 (invoke "python" "setup.py" "test"))))))
8198 (synopsis "Replacement for argparse")
8199 (description "A drop-in replacement for argparse that allows options to also
8200 be set via config files and/or environment variables.")
8201 (home-page "https://github.com/bw2/ConfigArgParse")
8202 (license license:expat)))
8204 (define-public python2-configargparse
8205 (package-with-python2 python-configargparse))
8207 (define-public python-argparse-manpage
8209 (name "python-argparse-manpage")
8214 (uri (pypi-uri "argparse-manpage" version))
8217 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8218 (build-system python-build-system)
8219 (home-page "https://github.com/praiskup/argparse-manpage")
8220 (synopsis "Build manual page from Python's ArgumentParser object")
8222 "This package provides tools to build manual pages from Python's
8223 @code{ArgumentParser} object.")
8224 (license license:asl2.0)))
8226 (define-public python-contextlib2
8228 (name "python-contextlib2")
8233 (uri (pypi-uri "contextlib2" version))
8236 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8237 (build-system python-build-system)
8238 (home-page "http://contextlib2.readthedocs.org/")
8239 (synopsis "Tools for decorators and context managers")
8240 (description "This module is primarily a backport of the Python
8241 3.2 contextlib to earlier Python versions. Like contextlib, it
8242 provides utilities for common tasks involving decorators and context
8243 managers. It also contains additional features that are not part of
8244 the standard library.")
8245 (license license:psfl)))
8247 (define-public python2-contextlib2
8249 (name "python2-contextlib2")
8254 (uri (pypi-uri "contextlib2" version))
8257 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8258 (build-system python-build-system)
8260 `(#:python ,python-2
8262 (modify-phases %standard-phases
8264 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8266 `(("python2-unittest2" ,python2-unittest2)))
8267 (home-page "http://contextlib2.readthedocs.org/")
8268 (synopsis "Tools for decorators and context managers")
8269 (description "This module is primarily a backport of the Python
8270 3.2 contextlib to earlier Python versions. Like contextlib, it
8271 provides utilities for common tasks involving decorators and context
8272 managers. It also contains additional features that are not part of
8273 the standard library.")
8274 (license license:psfl)))
8276 (define-public python-texttable
8278 (name "python-texttable")
8283 (uri (pypi-uri "texttable" version))
8286 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8287 (build-system python-build-system)
8288 (arguments '(#:tests? #f)) ; no tests
8289 (home-page "https://github.com/foutaise/texttable/")
8290 (synopsis "Python module for creating simple ASCII tables")
8291 (description "Texttable is a Python module for creating simple ASCII
8293 (license license:lgpl2.1+)))
8295 (define-public python2-texttable
8296 (package-with-python2 python-texttable))
8298 (define-public python-atomicwrites
8300 (name "python-atomicwrites")
8304 (uri (pypi-uri "atomicwrites" version))
8307 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8308 (build-system python-build-system)
8309 (synopsis "Atomic file writes in Python")
8310 (description "Library for atomic file writes using platform dependent tools
8311 for atomic file system operations.")
8312 (home-page "https://github.com/untitaker/python-atomicwrites")
8313 (license license:expat)))
8315 (define-public python2-atomicwrites
8316 (package-with-python2 python-atomicwrites))
8318 (define-public python-click-threading
8320 (name "python-click-threading")
8324 (uri (pypi-uri "click-threading" version))
8327 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8328 (build-system python-build-system)
8330 `(("python-click" ,python-click)))
8331 (synopsis "Utilities for multithreading in Click")
8332 (description "This package provides utilities for multithreading in Click
8334 (home-page "https://github.com/click-contrib/click-threading")
8335 (license license:expat)))
8337 (define-public python-click-log
8339 (name "python-click-log")
8343 (uri (pypi-uri "click-log" version))
8346 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8347 (build-system python-build-system)
8349 `(("python-click" ,python-click)))
8350 (synopsis "Logging for click applications")
8351 (description "This package provides a Python library for logging Click
8353 (home-page "https://github.com/click-contrib/click-log")
8354 (license license:expat)))
8356 (define-public python-apipkg
8358 (name "python-apipkg")
8362 (uri (pypi-uri "apipkg" version))
8365 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8366 (build-system python-build-system)
8368 `(("python-pytest" ,python-pytest)))
8369 (synopsis "Namespace control and lazy-import mechanism")
8370 (description "With apipkg you can control the exported namespace of a Python
8371 package and greatly reduce the number of imports for your users. It is a small
8372 pure Python module that works on virtually all Python versions.")
8373 (home-page "https://github.com/pytest-dev/apipkg")
8374 (license license:expat)))
8376 (define-public python2-apipkg
8377 (package-with-python2 python-apipkg))
8379 (define-public python-execnet
8381 (name "python-execnet")
8385 (uri (pypi-uri "execnet" version))
8388 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8389 (build-system python-build-system)
8391 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8392 ;; The two test failures are caused by the lack of an `ssh` executable.
8393 ;; The test suite can be run with pytest after the 'install' phase.
8396 `(("python-pytest" ,python-pytest)
8397 ("python-setuptools-scm" ,python-setuptools-scm)))
8399 `(("python-apipkg" ,python-apipkg)))
8400 (synopsis "Rapid multi-Python deployment")
8401 (description "Execnet provides a share-nothing model with
8402 channel-send/receive communication for distributing execution across many
8403 Python interpreters across version, platform and network barriers. It has a
8404 minimal and fast API targeting the following uses:
8406 @item distribute tasks to (many) local or remote CPUs
8407 @item write and deploy hybrid multi-process applications
8408 @item write scripts to administer multiple environments
8410 (home-page "http://codespeak.net/execnet/")
8411 (license license:expat)))
8413 (define-public python2-execnet
8414 (package-with-python2 python-execnet))
8416 (define-public python-icalendar
8418 (name "python-icalendar")
8422 (uri (pypi-uri "icalendar" version))
8425 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8426 (build-system python-build-system)
8428 `(("python-dateutil" ,python-dateutil)
8429 ("python-pytz" ,python-pytz)))
8430 (synopsis "Python library for parsing iCalendar files")
8431 (description "The icalendar package is a parser/generator of iCalendar
8432 files for use with Python.")
8433 (home-page "https://github.com/collective/icalendar")
8434 (license license:bsd-2)))
8436 (define-public python-args
8438 (name "python-args")
8442 (uri (pypi-uri "args" version))
8445 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8446 (build-system python-build-system)
8447 (home-page "https://github.com/kennethreitz/args")
8448 (synopsis "Command-line argument parser")
8450 "This library provides a Python module to parse command-line arguments.")
8451 (license license:bsd-3)))
8453 (define-public python2-args
8454 (package-with-python2 python-args))
8456 (define-public python-clint
8458 (name "python-clint")
8462 (uri (pypi-uri "clint" version))
8465 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8466 (build-system python-build-system)
8469 (modify-phases %standard-phases
8471 (lambda _ (invoke "py.test" "-v"))))))
8473 `(("python-pytest" ,python-pytest)))
8475 `(("python-args" ,python-args)))
8476 (home-page "https://github.com/kennethreitz/clint")
8477 (synopsis "Command-line interface tools")
8479 "Clint is a Python module filled with a set of tools for developing
8480 command-line applications, including tools for colored and indented
8481 output, progress bar display, and pipes.")
8482 (license license:isc)))
8484 (define-public python2-clint
8485 (package-with-python2 python-clint))
8487 (define-public python-rply
8489 (name "python-rply")
8493 (uri (pypi-uri "rply" version))
8496 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8497 (build-system python-build-system)
8499 `(("python-appdirs" ,python-appdirs)))
8500 (home-page "https://github.com/alex/rply")
8501 (synopsis "Parser generator for Python")
8503 "This package provides a pure Python based parser generator, that also
8504 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8505 with a new public API, and RPython support.")
8506 (license license:bsd-3)))
8508 (define-public python2-rply
8509 (package-with-python2 python-rply))
8511 (define-public python-hy
8517 (uri (pypi-uri "hy" version))
8520 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8521 (build-system python-build-system)
8524 (modify-phases %standard-phases
8525 (add-before 'install 'set-HOME
8527 (setenv "HOME" "/tmp")))
8530 ;; Tests require write access to HOME.
8531 (setenv "HOME" "/tmp")
8532 (invoke "nosetests"))))))
8534 `(("python-coverage" ,python-coverage)
8535 ("python-nose" ,python-nose)))
8537 `(("python-astor" ,python-astor)
8538 ("python-clint" ,python-clint)
8539 ("python-rply" ,python-rply)))
8540 (home-page "http://hylang.org/")
8541 (synopsis "Lisp frontend to Python")
8543 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8544 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8545 Python at your fingertips, in Lisp form.")
8546 (license license:expat)))
8548 (define-public python2-hy
8549 (package-with-python2 python-hy))
8551 (define-public python2-functools32
8553 (name "python2-functools32")
8558 (uri (pypi-uri "functools32" version))
8561 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8562 (build-system python-build-system)
8564 `(#:python ,python-2
8565 #:tests? #f)) ; no test target
8566 (home-page "https://github.com/MiCHiLU/python-functools32")
8568 "Backport of the functools module from Python 3.2.3")
8570 "This package is a backport of the @code{functools} module from Python
8571 3.2.3 for use with older versions of Python and PyPy.")
8572 (license license:expat)))
8574 (define-public python2-subprocess32
8576 (name "python2-subprocess32")
8580 (uri (pypi-uri "subprocess32" version))
8583 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8585 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8586 (build-system python-build-system)
8588 `(#:python ,python-2
8589 ;; The test suite fails with Python > 2.7.13:
8590 ;; import test.support
8591 ;; ImportError: No module named support
8594 (modify-phases %standard-phases
8595 (add-after 'unpack 'patch-/bin/sh
8597 (substitute* '("subprocess32.py"
8598 "test_subprocess32.py")
8599 (("/bin/sh") (which "sh")))
8601 (home-page "https://github.com/google/python-subprocess32")
8602 (synopsis "Backport of the subprocess module from Python 3.2")
8604 "This is a backport of the @code{subprocess} standard library module
8605 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8606 new features. On POSIX systems it is guaranteed to be reliable when used
8607 in threaded applications. It includes timeout support from Python 3.3 but
8608 otherwise matches 3.2’s API.")
8609 (license license:psfl)))
8611 (define-public python2-futures
8613 (name "python2-futures")
8618 (uri (pypi-uri "futures" version))
8621 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8622 (build-system python-build-system)
8624 `(#:python ,python-2
8626 (modify-phases %standard-phases
8629 (invoke "python" "test_futures.py")
8631 (home-page "https://github.com/agronholm/pythonfutures")
8633 "Backport of the concurrent.futures package from Python 3.2")
8635 "The concurrent.futures module provides a high-level interface for
8636 asynchronously executing callables. This package backports the
8637 concurrent.futures package from Python 3.2")
8638 (license license:bsd-3)))
8640 (define-public python-promise
8642 (name "python-promise")
8647 (uri (pypi-uri "promise" version))
8650 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8651 (build-system python-build-system)
8652 ;; Tests wants python-futures, which is a python2 only program, and
8653 ;; can't be found by python-promise at test time.
8654 (arguments `(#:tests? #f))
8655 (home-page "https://github.com/syrusakbary/promise")
8656 (synopsis "Promises/A+ implementation for Python")
8658 "Promises/A+ implementation for Python")
8659 (properties `((python2-variant . ,(delay python2-promise))))
8660 (license license:expat)))
8662 (define-public python2-promise
8663 (let ((promise (package-with-python2
8664 (strip-python2-variant python-promise))))
8665 (package (inherit promise)
8666 (arguments (substitute-keyword-arguments (package-arguments promise)
8669 `(("python2-futures" ,python2-futures)
8670 ("python2-pytest" ,python2-pytest)
8671 ,@(package-native-inputs promise))))))
8673 (define-public python-progressbar33
8675 (name "python-progressbar33")
8680 (uri (pypi-uri "progressbar33" version))
8683 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8684 (build-system python-build-system)
8685 (home-page "http://github.com/germangh/python-progressbar")
8686 (synopsis "Text progress bar library for Python")
8688 "This package provides a text progress bar library for Python. This
8689 version only differs from the original @code{progressbar} package in that it
8690 uses relative package imports instead of absolute imports, which is necessary
8691 for the module to work under Python 3.3.")
8692 ;; Either or both of these licenses may be selected.
8693 (license (list license:lgpl2.1+ license:bsd-3))))
8695 (define-public python-colorama
8697 (name "python-colorama")
8702 (uri (pypi-uri "colorama" version))
8705 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8706 (build-system python-build-system)
8707 (synopsis "Colored terminal text rendering for Python")
8708 (description "Colorama is a Python library for rendering colored terminal
8710 (home-page "https://pypi.python.org/pypi/colorama")
8711 (license license:bsd-3)))
8713 (define-public python2-colorama
8714 (package-with-python2 python-colorama))
8716 (define-public python-rsa
8723 (uri (pypi-uri "rsa" version))
8726 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8727 (build-system python-build-system)
8729 `(("python-pyasn1" ,python-pyasn1)))
8730 (synopsis "Pure-Python RSA implementation")
8731 (description "Python-RSA is a pure-Python RSA implementation. It supports
8732 encryption and decryption, signing and verifying signatures, and key
8733 generation according to PKCS#1 version 1.5. It can be used as a Python
8734 library as well as on the command line.")
8735 (home-page "https://stuvel.eu/rsa")
8736 (license license:asl2.0)))
8738 (define-public python2-rsa
8739 (package-with-python2 python-rsa))
8741 (define-public python-pluggy
8743 (name "python-pluggy")
8748 (uri (pypi-uri "pluggy" version))
8751 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8752 (build-system python-build-system)
8754 `(("python-setuptools-scm" ,python-setuptools-scm)))
8755 (synopsis "Plugin and hook calling mechanism for Python")
8756 (description "Pluggy is an extraction of the plugin manager as used by
8757 Pytest but stripped of Pytest specific details.")
8758 (home-page "https://pypi.python.org/pypi/pluggy")
8759 (license license:expat)))
8761 (define-public python2-pluggy
8762 (package-with-python2 python-pluggy))
8764 (define-public python-tox
8771 (uri (pypi-uri "tox" version))
8774 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8775 (build-system python-build-system)
8777 ;; FIXME: Tests require pytest-timeout, which itself requires
8778 ;; pytest>=2.8.0 for installation.
8781 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8782 ("python-py" ,python-py)
8783 ("python-virtualenv" ,python-virtualenv)))
8785 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8786 ("python-pytest" ,python-pytest) ; >= 2.3.5
8787 ("python-setuptools-scm" ,python-setuptools-scm)))
8788 (home-page "http://tox.testrun.org/")
8789 (synopsis "Virtualenv-based automation of test activities")
8790 (description "Tox is a generic virtualenv management and test command line
8791 tool. It can be used to check that a package installs correctly with
8792 different Python versions and interpreters, or run tests in each type of
8793 supported environment, or act as a frontend to continuous integration
8795 (license license:expat)))
8797 (define-public python2-tox
8798 (package-with-python2 python-tox))
8800 (define-public python-jmespath
8802 (name "python-jmespath")
8807 (uri (pypi-uri "jmespath" version))
8810 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8811 (build-system python-build-system)
8813 `(("python-nose" ,python-nose)))
8814 (synopsis "JSON Matching Expressions")
8815 (description "JMESPath (pronounced “james path”) is a Python library that
8816 allows one to declaratively specify how to extract elements from a JSON
8818 (home-page "https://github.com/jmespath/jmespath.py")
8819 (license license:expat)))
8821 (define-public python2-jmespath
8822 (package-with-python2 python-jmespath))
8824 (define-public python-botocore
8826 (name "python-botocore")
8827 (version "1.12.149")
8831 (uri (pypi-uri "botocore" version))
8834 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8835 (build-system python-build-system)
8837 ;; FIXME: Many tests are failing.
8840 `(("python-dateutil" ,python-dateutil)
8841 ("python-docutils" ,python-docutils)
8842 ("python-jmespath" ,python-jmespath)))
8844 `(("python-mock" ,python-mock)
8845 ("python-nose" ,python-nose)
8847 ("python-tox" ,python-tox)
8848 ("python-urllib3" ,python-urllib3)
8849 ("python-wheel" ,python-wheel)))
8850 (home-page "https://github.com/boto/botocore")
8851 (synopsis "Low-level interface to AWS")
8852 (description "Botocore is a Python library that provides a low-level
8853 interface to the Amazon Web Services (AWS) API.")
8854 (license license:asl2.0)))
8856 (define-public python2-botocore
8857 (package-with-python2 python-botocore))
8859 (define-public python-xdo
8866 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8867 "python-xdo_" version ".orig.tar.gz"))
8870 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8871 (build-system python-build-system)
8874 (modify-phases %standard-phases
8875 (add-before 'install 'patch-libxdo-path
8876 ;; Hardcode the path of dynamically loaded libxdo library.
8877 (lambda* (#:key inputs #:allow-other-keys)
8878 (let ((libxdo (string-append
8879 (assoc-ref inputs "xdotool")
8881 (substitute* "xdo/_xdo.py"
8882 (("find_library\\(\"xdo\"\\)")
8883 (simple-format #f "\"~a\"" libxdo)))
8885 #:tests? #f)) ; no tests provided
8887 `(("python-six" ,python-six)))
8889 `(("xdotool" ,xdotool)
8890 ("libX11" ,libx11)))
8891 (home-page "https://tracker.debian.org/pkg/python-xdo")
8892 (synopsis "Python library for simulating X11 keyboard/mouse input")
8893 (description "Provides bindings to libxdo for manipulating X11 via simulated
8894 input. (Note that this is mostly a legacy library; you may wish to look at
8895 python-xdo for newer bindings.)")
8896 (license license:bsd-3)))
8898 (define-public python2-xdo
8899 (package-with-python2 python-xdo))
8901 (define-public python-mako
8903 (name "python-mako")
8908 (uri (pypi-uri "Mako" version))
8911 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8912 (build-system python-build-system)
8914 `(#:phases (modify-phases %standard-phases
8917 (invoke "pytest" "-vv"))))))
8919 `(("python-markupsafe" ,python-markupsafe)))
8921 `(("python-mock" ,python-mock)
8922 ("python-pytest" ,python-pytest)))
8923 (home-page "https://www.makotemplates.org/")
8924 (synopsis "Templating language for Python")
8925 (description "Mako is a templating language for Python that compiles
8926 templates into Python modules.")
8927 (license license:expat)))
8929 (define-public python2-mako
8930 (package-with-python2 python-mako))
8932 (define-public python-waitress
8934 (name "python-waitress")
8939 (uri (pypi-uri "waitress" version))
8940 (patches (search-patches "python-waitress-fix-tests.patch"))
8943 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8944 (build-system python-build-system)
8945 (home-page "https://github.com/Pylons/waitress")
8946 (synopsis "Waitress WSGI server")
8947 (description "Waitress is meant to be a production-quality pure-Python WSGI
8948 server with very acceptable performance.")
8949 (license license:zpl2.1)))
8951 (define-public python2-waitress
8952 (package-with-python2 python-waitress))
8954 (define-public python-whichcraft
8956 (name "python-whichcraft")
8961 (uri (pypi-uri "whichcraft" version))
8964 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8965 (build-system python-build-system)
8967 `(("python-pytest" ,python-pytest)))
8968 (home-page "https://github.com/pydanny/whichcraft")
8969 (synopsis "Cross-platform cross-python shutil.which functionality")
8971 "This package provides a shim of the shutil.which function that's
8972 designed to work across multiple versions of Python.")
8973 (license license:bsd-3)))
8975 (define-public python-cookiecutter
8977 (name "python-cookiecutter")
8982 (uri (pypi-uri "cookiecutter" version))
8985 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8986 (build-system python-build-system)
8988 `(("python-freezegun" ,python-freezegun)
8989 ("python-pytest" ,python-pytest)
8990 ("python-pytest-catchlog" ,python-pytest-catchlog)
8991 ("python-pytest-cov" ,python-pytest-cov)
8992 ("python-pytest-mock" ,python-pytest-mock)))
8994 `(("python-binaryornot" ,python-binaryornot)
8995 ("python-click" ,python-click)
8996 ("python-future" ,python-future)
8997 ("python-jinja2" ,python-jinja2)
8998 ("python-jinja2-time" ,python-jinja2-time)
8999 ("python-poyo" ,python-poyo)
9000 ("python-requests" ,python-requests)
9001 ("python-whichcraft" ,python-whichcraft)))
9002 (home-page "https://github.com/audreyr/cookiecutter")
9004 "Command-line utility that creates projects from project templates")
9006 "This package provides a command-line utility that creates projects from
9007 project templates, e.g. creating a Python package project from a Python package
9009 (license license:bsd-3)))
9011 (define-public python-pyquery
9013 (name "python-pyquery")
9018 (uri (pypi-uri "pyquery" version))
9021 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9022 (build-system python-build-system)
9024 `(("python-webob" ,python-webob)
9025 ("python-webtest" ,python-webtest)))
9027 `(("python-lxml" ,python-lxml)
9028 ("python-cssselect" ,python-cssselect)))
9029 (home-page "https://github.com/gawel/pyquery")
9030 (synopsis "Make jQuery-like queries on xml documents")
9031 (description "pyquery allows you to make jQuery queries on xml documents.
9032 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9033 fast xml and html manipulation.")
9034 (license license:bsd-3)))
9036 (define-public python-anyjson
9038 (name "python-anyjson")
9043 (uri (pypi-uri "anyjson" version))
9046 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9047 (build-system python-build-system)
9049 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9050 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9051 ;; whatever) so this transformation needs to be done before the tests
9052 ;; can be run. Maybe we could add a build step to transform beforehand
9053 ;; but it could be annoying/difficult.
9054 ;; We can enable tests for the Python 2 version, though, and do below.
9056 (home-page "https://bitbucket.org/runeh/anyjson/")
9058 "Wraps best available JSON implementation in a common interface")
9060 "Anyjson loads whichever is the fastest JSON module installed
9061 and provides a uniform API regardless of which JSON implementation is used.")
9062 (license license:bsd-3)
9063 (properties `((python2-variant . ,(delay python2-anyjson))))))
9065 (define-public python2-anyjson
9066 (let ((anyjson (package-with-python2
9067 (strip-python2-variant python-anyjson))))
9070 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9072 ,@(package-arguments anyjson)))
9073 (native-inputs `(("python2-nose" ,python2-nose))))))
9075 (define-public python-amqp
9077 (name "python-amqp")
9082 (uri (pypi-uri "amqp" version))
9085 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9086 (build-system python-build-system)
9088 `(("python-case" ,python-case)
9089 ("python-pytest-sugar" ,python-pytest-sugar)
9090 ("python-mock" ,python-mock)))
9092 `(("python-vine" ,python-vine)))
9093 (home-page "https://github.com/celery/py-amqp")
9095 "Low-level AMQP client for Python (fork of amqplib)")
9097 "This is a fork of amqplib which was originally written by Barry Pederson.
9098 It is maintained by the Celery project, and used by kombu as a pure python
9099 alternative when librabbitmq is not available.")
9100 (license license:lgpl2.1+)
9101 (properties `((python2-variant . ,(delay python2-amqp))))))
9103 (define-public python2-amqp
9104 (let ((amqp (package-with-python2
9105 (strip-python2-variant python-amqp))))
9108 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9109 ;; unmaintained. Weirdly, does not do this on the python 3
9112 ,@(package-arguments amqp))))))
9114 (define-public python-txamqp
9116 (name "python-txamqp")
9121 (uri (pypi-uri "txAMQP" version))
9124 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9125 (build-system python-build-system)
9127 `(("python-six" ,python-six)
9128 ("python-twisted" ,python-twisted)))
9129 (home-page "https://github.com/txamqp/txamqp")
9130 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9132 "This package provides a Python library for communicating with AMQP peers
9133 and brokers using the asynchronous networking framework Twisted. It contains
9134 all the necessary code to connect, send and receive messages to/from an
9135 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9136 also includes support for using Thrift RPC over AMQP in Twisted
9138 (license license:asl2.0)))
9140 (define-public python2-txamqp
9141 (package-with-python2 python-txamqp))
9143 (define-public python-kombu
9145 (name "python-kombu")
9150 (uri (pypi-uri "kombu" version))
9153 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9154 (build-system python-build-system)
9156 `(("python-mock" ,python-mock)
9157 ("python-case" ,python-case)
9158 ("python-pyro4" ,python-pyro4)
9159 ("python-pytest-sugar" ,python-pytest-sugar)
9160 ("python-pytz" ,python-pytz)))
9162 `(("python-anyjson" ,python-anyjson)
9163 ("python-amqp" ,python-amqp)
9164 ("python-redis" ,python-redis)))
9165 (home-page "https://kombu.readthedocs.io")
9166 (synopsis "Message passing library for Python")
9167 (description "The aim of Kombu is to make messaging in Python as easy as
9168 possible by providing an idiomatic high-level interface for the AMQ protocol,
9169 and also provide proven and tested solutions to common messaging problems.
9170 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9171 message orientation, queuing, routing, reliability and security, for which the
9172 RabbitMQ messaging server is the most popular implementation.")
9173 (license license:bsd-3)
9174 (properties `((python2-variant . ,(delay python2-kombu))))))
9176 (define-public python2-kombu
9177 (let ((kombu (package-with-python2
9178 (strip-python2-variant python-kombu))))
9181 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9182 ;; It works fine on the python3 variant.
9184 ,@(package-arguments kombu)))
9185 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9186 ,@(package-native-inputs kombu))))))
9188 (define-public python-billiard
9190 (name "python-billiard")
9195 (uri (pypi-uri "billiard" version))
9198 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9199 (build-system python-build-system)
9201 `(("python-case" ,python-case)
9202 ("python-pytest" ,python-pytest)))
9203 (home-page "https://github.com/celery/billiard")
9205 "Python multiprocessing fork with improvements and bugfixes")
9207 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9208 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9209 pyprocessing package. This standalone variant is intended to be compatible with
9210 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9211 (license license:bsd-3)
9212 (properties `((python2-variant . ,(delay python2-billiard))))))
9214 (define-public python2-billiard
9215 (let ((billiard (package-with-python2
9216 (strip-python2-variant python-billiard))))
9219 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9220 ("python2-mock" ,python2-mock)
9221 ,@(package-native-inputs billiard))))))
9223 (define-public python-celery
9225 (name "python-celery")
9230 (uri (pypi-uri "celery" version))
9233 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9234 (build-system python-build-system)
9236 '(;; TODO The tests fail with Python 3.7
9237 ;; https://github.com/celery/celery/issues/4849
9240 (modify-phases %standard-phases
9241 (add-after 'unpack 'patch-requirements
9243 (substitute* "requirements/test.txt"
9244 (("pytest>=3\\.0,<3\\.3")
9248 `(("python-case" ,python-case)
9249 ("python-pytest" ,python-pytest)))
9251 `(("python-pytz" ,python-pytz)
9252 ("python-billiard" ,python-billiard)
9253 ("python-kombu" ,python-kombu)))
9254 (home-page "https://celeryproject.org")
9255 (synopsis "Distributed Task Queue")
9256 (description "Celery is an asynchronous task queue/job queue based on
9257 distributed message passing. It is focused on real-time operation, but
9258 supports scheduling as well. The execution units, called tasks, are executed
9259 concurrently on a single or more worker servers using multiprocessing,
9260 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9261 synchronously (wait until ready).")
9262 (license license:bsd-3)
9263 (properties `((python2-variant . ,(delay python2-celery))))))
9265 (define-public python2-celery
9266 (let ((celery (package-with-python2
9267 (strip-python2-variant python-celery))))
9270 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9271 ("python2-mock" ,python2-mock)
9272 ,@(package-native-inputs celery))))))
9274 (define-public python-translitcodec
9276 (name "python-translitcodec")
9281 (uri (pypi-uri "translitcodec" version))
9284 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9285 (build-system python-build-system)
9287 `(#:tests? #f)) ; no tests provided
9289 "https://github.com/claudep/translitcodec")
9291 "Unicode to 8-bit charset transliteration codec")
9293 "This package contains codecs for transliterating ISO 10646 texts into
9294 best-effort representations using smaller coded character sets (ASCII,
9296 (license license:expat)))
9298 (define-public python2-translitcodec
9299 (package-with-python2 python-translitcodec))
9301 (define-public python-editor
9303 (name "python-editor")
9308 (uri (pypi-uri "python-editor" version))
9311 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9312 (build-system python-build-system)
9314 "https://github.com/fmoo/python-editor")
9316 "Programmatically open an editor, capture the result")
9318 "python-editor is a library that provides the editor module for
9319 programmatically interfacing with your system's $EDITOR.")
9320 (license license:asl2.0)))
9322 (define-public python2-editor
9323 (package-with-python2 python-editor))
9325 (define-public python-vobject
9327 (name "python-vobject")
9331 (uri (pypi-uri "vobject" version))
9334 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9335 (build-system python-build-system)
9337 '(;; The test suite relies on some non-portable Windows interfaces.
9340 `(("python-dateutil" ,python-dateutil)
9341 ("python-pyicu" ,python-pyicu)))
9342 (synopsis "Parse and generate vCard and vCalendar files")
9343 (description "Vobject is intended to be a full featured Python package for
9344 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9345 are supported and well tested. vCard 3.0 files are supported, and all data
9346 should be imported, but only a few components are understood in a sophisticated
9348 (home-page "http://eventable.github.io/vobject/")
9349 (license license:asl2.0)))
9351 (define-public python2-vobject
9352 (package-with-python2 python-vobject))
9354 (define-public python-munkres
9356 (name "python-munkres")
9360 (uri (pypi-uri "munkres" version))
9363 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9364 (build-system python-build-system)
9366 '(#:tests? #f)) ; no test suite
9367 (home-page "http://software.clapper.org/munkres/")
9368 (synopsis "Implementation of the Munkres algorithm")
9369 (description "The Munkres module provides an implementation of the Munkres
9370 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9371 useful for solving the Assignment Problem.")
9372 (license license:bsd-3)))
9374 (define-public python2-munkres
9375 (package-with-python2 python-munkres))
9377 (define-public python-whoosh
9379 (name "python-whoosh")
9384 (uri (pypi-uri "Whoosh" version))
9387 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9388 (build-system python-build-system)
9389 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9391 `(("python-pytest" ,python-pytest)))
9392 (home-page "https://bitbucket.org/mchaput/whoosh")
9393 (synopsis "Full text indexing, search, and spell checking library")
9395 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9397 (license license:bsd-2)))
9399 (define-public python2-whoosh
9400 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9401 (package (inherit whoosh)
9403 `(("python2-backport-ssl-match-hostname"
9404 ,python2-backport-ssl-match-hostname)
9405 ,@(package-propagated-inputs whoosh))))))
9407 (define-public python-pathlib
9409 (name "python-pathlib")
9413 (uri (pypi-uri "pathlib" version))
9416 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9417 (build-system python-build-system)
9418 ;; The tests depend on the internal "test" module, which does not provide
9419 ;; a stable interface.
9420 (arguments `(#:tests? #f))
9421 (home-page "https://pathlib.readthedocs.org/")
9422 (synopsis "Object-oriented file system paths")
9423 (description "Pathlib offers a set of classes to handle file system paths.
9424 It offers the following advantages over using string objects:
9427 @item No more cumbersome use of os and os.path functions. Everything can
9428 be done easily through operators, attribute accesses, and method calls.
9429 @item Embodies the semantics of different path types. For example,
9430 comparing Windows paths ignores casing.
9431 @item Well-defined semantics, eliminating any inconsistencies or
9432 ambiguities (forward vs. backward slashes, etc.).
9435 Note: In Python 3.4, pathlib is now part of the standard library. For other
9436 Python versions please consider python-pathlib2 instead, which tracks the
9437 standard library module. This module (python-pathlib) isn't maintained
9439 (license license:expat)))
9441 (define-public python2-pathlib
9442 (package-with-python2 python-pathlib))
9444 (define-public python2-pathlib2
9446 (name "python2-pathlib2")
9450 (uri (pypi-uri "pathlib2" version))
9453 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9454 (build-system python-build-system)
9455 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9456 ;; version is 3.4 which already includes this package as part of the
9457 ;; standard library.
9459 `(#:python ,python-2))
9461 `(("python2-scandir" ,python2-scandir)
9462 ("python2-six" ,python2-six)))
9463 (home-page "https://pypi.python.org/pypi/pathlib2/")
9464 (synopsis "Object-oriented file system paths - backport of standard
9466 (description "The goal of pathlib2 is to provide a backport of standard
9467 pathlib module which tracks the standard library module, so all the newest
9468 features of the standard pathlib can be used also on older Python versions.
9470 Pathlib offers a set of classes to handle file system paths. It offers the
9471 following advantages over using string objects:
9474 @item No more cumbersome use of os and os.path functions. Everything can
9475 be done easily through operators, attribute accesses, and method calls.
9476 @item Embodies the semantics of different path types. For example,
9477 comparing Windows paths ignores casing.
9478 @item Well-defined semantics, eliminating any inconsistencies or
9479 ambiguities (forward vs. backward slashes, etc.).
9481 (license license:expat)))
9483 (define-public python2-pathlib2-bootstrap
9486 (inherit python2-pathlib2)
9487 (name "python2-pathlib2-bootstrap")
9489 `(("python2-scandir" ,python2-scandir)
9490 ("python2-six" ,python2-six-bootstrap))))))
9492 (define-public python-jellyfish
9494 (name "python-jellyfish")
9498 (uri (pypi-uri "jellyfish" version))
9501 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9502 (build-system python-build-system)
9504 `(("python-pytest" ,python-pytest)))
9505 (home-page "https://github.com/jamesturk/jellyfish")
9506 (synopsis "Approximate and phonetic matching of strings")
9507 (description "Jellyfish uses a variety of string comparison and phonetic
9508 encoding algorithms to do fuzzy string matching.")
9509 (license license:bsd-2)
9510 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9512 (define-public python2-jellyfish
9513 (let ((jellyfish (package-with-python2
9514 (strip-python2-variant python-jellyfish))))
9515 (package (inherit jellyfish)
9516 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9517 ,@(package-native-inputs jellyfish))))))
9519 (define-public python2-unicodecsv
9521 (name "python2-unicodecsv")
9525 ;; The test suite is not included in the PyPi release.
9526 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9527 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9528 "archive/" version ".tar.gz"))
9529 (file-name (string-append name "-" version ".tar.gz"))
9532 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9533 (build-system python-build-system)
9535 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9536 #:python ,python-2))
9538 `(("python2-unittest2" ,python2-unittest2)))
9539 (home-page "https://github.com/jdunck/python-unicodecsv")
9540 (synopsis "Unicode CSV module for Python 2")
9541 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9542 module, adding support for Unicode strings.")
9543 (license license:bsd-2)))
9545 (define-public python-rarfile
9547 (name "python-rarfile")
9551 (uri (pypi-uri "rarfile" version))
9554 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9555 (build-system python-build-system)
9558 (modify-phases %standard-phases
9560 ;; Many tests fail, but the installation proceeds.
9561 (lambda _ (invoke "make" "-C" "test" "test"))))))
9563 `(("which" ,which))) ; required for tests
9565 `(("libarchive" ,libarchive)))
9566 (home-page "https://github.com/markokr/rarfile")
9567 (synopsis "RAR archive reader for Python")
9568 (description "This is Python module for RAR archive reading. The interface
9569 is made as zipfile like as possible.")
9570 (license license:isc)))
9572 (define-public python2-rarfile
9573 (package-with-python2 python-rarfile))
9575 (define-public python-magic
9577 (name "python-magic")
9582 (uri (pypi-uri "python-magic" version))
9585 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9586 (file-name (string-append name "-" version "-checkout"))))
9587 (build-system python-build-system)
9589 ;; The tests are unreliable, so don't run them. The tests fail
9590 ;; under Python3 because they were written for Python2 and
9591 ;; contain import statements that do not work in Python3. One of
9592 ;; the tests fails under Python2 because its assertions are
9593 ;; overly stringent; it relies on comparing output strings which
9594 ;; are brittle and can change depending on the version of
9595 ;; libmagic being used and the system on which the test is
9596 ;; running. In my case, under GuixSD 0.10.0, only one test
9597 ;; failed, and it seems to have failed only because the version
9598 ;; of libmagic that is packaged in Guix outputs a slightly
9599 ;; different (but not wrong) string than the one that the test
9602 #:phases (modify-phases %standard-phases
9603 ;; Replace a specific method call with a hard-coded
9604 ;; path to the necessary libmagic.so file in the
9605 ;; store. If we don't do this, then the method call
9606 ;; will fail to find the libmagic.so file, which in
9607 ;; turn will cause any application using
9608 ;; python-magic to fail.
9609 (add-before 'build 'hard-code-path-to-libmagic
9610 (lambda* (#:key inputs #:allow-other-keys)
9611 (let ((file (assoc-ref inputs "file")))
9612 (substitute* "magic.py"
9613 (("ctypes.util.find_library\\('magic'\\)")
9614 (string-append "'" file "/lib/libmagic.so'")))
9616 (add-before 'install 'disable-egg-compression
9618 (let ((port (open-file "setup.cfg" "a")))
9619 (display "\n[easy_install]\nzip_ok = 0\n"
9624 ;; python-magic needs to be able to find libmagic.so.
9627 "https://github.com/ahupp/python-magic")
9629 "File type identification using libmagic")
9631 "This module uses ctypes to access the libmagic file type
9632 identification library. It makes use of the local magic database and
9633 supports both textual and MIME-type output. Note that this module and
9634 the python-file module both provide a \"magic.py\" file; these two
9635 modules, which are different and were developed separately, both serve
9636 the same purpose: to provide Python bindings for libmagic.")
9637 (license license:expat)))
9639 (define-public python2-magic
9640 (package-with-python2 python-magic))
9642 (define-public python2-s3cmd
9644 (name "python2-s3cmd")
9649 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9650 "s3cmd-" version ".tar.gz"))
9653 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9654 (build-system python-build-system)
9656 ;; s3cmd is written for python2 only and contains no tests.
9657 `(#:python ,python-2
9660 `(("python2-dateutil" ,python2-dateutil)
9661 ;; The python-file package also provides a magic.py module.
9662 ;; This is an unfortunate state of affairs; however, s3cmd
9663 ;; fails to install if it cannot find specifically the
9664 ;; python-magic package. Thus we include it, instead of using
9665 ;; python-file. Ironically, s3cmd sometimes works better
9666 ;; without libmagic bindings at all:
9667 ;; https://github.com/s3tools/s3cmd/issues/198
9668 ("python2-magic" ,python2-magic)))
9669 (home-page "http://s3tools.org/s3cmd")
9670 (synopsis "Command line tool for S3-compatible storage services")
9672 "S3cmd is a command line tool for uploading, retrieving and managing data
9673 in storage services that are compatible with the Amazon Simple Storage
9674 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9675 GnuPG encryption, and more. It also supports management of Amazon's
9676 CloudFront content delivery network.")
9677 (license license:gpl2+)))
9679 (define-public python-pkgconfig
9681 (name "python-pkgconfig")
9686 (uri (pypi-uri "pkgconfig" version))
9689 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9690 (build-system python-build-system)
9692 `(("python-nose" ,python-nose)))
9694 `(("pkg-config" ,pkg-config)))
9697 (modify-phases %standard-phases
9698 (add-before 'build 'patch
9699 ;; Hard-code the path to pkg-config.
9701 (substitute* "pkgconfig/pkgconfig.py"
9702 (("cmd = 'pkg-config")
9703 (string-append "cmd = '" (which "pkg-config"))))
9707 (invoke "nosetests" "test.py"))))))
9708 (home-page "https://github.com/matze/pkgconfig")
9709 (synopsis "Python interface for pkg-config")
9710 (description "This module provides a Python interface to pkg-config. It
9711 can be used to find all pkg-config packages, check if a package exists,
9712 check if a package meets certain version requirements, query CFLAGS and
9713 LDFLAGS and parse the output to build extensions with setup.py.")
9714 (license license:expat)))
9716 (define-public python2-pkgconfig
9717 (package-with-python2 python-pkgconfig))
9719 (define-public python-bz2file
9721 (name "python-bz2file")
9726 (uri (pypi-uri "bz2file" version))
9729 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9730 (build-system python-build-system)
9732 `(#:tests? #f)) ; Tests use deprecated python modules.
9733 (home-page "https://github.com/nvawda/bz2file")
9734 (synopsis "Read and write bzip2-compressed files")
9736 "Bz2file is a Python library for reading and writing bzip2-compressed
9737 files. It contains a drop-in replacement for the I/O interface in the
9738 standard library's @code{bz2} module, including features from the latest
9739 development version of CPython that are not available in older releases.")
9740 (license license:asl2.0)))
9742 (define-public python2-bz2file
9743 (package-with-python2 python-bz2file))
9745 (define-public python-future
9747 (name "python-future")
9752 (uri (pypi-uri "future" version))
9755 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9756 (build-system python-build-system)
9757 ;; Many tests connect to the network or are otherwise flawed.
9758 ;; https://github.com/PythonCharmers/python-future/issues/210
9761 (home-page "http://python-future.org")
9762 (synopsis "Single-source support for Python 3 and 2")
9764 "@code{python-future} is the missing compatibility layer between Python 2 and
9765 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9766 to support both Python 2 and Python 3 with minimal overhead.")
9767 (license license:expat)))
9769 (define-public python2-future
9770 (package-with-python2 python-future))
9772 (define-public python-cysignals
9774 (name "python-cysignals")
9779 (uri (pypi-uri "cysignals" version))
9782 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9783 (build-system python-build-system)
9785 `(("python-cython" ,python-cython)
9786 ("python-sphinx" ,python-sphinx)))
9788 `(("pari-gp" ,pari-gp)))
9790 `(#:modules ((guix build python-build-system)
9791 ((guix build gnu-build-system) #:prefix gnu:)
9793 ;; FIXME: Tests are executed after installation and currently fail
9794 ;; when not installing into standard locations; the author is working
9798 (modify-phases %standard-phases
9801 (assoc-ref gnu:%standard-phases 'configure)))))
9803 "https://github.com/sagemath/cysignals")
9805 "Handling of interrupts and signals for Cython")
9807 "The cysignals package provides mechanisms to handle interrupts (and
9808 other signals and errors) in Cython code, using two related approaches,
9809 for mixed Cython/Python code or external C libraries and pure Cython code,
9811 (license license:lgpl3+)))
9813 (define-public python2-cysignals
9814 (package-with-python2 python-cysignals))
9816 (define-public python2-shedskin
9818 (name "python2-shedskin")
9823 (uri (string-append "https://github.com/shedskin/shedskin/"
9824 "releases/download/v" version
9825 "/shedskin-" version ".tgz"))
9828 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9829 (build-system python-build-system)
9831 `(#:python ,python-2
9832 #:phases (modify-phases %standard-phases
9833 (add-after 'unpack 'fix-resulting-include-libs
9834 (lambda* (#:key inputs #:allow-other-keys)
9835 (let ((libgc (assoc-ref inputs "libgc"))
9836 (pcre (assoc-ref inputs "pcre")))
9837 (substitute* "shedskin/makefile.py"
9838 (("variable == 'CCFLAGS':[ ]*")
9839 (string-append "variable == 'CCFLAGS':\n"
9840 " line += ' -I " pcre "/include"
9841 " -I " libgc "/include'"))
9842 (("variable == 'LFLAGS':[ ]*")
9843 (string-append "variable == 'LFLAGS':\n"
9844 " line += ' -L" pcre "/lib"
9845 " -L " libgc "/lib'")))
9847 (inputs `(("pcre" ,pcre)
9849 (home-page "https://shedskin.github.io/")
9850 (synopsis "Experimental Python-2 to C++ Compiler")
9851 (description (string-append "This is an experimental compiler for a subset of
9852 Python. It generates C++ code and a Makefile."))
9853 (license (list license:gpl3 license:bsd-3 license:expat))))
9855 (define-public python2-rope
9857 (name "python2-rope")
9862 (uri (pypi-uri "rope" version))
9865 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9867 ;; Rope has only partial python3 support, see `python-rope'
9868 `(#:python ,python-2))
9869 (build-system python-build-system)
9871 `(("python2-unittest2" ,python2-unittest2)))
9872 (home-page "https://github.com/python-rope/rope")
9873 (synopsis "Refactoring library for Python")
9874 (description "Rope is a refactoring library for Python. It facilitates
9875 the renaming, moving and extracting of attributes, functions, modules, fields
9876 and parameters in Python 2 source code. These refactorings can also be applied
9877 to occurrences in strings and comments.")
9878 (license license:gpl2)))
9880 (define-public python-rope
9882 (inherit python2-rope)
9883 (name "python-rope")
9884 (arguments `(#:python ,python-wrapper
9885 ;; XXX: Only partial python3 support, results in some failing
9886 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9888 (properties `((python2-variant . ,(delay python2-rope))))))
9890 (define-public python-py3status
9892 (name "python-py3status")
9897 (uri (pypi-uri "py3status" version))
9899 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9900 (build-system python-build-system)
9905 (modify-phases %standard-phases
9906 ;; 'file' is used for detection of configuration file encoding
9907 ;; let's make link the dependency to particular input
9908 (add-before 'build 'patch-file-path
9909 (lambda* (#:key inputs #:allow-other-keys)
9910 (let ((file-path (assoc-ref inputs "file")))
9911 (substitute* "py3status/parse_config.py"
9912 (("\\['file', '-b'")
9913 (string-append "['" file-path "/bin/file', '-b'")))
9915 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9916 (home-page "https://github.com/ultrabug/py3status")
9917 (synopsis "Extensible i3status wrapper written in Python")
9918 (description "py3status is an i3status wrapper which extends i3status
9919 functionality in a modular way, allowing you to extend your panel with your
9920 own code, responding to click events and updating clock every second.")
9921 (license license:bsd-3)))
9923 (define-public python-tblib
9925 (name "python-tblib")
9929 (uri (pypi-uri "tblib" version))
9931 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9932 (build-system python-build-system)
9935 (modify-phases %standard-phases
9936 (add-before 'check 'adjust-tests
9938 (when (which "python3")
9939 ;; Adjust the example output to match that of Python 3.7:
9940 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9941 (substitute* "README.rst"
9942 (("Exception\\('fail',") "Exception('fail'"))
9946 ;; Upstream runs tests after installation and the package itself
9947 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9949 (setenv "PYTHONPATH"
9950 (string-append (getcwd) "/build/lib:"
9951 (getenv "PYTHONPATH")))
9952 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9954 `(("python-pytest" ,python-pytest)
9955 ("python-six" ,python-six)))
9956 (home-page "https://github.com/ionelmc/python-tblib")
9957 (synopsis "Traceback serialization library")
9959 "Traceback serialization allows you to:
9962 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9963 different processes. This allows better error handling when running code over
9964 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9966 @item Parse traceback strings and raise with the parsed tracebacks.
9968 (license license:bsd-3)))
9970 (define-public python2-tblib
9971 (package-with-python2 python-tblib))
9973 (define-public python-greenlet
9975 (name "python-greenlet")
9979 (uri (pypi-uri "greenlet" version))
9982 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9983 (build-system python-build-system)
9984 (home-page "https://greenlet.readthedocs.io/")
9985 (synopsis "Lightweight in-process concurrent programming")
9987 "Greenlet package is a spin-off of Stackless, a version of CPython
9988 that supports micro-threads called \"tasklets\". Tasklets run
9989 pseudo-concurrently (typically in a single or a few OS-level threads) and
9990 are synchronized with data exchanges on \"channels\".")
9991 (license (list license:psfl license:expat))))
9993 (define-public python2-greenlet
9994 (package-with-python2 python-greenlet))
9996 (define-public python-objgraph
9998 (name "python-objgraph")
10003 (uri (pypi-uri "objgraph" version))
10006 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10007 (build-system python-build-system)
10009 `(("python-graphviz" ,python-graphviz)))
10011 `(("python-mock" ,python-mock)
10012 ("graphviz" ,graphviz)))
10013 (home-page "https://mg.pov.lt/objgraph/")
10014 (synopsis "Draw Python object reference graphs with graphviz")
10016 "This package provides tools to draw Python object reference graphs with
10018 (license license:expat)))
10020 (define-public python-gevent
10022 (name "python-gevent")
10026 (uri (pypi-uri "gevent" version))
10029 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10030 (modules '((guix build utils)))
10033 ;; unbunding libev and c-ares
10034 (delete-file-recursively "deps")
10036 (build-system python-build-system)
10038 `(#:modules ((ice-9 ftw)
10042 (guix build python-build-system))
10043 #:phases (modify-phases %standard-phases
10044 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10046 (substitute* "src/gevent/subprocess.py"
10047 (("/bin/sh") (which "sh")))
10048 (for-each (lambda (file)
10050 (("/bin/sh") (which "sh"))
10051 (("/bin/true") (which "true"))))
10052 (find-files "src/greentest" "\\.py$"))
10054 (add-before 'build 'do-not-use-bundled-sources
10055 (lambda* (#:key inputs #:allow-other-keys)
10056 (setenv "CONFIG_SHELL" (which "bash"))
10057 (setenv "LIBEV_EMBED" "false")
10058 (setenv "CARES_EMBED" "false")
10059 (setenv "EMBED" "false")
10061 ;; Prevent building bundled libev.
10062 (substitute* "setup.py"
10063 (("run_make=_BUILDING")
10066 (let ((greenlet (string-append
10067 (assoc-ref inputs "python-greenlet")
10069 (match (scandir greenlet
10071 (string-prefix? "python" item)))
10073 (setenv "C_INCLUDE_PATH"
10074 (string-append greenlet "/" python)))))
10076 (add-before 'check 'skip-timer-test
10078 ;; XXX: Skip 'TestTimerResolution', which appears to be
10080 (substitute* "src/greentest/test__core_timer.py"
10081 (("not greentest.RUNNING_ON_CI") "False"))
10085 ;; Make sure the build directory is on PYTHONPATH.
10086 (setenv "PYTHONPATH"
10088 (getenv "PYTHONPATH") ":"
10090 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10091 (with-directory-excursion "src/greentest"
10092 ;; XXX: Many tests require network access. Instead we only
10093 ;; run known-good tests. Unfortunately we cannot use
10094 ;; recursion here since this directory also contains
10095 ;; Python-version-specific subfolders.
10096 (apply invoke "python" "testrunner.py" "--config"
10097 "known_failures.py"
10098 (scandir "." (cut regexp-exec
10099 (make-regexp "test_+(subprocess|core)")
10102 `(("python-greenlet" ,python-greenlet)
10103 ("python-objgraph" ,python-objgraph)))
10105 `(("python-six" ,python-six)))
10107 `(("c-ares" ,c-ares)
10109 (home-page "http://www.gevent.org/")
10110 (synopsis "Coroutine-based network library")
10112 "gevent is a coroutine-based Python networking library that uses greenlet
10113 to provide a high-level synchronous API on top of the libev event loop.")
10114 (license license:expat)
10115 (properties `((python2-variant . ,(delay python2-gevent))))))
10117 (define-public python2-gevent
10118 (let ((base (package-with-python2
10119 (strip-python2-variant python-gevent))))
10122 (native-inputs `(,@(package-native-inputs python-gevent)
10123 ("python-mock" ,python2-mock))))))
10125 (define-public python-fastimport
10127 (name "python-fastimport")
10132 (uri (pypi-uri "fastimport" version))
10134 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10135 (build-system python-build-system)
10136 (home-page "https://github.com/jelmer/python-fastimport")
10137 (synopsis "VCS fastimport parser and generator in Python")
10138 (description "This package provides a parser for and generator of the Git
10139 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10141 (license license:gpl2+)))
10143 (define-public python2-fastimport
10144 (package-with-python2 python-fastimport))
10146 (define-public python-twisted
10148 (name "python-twisted")
10152 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10155 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10156 (build-system python-build-system)
10158 '(#:tests? #f)) ; FIXME: some tests fail
10160 `(("python-zope-interface" ,python-zope-interface)
10161 ("python-pyhamcrest" ,python-pyhamcrest)
10162 ("python-incremental" ,python-incremental)
10163 ("python-hyperlink" ,python-hyperlink)
10164 ("python-constantly" ,python-constantly)
10165 ("python-automat" ,python-automat)))
10166 (home-page "https://twistedmatrix.com/")
10167 (synopsis "Asynchronous networking framework written in Python")
10169 "Twisted is an extensible framework for Python programming, with special
10170 focus on event-based network programming and multiprotocol integration.")
10171 (license license:expat)))
10173 (define-public python2-twisted
10174 (package-with-python2 python-twisted))
10176 (define-public python-pika
10178 (name "python-pika")
10183 (uri (pypi-uri "pika" version))
10186 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10187 (build-system python-build-system)
10189 `(("python-pyev" ,python-pyev)
10190 ("python-tornado" ,python-tornado)
10191 ("python-twisted" ,python-twisted)))
10192 (home-page "https://pika.readthedocs.org")
10193 (synopsis "Pure Python AMQP Client Library")
10195 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10196 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10197 network support library.")
10198 (license license:bsd-3)))
10200 (define-public python2-pika
10201 (package-with-python2 python-pika))
10203 (define-public python-ply
10205 (name "python-ply")
10210 (uri (pypi-uri "ply" version))
10213 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10214 (build-system python-build-system)
10215 (home-page "http://www.dabeaz.com/ply/")
10216 (synopsis "Python Lex & Yacc")
10217 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10218 It uses LR parsing and does extensive error checking.")
10219 (license license:bsd-3)))
10221 (define-public python2-ply
10222 (package-with-python2 python-ply))
10224 (define-public python-tabulate
10226 (name "python-tabulate")
10230 (uri (pypi-uri "tabulate" version))
10233 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10234 (build-system python-build-system)
10236 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10237 ;; and the latest release is not tagged in the upstream repository.
10239 (home-page "https://bitbucket.org/astanin/python-tabulate")
10240 (synopsis "Pretty-print tabular data")
10242 "Tabulate is a library and command-line utility to pretty-print tabular
10244 (license license:expat)))
10246 (define-public python2-tabulate
10247 (package-with-python2 python-tabulate))
10249 (define-public python-kazoo
10251 (name "python-kazoo")
10256 (uri (pypi-uri "kazoo" version))
10259 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10260 (build-system python-build-system)
10261 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10263 `(("python-six" ,python-six)))
10264 (home-page "https://kazoo.readthedocs.org")
10265 (synopsis "High-level Zookeeper client library")
10267 "Kazoo is a Python client library for the Apache Zookeeper distributed
10268 application service. It is designed to be easy to use and to avoid common
10269 programming errors.")
10270 (license license:asl2.0)))
10272 (define-public python2-kazoo
10273 (package-with-python2 python-kazoo))
10275 (define-public python-pykafka
10277 (name "python-pykafka")
10281 (uri (pypi-uri "pykafka" version))
10284 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10285 (build-system python-build-system)
10286 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10288 `(("python-gevent" ,python-gevent)
10289 ("python-kazoo" ,python-kazoo)
10290 ("python-tabulate" ,python-tabulate)))
10292 `(("librdkafka" ,librdkafka)))
10293 (home-page "https://pykafka.readthedocs.io/")
10294 (synopsis "Apache Kafka client for Python")
10296 "PyKafka is a client for the Apache Kafka distributed messaging system.
10297 It includes Python implementations of Kafka producers and consumers, which
10298 are optionally backed by a C extension built on librdkafka.")
10299 (license license:asl2.0)))
10301 (define-public python2-pykafka
10302 (package-with-python2 python-pykafka))
10304 (define-public python-wcwidth
10306 (name "python-wcwidth")
10311 (uri (pypi-uri "wcwidth" version))
10314 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10315 (build-system python-build-system)
10316 (home-page "https://github.com/jquast/wcwidth")
10317 (synopsis "Measure number of terminal column cells of wide-character codes")
10318 (description "Wcwidth measures the number of terminal column cells of
10319 wide-character codes. It is useful for those implementing a terminal emulator,
10320 or programs that carefully produce output to be interpreted by one. It is a
10321 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10322 specified in POSIX.1-2001 and POSIX.1-2008.")
10323 (license license:expat)))
10325 (define-public python2-wcwidth
10326 (package-with-python2 python-wcwidth))
10328 (define-public python2-jsonrpclib
10330 (name "python2-jsonrpclib")
10334 (uri (pypi-uri "jsonrpclib" version))
10337 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10338 (build-system python-build-system)
10341 #:python ,python-2))
10342 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10343 (synopsis "Implementation of JSON-RPC specification for Python")
10345 "This library is an implementation of the JSON-RPC specification.
10346 It supports both the original 1.0 specification, as well as the
10347 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10349 (license license:asl2.0)))
10351 (define-public python-chai
10353 (name "python-chai")
10357 (uri (pypi-uri "chai" version))
10360 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10361 (build-system python-build-system)
10362 (home-page "https://github.com/agoragames/chai")
10363 (synopsis "Mocking framework for Python")
10365 "Chai provides an api for mocking, stubbing and spying your python
10366 objects, patterned after the Mocha library for Ruby.")
10367 (license license:bsd-3)))
10369 (define-public python2-chai
10370 (package-with-python2 python-chai))
10372 (define-public python-inflection
10374 (name "python-inflection")
10377 (origin (method url-fetch)
10378 (uri (pypi-uri "inflection" version))
10381 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10382 (build-system python-build-system)
10384 `(("python-pytest" ,python-pytest)))
10385 (home-page "https://github.com/jpvanhal/inflection")
10386 (synopsis "Python string transformation library")
10388 "Inflection is a string transformation library. It singularizes
10389 and pluralizes English words, and transforms strings from CamelCase to
10390 underscored string.")
10391 (license license:expat)))
10393 (define-public python2-inflection
10394 (package-with-python2 python-inflection))
10396 (define-public python-pylev
10398 (name "python-pylev")
10402 (uri (pypi-uri "pylev" version))
10405 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10406 (build-system python-build-system)
10407 (home-page "https://github.com/toastdriven/pylev")
10408 (synopsis "Levenshtein distance implementation in Python")
10409 (description "Pure Python Levenshtein implementation, based off the
10410 Wikipedia code samples at
10411 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10412 (license license:bsd-3)))
10414 (define-public python2-pylev
10415 (package-with-python2 python-pylev))
10417 (define-public python-cleo
10419 (name "python-cleo")
10423 (uri (pypi-uri "cleo" version))
10426 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10427 (build-system python-build-system)
10430 ("python-mock" ,python-mock)
10431 ("python-pytest-mock" ,python-pytest-mock)
10432 ("python-pytest" ,python-pytest)))
10434 `(("python-backpack" ,python-backpack)
10435 ("python-pastel" ,python-pastel)
10436 ("python-pylev" ,python-pylev)))
10437 (home-page "https://github.com/sdispater/cleo")
10438 (synopsis "Command-line arguments library for Python")
10440 "Cleo allows you to create command-line commands with signature in
10441 docstring and colored output.")
10442 (license license:expat)))
10444 (define-public python2-cleo
10445 (package-with-python2 python-cleo))
10447 (define-public python-tomlkit
10449 (name "python-tomlkit")
10454 (uri (pypi-uri "tomlkit" version))
10457 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10458 (build-system python-build-system)
10460 `(("python-pytest" ,python-pytest)))
10462 "https://github.com/sdispater/tomlkit")
10463 (synopsis "Style preserving TOML library")
10465 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10466 preserves all comments, indentations, whitespace and internal element ordering,
10467 and makes them accessible and editable via an intuitive API. It can also
10468 create new TOML documents from scratch using the provided helpers. Part of the
10469 implementation as been adapted, improved and fixed from Molten.")
10470 (license license:expat)))
10472 (define-public python-shellingham
10474 (name "python-shellingham")
10479 (uri (pypi-uri "shellingham" version))
10482 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10483 (build-system python-build-system)
10485 "https://github.com/sarugaku/shellingham")
10486 (synopsis "Tool to detect surrounding shell")
10488 "Shellingham detects what shell the current Python executable is
10490 (license license:isc)))
10492 (define-public python-memcached
10494 (name "python-memcached")
10499 (uri (pypi-uri "python-memcached" version))
10502 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10503 (build-system python-build-system)
10504 (propagated-inputs `(("python-six" ,python-six)))
10506 "https://github.com/linsomniac/python-memcached")
10507 (synopsis "Pure python memcached client")
10509 "This software is a pure Python interface to the memcached memory cache
10510 daemon. It is the client side software which allows storing values in one or
10511 more, possibly remote, memcached servers.")
10512 (license license:psfl)))
10514 (define-public python-clikit
10516 (name "python-clikit")
10521 (uri (pypi-uri "clikit" version))
10524 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10525 (build-system python-build-system)
10527 `(("python-pastel" ,python-pastel)
10528 ("python-pylev" ,python-pylev)))
10529 (home-page "https://github.com/sdispater/clikit")
10530 (synopsis "Group of utilities to build command line interfaces")
10532 "CliKit is a group of utilities to build testable command line
10534 (license license:expat)))
10536 (define-public python-msgpack-python
10538 (name "python-msgpack-python")
10543 (uri (pypi-uri "msgpack-python" version))
10546 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10547 (build-system python-build-system)
10548 (home-page "http://msgpack.org/")
10549 (synopsis "Package to deserialize messages in MessagePack binary format")
10551 "MessagePack is an efficient binary serialization format. It lets you
10552 exchange data among multiple languages like JSON. But it's faster and
10553 smaller. Small integers are encoded into a single byte, and typical short
10554 strings require only one extra byte in addition to the strings themselves.")
10555 (license license:asl2.0)))
10557 (define-public python-cachy
10559 (name "python-cachy")
10564 (uri (pypi-uri "cachy" version))
10567 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10568 (build-system python-build-system)
10570 `(("python-fakeredis" ,python-fakeredis)
10571 ("python-flexmock" ,python-flexmock)
10572 ("python-pytest" ,python-pytest)))
10574 `(("python-memcached" ,python-memcached)
10575 ("python-msgpack-python" ,python-msgpack-python)
10576 ("python-redis" ,python-redis)))
10577 (home-page "https://github.com/sdispater/cachy")
10578 (synopsis "Simple yet effective caching library")
10580 "Cachy provides a simple yet effective caching library. A simple but
10581 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10582 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10583 (license license:expat)))
10585 (define-public poetry
10588 (version "0.12.17")
10589 ;; Poetry can only be built from source with poetry.
10593 (uri (pypi-uri "poetry" version))
10596 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10597 (build-system python-build-system)
10599 `(#:tests? #f ;; Pypi does not have tests.
10601 (modify-phases %standard-phases
10604 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10605 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10609 `(("python-cachecontrol" ,python-cachecontrol)
10610 ("python-cachy" ,python-cachy)
10611 ("python-cleo" ,python-cleo)
10612 ("python-glob2" ,python-glob2)
10613 ("python-html5lib" ,python-html5lib)
10614 ("python-jsonschema" ,python-jsonschema)
10615 ("python-msgpack" ,python-msgpack)
10616 ("python-pathlib2" ,python-pathlib2)
10617 ("python-pkginfo" ,python-pkginfo)
10618 ("python-pyparsing" ,python-pyparsing)
10619 ("python-pyrsistent" ,python-pyrsistent)
10620 ("python-requests" ,python-requests)
10621 ("python-requests-toolbelt" ,python-requests-toolbelt)
10622 ("python-shellingham" ,python-shellingham)
10623 ("python-tomlkit" ,python-tomlkit)
10624 ("python-virtualenv" ,python-virtualenv)))
10625 (home-page "https://poetry.eustace.io/")
10626 (synopsis "Python dependency management and packaging made easy")
10627 (description "Poetry is a tool for dependency management and packaging
10628 in Python. It allows you to declare the libraries your project depends on and
10629 it will manage (install/update) them for you.")
10630 (license license:expat)))
10632 (define-public python-lazy-object-proxy
10634 (name "python-lazy-object-proxy")
10638 (uri (pypi-uri "lazy-object-proxy" version))
10641 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10643 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10644 (build-system python-build-system)
10645 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10646 (synopsis "Lazy object proxy for python")
10648 "Lazy object proxy is an object that wraps a callable but defers the call
10649 until the object is actually required, and caches the result of said call.")
10650 (license license:bsd-2)))
10652 (define-public python2-lazy-object-proxy
10653 (package-with-python2 python-lazy-object-proxy))
10655 (define-public python-dnspython
10657 (name "python-dnspython")
10661 (uri (string-append "http://www.dnspython.org/kits/"
10662 version "/dnspython-" version ".tar.gz"))
10665 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10666 (build-system python-build-system)
10667 (arguments '(#:tests? #f)) ; XXX: requires internet access
10668 (home-page "http://www.dnspython.org")
10669 (synopsis "DNS toolkit for Python")
10671 "dnspython is a DNS toolkit for Python. It supports almost all record
10672 types. It can be used for queries, zone transfers, and dynamic updates.
10673 It supports TSIG authenticated messages and EDNS0.")
10674 (license license:expat)))
10676 (define-public python2-dnspython
10677 (package-with-python2 python-dnspython))
10679 (define-public python-email-validator
10681 (name "python-email-validator")
10684 (origin (method url-fetch)
10685 (uri (pypi-uri "email_validator" version))
10688 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10689 (build-system python-build-system)
10692 (modify-phases %standard-phases
10693 (add-before 'build 'use-dnspython
10695 (substitute* "setup.py"
10696 (("dnspython3") "dnspython"))
10699 `(("python-dnspython" ,python-dnspython)
10700 ("python-idna" ,python-idna)))
10701 (home-page "https://github.com/JoshData/python-email-validator")
10702 (synopsis "Email address validation library for Python")
10704 "This library validates email address syntax and deliverability.")
10705 (license license:cc0)))
10707 (define-public python2-email-validator
10708 (package-with-python2 python-email-validator))
10710 (define-public python-ukpostcodeparser
10712 (name "python-ukpostcodeparser")
10716 (uri (pypi-uri "UkPostcodeParser" version))
10719 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10720 (build-system python-build-system)
10721 (home-page "https://github.com/hamstah/ukpostcodeparser")
10722 (synopsis "UK Postcode parser for Python")
10724 "This library provides the @code{parse_uk_postcode} function for
10725 parsing UK postcodes.")
10726 (license license:expat)))
10728 (define-public python2-ukpostcodeparser
10729 (package-with-python2 python-ukpostcodeparser))
10731 (define-public python-faker
10733 (name "python-faker")
10737 (uri (pypi-uri "Faker" version))
10740 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10742 (search-patches "python-faker-fix-build-32bit.patch"))
10743 (modules '((guix build utils)))
10746 (for-each delete-file (find-files "." "\\.pyc$"))
10748 (build-system python-build-system)
10751 (modify-phases %standard-phases
10753 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10756 ("python-email-validator" ,python-email-validator)
10757 ("python-mock" ,python-mock)
10758 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10760 `(("python-dateutil" ,python-dateutil)
10761 ("python-six" ,python-six)))
10762 (home-page "https://github.com/joke2k/faker")
10763 (synopsis "Python package that generates fake data")
10765 "Faker is a Python package that generates fake data such as names,
10766 addresses, and phone numbers.")
10767 (license license:expat)
10768 (properties `((python2-variant . ,(delay python2-faker))))))
10770 (define-public python2-faker
10771 (let ((base (package-with-python2 (strip-python2-variant
10776 `(("python2-ipaddress" ,python2-ipaddress)
10777 ,@(package-propagated-inputs base))))))
10779 (define-public python-pyaml
10781 (name "python-pyaml")
10782 (version "18.11.0")
10785 (uri (pypi-uri "pyaml" version))
10788 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10789 (build-system python-build-system)
10791 `(("python-unidecode" ,python-unidecode)))
10793 `(("python-pyyaml" ,python-pyyaml)))
10794 (home-page "https://github.com/mk-fg/pretty-yaml")
10795 (synopsis "YAML pretty-print library for Python")
10797 "pyaml is a PyYAML based python module to produce pretty and readable
10798 YAML-serialized data.")
10799 (license license:wtfpl2)))
10801 (define-public python2-pyaml
10802 (package-with-python2 python-pyaml))
10804 (define-public python-backpack
10806 (name "python-backpack")
10811 (uri (pypi-uri "backpack" version))
10814 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10815 (build-system python-build-system)
10817 `(("python-pytest" ,python-pytest)
10818 ("python-nose" ,python-nose)))
10820 `(("python-simplejson" ,python-simplejson)))
10821 (home-page "https://github.com/sdispater/backpack")
10822 (synopsis "Utilities for working with Python collections")
10823 (description "Backpack provides some useful utilities for working with
10824 collections of data.")
10825 (license license:expat)))
10827 (define-public python2-backpack
10828 (package-with-python2 python-backpack))
10830 (define-public python-prompt-toolkit
10832 (name "python-prompt-toolkit")
10837 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10840 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10841 (build-system python-build-system)
10844 (modify-phases %standard-phases
10846 (add-after 'install 'post-install-check
10847 (lambda* (#:key inputs outputs #:allow-other-keys)
10848 ;; HOME is needed for the test
10849 ;; "test_pathcompleter_can_expanduser".
10850 (setenv "HOME" "/tmp")
10851 (add-installed-pythonpath inputs outputs)
10852 (invoke "py.test"))))))
10854 `(("python-wcwidth" ,python-wcwidth)
10855 ("python-six" ,python-six)
10856 ("python-pygments" ,python-pygments)))
10858 `(("python-pytest" ,python-pytest)))
10859 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10860 (synopsis "Library for building command line interfaces in Python")
10862 "Prompt-Toolkit is a library for building interactive command line
10863 interfaces in Python. It's like GNU Readline but it also features syntax
10864 highlighting while typing, out-of-the-box multi-line input editing, advanced
10865 code completion, incremental search, support for Chinese double-width
10866 characters, mouse support, and auto suggestions.")
10867 (license license:bsd-3)))
10869 (define-public python2-prompt-toolkit
10870 (package-with-python2 python-prompt-toolkit))
10872 (define-public python-prompt-toolkit-1
10873 (package (inherit python-prompt-toolkit)
10878 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10881 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10883 (define-public python2-prompt-toolkit-1
10884 (package-with-python2 python-prompt-toolkit-1))
10886 (define-public python-jedi
10888 (name "python-jedi")
10893 (uri (pypi-uri "jedi" version))
10896 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10897 (build-system python-build-system)
10900 (modify-phases %standard-phases
10901 (add-after 'unpack 'disable-file-completion-test
10902 ;; A single parameterized test currently fail (see:
10903 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10905 (substitute* "test/test_api/test_completion.py"
10906 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10910 (setenv "HOME" "/tmp")
10911 (invoke "python" "-m" "pytest"))))))
10913 `(("python-pytest" ,python-pytest)
10914 ("python-docopt" ,python-docopt)))
10916 `(("python-parso" ,python-parso)))
10917 (home-page "https://github.com/davidhalter/jedi")
10918 (synopsis "Autocompletion and static analysis library for Python")
10920 "Jedi is a static analysis tool for Python that can be used in Integrated
10921 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10922 on a deeper level than many other static analysis frameworks for Python.
10924 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10926 (license license:expat)))
10928 (define-public python2-jedi
10929 (package-with-python2 python-jedi))
10931 (define-public ptpython
10937 (uri (pypi-uri "ptpython" version))
10940 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10941 (build-system python-build-system)
10943 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10945 `(("python-docopt" ,python-docopt)
10946 ("python-jedi" ,python-jedi)
10947 ("python-prompt-toolkit" ,python-prompt-toolkit)
10948 ("python-pygments" ,python-pygments)))
10949 (home-page "https://github.com/jonathanslenders/ptpython")
10950 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10952 "ptpython is a Python read-eval-print loop with IDE-like features.
10953 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10954 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10956 (license license:bsd-3)
10957 (properties `((python2-variant . ,(delay ptpython-2))))))
10959 (define-public ptpython-2
10960 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10963 (name "ptpython2"))))
10965 (define-public python-stem
10967 (name "python-stem")
10972 (uri (pypi-uri "stem" version))
10975 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10976 (build-system python-build-system)
10979 (modify-phases %standard-phases
10982 (invoke "./run_tests.py" "--unit")
10985 `(("python-mock" ,python-mock)
10986 ("python-pycodestyle" ,python-pycodestyle)
10987 ("python-pyflakes" ,python-pyflakes)))
10988 (home-page "https://stem.torproject.org/")
10990 "Python controller library that allows applications to interact with Tor")
10992 "Stem is a Python controller library for Tor. With it you can use Tor's
10993 control protocol to script against the Tor process and read descriptor data
10994 relays publish about themselves.")
10995 (license license:lgpl3)))
10997 (define-public python2-stem
10998 (package-with-python2 python-stem))
11000 (define-public python-pyserial
11002 (name "python-pyserial")
11007 (uri (pypi-uri "pyserial" version))
11010 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11011 (build-system python-build-system)
11013 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11015 ;; (modify-phases %standard-phases
11018 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11020 "https://github.com/pyserial/pyserial")
11021 (synopsis "Python Serial Port Bindings")
11022 (description "@code{pyserial} provide serial port bindings for Python. It
11023 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11024 and/or Xon/Xoff. The port is accessed in RAW mode.")
11025 (license license:bsd-3)))
11027 (define-public python2-pyserial
11028 (package-with-python2 python-pyserial))
11030 (define-public python-kivy
11032 (name "python-kivy")
11037 (uri (pypi-uri "Kivy" version))
11038 (file-name (string-append name "-" version ".tar.gz"))
11041 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11042 (build-system python-build-system)
11044 `(#:tests? #f ; Tests require many optional packages
11046 (modify-phases %standard-phases
11047 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11048 (lambda* (#:key inputs #:allow-other-keys)
11049 (setenv "KIVY_SDL2_PATH"
11050 (string-append (assoc-ref inputs "sdl-union")
11055 ("pkg-config" ,pkg-config)
11056 ("python-cython" ,python-cython)))
11058 `(("gstreamer" ,gstreamer)
11061 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11062 (home-page "http://kivy.org")
11064 "Multitouch application framework")
11066 "A software library for rapid development of
11067 hardware-accelerated multitouch applications.")
11068 (license license:expat)))
11070 (define-public python2-kivy
11071 (package-with-python2 python-kivy))
11073 (define-public python-kivy-next
11074 (deprecated-package "python-kivy-next" python-kivy))
11076 (define-public python2-kivy-next
11077 (deprecated-package "python2-kivy-next" python2-kivy))
11079 (define-public python-binaryornot
11081 (name "python-binaryornot")
11085 (uri (pypi-uri "binaryornot" version))
11088 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11089 (build-system python-build-system)
11092 (modify-phases %standard-phases
11093 (add-after 'unpack 'patch-tests
11095 ;; TypeError: binary() got an unexpected keyword argument
11097 (substitute* "tests/test_check.py"
11098 (("average_size=512") ""))
11101 `(("python-chardet" ,python-chardet)
11102 ("python-hypothesis" ,python-hypothesis)))
11103 (home-page "https://github.com/audreyr/binaryornot")
11104 (synopsis "Package to check if a file is binary or text")
11105 (description "Ultra-lightweight pure Python package to check if a file is
11107 (license license:bsd-3)
11108 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11110 (define-public python2-binaryornot
11111 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11112 (package (inherit base)
11114 `(("python2-enum34" ,python2-enum34)
11115 ,@(package-propagated-inputs base))))))
11117 (define-public python-binwalk
11118 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11121 (name "python-binwalk")
11122 (version (git-version "2.1.1" revision commit))
11126 (uri (git-reference
11127 (url "https://github.com/ReFirmLabs/binwalk")
11129 (file-name (git-file-name name version))
11132 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11133 (build-system python-build-system)
11136 (modify-phases %standard-phases
11137 (add-before 'check 'set-pythonpath
11139 (setenv "PYTHONPATH"
11142 ":" (getenv "PYTHONPATH")))
11146 `(("python-coverage" ,python-coverage)
11147 ("python-nose" ,python-nose)))
11148 (home-page "https://github.com/ReFirmLabs/binwalk")
11149 (synopsis "Firmware analysis tool")
11150 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11151 (license license:expat))))
11153 (define-public python-nltk
11155 (name "python-nltk")
11159 (uri (pypi-uri "nltk" version))
11162 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11163 (build-system python-build-system)
11165 '(;; The tests require some extra resources to be downloaded.
11166 ;; TODO Try packaging these resources.
11168 (home-page "http://nltk.org/")
11169 (synopsis "Natural Language Toolkit")
11170 (description "It provides interfaces to over 50 corpora and lexical
11171 resources such as WordNet, along with a suite of text processing libraries
11172 for classification, tokenization, stemming, tagging, parsing, and semantic
11173 reasoning, wrappers for natural language processing libraries.")
11174 (license license:asl2.0)))
11176 (define-public python2-nltk
11177 (package-with-python2 python-nltk))
11179 (define-public python-pymongo
11181 (name "python-pymongo")
11185 (uri (pypi-uri "pymongo" version))
11188 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11189 (build-system python-build-system)
11191 `(("python-certifi" ,python-certifi)))
11192 (home-page "https://github.com/mongodb/mongo-python-driver")
11193 (synopsis "Python driver for MongoDB")
11194 (description "Python driver for MongoDB.")
11195 (license license:asl2.0)))
11197 (define-public python2-pymongo
11198 (package-with-python2 python-pymongo))
11200 (define-public python-consul
11202 (name "python-consul")
11207 (uri (pypi-uri "python-consul" version))
11210 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11211 (build-system python-build-system)
11213 '(#:tests? #f)) ; The tests are not distributed
11215 `(("python-requests" ,python-requests)
11216 ("python-six" ,python-six)))
11217 (home-page "https://github.com/cablehead/python-consul")
11218 (synopsis "Python client for Consul")
11220 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11221 discovery, monitoring and configuration.")
11222 (license license:expat)))
11224 (define-public python2-consul
11225 (package-with-python2 python-consul))
11227 (define-public python-schematics
11229 (name "python-schematics")
11234 (uri (git-reference
11235 (url "https://github.com/schematics/schematics.git")
11236 (commit (string-append "v" version))))
11237 (file-name (git-file-name name version))
11239 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11240 (build-system python-build-system)
11242 `(("python-six" ,python-six)))
11244 ;; The tests require a bunch of not very nice packages with fixed
11245 ;; version requirements (e.g. python-coveralls).
11247 (home-page "https://github.com/schematics/schematics")
11248 (synopsis "Python Data Structures for Humans")
11249 (description "Python Data Structures for Humans.")
11250 (license license:bsd-3)))
11252 (define-public python2-schematics
11253 (package-with-python2 python-schematics))
11255 (define-public python-odfpy
11257 (name "python-odfpy")
11261 (uri (pypi-uri "odfpy" version))
11264 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11266 `(#:modules ((srfi srfi-1)
11267 (guix build python-build-system)
11268 (guix build utils))
11270 (modify-phases %standard-phases
11272 ;; The test runner invokes python2 and python3 for test*.py.
11273 ;; To avoid having both in inputs, we replicate it here.
11275 (for-each (lambda (test-file) (invoke "python" test-file))
11276 (find-files "tests" "^test.*\\.py$"))
11278 (build-system python-build-system)
11279 (home-page "https://github.com/eea/odfpy")
11280 (synopsis "Python API and tools to manipulate OpenDocument files")
11281 (description "Collection of libraries and utility programs written in
11282 Python to manipulate OpenDocument 1.2 files.")
11284 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11285 ;; number of files with other licenses.
11286 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11288 (define-public python2-odfpy
11289 (package-with-python2 python-odfpy))
11291 (define-public python-natsort
11293 (name "python-natsort")
11297 (uri (pypi-uri "natsort" version))
11300 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11301 (build-system python-build-system)
11303 `(#:modules ((guix build utils)
11304 (guix build python-build-system)
11309 (modify-phases %standard-phases
11310 (add-before 'check 'set-cachedir
11311 ;; Tests require write access to $HOME by default
11312 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11315 (let ((cwd (getcwd)))
11316 (setenv "PYTHONPATH"
11319 (find (cut string-prefix? "lib" <>)
11320 (scandir (string-append cwd "/build")))
11322 (getenv "PYTHONPATH")))
11323 (invoke "pytest" "-v")))))))
11325 `(("python-hypothesis" ,python-hypothesis)
11326 ("python-pytest-cov" ,python-pytest-cov)
11327 ("python-pytest-mock" ,python-pytest-mock)
11328 ("python-pytest" ,python-pytest)))
11329 (propagated-inputs ; TODO: Add python-fastnumbers.
11330 `(("python-pyicu" ,python-pyicu)))
11331 (home-page "https://github.com/SethMMorton/natsort")
11332 (synopsis "Natural sorting for python and shell")
11334 "Natsort lets you apply natural sorting on lists instead of
11335 lexicographical. If you use the built-in @code{sorted} method in python
11336 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11337 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11338 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11339 identifies numbers and sorts them separately from strings. It can also sort
11340 version numbers, real numbers, mixed types and more, and comes with a shell
11341 command @command{natsort} that exposes this functionality in the command line.")
11342 (license license:expat)
11343 (properties `((python2-variant . ,(delay python2-natsort))))))
11345 (define-public python2-natsort
11346 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11347 (package (inherit base)
11349 `(("python2-pathlib" ,python2-pathlib)
11350 ,@(package-native-inputs base))))))
11352 (define-public python-glances
11354 (name "python-glances")
11359 (uri (pypi-uri "Glances" version))
11362 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11363 (modules '((guix build utils)))
11366 ;; Glances phones PyPI for weekly update checks by default.
11367 ;; Disable these. The user can re-enable them if desired.
11368 (substitute* "glances/outdated.py"
11369 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11370 (string-append indentation
11371 "self.args.disable_check_update = True\n"
11374 (build-system python-build-system)
11376 `(("python-future" ,python-future)
11377 ("python-psutil" ,python-psutil)))
11379 "https://github.com/nicolargo/glances")
11380 (synopsis "Cross-platform curses-based monitoring tool")
11382 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11383 Glances uses the PsUtil library to get information from your system. It
11384 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11385 (license license:lgpl3+)))
11387 (define-public python2-glances
11388 (package-with-python2 python-glances))
11390 (define-public python-graphql-core
11392 (name "python-graphql-core")
11397 (uri (pypi-uri "graphql-core" version))
11400 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11401 (build-system python-build-system)
11403 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11405 (modify-phases %standard-phases
11406 (add-after 'unpack 'patch-hardcoded-version
11407 (lambda _ (substitute*
11409 (("'gevent==1.1rc1'") "'gevent'"))
11412 `(("python-gevent" ,python-gevent)
11413 ("python-mock" ,python-mock)
11414 ("python-pytest-mock" ,python-pytest-mock)))
11416 `(("python-promise" ,python-promise)
11417 ("python-six" ,python-six)))
11418 (home-page "https://github.com/graphql-python/graphql-core")
11419 (synopsis "GraphQL implementation for Python")
11421 "GraphQL implementation for Python. GraphQL is a data query language and
11422 runtime designed and used to request and deliver data to mobile and web apps.
11423 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11425 (license license:expat)))
11427 (define-public python2-graphql-core
11428 (package-with-python2 python-graphql-core))
11430 (define-public python-graphql-relay
11432 (name "python-graphql-relay")
11437 (uri (pypi-uri "graphql-relay" version))
11440 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11441 (build-system python-build-system)
11443 '(#:tests? #f)) ; The tests are not distributed
11445 `(("python-graphql-core" ,python-graphql-core)
11446 ("python-promise" ,python-promise)
11447 ("python-six" ,python-six)))
11448 (home-page "https://github.com/graphql-python/graphql-relay-py")
11449 (synopsis "Relay implementation for Python")
11451 "This is a library to allow the easy creation of Relay-compliant servers
11452 using the GraphQL Python reference implementation of a GraphQL server. It
11453 should be noted that the code is a exact port of the original
11454 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11456 (license license:expat)))
11458 (define-public python2-graphql-relay
11459 (package-with-python2 python-graphql-relay))
11461 (define-public python-graphene
11463 (name "python-graphene")
11468 (uri (pypi-uri "graphene" version))
11471 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11472 (build-system python-build-system)
11474 `(("python-graphql-core" ,python-graphql-core)
11475 ("python-graphql-relay" ,python-graphql-relay)
11476 ("python-iso8601" ,python-iso8601)
11477 ("python-promise" ,python-promise)
11478 ("python-six" ,python-six)))
11480 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11481 (home-page "http://graphene-python.org/")
11482 (synopsis "GraphQL Framework for Python")
11484 "Graphene is a Python library for building GraphQL schemas/types.
11485 A GraphQL schema describes your data model, and provides a GraphQL server
11486 with an associated set of resolve methods that know how to fetch data.")
11487 (properties `((python2-variant . ,(delay python2-graphene))))
11488 (license license:expat)))
11490 (define-public python2-graphene
11491 (let ((base (package-with-python2
11492 (strip-python2-variant python-graphene))))
11493 (package (inherit base)
11495 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11496 ,@(package-native-inputs base))))))
11498 (define-public python-nautilus
11500 (name "python-nautilus")
11505 (uri (pypi-uri "nautilus" version))
11508 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11509 (build-system python-build-system)
11510 (arguments `(#:tests? #f)) ; fails to import test modules
11512 `(("python-bcrypt" ,python-bcrypt)
11513 ("python-click" ,python-click)
11514 ("python-consul" ,python-consul)
11515 ("python-graphene" ,python-graphene)
11516 ("python-jinja2" ,python-jinja2)
11517 ("python-peewee" ,python-peewee)
11518 ("python-pika" ,python-pika)
11519 ("python-tornado" ,python-tornado)
11520 ("python-wtforms" ,python-wtforms)))
11522 `(("python-nose2" ,python-nose2)))
11523 (home-page "https://github.com/AlecAivazis/nautilus")
11524 (synopsis "Library for creating microservice applications")
11526 "Nautilus is a framework for flux based microservices that looks to
11527 provide extendible implementations of common aspects of a cloud so that you can
11528 focus on building massively scalable web applications.")
11529 (license license:expat)))
11531 (define-public python-snowballstemmer
11533 (name "python-snowballstemmer")
11537 (uri (pypi-uri "snowballstemmer" version))
11540 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11541 (build-system python-build-system)
11543 `(;; No tests exist
11545 (home-page "https://github.com/shibukawa/snowball_py")
11546 (synopsis "Snowball stemming library collection for Python")
11547 (description "This package provides 16 word stemmer algorithms generated
11548 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11550 (license license:bsd-3)))
11552 (define-public python2-snowballstemmer
11553 (package-with-python2 python-snowballstemmer))
11555 (define-public python-setproctitle
11557 (name "python-setproctitle")
11562 (uri (pypi-uri "setproctitle" version))
11565 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11566 (build-system python-build-system)
11569 (modify-phases %standard-phases
11570 (add-before 'check 'patch-Makefile
11571 ;; Stricly this is only required for the python2 variant.
11572 ;; But adding a phase in an inherited package seems to be
11573 ;; cumbersum. So we patch even for python3.
11575 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11577 (substitute* "Makefile"
11578 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11579 (string-append nose "/bin/nosetests "))))
11583 (setenv "PYTHON" (or (which "python3") (which "python")))
11584 (setenv "PYCONFIG" (or (which "python3-config")
11585 (which "python-config")))
11586 (setenv "CC" "gcc")
11587 ;; No need to extend PYTHONPATH to find the built package, since
11588 ;; the Makefile will build anyway
11589 (invoke "make" "check"))))))
11591 `(("procps" ,procps))) ; required for tests
11593 "https://github.com/dvarrazzo/py-setproctitle")
11595 "Setproctitle implementation for Python to customize the process title")
11596 (description "The library allows a process to change its title (as displayed
11597 by system tools such as ps and top).
11599 Changing the title is mostly useful in multi-process systems, for
11600 example when a master process is forked: changing the children's title
11601 allows to identify the task each process is busy with. The technique
11602 is used by PostgreSQL and the OpenSSH Server for example.")
11603 (license license:bsd-3)
11604 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11606 (define-public python2-setproctitle
11607 (let ((base (package-with-python2
11608 (strip-python2-variant python-setproctitle))))
11611 (native-inputs `(("python2-nose" ,python2-nose)
11612 ,@(package-native-inputs base))))))
11614 (define-public python-validictory
11616 (name "python-validictory")
11621 (uri (pypi-uri "validictory" version))
11624 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11625 (build-system python-build-system)
11628 (modify-phases %standard-phases
11629 (add-after 'unpack 'bootstrap
11630 ;; Move the tests out of the package directory to avoid
11633 (rename-file "validictory/tests" "tests")
11634 (delete-file "tests/__init__.py")))
11637 ;; Extend PYTHONPATH so the built package will be found.
11638 (setenv "PYTHONPATH"
11639 (string-append (getcwd) "/build/lib:"
11640 (getenv "PYTHONPATH")))
11641 (invoke "py.test" "-vv" ))))))
11643 `(("python-pytest" ,python-pytest)))
11645 "https://github.com/jamesturk/validictory")
11646 (synopsis "General purpose Python data validator")
11647 (description "It allows validation of arbitrary Python data structures.
11649 The schema format is based on the JSON Schema
11650 proposal (http://json-schema.org), so combined with json the library is also
11651 useful as a validator for JSON data.")
11652 (license license:expat)))
11654 (define-public python2-validictory
11655 (package-with-python2 python-validictory))
11657 (define-public python-pyelftools
11659 (name "python-pyelftools")
11664 (uri (pypi-uri "pyelftools" version))
11667 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11668 (build-system python-build-system)
11671 (modify-phases %standard-phases
11672 (add-before 'check 'set-pythonpath
11674 (setenv "PYTHONPATH"
11677 ":" (getenv "PYTHONPATH")))
11680 "https://github.com/eliben/pyelftools")
11682 "Analyze binary and library file information")
11683 (description "This Python library provides interfaces for parsing and
11684 analyzing two binary and library file formats; the Executable and Linking
11685 Format (ELF), and debugging information in the Debugging With Attributed
11686 Record Format (DWARF).")
11687 (license license:public-domain)))
11689 (define-public python-pyev
11691 (name "python-pyev")
11696 (uri (pypi-uri "pyev" version))
11699 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11700 (build-system python-build-system)
11702 `(#:tests? #f ; no test suite
11704 (modify-phases %standard-phases
11705 (add-after 'unpack 'patch
11706 (lambda* (#:key inputs #:allow-other-keys)
11707 (let ((libev (string-append (assoc-ref inputs "libev")
11708 "/lib/libev.so.4")))
11709 (substitute* "setup.py"
11710 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11711 (string-append "libev_dll_name = \"" libev "\"")))))))))
11713 `(("libev" ,libev)))
11714 (home-page "http://pythonhosted.org/pyev/")
11715 (synopsis "Python libev interface")
11716 (description "Pyev provides a Python interface to libev.")
11717 (license license:gpl3)))
11719 (define-public python2-pyev
11720 (package-with-python2 python-pyev))
11722 (define-public python-imagesize
11724 (name "python-imagesize")
11729 (uri (pypi-uri "imagesize" version))
11732 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11733 (build-system python-build-system)
11734 (home-page "https://github.com/shibukawa/imagesize_py")
11735 (synopsis "Gets image size of files in various formats in Python")
11737 "This package allows determination of image size from
11738 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11739 (license license:expat)))
11741 (define-public python2-imagesize
11742 (package-with-python2 python-imagesize))
11744 (define-public python-termstyle
11746 (name "python-termstyle")
11751 (uri (pypi-uri "termstyle" version))
11754 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11755 (build-system python-build-system)
11758 (modify-phases %standard-phases
11761 (invoke "python" "test3.py"))))))
11762 (home-page "https://github.com/gfxmonk/termstyle")
11763 (synopsis "Console text coloring for Python")
11764 (description "This package provides console text coloring for Python.")
11765 (license license:bsd-3)))
11767 (define-public python-argcomplete
11769 (name "python-argcomplete")
11774 (uri (pypi-uri "argcomplete" version))
11777 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11778 (build-system python-build-system)
11780 `(("python-pexpect" ,python-pexpect)
11782 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11783 (home-page "https://github.com/kislyuk/argcomplete")
11784 (synopsis "Shell tab completion for Python argparse")
11785 (description "argcomplete provides extensible command line tab completion
11786 of arguments and options for Python scripts using @code{argparse}. It's
11787 particularly useful for programs with many options or sub-parsers that can
11788 dynamically suggest completions; for example, when browsing resources over the
11790 (license license:asl2.0)))
11792 (define-public python2-argcomplete
11793 (package-with-python2 python-argcomplete))
11795 (define-public python-xopen
11797 (name "python-xopen")
11802 (uri (pypi-uri "xopen" version))
11805 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11806 (build-system python-build-system)
11808 `(("python-setuptools-scm" ,python-setuptools-scm)))
11809 (home-page "https://github.com/marcelm/xopen/")
11810 (synopsis "Open compressed files transparently")
11811 (description "This module provides an @code{xopen} function that works like
11812 Python's built-in @code{open} function, but can also deal with compressed files.
11813 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11814 recognized by their file extensions. The focus is on being as efficient as
11815 possible on all supported Python versions.")
11816 (license license:expat)))
11818 (define-public python2-xopen
11819 (let ((base (package-with-python2
11820 (strip-python2-variant python-xopen))))
11823 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11824 ,@(package-propagated-inputs base))))))
11826 (define-public python-cheetah
11828 (name "python-cheetah")
11833 (uri (pypi-uri "Cheetah3" version))
11836 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11837 (build-system python-build-system)
11839 `(#:modules ((guix build utils)
11840 (guix build python-build-system)
11844 #:phases (modify-phases %standard-phases
11845 (add-after 'unpack 'use-absolute-python
11847 (substitute* "Cheetah/CheetahWrapper.py"
11848 (("#!/usr/bin/env python")
11849 (string-append "#!" (which "python"))))
11853 (let ((cwd (getcwd)))
11854 (setenv "PYTHONPATH"
11857 (find (cut string-prefix? "lib" <>)
11858 (scandir (string-append cwd "/build")))
11859 ":" (getenv "PYTHONPATH")))
11861 (string-append (getenv "PATH")
11863 (setenv "TMPDIR" "/tmp")
11865 (substitute* "Cheetah/Tests/Test.py"
11866 (("unittest.TextTestRunner\\(\\)")
11867 "unittest.TextTestRunner(verbosity=2)"))
11869 (invoke "python" "Cheetah/Tests/Test.py")))))))
11871 `(("python-markdown" ,python-markdown))) ;optional
11872 (home-page "http://cheetahtemplate.org/")
11873 (synopsis "Template engine")
11874 (description "Cheetah is a text-based template engine and Python code
11877 Cheetah can be used as a standalone templating utility or referenced as
11878 a library from other Python applications. It has many potential uses,
11879 but web developers looking for a viable alternative to ASP, JSP, PHP and
11880 PSP are expected to be its principle user group.
11884 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11886 @item Cleanly separates content, graphic design, and program code.
11887 @item Blends the power and flexibility of Python with a simple template language
11888 that non-programmers can understand.
11889 @item Gives template writers full access to any Python data structure, module,
11890 function, object, or method in their templates.
11891 @item Makes code reuse easy by providing an object-orientated interface to
11892 templates that is accessible from Python code or other Cheetah templates.
11893 One template can subclass another and selectively reimplement sections of it.
11894 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11895 improve the performance of a dynamic website.
11896 @item Compiles templates into optimized, yet readable, Python code.
11898 (license (license:x11-style "file://LICENSE"))))
11900 (define-public python2-cheetah
11901 (package-with-python2 python-cheetah))
11903 (define-public python-dulwich
11905 (name "python-dulwich")
11910 (uri (list (string-append "https://www.dulwich.io/releases/"
11911 "dulwich-" version ".tar.gz")
11912 (pypi-uri "dulwich" version)))
11915 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11916 (build-system python-build-system)
11919 (modify-phases %standard-phases
11920 (add-before 'check 'fix-tests
11921 (lambda* (#:key inputs #:allow-other-keys)
11922 ;; The tests use Popen with a custom environment which doesn't
11924 (substitute* "dulwich/tests/compat/utils.py"
11925 (("'git'") (string-append "'"
11928 (substitute* '("dulwich/tests/test_repository.py"
11929 "dulwich/tests/test_hooks.py")
11930 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11931 (setenv "TEST_RUNNER" "unittest")
11932 (setenv "PYTHONHASHSEED" "random")
11935 `(("python-fastimport" ,python-fastimport)))
11937 `(("python-mock" ,python-mock)
11938 ("python-geventhttpclient" ,python-geventhttpclient)
11940 (home-page "https://www.dulwich.io/")
11941 (synopsis "Git implementation in Python")
11942 (description "Dulwich is an implementation of the Git file formats and
11943 protocols written in pure Python.")
11944 ;; Can be used with either license.
11945 (license (list license:asl2.0 license:gpl2+))))
11947 (define-public python2-dulwich
11948 (package-with-python2 python-dulwich))
11950 (define-public python-pbkdf2
11952 (name "python-pbkdf2")
11957 (uri (pypi-uri "pbkdf2" version))
11960 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11961 (build-system python-build-system)
11964 (modify-phases %standard-phases
11967 (setenv "PYTHONPATH"
11968 (string-append (getcwd) "/build/lib:"
11969 (getenv "PYTHONPATH")))
11970 (invoke "python" "test/test_pbkdf2.py"))))))
11972 `(("python-pycrypto" ,python-pycrypto))) ; optional
11973 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11974 (synopsis "Password-based key derivation")
11975 (description "This module implements the password-based key derivation
11976 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11978 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11979 is part of the RSA Public Key Cryptography Standards series. The provided
11980 implementation takes a password or a passphrase and a salt value (and
11981 optionally a iteration count, a digest module, and a MAC module) and provides
11982 a file-like object from which an arbitrarly-sized key can be read.")
11983 (license license:expat)))
11985 (define-public python2-pbkdf2
11986 (package-with-python2 python-pbkdf2))
11988 (define-public python-qrcode
11990 (name "python-qrcode")
11995 (uri (pypi-uri "qrcode" version))
11997 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11998 (build-system python-build-system)
12000 ;; FIXME: Tests require packaging 'pymaging'.
12003 `(("python-lxml" ,python-lxml) ; for SVG output
12004 ("python-pillow" ,python-pillow) ; for PNG output
12005 ("python-six" ,python-six)))
12006 (home-page "https://github.com/lincolnloop/python-qrcode")
12007 (synopsis "QR Code image generator")
12008 (description "This package provides a pure Python QR Code generator
12009 module. It uses the Python Imaging Library (PIL) to allow for the generation
12012 In addition this package provides a command line tool to generate QR codes and
12013 either write these QR codes to a file or do the output as ascii art at the
12015 (license license:bsd-3)))
12017 (define-public python2-qrcode
12018 (package-with-python2 python-qrcode))
12020 (define-public python-rst2ansi
12022 (name "python-rst2ansi")
12027 (uri (pypi-uri "rst2ansi" version))
12030 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12031 (build-system python-build-system)
12033 `(("python-docutils" ,python-docutils)))
12034 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12035 (synopsis "Convert RST to ANSI-decorated console output")
12037 "Python module dedicated to rendering RST (reStructuredText) documents
12038 to ansi-escaped strings suitable for display in a terminal.")
12039 (license license:expat)))
12041 (define-public python-ansi2html
12043 (name "python-ansi2html")
12048 (uri (pypi-uri "ansi2html" version))
12051 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12052 (build-system python-build-system)
12054 `(("python-mock" ,python-mock)
12055 ("python-nose" ,python-nose)))
12057 `(("python-six" ,python-six)))
12058 (home-page "https://github.com/ralphbean/ansi2html")
12059 (synopsis "Convert ANSI-decorated console output to HTML")
12061 "@command{ansi2html} is a Python library and command line utility for
12062 convering text with ANSI color codes to HTML or LaTeX.")
12063 (license license:gpl3+)))
12065 (define-public python2-ansi2html
12066 (package-with-python2 python-ansi2html))
12068 (define-public python-ddt
12070 (name "python-ddt")
12075 (uri (pypi-uri "ddt" version))
12078 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12079 (build-system python-build-system)
12081 `(("python-mock" ,python-mock)
12082 ("python-nose" ,python-nose)))
12084 `(("python-six" ,python-six)
12085 ("python-pyyaml" ,python-pyyaml)))
12086 (home-page "https://github.com/txels/ddt")
12087 (synopsis "Data-Driven Tests")
12089 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12090 running it with different test data, and make it appear as multiple test
12092 (license license:expat)))
12094 (define-public python2-ddt
12095 (package-with-python2 python-ddt))
12097 (define-public python-pycountry
12099 (name "python-pycountry")
12100 (version "18.5.26")
12104 (uri (pypi-uri "pycountry" version))
12107 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12108 (build-system python-build-system)
12109 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12110 (synopsis "ISO databases for languages, countries, currencies, etc.")
12112 "@code{pycountry} provides the ISO databases for the standards:
12114 @item 639-3 (Languages)
12115 @item 3166 (Countries)
12116 @item 3166-3 (Deleted Countries)
12117 @item 3166-2 (Subdivisions of countries)
12118 @item 4217 (Currencies)
12119 @item 15924 (Scripts)
12121 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12122 through a Python API.")
12123 (license license:lgpl2.1+)))
12125 (define-public python2-pycountry
12126 (package-with-python2 python-pycountry))
12128 (define-public python-pycosat
12130 (name "python-pycosat")
12135 (uri (pypi-uri "pycosat" version))
12138 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12139 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12140 (build-system python-build-system)
12141 (home-page "https://github.com/ContinuumIO/pycosat")
12142 (synopsis "Bindings to picosat (a SAT solver)")
12144 "This package provides efficient Python bindings to @code{picosat} on
12145 the C level. When importing pycosat, the @code{picosat} solver becomes part
12146 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12147 Problem} (SAT) solver.")
12148 (license license:expat)))
12150 (define-public python2-pycosat
12151 (package-with-python2 python-pycosat))
12153 (define-public python2-ruamel.ordereddict
12155 (name "python2-ruamel.ordereddict")
12160 (uri (pypi-uri "ruamel.ordereddict" version))
12163 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12164 (build-system python-build-system)
12166 `(#:python ,python-2
12168 (modify-phases %standard-phases
12170 (add-after 'install 'check
12171 (lambda* (#:key inputs outputs #:allow-other-keys)
12172 (add-installed-pythonpath inputs outputs)
12173 (invoke "python" "test/testordereddict.py"))))))
12174 (home-page "https://bitbucket.org/ruamel/ordereddict")
12175 (synopsis "Version of dict that keeps keys in insertion order")
12177 "This is an implementation of an ordered dictionary with @dfn{Key
12178 Insertion Order} (KIO: updates of values do not affect the position of the
12179 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12180 removed and put at the back). The standard library module @code{OrderedDict},
12181 implemented later, implements a subset of @code{ordereddict} functionality.
12182 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12183 Order} (KSO, no sorting function can be specified, but a transform can be
12184 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12185 (license license:expat)))
12187 (define-public python-pypeg2
12189 (name "python-pypeg2")
12194 (uri (pypi-uri "pyPEG2" version))
12197 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12198 (build-system python-build-system)
12199 (propagated-inputs `(("python-lxml" ,python-lxml)))
12201 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12203 (home-page "https://fdik.org/pyPEG/")
12204 (synopsis "Parsering Expression Grammars in Python")
12205 (description "PyPEG is an intrinsic parser interpreter framework for
12206 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12207 parse many formal languages.")
12208 (license license:gpl2)))
12210 (define-public python-incremental
12212 (name "python-incremental")
12217 (uri (pypi-uri "incremental" version))
12220 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12221 (build-system python-build-system)
12222 (home-page "https://github.com/hawkowl/incremental")
12223 (synopsis "Library for versioning Python projects")
12224 (description "Incremental is a small library that versions your Python
12226 (license license:expat)))
12228 (define-public python2-incremental
12229 (package-with-python2 python-incremental))
12231 (define-public python-invoke
12233 (name "python-invoke")
12234 (home-page "http://www.pyinvoke.org/")
12238 (uri (pypi-uri "invoke" version))
12241 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12242 (build-system python-build-system)
12244 ;; XXX: Requires many dependencies that are not yet in Guix.
12246 (synopsis "Pythonic task execution")
12248 "Invoke is a Python task execution tool and library, drawing inspiration
12249 from various sources to arrive at a powerful and clean feature set. It is
12250 evolved from the Fabric project, but focuses on local and abstract concerns
12251 instead of servers and network commands.")
12252 (license license:bsd-3)))
12254 (define-public python2-invoke
12255 (package-with-python2 python-invoke))
12257 (define-public python-automat
12259 (name "python-automat")
12263 (uri (pypi-uri "Automat" version))
12266 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12267 (build-system python-build-system)
12268 ;; We disable the tests because they require python-twisted, while
12269 ;; python-twisted depends on python-automat. Twisted is optional, but the
12270 ;; tests fail if it is not available. Also see
12271 ;; <https://github.com/glyph/automat/issues/71>.
12272 (arguments '(#:tests? #f))
12274 `(("python-m2r" ,python-m2r)
12275 ("python-setuptools-scm" ,python-setuptools-scm)
12276 ("python-graphviz" ,python-graphviz)))
12278 `(("python-six" ,python-six)
12279 ("python-attrs" ,python-attrs)))
12280 (home-page "https://github.com/glyph/Automat")
12281 (synopsis "Self-service finite-state machines")
12282 (description "Automat is a library for concise, idiomatic Python
12283 expression of finite-state automata (particularly deterministic finite-state
12285 (license license:expat)))
12287 (define-public python2-automat
12288 (package-with-python2 python-automat))
12290 (define-public python-m2r
12292 (name "python-m2r")
12296 (uri (pypi-uri "m2r" version))
12299 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12300 (build-system python-build-system)
12302 `(("python-docutils" ,python-docutils)
12303 ("python-mistune" ,python-mistune)))
12305 `(("python-pygments" ,python-pygments)
12306 ("python-mock" ,python-mock)))
12307 (home-page "https://github.com/miyakogi/m2r")
12308 (synopsis "Markdown to reStructuredText converter")
12309 (description "M2R converts a markdown file including reST markups to valid
12311 (license license:expat)))
12313 (define-public python2-m2r
12314 (package-with-python2 python-m2r))
12316 (define-public python-constantly
12318 (name "python-constantly")
12322 (uri (pypi-uri "constantly" version))
12325 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12326 (build-system python-build-system)
12327 (home-page "https://github.com/twisted/constantly")
12328 (synopsis "Symbolic constants in Python")
12329 (description "Constantly is a Python library that provides symbolic
12330 constant support. It includes collections and constants with text, numeric,
12331 and bit flag values.")
12332 (license license:expat)))
12334 (define-public python2-constantly
12335 (package-with-python2 python-constantly))
12337 (define-public python-attrs
12339 (name "python-attrs")
12343 (uri (pypi-uri "attrs" version))
12346 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12347 (build-system python-build-system)
12349 `(#:modules ((guix build utils)
12350 (guix build python-build-system)
12354 #:phases (modify-phases %standard-phases
12357 (let ((cwd (getcwd)))
12358 (setenv "PYTHONPATH"
12361 (find (cut string-prefix? "lib" <>)
12362 (scandir (string-append cwd "/build")))
12364 (getenv "PYTHONPATH")))
12365 (invoke "python" "-m" "pytest")))))))
12367 `(("python-coverage" ,python-coverage)
12368 ("python-hypothesis" ,python-hypothesis)
12369 ("python-pympler" ,python-pympler)
12370 ("python-pytest" ,python-pytest)
12371 ("python-six" ,python-six)
12372 ("python-sphinx" ,python-sphinx)
12373 ("python-zope-interface" ,python-zope-interface)))
12374 (home-page "https://github.com/python-attrs/attrs/")
12375 (synopsis "Attributes without boilerplate")
12376 (description "@code{attrs} is a Python package with class decorators that
12377 ease the chores of implementing the most common attribute-related object
12379 (license license:expat)))
12381 (define-public python2-attrs
12382 (package-with-python2 python-attrs))
12384 (define-public python-attrs-bootstrap
12386 (inherit python-attrs)
12387 (name "python-attrs-bootstrap")
12388 (native-inputs `())
12389 (arguments `(#:tests? #f))))
12391 (define-public python2-attrs-bootstrap
12392 (package-with-python2 python-attrs-bootstrap))
12394 (define-public python2-cliapp
12396 (name "python2-cliapp")
12397 (version "1.20180812.1")
12401 (uri (string-append
12402 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12403 version ".tar.gz"))
12406 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12407 (build-system python-build-system)
12409 `(#:python ,python-2
12411 (modify-phases %standard-phases
12412 ;; check phase needs to be run before the build phase. If not,
12413 ;; coverage-test-runner looks for tests for the built source files,
12416 (add-before 'build 'check
12418 ;; Disable python3 tests
12419 (substitute* "check"
12420 (("python3") "# python3"))
12421 (invoke "./check"))))))
12423 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12424 ("python2-pep8" ,python2-pep8)))
12426 `(("python2-pyaml" ,python2-pyaml)))
12427 (home-page "https://liw.fi/cliapp/")
12428 (synopsis "Python framework for command line programs")
12429 (description "@code{python2-cliapp} is a python framework for
12430 command line programs. It contains the typical stuff such programs
12431 need to do, such as parsing the command line for options, and
12432 iterating over input files.")
12433 (license license:gpl2+)))
12435 (define-public python2-ttystatus
12437 (name "python2-ttystatus")
12442 (uri (string-append
12443 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12444 version ".tar.gz"))
12447 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12448 (build-system python-build-system)
12450 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12451 ("python2-pep8" ,python2-pep8)))
12453 `(#:python ,python-2
12455 (modify-phases %standard-phases
12456 ;; check phase needs to be run before the build phase. If not,
12457 ;; coverage-test-runner looks for tests for the built source files,
12460 (add-before 'build 'check
12461 (lambda _ (invoke "make" "check"))))))
12462 (home-page "https://liw.fi/ttystatus/")
12463 (synopsis "Python library for showing progress reporting and
12464 status updates on terminals")
12465 (description "@code{python2-ttystatus} is a python library for
12466 showing progress reporting and status updates on terminals, for
12467 command line programs. Output is automatically adapted to the width
12468 of the terminal: truncated if it does not fit, and resized if the
12469 terminal size changes.")
12470 (license license:gpl3+)))
12472 (define-public python2-tracing
12474 (name "python2-tracing")
12479 (uri (string-append
12480 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12481 version ".tar.gz"))
12484 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12485 (build-system python-build-system)
12487 `(#:python ,python-2))
12488 (home-page "https://liw.fi/tracing/")
12489 (synopsis "Python debug logging helper")
12490 (description "@code{python2-tracing} is a python library for
12491 logging debug messages. It provides a way to turn debugging messages
12492 on and off, based on the filename they occur in. It is much faster
12493 than using @code{logging.Filter} to accomplish the same thing, which
12494 matters when code is run in production mode. The actual logging still
12495 happens using the @code{logging} library.")
12496 (license license:gpl3+)))
12498 (define-public python2-larch
12500 (name "python2-larch")
12501 (version "1.20151025")
12505 (uri (string-append
12506 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12507 version ".tar.gz"))
12508 (patches (search-patches
12509 "python2-larch-coverage-4.0a6-compatibility.patch"))
12512 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12513 (build-system python-build-system)
12515 `(#:python ,python-2
12517 (modify-phases %standard-phases
12518 ;; check phase needs to be run before the build phase. If not,
12519 ;; coverage-test-runner looks for tests for the built source files,
12522 (add-before 'build 'check
12523 (lambda _ (invoke "make" "check"))))))
12525 `(("cmdtest" ,cmdtest)
12526 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12528 `(("python2-tracing" ,python2-tracing)))
12529 (home-page "https://liw.fi/larch/")
12530 (synopsis "Python copy-on-write B-tree library")
12531 (description "@code{python2-larch} is an implementation of
12532 particular kind of B-tree, based on research by Ohad Rodeh. See
12533 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12534 on the data structure.
12536 The distinctive feature of this B-tree is that a node is never
12537 (conceptually) modified. Instead, all updates are done by
12538 copy-on-write. This makes it easy to clone a tree, and modify only the
12539 clone, while other processes access the original tree.")
12540 (license license:gpl3+)))
12542 (define-public python-astroid
12544 (name "python-astroid")
12549 (uri (pypi-uri "astroid" version))
12551 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12552 (build-system python-build-system)
12554 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12555 ("python-six" ,python-six)
12556 ("python-typed-ast" ,python-typed-ast)
12557 ("python-wrapt" ,python-wrapt)))
12559 `(("python-dateutil" ,python-dateutil)
12560 ("python-nose" ,python-nose)
12561 ("python-pytest" ,python-pytest)
12562 ("python-pytest-runner" ,python-pytest-runner)))
12565 (modify-phases %standard-phases
12566 (add-after 'unpack 'remove-spurious-test
12568 ;; This can be removed after upgrading from python-3.7
12569 ;; https://github.com/PyCQA/astroid/issues/593
12570 ;; https://bugs.python.org/issue34056
12571 (delete-file "astroid/tests/unittest_modutils.py")
12575 (invoke "pytest" "astroid"))))))
12576 (home-page "https://github.com/PyCQA/astroid")
12577 (synopsis "Common base representation of python source code for pylint and
12579 (description "@code{python-astroid} provides a common base representation
12580 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12582 It provides a compatible representation which comes from the _ast module. It
12583 rebuilds the tree generated by the builtin _ast module by recursively walking
12584 down the AST and building an extended ast. The new node classes have
12585 additional methods and attributes for different usages. They include some
12586 support for static inference and local name scopes. Furthermore, astroid
12587 builds partial trees by inspecting living objects.")
12588 (license license:lgpl2.1+)
12589 (properties `((python2-variant . ,(delay python2-astroid))))))
12591 (define-public python2-astroid
12592 (let ((base (package-with-python2
12593 (strip-python2-variant python-astroid))))
12594 (package (inherit base)
12595 ;; Version 2.x removes python2 support.
12600 (uri (pypi-uri "astroid" version))
12603 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12605 (substitute-keyword-arguments (package-arguments base)
12607 `(modify-phases ,phases
12608 (add-after 'unpack 'remove-spurious-test
12610 ;; https://github.com/PyCQA/astroid/issues/276
12611 (delete-file "astroid/tests/unittest_brain.py")
12615 (invoke"python" "-m" "unittest" "discover"
12616 "-p" "unittest*.py")))))))
12617 (native-inputs `())
12619 `(("python2-backports-functools-lru-cache"
12620 ,python2-backports-functools-lru-cache)
12621 ("python2-enum34" ,python2-enum34)
12622 ("python2-singledispatch" ,python2-singledispatch)
12623 ,@(alist-delete "python-typed-ast"
12624 (package-propagated-inputs base)))))))
12626 (define-public python-isort
12628 (name "python-isort")
12633 (uri (git-reference
12634 ;; Tests pass only from the Github sources
12635 (url "https://github.com/timothycrosley/isort")
12637 (file-name (git-file-name name version))
12640 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12641 (build-system python-build-system)
12643 `(("python-mock" ,python-mock)
12644 ("python-pytest" ,python-pytest)))
12645 (home-page "https://github.com/timothycrosley/isort")
12646 (synopsis "Python utility/library to sort python imports")
12647 (description "@code{python-isort} is a python utility/library to sort
12648 imports alphabetically, and automatically separated into sections. It
12649 provides a command line utility, a python library and plugins for various
12651 (license license:expat)
12652 (properties `((python2-variant . ,(delay python2-isort))))))
12654 (define-public python2-isort
12655 (let ((base (package-with-python2
12656 (strip-python2-variant python-isort))))
12657 (package (inherit base)
12659 `(("python2-futures" ,python2-futures)
12660 ,@(package-native-inputs base))))))
12662 (define-public python2-backports-functools-lru-cache
12664 (name "python2-backports-functools-lru-cache")
12669 ;; only the pypi tarballs contain the necessary metadata
12670 (uri (pypi-uri "backports.functools_lru_cache" version))
12673 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12674 (build-system python-build-system)
12676 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12678 `(#:python ,python-2))
12679 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12680 (synopsis "Backport of functools.lru_cache from Python 3.3")
12681 (description "@code{python2-backports-functools-lru-cache} is a backport
12682 of @code{functools.lru_cache} from python 3.3.")
12683 (license license:expat)))
12685 (define-public python-configparser
12687 (name "python-configparser")
12692 (uri (pypi-uri "configparser" version))
12695 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12696 (build-system python-build-system)
12697 (home-page "https://github.com/jaraco/configparser/")
12698 (synopsis "Backport of configparser from python 3.5")
12699 (description "@code{python-configparser} is a backport of
12700 @code{configparser} from Python 3.5 so that it can be used directly
12701 in other versions.")
12702 (license license:expat)))
12704 (define-public python2-configparser
12705 (package-with-python2 python-configparser))
12707 (define-public python-mando
12709 (name "python-mando")
12713 (uri (pypi-uri "mando" version))
12716 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12717 (build-system python-build-system)
12719 `(("python-rst2ansi" ,python-rst2ansi)
12720 ("python-six" ,python-six)))
12722 `(("python-pytest" ,python-pytest)))
12723 (home-page "https://mando.readthedocs.org/")
12725 "Wrapper around argparse, allowing creation of complete CLI applications")
12727 "This package is a wrapper around argparse, allowing you to write complete CLI
12728 applications in seconds while maintaining all the flexibility.")
12729 (license license:expat)))
12731 (define-public python2-mando
12732 (package-with-python2 python-mando))
12734 (define-public python2-argparse
12736 (name "python2-argparse")
12741 (uri (pypi-uri "argparse" version))
12744 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12745 (build-system python-build-system)
12747 `(#:python ,python-2))
12748 (home-page "https://github.com/ThomasWaldmann/argparse/")
12749 (synopsis "Python command-line parsing library")
12751 "This package is mostly for people who want to have @code{argparse} on
12752 older Pythons because it was not part of the standard library back then.")
12753 (license license:psfl)))
12755 (define-public python-fudge
12757 (name "python-fudge")
12758 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12759 ;; package, which is currently the only use of this package.
12764 (uri (pypi-uri "fudge" version))
12767 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12768 (build-system python-build-system)
12770 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12771 (home-page "https://github.com/fudge-py/fudge")
12772 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12774 "Fudge is a Python module for using fake objects (mocks and stubs) to
12777 In readable Python code, you declare the methods available on your fake object
12778 and how they should be called. Then you inject that into your application and
12779 start testing. This declarative approach means you don’t have to record and
12780 playback actions and you don’t have to inspect your fakes after running code.
12781 If the fake object was used incorrectly then you’ll see an informative
12782 exception message with a traceback that points to the culprit.")
12783 (license license:expat)))
12785 (define-public python2-fudge
12786 (package-with-python2 python-fudge))
12788 (define-public python-mwclient
12790 (name "python-mwclient")
12795 ;; The PyPI version wouldn't contain tests.
12796 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12797 "v" version ".tar.gz"))
12798 (file-name (string-append name "-" version ".tar.gz"))
12801 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12802 (build-system python-build-system)
12804 `(("python-requests" ,python-requests)
12805 ("python-requests-oauthlib"
12806 ,python-requests-oauthlib)
12807 ("python-six" ,python-six)))
12809 `(("python-mock" ,python-mock)
12810 ("python-pytest" ,python-pytest)
12811 ("python-pytest-pep8" ,python-pytest-pep8)
12812 ("python-pytest-cache" ,python-pytest-cache)
12813 ("python-pytest-cov" ,python-pytest-cov)
12814 ("python-responses" ,python-responses)))
12815 (home-page "https://github.com/btongminh/mwclient")
12816 (synopsis "MediaWiki API client")
12817 (description "This package provides a MediaWiki API client.")
12818 (license license:expat)))
12820 (define-public python2-mwclient
12821 (package-with-python2 python-mwclient))
12823 (define-public python-utils
12825 (name "python-utils")
12829 (uri (pypi-uri "python-utils" version))
12832 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12833 (build-system python-build-system)
12835 `(("pytest-runner" ,python-pytest-runner)
12836 ("pytest" ,python-pytest)
12837 ("six" ,python-six)))
12838 (home-page "https://github.com/WoLpH/python-utils")
12839 (synopsis "Convenient utilities not included with the standard Python install")
12841 "Python Utils is a collection of small Python functions and classes which
12842 make common patterns shorter and easier.")
12843 (license license:bsd-2)))
12845 (define-public python2-utils
12846 (package-with-python2 python-utils))
12848 (define-public python-diff-match-patch
12850 (name "python-diff-match-patch")
12851 (version "20121119")
12855 (uri (pypi-uri "diff-match-patch" version))
12858 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12859 (build-system python-build-system)
12860 (home-page "https://code.google.com/p/google-diff-match-patch")
12861 (synopsis "Synchronize plain text")
12862 (description "Diff Match and Patch libraries offer robust algorithms to
12863 perform the operations required for synchronizing plain text.")
12864 (license license:asl2.0)))
12866 (define-public python2-diff-match-patch
12867 (package-with-python2 python-diff-match-patch))
12869 (define-public python-dirsync
12871 (name "python-dirsync")
12876 (uri (pypi-uri "dirsync" version))
12879 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12880 (build-system python-build-system)
12882 `(("six" ,python-six)))
12883 (home-page "https://bitbucket.org/tkhyn/dirsync")
12884 (synopsis "Advanced directory tree synchronisation tool")
12885 (description "Advanced directory tree synchronisation tool.")
12886 (license license:expat)))
12888 (define-public python2-dirsync
12889 (package-with-python2 python-dirsync))
12891 (define-public python-levenshtein
12893 (name "python-levenshtein")
12898 (uri (pypi-uri "python-Levenshtein" version))
12901 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12902 (build-system python-build-system)
12903 (home-page "https://github.com/ztane/python-Levenshtein")
12904 (synopsis "Fast computation of Levenshtein distance and string similarity")
12906 "The Levenshtein Python C extension module contains functions for fast computation of
12908 @item Levenshtein (edit) distance, and edit operations
12909 @item string similarity
12910 @item approximate median strings, and generally string averaging
12911 @item string sequence and set similarity
12913 It supports both normal and Unicode strings.")
12914 (license license:gpl2+)))
12916 (define-public python2-levenshtein
12917 (package-with-python2 python-levenshtein))
12919 (define-public python-scandir
12921 (name "python-scandir")
12926 (uri (pypi-uri "scandir" version))
12928 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12929 (build-system python-build-system)
12931 `(#:phases (modify-phases %standard-phases
12934 (invoke "python" "test/run_tests.py"))))))
12935 (home-page "https://github.com/benhoyt/scandir")
12936 (synopsis "Directory iteration function")
12938 "Directory iteration function like os.listdir(), except that instead of
12939 returning a list of bare filenames, it yields DirEntry objects that include
12940 file type and stat information along with the name. Using scandir() increases
12941 the speed of os.walk() by 2-20 times (depending on the platform and file
12942 system) by avoiding unnecessary calls to os.stat() in most cases.
12944 This package is part of the Python standard library since version 3.5.")
12945 (license license:bsd-3)))
12947 (define-public python2-scandir
12948 (package-with-python2 python-scandir))
12950 (define-public python2-stemming
12952 (name "python2-stemming")
12957 (uri (pypi-uri "stemming" version))
12959 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12960 (build-system python-build-system)
12962 `(#:python ,python-2))
12963 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12964 (synopsis "Python implementations of various stemming algorithms")
12966 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12967 stemming algorithms for English. These implementations are straightforward and
12968 efficient, unlike some Python versions of the same algorithms available on the
12969 Web. This package is an extraction of the stemming code included in the Whoosh
12971 (license license:public-domain)))
12973 (define-public python-factory-boy
12975 (name "python-factory-boy")
12980 (uri (pypi-uri "factory_boy" version))
12982 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12983 (build-system python-build-system)
12985 ;; Tests are not included in the tarball.
12988 `(("faker" ,python-faker)))
12989 (home-page "https://github.com/benhoyt/scandir")
12990 (synopsis "Versatile test fixtures replacement")
12992 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12994 As a fixtures replacement tool, it aims to replace static, hard to maintain
12995 fixtures with easy-to-use factories for complex object.
12997 Instead of building an exhaustive test setup with every possible combination
12998 of corner cases, factory_boy allows you to use objects customized for the
12999 current test, while only declaring the test-specific fields")
13000 (license license:expat)))
13002 (define-public python2-factory-boy
13003 (package-with-python2 python-factory-boy))
13005 (define-public python-translate-toolkit
13007 (name "python-translate-toolkit")
13012 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13014 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13015 (build-system python-build-system)
13017 `(("python-pytest" ,python-pytest)
13018 ("python-sphinx" ,python-sphinx)))
13020 `(("python-babel" ,python-babel)
13021 ("python-beautifulsoup4" ,python-beautifulsoup4)
13022 ("python-chardet" ,python-chardet)
13023 ("python-diff-match-patch" ,python-diff-match-patch)
13024 ("python-levenshtein" ,python-levenshtein)
13025 ("python-lxml" ,python-lxml)
13026 ("python-six" ,python-six)
13027 ("python-vobject" ,python-vobject)
13028 ("python-pyyaml" ,python-pyyaml)))
13030 ;; TODO: tests are not run, because they end with
13031 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13033 ;; during test setup.
13035 (home-page "https://toolkit.translatehouse.org")
13036 (synopsis "Tools and API for translation and localization engineering")
13038 "Tools and API for translation and localization engineering. It contains
13039 several utilities, as well as an API for building localization tools.")
13040 (license license:gpl2+)))
13042 (define-public python2-translate-toolkit
13043 (package-with-python2 python-translate-toolkit))
13045 (define-public python-packaging
13047 (name "python-packaging")
13052 (uri (pypi-uri "packaging" version))
13055 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13056 (build-system python-build-system)
13058 `(#:phases (modify-phases %standard-phases
13060 (lambda _ (invoke "py.test" "-vv"))))))
13062 `(("python-pretend" ,python-pretend)
13063 ("python-pytest" ,python-pytest)))
13065 `(("python-pyparsing" ,python-pyparsing)
13066 ("python-six" ,python-six)))
13067 (home-page "https://github.com/pypa/packaging")
13068 (synopsis "Core utilities for Python packages")
13069 (description "Packaging is a Python module for dealing with Python packages.
13070 It offers an interface for working with package versions, names, and dependency
13072 ;; From 'LICENSE': This software is made available under the terms of
13073 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13074 ;; Contributions to this software is made under the terms of *both* these
13076 (license (list license:asl2.0 license:bsd-2))))
13078 (define-public python2-packaging
13079 (package-with-python2 python-packaging))
13081 (define-public python-relatorio
13083 (name "python-relatorio")
13088 (uri (pypi-uri "relatorio" version))
13091 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13092 (build-system python-build-system)
13094 `(("python-lxml" ,python-lxml)
13095 ("python-genshi" ,python-genshi)))
13097 `(("python-magic" ,python-magic)))
13098 (home-page "https://relatorio.tryton.org/")
13099 (synopsis "Templating library able to output ODT and PDF files")
13100 (description "Relatorio is a templating library which provides a way to
13101 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13102 for more filetypes can be easily added by creating plugins for them.")
13103 (license license:gpl3+)))
13105 (define-public python2-relatorio
13106 (package-with-python2 python-relatorio))
13108 (define-public python-radon
13110 (name "python-radon")
13115 (uri (pypi-uri "radon" version))
13118 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13119 (build-system python-build-system)
13121 `(#:phases (modify-phases %standard-phases
13124 (invoke "python" "radon/tests/run.py"))))))
13126 `(("python-colorama" ,python-colorama)
13127 ("python-flake8-polyfill" ,python-flake8-polyfill)
13128 ("python-mando" ,python-mando)))
13130 `(("python-pytest" ,python-pytest)
13131 ("python-pytest-mock" ,python-pytest-mock)))
13132 (home-page "https://radon.readthedocs.org/")
13133 (synopsis "Code Metrics in Python")
13134 (description "Radon is a Python tool which computes various code metrics.
13135 Supported metrics are:
13137 @item raw metrics: SLOC, comment lines, blank lines, &c.
13138 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13139 @item Halstead metrics (all of them)
13140 @item the Maintainability Index (a Visual Studio metric)
13142 (license license:expat)))
13144 (define-public python2-radon
13145 (package-with-python2 python-radon))
13147 (define-public python-sure
13149 (name "python-sure")
13154 (uri (pypi-uri "sure" version))
13157 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13158 (build-system python-build-system)
13160 `(("python-mock" ,python-mock)
13161 ("python-six" ,python-six)))
13163 `(("python-nose" ,python-nose)))
13164 (home-page "https://github.com/gabrielfalcao/sure")
13165 (synopsis "Automated testing library in python for python")
13167 "Sure is a python library that leverages a DSL for writing assertions.
13168 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13169 (license license:gpl3+)))
13171 (define-public python2-sure
13172 (package-with-python2 python-sure))
13174 (define-public python2-couleur
13175 ;; This package does not seem to support python3 at all, hence,
13176 ;; only the python2 variant definition is provided.
13178 (name "python2-couleur")
13183 (uri (pypi-uri "couleur" version))
13186 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13187 (build-system python-build-system)
13189 `(#:python ,python-2))
13190 (home-page "https://github.com/gabrielfalcao/couleur")
13192 "ANSI terminal tool for python, colored shell and other handy fancy features")
13194 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13195 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13196 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13197 ;; https://github.com/gabrielfalcao/couleur/issues/11
13198 (license license:lgpl3+)))
13200 (define-public python-misaka
13202 (name "python-misaka")
13207 (uri (pypi-uri "misaka" version))
13210 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13211 (build-system python-build-system)
13213 `(;; Line 37 of setup.py calls self.run_command('develop')
13214 ;; in the 'check' phase. This command seems to be trying
13216 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13217 ;; for which it does not have the permission to write.
13220 `(("python-cffi" ,python-cffi)))
13221 (home-page "https://github.com/FSX/misaka")
13222 (synopsis "Python binding for Hoedown")
13224 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13225 library written in C. It features a fast HTML renderer and functionality to make custom
13226 renderers (e.g. man pages or LaTeX).")
13227 (license license:expat)))
13229 (define-public python2-misaka
13230 (package-with-python2 python-misaka))
13232 (define-public python2-steadymark
13233 ;; This is forced into being a python2 only variant
13234 ;; due to its dependence on couleur that has no support
13237 (name "python2-steadymark")
13242 (uri (pypi-uri "steadymark" version))
13245 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13246 (build-system python-build-system)
13248 `(("python-couleur" ,python2-couleur)
13249 ("python-sure" ,python2-sure)
13250 ("python-misaka" ,python2-misaka)))
13252 `(#:python ,python-2
13254 (modify-phases %standard-phases
13255 (add-before 'build 'patch-setup-py
13257 ;; Update requirements from dependency==version
13258 ;; to dependency>=version
13259 (substitute* "setup.py"
13262 (home-page "https://github.com/gabrielfalcao/steadymark")
13263 (synopsis "Markdown-based test runner for python")
13265 "@code{Steadymark} allows documentation to be written in github-flavoured
13266 markdown. The documentation may contain snippets of code surrounded by python
13267 code blocks and @code{Steadymark} will find these snippets and run them, making
13268 sure that there are no old malfunctional examples in the documentation examples.")
13269 (license license:expat)))
13271 (define-public python-jsonpointer
13273 (name "python-jsonpointer")
13278 (uri (pypi-uri "jsonpointer" version))
13281 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13282 (build-system python-build-system)
13283 (home-page "https://github.com/stefankoegl/python-json-pointer")
13284 (synopsis "Identify specific nodes in a JSON document")
13285 (description "@code{jsonpointer} allows you to access specific nodes
13286 by path in a JSON document (see RFC 6901).")
13287 (license license:bsd-3)))
13289 (define-public python2-jsonpointer
13290 (package-with-python2 python-jsonpointer))
13292 (define-public python-jsonpatch
13294 (name "python-jsonpatch")
13299 ;; pypi version lacks tests.js
13300 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13301 "archive/v" version ".tar.gz"))
13302 (file-name (string-append name "-" version ".tar.gz"))
13305 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13306 (build-system python-build-system)
13308 `(("python-jsonpointer" ,python-jsonpointer)))
13309 (home-page "https://github.com/stefankoegl/python-json-patch")
13310 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13311 (description "@code{jsonpatch} is a library and program that allows
13312 applying JSON Patches according to RFC 6902.")
13313 (license license:bsd-3)))
13315 (define-public python2-jsonpatch
13316 (package-with-python2 python-jsonpatch))
13318 (define-public python-jsonpatch-0.4
13319 (package (inherit python-jsonpatch)
13320 (name "python-jsonpatch")
13325 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13326 "archive/v" version ".tar.gz"))
13327 (file-name (string-append name "-" version ".tar.gz"))
13330 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13332 (define-public python2-jsonpatch-0.4
13333 (package-with-python2 python-jsonpatch-0.4))
13335 (define-public python-rfc3986
13337 (name "python-rfc3986")
13341 (uri (pypi-uri "rfc3986" version))
13344 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13345 (build-system python-build-system)
13347 `(#:modules ((guix build utils)
13348 (guix build python-build-system)
13353 (modify-phases %standard-phases
13356 (let ((cwd (getcwd)))
13357 (setenv "PYTHONPATH"
13358 (string-append cwd "/build/"
13359 (find (cut string-prefix? "lib" <>)
13360 (scandir (string-append cwd "/build")))
13362 (getenv "PYTHONPATH")))
13363 (invoke "pytest" "-v")))))))
13365 `(("python-pytest" ,python-pytest)))
13366 (home-page "https://rfc3986.readthedocs.io/")
13367 (synopsis "Parse and validate URI references")
13369 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13370 validation and authority parsing. This module also supports RFC@tie{}6874
13371 which adds support for zone identifiers to IPv6 addresses.")
13372 (license license:asl2.0)))
13374 (define-public python2-rfc3986
13375 (package-with-python2 python-rfc3986))
13377 (define-public python-rfc3987
13379 (name "python-rfc3987")
13384 (uri (pypi-uri "rfc3987" version))
13387 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13388 (build-system python-build-system)
13389 (home-page "https://pypi.python.org/pypi/rfc3987")
13390 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13391 (description "@code{rfc3987} provides routines for parsing and
13392 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13393 (license license:gpl3+)))
13395 (define-public python2-rfc3987
13396 (package-with-python2 python-rfc3987))
13398 (define-public python-validate-email
13400 (name "python-validate-email")
13405 (uri (pypi-uri "validate_email" version))
13408 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13409 (build-system python-build-system)
13410 (home-page "https://github.com/syrusakbary/validate_email")
13411 (synopsis "Verifies if an email address is valid and really exists")
13412 (description "@code{validate_email} can be used to verify if an email
13413 address is valid and really exists.")
13414 (license license:lgpl3+)))
13416 (define-public python2-validate-email
13417 (package-with-python2 python-validate-email))
13419 (define-public python-flex
13421 (name "python-flex")
13426 (uri (pypi-uri "flex" version))
13429 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13430 (build-system python-build-system)
13432 `(("python-click" ,python-click)
13433 ("python-iso8601" ,python-iso8601)
13434 ("python-jsonpointer" ,python-jsonpointer)
13435 ("python-pyyaml" ,python-pyyaml)
13436 ("python-requests" ,python-requests)
13437 ("python-rfc3987" ,python-rfc3987)
13438 ("python-six" ,python-six)
13439 ("python-validate-email" ,python-validate-email)))
13440 (home-page "https://github.com/pipermerriam/flex")
13441 (synopsis "Validates Swagger schemata")
13442 (description "@code{flex} can be used to validate Swagger schemata.")
13443 (license license:bsd-3)))
13445 (define-public python2-flex
13446 (package-with-python2 python-flex))
13448 (define-public python-marshmallow
13450 (name "python-marshmallow")
13451 (version "3.0.0b14")
13455 (uri (pypi-uri "marshmallow" version))
13458 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13459 (build-system python-build-system)
13461 `(("python-dateutil" ,python-dateutil)
13462 ("python-simplejson" ,python-simplejson)))
13464 `(("python-pytest" ,python-pytest)
13465 ("python-pytz" ,python-pytz)))
13466 (home-page "https://github.com/marshmallow-code/marshmallow")
13467 (synopsis "Convert complex datatypes to and from native
13468 Python datatypes.")
13469 (description "@code{marshmallow} provides a library for converting
13470 complex datatypes to and from native Python datatypes.")
13471 (license license:expat)))
13473 (define-public python2-marshmallow
13474 (package-with-python2 python-marshmallow))
13476 (define-public python-apispec
13478 (name "python-apispec")
13483 (uri (pypi-uri "apispec" version))
13486 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13487 (build-system python-build-system)
13489 `(("python-pyyaml" ,python-pyyaml)))
13491 `(("python-pytest" ,python-pytest)
13492 ("python-flask" ,python-flask)
13493 ("python-marshmallow" ,python-marshmallow)
13494 ("python-tornado" ,python-tornado)
13495 ("python-bottle" ,python-bottle)
13496 ("python-mock" ,python-mock)))
13497 (home-page "https://github.com/marshmallow-code/apispec")
13498 (synopsis "Swagger 2.0 API specification generator")
13499 (description "@code{python-apispec} is a pluggable API specification
13500 generator. Currently supports the OpenAPI specification (f.k.a.
13502 (license license:expat)))
13504 (define-public python2-apispec
13505 (package-with-python2 python-apispec))
13507 (define-public python-flasgger
13509 (name "python-flasgger")
13514 (uri (git-reference
13515 (url "https://github.com/rochacbruno/flasgger.git")
13517 (file-name (git-file-name name version))
13519 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13520 (build-system python-build-system)
13523 (modify-phases %standard-phases
13525 (lambda* (#:key inputs outputs #:allow-other-keys)
13526 (substitute* "Makefile"
13527 (("flake8 flasgger --ignore=F403")
13528 "flake8 flasgger --ignore=E731,F403"))
13529 (setenv "PYTHONPATH" (string-append (getcwd)
13531 (getenv "PYTHONPATH")))
13532 (invoke "py.test"))))))
13534 `(("python-flask" ,python-flask)
13535 ("python-pyyaml" ,python-pyyaml)
13536 ("python-jsonschema" ,python-jsonschema)
13537 ("python-mistune" ,python-mistune)
13538 ("python-six" ,python-six)))
13540 `(("python-decorator" ,python-decorator)
13541 ("python-flake8" ,python-flake8)
13542 ("python-flask-restful" ,python-flask-restful)
13543 ("python-flex" ,python-flex)
13544 ("python-pytest" ,python-pytest)
13545 ("python-pytest-cov" ,python-pytest-cov)
13546 ("python-marshmallow" ,python-marshmallow)
13547 ("python-apispec" ,python-apispec)))
13548 (home-page "https://github.com/rochacbruno/flasgger/")
13549 (synopsis "Extract Swagger specs from your Flask project")
13550 (description "@code{python-flasgger} allows extracting Swagger specs
13551 from your Flask project. It is a fork of Flask-Swagger.")
13552 (license license:expat)))
13554 (define-public python2-flasgger
13555 (package-with-python2 python-flasgger))
13557 (define-public python-swagger-spec-validator
13559 (name "python-swagger-spec-validator")
13564 (uri (pypi-uri "swagger-spec-validator" version))
13567 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13568 (build-system python-build-system)
13570 `(("python-jsonschema" ,python-jsonschema)
13571 ("python-pyyaml" ,python-pyyaml)
13572 ("python-six" ,python-six)))
13574 "https://github.com/Yelp/swagger_spec_validator")
13575 (synopsis "Validation of Swagger specifications")
13576 (description "@code{swagger_spec_validator} provides a library for
13577 validating Swagger API specifications.")
13578 (license license:asl2.0)))
13580 (define-public python2-swagger-spec-validator
13581 (package-with-python2 python-swagger-spec-validator))
13583 (define-public python-apache-libcloud
13585 (name "python-apache-libcloud")
13590 (uri (pypi-uri "apache-libcloud" version))
13593 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13594 (build-system python-build-system)
13597 (modify-phases %standard-phases
13598 (add-after 'unpack 'patch-ssh
13599 (lambda* (#:key inputs #:allow-other-keys)
13600 (substitute* "libcloud/compute/ssh.py"
13601 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13604 (add-after 'unpack 'patch-tests
13606 (substitute* "./libcloud/test/test_file_fixtures.py"
13607 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13608 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13609 return (httplib.OK,
13611 {\"test\": \"value\"},
13612 httplib.responses[httplib.OK])
13614 (substitute* "libcloud/test/compute/test_ssh_client.py"
13615 (("class ShellOutSSHClientTests")
13616 "@unittest.skip(\"Guix container doesn't have ssh service\")
13617 class ShellOutSSHClientTests")
13618 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13619 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13620 (("'.xF0', '.x90', '.x8D', '.x88'")
13621 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13623 (add-before 'check 'copy-secret
13625 (copy-file "libcloud/test/secrets.py-dist"
13626 "libcloud/test/secrets.py")
13629 `(("openssh" ,openssh)))
13631 `(("python-paramiko" ,python-paramiko)
13632 ("python-requests" ,python-requests)))
13634 `(("python-lockfile" ,python-lockfile)
13635 ("python-mock" ,python-mock)
13636 ("python-pytest" ,python-pytest)
13637 ("python-pytest-runner" ,python-pytest-runner)
13638 ("python-requests-mock" ,python-requests-mock)))
13639 (home-page "https://libcloud.apache.org/")
13640 (synopsis "Unified Cloud API")
13641 (description "@code{libcloud} is a Python library for interacting with
13642 many of the popular cloud service providers using a unified API.")
13643 (license license:asl2.0)))
13645 (define-public python2-apache-libcloud
13646 (package-with-python2 python-apache-libcloud))
13648 (define-public python-smmap2
13650 (name "python-smmap2")
13655 (uri (pypi-uri "smmap2" version))
13658 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13659 (build-system python-build-system)
13661 `(("python-nosexcover" ,python-nosexcover)))
13662 (home-page "https://github.com/Byron/smmap")
13663 (synopsis "Python sliding window memory map manager")
13664 (description "@code{smmap2} is a pure Python implementation of a sliding
13665 window memory map manager.")
13666 (license license:bsd-3)))
13668 (define-public python2-smmap2
13669 (package-with-python2 python-smmap2))
13671 (define-public python-regex
13673 (name "python-regex")
13674 (version "2019.04.14")
13677 (uri (pypi-uri "regex" version))
13680 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13681 ;; TODO: Fix and enable regex_test.py tests that complain about the
13682 ;; test.support module not existing.
13683 (build-system python-build-system)
13684 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13685 (synopsis "Alternative regular expression module")
13686 (description "This regular expression implementation is backwards-
13687 compatible with the standard @code{re} module, but offers additional
13688 functionality like full case-folding for case-insensitive matches in Unicode.")
13689 (license license:psfl)))
13691 (define-public python2-regex
13692 (package-with-python2 python-regex))
13694 (define-public python2-pyopengl
13696 (name "python2-pyopengl")
13701 (uri (pypi-uri "PyOpenGL" version))
13704 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13706 `(#:python ,python-2))
13707 (build-system python-build-system)
13708 (home-page "http://pyopengl.sourceforge.net")
13709 (synopsis "Standard OpenGL bindings for Python")
13711 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13712 related APIs. The binding is created using the standard @code{ctypes}
13714 (license license:bsd-3)))
13716 (define-public python2-pyopengl-accelerate
13718 (inherit python2-pyopengl)
13719 (name "python2-pyopengl-accelerate")
13724 (uri (pypi-uri "PyOpenGL-accelerate" version))
13727 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13728 (synopsis "Acceleration code for PyOpenGL")
13730 "This is the Cython-coded accelerator module for PyOpenGL.")))
13732 (define-public python-rencode
13734 (name "python-rencode")
13739 (uri (pypi-uri "rencode" version))
13742 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13743 (build-system python-build-system)
13746 (modify-phases %standard-phases
13747 (add-before 'check 'delete-bogus-test
13748 ;; This test requires /home/aresch/Downloads, which is not provided by
13749 ;; the build environment.
13751 (delete-file "rencode/t.py")
13753 (native-inputs `(("pkg-config" ,pkg-config)
13754 ("python-cython" ,python-cython)))
13755 (home-page "https://github.com/aresch/rencode")
13756 (synopsis "Serialization of heterogeneous data structures")
13758 "The @code{rencode} module is a data structure serialization library,
13759 similar to @code{bencode} from the BitTorrent project. For complex,
13760 heterogeneous data structures with many small elements, r-encoding stake up
13761 significantly less space than b-encodings. This version of rencode is a
13762 complete rewrite in Cython to attempt to increase the performance over the
13763 pure Python module.")
13764 (license license:bsd-3)))
13766 (define-public python2-rencode
13767 (package-with-python2 python-rencode))
13769 (define-public python-xenon
13771 (name "python-xenon")
13776 (uri (pypi-uri "xenon" version))
13779 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13780 (build-system python-build-system)
13782 `(("python-pyyaml" ,python-pyyaml)
13783 ("python-radon" ,python-radon)
13784 ("python-requests" ,python-requests)
13785 ("python-flake8" ,python-flake8)
13786 ("python-tox" ,python-tox)))
13789 (modify-phases %standard-phases
13790 (add-before 'build 'patch-test-requirements
13792 ;; Remove httpretty dependency for tests.
13793 (substitute* "setup.py"
13794 (("httpretty") ""))
13796 (home-page "https://xenon.readthedocs.org/")
13797 (synopsis "Monitor code metrics for Python on your CI server")
13799 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13800 Ideally, @code{xenon} is run every time code is committed. Through command
13801 line options, various thresholds can be set for the complexity of code. It
13802 will fail (i.e. it will exit with a non-zero exit code) when any of these
13803 requirements is not met.")
13804 (license license:expat)))
13806 (define-public python2-xenon
13807 (package-with-python2 python-xenon))
13809 (define-public python-pysocks
13811 (name "python-pysocks")
13816 (uri (pypi-uri "PySocks" version))
13819 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13820 (build-system python-build-system)
13821 (arguments `(#:tests? #f))
13822 (home-page "https://github.com/Anorov/PySocks")
13823 (synopsis "SOCKS client module")
13824 (description "@code{pysocks} is an updated and semi-actively maintained
13825 version of @code{SocksiPy} with bug fixes and extra features.")
13826 (license license:bsd-3)))
13828 (define-public python2-pysocks
13829 (package-with-python2 python-pysocks))
13831 (define-public python-pydiff
13833 (name "python-pydiff")
13838 (uri (pypi-uri "pydiff" version))
13841 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13842 (build-system python-build-system)
13843 (home-page "https://github.com/myint/pydiff")
13844 (synopsis "Library to diff two Python files at the bytecode level")
13846 "@code{pydiff} makes it easy to look for actual code changes while
13847 ignoring formatting changes.")
13848 (license license:expat)))
13850 (define-public python2-pydiff
13851 (package-with-python2 python-pydiff))
13853 (define-public python-tqdm
13855 (name "python-tqdm")
13860 (uri (pypi-uri "tqdm" version))
13863 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13864 (build-system python-build-system)
13866 `(("python-flake8" ,python-flake8)
13867 ("python-nose" ,python-nose)
13868 ("python-coverage" ,python-coverage)))
13869 (home-page "https://github.com/tqdm/tqdm")
13870 (synopsis "Fast, extensible progress meter")
13872 "Make loops show a progress bar on the console by just wrapping any
13873 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13874 design and layout.")
13875 (license (list license:mpl2.0 license:expat))
13876 (properties `((python2-variant . ,(delay python2-tqdm))))))
13878 (define-public python2-tqdm
13879 (let ((tqdm (package-with-python2
13880 (strip-python2-variant python-tqdm))))
13881 (package (inherit tqdm)
13882 (native-inputs `(("python2-functools32" ,python2-functools32)
13883 ,@(package-native-inputs tqdm))))))
13885 (define-public python-pkginfo
13887 (name "python-pkginfo")
13892 (uri (pypi-uri "pkginfo" version))
13895 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13896 (build-system python-build-system)
13898 ;; The tests are broken upstream.
13901 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13903 "Query metadatdata from sdists, bdists, and installed packages")
13905 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13906 source distriubtion (an sdist) or a binary distribution (e.g., created by
13907 running bdist_egg). It can also query the EGG-INFO directory of an installed
13908 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13909 created by running @code{python setup.py develop}).")
13910 (license license:expat)))
13912 (define-public python2-pkginfo
13913 (package-with-python2 python-pkginfo))
13915 (define-public python-twine
13917 (name "python-twine")
13922 (uri (pypi-uri "twine" version))
13925 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13926 (build-system python-build-system)
13928 `(("python-tqdm" ,python-tqdm)
13929 ("python-pkginfo" ,python-pkginfo)
13930 ("python-requests" ,python-requests)
13931 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13932 (home-page "https://github.com/pypa/twine")
13933 (synopsis "Collection of utilities for interacting with PyPI")
13935 "@code{twine} currently supports registering projects and uploading
13936 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13937 their files and supports any packaging format (including wheels).")
13938 (license license:asl2.0)))
13940 (define-public python2-twine
13941 (package-with-python2 python-twine))
13943 (define-public python-linecache2
13945 (name "python-linecache2")
13950 (uri (pypi-uri "linecache2" version))
13953 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13954 (build-system python-build-system)
13956 `(;; The tests depend on unittest2, and our version is a bit too old.
13959 `(("python-pbr" ,python-pbr-minimal)))
13961 "https://github.com/testing-cabal/linecache2")
13962 (synopsis "Backports of the linecache module")
13964 "The linecache module allows one to get any line from any file, while
13965 attempting to optimize internally, using a cache, the common case where many
13966 lines are read from a single file.")
13967 (license license:psfl)))
13969 (define-public python2-linecache2
13970 (package-with-python2 python-linecache2))
13972 (define-public python-traceback2
13974 (name "python-traceback2")
13979 (uri (pypi-uri "traceback2" version))
13982 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13983 (build-system python-build-system)
13985 `(;; python-traceback2 and python-unittest2 depend on one another.
13988 `(("python-pbr" ,python-pbr-minimal)))
13990 `(("python-linecache2" ,python-linecache2)))
13992 "https://github.com/testing-cabal/traceback2")
13993 (synopsis "Backports of the traceback module")
13995 "This module provides a standard interface to extract, format and print
13996 stack traces of Python programs. It exactly mimics the behavior of the Python
13997 interpreter when it prints a stack trace.")
13998 (license license:psfl)))
14000 (define-public python2-traceback2
14001 (package-with-python2 python-traceback2))
14003 (define-public python-ratelimiter
14005 (name "python-ratelimiter")
14010 (uri (pypi-uri "ratelimiter" version))
14013 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14014 (build-system python-build-system)
14016 '(#:tests? #f)) ; There are no tests in the pypi archive.
14017 (home-page "https://github.com/RazerM/ratelimiter")
14018 (synopsis "Simple rate limiting object")
14020 "The @code{ratelimiter} module ensures that an operation will not be
14021 executed more than a given number of times during a given period.")
14022 (license license:asl2.0)))
14024 (define-public python2-ratelimiter
14025 (package-with-python2 python-ratelimiter))
14027 (define-public python-dukpy
14029 (name "python-dukpy")
14034 (uri (git-reference
14035 (url "https://github.com/kovidgoyal/dukpy.git")
14036 (commit (string-append "v" version))))
14037 (file-name (git-file-name name version))
14039 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14040 (build-system python-build-system)
14041 (home-page "https://github.com/kovidgoyal/dukpy")
14042 (synopsis "Run JavaScript in python")
14044 "dukpy is a JavaScript runtime environment for Python using the duktape
14045 embeddable JavaScript engine.")
14046 ;; Dukpy is licensed under MIT like the embedded duktape library,
14047 ;; with 'errors.c' as GPL3.
14048 (license (list license:expat license:gpl3))))
14050 (define-public python2-dukpy
14051 (package-with-python2 python-dukpy))
14053 (define-public python-jsonrpclib-pelix
14055 (name "python-jsonrpclib-pelix")
14060 (uri (pypi-uri "jsonrpclib-pelix" version))
14063 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14064 (build-system python-build-system)
14066 `(#:tests? #f)) ; no tests in PyPI tarball
14067 (home-page "https://github.com/tcalmant/jsonrpclib/")
14068 (synopsis "JSON-RPC 2.0 client library for Python")
14070 "This library implements the JSON-RPC v2.0
14071 specification (backwards-compatible) as a client library for Python. This
14072 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14074 (license license:asl2.0)))
14076 (define-public python2-jsonrpclib-pelix
14077 (package-with-python2 python-jsonrpclib-pelix))
14079 (define-public python-setuptools-scm-git-archive
14081 (name "python-setuptools-scm-git-archive")
14086 (uri (pypi-uri "setuptools_scm_git_archive" version))
14089 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14090 (build-system python-build-system)
14092 `(("python-pytest" ,python-pytest)))
14094 `(("python-setuptools-scm" ,python-setuptools-scm)))
14095 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14096 (synopsis "Setuptools_scm plugin for git archives")
14098 "The setuptools_scm_git_archive package is a plugin to
14099 setuptools_scm, which supports obtaining versions from git archives that
14100 belong to tagged versions.")
14101 (license license:expat)))
14103 (define-public python2-setuptools-scm-git-archive
14104 (package-with-python2 python-setuptools-scm-git-archive))
14106 (define-public python-setuptools-git
14108 (name "python-setuptools-git")
14113 (uri (pypi-uri "setuptools-git" version))
14116 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14117 (build-system python-build-system)
14120 (modify-phases %standard-phases
14121 ;; This is needed for tests.
14122 (add-after 'unpack 'configure-git
14124 (setenv "HOME" "/tmp")
14125 (invoke "git" "config" "--global" "user.email" "guix")
14126 (invoke "git" "config" "--global" "user.name" "guix")
14129 `(("git" ,git-minimal)))
14130 (home-page "https://github.com/msabramo/setuptools-git")
14131 (synopsis "Setuptools revision control system plugin for Git")
14133 "This package provides a plugin for Setuptools for revision control with
14135 (license license:bsd-3)))
14137 (define-public python-pyclipper
14139 (name "python-pyclipper")
14140 (version "1.1.0.post3")
14144 (uri (pypi-uri "pyclipper" version ".zip"))
14146 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14147 (modules '((guix build utils)))
14150 ;; This file is generated by Cython.
14151 (delete-file "pyclipper/pyclipper.cpp") #t))))
14152 (build-system python-build-system)
14155 (modify-phases %standard-phases
14156 (add-before 'build 'cythonize-sources
14158 (with-directory-excursion "pyclipper"
14159 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14161 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14163 `(("python-cython" ,python-cython)
14164 ("python-pytest" ,python-pytest)
14165 ("python-pytest-runner" ,python-pytest-runner)
14166 ("python-unittest2" ,python-unittest2)
14168 (home-page "https://github.com/greginvm/pyclipper")
14169 (synopsis "Wrapper for Angus Johnson's Clipper library")
14171 "Pyclipper is a Cython wrapper for the C++ translation of the
14172 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14173 (license license:expat)))
14175 (define-public python2-pyclipper
14176 (package-with-python2 python-pyclipper))
14178 (define-public python2-booleanoperations
14180 (name "python2-booleanoperations")
14185 (uri (pypi-uri "booleanOperations" version ".zip"))
14188 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14189 (build-system python-build-system)
14191 `(#:python ,python-2))
14194 ("python2-pytest" ,python2-pytest)
14195 ("python2-pytest-runner" ,python2-pytest-runner)))
14197 `(("python-fonttools" ,python2-fonttools)
14198 ("python-pyclipper" ,python2-pyclipper)
14199 ("python-ufolib" ,python2-ufolib)))
14200 (home-page "https://github.com/typemytype/booleanOperations")
14201 (synopsis "Boolean operations on paths")
14203 "BooleanOperations provides a Python library that enables
14204 boolean operations on paths.")
14205 (license license:expat)))
14207 (define-public python-tempdir
14209 (name "python-tempdir")
14214 (uri (pypi-uri "tempdir" version))
14217 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14218 (build-system python-build-system)
14219 (home-page "https://pypi.org/project/tempdir/")
14221 ;; the package has no tests
14223 (synopsis "Python library for managing temporary directories")
14225 "This library manages temporary directories that are automatically
14226 deleted with all their contents when they are no longer needed. It is
14227 particularly convenient for use in tests.")
14228 (license license:expat)))
14230 (define-public python2-tempdir
14231 (package-with-python2 python-tempdir))
14233 (define-public python-activepapers
14235 (name "python-activepapers")
14240 (uri (pypi-uri "ActivePapers.Py" version))
14243 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14244 (build-system python-build-system)
14246 `(#:modules ((ice-9 ftw)
14249 (guix build python-build-system))
14252 (modify-phases %standard-phases
14253 (add-after 'unpack 'delete-python2-code
14255 (for-each delete-file
14256 '("lib/activepapers/builtins2.py"
14257 "lib/activepapers/standardlib2.py"
14258 "lib/activepapers/utility2.py"))))
14261 ;; Deactivate the test cases that download files
14262 (setenv "NO_NETWORK_ACCESS" "1")
14263 ;; For some strange reason, some tests fail if nosetests runs all
14264 ;; test modules in a single execution. They pass if each test
14265 ;; module is run individually.
14266 (for-each (lambda (filename)
14267 (invoke "nosetests"
14268 (string-append "tests/" filename)))
14271 (string-suffix? ".py" filename)))))))))
14273 `(("python-tempdir" ,python-tempdir)
14274 ("python-nose" ,python-nose)))
14276 `(("python-h5py" ,python-h5py)))
14277 (home-page "http://www.activepapers.org/")
14278 (synopsis "Executable papers for scientific computing")
14280 "ActivePapers is a tool for working with executable papers, which
14281 combine data, code, and documentation in single-file packages,
14282 suitable for publication as supplementary material or on repositories
14283 such as figshare or Zenodo.")
14284 (properties `((python2-variant . ,(delay python2-activepapers))))
14285 (license license:bsd-3)))
14287 (define-public python2-activepapers
14288 (let ((base (package-with-python2
14289 (strip-python2-variant python-activepapers))))
14293 (substitute-keyword-arguments (package-arguments base)
14295 `(modify-phases ,phases
14296 (delete 'delete-python2-code)
14297 (add-after 'unpack 'delete-python3-code
14299 (for-each delete-file
14300 '("lib/activepapers/builtins3.py"
14301 "lib/activepapers/standardlib3.py"
14302 "lib/activepapers/utility3.py")))))))))))
14304 (define-public python-semver
14306 (name "python-semver")
14311 (uri (pypi-uri "semver" version))
14314 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14315 (build-system python-build-system)
14318 (modify-phases %standard-phases
14319 (add-after 'unpack 'patch-test-requirements
14321 (substitute* "setup.py"
14322 ;; Our Python is new enough.
14323 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14326 `(("python-tox" ,python-tox)
14327 ("python-virtualenv" ,python-virtualenv)))
14328 (home-page "https://github.com/k-bx/python-semver")
14329 (synopsis "Python helper for Semantic Versioning")
14330 (description "This package provides a Python library for
14331 @url{Semantic Versioning, http://semver.org/}.")
14332 (license license:bsd-3)))
14334 (define-public python2-semver
14335 (package-with-python2 python-semver))
14337 (define-public python-pyro4
14339 (name "python-pyro4")
14344 (uri (pypi-uri "Pyro4" version))
14346 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14347 (build-system python-build-system)
14349 '(#:tests? #f)) ;FIXME: Some tests require network access.
14351 `(("python-cloudpickle" ,python-cloudpickle)
14352 ("python-dill" ,python-dill)
14353 ("python-msgpack" ,python-msgpack)))
14355 `(("python-serpent" ,python-serpent)))
14356 (home-page "https://pyro4.readthedocs.io")
14357 (synopsis "Distributed object middleware for Python")
14359 "Pyro enables you to build applications in which objects can talk to each
14360 other over the network. You can just use normal Python method calls to call
14361 objects on other machines, also known as remote procedure calls (RPC).")
14362 (license license:expat)))
14364 (define-public python2-pyro
14366 (name "python2-pyro")
14371 (uri (pypi-uri "Pyro" version))
14372 (file-name (string-append "Pyro-" version ".tar.gz"))
14375 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14376 (build-system python-build-system)
14378 ;; Pyro is not compatible with Python 3
14379 `(#:python ,python-2
14380 ;; Pyro has no test cases for automatic execution
14382 (home-page "http://pythonhosted.org/Pyro/")
14383 (synopsis "Distributed object manager for Python")
14384 (description "Pyro is a Distributed Object Technology system
14385 written in Python that is designed to be easy to use. It resembles
14386 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14387 which is a system and language independent Distributed Object Technology
14388 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14389 longer maintained. New projects should use Pyro4 instead, which
14390 is the new Pyro version that is actively developed.")
14391 (license license:expat)))
14393 (define-public python2-scientific
14395 (name "python2-scientific")
14400 (uri (git-reference
14401 (url "https://github.com/khinsen/ScientificPython")
14402 (commit (string-append "rel" version))))
14403 (file-name (git-file-name name version))
14406 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14407 (build-system python-build-system)
14409 `(("netcdf" ,netcdf)))
14411 `(("python-numpy" ,python2-numpy-1.8)
14412 ("python-pyro" ,python2-pyro)))
14414 ;; ScientificPython is not compatible with Python 3
14415 `(#:python ,python-2
14416 #:tests? #f ; No test suite
14418 (modify-phases %standard-phases
14420 (lambda* (#:key inputs #:allow-other-keys)
14421 (invoke "python" "setup.py" "build"
14422 (string-append "--netcdf_prefix="
14423 (assoc-ref inputs "netcdf"))))))))
14424 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14425 (synopsis "Python modules for scientific computing")
14426 (description "ScientificPython is a collection of Python modules that are
14427 useful for scientific computing. Most modules are rather general (Geometry,
14428 physical units, automatic derivatives, ...) whereas others are more
14429 domain-specific (e.g. netCDF and PDB support). The library is currently
14430 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14431 (license license:cecill-c)))
14433 (define-public python2-mmtk
14435 (name "python2-mmtk")
14440 (uri (git-reference
14441 (url "https://github.com/khinsen/MMTK")
14442 (commit (string-append "rel" version))))
14443 (file-name (git-file-name name version))
14446 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14447 (build-system python-build-system)
14449 `(("netcdf" ,netcdf)))
14451 `(("python-scientific" ,python2-scientific)
14452 ("python-tkinter" ,python-2 "tk")))
14454 `(#:python ,python-2
14457 (modify-phases %standard-phases
14458 (add-before 'build 'includes-from-scientific
14459 (lambda* (#:key inputs #:allow-other-keys)
14460 (mkdir-p "Include/Scientific")
14463 (assoc-ref inputs "python-scientific")
14464 "/include/python2.7/Scientific")
14465 "Include/Scientific"))))))
14466 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14467 (synopsis "Python library for molecular simulation")
14468 (description "MMTK is a library for molecular simulations with an emphasis
14469 on biomolecules. It provides widely used methods such as Molecular Dynamics
14470 and normal mode analysis, but also basic routines for implementing new methods
14471 for simulation and analysis. The library is currently not actively maintained
14472 and works only with Python 2 and NumPy < 1.9.")
14473 (license license:cecill-c)))
14475 (define-public python-phonenumbers
14477 (name "python-phonenumbers")
14482 (uri (pypi-uri "phonenumbers" version))
14485 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14486 (build-system python-build-system)
14488 "https://github.com/daviddrysdale/python-phonenumbers")
14490 "Python library for dealing with international phone numbers")
14492 "This package provides a Python port of Google's libphonenumber library.")
14493 (license license:asl2.0)))
14495 (define-public python2-phonenumbers
14496 (package-with-python2 python-phonenumbers))
14498 (define-public python-send2trash
14500 (name "python-send2trash")
14503 (origin (method git-fetch)
14504 ;; Source tarball on PyPI doesn't include tests.
14505 (uri (git-reference
14506 (url "https://github.com/hsoft/send2trash.git")
14508 (file-name (git-file-name name version))
14511 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14512 (build-system python-build-system)
14515 (modify-phases %standard-phases
14516 (add-before 'check 'pre-check
14518 (mkdir-p "/tmp/foo")
14519 (setenv "HOME" "/tmp/foo")
14521 (home-page "https://github.com/hsoft/send2trash")
14522 (synopsis "Send files to the user's @file{~/Trash} directory")
14523 (description "This package provides a Python library to send files to the
14524 user's @file{~/Trash} directory.")
14525 (properties `((python2-variant . ,(delay python2-send2trash))))
14526 (license license:bsd-3)))
14528 (define-public python2-send2trash
14530 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14532 (substitute-keyword-arguments (package-arguments python-send2trash)
14534 `(modify-phases ,phases
14535 (add-before 'check 'setenv
14537 (setenv "PYTHONPATH"
14538 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14541 (define-public python-yapf
14543 (name "python-yapf")
14548 (uri (pypi-uri "yapf" version))
14551 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14552 (build-system python-build-system)
14553 (home-page "https://github.com/google/yapf")
14554 (synopsis "Formatter for Python code")
14555 (description "YAPF is a formatter for Python code. It's based off of
14556 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14557 takes the code and reformats it to the best formatting that conforms to the
14558 style guide, even if the original code didn't violate the style guide.")
14559 (license license:asl2.0)))
14561 (define-public python2-yapf
14562 (package-with-python2 python-yapf))
14564 (define-public python-gyp
14565 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14568 (name "python-gyp")
14569 ;; Google does not release versions,
14570 ;; based on second most recent commit date.
14571 (version (git-version "0.0.0" revision commit))
14574 ;; Google does not release tarballs,
14575 ;; git checkout is needed.
14577 (uri (git-reference
14578 (url "https://chromium.googlesource.com/external/gyp")
14580 (file-name (git-file-name name version))
14583 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14584 (build-system python-build-system)
14585 (home-page "https://gyp.gsrc.io/")
14586 (synopsis "GYP is a Meta-Build system")
14588 "GYP builds build systems for large, cross platform applications.
14589 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14590 files, and Makefiles.")
14591 (license license:bsd-3))))
14593 (define-public python2-gyp
14594 (package-with-python2 python-gyp))
14596 (define-public python-whatever
14598 (name "python-whatever")
14603 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14606 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
14607 (file-name (string-append name "-" version ".tar.gz"))))
14608 (build-system python-build-system)
14611 (modify-phases %standard-phases
14614 (invoke "py.test"))))))
14616 `(("python-pytest" ,python-pytest)))
14617 (home-page "http://github.com/Suor/whatever")
14618 (synopsis "Make anonymous functions by partial application of operators")
14619 (description "@code{whatever} provides an easy way to make anonymous
14620 functions by partial application of operators.")
14621 (license license:bsd-3)))
14623 (define-public python2-whatever
14624 (package-with-python2 python-whatever))
14626 (define-public python-funcy
14628 (name "python-funcy")
14633 (uri (git-reference
14634 (url "https://github.com/Suor/funcy.git")
14637 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14638 (file-name (git-file-name name version))))
14639 (build-system python-build-system)
14642 (modify-phases %standard-phases
14645 (invoke "py.test"))))))
14647 `(("python-pytest" ,python-pytest)
14648 ("python-whatever" ,python-whatever)))
14649 (home-page "http://github.com/Suor/funcy")
14650 (synopsis "Functional tools")
14651 (description "@code{funcy} is a library that provides functional tools.
14654 @item merge - Merges collections of the same type
14655 @item walk - Type-preserving map
14656 @item select - Selects a part of a collection
14657 @item take - Takes the first n items of a collection
14658 @item first - Takes the first item of a collection
14659 @item remove - Predicated-removes items of a collection
14660 @item concat - Concatenates two collections
14661 @item flatten - Flattens a collection with subcollections
14662 @item distinct - Returns only distinct items
14663 @item split - Predicated-splits a collection
14664 @item split_at - Splits a collection at a given item
14665 @item group_by - Groups items by group
14666 @item pairwise - Pairs off adjacent items
14667 @item partial - Partially-applies a function
14668 @item curry - Curries a function
14669 @item compose - Composes functions
14670 @item complement - Complements a predicate
14671 @item all_fn - \"all\" with predicate
14673 (license license:bsd-3)))
14675 (define-public python2-funcy
14676 (package-with-python2 python-funcy))
14678 (define-public python-isoweek
14680 (name "python-isoweek")
14685 (uri (pypi-uri "isoweek" version))
14688 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14689 (build-system python-build-system)
14690 (home-page "https://github.com/gisle/isoweek")
14691 (synopsis "Objects representing a week")
14692 (description "The @code{isoweek} module provide the class Week that
14693 implements the week definition of ISO 8601. This standard also defines
14694 a notation for identifying weeks; yyyyWww (where the W is a literal).
14695 Week instances stringify to this form.")
14696 (license license:bsd-3)))
14698 (define-public python2-isoweek
14699 (package-with-python2 python-isoweek))
14701 (define-public python-tokenize-rt
14703 (name "python-tokenize-rt")
14708 (uri (pypi-uri "tokenize-rt" version))
14711 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14712 (build-system python-build-system)
14713 (home-page "https://github.com/asottile/tokenize-rt")
14714 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14716 "This Python library is a wrapper around @code{tokenize} from the Python
14717 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14718 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14719 and @code{tokens_to_src} to roundtrip.")
14720 (license license:expat)))
14722 (define-public python-future-fstrings
14724 (name "python-future-fstrings")
14729 (uri (pypi-uri "future_fstrings" version))
14732 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14733 (build-system python-build-system)
14735 `(("python-tokenize-rt" ,python-tokenize-rt)))
14736 (home-page "https://github.com/asottile/future-fstrings")
14737 (synopsis "Backport of fstrings to Python < 3.6")
14739 "This package provides a UTF-8 compatible encoding
14740 @code{future_fstrings}, which performs source manipulation. It decodes the
14741 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14742 @code{f} strings.")
14743 (license license:expat)))
14745 (define-public python-typed-ast
14747 (name "python-typed-ast")
14752 (uri (git-reference
14753 (url "https://github.com/python/typed_ast.git")
14756 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14757 (file-name (git-file-name name version))))
14758 (build-system python-build-system)
14760 `(#:modules ((guix build utils)
14761 (guix build python-build-system)
14766 (modify-phases %standard-phases
14769 (let ((cwd (getcwd)))
14770 (setenv "PYTHONPATH"
14771 (string-append cwd "/build/"
14772 (find (cut string-prefix? "lib" <>)
14773 (scandir (string-append cwd "/build")))
14775 (getenv "PYTHONPATH"))))
14778 (native-inputs `(("python-pytest" ,python-pytest)))
14779 (home-page "https://github.com/python/typed_ast")
14780 (synopsis "Fork of Python @code{ast} modules with type comment support")
14781 (description "This package provides a parser similar to the standard
14782 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14783 include PEP 484 type comments and are independent of the version of Python
14784 under which they are run. The @code{typed_ast} parsers produce the standard
14785 Python AST (plus type comments), and are both fast and correct, as they are
14786 based on the CPython 2.7 and 3.7 parsers.")
14787 ;; See the file "LICENSE" for the details.
14788 (license (list license:psfl
14790 license:expat)))) ;ast27/Parser/spark.py
14792 (define-public python-typing
14794 (name "python-typing")
14799 (uri (pypi-uri "typing" version))
14802 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14803 (build-system python-build-system)
14804 (home-page "https://docs.python.org/3/library/typing.html")
14805 (synopsis "Type hints for Python")
14806 (description "This is a backport of the standard library @code{typing}
14807 module to Python versions older than 3.5. Typing defines a standard notation
14808 for Python function and variable type annotations. The notation can be used
14809 for documenting code in a concise, standard format, and it has been designed
14810 to also be used by static and runtime type checkers, static analyzers, IDEs
14812 (license license:psfl)))
14814 (define-public python2-typing
14815 (package-with-python2 python-typing))
14817 (define-public python-typing-extensions
14819 (name "python-typing-extensions")
14824 (uri (pypi-uri "typing_extensions" version))
14827 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14828 (build-system python-build-system)
14830 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14831 (synopsis "Experimental type hints for Python")
14833 "The typing_extensions module contains additional @code{typing} hints not
14834 yet present in the of the @code{typing} standard library.
14835 Included are implementations of:
14838 @item ContextManager
14849 @item TYPE_CHECKING
14850 @item AsyncGenerator
14852 (license license:psfl)))
14854 (define-public bpython
14861 (uri (pypi-uri "bpython" version))
14863 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14864 (build-system python-build-system)
14867 (modify-phases %standard-phases
14868 (add-after 'unpack 'remove-failing-test
14870 ;; Remove failing test. FIXME: make it pass
14871 (delete-file "bpython/test/test_args.py")
14873 (add-after 'wrap 'add-aliases
14874 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14875 (lambda* (#:key outputs #:allow-other-keys)
14876 (let ((out (assoc-ref outputs "out")))
14879 (symlink old (string-append out "/bin/" new)))
14880 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14881 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14884 `(("python-pygments" ,python-pygments)
14885 ("python-requests" ,python-requests)
14886 ("python-babel" ,python-babel) ; optional, for internationalization
14887 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14888 ("python-greenlet" ,python-greenlet)
14889 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14890 ("python-six" ,python-six)))
14892 `(("python-sphinx" ,python-sphinx)
14893 ("python-mock" ,python-mock)))
14894 (home-page "https://bpython-interpreter.org/")
14895 (synopsis "Fancy interface to the Python interpreter")
14896 (description "Bpython is a fancy interface to the Python
14897 interpreter. bpython's main features are
14900 @item in-line syntax highlighting,
14901 @item readline-like autocomplete with suggestions displayed as you type,
14902 @item expected parameter list for any Python function,
14903 @item \"rewind\" function to pop the last line of code from memory and
14905 @item send the code you've entered off to a pastebin,
14906 @item save the code you've entered to a file, and
14907 @item auto-indentation.
14909 (license license:expat)))
14911 (define-public bpython2
14912 (let ((base (package-with-python2
14913 (strip-python2-variant bpython))))
14914 (package (inherit base)
14917 `(#:python ,python-2
14919 (modify-phases %standard-phases
14920 (add-after 'unpack 'remove-failing-test
14922 ;; Remove failing test. FIXME: make it pass
14923 (delete-file "bpython/test/test_args.py")
14924 ;; Disable failing test-cases (renaming inhibits they are
14926 (substitute* "bpython/test/test_curtsies_repl.py"
14927 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14928 (string-append a "xxx_off_" b))
14929 (("^(\\s*def )(test_complex\\W)" _ a b)
14930 (string-append a "xxx_off_" b)))
14932 (add-before 'build 'rename-scripts
14933 ;; rename the scripts to bypthon2, bpdb2, etc.
14935 (substitute* "setup.py"
14936 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14937 (string-append name "2" rest "\n"))
14938 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14939 (string-append name "2" (or sub "") rest "\n")))
14942 (define-public python-pyinotify
14944 (name "python-pyinotify")
14948 (uri (pypi-uri "pyinotify" version))
14951 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14952 (build-system python-build-system)
14953 (arguments `(#:tests? #f)) ;no tests
14954 (home-page "https://github.com/seb-m/pyinotify")
14955 (synopsis "Python library for monitoring inotify events")
14957 "@code{pyinotify} provides a Python interface for monitoring
14958 file system events on Linux.")
14959 (license license:expat)))
14961 (define-public python2-pyinotify
14962 (package-with-python2 python-pyinotify))
14964 ;; Ada parser uses this version.
14965 (define-public python2-quex-0.67.3
14967 (name "python2-quex")
14972 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14973 (version-major+minor version)
14974 "/quex-" version ".zip"))
14977 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14978 (build-system python-build-system)
14980 `(("unzip" ,unzip)))
14982 `(#:python ,python-2
14985 (modify-phases %standard-phases
14986 (delete 'configure)
14989 (lambda* (#:key outputs #:allow-other-keys)
14990 (let* ((out (assoc-ref outputs "out"))
14991 (share/quex (string-append out "/share/quex"))
14992 (bin (string-append out "/bin")))
14993 (copy-recursively "." share/quex)
14995 (symlink (string-append share/quex "/quex-exe.py")
14996 (string-append bin "/quex"))
14998 (native-search-paths
14999 (list (search-path-specification
15000 (variable "QUEX_PATH")
15001 (files '("share/quex")))))
15002 (home-page "http://quex.sourceforge.net/")
15003 (synopsis "Lexical analyzer generator in Python")
15004 (description "@code{quex} is a lexical analyzer generator in Python.")
15005 (license license:lgpl2.1+))) ; Non-military
15007 (define-public python2-quex
15008 (package (inherit python2-quex-0.67.3)
15009 (name "python2-quex")
15014 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15017 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15018 (file-name (string-append name "-" version ".tar.gz"))))))
15020 (define-public python-more-itertools
15022 (name "python-more-itertools")
15027 (uri (pypi-uri "more-itertools" version))
15030 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15031 (build-system python-build-system)
15032 (home-page "https://github.com/erikrose/more-itertools")
15033 (synopsis "More routines for operating on iterables, beyond itertools")
15034 (description "Python's built-in @code{itertools} module implements a
15035 number of iterator building blocks inspired by constructs from APL, Haskell,
15036 and SML. @code{more-itertools} includes additional building blocks for
15037 working with iterables.")
15038 (properties `((python2-variant . ,(delay python2-more-itertools))))
15039 (license license:expat)))
15041 ;; The 5.x series are the last versions supporting Python 2.7.
15042 (define-public python2-more-itertools
15044 (inherit python-more-itertools)
15045 (name "python2-more-itertools")
15049 (uri (pypi-uri "more-itertools" version))
15052 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15054 `(#:python ,python2-minimal))
15056 `(("python2-six" ,python2-six-bootstrap)))))
15058 (define-public python-latexcodec
15060 (name "python-latexcodec")
15065 (uri (pypi-uri "latexcodec" version))
15067 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15068 (build-system python-build-system)
15070 `(("python-six" ,python-six)))
15071 (home-page "https://readthedocs.org/projects/latexcodec/")
15072 (synopsis "Work with LaTeX code in Python")
15073 (description "Lexer and codec to work with LaTeX code in Python.")
15074 (license license:expat)))
15076 (define-public python-pybtex
15078 (name "python-pybtex")
15083 (uri (pypi-uri "pybtex" version))
15085 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15086 (build-system python-build-system)
15088 `(("python-nose" ,python-nose)))
15090 `(("python-latexcodec" ,python-latexcodec)
15091 ("python-pyyaml" ,python-pyyaml)
15092 ("python-six" ,python-six)))
15094 `(#:test-target "nosetests"))
15095 (home-page "https://pybtex.org/")
15096 (synopsis "BibTeX-compatible bibliography processor")
15097 (description "Pybtex is a BibTeX-compatible bibliography processor written
15098 in Python. You can simply type pybtex instead of bibtex.")
15099 (license license:expat)))
15101 (define-public python-onetimepass
15103 (name "python-onetimepass")
15108 (uri (pypi-uri "onetimepass" version))
15110 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15111 (build-system python-build-system)
15112 (propagated-inputs `(("python-six" ,python-six)))
15113 (home-page "https://github.com/tadeck/onetimepass/")
15114 (synopsis "One-time password library")
15115 (description "Python one-time password library for HMAC-based (HOTP) and
15116 time-based (TOTP) passwords.")
15117 (license license:expat)))
15119 (define-public python-parso
15121 (name "python-parso")
15126 (uri (pypi-uri "parso" version))
15129 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15131 `(("python-pytest" ,python-pytest)))
15132 (build-system python-build-system)
15134 `(#:phases (modify-phases %standard-phases
15136 (lambda _ (invoke "pytest" "-vv"))))))
15137 (home-page "https://github.com/davidhalter/parso")
15138 (synopsis "Python Parser")
15139 (description "Parso is a Python parser that supports error recovery and
15140 round-trip parsing for different Python versions (in multiple Python versions).
15141 Parso is also able to list multiple syntax errors in your Python file.")
15142 (license license:expat)))
15144 (define-public python2-parso
15145 (package-with-python2 python-parso))
15147 (define-public python-async-generator
15149 (name "python-async-generator")
15154 (uri (pypi-uri "async_generator" version))
15157 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15158 (build-system python-build-system)
15160 `(("python-pytest" ,python-pytest)))
15161 (home-page "https://github.com/python-trio/async_generator")
15162 (synopsis "Async generators and context managers for Python 3.5+")
15163 (description "@code{async_generator} back-ports Python 3.6's native async
15164 generators and Python 3.7's context managers into Python 3.5.")
15166 (license (list license:expat license:asl2.0))))
15168 (define-public python-async-timeout
15170 (name "python-async-timeout")
15175 (uri (pypi-uri "async-timeout" version))
15178 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15179 (build-system python-build-system)
15180 (home-page "https://github.com/aio-libs/async_timeout/")
15181 (synopsis "Timeout context manager for asyncio programs")
15182 (description "@code{async-timeout} provides a timeout timeout context
15183 manager compatible with @code{asyncio}.")
15184 (license license:asl2.0)))
15186 (define-public python-glob2
15188 (name "python-glob2")
15193 (uri (git-reference
15194 (url "https://github.com/miracle2k/python-glob2.git")
15195 (commit (string-append "v" version))))
15196 (file-name (git-file-name name version))
15198 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15199 (build-system python-build-system)
15200 (home-page "https://github.com/miracle2k/python-glob2/")
15201 (synopsis "Extended Version of the python buildin glob module")
15202 (description "This is an extended version of the Python
15203 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15207 @item The ability to capture the text matched by glob patterns, and return
15208 those matches alongside the file names.
15209 @item A recursive @code{**} globbing syntax, akin for example to the
15210 @code{globstar} option of Bash.
15211 @item The ability to replace the file system functions used, in order to glob
15212 on virtual file systems.
15213 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15216 Glob2 currently based on the glob code from Python 3.3.1.")
15217 (license license:bsd-2)))
15219 (define-public python2-glob2
15220 (package-with-python2 python-glob2))
15222 (define-public python-gipc
15224 (name "python-gipc")
15229 (uri (pypi-uri "gipc" version ".zip"))
15232 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15233 (build-system python-build-system)
15235 `(("unzip" ,unzip)))
15237 `(("python-gevent" ,python-gevent)))
15238 (home-page "http://gehrcke.de/gipc")
15239 (synopsis "Child process management in the context of gevent")
15240 (description "Usage of Python's multiprocessing package in a
15241 gevent-powered application may raise problems. With @code{gipc},
15242 process-based child processes can safely be created anywhere within a
15243 gevent-powered application.")
15244 (license license:expat)))
15246 (define-public python2-gipc
15247 (package-with-python2 python-gipc))
15249 (define-public python-fusepy
15251 (name "python-fusepy")
15256 (uri (pypi-uri "fusepy" version))
15259 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15260 (build-system python-build-system)
15263 (modify-phases %standard-phases
15264 (add-before 'build 'set-library-file-name
15265 (lambda* (#:key inputs #:allow-other-keys)
15266 (let ((fuse (assoc-ref inputs "fuse")))
15267 (substitute* "fuse.py"
15268 (("find_library\\('fuse'\\)")
15269 (string-append "'" fuse "/lib/libfuse.so'")))
15273 (home-page "https://github.com/fusepy/fusepy")
15274 (synopsis "Simple ctypes bindings for FUSE")
15275 (description "Python module that provides a simple interface to FUSE and
15276 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15277 (license license:isc)))
15279 (define-public python2-fusepy
15280 (package-with-python2 python-fusepy))
15282 (define-public python2-gdrivefs
15284 (name "python2-gdrivefs")
15289 (uri (pypi-uri "gdrivefs" version))
15292 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15293 (build-system python-build-system)
15295 `(#:python ,python-2
15297 (modify-phases %standard-phases
15298 (add-before 'build 'patch-setup-py
15300 ;; Update requirements from dependency==version
15301 ;; to dependency>=version
15302 (substitute* "gdrivefs/resources/requirements.txt"
15306 `(("python2-gipc" ,python2-gipc)
15307 ("python2-gevent" ,python2-gevent)
15308 ("python2-greenlet" ,python2-greenlet)
15309 ("python2-httplib2" ,python2-httplib2)
15310 ("python2-uritemplate" ,python2-uritemplate)
15311 ("python2-oauth2client" ,python2-oauth2client)
15312 ("python2-six" ,python2-six)))
15314 `(("python2-dateutil" ,python2-dateutil)
15315 ("python2-fusepy" ,python2-fusepy)
15316 ("python2-google-api-client" ,python2-google-api-client)))
15317 (home-page "https://github.com/dsoprea/GDriveFS")
15318 (synopsis "Mount Google Drive as a local file system")
15319 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15320 under Python 2.7.")
15321 (license license:gpl2)))
15323 (define-public pybind11
15329 (uri (git-reference
15330 (url "https://github.com/pybind/pybind11.git")
15331 (commit (string-append "v" version))))
15334 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15335 (file-name (git-file-name name version))))
15336 (build-system cmake-build-system)
15338 `(("python" ,python)
15339 ("python-pytest" ,python-pytest)))
15341 `(#:test-target "check"))
15342 (home-page "https://github.com/pybind/pybind11/")
15343 (synopsis "Seamless operability between C++11 and Python")
15344 (description "pybind11 is a lightweight header-only library that exposes
15345 C++ types in Python and vice versa, mainly to create Python bindings of
15346 existing C++ code. Its goals and syntax are similar to the excellent
15347 Boost.Python library by David Abrahams: to minimize boilerplate code in
15348 traditional extension modules by inferring type information using compile-time
15350 (license license:expat)))
15352 (define-public python-fasteners
15354 (name "python-fasteners")
15359 (uri (pypi-uri "fasteners" version))
15362 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15363 (build-system python-build-system)
15365 `(("python-monotonic" ,python-monotonic)
15366 ("python-six" ,python-six)
15367 ("python-testtools" ,python-testtools)))
15368 (home-page "https://github.com/harlowja/fasteners")
15369 (synopsis "Python package that provides useful locks")
15371 "This package provides a Python program that provides following locks:
15374 @item Locking decorator
15375 @item Reader-writer locks
15376 @item Inter-process locks
15377 @item Generic helpers
15379 (properties `((python2-variant . ,(delay python2-fasteners))))
15380 (license license:asl2.0)))
15382 (define-public python2-fasteners
15383 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15387 `(("python2-futures" ,python2-futures)
15388 ,@(package-propagated-inputs base))))))
15390 (define-public python-requests-file
15392 (name "python-requests-file")
15397 (uri (pypi-uri "requests-file" version))
15400 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15401 (build-system python-build-system)
15403 `(("python-requests" ,python-requests)
15404 ("python-six" ,python-six)))
15406 "https://github.com/dashea/requests-file")
15407 (synopsis "File transport adapter for Requests")
15409 "Requests-File is a transport adapter for use with the Requests Python
15410 library to allow local file system access via @code{file://} URLs.")
15411 (license license:asl2.0)))
15413 (define-public python2-requests-file
15414 (package-with-python2 python-requests-file))
15416 (define-public python-tldextract
15418 (name "python-tldextract")
15423 (uri (pypi-uri "tldextract" version))
15426 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15427 (build-system python-build-system)
15429 `(("python-pytest" ,python-pytest)
15430 ("python-responses" ,python-responses)))
15432 `(("python-idna" ,python-idna)
15433 ("python-requests" ,python-requests)
15434 ("python-requests-file" ,python-requests-file)))
15436 "https://github.com/john-kurkowski/tldextract")
15438 "Separate the TLD from the registered domain and subdomains of a URL")
15440 "TLDExtract accurately separates the TLD from the registered domain and
15441 subdomains of a URL, using the Public Suffix List. By default, this includes
15442 the public ICANN TLDs and their exceptions. It can optionally support the
15443 Public Suffix List's private domains as well.")
15444 (license license:bsd-3)))
15446 (define-public python2-tldextract
15447 (package-with-python2 python-tldextract))
15449 (define-public python-pynamecheap
15451 (name "python-pynamecheap")
15456 (uri (pypi-uri "PyNamecheap" version))
15459 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15460 (build-system python-build-system)
15462 `(("python-requests" ,python-requests)))
15464 "https://github.com/Bemmu/PyNamecheap")
15466 "Namecheap API client in Python")
15468 "PyNamecheap is a Namecheap API client in Python.")
15469 (license license:expat)))
15471 (define-public python2-pynamecheap
15472 (package-with-python2 python-pynamecheap))
15474 (define-public python-dns-lexicon
15476 (name "python-dns-lexicon")
15481 (uri (pypi-uri "dns-lexicon" version))
15484 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15485 (build-system python-build-system)
15487 `(#:tests? #f)) ;requires internet access
15489 `(("python-future" ,python-future)
15490 ("python-pynamecheap" ,python-pynamecheap)
15491 ("python-requests" ,python-requests)
15492 ("python-tldextract" ,python-tldextract)
15493 ("python-urllib3" ,python-urllib3)))
15494 (home-page "https://github.com/AnalogJ/lexicon")
15496 "Manipulate DNS records on various DNS providers")
15498 "Lexicon provides a way to manipulate DNS records on multiple DNS
15499 providers in a standardized way. It has a CLI but it can also be used as a
15500 Python library. It was designed to be used in automation, specifically with
15502 (license license:expat)))
15504 (define-public python2-dns-lexicon
15505 (package-with-python2 python-dns-lexicon))
15507 (define-public python-commandlines
15509 (name "python-commandlines")
15514 (uri (pypi-uri "commandlines" version))
15517 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15518 (build-system python-build-system)
15519 (home-page "https://github.com/chrissimpkins/commandlines")
15520 (synopsis "Command line argument to object parsing library")
15522 "@code{Commandlines} is a Python library for command line application
15523 development that supports command line argument parsing, command string
15524 validation testing and application logic.")
15525 (license license:expat)))
15527 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15528 ;; python-numba. They have a very unflexible relationship.
15529 (define-public python-numba
15531 (name "python-numba")
15536 (uri (pypi-uri "numba" version))
15539 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15540 (build-system python-build-system)
15542 `(#:modules ((guix build utils)
15543 (guix build python-build-system)
15548 (modify-phases %standard-phases
15549 (add-after 'unpack 'disable-proprietary-features
15551 (setenv "NUMBA_DISABLE_HSA" "1")
15552 (setenv "NUMBA_DISABLE_CUDA" "1")
15554 (add-after 'unpack 'remove-failing-tests
15556 ;; FIXME: these tests fail for unknown reasons:
15557 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15558 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15559 (substitute* "numba/tests/test_dispatcher.py"
15560 (("def test(_non_writable_pycache)" _ m)
15561 (string-append "def guix_skip" m))
15562 (("def test(_non_creatable_pycache)" _ m)
15563 (string-append "def guix_skip" m))
15564 (("def test(_frozen)" _ m)
15565 (string-append "def guix_skip" m)))
15567 ;; These tests fail because we don't run the tests from the build
15568 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15569 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15570 (substitute* "numba/tests/test_pycc.py"
15571 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15572 (string-append "def guix_skip" m)))
15576 (let ((cwd (getcwd)))
15577 (setenv "PYTHONPATH"
15578 (string-append cwd "/build/"
15579 (find (cut string-prefix? "lib" <>)
15580 (scandir (string-append cwd "/build")))
15582 (getenv "PYTHONPATH")))
15583 ;; Something is wrong with the PYTHONPATH when running the
15584 ;; tests from the build directory, as it complains about not being
15585 ;; able to import certain modules.
15586 (with-directory-excursion "/tmp"
15587 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15590 `(("python-llvmlite" ,python-llvmlite)
15591 ("python-numpy" ,python-numpy)
15592 ("python-singledispatch" ,python-singledispatch)))
15593 ;; Needed for tests.
15595 `(("python-jinja2" ,python-jinja2)
15596 ("python-pygments" ,python-pygments)))
15597 (home-page "https://numba.pydata.org")
15598 (synopsis "Compile Python code using LLVM")
15599 (description "Numba gives you the power to speed up your applications with
15600 high performance functions written directly in Python. With a few
15601 annotations, array-oriented and math-heavy Python code can be just-in-time
15602 compiled to native machine instructions, similar in performance to C, C++ and
15603 Fortran, without having to switch languages or Python interpreters.
15605 Numba works by generating optimized machine code using the LLVM compiler
15606 infrastructure at import time, runtime, or statically (using the included pycc
15608 (license license:bsd-3)))
15610 (define-public python-anndata
15612 (name "python-anndata")
15617 (uri (pypi-uri "anndata" version))
15620 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15621 (build-system python-build-system)
15623 `(("python-h5py" ,python-h5py)
15624 ("python-natsort" ,python-natsort)
15625 ("python-pandas" ,python-pandas)
15626 ("python-scipy" ,python-scipy)))
15627 (home-page "https://github.com/theislab/anndata")
15628 (synopsis "Annotated data for data analysis pipelines")
15629 (description "Anndata is a package for simple (functional) high-level APIs
15630 for data analysis pipelines. In this context, it provides an efficient,
15631 scalable way of keeping track of data together with learned annotations and
15632 reduces the code overhead typically encountered when using a mostly
15633 object-oriented library such as @code{scikit-learn}.")
15634 (license license:bsd-3)))
15636 (define-public python-dill
15638 (name "python-dill")
15643 (uri (pypi-uri "dill" version))
15645 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15646 (build-system python-build-system)
15647 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15648 (arguments '(#:tests? #f))
15649 (home-page "https://pypi.org/project/dill")
15650 (synopsis "Serialize all of Python")
15651 (description "Dill extends Python's @code{pickle} module for serializing
15652 and de-serializing Python objects to the majority of the built-in Python
15653 types. Dill provides the user the same interface as the @code{pickle} module,
15654 and also includes some additional features. In addition to pickling Python
15655 objects, @code{dill} provides the ability to save the state of an interpreter
15656 session in a single command. Hence, it would be feasible to save a
15657 interpreter session, close the interpreter, ship the pickled file to another
15658 computer, open a new interpreter, unpickle the session and thus continue from
15659 the saved state of the original interpreter session.")
15660 (license license:bsd-3)))
15662 (define-public python-multiprocess
15664 (name "python-multiprocess")
15665 (version "0.70.6.1")
15669 (uri (pypi-uri "multiprocess" version))
15672 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15673 (build-system python-build-system)
15675 `(("python-dill" ,python-dill)))
15676 (home-page "https://pypi.org/project/multiprocess")
15677 (synopsis "Multiprocessing and multithreading in Python")
15679 "This package is a fork of the multiprocessing Python package, a package
15680 which supports the spawning of processes using the API of the standard
15681 library's @code{threading} module.")
15682 (license license:bsd-3)))
15684 (define-public python-toolz
15686 (name "python-toolz")
15691 (uri (pypi-uri "toolz" version))
15694 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15695 (build-system python-build-system)
15696 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15697 ;; unregistered loader type"
15698 (arguments '(#:tests? #f))
15699 (home-page "https://github.com/pytoolz/toolz/")
15700 (synopsis "List processing tools and functional utilities")
15702 "This package provides a set of utility functions for iterators,
15703 functions, and dictionaries.")
15704 (license license:bsd-3)))
15706 (define-public python2-toolz
15707 (package-with-python2 python-toolz))
15709 (define-public python-cytoolz
15711 (name "python-cytoolz")
15712 (version "0.9.0.1")
15716 (uri (pypi-uri "cytoolz" version))
15719 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15720 (build-system python-build-system)
15721 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15723 (arguments '(#:tests? #f))
15725 `(("python-toolz" ,python-toolz)))
15727 `(("python-cython" ,python-cython)))
15728 (home-page "https://github.com/pytoolz/cytoolz")
15729 (synopsis "High performance functional utilities")
15731 "The cytoolz package implements the same API as provided by toolz. The
15732 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15733 that is accessible to other projects developed in Cython.")
15734 (license license:bsd-3)))
15736 (define-public python-sortedcontainers
15738 (name "python-sortedcontainers")
15743 (uri (pypi-uri "sortedcontainers" version))
15746 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15747 (build-system python-build-system)
15749 `(("python-tox" ,python-tox)))
15750 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15751 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15753 "This package provides a sorted collections library, written in
15755 (license license:asl2.0)))
15757 (define-public python-cloudpickle
15759 (name "python-cloudpickle")
15764 (uri (pypi-uri "cloudpickle" version))
15767 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15768 (build-system python-build-system)
15769 ;; FIXME: there are 5 errors in 122 tests:
15770 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15771 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15772 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15773 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15774 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15775 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15776 (arguments '(#:tests? #f))
15778 `(("python-pytest" ,python-pytest)
15779 ("python-mock" ,python-mock)
15780 ("python-tornado" ,python-tornado)))
15781 (home-page "https://github.com/cloudpipe/cloudpickle")
15782 (synopsis "Extended pickling support for Python objects")
15784 "Cloudpickle makes it possible to serialize Python constructs not
15785 supported by the default pickle module from the Python standard library. It
15786 is especially useful for cluster computing where Python expressions are
15787 shipped over the network to execute on remote hosts, possibly close to the
15789 (license license:bsd-3)))
15791 (define-public python2-cloudpickle
15792 (package-with-python2 python-cloudpickle))
15794 (define-public python-locket
15796 (name "python-locket")
15801 (uri (pypi-uri "locket" version))
15804 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15805 (build-system python-build-system)
15806 (home-page "https://github.com/mwilliamson/locket.py")
15807 (synopsis "File-based locks for Python")
15809 "Locket implements a lock that can be used by multiple processes provided
15810 they use the same path.")
15811 (license license:bsd-2)))
15813 (define-public python2-locket
15814 (package-with-python2 python-locket))
15816 (define-public python-blosc
15818 (name "python-blosc")
15823 (uri (pypi-uri "blosc" version))
15826 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15827 (build-system python-build-system)
15828 ;; FIXME: all tests pass, but then this error is printed:
15829 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15830 (arguments '(#:tests? #f))
15832 `(("python-numpy" ,python-numpy)))
15833 (home-page "https://github.com/blosc/python-blosc")
15834 (synopsis "Python wrapper for the Blosc data compressor library")
15835 (description "Blosc is a high performance compressor optimized for binary
15836 data. It has been designed to transmit data to the processor cache faster
15837 than the traditional, non-compressed, direct memory fetch approach via a
15838 @code{memcpy()} system call.
15840 Blosc works well for compressing numerical arrays that contains data with
15841 relatively low entropy, like sparse data, time series, grids with
15842 regular-spaced values, etc.
15844 This Python package wraps the Blosc library.")
15845 (license license:bsd-3)))
15847 (define-public python2-blosc
15848 (package-with-python2 python-blosc))
15850 (define-public python-partd
15852 (name "python-partd")
15857 (uri (pypi-uri "partd" version))
15860 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15861 (build-system python-build-system)
15863 `(("python-blosc" ,python-blosc)
15864 ("python-locket" ,python-locket)
15865 ("python-numpy" ,python-numpy)
15866 ("python-pandas" ,python-pandas)
15867 ("python-pyzmq" ,python-pyzmq)
15868 ("python-toolz" ,python-toolz)))
15869 (home-page "https://github.com/dask/partd/")
15870 (synopsis "Appendable key-value storage")
15871 (description "Partd stores key-value pairs. Values are raw bytes. We
15872 append on old values. Partd excels at shuffling operations.")
15873 (license license:bsd-3)))
15875 (define-public python2-partd
15876 (package-with-python2 python-partd))
15878 (define-public python-dask
15880 (name "python-dask")
15885 (uri (pypi-uri "dask" version))
15887 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15888 (build-system python-build-system)
15889 ;; A single test out of 5000+ fails. This test is marked as xfail when
15890 ;; pytest-xdist is used.
15893 (modify-phases %standard-phases
15894 (add-after 'unpack 'disable-broken-test
15896 (substitute* "dask/tests/test_threaded.py"
15897 (("def test_interrupt\\(\\)" m)
15898 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15900 (when (which "python2")
15901 ;; This test fails with recent Pandas:
15902 ;; <https://github.com/dask/dask/issues/3794>.
15903 (substitute* "dask/dataframe/tests/test_dataframe.py"
15904 (("def test_info\\(\\)" m)
15905 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15909 (lambda _ (invoke "pytest" "-vv"))))))
15911 `(("python-cloudpickle" ,python-cloudpickle)
15912 ("python-numpy" ,python-numpy)
15913 ("python-pandas" ,python-pandas)
15914 ("python-partd" ,python-partd)
15915 ("python-toolz" ,python-toolz)
15916 ("python-pyyaml" ,python-pyyaml)))
15918 `(("python-pytest" ,python-pytest)
15919 ("python-pytest-runner" ,python-pytest-runner)))
15920 (home-page "https://github.com/dask/dask/")
15921 (synopsis "Parallel computing with task scheduling")
15923 "Dask is a flexible parallel computing library for analytics. It
15924 consists of two components: dynamic task scheduling optimized for computation,
15925 and large data collections like parallel arrays, dataframes, and lists that
15926 extend common interfaces like NumPy, Pandas, or Python iterators to
15927 larger-than-memory or distributed environments. These parallel collections
15928 run on top of the dynamic task schedulers. ")
15929 (license license:bsd-3)))
15931 (define-public python2-dask
15932 (package-with-python2 python-dask))
15934 (define-public python-ilinkedlist
15936 (name "python-ilinkedlist")
15941 (uri (pypi-uri "ilinkedlist" version))
15944 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15945 (build-system python-build-system)
15946 (native-inputs `(("python-pytest" ,python-pytest)))
15947 (inputs `(("python" ,python)))
15948 (home-page "https://github.com/luther9/ilinkedlist-py")
15949 (synopsis "Immutable linked list library")
15951 "This is a implementation of immutable linked lists for Python. It
15952 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15953 Since a linked list is treated as immutable, it is hashable, and its length
15954 can be retrieved in constant time. Some of the terminology is inspired by
15955 LISP. It is possible to create an improper list by creating a @code{Pair}
15956 with a non-list @code{cdr}.")
15957 (license license:gpl3+)))
15959 (define-public python-readlike
15961 (name "python-readlike")
15966 (uri (pypi-uri "readlike" version))
15968 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15969 (build-system python-build-system)
15970 (home-page "https://github.com/jangler/readlike")
15971 (synopsis "GNU Readline-like line editing module")
15973 "This Python module provides line editing functions similar to the default
15974 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15975 @code{readline} package, this one allows access to those capabilties in settings
15976 outside of a standard command-line interface. It is especially well-suited to
15977 interfacing with Urwid, due to a shared syntax for describing key inputs.
15979 Currently, all stateless Readline commands are implemented. Yanking and history
15980 are not supported.")
15981 (license license:expat)))
15983 (define-public python2-readlike
15984 (package-with-python2 python-readlike))
15986 (define-public python-reparser
15988 (name "python-reparser")
15993 (uri (pypi-uri "ReParser" version))
15995 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15996 (build-system python-build-system)
15997 (home-page "https://github.com/xmikos/reparser")
15998 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16000 "This Python library provides a simple lexer/parser for inline markup based
16001 on regular expressions.")
16002 (license license:expat)))
16004 (define-public python2-reparser
16005 (let ((reparser (package-with-python2
16006 (strip-python2-variant python-reparser))))
16007 (package (inherit reparser)
16009 `(("python2-enum34" ,python2-enum34)
16010 ,@(package-propagated-inputs reparser))))))
16012 (define-public python-precis-i18n
16014 (name "python-precis-i18n")
16019 (uri (pypi-uri "precis_i18n" version))
16022 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16023 (build-system python-build-system)
16024 (home-page "https://github.com/byllyfish/precis_i18n")
16025 (synopsis "Implementation of the PRECIS framework")
16027 "This module implements the PRECIS Framework as described in RFC 8264,
16028 RFC 8265 and RFC 8266.")
16029 (license license:expat)))
16031 (define-public python-absl-py
16033 (name "python-absl-py")
16038 (uri (pypi-uri "absl-py" version))
16041 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16042 (build-system python-build-system)
16044 `(("python-six" ,python-six)))
16045 (home-page "https://github.com/abseil/abseil-py")
16046 (synopsis "Abseil Python common libraries")
16048 "This package provides the Abseil Python Common Libraries, a collection
16049 of Python libraries for building Python applications.")
16050 (license license:asl2.0)))
16052 (define-public python-astor
16054 (name "python-astor")
16059 (uri (pypi-uri "astor" version))
16062 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16063 (build-system python-build-system)
16064 ;; FIXME: There are two errors and two test failures.
16065 (arguments `(#:tests? #f))
16066 (home-page "https://github.com/berkerpeksag/astor")
16067 (synopsis "Read and write Python ASTs")
16068 (description "Astor is designed to allow easy manipulation of Python
16069 source via the Abstract Syntax Tree.")
16070 (license license:bsd-3)))
16072 (define-public python2-astor
16073 (package-with-python2 python-astor))
16075 (define-public python-grpcio
16077 (name "python-grpcio")
16082 (uri (pypi-uri "grpcio" version))
16085 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16086 (build-system python-build-system)
16088 `(("python-six" ,python-six)))
16089 (home-page "https://grpc.io")
16090 (synopsis "HTTP/2-based RPC framework")
16091 (description "This package provides a Python library for communicating
16092 with the HTTP/2-based RPC framework gRPC.")
16093 (license license:asl2.0)))
16095 (define-public python-astunparse
16097 (name "python-astunparse")
16102 (uri (pypi-uri "astunparse" version))
16104 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16105 (build-system python-build-system)
16106 (arguments '(#:tests? #f)) ; there are none
16108 `(("python-six" ,python-six)
16109 ("python-wheel" ,python-wheel)))
16110 (home-page "https://github.com/simonpercivall/astunparse")
16111 (synopsis "AST unparser for Python")
16112 (description "This package provides an AST unparser for Python. It is a
16113 factored out version of @code{unparse} found in the Python source
16115 (license license:bsd-3)))
16117 (define-public python-gast
16119 (name "python-gast")
16124 (uri (pypi-uri "gast" version))
16126 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16127 (build-system python-build-system)
16129 `(("python-astunparse" ,python-astunparse)))
16130 (home-page "https://pypi.org/project/gast/")
16131 (synopsis "Generic Python AST that abstracts the underlying Python version")
16133 "GAST provides a compatibility layer between the AST of various Python
16134 versions, as produced by @code{ast.parse} from the standard @code{ast}
16136 (license license:bsd-3)))
16138 (define-public python-wikidata
16140 (name "python-wikidata")
16145 (uri (pypi-uri "Wikidata" version))
16148 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16149 (build-system python-build-system)
16151 `(("python-babel" ,python-babel)))
16152 (home-page "https://github.com/dahlia/wikidata")
16153 (synopsis "Wikidata client library")
16155 "This package provides a Python interface to
16156 @url{https://www.wikidata.org/, Wikidata}.")
16157 (properties '((upstream-name . "Wikidata")))
16158 (license license:gpl3+)))
16160 (define-public python-doctest-ignore-unicode
16162 (name "python-doctest-ignore-unicode")
16167 (uri (pypi-uri "doctest-ignore-unicode" version))
16170 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16171 (build-system python-build-system)
16173 `(("python-nose" ,python-nose)))
16174 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16175 (synopsis "Ignore Unicode literal prefixes in doctests")
16177 "This package adds support for a flag to ignore Unicode literal prefixes
16179 (license license:asl2.0)))
16181 (define-public python-attr
16183 (name "python-attr")
16188 (uri (pypi-uri "attr" version))
16191 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16192 (build-system python-build-system)
16193 (home-page "https://github.com/denis-ryzhkov/attr")
16194 (synopsis "Decorator for attributes of target function or class")
16195 (description "Simple decorator to set attributes of target function or
16196 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16197 (license license:expat)))
16199 (define-public python-construct
16201 (name "python-construct")
16206 (uri (pypi-uri "construct" version))
16209 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16210 (build-system python-build-system)
16212 `(#:tests? #f)) ; No tests exist.
16214 `(("python-extras" ,python-extras)
16215 ("python-arrow" ,python-arrow)
16216 ("python-numpy" ,python-numpy)
16217 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16218 (home-page "http://construct.readthedocs.io")
16219 (synopsis "Declarative and symmetrical parser and builder for binary data")
16221 "This package provides both simple, atomic constructs (such as
16222 integers of various sizes), as well as composite ones which allow you
16223 form hierarchical and sequential structures of increasing complexity.
16224 It features bit and byte granularity, easy debugging and testing, an
16225 easy-to-extend subclass system, and lots of primitive constructs to
16226 make your work easier.")
16227 (license license:expat)))
16229 (define-public python-humanize
16231 (name "python-humanize")
16236 (uri (pypi-uri "humanize" version))
16239 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16241 '(#:tests? #f)) ; tests not in pypi archive
16242 (build-system python-build-system)
16243 (home-page "https://github.com/jmoiron/humanize")
16244 (synopsis "Print numerical information in a human-readable form")
16245 (description "This package provides a Python module that displays numbers
16246 and dates in \"human readable\" forms. For example, it would display
16247 \"12345591313\" as \"12.3 billion\".")
16248 (license license:expat)))
16250 (define-public python-txaio
16252 (name "python-txaio")
16257 (uri (pypi-uri "txaio" version))
16260 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16261 (build-system python-build-system)
16263 `(("python-twisted" ,python-twisted)
16264 ("python-six" ,python-six)))
16265 (home-page "https://github.com/crossbario/txaio")
16266 (synopsis "Compatibility layer between Python asyncio and Twisted")
16267 (description "Txaio provides a compatibility layer between the Python
16268 @code{asyncio} module and @code{Twisted}.")
16269 (license license:expat)))
16271 (define-public python-toolshed
16273 (name "python-toolshed")
16278 (uri (pypi-uri "toolshed" version))
16281 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16282 (build-system python-build-system)
16284 `(("python-nose" ,python-nose)))
16285 (home-page "https://github.com/brentp/toolshed/")
16286 (synopsis "Collection of modules and functions for working with data")
16287 (description "This is a collection of well-tested, simple modules and
16288 functions that aim to reduce boilerplate when working with data.")
16289 (license license:bsd-2)))
16291 (define-public python-annoy
16293 (name "python-annoy")
16298 (uri (pypi-uri "annoy" version))
16301 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16302 (build-system python-build-system)
16304 `(("python-nose" ,python-nose)))
16305 (home-page "https://github.com/spotify/annoy/")
16306 (synopsis "Approximate nearest neighbors library")
16308 "Annoy is a C++ library with Python bindings to search for points in
16309 space that are close to a given query point. It also creates large read-only
16310 file-based data structures that are @code{mmap}ped into memory so that many
16311 processes may share the same data.")
16312 (license license:asl2.0)))
16314 (define-public python-pylzma
16316 (name "python-pylzma")
16321 (uri (pypi-uri "pylzma" version))
16324 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16325 (build-system python-build-system)
16326 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16327 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16328 (description "This package provides Python bindings for the LZMA library
16330 (license license:lgpl2.1+)))
16332 (define-public python2-pylzma
16333 (package-with-python2 python-pylzma))
16335 (define-public python2-zeroconf
16337 (name "python2-zeroconf")
16339 ;; This is the last version that supports Python 2.x.
16344 (uri (pypi-uri "zeroconf" version))
16347 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16348 (build-system python-build-system)
16350 `(#:python ,python-2
16352 (modify-phases %standard-phases
16353 (add-after 'unpack 'patch-requires
16354 (lambda* (#:key inputs #:allow-other-keys)
16355 (substitute* "setup.py"
16360 `(("python2-six" ,python2-six)
16361 ("python2-enum32" ,python2-enum34)
16362 ("python2-netifaces" ,python2-netifaces)
16363 ("python2-typing" ,python2-typing)))
16364 (home-page "https://github.com/jstasiak/python-zeroconf")
16365 (synopsis "Pure Python mDNS service discovery")
16367 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16369 (license license:lgpl2.1+)))
16371 (define-public python-bsddb3
16373 (name "python-bsddb3")
16378 (uri (pypi-uri "bsddb3" version))
16381 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16382 (build-system python-build-system)
16387 (modify-phases %standard-phases
16388 (add-after 'unpack 'configure-locations
16389 (lambda* (#:key inputs #:allow-other-keys)
16390 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16391 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16395 (invoke "python3" "test3.py" "-v"))))))
16396 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16397 (synopsis "Python bindings for Oracle Berkeley DB")
16399 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16400 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16401 Transaction objects, and each of these is exposed as a Python type in the
16402 bsddb3.db module. The database objects can use various access methods: btree,
16403 hash, recno, and queue. Complete support of Berkeley DB distributed
16404 transactions. Complete support for Berkeley DB Replication Manager.
16405 Complete support for Berkeley DB Base Replication. Support for RPC.")
16406 (license license:bsd-3)))
16408 (define-public python-dbfread
16410 (name "python-dbfread")
16414 (uri (pypi-uri "dbfread" version))
16417 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16418 (build-system python-build-system)
16420 `(("python-pytest" ,python-pytest)))
16421 (home-page "https://dbfread.readthedocs.io")
16422 (synopsis "Read DBF Files with Python")
16424 "This library reads DBF files and returns the data as native Python data
16425 types for further processing. It is primarily intended for batch jobs and
16427 (license license:expat)))
16429 (define-public python-cached-property
16431 (name "python-cached-property")
16436 (uri (pypi-uri "cached-property" version))
16439 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16440 (build-system python-build-system)
16443 (modify-phases %standard-phases
16444 ;; https://github.com/pydanny/cached-property/issues/131
16445 ;; recent versions of freezegun break one test
16446 (add-after 'unpack 'disable-broken-test
16448 (substitute* "tests/test_cached_property.py"
16449 (("def test_threads_ttl_expiry\\(self\\)" m)
16450 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16454 `(("python-freezegun" ,python-freezegun)))
16456 "https://github.com/pydanny/cached-property")
16458 "Decorator for caching properties in classes")
16460 "This package provides a decorator which makes caching
16461 time-or-computationally-expensive properties quick and easy and works in Python
16463 (license license:bsd-3)))
16465 (define-public python-folium
16467 (name "python-folium")
16472 (uri (pypi-uri "folium" version))
16475 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16476 (build-system python-build-system)
16478 `(("python-branca" ,python-branca)
16479 ("python-jinja2" ,python-jinja2)
16480 ("python-numpy" ,python-numpy)
16481 ("python-requests" ,python-requests)))
16483 `(("python-pytest" ,python-pytest)))
16484 (home-page "https://github.com/python-visualization/folium")
16485 (synopsis "Make beautiful maps with Leaflet.js & Python")
16486 (description "@code{folium} makes it easy to visualize data that’s been
16487 manipulated in Python on an interactive leaflet map. It enables both the
16488 binding of data to a map for @code{choropleth} visualizations as well as
16489 passing rich vector/raster/HTML visualizations as markers on the map.
16491 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16492 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16493 supports Image, Video, GeoJSON and TopoJSON overlays.")
16494 (license license:expat)))
16496 (define-public jube
16498 ;; This is a command-line tool, so no "python-" prefix.
16503 (uri (string-append
16504 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16508 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16509 (file-name (string-append "jube-" version ".tar.gz"))))
16510 (build-system python-build-system)
16511 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16512 (synopsis "Benchmarking environment")
16514 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16515 benchmarked application, benchmark data is stored in a format that allows JUBE
16516 to deduct the desired information. This data can be parsed by automatic pre-
16517 and post-processing scripts that draw information and store it more densely
16518 for manual interpretation.")
16519 (license license:gpl3+)))
16521 (define-public python-pyroutelib3
16523 (name "python-pyroutelib3")
16524 (version "1.3.post1")
16528 (uri (pypi-uri "pyroutelib3" version))
16531 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16532 (build-system python-build-system)
16534 `(("python-dateutil" ,python-dateutil)))
16535 (home-page "https://github.com/MKuranowski/pyroutelib3")
16536 (synopsis "Library for simple routing on OSM data")
16537 (description "Library for simple routing on OSM data")
16538 (license license:gpl3+)))
16540 (define-public python-elementpath
16542 (name "python-elementpath")
16547 (uri (pypi-uri "elementpath" version))
16550 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16551 (build-system python-build-system)
16553 "https://github.com/sissaschool/elementpath")
16555 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16557 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16558 for Python's ElementTree XML data structures, both for the standard
16559 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16561 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16562 because lxml.etree already has it's own implementation of XPath 1.0.")
16563 (license license:expat)))
16565 (define-public python-bibtexparser
16567 (name "python-bibtexparser")
16572 (uri (pypi-uri "bibtexparser" version))
16575 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16576 (build-system python-build-system)
16578 `(("python-pyparsing" ,python-pyparsing)))
16580 `(("python-future" ,python-future)))
16581 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16582 (synopsis "Python library to parse BibTeX files")
16583 (description "BibtexParser is a Python library to parse BibTeX files.")
16584 (license (list license:bsd-3 license:lgpl3))))
16586 (define-public python-distro
16588 (name "python-distro")
16593 (uri (pypi-uri "distro" version))
16596 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16597 (build-system python-build-system)
16599 `(("python-pytest" ,python-pytest)))
16600 (home-page "https://github.com/nir0s/distro")
16602 "OS platform information API")
16604 "@code{distro} provides information about the OS distribution it runs on,
16605 such as a reliable machine-readable ID, or version information.
16607 It is the recommended replacement for Python's original
16608 `platform.linux_distribution` function (which will be removed in Python 3.8).
16609 @code{distro} also provides a command-line interface to output the platform
16610 information in various formats.")
16611 (license license:asl2.0)))
16613 (define-public python-cairosvg
16615 (name "python-cairosvg")
16620 (uri (pypi-uri "CairoSVG" version))
16622 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16623 (build-system python-build-system)
16626 (modify-phases %standard-phases
16628 (lambda _ (invoke "pytest"))))))
16630 `(("python-cairocffi" ,python-cairocffi)
16631 ("python-cssselect2" ,python-cssselect2)
16632 ("python-defusedxml" ,python-defusedxml)
16633 ("python-pillow" ,python-pillow)
16634 ("python-tinycss2" ,python-tinycss2)))
16636 `(("python-pytest-flake8" ,python-pytest-flake8)
16637 ("python-pytest-isort" ,python-pytest-isort)
16638 ("python-pytest-runner" ,python-pytest-runner)))
16639 (home-page "https://cairosvg.org/")
16640 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16641 (description "CairoSVG is a SVG converter based on Cairo. It can export
16642 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16643 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16644 parsed, the result is drawn to a Cairo surface that can be exported to
16645 qvarious formats: PDF, PostScript, PNG and even SVG.")
16646 (license license:lgpl3+)))
16648 (define-public python-pyphen
16650 (name "python-pyphen")
16655 (uri (pypi-uri "Pyphen" version))
16657 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16658 (build-system python-build-system)
16659 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16660 ;; embedded set provided by upstream - like Debian does.
16661 (home-page "https://github.com/Kozea/Pyphen")
16662 (synopsis "Pure Python module to hyphenate text")
16663 (description "Pyphen is a pure Python module to hyphenate text using
16664 existing Hunspell hyphenation dictionaries.")
16665 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16667 (define-public python-intelhex
16669 (name "python-intelhex")
16674 (uri (pypi-uri "intelhex" version))
16677 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16678 (build-system python-build-system)
16679 (arguments '(#:tests? #f)) ;issue with version
16680 (home-page "https://pypi.org/project/IntelHex/")
16681 (synopsis "Python library for Intel HEX files manipulations")
16682 (description "The Intel HEX file format is widely used in microprocessors
16683 and microcontrollers area (embedded systems etc.) as the de facto standard for
16684 representation of code to be programmed into microelectronic devices. This
16685 package provides an intelhex Python library to read, write, create from
16686 scratch and manipulate data from Intel HEX file format. It also includes
16687 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16688 converters and more, those based on the library itself.")
16689 (license license:bsd-3)))
16691 (define-public python-pykwalify
16693 (name "python-pykwalify")
16698 (uri (pypi-uri "pykwalify" version))
16701 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16702 (build-system python-build-system)
16703 (arguments '(#:tests? #f)) ;missing dependencies
16705 `(("python-dateutil" ,python-dateutil)
16706 ("python-docopt" ,python-docopt)
16707 ("python-pyyaml" ,python-pyyaml)))
16708 (home-page "https://github.com/grokzen/pykwalify")
16710 "Python lib/cli for JSON/YAML schema validation")
16712 "This package provides a parser, schema validator, and data binding tool
16713 for YAML and JSON.")
16714 (license license:expat)))
16716 (define-public python-dbusmock
16718 (name "python-dbusmock")
16723 (uri (pypi-uri "python-dbusmock" version))
16726 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16727 (build-system python-build-system)
16730 (modify-phases %standard-phases
16731 (add-after 'unpack 'patch-shell-path
16733 (substitute* "tests/test_code.py"
16734 (("/bin/bash") (which "bash")))
16738 ("dbus" ,dbus) ; for dbus-daemon
16739 ("python-nose" ,python-nose)
16742 `(("python-dbus" ,python-dbus)
16743 ("python-pygobject" ,python-pygobject)))
16744 (home-page "https://github.com/martinpitt/python-dbusmock")
16745 (synopsis "Python library for mock D-Bus objects")
16746 (description "python-dbusmock allows for the easy creation of mock objects on
16747 D-Bus. This is useful for writing tests for software which talks to D-Bus
16748 services such as upower, systemd, logind, gnome-session or others, and it is
16749 hard (or impossible without root privileges) to set the state of the real
16750 services to what you expect in your tests.")
16751 (license license:lgpl3+)))