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 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
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 graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
119 #:use-module (gnu packages monitoring)
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
128 #:use-module (gnu packages python-check)
129 #:use-module (gnu packages python-compression)
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-web)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages shells)
137 #:use-module (gnu packages sphinx)
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages terminals)
140 #:use-module (gnu packages tex)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages time)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages version-control)
145 #:use-module (gnu packages video)
146 #:use-module (gnu packages web)
147 #:use-module (gnu packages base)
148 #:use-module (gnu packages xml)
149 #:use-module (gnu packages xorg)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages tcl)
152 #:use-module (gnu packages bdw-gc)
153 #:use-module (gnu packages serialization)
154 #:use-module (guix packages)
155 #:use-module (guix download)
156 #:use-module (guix git-download)
157 #:use-module (guix hg-download)
158 #:use-module (guix utils)
159 #:use-module (guix build-system gnu)
160 #:use-module (guix build-system cmake)
161 #:use-module (guix build-system python)
162 #:use-module (guix build-system trivial)
163 #:use-module (srfi srfi-1)
164 #:use-module (srfi srfi-26))
166 (define-public python-psutil
168 (name "python-psutil")
173 (uri (pypi-uri "psutil" version))
176 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
177 (build-system python-build-system)
179 ;; FIXME: some tests does not return and times out.
181 (home-page "https://www.github.com/giampaolo/psutil")
182 (synopsis "Library for retrieving information on running processes")
184 "psutil (Python system and process utilities) is a library for retrieving
185 information on running processes and system utilization (CPU, memory, disks,
186 network) in Python. It is useful mainly for system monitoring, profiling and
187 limiting process resources and management of running processes. It implements
188 many functionalities offered by command line tools such as: ps, top, lsof,
189 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
190 pidof, tty, taskset, pmap.")
191 (properties `((python2-variant . ,(delay python2-psutil))))
192 (license license:bsd-3)))
194 (define-public python2-psutil
195 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
199 `(("python2-enum34" ,python2-enum34) ;optional
200 ,@(package-propagated-inputs base))))))
202 (define-public python-shapely
204 (name "python-shapely")
205 (version "1.6.4.post2")
209 (uri (pypi-uri "Shapely" version))
212 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
213 (build-system python-build-system)
215 `(("python-cython" ,python-cython)
216 ("python-matplotlib" ,python-matplotlib)
217 ("python-pytest" ,python-pytest)
218 ("python-pytest-cov" ,python-pytest-cov)))
222 `(("python-numpy" ,python-numpy)))
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch-geos-path
227 (lambda* (#:key inputs #:allow-other-keys)
228 (let ((geos (assoc-ref inputs "geos"))
229 (glibc (assoc-ref inputs ,(if (%current-target-system)
230 "cross-libc" "libc"))))
231 (substitute* "shapely/geos.py"
232 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
233 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
234 geos "/lib/libgeos_c.so'])"))
235 (("free = load_dll\\('c'\\)\\.free")
236 (string-append "free = load_dll('c', fallbacks=['"
237 glibc "/lib/libc.so.6']).free"))))
239 (home-page "https://github.com/Toblerity/Shapely")
240 (synopsis "Library for the manipulation and analysis of geometric objects")
241 (description "Shapely is a Python package for manipulation and analysis of
242 planar geometric objects. It is based on the @code{GEOS} library.")
243 (license license:bsd-3)))
245 (define-public python-shortuuid
247 (name "python-shortuuid")
252 (uri (pypi-uri "shortuuid" version))
255 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
256 (build-system python-build-system)
258 `(("python-pep8" ,python-pep8)))
259 (home-page "https://github.com/skorokithakis/shortuuid")
260 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
262 "@code{shortuuid} is a Python library for generating concise, unambiguous
263 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
264 module and then similar looking characters are removed.")
265 (license license:bsd-3)))
267 (define-public python-logwrap
269 (name "python-logwrap")
274 (uri (pypi-uri "logwrap" version ".zip"))
277 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
278 (build-system python-build-system)
280 `(("python-six" ,python-six)
281 ("python-typing" ,python-typing)))
284 ("python-cython" ,python-cython)
285 ("python-pytest" ,python-pytest)
286 ("python-pytest-cov" ,python-pytest-cov)
287 ("python-pytest-runner" ,python-pytest-runner)))
288 (home-page "https://github.com/penguinolog/logwrap")
289 (synopsis "Decorator for logging function arguments")
290 (description "This package provides a decorator to log function arguments
291 and function call return values in a human-readable way.")
292 (license license:asl2.0)))
294 (define-public python2-shapely
295 (package-with-python2 python-shapely))
297 (define-public python-clyent
299 (name "python-clyent")
304 (uri (pypi-uri "clyent" version))
307 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
308 (build-system python-build-system)
310 `(("python-mock" ,python-mock)))
311 (home-page "https://github.com/binstar/clyent")
312 (synopsis "Command line client library")
313 (description "Clyent is a Python command line utiliy library. It is used
314 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
315 (license license:bsd-3)))
317 (define-public python2-clyent
318 (package-with-python2 python-clyent))
320 (define-public python-babel
322 (name "python-babel")
327 (uri (pypi-uri "Babel" version))
330 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
331 (build-system python-build-system)
333 `(("python-freezegun" ,python-freezegun)
334 ("python-pytest" ,python-pytest)))
336 `(("python-pytz" ,python-pytz)))
338 `(#:phases (modify-phases %standard-phases
341 (invoke "pytest" "-vv" "-k"
343 ;; XXX: These tests fail when using Pytest 4.x and
344 ;; Babel 2.6.0. Try removing this for later versions.
345 "not test_no_inherit_metazone_marker_never_in_output"
346 " and not test_smoke_dates"
347 " and not test_smoke_numbers")))))))
348 (home-page "http://babel.pocoo.org/")
350 "Tools for internationalizing Python applications")
352 "Babel is composed of two major parts:
353 - tools to build and work with gettext message catalogs
354 - a Python interface to the CLDR (Common Locale Data Repository), providing
355 access to various locale display names, localized number and date formatting,
357 (license license:bsd-3)))
359 (define-public python2-babel
360 (package-with-python2 python-babel))
362 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
363 (define-public python2-babel-2.6
365 (inherit python2-babel)
369 (uri (pypi-uri "Babel" version))
372 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
374 (define-public python2-backport-ssl-match-hostname
376 (name "python2-backport-ssl-match-hostname")
381 (uri (pypi-uri "backports.ssl_match_hostname" version))
384 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
385 (build-system python-build-system)
388 #:tests? #f)) ; no test target
389 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
390 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
392 "This backport brings the ssl.match_hostname() function to users of
393 earlier versions of Python. The function checks the hostname in the
394 certificate returned by the server to which a connection has been established,
395 and verifies that it matches the intended target hostname.")
396 (license license:psfl)))
398 (define-public python-boolean.py
400 (name "python-boolean.py")
404 ;; There's no source tarball on PyPI.
407 (url "https://github.com/bastikr/boolean.py")
408 (commit (string-append "v" version))))
409 (file-name (git-file-name name version))
411 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
412 (build-system python-build-system)
413 (home-page "https://github.com/bastikr/boolean.py")
414 (synopsis "Boolean algebra in one Python module")
416 "This is a small Python library that implements boolean algebra.
417 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
418 @code{Symbol} class that can take on one of these two values. Calculations
419 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
420 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
421 Expressions are constructed from parsed strings or directly in Python.")
422 (license license:bsd-2)))
424 (define-public python-hdf4
431 (uri (pypi-uri name version))
434 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
435 (build-system python-build-system)
436 (native-inputs `(("nose" ,python-nose)))
437 (propagated-inputs `(("numpy" ,python-numpy)))
444 (modify-phases %standard-phases
447 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
448 ;; on to import numpy. Somehow this works on their CI system.
449 ;; Let's just manage PYTHONPATH here instead.
450 (substitute* "runexamples.sh"
451 (("export PYTHONPATH=.*") ""))
453 (string-append (getcwd) ":"
454 (getenv "PYTHONPATH")))
455 (invoke "./runexamples.sh")
456 (invoke "nosetests" "-v"))))))
457 (home-page "https://github.com/fhs/python-hdf4")
458 (synopsis "Python interface to the NCSA HDF4 library")
460 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
461 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
462 NetCDF files can also be read and modified. Python-HDF4 is a fork of
463 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
464 (license license:expat)))
466 (define-public python2-hdf4
467 (package-with-python2 python-hdf4))
469 (define-public python-h5py
476 (uri (pypi-uri "h5py" version))
479 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
480 (build-system python-build-system)
482 `(#:tests? #f ; no test target
484 (modify-phases %standard-phases
485 (add-after 'unpack 'fix-hdf5-paths
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((prefix (assoc-ref inputs "hdf5")))
488 (substitute* "setup_build.py"
489 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
490 (string-append "['" prefix "/lib" "']"))
491 (("'/opt/local/include', '/usr/local/include'")
492 (string-append "'" prefix "/include" "'")))
493 (substitute* "setup_configure.py"
494 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']")))
498 `(("python-six" ,python-six)
499 ("python-numpy" ,python-numpy)))
503 `(("python-cython" ,python-cython)
504 ("python-pkgconfig" ,python-pkgconfig)))
505 (home-page "http://www.h5py.org/")
506 (synopsis "Read and write HDF5 files from Python")
508 "The h5py package provides both a high- and low-level interface to the
509 HDF5 library from Python. The low-level interface is intended to be a
510 complete wrapping of the HDF5 API, while the high-level component supports
511 access to HDF5 files, datasets and groups using established Python and NumPy
513 (license license:bsd-3)))
515 (define-public python2-h5py
516 (package-with-python2 python-h5py))
518 (define-public python-sh
525 (uri (pypi-uri "sh" version))
528 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
529 (build-system python-build-system)
532 (modify-phases %standard-phases
535 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
536 (setenv "HOME" "/tmp")
537 (invoke "python" "sh.py" "test"))))))
539 `(("python-coverage" ,python-coverage)))
540 (home-page "https://github.com/amoffat/sh")
541 (synopsis "Python subprocess replacement")
542 (description "This package provides a replacement for Python's
543 @code{subprocess} feature.")
544 (license license:expat)))
546 (define-public python2-sh
547 (package-with-python2 python-sh))
549 (define-public python-cftime
551 (name "python-cftime")
556 (uri (pypi-uri "cftime" version))
559 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
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)
914 `(("python-mock" ,python-mock)
915 ("python-astroid" ,python-astroid)
916 ("python-pylint" ,python-pylint)))
917 (home-page "https://verboselogs.readthedocs.io")
918 (synopsis "Verbose logging level for Python's logging module")
920 "The @code{verboselogs} package extends Python's @code{logging} module to
921 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
922 (license license:expat)))
924 (define-public python2-verboselogs
925 (package-with-python2 python-verboselogs))
927 (define-public python-coloredlogs
929 (name "python-coloredlogs")
934 (uri (pypi-uri "coloredlogs" version))
937 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
938 (build-system python-build-system)
940 `(;Tests require some updated modules
943 `(("python-capturer" ,python-capturer)))
944 (home-page "https://coloredlogs.readthedocs.io")
945 (synopsis "Colored stream handler for Python's logging module")
947 "The @code{coloredlogs} package enables colored terminal output for
948 Python's logging module. The @code{ColoredFormatter} class inherits from
949 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
951 (license license:expat)))
953 (define-public python2-coloredlogs
954 (package-with-python2 python-coloredlogs))
956 (define-public python-editorconfig
958 (name "python-editorconfig")
963 (uri (pypi-uri "EditorConfig" version))
966 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
967 (build-system python-build-system)
968 (home-page "https://editorconfig.org/")
969 (synopsis "EditorConfig bindings for python")
970 (description "The EditorConfig project consists of a file format for
971 defining coding styles and a collection of text editor plugins that enable
972 editors to read the file format and adhere to defined styles. EditorConfig
973 files are easily readable and they work nicely with version control systems.")
974 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
975 (license (list license:bsd-2 license:psfl))))
977 (define-public python-et-xmlfile
979 (name "python-et-xmlfile")
984 (uri (pypi-uri "et_xmlfile" version))
987 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
988 (build-system python-build-system)
990 `(#:phases (modify-phases %standard-phases
993 (invoke "pytest"))))))
995 `(("python-pytest" ,python-pytest)
996 ("python-lxml" ,python-lxml))) ;used for the tests
997 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
998 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
999 (description "This Python library is based upon the @code{xmlfile} module
1000 from @code{lxml}. It aims to provide a low memory, compatible implementation
1001 of @code{xmlfile}.")
1002 (license license:expat)))
1004 (define-public python2-et-xmlfile
1005 (package-with-python2 python-et-xmlfile))
1007 (define-public python-openpyxl
1009 (name "python-openpyxl")
1013 ;; We use the upstream repository, as the tests are not included in the
1017 (url "https://bitbucket.org/openpyxl/openpyxl")
1018 (changeset version)))
1019 (file-name (string-append name "-" version "-checkout"))
1021 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1022 (build-system python-build-system)
1024 `(#:phases (modify-phases %standard-phases
1027 (invoke "pytest"))))))
1029 ;; For the test suite.
1030 `(("python-lxml" ,python-lxml)
1031 ("python-pillow" ,python-pillow)
1032 ("python-pytest" ,python-pytest)))
1034 `(("python-et-xmlfile" ,python-et-xmlfile)
1035 ("python-jdcal" ,python-jdcal)))
1036 (home-page "https://openpyxl.readthedocs.io")
1037 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1038 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1039 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1041 (license license:expat)))
1043 (define-public python-eventlet
1045 (name "python-eventlet")
1050 (uri (pypi-uri "eventlet" version))
1053 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1054 (build-system python-build-system)
1056 `(("python-greenlet" ,python-greenlet)))
1058 ;; TODO: Requires unpackaged 'enum-compat'.
1060 (home-page "http://eventlet.net")
1061 (synopsis "Concurrent networking library for Python")
1063 "Eventlet is a concurrent networking library for Python that
1064 allows you to change how you run your code, not how you write it.
1065 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1066 Coroutines ensure that the developer uses a blocking style of programming
1067 that is similar to threading, but provide the benefits of non-blocking I/O.
1068 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1069 from the Python interpreter, or as a small part of a larger application.")
1070 (license license:expat)))
1072 (define-public python2-eventlet
1073 (let ((base (package-with-python2
1074 (strip-python2-variant python-eventlet))))
1075 (package (inherit base)
1077 `(("python2-enum34" ,python2-enum34)
1078 ,@(package-propagated-inputs base))))))
1080 (define-public python-six
1087 (uri (pypi-uri "six" version))
1090 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1091 (build-system python-build-system)
1094 (modify-phases %standard-phases
1097 (invoke "py.test" "-v"))))))
1099 `(("python-py" ,python-py)
1100 ("python-pytest" ,python-pytest-bootstrap)))
1101 (home-page "https://pypi.python.org/pypi/six/")
1102 (synopsis "Python 2 and 3 compatibility utilities")
1104 "Six is a Python 2 and 3 compatibility library. It provides utility
1105 functions for smoothing over the differences between the Python versions with
1106 the goal of writing Python code that is compatible on both Python versions.
1107 Six supports every Python version since 2.5. It is contained in only one
1108 Python file, so it can be easily copied into your project.")
1109 (license license:x11)))
1111 (define-public python2-six
1112 (package-with-python2 python-six))
1114 (define-public python-six-bootstrap
1116 (inherit python-six)
1117 (name "python-six-bootstrap")
1119 (arguments `(#:tests? #f))))
1121 (define-public python2-six-bootstrap
1122 (package-with-python2 python-six-bootstrap))
1124 (define-public python-schedule
1126 (name "python-schedule")
1131 (uri (pypi-uri "schedule" version))
1134 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1135 (build-system python-build-system)
1137 `(("python-pytest" ,python-pytest)
1138 ("python-mock" ,python-mock)))
1139 (home-page "https://github.com/dbader/schedule")
1140 (synopsis "Schedule periodic function calls in Python")
1142 "Schedule is an in-process scheduler for periodic jobs that uses the
1143 builder pattern for configuration. Schedule lets you run Python functions (or
1144 any other callable) periodically at pre-determined intervals using a simple,
1145 human-friendly syntax.")
1146 (license license:expat)))
1148 (define-public python2-schedule
1149 (package-with-python2 python-schedule))
1151 (define-public python-pandas
1153 (name "python-pandas")
1158 (uri (pypi-uri "pandas" version))
1160 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1161 (build-system python-build-system)
1163 `(#:modules ((guix build utils)
1164 (guix build python-build-system)
1167 #:phases (modify-phases %standard-phases
1168 (add-after 'unpack 'patch-which
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (let ((which (assoc-ref inputs "which")))
1171 (substitute* "pandas/io/clipboard/__init__.py"
1172 (("^CHECK_CMD = .*")
1173 (string-append "CHECK_CMD = \"" which "\"\n"))))
1177 (let ((build-directory
1180 (car (scandir "build"
1181 (cut string-prefix? "lib." <>))))))
1182 ;; Disable the "strict data files" option which causes
1183 ;; the build to error out if required data files are
1184 ;; not available (as is the case with PyPI archives).
1185 (substitute* "setup.cfg"
1186 (("addopts = --strict-data-files") "addopts = "))
1187 (with-directory-excursion build-directory
1188 ;; Delete tests that require "moto" which is not yet
1190 (for-each delete-file
1191 '("pandas/tests/io/conftest.py"
1192 "pandas/tests/io/json/test_compression.py"
1193 "pandas/tests/io/parser/test_network.py"
1194 "pandas/tests/io/test_parquet.py"))
1195 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1196 "--skip-network" "-k"
1197 ;; XXX: Due to the deleted tests above.
1198 "not test_read_s3_jsonl"))))))))
1200 `(("python-numpy" ,python-numpy)
1201 ("python-openpyxl" ,python-openpyxl)
1202 ("python-pytz" ,python-pytz)
1203 ("python-dateutil" ,python-dateutil)
1204 ("python-xlrd" ,python-xlrd)))
1206 `(("which" ,which)))
1208 `(("python-cython" ,python-cython)
1209 ("python-beautifulsoup4" ,python-beautifulsoup4)
1210 ("python-lxml" ,python-lxml)
1211 ("python-html5lib" ,python-html5lib)
1212 ("python-nose" ,python-nose)
1213 ("python-pytest" ,python-pytest)
1214 ("python-pytest-mock" ,python-pytest-mock)))
1215 (home-page "https://pandas.pydata.org")
1216 (synopsis "Data structures for data analysis, time series, and statistics")
1218 "Pandas is a Python package providing fast, flexible, and expressive data
1219 structures designed to make working with structured (tabular,
1220 multidimensional, potentially heterogeneous) and time series data both easy
1221 and intuitive. It aims to be the fundamental high-level building block for
1222 doing practical, real world data analysis in Python.")
1223 (license license:bsd-3)))
1225 (define-public python2-pandas
1226 (package-with-python2 python-pandas))
1228 (define-public python2-mechanize
1230 (name "python2-mechanize")
1235 (uri (pypi-uri "mechanize" version))
1238 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1239 (build-system python-build-system)
1241 `(#:python ,python-2 ; apparently incompatible with Python 3
1243 ;; test fails with message
1244 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1245 ;; (python-3.3.2) or
1246 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1248 ;; The source code is from March 2011 and probably not up-to-date
1249 ;; with respect to python unit tests.
1250 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1252 "Stateful programmatic web browsing in Python")
1254 "Mechanize implements stateful programmatic web browsing in Python,
1255 after Andy Lester’s Perl module WWW::Mechanize.")
1256 (license (license:non-copyleft
1258 "See COPYING in the distribution."))))
1261 (define-public python-simplejson
1263 (name "python-simplejson")
1268 (uri (pypi-uri "simplejson" version))
1271 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1272 (build-system python-build-system)
1273 (home-page "http://simplejson.readthedocs.org/en/latest/")
1275 "Json library for Python")
1277 "JSON (JavaScript Object Notation) is a subset of JavaScript
1278 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1281 Simplejson exposes an API familiar to users of the standard library marshal
1282 and pickle modules. It is the externally maintained version of the json
1283 library contained in Python 2.6, but maintains compatibility with Python 2.5
1284 and (currently) has significant performance advantages, even without using
1285 the optional C extension for speedups. Simplejson is also supported on
1287 (license license:x11)))
1289 (define-public python2-simplejson
1290 (package-with-python2 python-simplejson))
1293 (define-public python-pyicu
1295 (name "python-pyicu")
1300 (uri (pypi-uri "PyICU" version))
1303 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1304 (build-system python-build-system)
1306 `(("icu4c" ,icu4c)))
1308 `(("python-pytest" ,python-pytest)
1309 ("python-six" ,python-six)))
1310 (home-page "https://github.com/ovalhub/pyicu")
1311 (synopsis "Python extension wrapping the ICU C++ API")
1313 "PyICU is a python extension wrapping the ICU C++ API.")
1314 (properties `((python2-variant . ,(delay python2-pyicu))))
1315 (license license:x11)))
1317 (define-public python2-pyicu
1318 (let ((base (package-with-python2
1319 (strip-python2-variant python-pyicu))))
1323 `(,@(package-arguments base)
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1328 ;; XXX: This fails due to Unicode issues unique to Python 2,
1329 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1330 (delete-file "test/test_Script.py")
1333 (define-public python2-dogtail
1334 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1335 ;; spaces in indentation" with Python 3.
1337 (name "python2-dogtail")
1341 (uri (pypi-uri "dogtail" version))
1344 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1345 (build-system python-build-system)
1346 (arguments `(#:python ,python-2
1347 #:tests? #f)) ; invalid command "test"
1348 ;; Currently no offical homepage.
1349 (home-page "https://pypi.python.org/pypi/dogtail/")
1350 (synopsis "GUI test tool and automation framework written in Python")
1352 "Dogtail is a GUI test tool and automation framework written in Python.
1353 It uses Accessibility (a11y) technologies to communicate with desktop
1354 applications. dogtail scripts are written in Python and executed like any
1355 other Python program.")
1356 (license license:gpl2+)))
1358 (define-public python-empy
1360 (name "python-empy")
1364 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1368 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1369 (build-system python-build-system)
1371 `(#:tests? #f)) ; python2 only
1372 (home-page "http://www.alcyone.com/software/empy/")
1373 (synopsis "Templating system for Python")
1375 "EmPy is a system for embedding Python expressions and statements in
1376 template text; it takes an EmPy source file, processes it, and produces
1377 output. This is accomplished via expansions, which are special signals to the
1378 EmPy system and are set off by a special prefix (by default the at sign, @@).
1379 EmPy can expand arbitrary Python expressions and statements in this way, as
1380 well as a variety of special forms. Textual data not explicitly delimited in
1381 this way is sent unaffected to the output, allowing Python to be used in
1382 effect as a markup language. Also supported are callbacks via hooks,
1383 recording and playback via diversions, and dynamic, chainable filters. The
1384 system is highly configurable via command line options and embedded
1386 (license license:lgpl2.1+)))
1388 (define-public python2-empy
1389 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1392 (arguments `(,@(package-arguments base)
1395 (define-public python2-element-tree
1397 (name "python2-element-tree")
1402 "http://effbot.org/media/downloads/elementtree-"
1403 version "-20050316.tar.gz"))
1406 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1407 (build-system python-build-system)
1409 `(#:python ,python-2 ; seems to be part of Python 3
1410 #:tests? #f)) ; no 'test' sub-command
1411 (synopsis "Toolkit for XML processing in Python")
1413 "ElementTree is a Python library supporting lightweight XML processing.")
1414 (home-page "http://effbot.org/zone/element-index.htm")
1415 (license (license:x11-style
1416 "http://docs.python.org/2/license.html"
1417 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1419 (define-public python2-pybugz
1421 (name "python2-pybugz")
1426 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1430 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1431 (patches (search-patches "pybugz-stty.patch"
1432 "pybugz-encode-error.patch"))))
1433 (build-system python-build-system)
1435 `(#:python ,python-2 ; SyntaxError with Python 3
1436 #:tests? #f)) ; no 'test' sub-command
1438 `(("element-tree" ,python2-element-tree)))
1439 (synopsis "Python and command-line interface to Bugzilla")
1441 "PyBugz is a Python library and command-line tool to query the Bugzilla
1442 bug tracking system. It is meant as an aid to speed up interaction with the
1444 (home-page "http://www.liquidx.net/pybugz/")
1445 (license license:gpl2)))
1447 (define-public python2-enum
1449 (name "python2-enum")
1453 (uri (pypi-uri "enum" version))
1456 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1457 (build-system python-build-system)
1459 `(#:python ,python-2))
1460 (home-page "http://pypi.python.org/pypi/enum/")
1461 (synopsis "Robust enumerated type support in Python")
1463 "This provides a module for robust enumerations in Python. It has
1464 been superseded by the Python standard library and is provided only for
1466 ;; Choice of either license.
1467 (license (list license:gpl3+ license:psfl))))
1469 (define-public python-enum34
1471 (name "python-enum34")
1476 (uri (pypi-uri "enum34" version))
1479 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1480 (build-system python-build-system)
1481 (home-page "https://pypi.python.org/pypi/enum34")
1482 (synopsis "Backported Python 3.4 Enum")
1484 "Enum34 is the new Python stdlib enum module available in Python 3.4
1485 backported for previous versions of Python from 2.4 to 3.3.")
1486 (license license:bsd-3)))
1488 (define-public python2-enum34
1489 (package-with-python2 python-enum34))
1491 (define-public python-parse-type
1493 (name "python-parse-type")
1498 (uri (pypi-uri "parse_type" version))
1501 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1502 (build-system python-build-system)
1504 `(("python-six" ,python-six)
1505 ("python-parse" ,python-parse)))
1507 `(("python-pytest" ,python-pytest)
1508 ("python-pytest-runner" ,python-pytest-runner)))
1509 (home-page "https://github.com/jenisys/parse_type")
1510 (synopsis "Extended parse module")
1512 "Parse_type extends the python parse module.")
1514 `((python2-variant . ,(delay python2-parse-type))))
1515 (license license:bsd-3)))
1517 (define-public python2-parse-type
1518 (let ((base (package-with-python2
1519 (strip-python2-variant python-parse-type))))
1520 (package (inherit base)
1522 `(("python2-enum34" ,python2-enum34)
1523 ,@(package-propagated-inputs base))))))
1525 (define-public python-parse
1527 (name "python-parse")
1532 (uri (pypi-uri "parse" version))
1535 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1536 (build-system python-build-system)
1539 (modify-phases %standard-phases
1541 (lambda _ (invoke "python" "test_parse.py"))))))
1542 (home-page "https://github.com/r1chardj0n3s/parse")
1543 (synopsis "Parse strings")
1545 "Parse strings using a specification based on the Python @code{format()}
1547 (license license:x11)))
1549 (define-public python-polib
1551 (name "python-polib")
1555 (uri (pypi-uri "polib" version))
1558 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1559 (build-system python-build-system)
1560 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1561 (synopsis "Manipulate, create and modify gettext files")
1562 (description "Polib can manipulate any gettext format (po, pot and mo)
1563 files. It can be used to create po files from scratch or to modify
1565 (license license:expat)))
1567 (define-public python2-polib
1568 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1571 (arguments `(,@(package-arguments base)
1572 ;; Tests don't work with python2.
1575 (define-public python-poyo
1577 (name "python-poyo")
1582 (uri (pypi-uri "poyo" version))
1585 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1586 (build-system python-build-system)
1587 (home-page "https://github.com/hackebrot/poyo")
1588 (synopsis "Lightweight YAML Parser for Python")
1590 "This package provides a lightweight YAML Parser for Python. It supports
1591 only a chosen subset of the YAML format that is required to parse cookiecutter
1592 user configuration files. It does not have support for serializing into YAML
1593 and is not compatible with JSON.")
1594 (license license:expat)))
1596 (define-public scons
1603 (url "https://github.com/SCons/scons.git")
1605 (file-name (git-file-name name version))
1608 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1609 (build-system python-build-system)
1611 `(#:use-setuptools? #f ; still relies on distutils
1612 #:tests? #f ; no 'python setup.py test' command
1614 (modify-phases %standard-phases
1615 (add-before 'build 'bootstrap
1617 (substitute* "src/engine/SCons/compat/__init__.py"
1618 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1619 "sys.modules[new] = __import__(old)"))
1620 (substitute* "src/engine/SCons/Platform/__init__.py"
1621 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1622 "mod = __import__(full_name)"))
1623 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1624 (chdir "build/scons")
1626 (home-page "http://scons.org/")
1627 (synopsis "Software construction tool written in Python")
1629 "SCons is a software construction tool. Think of SCons as an improved,
1630 cross-platform substitute for the classic Make utility with integrated
1631 functionality similar to autoconf/automake and compiler caches such as ccache.
1632 In short, SCons is an easier, more reliable and faster way to build
1634 (license license:x11)))
1636 (define-public scons-python2
1638 (inherit (package-with-python2 scons))
1639 (name "scons-python2")))
1641 (define-public python-extras
1643 (name "python-extras")
1648 (uri (pypi-uri "extras" version))
1651 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1652 (build-system python-build-system)
1654 ;; FIXME: Circular dependency on testtools.
1656 (home-page "https://github.com/testing-cabal/extras")
1657 (synopsis "Useful extensions to the Python standard library")
1659 "Extras is a set of extensions to the Python standard library.")
1660 (license license:expat)))
1662 (define-public python2-extras
1663 (package-with-python2 python-extras))
1665 (define-public python-mimeparse
1667 (name "python-mimeparse")
1672 (uri (pypi-uri "python-mimeparse" version))
1675 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1676 (build-system python-build-system)
1679 (modify-phases %standard-phases
1682 (invoke "./mimeparse_test.py"))))))
1684 "https://github.com/dbtsai/python-mimeparse")
1685 (synopsis "Python library for parsing MIME types")
1687 "Mimeparse provides basic functions for parsing MIME type names and
1688 matching them against a list of media-ranges.")
1689 (license license:expat)))
1691 (define-public python2-mimeparse
1692 (package-with-python2 python-mimeparse))
1694 (define-public python-miniboa
1696 (name "python-miniboa")
1701 (uri (pypi-uri "miniboa" version))
1704 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1705 (build-system python-build-system)
1706 (home-page "https://github.com/shmup/miniboa")
1707 (synopsis "Simple, single-threaded Telnet server")
1709 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1711 (license license:asl2.0)))
1713 (define-public python2-miniboa
1714 (package-with-python2 python-miniboa))
1716 (define-public python-pafy
1718 (name "python-pafy")
1723 (uri (pypi-uri "pafy" version))
1726 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1727 (build-system python-build-system)
1729 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1731 ;; Youtube-dl is a python package which is imported in the file
1732 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1733 `(("youtube-dl" ,youtube-dl)))
1734 (home-page "https://np1.github.io/pafy/")
1735 (synopsis "Retrieve YouTube content and metadata")
1737 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1738 (license license:lgpl3+)))
1740 (define-public python2-funcsigs
1742 (name "python2-funcsigs")
1746 (uri (pypi-uri "funcsigs" version))
1749 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1750 (build-system python-build-system)
1752 `(#:python ,python-2))
1754 `(("python2-unittest2" ,python2-unittest2)))
1755 (home-page "http://funcsigs.readthedocs.org")
1756 (synopsis "Python function signatures from PEP362")
1758 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1759 (license license:asl2.0)))
1761 (define-public python2-funcsigs-bootstrap
1763 (inherit python2-funcsigs)
1764 (name "python2-funcsigs-bootstrap")
1768 ,@(package-arguments python2-funcsigs)))))
1770 (define-public python-py
1777 (uri (pypi-uri "py" version))
1780 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1781 (build-system python-build-system)
1783 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1784 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1785 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1786 ;; Is this module globally installed?"
1789 `(("python-setuptools-scm" ,python-setuptools-scm)))
1790 (home-page "https://github.com/pytest-dev/py")
1791 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1793 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1794 code introspection, and logging.")
1795 (license license:expat)))
1797 (define-public python2-py
1798 (package-with-python2 python-py))
1800 ;; Recent versions of python-fixtures and python-testrepository need
1801 ;; python-pbr for packaging, which itself needs these two packages for
1803 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1804 ;; same source, just without any test dependencies and with tests disabled.
1805 ;; python-pbr-minmal is then used to package python-fixtures and
1806 ;; python-testrepository.
1807 ;; Strictly speaking we currently could remove the test-requirements from the
1808 ;; normal python-pbr package (and save this package) since test are disabled
1809 ;; there anyway. But this may change in future.
1810 (define-public python-pbr-minimal
1812 (name "python-pbr-minimal")
1817 (uri (pypi-uri "pbr" version))
1820 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1821 (build-system python-build-system)
1824 (home-page "http://docs.openstack.org/developer/pbr/")
1825 (synopsis "Minimal build of python-pbr used for bootstrapping")
1827 "Used only for bootstrapping python2-pbr, you should not need this.")
1828 (license license:asl2.0)))
1830 (define-public python2-pbr-minimal
1831 (package-with-python2 python-pbr-minimal))
1833 (define-public python-pbr
1835 (inherit python-pbr-minimal)
1838 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1840 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1842 `(("python-fixtures" ,python-fixtures-bootstrap)
1843 ;; discover, coverage, hacking, subunit
1844 ("python-mock" ,python-mock)
1845 ("python-six" ,python-six)
1846 ("python-sphinx" ,python-sphinx)
1847 ("python-testrepository" ,python-testrepository-bootstrap)
1848 ("python-testresources" ,python-testresources-bootstrap)
1849 ("python-testscenarios" ,python-testscenarios-bootstrap)
1850 ("python-testtools" ,python-testtools-bootstrap)
1851 ("python-virtualenv" ,python-virtualenv)))
1852 (synopsis "Enhance the default behavior of Python’s setuptools")
1854 "Python Build Reasonableness (PBR) is a library that injects some useful
1855 and sensible default behaviors into your setuptools run. It will set
1856 versions, process requirements files and generate AUTHORS and ChangeLog file
1857 from git information.
1860 (define-public python2-pbr
1861 (package-with-python2 python-pbr))
1863 (define-public python-pyrsistent
1865 (name "python-pyrsistent")
1867 (home-page "https://github.com/tobgu/pyrsistent")
1870 (uri (pypi-uri "pyrsistent" version))
1873 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1874 (build-system python-build-system)
1876 `(("python-hypothesis" ,python-hypothesis)
1877 ("python-pytest" ,python-pytest)
1878 ("python-pytest-runner" ,python-pytest-runner)))
1880 `(("python-six" ,python-six)))
1881 (synopsis "Persistent data structures for Python")
1883 "Pyrsistent is a number of persistent collections (by some referred to as
1884 functional data structures). Persistent in the sense that they are immutable.
1886 All methods on a data structure that would normally mutate it instead return a
1887 new copy of the structure containing the requested updates. The original
1888 structure is left untouched.")
1889 (license license:expat)))
1891 (define-public python2-pyrsistent
1892 (package-with-python2 python-pyrsistent))
1894 (define-public python-exif-read
1896 (name "python-exif-read")
1900 (uri (pypi-uri "ExifRead" version))
1903 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1904 (build-system python-build-system)
1905 (arguments `(#:tests? #f)) ; no tests
1906 (home-page "https://github.com/ianare/exif-py")
1907 (synopsis "Python library to extract EXIF data from image files")
1909 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1911 (license license:bsd-3)))
1913 (define-public python2-exif-read
1914 (package-with-python2 python-exif-read))
1916 (define-public python-pyld
1918 (name "python-pyld")
1922 (uri (pypi-uri "PyLD" version))
1925 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1926 (build-system python-build-system)
1927 (home-page "https://github.com/digitalbazaar/pyld")
1928 (synopsis "Python implementation of the JSON-LD specification")
1930 "PyLD is an implementation of the JSON-LD specification.")
1931 (license license:bsd-3)))
1933 (define-public python2-pyld
1934 (package-with-python2 python-pyld))
1936 (define-public python-click
1938 (name "python-click")
1943 (uri (pypi-uri "click" version))
1946 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1947 (build-system python-build-system)
1950 (modify-phases %standard-phases
1951 (add-after 'unpack 'fix-paths
1952 (lambda* (#:key inputs #:allow-other-keys)
1953 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1954 "cross-libc" "libc"))))
1955 (substitute* "click/_unicodefun.py"
1957 (string-append "'" glibc "/bin/locale'"))))
1961 (invoke "python" "-m" "pytest"))))))
1963 `(("python-pytest" ,python-pytest)))
1964 (home-page "https://palletsprojects.com/p/click/")
1965 (synopsis "Command line library for Python")
1967 "Click is a Python package for creating command line interfaces in a
1968 composable way with as little code as necessary. Its name stands for
1969 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1970 with sensible defaults out of the box.")
1971 (license license:bsd-3)))
1973 (define-public python2-click
1974 (package-with-python2 python-click))
1976 (define-public python-wheel
1978 (name "python-wheel")
1983 (uri (pypi-uri "wheel" version))
1986 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1987 (build-system python-build-system)
1989 `(("python-jsonschema" ,python-jsonschema)
1990 ("python-pytest-cov" ,python-pytest-cov)))
1991 (home-page "https://bitbucket.org/pypa/wheel/")
1992 (synopsis "Format for built Python packages")
1994 "A wheel is a ZIP-format archive with a specially formatted filename and
1995 the @code{.whl} extension. It is designed to contain all the files for a PEP
1996 376 compatible install in a way that is very close to the on-disk format. Many
1997 packages will be properly installed with only the @code{Unpack} step and the
1998 unpacked archive preserves enough information to @code{Spread} (copy data and
1999 scripts to their final locations) at any later time. Wheel files can be
2000 installed with a newer @code{pip} or with wheel's own command line utility.")
2001 (license license:expat)
2002 (properties `((python2-variant . ,(delay python2-wheel))))))
2004 (define-public python2-wheel
2005 (let ((wheel (package-with-python2
2006 (strip-python2-variant python-wheel))))
2007 (package (inherit wheel)
2008 (native-inputs `(("python2-functools32" ,python2-functools32)
2009 ,@(package-native-inputs wheel))))))
2011 (define-public python-vcversioner
2013 (name "python-vcversioner")
2014 (version "2.16.0.0")
2018 (uri (pypi-uri "vcversioner" version))
2021 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2022 (build-system python-build-system)
2023 (synopsis "Python library for version number discovery")
2024 (description "Vcversioner is a Python library that inspects tagging
2025 information in a variety of version control systems in order to discover
2027 (home-page "https://github.com/habnabit/vcversioner")
2028 (license license:isc)))
2030 (define-public python2-vcversioner
2031 (package-with-python2 python-vcversioner))
2033 (define-public python-jdcal
2035 (name "python-jdcal")
2040 (uri (pypi-uri "jdcal" version))
2043 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2044 (build-system python-build-system)
2046 `(#:phases (modify-phases %standard-phases
2049 (invoke "pytest"))))))
2051 `(("python-pytest" ,python-pytest)))
2052 (home-page "https://github.com/phn/jdcal")
2053 (synopsis "Functions to convert between Julian dates Gregorian dates")
2054 (description "This Python library provides functions for converting
2055 between Julian dates and Gregorian dates.")
2056 (license license:bsd-2)))
2058 (define-public python2-jdcal
2059 (package-with-python2 python-jdcal))
2061 (define-public python-jsonschema
2063 (name "python-jsonschema")
2067 (uri (pypi-uri "jsonschema" version))
2070 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2071 (build-system python-build-system)
2074 (modify-phases %standard-phases
2077 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2078 (invoke "trial" "jsonschema"))))))
2080 `(("python-setuptools_scm" ,python-setuptools-scm)
2081 ("python-twisted" ,python-twisted)))
2083 `(("python-attrs" ,python-attrs)
2084 ("python-pyrsistent" ,python-pyrsistent)
2085 ("python-six" ,python-six)))
2086 (home-page "https://github.com/Julian/jsonschema")
2087 (synopsis "Implementation of JSON Schema for Python")
2089 "Jsonschema is an implementation of JSON Schema for Python.")
2090 (license license:expat)
2091 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2093 (define-public python2-jsonschema
2094 (let ((jsonschema (package-with-python2
2095 (strip-python2-variant python-jsonschema))))
2096 (package (inherit jsonschema)
2098 `(("python2-functools32" ,python2-functools32)
2099 ,@(package-propagated-inputs jsonschema))))))
2101 ;; This old version is still required by docker-compose as of 1.24.0.
2102 (define-public python-jsonschema-2.6
2104 (name "python-jsonschema")
2108 (uri (pypi-uri "jsonschema" version))
2111 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2112 (build-system python-build-system)
2115 (modify-phases %standard-phases
2116 (replace 'check (lambda _ (invoke "nosetests"))))))
2118 `(("python-nose" ,python-nose)
2119 ("python-vcversioner" ,python-vcversioner)))
2120 (home-page "https://github.com/Julian/jsonschema")
2121 (synopsis "Implementation of JSON Schema for Python")
2123 "Jsonschema is an implementation of JSON Schema for Python.")
2124 (license license:expat)
2125 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2127 (define-public python-schema
2129 (name "python-schema")
2134 (uri (pypi-uri "schema" version))
2137 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2138 (build-system python-build-system)
2140 `(("python-pytest" ,python-pytest)))
2141 (home-page "https://github.com/keleshev/schema")
2142 (synopsis "Simple data validation library")
2144 "@code{python-schema} is a library for validating Python data
2145 structures, such as those obtained from config-files, forms, external
2146 services or command-line parsing, converted from JSON/YAML (or
2147 something else) to Python data-types.")
2148 (license license:psfl)))
2150 (define-public python2-schema
2151 (package-with-python2 python-schema))
2153 (define-public python-schema-0.5
2154 (package (inherit python-schema)
2159 (uri (pypi-uri "schema" version))
2162 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2164 (define-public python2-schema-0.5
2165 (package-with-python2 python-schema-0.5))
2167 (define-public python-kitchen
2169 (name "python-kitchen")
2174 (uri (pypi-uri "kitchen" version))
2177 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2178 (build-system python-build-system)
2180 `(("python-chardet" ,python-chardet)))
2181 (home-page "https://github.com/fedora-infra/kitchen")
2182 (synopsis "Python API for snippets")
2183 (description "@code{kitchen} module provides a python API for all sorts of
2184 little useful snippets of code that everybody ends up writing for their projects
2185 but never seem big enough to build an independent release. Use kitchen and stop
2186 cutting and pasting that code over and over.")
2187 (license (list license:lgpl2.1+
2188 ;; subprocess.py, test_subprocess.py,
2189 ;; kitchen/pycompat25/defaultdict.py:
2192 (define-public python2-kitchen
2193 (package-with-python2 python-kitchen))
2195 (define-public python-unidecode
2197 (name "python-unidecode")
2201 (uri (pypi-uri "Unidecode" version))
2204 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2205 (build-system python-build-system)
2206 (home-page "https://pypi.python.org/pypi/Unidecode")
2207 (synopsis "ASCII transliterations of Unicode text")
2209 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2210 useful when integrating with legacy code that doesn't support Unicode, or for
2211 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2212 machine identifiers from human-readable Unicode strings that should still be
2213 somewhat intelligible.")
2214 (license license:gpl2+)))
2216 (define-public python2-unidecode
2217 (package-with-python2 python-unidecode))
2219 (define-public python-pyjwt
2221 (name "python-pyjwt")
2226 (uri (pypi-uri "PyJWT" version))
2229 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2230 (modules '((guix build utils)))
2233 (for-each delete-file-recursively
2234 (find-files "." "\\.pyc$"))
2236 (build-system python-build-system)
2238 `(("python-pytest" ,python-pytest)
2239 ("python-pytest-cov" ,python-pytest-cov)
2240 ("python-pytest-runner" ,python-pytest-runner)))
2241 (home-page "https://github.com/progrium/pyjwt")
2242 (synopsis "JSON Web Token implementation in Python")
2244 "PyJWT is a JSON Web Token implementation written in Python.")
2245 (license license:expat)))
2247 (define-public python2-pyjwt
2248 (package-with-python2 python-pyjwt))
2250 (define-public python-pykka
2252 (name "python-pykka")
2257 (uri (pypi-uri "Pykka" version))
2260 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2261 (build-system python-build-system)
2263 `(("python-mock" ,python-mock)
2264 ("python-nose" ,python-nose)
2265 ("python-gevent" ,python-gevent)
2266 ("python-eventlet" ,python-eventlet)))
2267 (home-page "https://www.pykka.org/")
2268 (synopsis "Pykka is a Python implementation of the actor model")
2270 "Pykka is a Python implementation of the actor model.
2271 The actor model introduces some simple rules to control the sharing
2272 of state and cooperation between execution units, which makes it
2273 easier to build concurrent applications.")
2274 (license license:asl2.0)))
2276 (define-public python2-pykka
2277 (package-with-python2 python-pykka))
2279 (define-public python-pymsgbox
2281 (name "python-pymsgbox")
2287 ;; LICENSE.txt is not present on pypi
2288 (url "https://github.com/asweigart/PyMsgBox")
2289 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2290 (file-name (git-file-name name version))
2293 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2295 ;; Circular dependency to run tests:
2296 ;; Tests need pyautogui, which depends on pymsgbox.
2298 (build-system python-build-system)
2299 (home-page "https://github.com/asweigart/PyMsgBox")
2300 (synopsis "Python module for JavaScript-like message boxes")
2302 "PyMsgBox is a simple, cross-platform, pure Python module for
2303 JavaScript-like message boxes. Types of dialog boxes include:
2311 (license license:bsd-3)))
2313 (define-public python-pympler
2315 (name "python-pympler")
2316 (home-page "https://pythonhosted.org/Pympler/")
2320 (uri (pypi-uri "Pympler" version))
2323 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2324 (build-system python-build-system)
2326 `(#:phases (modify-phases %standard-phases
2328 (add-after 'install 'check
2329 (lambda* (#:key inputs outputs #:allow-other-keys)
2330 (add-installed-pythonpath inputs outputs)
2331 (invoke "python" "setup.py" "test"))))))
2332 (synopsis "Measure, monitor and analyze memory behavior")
2334 "Pympler is a development tool to measure, monitor and analyze
2335 the memory behavior of Python objects in a running Python application.
2337 By pympling a Python application, detailed insight in the size and the
2338 lifetime of Python objects can be obtained. Undesirable or unexpected
2339 runtime behavior like memory bloat and other @samp{pymples} can easily
2342 A web profiling frontend exposes process statistics, garbage
2343 visualisation and class tracker statistics.")
2344 (license license:asl2.0)))
2346 (define-public python2-pympler
2347 (package-with-python2 python-pympler))
2349 (define-public python-itsdangerous
2351 (name "python-itsdangerous")
2356 (uri (pypi-uri "itsdangerous" version))
2359 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2360 (build-system python-build-system)
2361 (home-page "https://palletsprojects.com/p/itsdangerous/")
2362 (synopsis "Python library for passing data to/from untrusted environments")
2364 "Itsdangerous provides various helpers to pass trusted data to untrusted
2365 environments and back.")
2366 (license license:bsd-3)))
2368 (define-public python2-itsdangerous
2369 (package-with-python2 python-itsdangerous))
2371 (define-public python-pyyaml
2373 (name "python-pyyaml")
2378 (uri (pypi-uri "PyYAML" version))
2381 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2382 (build-system python-build-system)
2384 `(("libyaml" ,libyaml)))
2385 (home-page "http://pyyaml.org/wiki/PyYAML")
2386 (synopsis "YAML parser and emitter for Python")
2388 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2389 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2390 API, and sensible error messages. PyYAML supports standard YAML tags and
2391 provides Python-specific tags that allow to represent an arbitrary Python
2393 (license license:expat)))
2395 (define-public python2-pyyaml
2396 (package-with-python2 python-pyyaml))
2398 (define-public python-vine
2400 (name "python-vine")
2405 (uri (pypi-uri "vine" version))
2408 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2409 (build-system python-build-system)
2411 `(("python-pytest" ,python-pytest)
2412 ("python-case" ,python-case)))
2413 (home-page "https://github.com/celery/vine")
2414 (synopsis "Promises for Python")
2416 "@code{vine} provides a special implementation of promises in that it can
2417 be used both for \"promise of a value\" and lazy evaluation. The biggest
2418 upside for this is that everything in a promise can also be a promise,
2419 e.g. filters, callbacks and errbacks can all be promises.")
2420 (license license:bsd-3)))
2422 (define-public python-virtualenv
2424 (name "python-virtualenv")
2429 (uri (pypi-uri "virtualenv" version))
2432 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2433 (build-system python-build-system)
2436 (modify-phases %standard-phases
2437 (add-before 'check 'disable-failing-test
2439 ;; Disable failing test. See upstream bug report
2440 ;; https://github.com/pypa/virtualenv/issues/957
2441 (substitute* "tests/test_virtualenv.py"
2442 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2445 `(("python-mock" ,python-mock)
2446 ("python-pytest" ,python-pytest)))
2447 (home-page "https://virtualenv.pypa.io/")
2448 (synopsis "Virtual Python environment builder")
2450 "Virtualenv is a tool to create isolated Python environments.")
2451 (license license:expat)))
2453 (define-public python2-virtualenv
2454 (package-with-python2 python-virtualenv))
2456 (define-public python-markupsafe
2458 (name "python-markupsafe")
2463 (uri (pypi-uri "MarkupSafe" version))
2466 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2467 (build-system python-build-system)
2469 `(#:modules ((ice-9 ftw)
2473 (guix build python-build-system))
2474 #:phases (modify-phases %standard-phases
2477 (let ((cwd (getcwd))
2478 (libdir (find (cut string-prefix? "lib." <>)
2479 (scandir "build"))))
2480 (setenv "PYTHONPATH"
2481 (string-append cwd "/build/" libdir ":"
2482 (getenv "PYTHONPATH")))
2483 (invoke "pytest" "-vv")))))))
2485 `(("python-pytest" ,python-pytest)))
2486 (home-page "https://github.com/mitsuhiko/markupsafe")
2487 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2489 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2491 (license license:bsd-3)))
2493 (define-public python2-markupsafe
2494 (package-with-python2 python-markupsafe))
2496 (define-public python-jinja2
2498 (name "python-jinja2")
2503 (uri (pypi-uri "Jinja2" version))
2506 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2507 (build-system python-build-system)
2509 `(("python-markupsafe" ,python-markupsafe)))
2510 (home-page "http://jinja.pocoo.org/")
2511 (synopsis "Python template engine")
2513 "Jinja2 is a small but fast and easy to use stand-alone template engine
2514 written in pure Python.")
2515 (license license:bsd-3)))
2517 (define-public python2-jinja2
2518 (package-with-python2 python-jinja2))
2520 (define-public python-jinja2-time
2522 (name "python-jinja2-time")
2527 (uri (pypi-uri "jinja2-time" version))
2530 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2531 (build-system python-build-system)
2533 `(("python-arrow" ,python-arrow)
2534 ("python-jinja2" ,python-jinja2)))
2536 "https://github.com/hackebrot/jinja2-time")
2537 (synopsis "Jinja2 Extension for Dates and Times")
2539 "This package provides an extension for the template engine Jinja2. It
2540 adds a 'now' tag providing a convenient access to the arrow.now() API from
2541 templates. A format string can be provided to control the output.")
2542 (license license:expat)))
2544 (define-public python-pystache
2546 (name "python-pystache")
2550 (uri (pypi-uri "pystache" version))
2553 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2554 (build-system python-build-system)
2556 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2557 (home-page "http://defunkt.io/pystache/")
2558 (synopsis "Python logic-less template engine")
2560 "Pystache is a Python implementation of the framework agnostic,
2561 logic-free templating system Mustache.")
2562 (license license:expat)
2563 (properties `((python2-variant . ,(delay python2-pystache))))))
2565 (define-public python2-pystache
2566 (package (inherit (package-with-python2
2567 (strip-python2-variant python-pystache)))
2569 `(#:python ,python-2
2571 (modify-phases %standard-phases
2574 (invoke "python" "test_pystache.py"))))))))
2576 (define-public python-joblib
2578 (name "python-joblib")
2582 (uri (pypi-uri "joblib" version))
2585 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2586 (build-system python-build-system)
2589 (modify-phases %standard-phases
2591 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2593 `(("python-pytest" ,python-pytest)))
2594 (home-page "https://joblib.readthedocs.io/")
2595 (synopsis "Using Python functions as pipeline jobs")
2597 "Joblib is a set of tools to provide lightweight pipelining in Python.
2598 In particular, joblib offers: transparent disk-caching of the output values
2599 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2600 logging and tracing of the execution.")
2601 (license license:bsd-3)))
2603 (define-public python2-joblib
2604 (package-with-python2 python-joblib))
2606 (define-public python-daemon
2608 (name "python-daemon")
2613 (uri (pypi-uri "python-daemon" version))
2616 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2617 (build-system python-build-system)
2620 (modify-phases %standard-phases
2621 (add-before 'check 'disable-tests
2623 ;; FIXME: Determine why test fails
2624 (substitute* "test/test_daemon.py"
2625 (("test_detaches_process_context")
2626 "skip_test_detaches_process_context"))
2629 `(("python-lockfile" ,python-lockfile)))
2631 `(("python-unittest2" ,python-unittest2)
2632 ("python-testtools" ,python-testtools)
2633 ("python-testscenarios" ,python-testscenarios)
2634 ("python-mock" ,python-mock)
2635 ("python-docutils" ,python-docutils)))
2636 (home-page "https://pagure.io/python-daemon/")
2637 (synopsis "Python library for making a Unix daemon process")
2638 (description "Python-daemon is a library that assists a Python program to
2639 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2641 This library provides a @code{DaemonContext} class that manages the following
2642 important tasks for becoming a daemon process:
2644 @item Detach the process into its own process group.
2645 @item Set process environment appropriate for running inside a chroot.
2646 @item Renounce suid and sgid privileges.
2647 @item Close all open file descriptors.
2648 @item Change the working directory, uid, gid, and umask.
2649 @item Set appropriate signal handlers.
2650 @item Open new file descriptors for stdin, stdout, and stderr.
2651 @item Manage a specified PID lock file.
2652 @item Register cleanup functions for at-exit processing.
2654 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2655 (license (list license:asl2.0 license:gpl3+))))
2657 (define-public python-docutils
2659 (name "python-docutils")
2664 (uri (pypi-uri "docutils" version))
2667 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2668 (build-system python-build-system)
2670 '(#:tests? #f)) ; no setup.py test command
2671 (home-page "http://docutils.sourceforge.net/")
2672 (synopsis "Python Documentation Utilities")
2674 "Docutils is a modular system for processing documentation into useful
2675 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2677 ;; Most of the source code is public domain, but some source files are
2678 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2679 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2681 (define-public python2-docutils
2682 (package-with-python2 python-docutils))
2684 (define-public python-pygments
2686 (name "python-pygments")
2691 (uri (pypi-uri "Pygments" version))
2694 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2695 (build-system python-build-system)
2697 ;; FIXME: Tests require sphinx, which depends on this.
2699 (home-page "http://pygments.org/")
2700 (synopsis "Syntax highlighting")
2702 "Pygments is a syntax highlighting package written in Python.")
2703 (license license:bsd-2)))
2705 (define-public python2-pygments
2706 (package-with-python2 python-pygments))
2708 (define-public python-bumpversion
2710 (name "python-bumpversion")
2715 (uri (pypi-uri "bumpversion" version))
2718 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2719 (build-system python-build-system)
2720 (home-page "https://github.com/peritus/bumpversion")
2721 (synopsis "Tool to bump software version")
2722 (description "This tool provides a command-line interface (CLI) to bump a
2723 software version simply.")
2724 (license license:expat)))
2726 (define-public python-deprecated
2728 (name "python-deprecated")
2734 (url "https://github.com/tantale/deprecated.git")
2735 (commit (string-append "v" version))))
2736 (file-name (git-file-name name version))
2739 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2740 (build-system python-build-system)
2742 `(#:phases (modify-phases %standard-phases
2745 (invoke "pytest"))))))
2747 `(("python-wrapt" ,python-wrapt)))
2749 `(("python-bumpversion" ,python-bumpversion)
2750 ("python-pytest" ,python-pytest)
2751 ("python-pytest-cov" ,python-pytest-cov)
2752 ("python-sphinx" ,python-sphinx)
2753 ("python-tox" ,python-tox)))
2754 (home-page "https://github.com/tantale/deprecated")
2755 (synopsis "Python decorator to deprecate classes, functions or methods")
2756 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2757 to deprecate classes, functions or methods.")
2758 (license license:expat)))
2760 (define-public python-pygithub
2762 (name "python-pygithub")
2765 ;; We fetch from the Git repo because there are no tests in the PyPI
2770 (url "https://github.com/PyGithub/PyGithub.git")
2771 (commit (string-append "v" version))))
2772 (file-name (git-file-name name version))
2775 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2776 (build-system python-build-system)
2778 `(#:phases (modify-phases %standard-phases
2779 ;; Some tests rely on the network.
2780 (add-after 'unpack 'disable-failing-tests
2782 (substitute* "tests/Issue142.py"
2783 (("testDecodeJson") "disabled_testDecodeJson"))
2785 (add-before 'check 'prepare-for-tests
2787 (for-each (lambda (f)
2789 (find-files "./tests"))
2790 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2791 (setenv "PYTHONPATH"
2792 (string-append "./tests:" (getenv "PYTHONPATH")))
2795 `(("python-deprecated" ,python-deprecated)
2796 ("python-pyjwt" ,python-pyjwt)
2797 ("python-requests" ,python-requests)))
2798 (native-inputs `(("python-httpretty" ,python-httpretty)))
2799 (home-page "https://pygithub.readthedocs.io/en/latest/")
2800 (synopsis "Python library for the GitHub API")
2801 (description "This library allows managing GitHub resources such as
2802 repositories, user profiles, and organizations in your Python applications,
2803 using version 3 of the GitHub application programming interface (API).")
2804 (license license:lgpl3+)))
2806 (define-public python-rellu
2808 (name "python-rellu")
2813 (uri (pypi-uri "rellu" version))
2816 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2817 (build-system python-build-system)
2819 `(("python-invoke" ,python-invoke)
2820 ("python-pygithub" ,python-pygithub)))
2821 (home-page "https://github.com/robotframework/rellu")
2822 (synopsis "Utilities to create PyPI releases")
2823 (description "This collection of utilities contains tooling and templates
2824 to assist in creating releases on GitHub and publishing them on PyPI. It is
2825 designed to be used by Robot Framework and tools and libraries in its
2826 ecosystem, but can naturally be used also by other projects.")
2827 (license license:asl2.0)))
2829 (define-public python-robotframework
2831 (name "python-robotframework")
2833 ;; There are no tests in the PyPI archive.
2838 (url "https://github.com/robotframework/robotframework.git")
2839 (commit (string-append "v" version))))
2840 (file-name (git-file-name name version))
2842 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2843 (patches (search-patches
2844 "python-robotframework-honor-source-date-epoch.patch"))))
2845 (build-system python-build-system)
2847 `(#:phases (modify-phases %standard-phases
2848 (add-before 'build 'build-and-install-doc
2849 (lambda* (#:key outputs #:allow-other-keys)
2850 (let* ((doc-output (assoc-ref outputs "doc"))
2851 (doc (string-append doc-output "/share/"
2852 ,name "-" ,version "/")))
2853 (invoke "invoke" "library-docs" "all")
2855 (copy-recursively "doc/libraries"
2856 (string-append doc "/libraries"))
2860 (invoke "python" "utest/run.py"))))))
2862 `(("python-invoke" ,python-invoke)
2863 ("python-rellu" ,python-rellu)
2864 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2865 (outputs '("out" "doc"))
2866 (home-page "https://robotframework.org")
2867 (synopsis "Generic automation framework")
2868 (description "Robot Framework is a generic automation framework for
2869 acceptance testing, acceptance test driven development (ATDD), and robotic
2870 process automation (RPA).")
2871 (license license:asl2.0)))
2873 (define-public python-robotframework-lint
2874 ;; There is no properly tagged release; the commit below seems to correspond
2875 ;; to the 0.9 stable release available from PyPI. The tests are not
2876 ;; included in the PyPI archive, so we fetch the sources from the upstream
2878 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2881 (name "python-robotframework-lint")
2882 (version (git-version "0.9.0" revision commit))
2887 (url "https://github.com/boakley/robotframework-lint.git")
2889 (file-name (git-file-name name version))
2892 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2893 (build-system python-build-system)
2896 (modify-phases %standard-phases
2899 (invoke "python" "-m" "robot" "-A"
2900 "tests/conf/default.args" "tests"))))))
2902 `(("python-robotframework" ,python-robotframework)))
2903 (home-page "https://github.com/boakley/robotframework-lint/")
2904 (synopsis "Static analysis tool (linter) for Robot Framework")
2905 (description "This package provides the @code{rflint} command-line
2906 utility, a static analysis tool (linter) for Robot Framework source files.")
2907 (license license:asl2.0))))
2909 (define-public python-robotframework-sshlibrary
2911 (name "python-robotframework-sshlibrary")
2913 ;; There are no tests in the PyPI archive.
2918 (url "https://github.com/robotframework/SSHLibrary.git")
2919 (commit (string-append "v" version))))
2920 (file-name (git-file-name name version))
2923 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2924 (build-system python-build-system)
2927 (modify-phases %standard-phases
2928 (add-before 'build 'build-and-install-doc
2929 (lambda* (#:key outputs #:allow-other-keys)
2930 (let* ((doc-output (assoc-ref outputs "doc"))
2931 (doc (string-append doc-output "/share/"
2932 ,name "-" ,version "/")))
2933 (invoke "chmod" "-R" "+w" "docs")
2934 (invoke "invoke" "kw-docs" "project-docs")
2936 (for-each delete-file (find-files "docs" "\\.rst"))
2937 (copy-recursively "docs" doc)
2941 ;; Some tests require an SSH server; we remove them.
2942 (delete-file "utest/test_client_api.py")
2943 (delete-file "utest/test_scp.py")
2944 (invoke "python" "utest/run.py"))))))
2946 `(("python-robotframework" ,python-robotframework)
2947 ("python-paramiko" ,python-paramiko)
2948 ("python-scp" ,python-scp)))
2950 `(("openssh" ,openssh)
2952 ;; To generate the documentation
2953 ("python-docutils" ,python-docutils)
2954 ("python-invoke" ,python-invoke)
2955 ("python-pygments" ,python-pygments)
2956 ("python-rellu" ,python-rellu)))
2957 (outputs '("out" "doc"))
2958 (home-page "https://github.com/robotframework/SSHLibrary")
2959 (synopsis "Robot Framework library for SSH and SFTP")
2960 (description "SSHLibrary is a Robot Framework library providing support
2961 for SSH and SFTP. It has the following main usages:
2963 @item Executing commands on the remote machine, either blocking or non-blocking.
2964 @item Writing and reading in an interactive shell.
2965 @item Transferring files and directories over SFTP.
2966 @item Ensuring that files and directories exist on the remote machine.
2968 (license license:asl2.0)))
2970 (define-public python-scp
2977 (uri (pypi-uri "scp" version))
2980 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2981 (build-system python-build-system)
2983 '(#:tests? #f)) ;tests require an SSH server
2985 `(("python-paramiko" ,python-paramiko)))
2986 (home-page "https://github.com/jbardin/scp.py")
2987 (synopsis "SCP protocol module for Python and Paramiko")
2988 (description "The scp module extends the Paramiko library to send and
2989 receive files via the SCP1 protocol, as implemented by the OpenSSH
2990 @command{scp} program.")
2991 (license license:gpl2+)))
2993 (define-public python-rst.linker
2995 (name "python-rst.linker")
3000 (uri (pypi-uri "rst.linker" version))
3003 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
3004 (build-system python-build-system)
3006 `(("python-dateutil" ,python-dateutil)
3007 ("python-six" ,python-six)))
3009 `(("python-setuptools-scm" ,python-setuptools-scm)))
3010 ;; Test would require path.py, which would introduce a cyclic dependence.
3011 (arguments `(#:tests? #f))
3012 ;; Note: As of version 1.7 the documentation is not worth building.
3013 (home-page "https://github.com/jaraco/rst.linker")
3014 (synopsis "Sphinx plugin to add links and timestamps")
3015 (description "rst.linker allows to automatically replace text by a
3016 reStructuredText external reference or timestamps. It's primary purpose is to
3017 augment the changelog, but it can be used for other documents, too.")
3018 (license license:expat)))
3020 (define-public python2-rst.linker
3021 (package-with-python2 python-rst.linker))
3023 (define-public python-feedgenerator
3025 (name "python-feedgenerator")
3030 (uri (pypi-uri "feedgenerator" version))
3033 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3034 (modules '((guix build utils)))
3037 ;; Remove pre-compiled .pyc files from source.
3038 (for-each delete-file-recursively
3039 (find-files "." "__pycache__" #:directories? #t))
3040 (for-each delete-file (find-files "." "\\.pyc$"))
3042 (build-system python-build-system)
3044 `(("python-pytz" ,python-pytz)
3045 ("python-six" ,python-six)))
3046 (home-page "https://github.com/getpelican/feedgenerator")
3048 "Standalone version of Django's Atom/RSS feed generator")
3050 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3051 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3052 (license license:bsd-3)))
3054 (define-public python2-feedgenerator
3055 (package-with-python2 python-feedgenerator))
3057 (define-public python-toml
3059 (name "python-toml")
3064 (uri (pypi-uri "toml" version))
3067 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3068 (build-system python-build-system)
3070 `(#:tests? #f)) ;no tests suite in release
3071 (home-page "https://github.com/uiri/toml")
3072 (synopsis "Library for TOML")
3074 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3075 Language (TOML) configuration files.")
3076 (license license:expat)))
3078 (define-public python-jsonrpc-server
3080 (name "python-jsonrpc-server")
3085 (uri (pypi-uri "python-jsonrpc-server" version))
3088 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3089 (build-system python-build-system)
3091 `(("python-future" ,python-future)
3092 ("python-mock" ,python-mock)
3093 ("python-pytest" ,python-pytest)))
3095 "https://github.com/palantir/python-jsonrpc-server")
3096 (synopsis "JSON RPC 2.0 server library")
3098 "This package provides a JSON RPC 2.0 server library for Python.")
3099 (license license:expat)))
3101 (define-public python-pydocstyle
3103 (name "python-pydocstyle")
3108 (uri (pypi-uri "pydocstyle" version))
3111 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3112 (build-system python-build-system)
3114 `(("python-six" ,python-six)
3115 ("python-snowballstemmer" ,python-snowballstemmer)))
3117 "https://github.com/PyCQA/pydocstyle/")
3118 (synopsis "Python docstring style checker")
3120 "This package provides a style checker for the Python Language
3122 (license license:expat)))
3124 (define-public python-language-server
3126 (name "python-language-server")
3131 (uri (pypi-uri "python-language-server" version))
3134 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3135 (build-system python-build-system)
3137 `(("python-pluggy" ,python-pluggy)
3138 ("python-jsonrpc-server" ,python-jsonrpc-server)
3139 ("python-jedi" ,python-jedi)
3140 ("python-yapf" ,python-yapf)
3141 ("python-pyflakes" ,python-pyflakes)
3142 ("python-pydocstyle" ,python-pydocstyle)
3143 ("python-pycodestyle" ,python-pycodestyle)
3144 ("python-mccabe" ,python-mccabe)
3145 ("python-rope" ,python-rope)
3146 ("python-autopep8" ,python-autopep8)
3147 ("python-flake8" ,python-flake8)
3148 ("python-pylint" ,python-pylint)))
3149 (home-page "https://github.com/palantir/python-language-server")
3150 (synopsis "Python implementation of the Language Server Protocol")
3152 "The Python Language Server (pyls) is an implementation of the Python 3
3153 language specification for the Language Server Protocol (LSP). This tool is
3154 used in text editing environments to provide a complete and integrated
3155 feature-set for programming Python effectively.")
3156 (license license:expat)))
3158 (define-public python-black
3160 (name "python-black")
3165 (uri (pypi-uri "black" version))
3168 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3169 (build-system python-build-system)
3172 (modify-phases %standard-phases
3173 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3175 (let ((python3 (which "python3")))
3176 (substitute* '("tests/data/fmtonoff.py"
3177 "tests/data/string_prefixes.py"
3178 "tests/data/function.py")
3179 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3180 (string-append "#!" python3 (if (string? minor-version)
3184 `(("python-click" ,python-click)
3185 ("python-attrs" ,python-attrs)
3186 ("python-appdirs" ,python-appdirs)
3187 ("python-toml" ,python-toml)))
3188 (home-page "https://github.com/ambv/black")
3189 (synopsis "The uncompromising code formatter")
3190 (description "Black is the uncompromising Python code formatter.")
3191 (license license:expat)))
3193 (define-public python-blinker
3195 (name "python-blinker")
3200 (uri (pypi-uri "blinker" version))
3203 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3204 (build-system python-build-system)
3205 (home-page "http://pythonhosted.org/blinker/")
3206 (synopsis "Fast, simple object-to-object and broadcast signaling")
3208 "Blinker provides a fast dispatching system that allows any number of
3209 interested parties to subscribe to events, or \"signals\".")
3210 (license license:expat)))
3212 (define-public python2-blinker
3213 (package-with-python2 python-blinker))
3215 (define-public pelican
3222 (uri (pypi-uri "pelican" version))
3225 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3226 (build-system python-build-system)
3228 `(("python-feedgenerator" ,python-feedgenerator)
3229 ("python-jinja2" ,python-jinja2)
3230 ("python-pygments" ,python-pygments)
3231 ("python-docutils" ,python-docutils)
3232 ("python-pytz" ,python-pytz)
3233 ("python-blinker" ,python-blinker)
3234 ("python-unidecode" ,python-unidecode)
3235 ("python-six" ,python-six)
3236 ("python-dateutil" ,python-dateutil)
3237 ("python-markdown" ,python-markdown)))
3238 (home-page "https://getpelican.com/")
3240 `(;; XXX Requires a lot more packages to do unit tests :P
3242 #:phases (modify-phases %standard-phases
3244 'install 'adjust-requires
3245 ;; Since feedgenerator is installed from git, it doesn't
3246 ;; conform to the version requirements.
3248 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3249 ;; version requirement so setuptools doesn't get confused.
3251 (substitute* "setup.py"
3252 (("['\"]feedgenerator.*?['\"]")
3253 "'feedgenerator'")))))))
3254 (synopsis "Python-based static site publishing system")
3256 "Pelican is a tool to generate a static blog from reStructuredText,
3257 Markdown input files, and more. Pelican uses Jinja2 for templating
3258 and is very extensible.")
3259 (license license:agpl3+)))
3261 (define-public mallard-ducktype
3263 (name "mallard-ducktype")
3268 ;; git-reference because tests are not included in pypi source tarball
3269 ;; https://issues.guix.gnu.org/issue/36755#2
3271 (url "https://github.com/projectmallard/mallard-ducktype.git")
3273 (file-name (git-file-name name version))
3276 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3277 (build-system python-build-system)
3280 (modify-phases %standard-phases
3283 (with-directory-excursion "tests"
3284 (invoke "sh" "runtests")))))))
3285 (home-page "http://projectmallard.org")
3286 (synopsis "Convert Ducktype to Mallard documentation markup")
3288 "Ducktype is a lightweight syntax that can represent all the semantics
3289 of the Mallard XML documentation system. Ducktype files can be converted to
3290 Mallard using the @command{ducktype} tool. The yelp-tools package
3291 provides additional functionality on the produced Mallard documents.")
3292 (license license:expat)))
3294 (define-public python-scikit-image
3296 (name "python-scikit-image")
3301 (uri (pypi-uri "scikit-image" version))
3303 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3304 (build-system python-build-system)
3306 ;; TODO: Some tests require running X11 server. Disable them?
3308 ;; See DEPENDS.txt for the list of build and run time requiremnts
3310 `(("python-cloudpickle" ,python-cloudpickle)
3311 ("python-dask" ,python-dask)
3312 ("python-matplotlib" ,python-matplotlib)
3313 ("python-networkx" ,python-networkx)
3314 ("python-numpy" ,python-numpy)
3315 ("python-pillow" ,python-pillow)
3316 ("python-pywavelets" ,python-pywavelets)
3317 ("python-scipy" ,python-scipy)
3318 ("python-six" ,python-six)))
3320 `(("python-cython" ,python-cython)))
3321 (home-page "http://scikit-image.org/")
3322 (synopsis "Image processing in Python")
3324 "Scikit-image is a collection of algorithms for image processing.")
3325 (license license:bsd-3)))
3327 (define-public python2-scikit-image
3328 (package-with-python2 python-scikit-image))
3330 (define-public python-cython
3332 (name "python-cython")
3337 (uri (pypi-uri "Cython" version))
3340 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3341 (build-system python-build-system)
3342 ;; we need the full python package and not just the python-wrapper
3343 ;; because we need libpython3.3m.so
3345 `(("python" ,python)))
3348 (modify-phases %standard-phases
3349 (add-before 'check 'set-HOME
3350 ;; some tests require access to "$HOME/.cython"
3351 (lambda _ (setenv "HOME" "/tmp") #t))
3353 ;; FIXME: These tests started failing on armhf after the 0.28 update
3354 ;; (commit c69d11c5930), both with an error such as this:
3355 ;; compiling (cpp) and running dictcomp ...
3356 ;; === C/C++ compiler error output: ===
3358 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3359 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3360 ,@(if (target-arm32?)
3361 `((add-before 'check 'disable-failing-tests
3363 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3364 (for-each (lambda (test)
3365 (format disabled-tests "~a\n" test))
3366 '("memslice" "dictcomp"))
3367 (close-port disabled-tests)))))
3372 ;; Disable compiler optimizations to greatly reduce the running
3373 ;; time of the test suite.
3374 (setenv "CFLAGS" "-O0")
3376 (invoke "python" "runtests.py" "-vv"
3377 "-j" (number->string (parallel-job-count))))))))
3378 (home-page "https://cython.org/")
3379 (synopsis "C extensions for Python")
3380 (description "Cython is an optimising static compiler for both the Python
3381 programming language and the extended Cython programming language. It makes
3382 writing C extensions for Python as easy as Python itself.")
3383 (license license:asl2.0)
3384 (properties `((python2-variant . ,(delay python2-cython))))))
3386 (define-public python2-cython
3387 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3390 (name "python2-cython")
3392 `(("python-2" ,python-2))) ;this is not automatically changed
3394 (substitute-keyword-arguments (package-arguments base)
3396 `(modify-phases ,phases
3397 (add-before 'check 'adjust-test_embed
3399 (substitute* "runtests.py"
3400 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3401 ;; so it can give the right -L flag to GCC when embedding static
3402 ;; builds of Python. It is unaware that the Python "config"
3403 ;; directory (where the static library lives) was renamed in
3404 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3405 ;; which works fine, because that is where the shared library is.
3407 ;; It also appears to be unaware that the Makefile in Demos/embed
3408 ;; already unconditionally pass the static library location to GCC,
3409 ;; after checking sysconfig.get_config_var('LIBPL).
3411 ;; The effect is that the linker is unable to resolve libexpat
3412 ;; symbols when building for Python 2, because neither the Python 2
3413 ;; shared library nor Expat is available. To fix it, we can either
3414 ;; add Expat as an input and make it visible to the linker, or just
3415 ;; prevent it from overriding the Python shared library location.
3416 ;; The end result is identical, so we take the easy route.
3417 ((" or libname not in os\\.listdir\\(libdir\\)")
3421 ;; The RPython toolchain currently does not support Python 3.
3422 (define-public python2-rpython
3424 (name "python2-rpython")
3429 (uri (pypi-uri "rpython" version))
3432 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3433 (build-system python-build-system)
3434 (arguments `(#:python ,python-2))
3436 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3437 (home-page "https://rpython.readthedocs.org")
3438 (synopsis "Framework for implementing interpreters and virtual machines")
3439 (description "RPython is a translation and support framework for
3440 producing implementations of dynamic languages, emphasizing a clean separation
3441 between language specification and implementation aspects.")
3442 (license license:expat)))
3444 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3445 ;; python-scipy still build, as these three packages are often used together.
3446 (define-public python-numpy
3448 (name "python-numpy")
3454 "https://github.com/numpy/numpy/releases/download/v"
3455 version "/numpy-" version ".tar.gz"))
3458 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3459 (build-system python-build-system)
3461 `(("openblas" ,openblas)
3462 ("lapack" ,lapack)))
3464 `(("python-cython" ,python-cython)
3465 ("python-pytest" ,python-pytest)
3466 ("gfortran" ,gfortran)))
3469 (modify-phases %standard-phases
3470 (add-before 'build 'configure-blas-lapack
3471 (lambda* (#:key inputs #:allow-other-keys)
3472 (call-with-output-file "site.cfg"
3476 libraries = openblas
3477 library_dirs = ~a/lib
3478 include_dirs = ~a/include
3480 # backslash-n to make emacs happy
3482 lapack_libs = lapack
3483 library_dirs = ~a/lib
3484 include_dirs = ~a/include
3486 (assoc-ref inputs "openblas")
3487 (assoc-ref inputs "openblas")
3488 (assoc-ref inputs "lapack")
3489 (assoc-ref inputs "lapack"))))
3491 (add-before 'build 'fix-executable-paths
3492 (lambda* (#:key inputs #:allow-other-keys)
3493 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3494 ;; instead of /bin/sh.
3495 (substitute* "numpy/distutils/exec_command.py"
3496 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3497 (string-append match-start (assoc-ref inputs "bash") match-end)))
3498 ;; Use "gcc" executable, not "cc".
3499 (substitute* "numpy/distutils/system_info.py"
3500 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3501 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3503 ;; Tests can only be run after the library has been installed and not
3504 ;; within the source directory.
3506 (add-after 'install 'check
3507 (lambda* (#:key outputs inputs #:allow-other-keys)
3508 ;; Make installed package available for running the tests
3509 (add-installed-pythonpath inputs outputs)
3510 ;; Make sure "f2py" etc is found.
3511 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3512 ":" (getenv "PATH")))
3513 (with-directory-excursion "/tmp"
3514 (invoke "python" "-c"
3515 "import numpy; numpy.test(verbose=2)")))))))
3516 (home-page "http://www.numpy.org/")
3517 (synopsis "Fundamental package for scientific computing with Python")
3518 (description "NumPy is the fundamental package for scientific computing
3519 with Python. It contains among other things: a powerful N-dimensional array
3520 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3521 and Fortran code, useful linear algebra, Fourier transform, and random number
3523 (license license:bsd-3)))
3525 (define-public python2-numpy
3526 (package-with-python2 python-numpy))
3528 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3529 ;; interest only for legacy code going back to NumPy's predecessor
3531 (define-public python2-numpy-1.8
3532 (package (inherit python2-numpy)
3538 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3539 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3542 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3544 (substitute-keyword-arguments (package-arguments python2-numpy)
3546 `(modify-phases ,phases
3547 (replace 'configure-blas-lapack
3548 (lambda* (#:key inputs #:allow-other-keys)
3549 (call-with-output-file "site.cfg"
3553 libraries = openblas,lapack
3554 library_dirs = ~a/lib:~a/lib
3555 include_dirs = ~a/include:~a/include
3557 (assoc-ref inputs "openblas")
3558 (assoc-ref inputs "lapack")
3559 (assoc-ref inputs "openblas")
3560 (assoc-ref inputs "lapack"))))
3563 `(("python2-nose" ,python2-nose)))
3564 (description "NumPy is the fundamental package for scientific computing
3565 with Python. It contains among other things: a powerful N-dimensional array
3566 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3567 and Fortran code, useful linear algebra, Fourier transform, and random number
3568 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3569 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3571 (license license:bsd-3)))
3573 (define-public python-munch
3575 (name "python-munch")
3580 (uri (pypi-uri "munch" version))
3583 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3584 (build-system python-build-system)
3585 (home-page "https://github.com/Infinidat/munch")
3586 (synopsis "Dot-accessible dictionary")
3587 (description "Munch is a dot-accessible dictionary similar to JavaScript
3589 (license license:expat)))
3591 (define-public python2-munch
3592 (package-with-python2 python-munch))
3594 (define-public python-colormath
3596 (name "python-colormath")
3601 (uri (pypi-uri "colormath" version))
3604 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3605 (build-system python-build-system)
3607 `(("python-networkx" ,python-networkx)
3608 ("python-numpy" ,python-numpy)))
3609 (home-page "https://github.com/gtaylor/python-colormath")
3610 (synopsis "Color math and conversion library")
3612 "This is a Python library for color math and conversions.")
3613 (license license:bsd-3)))
3615 (define-public python2-colormath
3616 (package-with-python2 python-colormath))
3618 (define-public python-spectra
3620 (name "python-spectra")
3625 (uri (pypi-uri "spectra" version))
3628 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3629 (build-system python-build-system)
3632 (modify-phases %standard-phases
3634 (lambda _ (invoke "nosetests" "-v"))))))
3636 `(("python-colormath" ,python-colormath)))
3638 `(("python-nose" ,python-nose)))
3639 (home-page "https://github.com/jsvine/spectra")
3640 (synopsis "Color scales and color conversion")
3642 "This package provides a Python library intended to make color math,
3643 color scales, and color space conversion easy. It has support for:
3648 @item Color blending
3649 @item Brightening/darkening colors
3650 @item Saturating/desaturating colors
3651 @item Conversion to/from multiple color spaces.
3653 (license license:expat)))
3655 (define-public python2-spectra
3656 (package-with-python2 python-spectra))
3658 (define-public python-numpy-documentation
3660 (name "python-numpy-documentation")
3661 (version (package-version python-numpy))
3662 (source (package-source python-numpy))
3663 (build-system python-build-system)
3665 `(("python-matplotlib" ,python-matplotlib)
3666 ("python-numpy" ,python-numpy)
3667 ("pkg-config" ,pkg-config)
3668 ("python-sphinx" ,python-sphinx)
3669 ("python-numpydoc" ,python-numpydoc)
3670 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3672 texlive-generic-ifxetex
3673 texlive-generic-pdftex
3675 texlive-latex-capt-of
3677 texlive-latex-environ
3678 texlive-latex-eqparbox
3679 texlive-latex-etoolbox
3680 texlive-latex-expdlist
3681 texlive-latex-fancyhdr
3682 texlive-latex-fancyvrb
3683 texlive-latex-fncychap
3685 texlive-latex-framed
3686 texlive-latex-geometry
3687 texlive-latex-graphics
3688 texlive-latex-hyperref
3689 texlive-latex-mdwtools
3690 texlive-latex-multirow
3691 texlive-latex-needspace
3692 texlive-latex-oberdiek
3693 texlive-latex-parskip
3694 texlive-latex-preview
3695 texlive-latex-tabulary
3696 texlive-latex-threeparttable
3697 texlive-latex-titlesec
3698 texlive-latex-trimspaces
3700 texlive-latex-upquote
3702 texlive-latex-varwidth
3703 texlive-latex-wrapfig)))
3704 ("texinfo" ,texinfo)
3706 ("scipy-sphinx-theme"
3707 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3710 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3711 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3714 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3715 ,@(package-native-inputs python-numpy)))
3717 `(#:tests? #f ; we're only generating the documentation
3719 (modify-phases %standard-phases
3722 (lambda* (#:key inputs outputs #:allow-other-keys)
3723 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3725 data "/doc/" ,name "-"
3726 ,(package-version python-numpy)))
3727 (info-reader (string-append data "/info"))
3728 (html (string-append doc "/html"))
3729 (scipy-sphinx-theme "scipy-sphinx-theme")
3730 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3731 (pyver ,(string-append "PYVER=")))
3733 ;; FIXME: this is needed to for texlive-union to generate
3734 ;; fonts, which are not found.
3735 (setenv "HOME" "/tmp")
3737 (with-directory-excursion "doc"
3738 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3740 (invoke "make" "html" pyver)
3741 (invoke "make" "latex" "PAPER=a4" pyver)
3742 (invoke "make" "-C" "build/latex"
3743 "all-pdf" "PAPER=a4" pyver)
3744 ;; FIXME: Generation of the info file fails.
3745 ;; (invoke "make" "info" pyver)
3747 ;; (copy-file "build/texinfo/numpy.info"
3748 ;; (string-append info "/numpy.info"))
3749 (for-each (lambda (file)
3750 (copy-file (string-append "build/latex" file)
3751 (string-append doc file)))
3752 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3753 (with-directory-excursion "build/html"
3754 (for-each (lambda (file)
3755 (let* ((dir (dirname file))
3756 (tgt-dir (string-append html "/" dir)))
3757 (unless (equal? "." dir)
3759 (install-file file html)))
3760 (find-files "." ".*")))))
3762 (home-page (package-home-page python-numpy))
3763 (synopsis "Documentation for the python-numpy package")
3764 (description (package-description python-numpy))
3765 (license (package-license python-numpy))))
3767 (define-public python2-numpy-documentation
3768 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3770 (inherit numpy-documentation)
3771 (native-inputs `(("python2-functools32" ,python2-functools32)
3772 ,@(package-native-inputs numpy-documentation))))))
3774 (define-public python-pygit2
3776 (name "python-pygit2")
3781 (uri (pypi-uri "pygit2" version))
3783 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3784 (build-system python-build-system)
3786 '(#:tests? #f)) ; tests don't run correctly in our environment
3788 `(("python-six" ,python-six)
3789 ("python-cffi" ,python-cffi)
3790 ("libgit2" ,libgit2)
3791 ("python-tox" ,python-tox)))
3793 `(("python-pytest" ,python-pytest)))
3794 (home-page "https://github.com/libgit2/pygit2")
3795 (synopsis "Python bindings for libgit2")
3796 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3797 library, libgit2 implements Git plumbing.")
3798 ;; GPL2.0 only, with linking exception.
3799 (license license:gpl2)))
3801 (define-public python2-pygit2
3802 (package-with-python2 python-pygit2))
3804 (define-public python-pyparsing
3806 (name "python-pyparsing")
3811 (uri (pypi-uri "pyparsing" version))
3813 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3814 (build-system python-build-system)
3815 (outputs '("out" "doc"))
3817 `(#:tests? #f ; no test target
3819 (modify-phases %standard-phases
3820 (add-after 'install 'install-doc
3821 (lambda* (#:key outputs #:allow-other-keys)
3822 (let* ((doc (string-append (assoc-ref outputs "doc")
3823 "/share/doc/" ,name "-" ,version))
3824 (html-doc (string-append doc "/html"))
3825 (examples (string-append doc "/examples")))
3831 (install-file file tgt))
3832 (find-files dir ".*")))
3833 (list "docs" "htmldoc" "examples")
3834 (list doc html-doc examples))
3836 (home-page "https://github.com/pyparsing/pyparsing")
3837 (synopsis "Python parsing class library")
3839 "The pyparsing module is an alternative approach to creating and
3840 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3841 of regular expressions. The pyparsing module provides a library of classes
3842 that client code uses to construct the grammar directly in Python code.")
3843 (license license:expat)))
3845 (define-public python2-pyparsing
3846 (package-with-python2 python-pyparsing))
3848 (define-public python-numpydoc
3850 (name "python-numpydoc")
3855 (uri (pypi-uri "numpydoc" version))
3858 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3859 (build-system python-build-system)
3861 `(("python-sphinx" ,python-sphinx)))
3863 `(("python-nose" ,python-nose)))
3864 (home-page "https://pypi.python.org/pypi/numpydoc")
3866 "Numpy's Sphinx extensions")
3868 "Sphinx extension to support docstrings in Numpy format.")
3869 (license license:bsd-2)))
3871 (define-public python2-numpydoc
3872 (package-with-python2 python-numpydoc))
3874 (define-public python-numexpr
3876 (name "python-numexpr")
3881 (uri (pypi-uri "numexpr" version))
3884 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3885 (build-system python-build-system)
3886 (arguments `(#:tests? #f)) ; no tests included
3888 `(("python-numpy" ,python-numpy)))
3889 (home-page "https://github.com/pydata/numexpr")
3890 (synopsis "Fast numerical expression evaluator for NumPy")
3892 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3893 expressions that operate on arrays are accelerated and use less memory than
3894 doing the same calculation in Python. In addition, its multi-threaded
3895 capabilities can make use of all your cores, which may accelerate
3896 computations, most specially if they are not memory-bounded (e.g. those using
3897 transcendental functions).")
3898 (license license:expat)))
3900 (define-public python2-numexpr
3901 (package-with-python2 python-numexpr))
3903 (define-public python-cycler
3905 (name "python-cycler")
3909 (uri (pypi-uri "cycler" version))
3912 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3913 (build-system python-build-system)
3915 ;; XXX: The current version requires 'coveralls' which we don't have.
3916 ;; Enable this for the next release which uses 'python-pytest'.
3919 `(("python-six" ,python-six)))
3920 (home-page "http://matplotlib.org/cycler/")
3921 (synopsis "Composable keyword argument iterator")
3923 "When using @code{matplotlib} and plotting more than one line, it is
3924 common to want to be able to want to be able to cycle over one or more artist
3925 styles; but the plotting logic can quickly become involved.
3926 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3927 @code{Cycler} class was developed.")
3928 (license license:bsd-3)))
3930 (define-public python2-cycler
3931 (package-with-python2 python-cycler))
3933 (define-public python-colorspacious
3935 (name "python-colorspacious")
3941 (url "https://github.com/njsmith/colorspacious.git")
3942 (commit (string-append "v" version))))
3943 (file-name (git-file-name name version))
3945 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3946 (build-system python-build-system)
3948 `(("python-numpy" ,python-numpy)))
3950 `(("python-nose" ,python-nose)))
3953 (modify-phases %standard-phases
3956 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3957 (home-page "https://github.com/njsmith/colorspacious")
3958 (synopsis "Python library for colorspace conversions")
3959 (description "@code{colorspacious} is a Python library that lets you
3960 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3961 (license license:expat)))
3963 (define-public python2-colorspacious
3964 (package-with-python2 python-colorspacious))
3966 (define-public python-matplotlib
3968 (name "python-matplotlib")
3973 (uri (pypi-uri "matplotlib" version))
3976 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3977 (build-system python-build-system)
3978 (propagated-inputs ; the following packages are all needed at run time
3979 `(("python-cycler" ,python-cycler)
3980 ("python-kiwisolver" ,python-kiwisolver)
3981 ("python-pyparsing" ,python-pyparsing)
3982 ("python-pygobject" ,python-pygobject)
3983 ("gobject-introspection" ,gobject-introspection)
3984 ("python-tkinter" ,python "tk")
3985 ("python-dateutil" ,python-dateutil)
3986 ("python-numpy" ,python-numpy)
3987 ("python-pillow" ,python-pillow)
3988 ("python-pytz" ,python-pytz)
3989 ("python-six" ,python-six)
3990 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3991 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3992 ;; object. For this reason we need to import both libraries.
3993 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3994 ("python-pycairo" ,python-pycairo)
3995 ("python-cairocffi" ,python-cairocffi)))
3997 `(("libpng" ,libpng)
3998 ("imagemagick" ,imagemagick)
3999 ("freetype" ,freetype)
4002 ;; FIXME: Add backends when available.
4003 ;("python-wxpython" ,python-wxpython)
4007 `(("pkg-config" ,pkg-config)
4008 ("python-pytest" ,python-pytest)
4009 ("python-mock" ,python-mock)
4014 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4017 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4020 (modify-phases %standard-phases
4021 ;; XXX We disable all image comparison tests because we're using a
4022 ;; newer version of FreeType than matplotlib expects. This leads to
4023 ;; minor differences throughout the tests.
4024 (add-after 'unpack 'fix-and-disable-failing-tests
4026 (substitute* (append (find-files "lib/matplotlib/tests/"
4028 (find-files "lib/mpl_toolkits/tests"
4030 (("^from matplotlib" match)
4031 (string-append "import pytest\n" match))
4032 (("( *)@image_comparison" match indent)
4033 (string-append indent
4034 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4036 (substitute* "lib/matplotlib/tests/test_animation.py"
4037 (("/bin/sh") (which "sh")))
4038 (for-each delete-file
4039 ;; test_normal_axes, test_get_tightbbox_polar
4040 '("lib/matplotlib/tests/test_axes.py"
4041 ;; test_outward_ticks
4042 "lib/matplotlib/tests/test_tightlayout.py"
4043 ;; Fontconfig returns no fonts.
4044 "lib/matplotlib/tests/test_font_manager.py"))
4046 (add-before 'install 'install-jquery-ui
4047 (lambda* (#:key outputs inputs #:allow-other-keys)
4048 (let ((dir (string-append (assoc-ref outputs "out")
4049 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4052 (assoc-ref inputs "jquery-ui")
4056 (add-after 'install 'check
4057 (lambda* (#:key outputs inputs #:allow-other-keys)
4058 (add-installed-pythonpath inputs outputs)
4059 (invoke "python" "tests.py" "-v"
4060 "-m" "not network")))
4061 (add-before 'build 'configure-environment
4062 (lambda* (#:key outputs inputs #:allow-other-keys)
4063 (let ((cairo (assoc-ref inputs "cairo")))
4064 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4066 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4067 (setenv "HOME" (getcwd))
4068 (call-with-output-file "setup.cfg"
4070 (format port "[directories]~%
4071 basedirlist = ~a,~a~%
4074 (assoc-ref inputs "tcl")
4075 (assoc-ref inputs "tk")))))
4077 (home-page "https://matplotlib.org/")
4078 (synopsis "2D plotting library for Python")
4080 "Matplotlib is a Python 2D plotting library which produces publication
4081 quality figures in a variety of hardcopy formats and interactive environments
4082 across platforms. Matplotlib can be used in Python scripts, the python and
4083 ipython shell, web application servers, and six graphical user interface
4085 (license license:psfl)
4086 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4088 (define-public python2-matplotlib
4089 (let ((matplotlib (package-with-python2
4090 (strip-python2-variant python-matplotlib))))
4091 (package (inherit matplotlib)
4096 (uri (pypi-uri "matplotlib" version))
4099 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4101 (substitute-keyword-arguments (package-arguments matplotlib)
4103 `(modify-phases ,phases
4104 (replace 'install-jquery-ui
4105 (lambda* (#:key outputs inputs #:allow-other-keys)
4106 (let ((dir (string-append (assoc-ref outputs "out")
4107 "/lib/python2.7/site-packages/"
4108 "matplotlib/backends/web_backend/")))
4111 (assoc-ref inputs "jquery-ui")
4114 (delete 'check))))) ; These tests weren't run the the past.
4115 ;; Make sure to use special packages for Python 2 instead
4116 ;; of those automatically rewritten by package-with-python2.
4118 `(("python2-pycairo" ,python2-pycairo)
4119 ("python2-backports-functools-lru-cache"
4120 ,python2-backports-functools-lru-cache)
4121 ("python2-functools32" ,python2-functools32)
4122 ("python2-pygobject-2" ,python2-pygobject-2)
4123 ("python2-subprocess32" ,python2-subprocess32)
4124 ("python2-tkinter" ,python-2 "tk")
4125 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4126 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4128 (define-public python-matplotlib-documentation
4130 (name "python-matplotlib-documentation")
4131 (version (package-version python-matplotlib))
4132 (source (package-source python-matplotlib))
4133 (build-system python-build-system)
4135 `(("python-matplotlib" ,python-matplotlib)
4136 ("python-colorspacious" ,python-colorspacious)
4137 ("python-sphinx" ,python-sphinx)
4138 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4139 ("python-sphinx-gallery" ,python-sphinx-gallery)
4140 ("python-numpydoc" ,python-numpydoc)
4141 ("python-ipython" ,python-ipython)
4142 ("python-ipykernel" ,python-ipykernel)
4143 ("python-mock" ,python-mock)
4144 ("graphviz" ,graphviz)
4145 ("texlive" ,(texlive-union (list texlive-amsfonts
4146 texlive-latex-amsmath
4147 texlive-latex-enumitem
4148 texlive-latex-expdlist
4149 texlive-latex-geometry
4150 texlive-latex-preview
4151 texlive-latex-type1cm
4154 texlive-generic-pdftex
4157 texlive-fonts-adobe-times
4158 texlive-fonts-txfonts)))
4159 ("texinfo" ,texinfo)
4160 ,@(package-native-inputs python-matplotlib)))
4162 `(#:tests? #f ; we're only generating documentation
4164 (modify-phases %standard-phases
4165 ;; The tests in python-matplotlib are run after the install phase, so
4166 ;; we need to delete the extra phase here.
4171 (setenv "PYTHONPATH"
4172 (string-append (getenv "PYTHONPATH")
4173 ":" (getcwd) "/../examples/units"))
4174 (substitute* "conf.py"
4176 (("^SHA = check_output.*")
4177 (string-append "SHA = \"" ,version "\"\n"))
4178 ;; Don't fetch intersphinx files from the Internet
4179 (("^explicit_order_folders" m)
4180 (string-append "intersphinx_mapping = {}\n" m))
4181 (("'sphinx.ext.intersphinx',") "")
4182 ;; Disable URL embedding which requires internet access.
4183 (("'https://docs.scipy.org/doc/numpy'") "None")
4184 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4186 "SPHINXBUILD=sphinx-build"
4187 "SPHINXOPTS=" ; don't abort on warnings
4190 (lambda* (#:key inputs outputs #:allow-other-keys)
4191 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4192 (doc (string-append data "/doc/python-matplotlib-" ,version))
4193 (info (string-append data "/info"))
4194 (html (string-append doc "/html")))
4197 (copy-recursively "build/html" html)
4198 (symlink (string-append html "/_images")
4199 (string-append info "/matplotlib-figures"))
4200 (with-directory-excursion "build/texinfo"
4201 (substitute* "matplotlib.texi"
4202 (("@image\\{([^,]*)" all file)
4203 (string-append "@image{matplotlib-figures/" file)))
4204 (symlink (string-append html "/_images")
4205 "./matplotlib-figures")
4206 (invoke "makeinfo" "--no-split"
4207 "-o" "matplotlib.info" "matplotlib.texi"))
4208 (install-file "build/texinfo/matplotlib.info" info))
4210 (home-page (package-home-page python-matplotlib))
4211 (synopsis "Documentation for the python-matplotlib package")
4212 (description (package-description python-matplotlib))
4213 (license (package-license python-matplotlib))))
4215 (define-public python2-matplotlib-documentation
4216 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4220 (alist-delete "python-sphinx-copybutton"
4221 (package-native-inputs parent))))))
4223 (define-public python-matplotlib-venn
4225 (name "python-matplotlib-venn")
4230 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4233 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4234 (build-system python-build-system)
4235 (arguments '(#:tests? #f)) ; tests are not included
4237 `(("python-matplotlib" ,python-matplotlib)
4238 ("python-numpy" ,python-numpy)
4239 ("python-scipy" ,python-scipy)))
4241 `(("unzip" ,unzip)))
4242 (home-page "https://github.com/konstantint/matplotlib-venn")
4243 (synopsis "Plot area-proportional Venn diagrams")
4245 "This package provides tools for plotting area-proportional two- and
4246 three-way Venn diagrams in @code{matplotlib}.")
4247 (license license:expat)))
4249 (define-public python2-pysnptools
4251 (name "python2-pysnptools")
4256 (uri (pypi-uri "pysnptools" version))
4259 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4260 (build-system python-build-system)
4262 `(#:python ,python-2 ; only Python 2.7 is supported
4263 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4265 `(("python2-numpy" ,python2-numpy)
4266 ("python2-scipy" ,python2-scipy)
4267 ("python2-pandas" ,python2-pandas)))
4269 `(("python2-cython" ,python2-cython)))
4270 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4271 (synopsis "Library for reading and manipulating genetic data")
4273 "PySnpTools is a library for reading and manipulating genetic data. It
4274 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4275 those files. It can also efficiently manipulate ranges of integers using set
4276 operators such as union, intersection, and difference.")
4277 (license license:asl2.0)))
4279 (define-public python-scipy
4281 (name "python-scipy")
4286 (uri (pypi-uri "scipy" version))
4289 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4290 (build-system python-build-system)
4292 `(("python-numpy" ,python-numpy)
4293 ("python-matplotlib" ,python-matplotlib)
4294 ("python-pyparsing" ,python-pyparsing)))
4296 `(("lapack" ,lapack)
4297 ("openblas" ,openblas)))
4299 `(("python-cython" ,python-cython)
4300 ("python-pytest" ,python-pytest)
4301 ("python-sphinx" ,python-sphinx)
4302 ("python-numpydoc" ,python-numpydoc)
4303 ("gfortran" ,gfortran)
4306 (outputs '("out" "doc"))
4309 (modify-phases %standard-phases
4310 (add-after 'unpack 'disable-broken-tests
4312 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4313 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4314 (string-append indent
4315 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4317 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4318 (("^def test_parallel_threads\\(\\):" m)
4319 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4322 (add-before 'build 'configure-openblas
4323 (lambda* (#:key inputs #:allow-other-keys)
4324 (call-with-output-file "site.cfg"
4328 libraries = openblas
4329 library_dirs = ~a/lib
4330 include_dirs = ~a/include
4332 # backslash-n to make emacs happy
4334 library_dirs = ~a/lib
4335 atlas_libs = openblas
4337 (assoc-ref inputs "openblas")
4338 (assoc-ref inputs "openblas")
4339 (assoc-ref inputs "openblas"))))
4341 (add-after 'install 'install-doc
4342 (lambda* (#:key inputs outputs #:allow-other-keys)
4343 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4344 (doc (string-append data "/doc/" ,name "-" ,version))
4345 (html (string-append doc "/html"))
4346 (pyver ,(string-append "PYVER=" (version-major+minor
4347 (package-version python))))
4348 ;; By default it tries to run sphinx-build through the Python
4349 ;; interpreter which won't work with our shell wrapper.
4350 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4351 ;; Make installed package available for building the
4353 (add-installed-pythonpath inputs outputs)
4354 (with-directory-excursion "doc"
4355 ;; Fix generation of images for mathematical expressions.
4356 (substitute* (find-files "source" "conf\\.py")
4357 (("pngmath_use_preview = True")
4358 "pngmath_use_preview = False"))
4360 (invoke "make" "html" pyver sphinxbuild)
4361 (with-directory-excursion "build/html"
4362 (for-each (lambda (file)
4363 (let* ((dir (dirname file))
4364 (tgt-dir (string-append html "/" dir)))
4365 (install-file file html)))
4366 (find-files "." ".*")))))
4368 ;; Tests can only be run after the library has been installed and not
4369 ;; within the source directory.
4371 (add-after 'install 'check
4372 (lambda* (#:key inputs outputs #:allow-other-keys)
4373 (add-installed-pythonpath inputs outputs)
4374 (with-directory-excursion "/tmp"
4375 (invoke "python" "-c"
4376 "import scipy; scipy.test(verbose=2)")))))))
4377 (home-page "https://www.scipy.org/")
4378 (synopsis "The Scipy library provides efficient numerical routines")
4379 (description "The SciPy library is one of the core packages that make up
4380 the SciPy stack. It provides many user-friendly and efficient numerical
4381 routines such as routines for numerical integration and optimization.")
4382 (properties `((python2-variant . ,(delay python2-scipy))))
4383 (license license:bsd-3)))
4385 ;; Version 1.2.2 is the last version to support Python 2
4386 (define-public python2-scipy
4388 (inherit (package-with-python2
4389 (strip-python2-variant python-scipy)))
4394 (uri (pypi-uri "scipy" version))
4397 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4399 (define-public python-socksipy-branch
4401 (name "python-socksipy-branch")
4406 (uri (pypi-uri "SocksiPy-branch" version))
4409 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4410 (build-system python-build-system)
4412 `(#:tests? #f)) ; There are no tests
4413 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4414 (synopsis "Python SOCKS module")
4416 "SocksiPy - A Python SOCKS client module. It provides a
4417 socket-like interface that supports connections to any TCP
4418 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4419 The original version was developed by Dan Haim, this is a
4420 branch created by Mario Vilas to address some open issues,
4421 as the original project seems to have been abandoned circa 2007.")
4422 (license license:bsd-3)))
4424 (define-public python2-socksipy-branch
4425 (package-with-python2 python-socksipy-branch))
4427 (define-public python-pycodestyle
4429 (name "python-pycodestyle")
4434 (uri (pypi-uri "pycodestyle" version))
4437 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4438 (build-system python-build-system)
4439 (home-page "https://pycodestyle.readthedocs.io/")
4440 (synopsis "Python style guide checker")
4441 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4442 Python code against some of the style conventions in
4443 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4444 (license license:expat)))
4446 (define-public python2-pycodestyle
4447 (package-with-python2 python-pycodestyle))
4449 (define-public python-multidict
4451 (name "python-multidict")
4456 (uri (pypi-uri "multidict" version))
4459 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4460 (build-system python-build-system)
4462 `(("python-pytest" ,python-pytest)
4463 ("python-pytest-runner" ,python-pytest-runner)))
4464 (home-page "https://github.com/aio-libs/multidict/")
4465 (synopsis "Multidict implementation")
4466 (description "Multidict is dict-like collection of key-value pairs
4467 where key might be occurred more than once in the container.")
4468 (license license:asl2.0)))
4470 (define-public python-orderedmultidict
4472 (name "python-orderedmultidict")
4477 (uri (pypi-uri "orderedmultidict" version))
4480 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4481 (build-system python-build-system)
4484 (modify-phases %standard-phases
4485 (add-after 'unpack 'fix-tests
4487 ;; The package uses nosetest for running the tests.
4488 ;; Adding this initfile allows to run the test suite
4489 ;; without requiring nosetest.
4490 (with-output-to-file "tests/__init__.py" newline)
4493 `(("python-six" ,python-six)))
4495 `(("python-pycodestyle" ,python-pycodestyle)))
4496 (home-page "https://github.com/gruns/orderedmultidict")
4497 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4498 (description "This package contains a library for ordered multivalue
4499 dictionaries. A multivalue dictionary is a dictionary that can store
4500 multiple values for the same key. An ordered multivalue dictionary is a
4501 multivalue dictionary that retains the order of insertions and deletions.")
4502 (license license:unlicense)))
4504 (define-public python2-orderedmultidict
4505 (package-with-python2 python-orderedmultidict))
4507 (define-public python-autopep8
4509 (name "python-autopep8")
4514 (uri (pypi-uri "autopep8" version))
4517 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4518 (build-system python-build-system)
4520 `(("python-pycodestyle" ,python-pycodestyle)))
4521 (home-page "https://github.com/hhatto/autopep8")
4522 (synopsis "Format Python code according to the PEP 8 style guide")
4524 "@code{autopep8} automatically formats Python code to conform to
4525 the PEP 8 style guide. It uses the pycodestyle utility to determine
4526 what parts of the code needs to be formatted. @code{autopep8} is
4527 capable of fixing most of the formatting issues that can be reported
4529 (license (license:non-copyleft
4530 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4532 (define-public python2-autopep8
4533 (package-with-python2 python-autopep8))
4535 (define-public python-distutils-extra
4537 (name "python-distutils-extra")
4542 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4543 version "/+download/python-distutils-extra-"
4547 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4548 (build-system python-build-system)
4549 (home-page "https://launchpad.net/python-distutils-extra/")
4550 (synopsis "Enhancements to Python's distutils")
4552 "The python-distutils-extra module enables you to easily integrate
4553 gettext support, themed icons, and scrollkeeper-based documentation into
4554 Python's distutils.")
4555 (license license:gpl2)))
4557 (define-public python2-distutils-extra
4558 (package-with-python2 python-distutils-extra))
4560 (define-public python2-elib.intl
4562 (name "python2-elib.intl")
4566 ;; This project doesn't tag releases or publish tarballs, so we take
4567 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4570 (url "https://github.com/dieterv/elib.intl.git")
4571 (commit "d09997cfef")))
4572 (file-name (string-append name "-" version "-checkout"))
4575 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4576 (build-system python-build-system)
4578 ;; incompatible with Python 3 (exception syntax)
4579 `(#:python ,python-2
4581 (home-page "https://github.com/dieterv/elib.intl")
4582 (synopsis "Enhanced internationalization for Python")
4584 "The elib.intl module provides enhanced internationalization (I18N)
4585 services for your Python modules and applications.")
4586 (license license:lgpl3+)))
4588 (define-public python-olefile
4590 (name "python-olefile")
4595 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4596 "download/v" version "/olefile-" version ".tar.gz"))
4597 (file-name (string-append name "-" version ".tar.gz"))
4600 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4601 (build-system python-build-system)
4602 (home-page "https://www.decalage.info/python/olefileio")
4603 (synopsis "Read and write Microsoft OLE2 files.")
4605 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4606 Storage or Compound Document, Microsoft Office). It is an improved version of
4607 the OleFileIO module from PIL, the Python Image Library.")
4608 (license license:bsd-3)))
4610 (define-public python2-olefile
4611 (package-with-python2 python-olefile))
4613 (define-public python-pillow
4615 (name "python-pillow")
4620 (uri (pypi-uri "Pillow" version))
4623 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4624 (build-system python-build-system)
4626 `(("python-pytest" ,python-pytest)))
4628 `(("freetype" ,freetype)
4631 ("libjpeg" ,libjpeg)
4632 ("openjpeg" ,openjpeg)
4633 ("libtiff" ,libtiff)
4634 ("libwebp" ,libwebp)))
4636 `(("python-olefile" ,python-olefile)))
4639 (modify-phases %standard-phases
4640 (add-after 'unpack 'patch-ldconfig
4642 (substitute* "setup.py"
4643 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4644 (delete 'check) ; We must run checks after python-pillow is installed.
4645 (add-after 'install 'check-installed
4646 (lambda* (#:key outputs inputs #:allow-other-keys)
4648 (setenv "HOME" (getcwd))
4649 ;; Make installed package available for running the tests.
4650 (add-installed-pythonpath inputs outputs)
4651 (invoke "python" "selftest.py" "--installed")
4652 (invoke "python" "-m" "pytest" "-vv")))))))
4653 (home-page "https://python-pillow.org")
4654 (synopsis "Fork of the Python Imaging Library")
4656 "The Python Imaging Library adds image processing capabilities to your
4657 Python interpreter. This library provides extensive file format support, an
4658 efficient internal representation, and fairly powerful image processing
4659 capabilities. The core image library is designed for fast access to data
4660 stored in a few basic pixel formats. It should provide a solid foundation for
4661 a general image processing tool.")
4662 (license (license:x11-style
4663 "http://www.pythonware.com/products/pil/license.htm"
4664 "The PIL Software License"))))
4666 (define-public python2-pillow
4667 (package-with-python2 python-pillow))
4669 (define-public python-pycparser
4671 (name "python-pycparser")
4676 (uri (pypi-uri "pycparser" version))
4679 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4680 (outputs '("out" "doc"))
4681 (build-system python-build-system)
4683 `(("pkg-config" ,pkg-config)))
4686 (modify-phases %standard-phases
4689 (with-directory-excursion "tests"
4690 (invoke "python" "all_tests.py"))
4692 (add-after 'install 'install-doc
4693 (lambda* (#:key outputs #:allow-other-keys)
4694 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4695 (doc (string-append data "/doc/" ,name "-" ,version))
4696 (examples (string-append doc "/examples")))
4698 (for-each (lambda (file)
4699 (copy-file (string-append "." file)
4700 (string-append doc file)))
4701 '("/README.rst" "/CHANGES" "/LICENSE"))
4702 (copy-recursively "examples" examples)
4704 (home-page "https://github.com/eliben/pycparser")
4705 (synopsis "C parser in Python")
4707 "Pycparser is a complete parser of the C language, written in pure Python
4708 using the PLY parsing library. It parses C code into an AST and can serve as
4709 a front-end for C compilers or analysis tools.")
4710 (license license:bsd-3)))
4712 (define-public python2-pycparser
4713 (package-with-python2 python-pycparser))
4715 (define-public python-pywavelets
4717 (name "python-pywavelets")
4719 (home-page "https://github.com/PyWavelets/pywt")
4722 (uri (pypi-uri "PyWavelets" version))
4725 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4726 (build-system python-build-system)
4728 '(#:modules ((ice-9 ftw)
4732 (guix build python-build-system))
4733 #:phases (modify-phases %standard-phases
4736 (let ((cwd (getcwd))
4737 (libdir (find (cut string-prefix? "lib." <>)
4738 (scandir "build"))))
4739 (with-directory-excursion (string-append cwd "/build/" libdir)
4740 (invoke "nosetests" "-v" "."))))))))
4742 `(("python-matplotlib" ,python-matplotlib) ;for tests
4743 ("python-nose" ,python-nose)))
4745 `(("python-numpy" ,python-numpy)))
4746 (synopsis "Wavelet transforms in Python")
4748 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4749 mathematical basis functions that are localized in both time and frequency.
4750 Wavelet transforms are time-frequency transforms employing wavelets. They are
4751 similar to Fourier transforms, the difference being that Fourier transforms are
4752 localized only in frequency instead of in time and frequency.")
4753 (license license:expat)))
4755 (define-public python2-pywavelets
4756 (package-with-python2 python-pywavelets))
4758 (define-public python-xcffib
4760 (name "python-xcffib")
4765 (uri (pypi-uri "xcffib" version))
4768 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4769 (build-system python-build-system)
4771 `(("libxcb" ,libxcb)))
4773 `(("python-cffi" ,python-cffi) ; used at run time
4774 ("python-six" ,python-six)))
4776 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4779 (modify-phases %standard-phases
4780 (add-after 'unpack 'fix-libxcb-path
4781 (lambda* (#:key inputs #:allow-other-keys)
4782 (let ((libxcb (assoc-ref inputs "libxcb")))
4783 (substitute* '("xcffib/__init__.py")
4784 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4786 (add-after 'install 'install-doc
4787 (lambda* (#:key outputs #:allow-other-keys)
4788 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4789 "/doc/" ,name "-" ,version)))
4791 (copy-file "README.md"
4792 (string-append doc "/README.md"))
4794 (home-page "https://github.com/tych0/xcffib")
4795 (synopsis "XCB Python bindings")
4797 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4798 support for Python 3 and PyPy. It is based on cffi.")
4799 (license license:expat)))
4801 (define-public python2-xcffib
4802 (package-with-python2 python-xcffib))
4804 (define-public python-cairocffi
4806 (name "python-cairocffi")
4811 (uri (pypi-uri "cairocffi" version))
4814 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4815 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4816 (build-system python-build-system)
4817 (outputs '("out" "doc"))
4821 ("gdk-pixbuf" ,gdk-pixbuf)
4825 `(("pkg-config" ,pkg-config)
4826 ("python-pytest" ,python-pytest)
4827 ("python-pytest-cov" ,python-pytest-cov)
4828 ("python-pytest-runner" ,python-pytest-runner)
4829 ("python-sphinx" ,python-sphinx)
4830 ("python-docutils" ,python-docutils)))
4832 `(("python-xcffib" ,python-xcffib))) ; used at run time
4835 (modify-phases %standard-phases
4836 (add-after 'unpack 'patch-paths
4837 (lambda* (#:key inputs outputs #:allow-other-keys)
4838 (substitute* (find-files "." "\\.py$")
4839 (("dlopen\\(ffi, 'cairo'")
4840 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4841 "/lib/libcairo.so.2'"))
4842 (("dlopen\\(ffi, 'gdk-3'")
4843 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4844 "/lib/libgtk-3.so.0'"))
4845 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4846 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4847 "/lib/libgdk_pixbuf-2.0.so.0'"))
4848 (("dlopen\\(ffi, 'glib-2.0'")
4849 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4850 "/lib/libglib-2.0.so.0'"))
4851 (("dlopen\\(ffi, 'gobject-2.0'")
4852 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4853 "/lib/libgobject-2.0.so.0'"))
4854 (("dlopen\\(ffi, 'pangocairo-1.0'")
4855 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4856 "/lib/libpangocairo-1.0.so.0'"))
4857 (("dlopen\\(ffi, 'pango-1.0'")
4858 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4859 "/lib/libpango-1.0.so.0'")))
4861 (add-after 'install 'install-doc
4862 (lambda* (#:key inputs outputs #:allow-other-keys)
4863 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4864 (doc (string-append data "/doc/" ,name "-" ,version))
4865 (html (string-append doc "/html")))
4866 (setenv "LD_LIBRARY_PATH"
4867 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4868 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4869 (setenv "LANG" "en_US.UTF-8")
4871 (for-each (lambda (file)
4872 (copy-file (string-append "." file)
4873 (string-append doc file)))
4874 '("/README.rst" "/CHANGES" "/LICENSE"))
4875 (system* "python" "setup.py" "build_sphinx")
4876 (copy-recursively "docs/_build/html" html)
4878 (home-page "https://github.com/Kozea/cairocffi")
4879 (synopsis "Python bindings and object-oriented API for Cairo")
4881 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4882 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4883 graphics library with support for multiple backends including image buffers,
4884 PNG, PostScript, PDF, and SVG file output.")
4885 (license license:bsd-3)))
4887 (define-public python2-cairocffi
4888 (package-with-python2 python-cairocffi))
4890 (define-public python-decorator
4892 (name "python-decorator")
4897 (uri (pypi-uri "decorator" version))
4899 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4900 (build-system python-build-system)
4901 (home-page "https://pypi.python.org/pypi/decorator/")
4902 (synopsis "Python module to simplify usage of decorators")
4904 "The aim of the decorator module is to simplify the usage of decorators
4905 for the average programmer, and to popularize decorators usage giving examples
4906 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4907 etc. The core of this module is a decorator factory.")
4908 (license license:expat)))
4910 (define-public python2-decorator
4911 (package-with-python2 python-decorator))
4913 (define-public python-drmaa
4915 (name "python-drmaa")
4920 (uri (pypi-uri "drmaa" version))
4922 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4923 (build-system python-build-system)
4924 ;; The test suite requires libdrmaa which is provided by the cluster
4925 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4926 ;; should be set to the path of the libdrmaa library.
4927 (arguments '(#:tests? #f))
4929 `(("python-nose" ,python-nose)))
4930 (home-page "https://pypi.python.org/pypi/drmaa")
4931 (synopsis "Python bindings for the DRMAA library")
4933 "A Python package for Distributed Resource Management (DRM) job
4934 submission and control. This package is an implementation of the DRMAA 1.0
4935 Python language binding specification.")
4936 (license license:bsd-3)))
4938 (define-public python2-drmaa
4939 (package-with-python2 python-drmaa))
4941 (define-public python-grako
4943 (name "python-grako")
4949 (pypi-uri "grako" version ".zip"))
4952 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4953 (build-system python-build-system)
4954 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4957 ("python-pytest" ,python-pytest)
4958 ("python-pytest-runner" ,python-pytest-runner)))
4959 (home-page "https://bitbucket.org/neogeny/grako")
4960 (synopsis "EBNF parser generator")
4962 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4963 memoizing PEG/Packrat parser in Python.")
4964 (license license:bsd-3)))
4966 (define-public python2-grako
4967 (package-with-python2 python-grako))
4969 (define-public python-gridmap
4971 (name "python-gridmap")
4977 (url "https://github.com/pygridtools/gridmap.git")
4978 (commit (string-append "v" version))))
4979 (file-name (git-file-name name version))
4981 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4982 (build-system python-build-system)
4984 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4986 `(("python-psutil" ,python-psutil)
4987 ("python-drmaa" ,python-drmaa)
4988 ("python-pyzmq" ,python-pyzmq)))
4989 (home-page "https://github.com/pygridtools/gridmap")
4990 (synopsis "Create jobs on a cluster directly from Python")
4992 "Gridmap is a Python package to allow you to easily create jobs on the
4993 cluster directly from Python. You can directly map Python functions onto the
4994 cluster without needing to write any wrapper code yourself.")
4995 (license license:gpl3+)))
4997 (define-public python2-gridmap
4998 (package-with-python2 python-gridmap))
5000 (define-public python-honcho
5002 (name "python-honcho")
5008 (url "https://github.com/nickstenning/honcho.git")
5009 (commit (string-append "v" version))))
5010 (file-name (git-file-name name version))
5012 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5013 (build-system python-build-system)
5015 `(("python-pytest" ,python-pytest)
5016 ("python-mock" ,python-mock)
5017 ("python-tox" ,python-tox)
5018 ("which" ,which))) ;for tests
5020 `(("python-jinja2" ,python-jinja2)))
5023 (modify-phases %standard-phases
5025 (add-after 'install 'check
5026 (lambda* (#:key outputs inputs #:allow-other-keys)
5027 ;; fix honcho path in testsuite
5028 (substitute* "tests/conftest.py"
5029 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5030 "/bin/honcho" "'")))
5031 ;; It's easier to run tests after install.
5032 ;; Make installed package available for running the tests
5033 (add-installed-pythonpath inputs outputs)
5034 (invoke "py.test" "-v"))))))
5035 (home-page "https://github.com/nickstenning/honcho")
5036 (synopsis "Manage Procfile-based applications")
5038 "A Procfile is a file which describes how to run an application
5039 consisting of several processes. honcho starts all listed processes.
5040 The output of all running processes is collected by honcho and
5042 (license license:expat)))
5044 (define-public python2-honcho
5045 (package-with-python2 python-honcho))
5047 (define-public python-pexpect
5049 (name "python-pexpect")
5054 (uri (pypi-uri "pexpect" version))
5056 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5057 (build-system python-build-system)
5060 (modify-phases %standard-phases
5061 (add-before 'check 'prepare-tests
5063 (substitute* (find-files "tests")
5064 (("/bin/ls") (which "ls"))
5065 (("/bin/echo") (which "echo"))
5066 (("/bin/which") (which "which"))
5067 ;; Many tests try to use the /bin directory which
5068 ;; is not present in the build environment.
5069 ;; Use one that's non-empty and unlikely to change.
5070 (("/bin'") "/dev'"))
5071 ;; XXX: Socket connection test gets "Connection reset by peer".
5072 ;; Why does it not work? Delete for now.
5073 (delete-file "tests/test_socket.py")
5075 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5077 `(("python-nose" ,python-nose)
5078 ("python-pytest" ,python-pytest)
5081 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5083 `(("python-ptyprocess" ,python-ptyprocess)))
5084 (home-page "http://pexpect.readthedocs.org/")
5085 (synopsis "Controlling interactive console applications")
5087 "Pexpect is a pure Python module for spawning child applications;
5088 controlling them; and responding to expected patterns in their output.
5089 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5090 child application and control it as if a human were typing commands.")
5091 (license license:isc)))
5093 (define-public python2-pexpect
5094 (package-with-python2 python-pexpect))
5096 (define-public python-setuptools-scm
5098 (name "python-setuptools-scm")
5102 (uri (pypi-uri "setuptools_scm" version))
5105 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5106 (build-system python-build-system)
5107 (home-page "https://github.com/pypa/setuptools_scm/")
5108 (synopsis "Manage Python package versions in SCM metadata")
5110 "Setuptools_scm handles managing your Python package versions in
5111 @dfn{software configuration management} (SCM) metadata instead of declaring
5112 them as the version argument or in a SCM managed file.")
5113 (license license:expat)))
5115 (define-public python2-setuptools-scm
5116 (package-with-python2 python-setuptools-scm))
5118 (define-public python-pathlib2
5120 (name "python-pathlib2")
5125 (uri (pypi-uri "pathlib2" version))
5128 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5129 (build-system python-build-system)
5131 `(("python-scandir" ,python-scandir)
5132 ("python-six" ,python-six)))
5133 (home-page "https://pypi.python.org/pypi/pathlib2/")
5134 (synopsis "Object-oriented file system paths")
5135 (description "The goal of pathlib2 is to provide a backport of the
5136 standard @code{pathlib} module which tracks the standard library module, so
5137 all the newest features of the standard @code{pathlib} can be used also on
5138 older Python versions.")
5139 (license license:expat)))
5141 (define-public python-importlib-metadata
5143 (name "python-importlib-metadata")
5148 (uri (pypi-uri "importlib_metadata" version))
5150 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5151 (build-system python-build-system)
5153 `(("python-configparser" ,python-configparser)
5154 ("python-contextlib2" ,python-contextlib2)
5155 ("python-docutils" ,python-docutils)
5156 ("python-pathlib2" ,python-pathlib2)
5157 ("python-rst.linker" ,python-rst.linker)
5158 ("python-zipp" ,python-zipp)))
5160 `(("python-setuptools-scm" ,python-setuptools-scm)
5161 ("python-sphinx" ,python-sphinx)))
5162 (home-page "https://importlib-metadata.readthedocs.io/")
5163 (synopsis "Read metadata from Python packages")
5165 "@code{importlib_metadata} is a library which provides an API for
5166 accessing an installed Python package's metadata, such as its entry points or
5167 its top-level name. This functionality intends to replace most uses of
5168 @code{pkg_resources} entry point API and metadata API. Along with
5169 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5170 need to use the older and less efficient @code{pkg_resources} package.")
5171 (license license:asl2.0)))
5173 (define-public python-jaraco-packaging
5175 (name "python-jaraco-packaging")
5180 (uri (pypi-uri "jaraco.packaging" version))
5183 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5184 (build-system python-build-system)
5186 `(("python-pytest" ,python-pytest)
5187 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5188 ("python-pytest-flake8" ,python-pytest-flake8)
5189 ("python-rst.linker" ,python-rst.linker)
5190 ("python-setuptools" ,python-setuptools)
5191 ("python-setuptools-scm" ,python-setuptools-scm)
5192 ("python-six" ,python-six)
5193 ("python-sphinx" ,python-sphinx)))
5194 (home-page "https://github.com/jaraco/jaraco.packaging")
5195 (synopsis "Tools to supplement packaging Python releases")
5197 "This package provides various tools to supplement packaging Python
5199 (license license:expat)))
5201 (define-public python-pathpy
5203 (name "python-pathpy")
5208 (uri (pypi-uri "path.py" version))
5210 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5211 (outputs '("out" "doc"))
5212 (build-system python-build-system)
5214 `(("python-appdirs" ,python-appdirs)
5215 ("python-importlib-metadata" ,python-importlib-metadata)))
5217 `(("python-setuptools-scm" ,python-setuptools-scm)
5218 ("python-sphinx" ,python-sphinx)
5219 ("python-rst.linker" ,python-rst.linker)
5220 ("python-pytest" ,python-pytest)
5221 ("python-pytest-runner" ,python-pytest-runner)
5222 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5225 (modify-phases %standard-phases
5226 (add-after 'build 'build-doc
5228 (setenv "LANG" "en_US.UTF-8")
5229 (invoke "python" "setup.py" "build_sphinx")))
5230 (add-after 'install 'install-doc
5231 (lambda* (#:key outputs #:allow-other-keys)
5232 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5233 (doc (string-append data "/doc/" ,name "-" ,version))
5234 (html (string-append doc "/html")))
5236 (for-each (lambda (file)
5237 (copy-file file (string-append doc "/" file)))
5238 '("README.rst" "CHANGES.rst"))
5239 (copy-recursively "build/sphinx/html" html)
5243 ;; The import time test aborts if an import takes longer than
5244 ;; 100ms. It may very well take a little longer than that.
5245 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5246 (home-page "https://github.com/jaraco/path.py")
5247 (synopsis "Python module wrapper for built-in os.path")
5249 "@code{path.py} implements path objects as first-class entities, allowing
5250 common operations on files to be invoked on those path objects directly.")
5251 (license license:expat)))
5253 (define-public python2-pathpy
5254 (package-with-python2 python-pathpy))
5256 (define-public python-simplegeneric
5258 (name "python-simplegeneric")
5263 (uri (pypi-uri "simplegeneric" version ".zip"))
5265 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5266 (build-system python-build-system)
5268 `(("unzip" ,unzip)))
5269 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5270 (synopsis "Python module for simple generic functions")
5272 "The simplegeneric module lets you define simple single-dispatch generic
5273 functions, akin to Python’s built-in generic functions like @code{len()},
5274 @code{iter()} and so on. However, instead of using specially-named methods,
5275 these generic functions use simple lookup tables, akin to those used by
5276 e.g. @code{pickle.dump()} and other generic functions found in the Python
5278 (license license:zpl2.1)))
5280 (define-public python2-simplegeneric
5281 (package-with-python2 python-simplegeneric))
5283 (define-public python-ipython-genutils
5284 ;; TODO: This package is retired, check if can be removed, see description.
5286 (name "python-ipython-genutils")
5291 (uri (pypi-uri "ipython_genutils" version))
5293 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5294 (build-system python-build-system)
5295 (arguments `(#:tests? #f)) ; no tests
5296 (home-page "https://ipython.org")
5297 (synopsis "Vestigial utilities from IPython")
5299 "This package provides retired utilities from IPython. No packages
5300 outside IPython/Jupyter should depend on it.
5302 This package shouldn't exist. It contains some common utilities shared by
5303 Jupyter and IPython projects during The Big Split. As soon as possible, those
5304 packages will remove their dependency on this, and this package will go
5306 (license license:bsd-3)))
5308 (define-public python2-ipython-genutils
5309 (package-with-python2 python-ipython-genutils))
5311 (define-public python-traitlets
5313 (name "python-traitlets")
5318 (uri (pypi-uri "traitlets" version))
5321 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5322 (build-system python-build-system)
5325 (modify-phases %standard-phases
5326 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5328 `(("python-ipython-genutils" ,python-ipython-genutils)
5329 ("python-decorator" ,python-decorator)))
5331 `(("python-pytest" ,python-pytest)))
5332 (properties `((python2-variant . ,(delay python2-traitlets))))
5333 (home-page "https://ipython.org")
5334 (synopsis "Configuration system for Python applications")
5336 "Traitlets is a framework that lets Python classes have attributes with
5337 type checking, dynamically calculated default values, and ‘on change’
5338 callbacks. The package also includes a mechanism to use traitlets for
5339 configuration, loading values from files or from command line arguments. This
5340 is a distinct layer on top of traitlets, so you can use traitlets in your code
5341 without using the configuration machinery.")
5342 (license license:bsd-3)))
5344 (define-public python2-traitlets
5345 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5349 `(("python2-enum34" ,python2-enum34)
5350 ,@(package-propagated-inputs traitlets))))))
5352 (define-public python-jupyter-core
5354 (name "python-jupyter-core")
5359 (uri (string-append (pypi-uri "jupyter_core" version)))
5362 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5363 (build-system python-build-system)
5364 ;; FIXME: not sure how to run the tests
5365 (arguments `(#:tests? #f))
5367 `(("python-traitlets" ,python-traitlets)))
5368 (home-page "http://jupyter.org/")
5369 (synopsis "Jupyter base package")
5371 "Jupyter core is the base package on which Jupyter projects rely.")
5372 (license license:bsd-3)))
5374 (define-public python2-jupyter-core
5375 (package-with-python2 python-jupyter-core))
5377 (define-public python-jupyter-client
5379 (name "python-jupyter-client")
5384 (uri (pypi-uri "jupyter_client" version))
5387 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5388 (build-system python-build-system)
5389 ;; Tests fail because of missing native python kernel which I assume is
5390 ;; provided by the ipython package, which we cannot use because it would
5391 ;; cause a dependency cycle.
5395 #:phases (modify-phases %standard-phases
5396 (add-after 'unpack 'set-tool-file-names
5397 (lambda* (#:key inputs #:allow-other-keys)
5398 (let ((iproute (assoc-ref inputs "iproute")))
5399 (substitute* "jupyter_client/localinterfaces.py"
5401 (string-append "'" iproute "/sbin/ip'")))
5404 `(("iproute" ,iproute)))
5406 `(("python-pyzmq" ,python-pyzmq)
5407 ("python-traitlets" ,python-traitlets)
5408 ("python-jupyter-core" ,python-jupyter-core)))
5409 (home-page "http://jupyter.org/")
5410 (synopsis "Jupyter protocol implementation and client libraries")
5412 "The @code{jupyter_client} package contains the reference implementation
5413 of the Jupyter protocol. It also provides client and kernel management APIs
5414 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5415 installing @code{kernelspec}s for use with Jupyter frontends.")
5416 (license license:bsd-3)))
5418 (define-public python2-jupyter-client
5419 (package-with-python2 python-jupyter-client))
5421 (define-public python-ipykernel
5423 (name "python-ipykernel")
5428 (uri (pypi-uri "ipykernel" version))
5430 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5431 (build-system python-build-system)
5434 (modify-phases %standard-phases
5437 (setenv "HOME" "/tmp")
5438 (invoke "pytest" "-v")
5440 (add-after 'install 'set-python-file-name
5441 (lambda* (#:key outputs #:allow-other-keys)
5442 ;; Record the absolute file name of the 'python' executable in
5444 (let ((out (assoc-ref outputs "out")))
5445 (substitute* (string-append out "/share/jupyter"
5446 "/kernels/python3/kernel.json")
5448 (string-append "\"" (which "python") "\"")))
5451 `(("python-ipython" ,python-ipython)
5452 ;; imported at runtime during connect
5453 ("python-jupyter-client" ,python-jupyter-client)))
5455 `(("python-pytest" ,python-pytest)
5456 ("python-nose" ,python-nose)))
5457 (home-page "https://ipython.org")
5458 (synopsis "IPython Kernel for Jupyter")
5460 "This package provides the IPython kernel for Jupyter.")
5461 (license license:bsd-3)))
5463 ;; Version 5.1.1 and above no longer support Python 2.
5464 (define-public python2-ipykernel
5466 (name "python2-ipykernel")
5471 (uri (pypi-uri "ipykernel" version))
5473 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5474 (build-system python-build-system)
5476 `(#:python ,python-2
5478 (modify-phases %standard-phases
5481 (setenv "HOME" "/tmp")
5482 (invoke "pytest" "-v")
5485 `(("python2-ipython" ,python2-ipython)
5486 ;; imported at runtime during connect
5487 ("python2-jupyter-client" ,python2-jupyter-client)))
5489 `(("python2-pytest" ,python2-pytest)
5490 ("python2-nose" ,python2-nose)))
5491 (home-page "https://ipython.org")
5492 (synopsis "IPython Kernel for Jupyter")
5494 "This package provides the IPython kernel for Jupyter.")
5495 (license license:bsd-3)))
5497 (define-public python-pari-jupyter
5499 (name "python-pari-jupyter")
5504 (uri (pypi-uri "pari_jupyter" version))
5507 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5508 (build-system python-build-system)
5510 `(("python-ipykernel" ,python-ipykernel)))
5512 `(("pari-gp" ,pari-gp)
5513 ("readline" ,readline)))
5515 `(#:tests? #f)) ; no test suite
5517 "https://github.com/jdemeyer/pari_jupyter")
5518 (synopsis "A Jupyter kernel for PARI/GP")
5519 (description "The package provides a PARI/GP kernel for Jupyter.")
5520 (license license:gpl3+)))
5522 (define-public python-backcall
5524 (name "python-backcall")
5529 (uri (pypi-uri "backcall" version))
5532 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5533 (build-system python-build-system)
5534 (home-page "https://github.com/takluyver/backcall/")
5535 (synopsis "Specifications for callback functions passed in to an API")
5537 "If your code lets other people supply callback functions, it's important
5538 to specify the function signature you expect, and check that functions support
5539 that. Adding extra parameters later would break other peoples code unless
5540 you're careful. The @code{backcall} package provides a way of specifying the
5541 callback signature using a prototype function.")
5542 (license license:bsd-3)))
5544 ;; This is the latest release of the LTS version of ipython with support for
5545 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5546 ;; dropped support for Python 2.7.
5547 (define-public python2-ipython
5549 (name "python2-ipython")
5554 (uri (pypi-uri "ipython" version ".tar.gz"))
5556 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5557 (build-system python-build-system)
5559 `(("python2-backports-shutil-get-terminal-size"
5560 ,python2-backports-shutil-get-terminal-size)
5561 ("python2-pathlib2" ,python2-pathlib2)
5562 ("python2-pyzmq" ,python2-pyzmq)
5563 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5564 ("python2-terminado" ,python2-terminado)
5565 ("python2-matplotlib" ,python2-matplotlib)
5566 ("python2-numpy" ,python2-numpy)
5567 ("python2-numpydoc" ,python2-numpydoc)
5568 ("python2-jinja2" ,python2-jinja2)
5569 ("python2-mistune" ,python2-mistune)
5570 ("python2-pexpect" ,python2-pexpect)
5571 ("python2-pickleshare" ,python2-pickleshare)
5572 ("python2-simplegeneric" ,python2-simplegeneric)
5573 ("python2-jsonschema" ,python2-jsonschema)
5574 ("python2-traitlets" ,python2-traitlets)
5575 ("python2-nbformat" ,python2-nbformat)
5576 ("python2-pygments" ,python2-pygments)))
5578 `(("readline" ,readline)
5581 `(("graphviz" ,graphviz)
5582 ("pkg-config" ,pkg-config)
5583 ("python2-requests" ,python2-requests) ;; for tests
5584 ("python2-testpath" ,python2-testpath)
5585 ("python2-mock" ,python2-mock)
5586 ("python2-nose" ,python2-nose)))
5588 `(#:python ,python-2
5590 (modify-phases %standard-phases
5591 (add-before 'check 'delete-broken-tests
5592 (lambda* (#:key inputs #:allow-other-keys)
5593 ;; These tests throw errors for unknown reasons.
5594 (delete-file "IPython/core/tests/test_profile.py")
5595 (delete-file "IPython/core/tests/test_interactiveshell.py")
5596 (delete-file "IPython/core/tests/test_magic.py")
5598 (home-page "https://ipython.org")
5599 (synopsis "IPython is a tool for interactive computing in Python")
5601 "IPython provides a rich architecture for interactive computing with:
5602 Powerful interactive shells, a browser-based notebook, support for interactive
5603 data visualization, embeddable interpreters and tools for parallel
5605 (license license:bsd-3)))
5607 (define-public python-ipython
5609 (name "python-ipython")
5614 (uri (pypi-uri "ipython" version ".tar.gz"))
5616 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5617 (build-system python-build-system)
5619 `(("python-backcall" ,python-backcall)
5620 ("python-pyzmq" ,python-pyzmq)
5621 ("python-prompt-toolkit" ,python-prompt-toolkit)
5622 ("python-terminado" ,python-terminado)
5623 ("python-matplotlib" ,python-matplotlib)
5624 ("python-numpy" ,python-numpy)
5625 ("python-numpydoc" ,python-numpydoc)
5626 ("python-jedi" ,python-jedi)
5627 ("python-jinja2" ,python-jinja2)
5628 ("python-mistune" ,python-mistune)
5629 ("python-pexpect" ,python-pexpect)
5630 ("python-pickleshare" ,python-pickleshare)
5631 ("python-simplegeneric" ,python-simplegeneric)
5632 ("python-jsonschema" ,python-jsonschema)
5633 ("python-traitlets" ,python-traitlets)
5634 ("python-nbformat" ,python-nbformat)
5635 ("python-pygments" ,python-pygments)))
5637 `(("readline" ,readline)
5640 `(("graphviz" ,graphviz)
5641 ("pkg-config" ,pkg-config)
5642 ("python-requests" ,python-requests) ;; for tests
5643 ("python-testpath" ,python-testpath)
5644 ("python-nose" ,python-nose)))
5647 (modify-phases %standard-phases
5648 (add-after 'unpack 'make-docs-reproducible
5650 (substitute* "IPython/sphinxext/ipython_directive.py"
5651 ((".*import datetime") "")
5652 ((".*datetime.datetime.now\\(\\)") "")
5653 (("%timeit") "# %timeit"))
5655 ;; Tests can only be run after the library has been installed and not
5656 ;; within the source directory.
5658 (add-after 'install 'check
5659 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5662 ;; Make installed package available for running the tests
5663 (add-installed-pythonpath inputs outputs)
5664 (setenv "HOME" "/tmp/") ;; required by a test
5665 ;; We only test the core because one of the other tests
5666 ;; tries to import ipykernel.
5667 (invoke "python" "IPython/testing/iptest.py"
5668 "-v" "IPython/core/tests"))
5670 (add-before 'check 'fix-tests
5671 (lambda* (#:key inputs #:allow-other-keys)
5672 (substitute* "./IPython/utils/_process_posix.py"
5673 (("/usr/bin/env', 'which") (which "which")))
5674 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5675 (("#!/usr/bin/env python")
5676 (string-append "#!" (which "python"))))
5677 ;; This test introduces a circular dependency on ipykernel
5678 ;; (which depends on ipython).
5679 (delete-file "IPython/core/tests/test_display.py")
5680 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5681 (delete-file "IPython/core/tests/test_interactiveshell.py")
5683 (home-page "https://ipython.org")
5684 (synopsis "IPython is a tool for interactive computing in Python")
5686 "IPython provides a rich architecture for interactive computing with:
5687 Powerful interactive shells, a browser-based notebook, support for interactive
5688 data visualization, embeddable interpreters and tools for parallel
5690 (license license:bsd-3)))
5692 (define-public python-ipython-documentation
5694 (inherit python-ipython)
5695 (name "python-ipython-documentation")
5696 (version (package-version python-ipython))
5699 (modify-phases %standard-phases
5703 (lambda* (#:key outputs #:allow-other-keys)
5704 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5705 (doc (string-append data "/doc/" ,name "-" ,version))
5706 (html (string-append doc "/html"))
5707 (man1 (string-append data "/man/man1"))
5708 (info (string-append data "/info"))
5709 (examples (string-append doc "/examples"))
5710 (python-arg (string-append "PYTHON=" (which "python"))))
5711 (setenv "LANG" "en_US.utf8")
5712 (with-directory-excursion "docs"
5713 ;; FIXME: pdf fails to build
5714 ;;(system* "make" "pdf" "PAPER=a4")
5715 (system* "make" python-arg "html")
5716 ;; FIXME: the generated texi file contains ^@^@, which trips
5718 ;; (system* "make" python-arg "info")
5720 (copy-recursively "docs/man" man1)
5721 (copy-recursively "examples" examples)
5722 (copy-recursively "docs/build/html" html)
5723 ;; (copy-file "docs/build/latex/ipython.pdf"
5724 ;; (string-append doc "/ipython.pdf"))
5726 ;; (copy-file "docs/build/texinfo/ipython.info"
5727 ;; (string-append info "/ipython.info"))
5728 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5731 `(("python-ipython" ,python-ipython)
5732 ("python-ipykernel" ,python-ipykernel)))
5734 `(("python-sphinx" ,python-sphinx)
5735 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5736 ;; FIXME: It's possible that a smaller union would work just as well.
5737 ("texlive" ,(texlive-union (list texlive-amsfonts
5739 texlive-generic-ifxetex
5740 texlive-generic-pdftex
5741 texlive-latex-capt-of
5743 texlive-latex-environ
5744 texlive-latex-eqparbox
5745 texlive-latex-etoolbox
5746 texlive-latex-expdlist
5747 texlive-latex-fancyhdr
5748 texlive-latex-fancyvrb
5749 texlive-latex-fncychap
5751 texlive-latex-framed
5752 texlive-latex-geometry
5753 texlive-latex-graphics
5754 texlive-latex-hyperref
5755 texlive-latex-mdwtools
5756 texlive-latex-multirow
5757 texlive-latex-needspace
5758 texlive-latex-oberdiek
5759 texlive-latex-parskip
5760 texlive-latex-preview
5761 texlive-latex-tabulary
5762 texlive-latex-threeparttable
5763 texlive-latex-titlesec
5764 texlive-latex-trimspaces
5766 texlive-latex-upquote
5768 texlive-latex-varwidth
5769 texlive-latex-wrapfig)))
5770 ("texinfo" ,texinfo)))))
5772 (define-public python-urwid
5774 (name "python-urwid")
5779 (uri (pypi-uri "urwid" version))
5782 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5783 (build-system python-build-system)
5784 (home-page "http://urwid.org")
5785 (synopsis "Console user interface library for Python")
5787 "Urwid is a curses-based UI/widget library for Python. It includes many
5788 features useful for text console applications.")
5789 (license license:lgpl2.1+)))
5791 (define-public python2-urwid
5792 (package-with-python2 python-urwid))
5794 (define-public python-urwidtrees
5796 (name "python-urwidtrees")
5801 ;; package author intends on distributing via github rather than pypi:
5802 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5803 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5805 (file-name (string-append name "-" version ".tar.gz"))
5808 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5809 (build-system python-build-system)
5811 '(#:tests? #f)) ; no tests
5812 (propagated-inputs `(("python-urwid" ,python-urwid)))
5813 (home-page "https://github.com/pazz/urwidtrees")
5814 (synopsis "Tree widgets for urwid")
5815 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5816 toolkit. Use it to build trees of widgets.")
5817 (license license:gpl3+)))
5819 (define-public python2-urwidtrees
5820 (package-with-python2 python-urwidtrees))
5822 (define-public python-ua-parser
5824 (name "python-ua-parser")
5829 (uri (pypi-uri "ua-parser" version))
5832 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5833 (build-system python-build-system)
5835 `(#:tests? #f)) ;no test suite in release
5837 `(("python-pyyaml" ,python-pyyaml)))
5838 (home-page "https://github.com/ua-parser/uap-python")
5839 (synopsis "User agent parser")
5841 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5842 (license license:asl2.0)))
5844 (define-public python2-ua-parser
5845 (package-with-python2 python-ua-parser))
5847 (define-public python-user-agents
5849 (name "python-user-agents")
5854 (uri (pypi-uri "user-agents" version))
5857 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5858 (build-system python-build-system)
5860 `(#:tests? #f)) ;missing devices.json test file in release
5862 `(("python-ua-parser" ,python-ua-parser)))
5863 (home-page "https://github.com/selwin/python-user-agents")
5864 (synopsis "User Agent strings parsing library")
5866 "A library to identify devices (phones, tablets) and their capabilities by
5867 parsing (browser/HTTP) user agent strings.")
5868 (license license:expat)))
5870 (define-public python2-user-agents
5871 (package-with-python2 python-user-agents))
5873 (define-public python-dbus
5875 (name "python-dbus")
5880 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5881 "dbus-python-" version ".tar.gz"))
5884 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5885 (build-system gnu-build-system)
5888 (modify-phases %standard-phases
5892 ;; XXX: For the missing '/etc/machine-id'.
5893 (substitute* "test/run-test.sh"
5894 (("DBUS_FATAL_WARNINGS=1")
5895 "DBUS_FATAL_WARNINGS=0"))
5898 `(("pkg-config" ,pkg-config)))
5900 `(("python" ,python-wrapper)
5901 ("dbus-glib" ,dbus-glib)))
5902 (synopsis "Python bindings for D-bus")
5903 (description "python-dbus provides bindings for libdbus, the reference
5904 implementation of D-Bus.")
5905 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5906 (license license:expat)))
5908 (define-public python2-dbus
5909 (package (inherit python-dbus)
5910 (name "python2-dbus")
5911 (inputs `(("python" ,python-2)
5912 ,@(alist-delete "python"
5913 (package-inputs python-dbus)
5915 ;; FIXME: on Python 2, the test_utf8 fails with:
5916 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5917 (arguments `(#:tests? #f))))
5919 (define-public python-notify2
5921 (name "python-notify2")
5926 (uri (pypi-uri "notify2" version))
5929 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5930 (build-system python-build-system)
5931 (arguments `(#:tests? #f)) ; tests depend on system state
5933 `(("python-dbus" ,python-dbus)))
5934 (home-page "https://bitbucket.org/takluyver/pynotify2")
5935 (synopsis "Python interface to D-Bus notifications")
5937 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5938 It is a reimplementation of pynotify in pure Python, and an alternative to
5939 the GObject Introspection bindings to libnotify for non-GTK applications.")
5940 (license (list license:bsd-2
5941 license:lgpl2.1+))))
5943 (define-public python2-notify2
5944 (package-with-python2 python-notify2))
5946 (define-public python-lxml
5948 (name "python-lxml")
5953 (uri (pypi-uri "lxml" version))
5956 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5957 (build-system python-build-system)
5959 `(("libxml2" ,libxml2)
5960 ("libxslt" ,libxslt)))
5961 (home-page "http://lxml.de/")
5963 "Python XML processing library")
5965 "The lxml XML toolkit is a Pythonic binding for the C libraries
5966 libxml2 and libxslt.")
5967 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5969 (define-public python2-lxml
5970 (package-with-python2 python-lxml))
5972 ;; beautifulsoup4 has a totally different namespace than 3.x,
5973 ;; and pypi seems to put it under its own name, so I guess we should too
5974 (define-public python-beautifulsoup4
5976 (name "python-beautifulsoup4")
5981 (uri (pypi-uri "beautifulsoup4" version))
5984 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5985 (build-system python-build-system)
5988 (modify-phases %standard-phases
5989 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5990 ;; must use this conversion script when building with Python 3. The
5991 ;; conversion script also runs the tests.
5992 ;; For more information, see the file 'convert-py3k' in the source
5995 (lambda _ (invoke "./convert-py3k"))))))
5997 `(("python-soupsieve" ,python-soupsieve)))
5999 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6001 "Python screen-scraping library")
6003 "Beautiful Soup is a Python library designed for rapidly setting up
6004 screen-scraping projects. It offers Pythonic idioms for navigating,
6005 searching, and modifying a parse tree, providing a toolkit for
6006 dissecting a document and extracting what you need. It automatically
6007 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6008 (license license:expat)
6009 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6011 (define-public python2-beautifulsoup4
6013 (inherit (package-with-python2
6014 (strip-python2-variant python-beautifulsoup4)))
6015 (arguments `(#:python ,python-2))))
6017 (define-public python-soupsieve
6019 (name "python-soupsieve")
6024 (uri (pypi-uri "soupsieve" version))
6027 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
6028 (build-system python-build-system)
6029 (arguments `(#:tests? #f))
6030 ;;XXX: 2 tests fail currently despite claming they were to be
6031 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6032 ;;don't want to create a circular dependency.
6033 (home-page "https://github.com/facelessuser/soupsieve")
6034 (synopsis "CSS selector library")
6036 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6037 Soup 4. It aims to provide selecting, matching, and filtering using modern
6038 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6039 specifications up through the latest CSS level 4 drafts and beyond (though
6040 some are not yet implemented).")
6041 (properties `((python2-variant . ,(delay python2-soupsieve))))
6042 (license license:expat)))
6044 (define-public python2-soupsieve
6045 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6049 `(("python2-backports-functools-lru-cache"
6050 ,python2-backports-functools-lru-cache)
6051 ,@(package-propagated-inputs base))))))
6053 (define-public python-netifaces
6055 (name "python-netifaces")
6060 (uri (pypi-uri "netifaces" version))
6063 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6064 (build-system python-build-system)
6065 (home-page "https://github.com/al45tair/netifaces")
6067 "Python module for portable network interface information")
6069 "Netifaces is a Python module providing information on network
6070 interfaces in an easy and portable manner.")
6071 (license license:expat)))
6073 (define-public python2-netifaces
6074 (package-with-python2 python-netifaces))
6076 (define-public python-networkx
6078 (name "python-networkx")
6083 (uri (pypi-uri "networkx" version ".zip"))
6085 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6086 (build-system python-build-system)
6087 ;; python-decorator is needed at runtime.
6089 `(("python-decorator" ,python-decorator)))
6091 `(("python-nose" ,python-nose)
6093 (home-page "https://networkx.github.io/")
6094 (synopsis "Python module for creating and manipulating graphs and networks")
6096 "NetworkX is a Python package for the creation, manipulation, and study
6097 of the structure, dynamics, and functions of complex networks.")
6098 (license license:bsd-3)))
6100 (define-public python2-networkx
6101 (package-with-python2 python-networkx))
6103 (define-public python-datrie
6105 (name "python-datrie")
6110 (uri (pypi-uri "datrie" version))
6113 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6114 (build-system python-build-system)
6116 `(("python-cython" ,python-cython)
6117 ("python-hypothesis" ,python-hypothesis)
6118 ("python-pytest" ,python-pytest)
6119 ("python-pytest-runner" ,python-pytest-runner)))
6120 (home-page "https://github.com/kmike/datrie")
6121 (synopsis "Fast, efficiently stored trie for Python")
6123 "This package provides a fast, efficiently stored trie implementation for
6125 (license license:lgpl2.1+)))
6127 (define-public snakemake
6134 (uri (pypi-uri "snakemake" version))
6136 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6137 (build-system python-build-system)
6139 ;; TODO: Package missing test dependencies.
6142 (modify-phases %standard-phases
6143 ;; For cluster execution Snakemake will call Python. Since there is
6144 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6145 ;; this by calling the snakemake wrapper instead.
6146 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6147 (lambda* (#:key outputs #:allow-other-keys)
6148 (substitute* "snakemake/executors.py"
6149 (("\\{sys.executable\\} -m snakemake")
6150 (string-append (assoc-ref outputs "out")
6154 `(("python-gitpython" ,python-gitpython)
6155 ("python-wrapt" ,python-wrapt)
6156 ("python-requests" ,python-requests)
6157 ("python-appdirs" ,python-appdirs)
6158 ("python-configargparse" ,python-configargparse)
6159 ("python-datrie" ,python-datrie)
6160 ("python-docutils" ,python-docutils)
6161 ("python-jinja2" ,python-jinja2)
6162 ("python-jsonschema" ,python-jsonschema)
6163 ("python-networkx" ,python-networkx)
6164 ("python-pyyaml" ,python-pyyaml)
6165 ("python-ratelimiter" ,python-ratelimiter)))
6166 (home-page "https://snakemake.readthedocs.io")
6167 (synopsis "Python-based execution environment for make-like workflows")
6169 "Snakemake aims to reduce the complexity of creating workflows by
6170 providing a clean and modern domain specific specification language (DSL) in
6171 Python style, together with a fast and comfortable execution environment.")
6172 (license license:expat)))
6174 ;; This is currently needed for the pigx-* packages.
6175 (define-public snakemake-4
6176 (package (inherit snakemake)
6181 (uri (pypi-uri "snakemake" version))
6183 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6185 `(("python-wrapt" ,python-wrapt)
6186 ("python-requests" ,python-requests)
6187 ("python-appdirs" ,python-appdirs)
6188 ("python-configargparse" ,python-configargparse)
6189 ("python-pyyaml" ,python-pyyaml)
6190 ("python-ratelimiter" ,python-ratelimiter)))))
6192 (define-public python-pyqrcode
6194 (name "python-pyqrcode")
6199 (uri (pypi-uri "PyQRCode" version))
6202 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6203 (build-system python-build-system)
6205 "https://github.com/mnooner256/pyqrcode")
6206 (synopsis "QR code generator")
6208 "Pyqrcode is a QR code generator written purely in Python with
6209 SVG, EPS, PNG and terminal output.")
6210 (license license:bsd-3)))
6212 (define-public python-seaborn
6214 (name "python-seaborn")
6219 (uri (pypi-uri "seaborn" version))
6221 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6222 (build-system python-build-system)
6225 (modify-phases %standard-phases
6226 (add-before 'check 'start-xserver
6227 (lambda* (#:key inputs #:allow-other-keys)
6228 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6229 ;; There must be a running X server and make check doesn't
6230 ;; start one. Therefore we must do it.
6231 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6232 (setenv "DISPLAY" ":1")
6234 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6236 `(("python-pandas" ,python-pandas)
6237 ("python-matplotlib" ,python-matplotlib)
6238 ("python-numpy" ,python-numpy)
6239 ("python-scipy" ,python-scipy)))
6241 `(("python-pytest" ,python-pytest)
6242 ("xorg-server" ,xorg-server)))
6243 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6244 (synopsis "Statistical data visualization")
6246 "Seaborn is a library for making attractive and informative statistical
6247 graphics in Python. It is built on top of matplotlib and tightly integrated
6248 with the PyData stack, including support for numpy and pandas data structures
6249 and statistical routines from scipy and statsmodels.")
6250 (license license:bsd-3)))
6252 (define-public python2-seaborn
6253 (package-with-python2 python-seaborn))
6255 (define-public python-mpmath
6257 (name "python-mpmath")
6261 (uri (string-append "http://mpmath.org/files/mpmath-"
6265 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6266 (build-system python-build-system)
6269 (modify-phases %standard-phases
6272 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6273 (home-page "http://mpmath.org")
6274 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6276 "@code{mpmath} can be used as an arbitrary-precision substitute for
6277 Python's float/complex types and math/cmath modules, but also does much
6278 more advanced mathematics.")
6279 (license license:bsd-3)))
6281 (define-public python2-mpmath
6282 (package-with-python2 python-mpmath))
6284 (define-public python-bigfloat
6286 (name "python-bigfloat")
6291 (uri (pypi-uri "bigfloat" version))
6293 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6294 (build-system python-build-system)
6297 (home-page "https://github.com/mdickinson/bigfloat")
6298 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6300 "This package provides a Python interface to the MPFR library for
6301 multiprecision arithmetic.")
6302 (license license:lgpl3+)))
6304 (define-public python2-bigfloat
6305 (package-with-python2 python-bigfloat))
6307 (define-public python-sympy
6309 (name "python-sympy")
6315 "https://github.com/sympy/sympy/releases/download/sympy-"
6316 version "/sympy-" version ".tar.gz"))
6318 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6319 (build-system python-build-system)
6322 (modify-phases %standard-phases
6323 ;; Run the core tests after installation. By default it would run
6324 ;; *all* tests, which take a very long time to complete and are known
6327 (add-after 'install 'check
6328 (lambda* (#:key outputs #:allow-other-keys)
6329 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6332 `(("python-mpmath" ,python-mpmath)))
6333 (home-page "http://www.sympy.org/")
6334 (synopsis "Python library for symbolic mathematics")
6336 "SymPy is a Python library for symbolic mathematics. It aims to become a
6337 full-featured computer algebra system (CAS) while keeping the code as simple
6338 as possible in order to be comprehensible and easily extensible.")
6339 (license license:bsd-3)))
6341 (define-public python2-sympy
6343 (inherit (package-with-python2 python-sympy))
6346 (modify-phases %standard-phases
6347 ;; Run the core tests after installation. By default it would run
6348 ;; *all* tests, which take a very long time to complete and are known
6351 (add-after 'install 'check
6352 (lambda* (#:key outputs #:allow-other-keys)
6353 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6356 (define-public python-q
6363 (uri (pypi-uri "q" version))
6366 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6367 (build-system python-build-system)
6368 (home-page "https://github.com/zestyping/q")
6369 (synopsis "Quick-and-dirty debugging output for tired programmers")
6371 "q is a Python module for \"print\" style of debugging Python code. It
6372 provides convenient short API for print out of values, tracebacks, and
6373 falling into the Python interpreter.")
6374 (license license:asl2.0)))
6376 (define-public python2-q
6377 (package-with-python2 python-q))
6379 (define-public python2-xlib
6381 (name "python2-xlib")
6385 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6387 "python-xlib-" version ".tar.gz"))
6390 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6391 (build-system python-build-system)
6393 `(#:python ,python-2 ;Python 2 only
6394 #:tests? #f)) ;no tests
6395 (home-page "http://python-xlib.sourceforge.net/")
6396 (synopsis "Python X11 client library")
6398 "The Python X Library is intended to be a fully functional X client
6399 library for Python programs. It is useful to implement low-level X clients.
6400 It is written entirely in Python.")
6401 (license license:gpl2+)))
6403 (define-public python-singledispatch
6405 (name "python-singledispatch")
6410 (uri (pypi-uri "singledispatch" version))
6413 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6414 (build-system python-build-system)
6416 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6418 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6419 (synopsis "Backport of singledispatch feature from Python 3.4")
6421 "This library brings functools.singledispatch from Python 3.4 to Python
6423 (license license:expat)))
6425 (define-public python2-singledispatch
6426 (package-with-python2 python-singledispatch))
6428 ;; the python- version can be removed with python-3.5
6429 (define-public python-backports-abc
6431 (name "python-backports-abc")
6436 (uri (pypi-uri "backports_abc" version))
6439 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6440 (build-system python-build-system)
6441 (home-page "https://github.com/cython/backports_abc")
6442 (synopsis "Backport of additions to the 'collections.abc' module")
6444 "Python-backports-abc provides a backport of additions to the
6445 @code{collections.abc} module in Python-3.5.")
6446 (license license:psfl)))
6448 (define-public python2-backports-abc
6449 (package-with-python2 python-backports-abc))
6451 (define-public python-backports-csv
6453 (name "python-backports-csv")
6458 (uri (pypi-uri "backports.csv" version))
6461 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6462 (build-system python-build-system)
6463 (home-page "https://github.com/ryanhiebert/backports.csv")
6464 (synopsis "Backport of Python 3's csv module for Python 2")
6466 "Provides a backport of Python 3's @code{csv} module for parsing
6467 comma separated values. The API of the @code{csv} module in Python 2
6468 is drastically different from the @code{csv} module in Python 3.
6469 This is due, for the most part, to the difference between str in
6470 Python 2 and Python 3.")
6471 (license license:psfl)))
6473 (define-public python2-backports-csv
6474 (package-with-python2 python-backports-csv))
6476 (define-public python2-backports-shutil-get-terminal-size
6478 (name "python2-backports-shutil-get-terminal-size")
6483 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6486 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6487 (build-system python-build-system)
6489 `(#:python ,python-2
6491 (modify-phases %standard-phases
6494 (invoke "py.test" "-v"))))))
6496 `(("python2-pytest" ,python2-pytest)))
6497 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6498 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6500 "This package provides a backport of the @code{get_terminal_size
6501 function} from Python 3.3's @code{shutil}.
6502 Unlike the original version it is written in pure Python rather than C,
6503 so it might be a tiny bit slower.")
6504 (license license:expat)))
6506 (define-public python-waf
6512 (uri (string-append "https://waf.io/"
6513 "waf-" version ".tar.bz2"))
6516 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6517 (build-system python-build-system)
6520 (modify-phases %standard-phases
6523 (invoke "python" "waf-light" "configure" "build")))
6526 (invoke "python" "waf" "--version")))
6528 (lambda* (#:key outputs #:allow-other-keys)
6529 (let ((out (assoc-ref outputs "out")))
6530 (install-file "waf" (string-append out "/bin")))
6532 ;; waf breaks when it is wrapped.
6534 (home-page "https://waf.io/")
6535 (synopsis "Python-based build system")
6537 "Waf is a Python-based framework for configuring, compiling and installing
6539 (license license:bsd-3)))
6541 (define-public python2-waf
6542 (package-with-python2 python-waf))
6544 (define-public python-pyzmq
6546 (name "python-pyzmq")
6551 (uri (pypi-uri "pyzmq" version))
6553 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6554 (build-system python-build-system)
6557 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6558 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6559 ;; --inplace' for 'python setup.py test' to work.
6562 `(("zeromq" ,zeromq)))
6564 `(("pkg-config" ,pkg-config)
6565 ("python-nose" ,python-nose)))
6566 (home-page "https://github.com/zeromq/pyzmq")
6567 (synopsis "Python bindings for 0MQ")
6569 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6570 (license license:bsd-4)))
6572 (define-public python2-pyzmq
6573 (package-with-python2 python-pyzmq))
6575 (define-public python-pep8
6576 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6577 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6578 ;; some dependents' test suites, and nothing more.
6580 (name "python-pep8")
6585 (uri (pypi-uri "pep8" version))
6588 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6589 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6590 (build-system python-build-system)
6591 (home-page "https://pep8.readthedocs.org/")
6592 (synopsis "Python style guide checker")
6594 "This tools checks Python code against some of the style conventions in
6596 (license license:expat)))
6598 (define-public python2-pep8
6599 (package-with-python2 python-pep8))
6601 (define-public python-pyflakes
6603 (name "python-pyflakes")
6608 (uri (pypi-uri "pyflakes" version))
6611 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6612 (build-system python-build-system)
6614 "https://github.com/pyflakes/pyflakes")
6615 (synopsis "Passive checker of Python programs")
6617 "Pyflakes statically checks Python source code for common errors.")
6618 (license license:expat)))
6620 (define-public python2-pyflakes
6621 (package-with-python2 python-pyflakes))
6623 (define-public python-mccabe
6625 (name "python-mccabe")
6630 (uri (pypi-uri "mccabe" version))
6633 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6634 (build-system python-build-system)
6636 `(("python-pytest" ,python-pytest-bootstrap)
6637 ("python-pytest-runner" ,python-pytest-runner)))
6638 (home-page "https://github.com/flintwork/mccabe")
6639 (synopsis "McCabe checker, plugin for flake8")
6641 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6642 complexity of Python source code.")
6643 (license license:expat)))
6645 (define-public python2-mccabe
6646 (package-with-python2 python-mccabe))
6648 (define-public python-mccabe-0.2.1
6649 (package (inherit python-mccabe)
6654 (uri (pypi-uri "mccabe" version))
6657 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6659 (define-public python2-mccabe-0.2.1
6660 (package-with-python2 python-mccabe-0.2.1))
6662 ;; Flake8 2.4.1 requires an older version of pep8.
6663 ;; This should be removed ASAP.
6664 (define-public python-pep8-1.5.7
6665 (package (inherit python-pep8)
6670 (uri (pypi-uri "pep8" version))
6673 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6675 ;; XXX Tests not compatible with Python 3.5.
6678 (define-public python2-pep8-1.5.7
6679 (package-with-python2 python-pep8-1.5.7))
6681 ;; Flake8 2.4.1 requires an older version of pyflakes.
6682 ;; This should be removed ASAP.
6683 (define-public python-pyflakes-0.8.1
6684 (package (inherit python-pyflakes)
6689 (uri (pypi-uri "pyflakes" version))
6692 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6694 ;; XXX Tests not compatible with Python 3.5.
6697 (define-public python2-pyflakes-0.8.1
6698 (package-with-python2 python-pyflakes-0.8.1))
6700 (define-public python-flake8
6702 (name "python-flake8")
6706 (uri (pypi-uri "flake8" version))
6709 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6710 (build-system python-build-system)
6713 (modify-phases %standard-phases
6715 (add-after 'install 'check
6716 (lambda* (#:key inputs outputs #:allow-other-keys)
6717 (add-installed-pythonpath inputs outputs)
6718 (invoke "pytest" "-v")
6721 `(("python-pycodestyle" ,python-pycodestyle)
6722 ("python-entrypoints" ,python-entrypoints)
6723 ("python-pyflakes" ,python-pyflakes)
6724 ("python-mccabe" ,python-mccabe)))
6726 `(("python-mock" ,python-mock)
6727 ("python-pytest" ,python-pytest-bootstrap)
6728 ("python-pytest-runner" ,python-pytest-runner)))
6729 (home-page "https://gitlab.com/pycqa/flake8")
6731 "The modular source code checker: pep8, pyflakes and co")
6733 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6734 (properties `((python2-variant . ,(delay python2-flake8))))
6735 (license license:expat)))
6737 (define-public python2-flake8
6738 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6739 (package (inherit base)
6741 `(("python2-configparser" ,python2-configparser)
6742 ("python2-enum34" ,python2-enum34)
6743 ("python2-typing" ,python2-typing)
6744 ,@(package-propagated-inputs base))))))
6746 ;; python-hacking requires flake8 <2.6.0.
6747 (define-public python-flake8-2.5
6749 (inherit python-flake8)
6753 (uri (pypi-uri "flake8" version))
6756 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6758 `(("python-pep8" ,python-pep8)
6759 ,@(package-propagated-inputs python-flake8)))
6760 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6762 (define-public python2-flake8-2.5
6764 (inherit python2-flake8)
6765 (version (package-version python-flake8-2.5))
6767 (inherit (package-source python-flake8-2.5))))
6769 `(("python2-pep8" ,python2-pep8)
6770 ,@(package-propagated-inputs python2-flake8)))))
6772 (define-public python-flake8-polyfill
6774 (name "python-flake8-polyfill")
6779 (uri (pypi-uri "flake8-polyfill" version))
6782 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6783 (build-system python-build-system)
6786 (modify-phases %standard-phases
6789 ;; Be compatible with Pytest 4:
6790 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6791 (substitute* "setup.cfg"
6795 (setenv "PYTHONPATH"
6796 (string-append (getcwd) "/build/lib:"
6797 (getenv "PYTHONPATH")))
6798 (invoke "py.test" "-v"))))))
6800 `(("python-flake8" ,python-flake8)
6801 ("python-mock" ,python-mock)
6802 ("python-pep8" ,python-pep8)
6803 ("python-pycodestyle" ,python-pycodestyle)
6804 ("python-pytest" ,python-pytest)))
6805 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6806 (synopsis "Polyfill package for Flake8 plugins")
6808 "This package that provides some compatibility helpers for Flake8
6809 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6810 (license license:expat)))
6812 (define-public python2-flake8-polyfill
6813 (package-with-python2 python-flake8-polyfill))
6815 (define-public python-mistune
6817 (name "python-mistune")
6822 (uri (pypi-uri "mistune" version))
6825 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6826 (build-system python-build-system)
6828 `(("python-nose" ,python-nose)
6829 ("python-cython" ,python-cython)))
6830 (home-page "https://github.com/lepture/mistune")
6831 (synopsis "Markdown parser in pure Python")
6832 (description "This package provides a fast markdown parser in pure
6834 (license license:bsd-3)))
6836 (define-public python2-mistune
6837 (package-with-python2 python-mistune))
6839 (define-public python-markdown
6841 (name "python-markdown")
6846 (uri (pypi-uri "Markdown" version))
6849 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6850 (build-system python-build-system)
6852 `(("python-nose" ,python-nose)
6853 ("python-pyyaml" ,python-pyyaml)))
6854 (home-page "https://python-markdown.github.io/")
6855 (synopsis "Python implementation of Markdown")
6857 "This package provides a Python implementation of John Gruber's
6858 Markdown. The library features international input, various Markdown
6859 extensions, and several HTML output formats. A command line wrapper
6860 markdown_py is also provided to convert Markdown files to HTML.")
6861 (license license:bsd-3)))
6863 (define-public python2-markdown
6864 (package-with-python2 python-markdown))
6866 (define-public python-ptyprocess
6868 (name "python-ptyprocess")
6873 (uri (pypi-uri "ptyprocess" version))
6876 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6877 (build-system python-build-system)
6879 `(("python-nose" ,python-nose)))
6882 (modify-phases %standard-phases
6884 (lambda _ (invoke "nosetests"))))))
6885 (home-page "https://github.com/pexpect/ptyprocess")
6886 (synopsis "Run a subprocess in a pseudo terminal")
6888 "This package provides a Python library used to launch a subprocess in a
6889 pseudo terminal (pty), and interact with both the process and its pty.")
6890 (license license:isc)))
6892 (define-public python2-ptyprocess
6893 (package-with-python2 python-ptyprocess))
6895 (define-public python-cram
6897 (name "python-cram")
6899 (home-page "https://bitheap.org/cram/")
6902 (uri (list (string-append home-page "cram-"
6904 (pypi-uri "cram" version)))
6907 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6910 (modify-phases %standard-phases
6911 (add-after 'unpack 'patch-source
6913 (substitute* (find-files "cram" ".*\\.py$")
6914 ;; Replace default shell path.
6915 (("/bin/sh") (which "sh")))
6916 (substitute* (find-files "tests" ".*\\.t$")
6918 (("/bin/bash") (which "bash"))
6919 (("/bin/sh") (which "sh")))
6920 (substitute* "cram/_test.py"
6921 ;; This hack works around a bug triggered by substituting
6922 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6923 ;; "cram -h", which breaks the output at 80 characters. This
6924 ;; causes the line showing the default shell to break into two
6925 ;; lines, but the test expects a single line...
6926 (("env\\['COLUMNS'\\] = '80'")
6927 "env['COLUMNS'] = '160'"))
6929 (substitute* "Makefile"
6930 ;; Recent versions of python-coverage have caused the test
6931 ;; coverage to decrease (as of version 0.7). Allow that.
6932 (("--fail-under=100")
6937 ;; The test phase uses the built library and executable.
6938 (lambda* (#:key inputs outputs #:allow-other-keys)
6939 (add-installed-pythonpath inputs outputs)
6940 (setenv "PATH" (string-append (getenv "PATH") ":"
6941 (assoc-ref outputs "out") "/bin"))
6942 (invoke "make" "test"))))))
6943 (build-system python-build-system)
6945 `(("python-coverage" ,python-coverage)
6947 (synopsis "Simple testing framework for command line applications")
6949 "Cram is a functional testing framework for command line applications.
6950 Cram tests look like snippets of interactive shell sessions. Cram runs each
6951 command and compares the command output in the test with the command’s actual
6953 (license license:gpl2+)))
6955 (define-public python2-cram
6956 (package-with-python2 python-cram))
6958 (define-public python-straight-plugin
6960 (name "python-straight-plugin")
6965 (uri (pypi-uri "straight.plugin" version))
6968 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6969 (build-system python-build-system)
6970 (home-page "https://github.com/ironfroggy/straight.plugin")
6971 (synopsis "Simple namespaced plugin facility")
6972 (description "Straight Plugin provides a type of plugin you can create from
6973 almost any existing Python modules, and an easy way for outside developers to
6974 add functionality and customization to your projects with their own plugins.")
6975 (license license:expat)))
6977 (define-public python2-straight-plugin
6978 (package-with-python2 python-straight-plugin))
6980 (define-public python-fonttools
6982 (name "python-fonttools")
6986 (uri (pypi-uri "fonttools" version ".zip"))
6989 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6990 (build-system python-build-system)
6993 ("python-pytest" ,python-pytest)
6994 ("python-pytest-runner" ,python-pytest-runner)))
6995 (home-page "https://github.com/behdad/fonttools")
6996 (synopsis "Tools to manipulate font files")
6998 "FontTools/TTX is a library to manipulate font files from Python. It
6999 supports reading and writing of TrueType/OpenType fonts, reading and writing
7000 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7001 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7002 from an XML-based format.")
7003 (license license:expat)))
7005 (define-public python2-fonttools
7006 (package-with-python2 python-fonttools))
7008 (define-public python-ly
7015 (uri (pypi-uri name version))
7018 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7019 (build-system python-build-system)
7021 ;; FIXME: Some tests need network access.
7023 (synopsis "Tool and library for manipulating LilyPond files")
7024 (description "This package provides a Python library to parse, manipulate
7025 or create documents in LilyPond format. A command line program ly is also
7026 provided that can be used to do various manipulations with LilyPond files.")
7027 (home-page "https://pypi.python.org/pypi/python-ly")
7028 (license license:gpl2+)))
7030 (define-public python-appdirs
7032 (name "python-appdirs")
7037 (uri (pypi-uri "appdirs" version))
7040 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7041 (build-system python-build-system)
7042 (home-page "https://github.com/ActiveState/appdirs")
7044 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7046 "This module provides a portable way of finding out where user data
7047 should be stored on various operating systems.")
7048 (license license:expat)))
7050 (define-public python2-appdirs
7051 (package-with-python2 python-appdirs))
7053 (define-public python-llfuse
7055 (name "python-llfuse")
7059 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7062 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7063 (build-system python-build-system)
7068 `(("pkg-config" ,pkg-config)))
7069 (synopsis "Python bindings for FUSE")
7071 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7072 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7073 (license license:lgpl2.0+)
7074 (properties `((python2-variant . ,(delay python2-llfuse))))))
7076 (define-public python2-llfuse
7077 (package (inherit (package-with-python2
7078 (strip-python2-variant python-llfuse)))
7079 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7082 (define-public python-llfuse-0.41
7083 (package (inherit python-llfuse)
7088 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7089 "llfuse-" version ".tar.bz2"))
7092 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7093 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7094 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7095 (license (list license:expat license:lgpl2.0+))))
7097 (define-public python-msgpack
7099 (name "python-msgpack")
7103 (uri (pypi-uri "msgpack" version))
7106 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7107 (build-system python-build-system)
7109 `(#:modules ((guix build utils)
7110 (guix build python-build-system)
7115 (modify-phases %standard-phases
7118 (let ((cwd (getcwd)))
7119 (setenv "PYTHONPATH"
7120 (string-append cwd "/build/"
7121 (find (cut string-prefix? "lib" <>)
7122 (scandir (string-append cwd "/build")))
7124 (getenv "PYTHONPATH")))
7125 (invoke "pytest" "-v" "test")))))))
7127 `(("python-pytest" ,python-pytest)))
7128 (synopsis "MessagePack (de)serializer")
7129 (description "MessagePack is a fast, compact binary serialization format,
7130 suitable for similar data to JSON. This package provides CPython bindings for
7131 reading and writing MessagePack data.")
7132 (home-page "https://pypi.python.org/pypi/msgpack/")
7133 (license license:asl2.0)))
7135 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7136 ;; release 0.5. Some packages like borg still call it by the old name for now.
7137 ;; <https://bugs.gnu.org/30662>
7138 (define-public python-msgpack-transitional
7140 (inherit python-msgpack)
7141 (name "python-msgpack-transitional")
7143 (substitute-keyword-arguments (package-arguments python-msgpack)
7145 `(modify-phases ,phases
7146 (add-after 'unpack 'configure-transitional
7148 ;; Keep using the old name.
7149 (substitute* "setup.py"
7150 (("TRANSITIONAL = False")
7151 "TRANSITIONAL = 1"))
7154 (define-public python2-msgpack
7155 (package-with-python2 python-msgpack))
7157 (define-public python-netaddr
7159 (name "python-netaddr")
7164 (uri (pypi-uri "netaddr" version))
7167 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7168 (build-system python-build-system)
7169 (arguments `(#:tests? #f)) ;; No tests.
7170 (home-page "https://github.com/drkjam/netaddr/")
7171 (synopsis "Pythonic manipulation of network addresses")
7173 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7174 and MAC network addresses.")
7175 (license license:bsd-3)))
7177 (define-public python2-netaddr
7178 (package-with-python2 python-netaddr))
7180 (define-public python2-pyroute2
7182 (name "python2-pyroute2")
7187 (uri (pypi-uri "pyroute2" version))
7190 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7191 (build-system python-build-system)
7193 `(#:python ,python-2)) ;Python 3.x is not supported
7194 (home-page "https://github.com/svinota/pyroute2")
7195 (synopsis "Python netlink library")
7197 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7198 Supported netlink families and protocols include:
7200 @item rtnl, network settings - addresses, routes, traffic controls
7201 @item nfnetlink - netfilter API: ipset, nftables, ...
7202 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7203 @item devlink - manage and monitor devlink-enabled hardware
7204 @item generic - generic netlink families
7206 @item nl80211 - wireless functions API (basic support)
7207 @item taskstats - extended process statistics
7208 @item acpi_events - ACPI events monitoring
7209 @item thermal_events - thermal events monitoring
7210 @item VFS_DQUOT - disk quota events monitoring
7213 (license license:gpl2+)))
7215 (define-public python-wrapt
7217 (name "python-wrapt")
7222 (uri (pypi-uri "wrapt" version))
7225 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7226 (build-system python-build-system)
7228 ;; Tests are not included in the tarball, they are only available in the
7231 (home-page "https://github.com/GrahamDumpleton/wrapt")
7232 (synopsis "Module for decorators, wrappers and monkey patching")
7234 "The aim of the wrapt module is to provide a transparent object proxy for
7235 Python, which can be used as the basis for the construction of function
7236 wrappers and decorator functions.")
7237 (license license:bsd-2)))
7239 (define-public python2-wrapt
7240 (package-with-python2 python-wrapt))
7242 (define-public python-xlrd
7244 (name "python-xlrd")
7248 (uri (pypi-uri "xlrd" version))
7251 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7252 (build-system python-build-system)
7255 (modify-phases %standard-phases
7256 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7257 ;; run tests instead for now.
7258 (replace 'check (lambda _ (invoke "nosetests"))))))
7259 (native-inputs `(("python-nose" ,python-nose)))
7260 (home-page "http://www.python-excel.org/")
7261 (synopsis "Library for extracting data from Excel files")
7262 (description "This package provides a library to extract data from
7263 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7264 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7265 Unicode-aware. It is not intended as an end-user tool.")
7266 (license license:bsd-3)))
7268 (define-public python2-xlrd
7269 (package-with-python2 python-xlrd))
7271 (define-public python-prettytable
7273 (name "python-prettytable")
7278 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7281 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7282 (build-system python-build-system)
7283 (home-page "http://code.google.com/p/prettytable/")
7284 (synopsis "Display tabular data in an ASCII table format")
7286 "A library designed to represent tabular data in visually appealing ASCII
7287 tables. PrettyTable allows for selection of which columns are to be printed,
7288 independent alignment of columns (left or right justified or centred) and
7289 printing of sub-tables by specifying a row range.")
7290 (license license:bsd-3)))
7292 (define-public python2-prettytable
7293 (package-with-python2 python-prettytable))
7295 (define-public python-tables
7297 (name "python-tables")
7302 (uri (pypi-uri "tables" version))
7305 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7306 (modules '((guix build utils)))
7309 ;; Remove pre-compiled .pyc files from source.
7310 (for-each delete-file-recursively
7311 (find-files "." "__pycache__" #:directories? #t))
7312 (for-each delete-file (find-files "." "\\.pyc$"))
7314 (build-system python-build-system)
7316 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7317 ;; or "check", so we must override the build and check phases.
7319 (modify-phases %standard-phases
7320 (add-after 'unpack 'use-gcc
7322 (substitute* "setup.py"
7323 (("compiler = new_compiler\\(\\)" line)
7325 "\ncompiler.set_executables(compiler='gcc',"
7326 "compiler_so='gcc',"
7328 "linker_so='gcc -shared')")))
7331 (lambda* (#:key inputs #:allow-other-keys)
7332 (invoke "python" "setup.py" "build"
7333 (string-append "--hdf5="
7334 (assoc-ref inputs "hdf5")))))
7336 (lambda* (#:key inputs #:allow-other-keys)
7337 (invoke "python" "setup.py" "check"
7338 (string-append "--hdf5="
7339 (assoc-ref inputs "hdf5"))))))))
7341 `(("python-numexpr" ,python-numexpr)
7342 ("python-numpy" ,python-numpy)))
7344 `(("python-cython" ,python-cython)
7345 ("pkg-config" ,pkg-config)))
7350 (home-page "http://www.pytables.org/")
7351 (synopsis "Hierarchical datasets for Python")
7352 (description "PyTables is a package for managing hierarchical datasets and
7353 designed to efficiently cope with extremely large amounts of data.")
7354 (license license:bsd-3)))
7356 (define-public python2-tables
7357 (package-with-python2 python-tables))
7359 (define-public python-pyasn1
7361 (name "python-pyasn1")
7366 (uri (pypi-uri "pyasn1" version))
7369 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7370 (build-system python-build-system)
7371 (home-page "http://pyasn1.sourceforge.net/")
7372 (synopsis "ASN.1 types and codecs")
7374 "This is an implementation of ASN.1 types and codecs in Python. It is
7375 suitable for a wide range of protocols based on the ASN.1 specification.")
7376 (license license:bsd-2)))
7378 (define-public python2-pyasn1
7379 (package-with-python2 python-pyasn1))
7381 (define-public python-pyasn1-modules
7383 (name "python-pyasn1-modules")
7388 (uri (pypi-uri "pyasn1-modules" version))
7391 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7392 (build-system python-build-system)
7394 `(("python-pyasn1" ,python-pyasn1)))
7395 (home-page "https://sourceforge.net/projects/pyasn1/")
7396 (synopsis "ASN.1 codec implementations")
7398 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7399 implementations of ASN.1-based codecs and protocols.")
7400 (license license:bsd-3)))
7402 (define-public python2-pyasn1-modules
7403 (package-with-python2 python-pyasn1-modules))
7405 (define-public python-ipaddress
7407 (name "python-ipaddress")
7411 (uri (pypi-uri "ipaddress" version))
7414 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7415 (build-system python-build-system)
7416 (home-page "https://github.com/phihag/ipaddress")
7417 (synopsis "IP address manipulation library")
7419 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7420 in Python. This library is used to create, poke at, and manipulate IPv4 and
7421 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7422 module to older versions of Python.")
7423 (license license:psfl)))
7425 (define-public python2-ipaddress
7426 (package-with-python2 python-ipaddress))
7428 (define-public python2-ipaddr
7430 (name "python2-ipaddr")
7435 (uri (pypi-uri "ipaddr" version))
7437 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7438 (build-system python-build-system)
7440 `(#:python ,python-2 ;version 2 only
7442 (modify-phases %standard-phases
7444 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7445 (home-page "https://github.com/google/ipaddr-py")
7446 (synopsis "IP address manipulation library")
7448 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7449 IPv6 addresses and networks.
7451 For new implementations you may prefer to use the standard module
7452 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7453 versions of Python.")
7454 (license license:asl2.0)))
7456 (define-public python-idna
7458 (name "python-idna")
7463 (uri (pypi-uri "idna" version))
7466 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7467 (build-system python-build-system)
7468 (home-page "https://github.com/kjd/idna")
7469 (synopsis "Internationalized domain names in applications")
7471 "This is a library to support the Internationalised Domain Names in
7472 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7473 protocol is often referred to as “IDNA2008” and can produce different results
7474 from the earlier standard from 2003. The library is also intended to act as a
7475 suitable drop-in replacement for the “encodings.idna” module that comes with
7476 the Python standard library but currently only supports the older 2003
7478 (license license:bsd-4)))
7480 (define-public python-idna-2.7
7481 (package (inherit python-idna)
7485 (uri (pypi-uri "idna" version))
7488 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7491 (define-public python2-idna
7492 (package-with-python2 python-idna))
7494 (define-public python-idna-ssl
7496 (name "python-idna-ssl")
7501 (uri (pypi-uri "idna-ssl" version))
7504 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7505 (build-system python-build-system)
7507 `(#:tests? #f)) ;circular dependency with python-aiohttp
7508 (home-page "https://github.com/aio-libs/idna-ssl")
7509 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7510 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7512 (license license:expat)))
7514 (define-public python-pretend
7516 (name "python-pretend")
7521 (uri (pypi-uri "pretend" version))
7524 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7525 (build-system python-build-system)
7526 (home-page "https://github.com/alex/pretend")
7527 (synopsis "Library for stubbing in Python")
7529 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7530 technique for writing tests. You may hear the term mixed up with mocks,
7531 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7532 responses, rather than doing any computation.")
7533 (license license:bsd-3)))
7535 (define-public python2-pretend
7536 (package-with-python2 python-pretend))
7538 (define-public python-pip
7545 (uri (pypi-uri "pip" version))
7548 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7549 (build-system python-build-system)
7551 '(#:tests? #f)) ; there are no tests in the pypi archive.
7552 (home-page "https://pip.pypa.io/")
7553 (synopsis "Package manager for Python software")
7555 "Pip is a package manager for Python software, that finds packages on the
7556 Python Package Index (PyPI).")
7557 (license license:expat)))
7559 (define-public python2-pip
7560 (package-with-python2 python-pip))
7562 (define-public python-tlsh
7564 (name "python-tlsh")
7566 (home-page "https://github.com/trendmicro/tlsh")
7571 (url "https://github.com/trendmicro/tlsh.git")
7572 (commit (string-append "v" version))))
7573 (file-name (git-file-name name version))
7575 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7576 (build-system cmake-build-system)
7578 '(#:out-of-source? #f
7579 #:phases (modify-phases %standard-phases
7582 (lambda* (#:key outputs #:allow-other-keys)
7583 ;; Build and install the Python bindings. The underlying
7584 ;; C++ library is apparently not meant to be installed.
7585 (let ((out (assoc-ref outputs "out")))
7586 (with-directory-excursion "py_ext"
7587 (and (system* "python" "setup.py" "build")
7588 (system* "python" "setup.py" "install"
7589 (string-append "--prefix=" out))))))))))
7590 (inputs `(("python" ,python-wrapper))) ;for the bindings
7591 (synopsis "Fuzzy matching library for Python")
7593 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7594 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7595 value which can be used for similarity comparisons. Similar objects have
7596 similar hash values, which allows for the detection of similar objects by
7597 comparing their hash values. The byte stream should have a sufficient amount
7598 of complexity; for example, a byte stream of identical bytes will not generate
7600 (license license:asl2.0)))
7602 (define-public python2-tlsh
7604 (inherit python-tlsh)
7605 (name "python2-tlsh")
7606 (inputs `(("python" ,python-2)))))
7608 (define-public python-termcolor
7610 (name "python-termcolor")
7615 (uri (pypi-uri "termcolor" version))
7618 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7619 (build-system python-build-system)
7621 ;; There are no tests.
7623 (home-page "https://pypi.python.org/pypi/termcolor")
7624 (synopsis "ANSII Color formatting for terminal output")
7626 "This package provides ANSII Color formatting for output in terminals.")
7627 (license license:expat)))
7629 (define-public python2-termcolor
7630 (package-with-python2 python-termcolor))
7632 (define-public python-libarchive-c
7634 (name "python-libarchive-c")
7638 (uri (pypi-uri "libarchive-c" version))
7641 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7642 (build-system python-build-system)
7644 '(#:phases (modify-phases %standard-phases
7646 'build 'reference-libarchive
7647 (lambda* (#:key inputs #:allow-other-keys)
7648 ;; Retain the absolute file name of libarchive.so.
7649 (let ((libarchive (assoc-ref inputs "libarchive")))
7650 (substitute* "libarchive/ffi.py"
7651 (("find_library\\('archive'\\)")
7652 (string-append "'" libarchive
7653 "/lib/libarchive.so'"))))))
7655 (lambda _ (invoke "pytest" "-vv"))))))
7657 `(("python-mock" ,python-mock)
7658 ("python-pytest" ,python-pytest)))
7660 `(("libarchive" ,libarchive)))
7661 (home-page "https://github.com/Changaco/python-libarchive-c")
7662 (synopsis "Python interface to libarchive")
7664 "This package provides Python bindings to libarchive, a C library to
7665 access possibly compressed archives in many different formats. It uses
7666 Python's @code{ctypes} foreign function interface (FFI).")
7667 (license license:lgpl2.0+)))
7669 (define-public python2-libarchive-c
7670 (package-with-python2 python-libarchive-c))
7672 (define-public python-file
7675 (name "python-file")
7676 (build-system python-build-system)
7678 '(#:tests? #f ;no tests
7679 #:configure-flags '("--single-version-externally-managed" "--root=/")
7680 #:phases (modify-phases %standard-phases
7681 (add-before 'build 'change-directory
7685 (add-before 'build 'set-library-file-name
7686 (lambda* (#:key inputs #:allow-other-keys)
7687 (let ((file (assoc-ref inputs "file")))
7688 (substitute* "magic.py"
7689 (("find_library\\('magic'\\)")
7690 (string-append "'" file "/lib/libmagic.so'")))
7692 (inputs `(("file" ,file)))
7693 (native-inputs (if (%current-target-system)
7694 `(("self" ,this-package))
7696 (synopsis "Python bindings to the libmagic file type guesser. Note that
7697 this module and the python-magic module both provide a \"magic.py\" file;
7698 these two modules, which are different and were developed separately, both
7699 serve the same purpose: provide Python bindings for libmagic.")))
7701 (define-public python2-file
7702 (package-with-python2 python-file))
7704 (define-public python-debian
7706 (name "python-debian")
7707 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7711 ;; Use git-fetch, as pypi doesn't include test suite.
7716 (file-name (git-file-name name version))
7719 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7720 (build-system python-build-system)
7722 `(#:phases (modify-phases %standard-phases
7723 (add-after 'unpack 'remove-debian-specific-tests
7724 ;; python-apt, apt and dpkg are not yet available in guix,
7725 ;; and these tests heavily depend on them.
7727 (delete-file "lib/debian/tests/test_deb822.py")
7728 (delete-file "lib/debian/tests/test_debfile.py")
7731 `(("python-six" ,python-six)
7732 ("python-chardet" ,python-chardet)))
7733 (synopsis "Debian package related modules")
7735 ;; XXX: Use @enumerate instead of @itemize to work around
7736 ;; <http://bugs.gnu.org/21772>.
7737 "This package provides Python modules that abstract many formats of
7738 Debian-related files, such as:
7741 @item Debtags information;
7742 @item @file{debian/changelog} files;
7743 @item packages files, pdiffs;
7744 @item control files of single or multiple RFC822-style paragraphs---e.g.
7745 @file{debian/control}, @file{.changes}, @file{.dsc};
7746 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7747 contained files and meta-information.
7750 ;; Modules are either GPLv2+ or GPLv3+.
7751 (license license:gpl3+)))
7753 (define-public python2-debian
7754 (package-with-python2 python-debian))
7756 (define-public python-nbformat
7758 (name "python-nbformat")
7763 (uri (pypi-uri "nbformat" version))
7766 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7767 (build-system python-build-system)
7768 (arguments `(#:tests? #f)) ; no test target
7770 `(("python-ipython-genutils" ,python-ipython-genutils)
7771 ("python-jsonschema" ,python-jsonschema)
7772 ("python-jupyter-core" ,python-jupyter-core)
7773 ("python-traitlets" ,python-traitlets)))
7774 (home-page "http://jupyter.org")
7775 (synopsis "Jupyter Notebook format")
7776 (description "This package provides the reference implementation of the
7777 Jupyter Notebook format and Python APIs for working with notebooks.")
7778 (license license:bsd-3)))
7780 (define-public python2-nbformat
7781 (package-with-python2 python-nbformat))
7783 (define-public python-bleach
7785 (name "python-bleach")
7790 (uri (pypi-uri "bleach" version))
7793 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7794 (build-system python-build-system)
7796 `(("python-webencodings" ,python-webencodings)
7797 ("python-six" ,python-six)))
7799 `(("python-pytest" ,python-pytest)
7800 ("python-pytest-runner" ,python-pytest-runner-2)))
7801 (home-page "https://github.com/jsocol/bleach")
7802 (synopsis "Whitelist-based HTML-sanitizing tool")
7803 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7804 (license license:asl2.0)))
7806 (define-public python2-bleach
7807 (package-with-python2 python-bleach))
7809 (define-public python-entrypoints
7811 (name "python-entrypoints")
7816 (uri (pypi-uri "entrypoints" version))
7819 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7820 (build-system python-build-system)
7821 ;; The package does not come with a setup.py file, so we have to generate
7826 (modify-phases %standard-phases
7827 (add-after 'unpack 'create-setup.py
7829 (call-with-output-file "setup.py"
7832 from setuptools import setup
7833 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7835 (home-page "https://github.com/takluyver/entrypoints")
7836 (synopsis "Discover and load entry points from installed Python packages")
7837 (description "Entry points are a way for Python packages to advertise
7838 objects with some common interface. The most common examples are
7839 @code{console_scripts} entry points, which define shell commands by
7840 identifying a Python function to run. The @code{entrypoints} module contains
7841 functions to find and load entry points.")
7842 (license license:expat)))
7844 (define-public python2-entrypoints
7845 (package-with-python2 python-entrypoints))
7847 (define-public python-nbconvert
7849 (name "python-nbconvert")
7854 (uri (pypi-uri "nbconvert" version))
7857 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7858 (build-system python-build-system)
7860 `(;; The "bdist_egg" target is disabled by default, causing the installation
7862 #:configure-flags (list "bdist_egg")
7863 ;; FIXME: 5 failures, 40 errors.
7866 ;; (modify-phases %standard-phases
7869 ;; (zero? (system* "py.test" "-v")))))
7871 `(("python-pytest" ,python-pytest)))
7873 `(("python-bleach" ,python-bleach)
7874 ("python-entrypoints" ,python-entrypoints)
7875 ("python-jinja2" ,python-jinja2)
7876 ("python-jupyter-core" ,python-jupyter-core)
7877 ("python-mistune" ,python-mistune)
7878 ("python-nbformat" ,python-nbformat)
7879 ("python-pygments" ,python-pygments)
7880 ("python-traitlets" ,python-traitlets)))
7881 (home-page "http://jupyter.org")
7882 (synopsis "Converting Jupyter Notebooks")
7883 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7884 notebooks to various other formats via Jinja templates. It allows you to
7885 convert an @code{.ipynb} notebook file into various static formats including:
7893 @item ReStructured Text (rst)
7894 @item executable script
7896 (license license:bsd-3)))
7898 (define-public python2-nbconvert
7899 (package-with-python2 python-nbconvert))
7901 (define-public python-notebook
7903 (name "python-notebook")
7907 (uri (pypi-uri "notebook" version))
7910 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7911 (build-system python-build-system)
7914 (modify-phases %standard-phases
7917 ;; These tests require a browser
7918 (delete-file-recursively "notebook/tests/selenium")
7919 ;; Some tests need HOME
7920 (setenv "HOME" "/tmp")
7921 ;; This file contains "warningfilters", which are not supported
7922 ;; by this version of nose.
7923 (delete-file "setup.cfg")
7924 (with-directory-excursion "/tmp"
7925 (invoke "nosetests" "-v"))
7928 `(("python-jupyter-core" ,python-jupyter-core)
7929 ("python-nbformat" ,python-nbformat)
7930 ("python-nbconvert" ,python-nbconvert)
7931 ("python-prometheus-client" ,python-prometheus-client)
7932 ("python-send2trash" ,python-send2trash)
7933 ("python-terminado" ,python-terminado)))
7935 `(("python-nose" ,python-nose)
7936 ("python-sphinx" ,python-sphinx)
7937 ("python-requests" ,python-requests)))
7938 (home-page "http://jupyter.org/")
7939 (synopsis "Web-based notebook environment for interactive computing")
7941 "The Jupyter HTML notebook is a web-based notebook environment for
7942 interactive computing.")
7943 (properties `((python2-variant . ,(delay python2-notebook))))
7944 (license license:bsd-3)))
7946 (define-public python2-notebook
7947 (let ((base (package-with-python2
7948 (strip-python2-variant python-notebook))))
7949 (package (inherit base)
7951 `(("python2-mock" ,python2-mock)
7952 ,@(package-native-inputs base)))
7954 (substitute-keyword-arguments (package-arguments base)
7956 `(modify-phases ,phases
7957 (add-before 'check 'disable-test-case
7958 ;; The test requires network access to localhost. Curiously it
7959 ;; fails with Python 2 only. Simply make the test-case return
7963 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7964 (("formats = self.nbconvert_api") "return #")))))))))))
7966 (define-public python-widgetsnbextension
7968 (name "python-widgetsnbextension")
7973 (uri (pypi-uri "widgetsnbextension" version))
7976 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7977 (build-system python-build-system)
7979 `(("python-ipykernel" ,python-ipykernel)
7980 ("python-notebook" ,python-notebook)))
7982 `(("python-certifi" ,python-certifi)
7983 ("python-nose" ,python-nose)))
7984 (home-page "https://ipython.org")
7985 (synopsis "IPython HTML widgets for Jupyter")
7986 (description "This package provides interactive HTML widgets for Jupyter
7988 (license license:bsd-3)))
7990 (define-public python2-widgetsnbextension
7991 (package-with-python2 python-widgetsnbextension))
7993 (define-public python-ipywidgets
7995 (name "python-ipywidgets")
8000 (uri (pypi-uri "ipywidgets" version))
8003 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8004 (build-system python-build-system)
8006 `(("python-ipython" ,python-ipython)
8007 ("python-traitlets" ,python-traitlets)
8008 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8010 `(("python-nose" ,python-nose)
8011 ("python-pytest" ,python-pytest)))
8012 (home-page "https://ipython.org")
8013 (synopsis "IPython HTML widgets for Jupyter")
8014 (description "Ipywidgets are interactive HTML widgets for Jupyter
8015 notebooks and the IPython kernel. Notebooks come alive when interactive
8016 widgets are used. Users gain control of their data and can visualize changes
8018 (license license:bsd-3)))
8020 (define-public python2-ipywidgets
8021 (package-with-python2 python-ipywidgets))
8023 (define-public python-jupyter-console
8025 (name "python-jupyter-console")
8030 (uri (pypi-uri "jupyter_console" version))
8033 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8034 (build-system python-build-system)
8036 `(("python-ipykernel" ,python-ipykernel)
8037 ("python-jupyter-client" ,python-jupyter-client)
8038 ("python-prompt-toolkit" ,python-prompt-toolkit)
8039 ("python-pygments" ,python-pygments)))
8041 `(("python-nose" ,python-nose)))
8042 (home-page "https://jupyter.org")
8043 (synopsis "Jupyter terminal console")
8044 (description "This package provides a terminal-based console frontend for
8045 Jupyter kernels. It also allows for console-based interaction with non-Python
8046 Jupyter kernels such as IJulia and IRKernel.")
8047 (license license:bsd-3)))
8049 (define-public python2-jupyter-console
8051 (name "python2-jupyter-console")
8056 (uri (pypi-uri "jupyter_console" version))
8059 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8060 (build-system python-build-system)
8061 ;; Tests only run in an TTY.
8062 (arguments `(#:tests? #f))
8064 `(("python2-ipykernel" ,python2-ipykernel)
8065 ("python2-jupyter-client" ,python2-jupyter-client)
8066 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8067 ("python2-pygments" ,python2-pygments)))
8069 `(("python2-nose" ,python2-nose)))
8070 (home-page "https://jupyter.org")
8071 (synopsis "Jupyter terminal console")
8072 (description "This package provides a terminal-based console frontend for
8073 Jupyter kernels. It also allows for console-based interaction with non-Python
8074 Jupyter kernels such as IJulia and IRKernel.")
8075 (license license:bsd-3)))
8077 ;; The python-ipython and python-jupyter-console require each other. To get
8078 ;; the functionality in both packages working, strip down the
8079 ;; python-jupyter-console package when using it as an input to python-ipython.
8080 (define python-jupyter-console-minimal
8082 (inherit python-jupyter-console)
8083 (name "python-jupyter-console-minimal")
8085 (substitute-keyword-arguments
8086 (package-arguments python-jupyter-console)
8088 `(modify-phases ,phases
8089 (add-after 'install 'delete-bin
8090 (lambda* (#:key outputs #:allow-other-keys)
8091 ;; Delete the bin files, to avoid conflicts in profiles
8092 ;; where python-ipython and python-jupyter-console are
8094 (delete-file-recursively
8096 (assoc-ref outputs "out") "/bin"))))))))
8097 ;; Remove the python-ipython propagated input, to avoid the cycle
8101 (package-propagated-inputs python-jupyter-console)))))
8103 (define-public python-qtconsole
8105 (name "python-qtconsole")
8110 (uri (pypi-uri "qtconsole" version))
8113 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8114 (build-system python-build-system)
8116 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8117 ;; but we only have the LTS version 5.x. This means that there might be
8118 ;; runtime errors, but since this is a dependency of the Jupyter package,
8119 ;; and Jupyter can be used without the qtconsole we can overlook this for
8123 (modify-phases %standard-phases
8124 (add-before 'check 'pre-check
8126 (setenv "QT_QPA_PLATFORM" "offscreen")
8129 `(("python-ipykernel" ,python-ipykernel)
8130 ("python-ipython" ,python-ipython)))
8132 `(("python-pytest" ,python-pytest)))
8133 (home-page "http://jupyter.org")
8134 (synopsis "Jupyter Qt console")
8135 (description "This package provides a Qt-based console for Jupyter with
8136 support for rich media output.")
8137 (license license:bsd-3)))
8139 (define-public python-jsbeautifier
8141 (name "python-jsbeautifier")
8143 (home-page "https://github.com/beautify-web/js-beautify")
8148 (commit (string-append "v" version))))
8149 (file-name (git-file-name name version))
8152 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8153 (build-system python-build-system)
8155 `(#:phases (modify-phases %standard-phases
8156 (add-after 'unpack 'chdir
8158 ;; The upstream Git repository contains all the code,
8159 ;; but this package only builds the python code.
8162 (add-after 'unpack 'patch-python-six-requirements
8164 (substitute* "python/setup.py"
8169 `(("python-editorconfig" ,python-editorconfig)
8170 ("python-six" ,python-six)))
8172 `(("python-pytest" ,python-pytest)))
8173 (synopsis "JavaScript unobfuscator and beautifier")
8174 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8175 popular online obfuscators.")
8176 (license license:expat)))
8178 (define-public jupyter
8185 (uri (pypi-uri "jupyter" version))
8188 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8189 (build-system python-build-system)
8190 (arguments '(#:tests? #f)) ; there are none.
8192 `(("python-ipykernel" ,python-ipykernel)
8193 ("python-ipywidgets" ,python-ipywidgets)
8194 ("python-jupyter-console" ,python-jupyter-console)
8195 ("python-nbconvert" ,python-nbconvert)
8196 ("python-notebook" ,python-notebook)
8197 ("python-qtconsole" ,python-qtconsole)))
8198 (native-search-paths
8199 (list (search-path-specification
8200 (variable "JUPYTER_PATH")
8201 (files '("share/jupyter")))))
8202 (home-page "https://jupyter.org")
8203 (synopsis "Web application for interactive documents")
8205 "The Jupyter Notebook is a web application that allows you to create and
8206 share documents that contain live code, equations, visualizations and
8207 explanatory text. Uses include: data cleaning and transformation, numerical
8208 simulation, statistical modeling, machine learning and much more.")
8209 (license license:bsd-3)))
8211 (define-public python-chardet
8213 (name "python-chardet")
8218 (uri (pypi-uri "chardet" version))
8221 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8223 `(("python-hypothesis" ,python-hypothesis)
8224 ("python-pytest" ,python-pytest)
8225 ("python-pytest-runner" ,python-pytest-runner)))
8226 (build-system python-build-system)
8227 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8228 (arguments `(#:tests? #f))
8229 (home-page "https://github.com/chardet/chardet")
8230 (synopsis "Universal encoding detector for Python 2 and 3")
8232 "This package provides @code{chardet}, a Python module that can
8233 automatically detect a wide range of file encodings.")
8234 (license license:lgpl2.1+)))
8236 (define-public python2-chardet
8237 (package-with-python2 python-chardet))
8239 (define-public python-docopt
8241 (name "python-docopt")
8246 ;; The release on PyPI does not include tests.
8248 "https://github.com/docopt/docopt/archive/"
8250 (file-name (string-append name "-" version ".tar.gz"))
8253 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8254 (build-system python-build-system)
8256 `(("python-pytest" ,python-pytest)))
8259 (modify-phases %standard-phases
8261 (lambda _ (invoke "py.test"))))))
8262 (home-page "http://docopt.org")
8263 (synopsis "Command-line interface description language for Python")
8264 (description "This library allows the user to define a command-line
8265 interface from a program's help message rather than specifying it
8266 programmatically with command-line parsers like @code{getopt} and
8268 (license license:expat)))
8270 (define-public python2-docopt
8271 (package-with-python2 python-docopt))
8273 (define-public python-pythondialog
8275 (name "python-pythondialog")
8280 (uri (pypi-uri "pythondialog" version))
8283 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8284 (build-system python-build-system)
8287 (modify-phases %standard-phases
8288 (add-after 'unpack 'patch-path
8289 (lambda* (#:key inputs #:allow-other-keys)
8290 (let* ((dialog (assoc-ref inputs "dialog")))
8291 ;; Since this library really wants to grovel the search path, we
8292 ;; must hardcode dialog's store path into it.
8293 (substitute* "dialog.py"
8294 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8295 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8297 #:tests? #f)) ; no test suite
8299 `(("dialog" ,dialog)))
8300 (home-page "http://pythondialog.sourceforge.net/")
8301 (synopsis "Python interface to the UNIX dialog utility")
8302 (description "A Python wrapper for the dialog utility. Its purpose is to
8303 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8304 This allows one to make simple text-mode user interfaces on Unix-like systems")
8305 (license license:lgpl2.1)
8306 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8308 (define-public python2-pythondialog
8309 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8312 (version (package-version python-pythondialog))
8315 (uri (pypi-uri "python2-pythondialog" version))
8318 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8320 (define-public python-configobj
8322 (name "python-configobj")
8326 (uri (pypi-uri "configobj" version))
8329 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8330 ;; Patch setup.py so it looks for python-setuptools, which is
8331 ;; required to parse the keyword 'install_requires' in setup.py.
8332 (patches (search-patches "python-configobj-setuptools.patch"))))
8333 (build-system python-build-system)
8335 `(("python-six" ,python-six)))
8336 (synopsis "Config file reading, writing and validation")
8337 (description "ConfigObj is a simple but powerful config file reader and
8338 writer: an ini file round tripper. Its main feature is that it is very easy to
8339 use, with a straightforward programmer’s interface and a simple syntax for
8341 (home-page "https://github.com/DiffSK/configobj")
8342 (license license:bsd-3)))
8344 (define-public python2-configobj
8345 (package-with-python2 python-configobj))
8347 (define-public python-configargparse
8349 (name "python-configargparse")
8353 (uri (pypi-uri "ConfigArgParse" version))
8356 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8357 (build-system python-build-system)
8359 `(("python-pyyaml" ,python-pyyaml)))
8362 (modify-phases %standard-phases
8365 ;; Bypass setuptools-shim because one test relies on "setup.py"
8366 ;; being the first argument passed to the python call.
8368 ;; NOTE: Many tests do not run because they rely on Python's
8369 ;; built-in test.test_argparse, but we remove the unit tests from
8370 ;; our Python installation.
8371 (invoke "python" "setup.py" "test"))))))
8372 (synopsis "Replacement for argparse")
8373 (description "A drop-in replacement for argparse that allows options to also
8374 be set via config files and/or environment variables.")
8375 (home-page "https://github.com/bw2/ConfigArgParse")
8376 (license license:expat)))
8378 (define-public python2-configargparse
8379 (package-with-python2 python-configargparse))
8381 (define-public python-argparse-manpage
8383 (name "python-argparse-manpage")
8388 (uri (pypi-uri "argparse-manpage" version))
8391 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8392 (build-system python-build-system)
8393 (home-page "https://github.com/praiskup/argparse-manpage")
8394 (synopsis "Build manual page from Python's ArgumentParser object")
8396 "This package provides tools to build manual pages from Python's
8397 @code{ArgumentParser} object.")
8398 (license license:asl2.0)))
8400 (define-public python-contextlib2
8402 (name "python-contextlib2")
8407 (uri (pypi-uri "contextlib2" version))
8410 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8411 (build-system python-build-system)
8412 (home-page "http://contextlib2.readthedocs.org/")
8413 (synopsis "Tools for decorators and context managers")
8414 (description "This module is primarily a backport of the Python
8415 3.2 contextlib to earlier Python versions. Like contextlib, it
8416 provides utilities for common tasks involving decorators and context
8417 managers. It also contains additional features that are not part of
8418 the standard library.")
8419 (license license:psfl)))
8421 (define-public python2-contextlib2
8423 (name "python2-contextlib2")
8428 (uri (pypi-uri "contextlib2" version))
8431 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8432 (build-system python-build-system)
8434 `(#:python ,python-2
8436 (modify-phases %standard-phases
8438 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8440 `(("python2-unittest2" ,python2-unittest2)))
8441 (home-page "http://contextlib2.readthedocs.org/")
8442 (synopsis "Tools for decorators and context managers")
8443 (description "This module is primarily a backport of the Python
8444 3.2 contextlib to earlier Python versions. Like contextlib, it
8445 provides utilities for common tasks involving decorators and context
8446 managers. It also contains additional features that are not part of
8447 the standard library.")
8448 (license license:psfl)))
8450 (define-public python-texttable
8452 (name "python-texttable")
8457 (uri (pypi-uri "texttable" version))
8460 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8461 (build-system python-build-system)
8462 (arguments '(#:tests? #f)) ; no tests
8463 (home-page "https://github.com/foutaise/texttable/")
8464 (synopsis "Python module for creating simple ASCII tables")
8465 (description "Texttable is a Python module for creating simple ASCII
8467 (license license:lgpl2.1+)))
8469 (define-public python2-texttable
8470 (package-with-python2 python-texttable))
8472 (define-public python-atomicwrites
8474 (name "python-atomicwrites")
8478 (uri (pypi-uri "atomicwrites" version))
8481 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8482 (build-system python-build-system)
8483 (synopsis "Atomic file writes in Python")
8484 (description "Library for atomic file writes using platform dependent tools
8485 for atomic file system operations.")
8486 (home-page "https://github.com/untitaker/python-atomicwrites")
8487 (license license:expat)))
8489 (define-public python2-atomicwrites
8490 (package-with-python2 python-atomicwrites))
8492 (define-public python-click-threading
8494 (name "python-click-threading")
8498 (uri (pypi-uri "click-threading" version))
8501 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8502 (build-system python-build-system)
8504 `(("python-click" ,python-click)))
8505 (synopsis "Utilities for multithreading in Click")
8506 (description "This package provides utilities for multithreading in Click
8508 (home-page "https://github.com/click-contrib/click-threading")
8509 (license license:expat)))
8511 (define-public python-click-log
8513 (name "python-click-log")
8517 (uri (pypi-uri "click-log" version))
8520 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8521 (build-system python-build-system)
8523 `(("python-click" ,python-click)))
8524 (synopsis "Logging for click applications")
8525 (description "This package provides a Python library for logging Click
8527 (home-page "https://github.com/click-contrib/click-log")
8528 (license license:expat)))
8530 (define-public python-apipkg
8532 (name "python-apipkg")
8536 (uri (pypi-uri "apipkg" version))
8539 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8540 (build-system python-build-system)
8542 `(("python-pytest" ,python-pytest)))
8543 (synopsis "Namespace control and lazy-import mechanism")
8544 (description "With apipkg you can control the exported namespace of a Python
8545 package and greatly reduce the number of imports for your users. It is a small
8546 pure Python module that works on virtually all Python versions.")
8547 (home-page "https://github.com/pytest-dev/apipkg")
8548 (license license:expat)))
8550 (define-public python2-apipkg
8551 (package-with-python2 python-apipkg))
8553 (define-public python-execnet
8555 (name "python-execnet")
8559 (uri (pypi-uri "execnet" version))
8562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8563 (build-system python-build-system)
8565 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8566 ;; The two test failures are caused by the lack of an `ssh` executable.
8567 ;; The test suite can be run with pytest after the 'install' phase.
8570 `(("python-pytest" ,python-pytest)
8571 ("python-setuptools-scm" ,python-setuptools-scm)))
8573 `(("python-apipkg" ,python-apipkg)))
8574 (synopsis "Rapid multi-Python deployment")
8575 (description "Execnet provides a share-nothing model with
8576 channel-send/receive communication for distributing execution across many
8577 Python interpreters across version, platform and network barriers. It has a
8578 minimal and fast API targeting the following uses:
8580 @item distribute tasks to (many) local or remote CPUs
8581 @item write and deploy hybrid multi-process applications
8582 @item write scripts to administer multiple environments
8584 (home-page "http://codespeak.net/execnet/")
8585 (license license:expat)))
8587 (define-public python2-execnet
8588 (package-with-python2 python-execnet))
8590 (define-public python-icalendar
8592 (name "python-icalendar")
8596 (uri (pypi-uri "icalendar" version))
8599 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8600 (build-system python-build-system)
8602 `(("python-dateutil" ,python-dateutil)
8603 ("python-pytz" ,python-pytz)))
8604 (synopsis "Python library for parsing iCalendar files")
8605 (description "The icalendar package is a parser/generator of iCalendar
8606 files for use with Python.")
8607 (home-page "https://github.com/collective/icalendar")
8608 (license license:bsd-2)))
8610 (define-public python-args
8612 (name "python-args")
8616 (uri (pypi-uri "args" version))
8619 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8620 (build-system python-build-system)
8621 (home-page "https://github.com/kennethreitz/args")
8622 (synopsis "Command-line argument parser")
8624 "This library provides a Python module to parse command-line arguments.")
8625 (license license:bsd-3)))
8627 (define-public python2-args
8628 (package-with-python2 python-args))
8630 (define-public python-clint
8632 (name "python-clint")
8636 (uri (pypi-uri "clint" version))
8639 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8640 (build-system python-build-system)
8643 (modify-phases %standard-phases
8645 (lambda _ (invoke "py.test" "-v"))))))
8647 `(("python-pytest" ,python-pytest)))
8649 `(("python-args" ,python-args)))
8650 (home-page "https://github.com/kennethreitz/clint")
8651 (synopsis "Command-line interface tools")
8653 "Clint is a Python module filled with a set of tools for developing
8654 command-line applications, including tools for colored and indented
8655 output, progress bar display, and pipes.")
8656 (license license:isc)))
8658 (define-public python2-clint
8659 (package-with-python2 python-clint))
8661 (define-public python-rply
8663 (name "python-rply")
8667 (uri (pypi-uri "rply" version))
8670 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8671 (build-system python-build-system)
8673 `(("python-appdirs" ,python-appdirs)))
8674 (home-page "https://github.com/alex/rply")
8675 (synopsis "Parser generator for Python")
8677 "This package provides a pure Python based parser generator, that also
8678 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8679 with a new public API, and RPython support.")
8680 (license license:bsd-3)))
8682 (define-public python2-rply
8683 (package-with-python2 python-rply))
8685 (define-public python-hy
8691 (uri (pypi-uri "hy" version))
8694 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8695 (build-system python-build-system)
8698 (modify-phases %standard-phases
8701 ;; Tests require write access to HOME.
8702 (setenv "HOME" "/tmp")
8703 (invoke "nosetests"))))))
8705 `(("python-coverage" ,python-coverage)
8706 ("python-nose" ,python-nose)))
8708 `(("python-astor" ,python-astor)
8709 ("python-clint" ,python-clint)
8710 ("python-rply" ,python-rply)))
8711 (home-page "http://hylang.org/")
8712 (synopsis "Lisp frontend to Python")
8714 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8715 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8716 Python at your fingertips, in Lisp form.")
8717 (license license:expat)))
8719 (define-public python2-hy
8720 (package-with-python2 python-hy))
8722 (define-public python2-functools32
8724 (name "python2-functools32")
8729 (uri (pypi-uri "functools32" version))
8732 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8733 (build-system python-build-system)
8735 `(#:python ,python-2
8736 #:tests? #f)) ; no test target
8737 (home-page "https://github.com/MiCHiLU/python-functools32")
8739 "Backport of the functools module from Python 3.2.3")
8741 "This package is a backport of the @code{functools} module from Python
8742 3.2.3 for use with older versions of Python and PyPy.")
8743 (license license:expat)))
8745 (define-public python2-subprocess32
8747 (name "python2-subprocess32")
8751 (uri (pypi-uri "subprocess32" version))
8754 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8756 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8757 (build-system python-build-system)
8759 `(#:python ,python-2
8760 ;; The test suite fails with Python > 2.7.13:
8761 ;; import test.support
8762 ;; ImportError: No module named support
8765 (modify-phases %standard-phases
8766 (add-after 'unpack 'patch-/bin/sh
8768 (substitute* '("subprocess32.py"
8769 "test_subprocess32.py")
8770 (("/bin/sh") (which "sh")))
8772 (home-page "https://github.com/google/python-subprocess32")
8773 (synopsis "Backport of the subprocess module from Python 3.2")
8775 "This is a backport of the @code{subprocess} standard library module
8776 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8777 new features. On POSIX systems it is guaranteed to be reliable when used
8778 in threaded applications. It includes timeout support from Python 3.3 but
8779 otherwise matches 3.2’s API.")
8780 (license license:psfl)))
8782 (define-public python2-futures
8784 (name "python2-futures")
8789 (uri (pypi-uri "futures" version))
8792 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8793 (build-system python-build-system)
8795 `(#:python ,python-2
8797 (modify-phases %standard-phases
8800 (invoke "python" "test_futures.py")
8802 (home-page "https://github.com/agronholm/pythonfutures")
8804 "Backport of the concurrent.futures package from Python 3.2")
8806 "The concurrent.futures module provides a high-level interface for
8807 asynchronously executing callables. This package backports the
8808 concurrent.futures package from Python 3.2")
8809 (license license:bsd-3)))
8811 (define-public python-promise
8813 (name "python-promise")
8818 (uri (pypi-uri "promise" version))
8821 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8822 (build-system python-build-system)
8823 ;; Tests wants python-futures, which is a python2 only program, and
8824 ;; can't be found by python-promise at test time.
8825 (arguments `(#:tests? #f))
8826 (home-page "https://github.com/syrusakbary/promise")
8827 (synopsis "Promises/A+ implementation for Python")
8829 "Promises/A+ implementation for Python")
8830 (properties `((python2-variant . ,(delay python2-promise))))
8831 (license license:expat)))
8833 (define-public python2-promise
8834 (let ((promise (package-with-python2
8835 (strip-python2-variant python-promise))))
8836 (package (inherit promise)
8837 (arguments (substitute-keyword-arguments (package-arguments promise)
8840 `(("python2-futures" ,python2-futures)
8841 ("python2-pytest" ,python2-pytest)
8842 ,@(package-native-inputs promise))))))
8844 (define-public python-progressbar33
8846 (name "python-progressbar33")
8851 (uri (pypi-uri "progressbar33" version))
8854 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8855 (build-system python-build-system)
8856 (home-page "http://github.com/germangh/python-progressbar")
8857 (synopsis "Text progress bar library for Python")
8859 "This package provides a text progress bar library for Python. This
8860 version only differs from the original @code{progressbar} package in that it
8861 uses relative package imports instead of absolute imports, which is necessary
8862 for the module to work under Python 3.3.")
8863 ;; Either or both of these licenses may be selected.
8864 (license (list license:lgpl2.1+ license:bsd-3))))
8866 (define-public python-colorama
8868 (name "python-colorama")
8873 (uri (pypi-uri "colorama" version))
8876 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8877 (build-system python-build-system)
8878 (synopsis "Colored terminal text rendering for Python")
8879 (description "Colorama is a Python library for rendering colored terminal
8881 (home-page "https://pypi.python.org/pypi/colorama")
8882 (license license:bsd-3)))
8884 (define-public python2-colorama
8885 (package-with-python2 python-colorama))
8887 (define-public python-rsa
8894 (uri (pypi-uri "rsa" version))
8897 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8898 (build-system python-build-system)
8900 `(("python-pyasn1" ,python-pyasn1)))
8901 (synopsis "Pure-Python RSA implementation")
8902 (description "Python-RSA is a pure-Python RSA implementation. It supports
8903 encryption and decryption, signing and verifying signatures, and key
8904 generation according to PKCS#1 version 1.5. It can be used as a Python
8905 library as well as on the command line.")
8906 (home-page "https://stuvel.eu/rsa")
8907 (license license:asl2.0)))
8909 (define-public python2-rsa
8910 (package-with-python2 python-rsa))
8912 (define-public python-pluggy
8914 (name "python-pluggy")
8919 (uri (pypi-uri "pluggy" version))
8922 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8923 (build-system python-build-system)
8925 `(("python-setuptools-scm" ,python-setuptools-scm)))
8926 (synopsis "Plugin and hook calling mechanism for Python")
8927 (description "Pluggy is an extraction of the plugin manager as used by
8928 Pytest but stripped of Pytest specific details.")
8929 (home-page "https://pypi.python.org/pypi/pluggy")
8930 (license license:expat)))
8932 (define-public python2-pluggy
8933 (package-with-python2 python-pluggy))
8935 (define-public python-tox
8942 (uri (pypi-uri "tox" version))
8945 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8946 (build-system python-build-system)
8948 ;; FIXME: Tests require pytest-timeout, which itself requires
8949 ;; pytest>=2.8.0 for installation.
8952 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8953 ("python-py" ,python-py)
8954 ("python-virtualenv" ,python-virtualenv)))
8956 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8957 ("python-pytest" ,python-pytest) ; >= 2.3.5
8958 ("python-setuptools-scm" ,python-setuptools-scm)))
8959 (home-page "http://tox.testrun.org/")
8960 (synopsis "Virtualenv-based automation of test activities")
8961 (description "Tox is a generic virtualenv management and test command line
8962 tool. It can be used to check that a package installs correctly with
8963 different Python versions and interpreters, or run tests in each type of
8964 supported environment, or act as a frontend to continuous integration
8966 (license license:expat)))
8968 (define-public python2-tox
8969 (package-with-python2 python-tox))
8971 (define-public python-jmespath
8973 (name "python-jmespath")
8978 (uri (pypi-uri "jmespath" version))
8981 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8982 (build-system python-build-system)
8984 `(("python-nose" ,python-nose)))
8985 (synopsis "JSON Matching Expressions")
8986 (description "JMESPath (pronounced “james path”) is a Python library that
8987 allows one to declaratively specify how to extract elements from a JSON
8989 (home-page "https://github.com/jmespath/jmespath.py")
8990 (license license:expat)))
8992 (define-public python2-jmespath
8993 (package-with-python2 python-jmespath))
8995 (define-public python-botocore
8997 (name "python-botocore")
8998 (version "1.12.149")
9002 (uri (pypi-uri "botocore" version))
9005 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9006 (build-system python-build-system)
9008 ;; FIXME: Many tests are failing.
9011 `(("python-dateutil" ,python-dateutil)
9012 ("python-docutils" ,python-docutils)
9013 ("python-jmespath" ,python-jmespath)))
9015 `(("python-mock" ,python-mock)
9016 ("python-nose" ,python-nose)
9018 ("python-tox" ,python-tox)
9019 ("python-urllib3" ,python-urllib3)
9020 ("python-wheel" ,python-wheel)))
9021 (home-page "https://github.com/boto/botocore")
9022 (synopsis "Low-level interface to AWS")
9023 (description "Botocore is a Python library that provides a low-level
9024 interface to the Amazon Web Services (AWS) API.")
9025 (license license:asl2.0)))
9027 (define-public python2-botocore
9028 (package-with-python2 python-botocore))
9030 (define-public python-xdo
9037 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9038 "python-xdo_" version ".orig.tar.gz"))
9041 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9042 (build-system python-build-system)
9045 (modify-phases %standard-phases
9046 (add-before 'install 'patch-libxdo-path
9047 ;; Hardcode the path of dynamically loaded libxdo library.
9048 (lambda* (#:key inputs #:allow-other-keys)
9049 (let ((libxdo (string-append
9050 (assoc-ref inputs "xdotool")
9052 (substitute* "xdo/_xdo.py"
9053 (("find_library\\(\"xdo\"\\)")
9054 (simple-format #f "\"~a\"" libxdo)))
9056 #:tests? #f)) ; no tests provided
9058 `(("python-six" ,python-six)))
9060 `(("xdotool" ,xdotool)
9061 ("libX11" ,libx11)))
9062 (home-page "https://tracker.debian.org/pkg/python-xdo")
9063 (synopsis "Python library for simulating X11 keyboard/mouse input")
9064 (description "Provides bindings to libxdo for manipulating X11 via simulated
9065 input. (Note that this is mostly a legacy library; you may wish to look at
9066 python-xdo for newer bindings.)")
9067 (license license:bsd-3)))
9069 (define-public python2-xdo
9070 (package-with-python2 python-xdo))
9072 (define-public python-mako
9074 (name "python-mako")
9079 (uri (pypi-uri "Mako" version))
9082 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9083 (build-system python-build-system)
9085 `(#:phases (modify-phases %standard-phases
9088 (invoke "pytest" "-vv"))))))
9090 `(("python-markupsafe" ,python-markupsafe)))
9092 `(("python-mock" ,python-mock)
9093 ("python-pytest" ,python-pytest)))
9094 (home-page "https://www.makotemplates.org/")
9095 (synopsis "Templating language for Python")
9096 (description "Mako is a templating language for Python that compiles
9097 templates into Python modules.")
9098 (license license:expat)))
9100 (define-public python2-mako
9101 (package-with-python2 python-mako))
9103 (define-public python-waitress
9105 (name "python-waitress")
9110 (uri (pypi-uri "waitress" version))
9111 (patches (search-patches "python-waitress-fix-tests.patch"))
9114 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9115 (build-system python-build-system)
9116 (home-page "https://github.com/Pylons/waitress")
9117 (synopsis "Waitress WSGI server")
9118 (description "Waitress is meant to be a production-quality pure-Python WSGI
9119 server with very acceptable performance.")
9120 (license license:zpl2.1)))
9122 (define-public python2-waitress
9123 (package-with-python2 python-waitress))
9125 (define-public python-whichcraft
9127 (name "python-whichcraft")
9132 (uri (pypi-uri "whichcraft" version))
9135 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9136 (build-system python-build-system)
9138 `(("python-pytest" ,python-pytest)))
9139 (home-page "https://github.com/pydanny/whichcraft")
9140 (synopsis "Cross-platform cross-python shutil.which functionality")
9142 "This package provides a shim of the shutil.which function that's
9143 designed to work across multiple versions of Python.")
9144 (license license:bsd-3)))
9146 (define-public python-cookiecutter
9148 (name "python-cookiecutter")
9153 (uri (pypi-uri "cookiecutter" version))
9156 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9157 (build-system python-build-system)
9159 `(("python-freezegun" ,python-freezegun)
9160 ("python-pytest" ,python-pytest)
9161 ("python-pytest-catchlog" ,python-pytest-catchlog)
9162 ("python-pytest-cov" ,python-pytest-cov)
9163 ("python-pytest-mock" ,python-pytest-mock)))
9165 `(("python-binaryornot" ,python-binaryornot)
9166 ("python-click" ,python-click)
9167 ("python-future" ,python-future)
9168 ("python-jinja2" ,python-jinja2)
9169 ("python-jinja2-time" ,python-jinja2-time)
9170 ("python-poyo" ,python-poyo)
9171 ("python-requests" ,python-requests)
9172 ("python-whichcraft" ,python-whichcraft)))
9173 (home-page "https://github.com/audreyr/cookiecutter")
9175 "Command-line utility that creates projects from project templates")
9177 "This package provides a command-line utility that creates projects from
9178 project templates, e.g. creating a Python package project from a Python package
9180 (license license:bsd-3)))
9182 (define-public python-pyquery
9184 (name "python-pyquery")
9189 (uri (pypi-uri "pyquery" version))
9192 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9193 (build-system python-build-system)
9195 `(("python-webob" ,python-webob)
9196 ("python-webtest" ,python-webtest)))
9198 `(("python-lxml" ,python-lxml)
9199 ("python-cssselect" ,python-cssselect)))
9200 (home-page "https://github.com/gawel/pyquery")
9201 (synopsis "Make jQuery-like queries on xml documents")
9202 (description "pyquery allows you to make jQuery queries on xml documents.
9203 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9204 fast xml and html manipulation.")
9205 (license license:bsd-3)))
9207 (define-public python-anyjson
9209 (name "python-anyjson")
9214 (uri (pypi-uri "anyjson" version))
9217 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9218 (build-system python-build-system)
9220 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9221 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9222 ;; whatever) so this transformation needs to be done before the tests
9223 ;; can be run. Maybe we could add a build step to transform beforehand
9224 ;; but it could be annoying/difficult.
9225 ;; We can enable tests for the Python 2 version, though, and do below.
9227 (home-page "https://bitbucket.org/runeh/anyjson/")
9229 "Wraps best available JSON implementation in a common interface")
9231 "Anyjson loads whichever is the fastest JSON module installed
9232 and provides a uniform API regardless of which JSON implementation is used.")
9233 (license license:bsd-3)
9234 (properties `((python2-variant . ,(delay python2-anyjson))))))
9236 (define-public python2-anyjson
9237 (let ((anyjson (package-with-python2
9238 (strip-python2-variant python-anyjson))))
9241 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9243 ,@(package-arguments anyjson)))
9244 (native-inputs `(("python2-nose" ,python2-nose))))))
9246 (define-public python-amqp
9248 (name "python-amqp")
9253 (uri (pypi-uri "amqp" version))
9256 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9257 (build-system python-build-system)
9259 `(("python-case" ,python-case)
9260 ("python-pytest-sugar" ,python-pytest-sugar)
9261 ("python-mock" ,python-mock)))
9263 `(("python-vine" ,python-vine)))
9264 (home-page "https://github.com/celery/py-amqp")
9266 "Low-level AMQP client for Python (fork of amqplib)")
9268 "This is a fork of amqplib which was originally written by Barry Pederson.
9269 It is maintained by the Celery project, and used by kombu as a pure python
9270 alternative when librabbitmq is not available.")
9271 (license license:lgpl2.1+)
9272 (properties `((python2-variant . ,(delay python2-amqp))))))
9274 (define-public python2-amqp
9275 (let ((amqp (package-with-python2
9276 (strip-python2-variant python-amqp))))
9279 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9280 ;; unmaintained. Weirdly, does not do this on the python 3
9283 ,@(package-arguments amqp))))))
9285 (define-public python-txamqp
9287 (name "python-txamqp")
9292 (uri (pypi-uri "txAMQP" version))
9295 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9296 (build-system python-build-system)
9298 `(("python-six" ,python-six)
9299 ("python-twisted" ,python-twisted)))
9300 (home-page "https://github.com/txamqp/txamqp")
9301 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9303 "This package provides a Python library for communicating with AMQP peers
9304 and brokers using the asynchronous networking framework Twisted. It contains
9305 all the necessary code to connect, send and receive messages to/from an
9306 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9307 also includes support for using Thrift RPC over AMQP in Twisted
9309 (license license:asl2.0)))
9311 (define-public python2-txamqp
9312 (package-with-python2 python-txamqp))
9314 (define-public python-kombu
9316 (name "python-kombu")
9321 (uri (pypi-uri "kombu" version))
9324 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9325 (build-system python-build-system)
9327 `(("python-mock" ,python-mock)
9328 ("python-case" ,python-case)
9329 ("python-pyro4" ,python-pyro4)
9330 ("python-pytest-sugar" ,python-pytest-sugar)
9331 ("python-pytz" ,python-pytz)))
9333 `(("python-anyjson" ,python-anyjson)
9334 ("python-amqp" ,python-amqp)
9335 ("python-redis" ,python-redis)))
9336 (home-page "https://kombu.readthedocs.io")
9337 (synopsis "Message passing library for Python")
9338 (description "The aim of Kombu is to make messaging in Python as easy as
9339 possible by providing an idiomatic high-level interface for the AMQ protocol,
9340 and also provide proven and tested solutions to common messaging problems.
9341 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9342 message orientation, queuing, routing, reliability and security, for which the
9343 RabbitMQ messaging server is the most popular implementation.")
9344 (license license:bsd-3)
9345 (properties `((python2-variant . ,(delay python2-kombu))))))
9347 (define-public python2-kombu
9348 (let ((kombu (package-with-python2
9349 (strip-python2-variant python-kombu))))
9352 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9353 ;; It works fine on the python3 variant.
9355 ,@(package-arguments kombu)))
9356 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9357 ,@(package-native-inputs kombu))))))
9359 (define-public python-billiard
9361 (name "python-billiard")
9366 (uri (pypi-uri "billiard" version))
9369 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9370 (build-system python-build-system)
9372 `(("python-case" ,python-case)
9373 ("python-pytest" ,python-pytest)))
9374 (home-page "https://github.com/celery/billiard")
9376 "Python multiprocessing fork with improvements and bugfixes")
9378 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9379 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9380 pyprocessing package. This standalone variant is intended to be compatible with
9381 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9382 (license license:bsd-3)
9383 (properties `((python2-variant . ,(delay python2-billiard))))))
9385 (define-public python2-billiard
9386 (let ((billiard (package-with-python2
9387 (strip-python2-variant python-billiard))))
9390 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9391 ("python2-mock" ,python2-mock)
9392 ,@(package-native-inputs billiard))))))
9394 (define-public python-celery
9396 (name "python-celery")
9401 (uri (pypi-uri "celery" version))
9404 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9405 (build-system python-build-system)
9407 '(;; TODO The tests fail with Python 3.7
9408 ;; https://github.com/celery/celery/issues/4849
9411 (modify-phases %standard-phases
9412 (add-after 'unpack 'patch-requirements
9414 (substitute* "requirements/test.txt"
9415 (("pytest>=3\\.0,<3\\.3")
9419 `(("python-case" ,python-case)
9420 ("python-pytest" ,python-pytest)))
9422 `(("python-pytz" ,python-pytz)
9423 ("python-billiard" ,python-billiard)
9424 ("python-kombu" ,python-kombu)))
9425 (home-page "https://celeryproject.org")
9426 (synopsis "Distributed Task Queue")
9427 (description "Celery is an asynchronous task queue/job queue based on
9428 distributed message passing. It is focused on real-time operation, but
9429 supports scheduling as well. The execution units, called tasks, are executed
9430 concurrently on a single or more worker servers using multiprocessing,
9431 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9432 synchronously (wait until ready).")
9433 (license license:bsd-3)
9434 (properties `((python2-variant . ,(delay python2-celery))))))
9436 (define-public python2-celery
9437 (let ((celery (package-with-python2
9438 (strip-python2-variant python-celery))))
9441 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9442 ("python2-mock" ,python2-mock)
9443 ,@(package-native-inputs celery))))))
9445 (define-public python-translitcodec
9447 (name "python-translitcodec")
9452 (uri (pypi-uri "translitcodec" version))
9455 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9456 (build-system python-build-system)
9458 `(#:tests? #f)) ; no tests provided
9460 "https://github.com/claudep/translitcodec")
9462 "Unicode to 8-bit charset transliteration codec")
9464 "This package contains codecs for transliterating ISO 10646 texts into
9465 best-effort representations using smaller coded character sets (ASCII,
9467 (license license:expat)))
9469 (define-public python2-translitcodec
9470 (package-with-python2 python-translitcodec))
9472 (define-public python-editor
9474 (name "python-editor")
9479 (uri (pypi-uri "python-editor" version))
9482 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9483 (build-system python-build-system)
9485 "https://github.com/fmoo/python-editor")
9487 "Programmatically open an editor, capture the result")
9489 "python-editor is a library that provides the editor module for
9490 programmatically interfacing with your system's $EDITOR.")
9491 (license license:asl2.0)))
9493 (define-public python2-editor
9494 (package-with-python2 python-editor))
9496 (define-public python-vobject
9498 (name "python-vobject")
9502 (uri (pypi-uri "vobject" version))
9505 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9506 (build-system python-build-system)
9508 '(;; The test suite relies on some non-portable Windows interfaces.
9511 `(("python-dateutil" ,python-dateutil)
9512 ("python-pyicu" ,python-pyicu)))
9513 (synopsis "Parse and generate vCard and vCalendar files")
9514 (description "Vobject is intended to be a full featured Python package for
9515 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9516 are supported and well tested. vCard 3.0 files are supported, and all data
9517 should be imported, but only a few components are understood in a sophisticated
9519 (home-page "http://eventable.github.io/vobject/")
9520 (license license:asl2.0)))
9522 (define-public python2-vobject
9523 (package-with-python2 python-vobject))
9525 (define-public python-munkres
9527 (name "python-munkres")
9531 (uri (pypi-uri "munkres" version))
9534 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9535 (build-system python-build-system)
9537 '(#:tests? #f)) ; no test suite
9538 (home-page "http://software.clapper.org/munkres/")
9539 (synopsis "Implementation of the Munkres algorithm")
9540 (description "The Munkres module provides an implementation of the Munkres
9541 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9542 useful for solving the Assignment Problem.")
9543 (license license:bsd-3)))
9545 (define-public python2-munkres
9546 (package-with-python2 python-munkres))
9548 (define-public python-whoosh
9550 (name "python-whoosh")
9555 (uri (pypi-uri "Whoosh" version))
9558 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9559 (build-system python-build-system)
9561 `(("python-pytest" ,python-pytest)))
9562 (home-page "https://bitbucket.org/mchaput/whoosh")
9563 (synopsis "Full text indexing, search, and spell checking library")
9565 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9567 (license license:bsd-2)))
9569 (define-public python2-whoosh
9570 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9571 (package (inherit whoosh)
9573 `(("python2-backport-ssl-match-hostname"
9574 ,python2-backport-ssl-match-hostname)
9575 ,@(package-propagated-inputs whoosh))))))
9577 (define-public python-pathlib
9579 (name "python-pathlib")
9583 (uri (pypi-uri "pathlib" version))
9586 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9587 (build-system python-build-system)
9588 ;; The tests depend on the internal "test" module, which does not provide
9589 ;; a stable interface.
9590 (arguments `(#:tests? #f))
9591 (home-page "https://pathlib.readthedocs.org/")
9592 (synopsis "Object-oriented file system paths")
9593 (description "Pathlib offers a set of classes to handle file system paths.
9594 It offers the following advantages over using string objects:
9597 @item No more cumbersome use of os and os.path functions. Everything can
9598 be done easily through operators, attribute accesses, and method calls.
9599 @item Embodies the semantics of different path types. For example,
9600 comparing Windows paths ignores casing.
9601 @item Well-defined semantics, eliminating any inconsistencies or
9602 ambiguities (forward vs. backward slashes, etc.).
9605 Note: In Python 3.4, pathlib is now part of the standard library. For other
9606 Python versions please consider python-pathlib2 instead, which tracks the
9607 standard library module. This module (python-pathlib) isn't maintained
9609 (license license:expat)))
9611 (define-public python2-pathlib
9612 (package-with-python2 python-pathlib))
9614 (define-public python2-pathlib2
9616 (name "python2-pathlib2")
9620 (uri (pypi-uri "pathlib2" version))
9623 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9624 (build-system python-build-system)
9625 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9626 ;; version is 3.4 which already includes this package as part of the
9627 ;; standard library.
9629 `(#:python ,python-2))
9631 `(("python2-scandir" ,python2-scandir)
9632 ("python2-six" ,python2-six)))
9633 (home-page "https://pypi.python.org/pypi/pathlib2/")
9634 (synopsis "Object-oriented file system paths - backport of standard
9636 (description "The goal of pathlib2 is to provide a backport of standard
9637 pathlib module which tracks the standard library module, so all the newest
9638 features of the standard pathlib can be used also on older Python versions.
9640 Pathlib offers a set of classes to handle file system paths. It offers the
9641 following advantages over using string objects:
9644 @item No more cumbersome use of os and os.path functions. Everything can
9645 be done easily through operators, attribute accesses, and method calls.
9646 @item Embodies the semantics of different path types. For example,
9647 comparing Windows paths ignores casing.
9648 @item Well-defined semantics, eliminating any inconsistencies or
9649 ambiguities (forward vs. backward slashes, etc.).
9651 (license license:expat)))
9653 (define-public python2-pathlib2-bootstrap
9656 (inherit python2-pathlib2)
9657 (name "python2-pathlib2-bootstrap")
9659 `(("python2-scandir" ,python2-scandir)
9660 ("python2-six" ,python2-six-bootstrap))))))
9662 (define-public python-jellyfish
9664 (name "python-jellyfish")
9668 (uri (pypi-uri "jellyfish" version))
9671 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9672 (build-system python-build-system)
9674 `(("python-pytest" ,python-pytest)))
9675 (home-page "https://github.com/jamesturk/jellyfish")
9676 (synopsis "Approximate and phonetic matching of strings")
9677 (description "Jellyfish uses a variety of string comparison and phonetic
9678 encoding algorithms to do fuzzy string matching.")
9679 (license license:bsd-2)
9680 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9682 (define-public python2-jellyfish
9683 (let ((jellyfish (package-with-python2
9684 (strip-python2-variant python-jellyfish))))
9685 (package (inherit jellyfish)
9686 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9687 ,@(package-native-inputs jellyfish))))))
9689 (define-public python2-unicodecsv
9691 (name "python2-unicodecsv")
9695 ;; The test suite is not included in the PyPi release.
9696 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9697 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9698 "archive/" version ".tar.gz"))
9699 (file-name (string-append name "-" version ".tar.gz"))
9702 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9703 (build-system python-build-system)
9705 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9706 #:python ,python-2))
9708 `(("python2-unittest2" ,python2-unittest2)))
9709 (home-page "https://github.com/jdunck/python-unicodecsv")
9710 (synopsis "Unicode CSV module for Python 2")
9711 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9712 module, adding support for Unicode strings.")
9713 (license license:bsd-2)))
9715 (define-public python-rarfile
9717 (name "python-rarfile")
9721 (uri (pypi-uri "rarfile" version))
9724 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9725 (build-system python-build-system)
9728 (modify-phases %standard-phases
9730 ;; Many tests fail, but the installation proceeds.
9731 (lambda _ (invoke "make" "-C" "test" "test"))))))
9733 `(("which" ,which))) ; required for tests
9735 `(("libarchive" ,libarchive)))
9736 (home-page "https://github.com/markokr/rarfile")
9737 (synopsis "RAR archive reader for Python")
9738 (description "This is Python module for RAR archive reading. The interface
9739 is made as zipfile like as possible.")
9740 (license license:isc)))
9742 (define-public python2-rarfile
9743 (package-with-python2 python-rarfile))
9745 (define-public python-magic
9747 (name "python-magic")
9752 (uri (pypi-uri "python-magic" version))
9755 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9756 (file-name (string-append name "-" version "-checkout"))))
9757 (build-system python-build-system)
9759 ;; The tests are unreliable, so don't run them. The tests fail
9760 ;; under Python3 because they were written for Python2 and
9761 ;; contain import statements that do not work in Python3. One of
9762 ;; the tests fails under Python2 because its assertions are
9763 ;; overly stringent; it relies on comparing output strings which
9764 ;; are brittle and can change depending on the version of
9765 ;; libmagic being used and the system on which the test is
9766 ;; running. In my case, under GuixSD 0.10.0, only one test
9767 ;; failed, and it seems to have failed only because the version
9768 ;; of libmagic that is packaged in Guix outputs a slightly
9769 ;; different (but not wrong) string than the one that the test
9772 #:phases (modify-phases %standard-phases
9773 ;; Replace a specific method call with a hard-coded
9774 ;; path to the necessary libmagic.so file in the
9775 ;; store. If we don't do this, then the method call
9776 ;; will fail to find the libmagic.so file, which in
9777 ;; turn will cause any application using
9778 ;; python-magic to fail.
9779 (add-before 'build 'hard-code-path-to-libmagic
9780 (lambda* (#:key inputs #:allow-other-keys)
9781 (let ((file (assoc-ref inputs "file")))
9782 (substitute* "magic.py"
9783 (("ctypes.util.find_library\\('magic'\\)")
9784 (string-append "'" file "/lib/libmagic.so'")))
9786 (add-before 'install 'disable-egg-compression
9788 (let ((port (open-file "setup.cfg" "a")))
9789 (display "\n[easy_install]\nzip_ok = 0\n"
9794 ;; python-magic needs to be able to find libmagic.so.
9797 "https://github.com/ahupp/python-magic")
9799 "File type identification using libmagic")
9801 "This module uses ctypes to access the libmagic file type
9802 identification library. It makes use of the local magic database and
9803 supports both textual and MIME-type output. Note that this module and
9804 the python-file module both provide a \"magic.py\" file; these two
9805 modules, which are different and were developed separately, both serve
9806 the same purpose: to provide Python bindings for libmagic.")
9807 (license license:expat)))
9809 (define-public python2-magic
9810 (package-with-python2 python-magic))
9812 (define-public python2-s3cmd
9814 (name "python2-s3cmd")
9819 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9820 "s3cmd-" version ".tar.gz"))
9823 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9824 (build-system python-build-system)
9826 ;; s3cmd is written for python2 only and contains no tests.
9827 `(#:python ,python-2
9830 `(("python2-dateutil" ,python2-dateutil)
9831 ;; The python-file package also provides a magic.py module.
9832 ;; This is an unfortunate state of affairs; however, s3cmd
9833 ;; fails to install if it cannot find specifically the
9834 ;; python-magic package. Thus we include it, instead of using
9835 ;; python-file. Ironically, s3cmd sometimes works better
9836 ;; without libmagic bindings at all:
9837 ;; https://github.com/s3tools/s3cmd/issues/198
9838 ("python2-magic" ,python2-magic)))
9839 (home-page "http://s3tools.org/s3cmd")
9840 (synopsis "Command line tool for S3-compatible storage services")
9842 "S3cmd is a command line tool for uploading, retrieving and managing data
9843 in storage services that are compatible with the Amazon Simple Storage
9844 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9845 GnuPG encryption, and more. It also supports management of Amazon's
9846 CloudFront content delivery network.")
9847 (license license:gpl2+)))
9849 (define-public python-pkgconfig
9851 (name "python-pkgconfig")
9856 (uri (pypi-uri "pkgconfig" version))
9859 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9860 (build-system python-build-system)
9862 `(("python-nose" ,python-nose)))
9864 `(("pkg-config" ,pkg-config)))
9867 (modify-phases %standard-phases
9868 (add-before 'build 'patch
9869 ;; Hard-code the path to pkg-config.
9871 (substitute* "pkgconfig/pkgconfig.py"
9872 (("cmd = 'pkg-config")
9873 (string-append "cmd = '" (which "pkg-config"))))
9877 (invoke "nosetests" "test.py"))))))
9878 (home-page "https://github.com/matze/pkgconfig")
9879 (synopsis "Python interface for pkg-config")
9880 (description "This module provides a Python interface to pkg-config. It
9881 can be used to find all pkg-config packages, check if a package exists,
9882 check if a package meets certain version requirements, query CFLAGS and
9883 LDFLAGS and parse the output to build extensions with setup.py.")
9884 (license license:expat)))
9886 (define-public python2-pkgconfig
9887 (package-with-python2 python-pkgconfig))
9889 (define-public python-bz2file
9891 (name "python-bz2file")
9896 (uri (pypi-uri "bz2file" version))
9899 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9900 (build-system python-build-system)
9902 `(#:tests? #f)) ; Tests use deprecated python modules.
9903 (home-page "https://github.com/nvawda/bz2file")
9904 (synopsis "Read and write bzip2-compressed files")
9906 "Bz2file is a Python library for reading and writing bzip2-compressed
9907 files. It contains a drop-in replacement for the I/O interface in the
9908 standard library's @code{bz2} module, including features from the latest
9909 development version of CPython that are not available in older releases.")
9910 (license license:asl2.0)))
9912 (define-public python2-bz2file
9913 (package-with-python2 python-bz2file))
9915 (define-public python-future
9917 (name "python-future")
9922 (uri (pypi-uri "future" version))
9925 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9926 (build-system python-build-system)
9927 ;; Many tests connect to the network or are otherwise flawed.
9928 ;; https://github.com/PythonCharmers/python-future/issues/210
9931 (home-page "http://python-future.org")
9932 (synopsis "Single-source support for Python 3 and 2")
9934 "@code{python-future} is the missing compatibility layer between Python 2 and
9935 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9936 to support both Python 2 and Python 3 with minimal overhead.")
9937 (license license:expat)))
9939 (define-public python2-future
9940 (package-with-python2 python-future))
9942 (define-public python-cysignals
9944 (name "python-cysignals")
9949 (uri (pypi-uri "cysignals" version))
9952 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9953 (build-system python-build-system)
9955 `(("python-cython" ,python-cython)
9956 ("python-sphinx" ,python-sphinx)))
9958 `(("pari-gp" ,pari-gp)))
9960 `(#:modules ((guix build python-build-system)
9961 ((guix build gnu-build-system) #:prefix gnu:)
9963 ;; FIXME: Tests are executed after installation and currently fail
9964 ;; when not installing into standard locations; the author is working
9968 (modify-phases %standard-phases
9971 (assoc-ref gnu:%standard-phases 'configure)))))
9973 "https://github.com/sagemath/cysignals")
9975 "Handling of interrupts and signals for Cython")
9977 "The cysignals package provides mechanisms to handle interrupts (and
9978 other signals and errors) in Cython code, using two related approaches,
9979 for mixed Cython/Python code or external C libraries and pure Cython code,
9981 (license license:lgpl3+)))
9983 (define-public python2-cysignals
9984 (package-with-python2 python-cysignals))
9986 (define-public python2-shedskin
9988 (name "python2-shedskin")
9993 (uri (string-append "https://github.com/shedskin/shedskin/"
9994 "releases/download/v" version
9995 "/shedskin-" version ".tgz"))
9998 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9999 (build-system python-build-system)
10001 `(#:python ,python-2
10002 #:phases (modify-phases %standard-phases
10003 (add-after 'unpack 'fix-resulting-include-libs
10004 (lambda* (#:key inputs #:allow-other-keys)
10005 (let ((libgc (assoc-ref inputs "libgc"))
10006 (pcre (assoc-ref inputs "pcre")))
10007 (substitute* "shedskin/makefile.py"
10008 (("variable == 'CCFLAGS':[ ]*")
10009 (string-append "variable == 'CCFLAGS':\n"
10010 " line += ' -I " pcre "/include"
10011 " -I " libgc "/include'"))
10012 (("variable == 'LFLAGS':[ ]*")
10013 (string-append "variable == 'LFLAGS':\n"
10014 " line += ' -L" pcre "/lib"
10015 " -L " libgc "/lib'")))
10017 (inputs `(("pcre" ,pcre)
10019 (home-page "https://shedskin.github.io/")
10020 (synopsis "Experimental Python-2 to C++ Compiler")
10021 (description (string-append "This is an experimental compiler for a subset of
10022 Python. It generates C++ code and a Makefile."))
10023 (license (list license:gpl3 license:bsd-3 license:expat))))
10025 (define-public python2-rope
10027 (name "python2-rope")
10032 (uri (pypi-uri "rope" version))
10035 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10037 ;; Rope has only partial python3 support, see `python-rope'
10038 `(#:python ,python-2))
10039 (build-system python-build-system)
10041 `(("python2-unittest2" ,python2-unittest2)))
10042 (home-page "https://github.com/python-rope/rope")
10043 (synopsis "Refactoring library for Python")
10044 (description "Rope is a refactoring library for Python. It facilitates
10045 the renaming, moving and extracting of attributes, functions, modules, fields
10046 and parameters in Python 2 source code. These refactorings can also be applied
10047 to occurrences in strings and comments.")
10048 (license license:gpl2)))
10050 (define-public python-rope
10052 (inherit python2-rope)
10053 (name "python-rope")
10054 (arguments `(#:python ,python-wrapper
10055 ;; XXX: Only partial python3 support, results in some failing
10056 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10058 (properties `((python2-variant . ,(delay python2-rope))))))
10060 (define-public python-py3status
10062 (name "python-py3status")
10067 (uri (pypi-uri "py3status" version))
10069 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10070 (build-system python-build-system)
10075 (modify-phases %standard-phases
10076 ;; 'file' is used for detection of configuration file encoding
10077 ;; let's make link the dependency to particular input
10078 (add-before 'build 'patch-file-path
10079 (lambda* (#:key inputs #:allow-other-keys)
10080 (let ((file-path (assoc-ref inputs "file")))
10081 (substitute* "py3status/parse_config.py"
10082 (("\\['file', '-b'")
10083 (string-append "['" file-path "/bin/file', '-b'")))
10085 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10086 (home-page "https://github.com/ultrabug/py3status")
10087 (synopsis "Extensible i3status wrapper written in Python")
10088 (description "py3status is an i3status wrapper which extends i3status
10089 functionality in a modular way, allowing you to extend your panel with your
10090 own code, responding to click events and updating clock every second.")
10091 (license license:bsd-3)))
10093 (define-public python-tblib
10095 (name "python-tblib")
10099 (uri (pypi-uri "tblib" version))
10101 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10102 (build-system python-build-system)
10105 (modify-phases %standard-phases
10106 (add-before 'check 'adjust-tests
10108 (when (which "python3")
10109 ;; Adjust the example output to match that of Python 3.7:
10110 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10111 (substitute* "README.rst"
10112 (("Exception\\('fail',") "Exception('fail'"))
10116 ;; Upstream runs tests after installation and the package itself
10117 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10119 (setenv "PYTHONPATH"
10120 (string-append (getcwd) "/build/lib:"
10121 (getenv "PYTHONPATH")))
10122 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10124 `(("python-pytest" ,python-pytest)
10125 ("python-six" ,python-six)))
10126 (home-page "https://github.com/ionelmc/python-tblib")
10127 (synopsis "Traceback serialization library")
10129 "Traceback serialization allows you to:
10132 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10133 different processes. This allows better error handling when running code over
10134 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10136 @item Parse traceback strings and raise with the parsed tracebacks.
10138 (license license:bsd-3)))
10140 (define-public python2-tblib
10141 (package-with-python2 python-tblib))
10143 (define-public python-greenlet
10145 (name "python-greenlet")
10149 (uri (pypi-uri "greenlet" version))
10152 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10153 (build-system python-build-system)
10154 (home-page "https://greenlet.readthedocs.io/")
10155 (synopsis "Lightweight in-process concurrent programming")
10157 "Greenlet package is a spin-off of Stackless, a version of CPython
10158 that supports micro-threads called \"tasklets\". Tasklets run
10159 pseudo-concurrently (typically in a single or a few OS-level threads) and
10160 are synchronized with data exchanges on \"channels\".")
10161 (license (list license:psfl license:expat))))
10163 (define-public python2-greenlet
10164 (package-with-python2 python-greenlet))
10166 (define-public python-objgraph
10168 (name "python-objgraph")
10173 (uri (pypi-uri "objgraph" version))
10176 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10177 (build-system python-build-system)
10179 `(("python-graphviz" ,python-graphviz)))
10181 `(("python-mock" ,python-mock)
10182 ("graphviz" ,graphviz)))
10183 (home-page "https://mg.pov.lt/objgraph/")
10184 (synopsis "Draw Python object reference graphs with graphviz")
10186 "This package provides tools to draw Python object reference graphs with
10188 (license license:expat)))
10190 (define-public python-gevent
10192 (name "python-gevent")
10196 (uri (pypi-uri "gevent" version))
10199 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10200 (modules '((guix build utils)))
10203 ;; unbunding libev and c-ares
10204 (delete-file-recursively "deps")
10206 (build-system python-build-system)
10208 `(#:modules ((ice-9 ftw)
10212 (guix build python-build-system))
10213 #:phases (modify-phases %standard-phases
10214 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10216 (substitute* "src/gevent/subprocess.py"
10217 (("/bin/sh") (which "sh")))
10218 (for-each (lambda (file)
10220 (("/bin/sh") (which "sh"))
10221 (("/bin/true") (which "true"))))
10222 (find-files "src/greentest" "\\.py$"))
10224 (add-before 'build 'do-not-use-bundled-sources
10225 (lambda* (#:key inputs #:allow-other-keys)
10226 (setenv "CONFIG_SHELL" (which "bash"))
10227 (setenv "LIBEV_EMBED" "false")
10228 (setenv "CARES_EMBED" "false")
10229 (setenv "EMBED" "false")
10231 ;; Prevent building bundled libev.
10232 (substitute* "setup.py"
10233 (("run_make=_BUILDING")
10236 (let ((greenlet (string-append
10237 (assoc-ref inputs "python-greenlet")
10239 (match (scandir greenlet
10241 (string-prefix? "python" item)))
10243 (setenv "C_INCLUDE_PATH"
10244 (string-append greenlet "/" python)))))
10246 (add-before 'check 'skip-timer-test
10248 ;; XXX: Skip 'TestTimerResolution', which appears to be
10250 (substitute* "src/greentest/test__core_timer.py"
10251 (("not greentest.RUNNING_ON_CI") "False"))
10255 ;; Make sure the build directory is on PYTHONPATH.
10256 (setenv "PYTHONPATH"
10258 (getenv "PYTHONPATH") ":"
10260 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10261 (with-directory-excursion "src/greentest"
10262 ;; XXX: Many tests require network access. Instead we only
10263 ;; run known-good tests. Unfortunately we cannot use
10264 ;; recursion here since this directory also contains
10265 ;; Python-version-specific subfolders.
10266 (apply invoke "python" "testrunner.py" "--config"
10267 "known_failures.py"
10268 (scandir "." (cut regexp-exec
10269 (make-regexp "test_+(subprocess|core)")
10272 `(("python-greenlet" ,python-greenlet)
10273 ("python-objgraph" ,python-objgraph)))
10275 `(("python-six" ,python-six)))
10277 `(("c-ares" ,c-ares)
10279 (home-page "http://www.gevent.org/")
10280 (synopsis "Coroutine-based network library")
10282 "gevent is a coroutine-based Python networking library that uses greenlet
10283 to provide a high-level synchronous API on top of the libev event loop.")
10284 (license license:expat)
10285 (properties `((python2-variant . ,(delay python2-gevent))))))
10287 (define-public python2-gevent
10288 (let ((base (package-with-python2
10289 (strip-python2-variant python-gevent))))
10292 (native-inputs `(,@(package-native-inputs python-gevent)
10293 ("python-mock" ,python2-mock))))))
10295 (define-public python-fastimport
10297 (name "python-fastimport")
10302 (uri (pypi-uri "fastimport" version))
10304 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10305 (build-system python-build-system)
10306 (home-page "https://github.com/jelmer/python-fastimport")
10307 (synopsis "VCS fastimport parser and generator in Python")
10308 (description "This package provides a parser for and generator of the Git
10309 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10311 (license license:gpl2+)))
10313 (define-public python2-fastimport
10314 (package-with-python2 python-fastimport))
10316 (define-public python-twisted
10318 (name "python-twisted")
10322 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10325 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10326 (build-system python-build-system)
10328 '(#:tests? #f)) ; FIXME: some tests fail
10330 `(("python-zope-interface" ,python-zope-interface)
10331 ("python-pyhamcrest" ,python-pyhamcrest)
10332 ("python-incremental" ,python-incremental)
10333 ("python-hyperlink" ,python-hyperlink)
10334 ("python-constantly" ,python-constantly)
10335 ("python-automat" ,python-automat)))
10336 (home-page "https://twistedmatrix.com/")
10337 (synopsis "Asynchronous networking framework written in Python")
10339 "Twisted is an extensible framework for Python programming, with special
10340 focus on event-based network programming and multiprotocol integration.")
10341 (license license:expat)))
10343 (define-public python2-twisted
10344 (package-with-python2 python-twisted))
10346 (define-public python-pika
10348 (name "python-pika")
10353 (uri (pypi-uri "pika" version))
10356 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10357 (build-system python-build-system)
10359 `(("python-pyev" ,python-pyev)
10360 ("python-tornado" ,python-tornado)
10361 ("python-twisted" ,python-twisted)))
10362 (home-page "https://pika.readthedocs.org")
10363 (synopsis "Pure Python AMQP Client Library")
10365 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10366 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10367 network support library.")
10368 (license license:bsd-3)))
10370 (define-public python2-pika
10371 (package-with-python2 python-pika))
10373 (define-public python-ply
10375 (name "python-ply")
10380 (uri (pypi-uri "ply" version))
10383 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10384 (build-system python-build-system)
10385 (home-page "http://www.dabeaz.com/ply/")
10386 (synopsis "Python Lex & Yacc")
10387 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10388 It uses LR parsing and does extensive error checking.")
10389 (license license:bsd-3)))
10391 (define-public python2-ply
10392 (package-with-python2 python-ply))
10394 (define-public python-tabulate
10396 (name "python-tabulate")
10400 (uri (pypi-uri "tabulate" version))
10403 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10404 (build-system python-build-system)
10406 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10407 ;; and the latest release is not tagged in the upstream repository.
10409 (home-page "https://bitbucket.org/astanin/python-tabulate")
10410 (synopsis "Pretty-print tabular data")
10412 "Tabulate is a library and command-line utility to pretty-print tabular
10414 (license license:expat)))
10416 (define-public python2-tabulate
10417 (package-with-python2 python-tabulate))
10419 (define-public python-kazoo
10421 (name "python-kazoo")
10426 (uri (pypi-uri "kazoo" version))
10429 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10430 (build-system python-build-system)
10431 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10433 `(("python-six" ,python-six)))
10434 (home-page "https://kazoo.readthedocs.org")
10435 (synopsis "High-level Zookeeper client library")
10437 "Kazoo is a Python client library for the Apache Zookeeper distributed
10438 application service. It is designed to be easy to use and to avoid common
10439 programming errors.")
10440 (license license:asl2.0)))
10442 (define-public python2-kazoo
10443 (package-with-python2 python-kazoo))
10445 (define-public python-pykafka
10447 (name "python-pykafka")
10451 (uri (pypi-uri "pykafka" version))
10454 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10455 (build-system python-build-system)
10456 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10458 `(("python-gevent" ,python-gevent)
10459 ("python-kazoo" ,python-kazoo)
10460 ("python-tabulate" ,python-tabulate)))
10462 `(("librdkafka" ,librdkafka)))
10463 (home-page "https://pykafka.readthedocs.io/")
10464 (synopsis "Apache Kafka client for Python")
10466 "PyKafka is a client for the Apache Kafka distributed messaging system.
10467 It includes Python implementations of Kafka producers and consumers, which
10468 are optionally backed by a C extension built on librdkafka.")
10469 (license license:asl2.0)))
10471 (define-public python2-pykafka
10472 (package-with-python2 python-pykafka))
10474 (define-public python-wcwidth
10476 (name "python-wcwidth")
10481 (uri (pypi-uri "wcwidth" version))
10484 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10485 (build-system python-build-system)
10486 (home-page "https://github.com/jquast/wcwidth")
10487 (synopsis "Measure number of terminal column cells of wide-character codes")
10488 (description "Wcwidth measures the number of terminal column cells of
10489 wide-character codes. It is useful for those implementing a terminal emulator,
10490 or programs that carefully produce output to be interpreted by one. It is a
10491 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10492 specified in POSIX.1-2001 and POSIX.1-2008.")
10493 (license license:expat)))
10495 (define-public python2-wcwidth
10496 (package-with-python2 python-wcwidth))
10498 (define-public python2-jsonrpclib
10500 (name "python2-jsonrpclib")
10504 (uri (pypi-uri "jsonrpclib" version))
10507 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10508 (build-system python-build-system)
10511 #:python ,python-2))
10512 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10513 (synopsis "Implementation of JSON-RPC specification for Python")
10515 "This library is an implementation of the JSON-RPC specification.
10516 It supports both the original 1.0 specification, as well as the
10517 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10519 (license license:asl2.0)))
10521 (define-public python-chai
10523 (name "python-chai")
10527 (uri (pypi-uri "chai" version))
10530 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10531 (build-system python-build-system)
10532 (home-page "https://github.com/agoragames/chai")
10533 (synopsis "Mocking framework for Python")
10535 "Chai provides an api for mocking, stubbing and spying your python
10536 objects, patterned after the Mocha library for Ruby.")
10537 (license license:bsd-3)))
10539 (define-public python2-chai
10540 (package-with-python2 python-chai))
10542 (define-public python-inflection
10544 (name "python-inflection")
10547 (origin (method url-fetch)
10548 (uri (pypi-uri "inflection" version))
10551 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10552 (build-system python-build-system)
10554 `(("python-pytest" ,python-pytest)))
10555 (home-page "https://github.com/jpvanhal/inflection")
10556 (synopsis "Python string transformation library")
10558 "Inflection is a string transformation library. It singularizes
10559 and pluralizes English words, and transforms strings from CamelCase to
10560 underscored string.")
10561 (license license:expat)))
10563 (define-public python2-inflection
10564 (package-with-python2 python-inflection))
10566 (define-public python-pylev
10568 (name "python-pylev")
10572 (uri (pypi-uri "pylev" version))
10575 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10576 (build-system python-build-system)
10577 (home-page "https://github.com/toastdriven/pylev")
10578 (synopsis "Levenshtein distance implementation in Python")
10579 (description "Pure Python Levenshtein implementation, based off the
10580 Wikipedia code samples at
10581 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10582 (license license:bsd-3)))
10584 (define-public python2-pylev
10585 (package-with-python2 python-pylev))
10587 (define-public python-cleo
10589 (name "python-cleo")
10593 (uri (pypi-uri "cleo" version))
10596 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10597 (build-system python-build-system)
10600 ("python-mock" ,python-mock)
10601 ("python-pytest-mock" ,python-pytest-mock)
10602 ("python-pytest" ,python-pytest)))
10604 `(("python-backpack" ,python-backpack)
10605 ("python-pastel" ,python-pastel)
10606 ("python-pylev" ,python-pylev)))
10607 (home-page "https://github.com/sdispater/cleo")
10608 (synopsis "Command-line arguments library for Python")
10610 "Cleo allows you to create command-line commands with signature in
10611 docstring and colored output.")
10612 (license license:expat)))
10614 (define-public python2-cleo
10615 (package-with-python2 python-cleo))
10617 (define-public python-lazy-object-proxy
10619 (name "python-lazy-object-proxy")
10623 (uri (pypi-uri "lazy-object-proxy" version))
10626 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10627 (build-system python-build-system)
10628 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10629 (synopsis "Lazy object proxy for python")
10631 "Lazy object proxy is an object that wraps a callable but defers the call
10632 until the object is actually required, and caches the result of said call.")
10633 (license license:bsd-2)))
10635 (define-public python2-lazy-object-proxy
10636 (package-with-python2 python-lazy-object-proxy))
10638 (define-public python-dnspython
10640 (name "python-dnspython")
10644 (uri (string-append "http://www.dnspython.org/kits/"
10645 version "/dnspython-" version ".tar.gz"))
10648 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10649 (build-system python-build-system)
10650 (arguments '(#:tests? #f)) ; XXX: requires internet access
10651 (home-page "http://www.dnspython.org")
10652 (synopsis "DNS toolkit for Python")
10654 "dnspython is a DNS toolkit for Python. It supports almost all record
10655 types. It can be used for queries, zone transfers, and dynamic updates.
10656 It supports TSIG authenticated messages and EDNS0.")
10657 (license license:expat)))
10659 (define-public python2-dnspython
10660 (package-with-python2 python-dnspython))
10662 (define-public python-email-validator
10664 (name "python-email-validator")
10667 (origin (method url-fetch)
10668 (uri (pypi-uri "email_validator" version))
10671 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10672 (build-system python-build-system)
10675 (modify-phases %standard-phases
10676 (add-before 'build 'use-dnspython
10678 (substitute* "setup.py"
10679 (("dnspython3") "dnspython"))
10682 `(("python-dnspython" ,python-dnspython)
10683 ("python-idna" ,python-idna)))
10684 (home-page "https://github.com/JoshData/python-email-validator")
10685 (synopsis "Email address validation library for Python")
10687 "This library validates email address syntax and deliverability.")
10688 (license license:cc0)))
10690 (define-public python2-email-validator
10691 (package-with-python2 python-email-validator))
10693 (define-public python-ukpostcodeparser
10695 (name "python-ukpostcodeparser")
10699 (uri (pypi-uri "UkPostcodeParser" version))
10702 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10703 (build-system python-build-system)
10704 (home-page "https://github.com/hamstah/ukpostcodeparser")
10705 (synopsis "UK Postcode parser for Python")
10707 "This library provides the @code{parse_uk_postcode} function for
10708 parsing UK postcodes.")
10709 (license license:expat)))
10711 (define-public python2-ukpostcodeparser
10712 (package-with-python2 python-ukpostcodeparser))
10714 (define-public python-faker
10716 (name "python-faker")
10720 (uri (pypi-uri "Faker" version))
10723 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10725 (search-patches "python-faker-fix-build-32bit.patch"))
10726 (modules '((guix build utils)))
10729 (for-each delete-file (find-files "." "\\.pyc$"))
10731 (build-system python-build-system)
10734 (modify-phases %standard-phases
10736 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10739 ("python-email-validator" ,python-email-validator)
10740 ("python-mock" ,python-mock)
10741 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10743 `(("python-dateutil" ,python-dateutil)
10744 ("python-six" ,python-six)))
10745 (home-page "https://github.com/joke2k/faker")
10746 (synopsis "Python package that generates fake data")
10748 "Faker is a Python package that generates fake data such as names,
10749 addresses, and phone numbers.")
10750 (license license:expat)
10751 (properties `((python2-variant . ,(delay python2-faker))))))
10753 (define-public python2-faker
10754 (let ((base (package-with-python2 (strip-python2-variant
10759 `(("python2-ipaddress" ,python2-ipaddress)
10760 ,@(package-propagated-inputs base))))))
10762 (define-public python-pyaml
10764 (name "python-pyaml")
10765 (version "18.11.0")
10768 (uri (pypi-uri "pyaml" version))
10771 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10772 (build-system python-build-system)
10774 `(("python-unidecode" ,python-unidecode)))
10776 `(("python-pyyaml" ,python-pyyaml)))
10777 (home-page "https://github.com/mk-fg/pretty-yaml")
10778 (synopsis "YAML pretty-print library for Python")
10780 "pyaml is a PyYAML based python module to produce pretty and readable
10781 YAML-serialized data.")
10782 (license license:wtfpl2)))
10784 (define-public python2-pyaml
10785 (package-with-python2 python-pyaml))
10787 (define-public python-backpack
10789 (name "python-backpack")
10794 (uri (pypi-uri "backpack" version))
10797 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10798 (build-system python-build-system)
10800 `(("python-pytest" ,python-pytest)
10801 ("python-nose" ,python-nose)))
10803 `(("python-simplejson" ,python-simplejson)))
10804 (home-page "https://github.com/sdispater/backpack")
10805 (synopsis "Utilities for working with Python collections")
10806 (description "Backpack provides some useful utilities for working with
10807 collections of data.")
10808 (license license:expat)))
10810 (define-public python2-backpack
10811 (package-with-python2 python-backpack))
10813 (define-public python-prompt-toolkit
10815 (name "python-prompt-toolkit")
10820 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10823 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10824 (build-system python-build-system)
10827 (modify-phases %standard-phases
10829 (add-after 'install 'post-install-check
10830 (lambda* (#:key inputs outputs #:allow-other-keys)
10831 ;; HOME is needed for the test
10832 ;; "test_pathcompleter_can_expanduser".
10833 (setenv "HOME" "/tmp")
10834 (add-installed-pythonpath inputs outputs)
10835 (invoke "py.test"))))))
10837 `(("python-wcwidth" ,python-wcwidth)
10838 ("python-six" ,python-six)
10839 ("python-pygments" ,python-pygments)))
10841 `(("python-pytest" ,python-pytest)))
10842 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10843 (synopsis "Library for building command line interfaces in Python")
10845 "Prompt-Toolkit is a library for building interactive command line
10846 interfaces in Python. It's like GNU Readline but it also features syntax
10847 highlighting while typing, out-of-the-box multi-line input editing, advanced
10848 code completion, incremental search, support for Chinese double-width
10849 characters, mouse support, and auto suggestions.")
10850 (license license:bsd-3)))
10852 (define-public python2-prompt-toolkit
10853 (package-with-python2 python-prompt-toolkit))
10855 (define-public python-prompt-toolkit-1
10856 (package (inherit python-prompt-toolkit)
10861 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10864 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10866 (define-public python2-prompt-toolkit-1
10867 (package-with-python2 python-prompt-toolkit-1))
10869 (define-public python-jedi
10871 (name "python-jedi")
10876 (uri (pypi-uri "jedi" version))
10879 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10880 (build-system python-build-system)
10883 (modify-phases %standard-phases
10884 (add-after 'unpack 'disable-file-completion-test
10885 ;; A single parameterized test currently fail (see:
10886 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10888 (substitute* "test/test_api/test_completion.py"
10889 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10893 (setenv "HOME" "/tmp")
10894 (invoke "python" "-m" "pytest"))))))
10896 `(("python-pytest" ,python-pytest)
10897 ("python-docopt" ,python-docopt)))
10899 `(("python-parso" ,python-parso)))
10900 (home-page "https://github.com/davidhalter/jedi")
10901 (synopsis "Autocompletion and static analysis library for Python")
10903 "Jedi is a static analysis tool for Python that can be used in Integrated
10904 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10905 on a deeper level than many other static analysis frameworks for Python.
10907 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10909 (license license:expat)))
10911 (define-public python2-jedi
10912 (package-with-python2 python-jedi))
10914 (define-public ptpython
10920 (uri (pypi-uri "ptpython" version))
10923 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10924 (build-system python-build-system)
10926 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10928 `(("python-docopt" ,python-docopt)
10929 ("python-jedi" ,python-jedi)
10930 ("python-prompt-toolkit" ,python-prompt-toolkit)
10931 ("python-pygments" ,python-pygments)))
10932 (home-page "https://github.com/jonathanslenders/ptpython")
10933 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10935 "ptpython is a Python read-eval-print loop with IDE-like features.
10936 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10937 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10939 (license license:bsd-3)
10940 (properties `((python2-variant . ,(delay ptpython-2))))))
10942 (define-public ptpython-2
10943 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10946 (name "ptpython2"))))
10948 (define-public python-stem
10950 (name "python-stem")
10955 (uri (pypi-uri "stem" version))
10958 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10959 (build-system python-build-system)
10962 (modify-phases %standard-phases
10965 (invoke "./run_tests.py" "--unit")
10968 `(("python-mock" ,python-mock)
10969 ("python-pycodestyle" ,python-pycodestyle)
10970 ("python-pyflakes" ,python-pyflakes)))
10971 (home-page "https://stem.torproject.org/")
10973 "Python controller library that allows applications to interact with Tor")
10975 "Stem is a Python controller library for Tor. With it you can use Tor's
10976 control protocol to script against the Tor process and read descriptor data
10977 relays publish about themselves.")
10978 (license license:lgpl3)))
10980 (define-public python2-stem
10981 (package-with-python2 python-stem))
10983 (define-public python-pyserial
10985 (name "python-pyserial")
10990 (uri (pypi-uri "pyserial" version))
10993 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10994 (build-system python-build-system)
10996 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10998 ;; (modify-phases %standard-phases
11001 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11003 "https://github.com/pyserial/pyserial")
11004 (synopsis "Python Serial Port Bindings")
11005 (description "@code{pyserial} provide serial port bindings for Python. It
11006 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11007 and/or Xon/Xoff. The port is accessed in RAW mode.")
11008 (license license:bsd-3)))
11010 (define-public python2-pyserial
11011 (package-with-python2 python-pyserial))
11013 (define-public python-kivy
11015 (name "python-kivy")
11020 (uri (pypi-uri "Kivy" version))
11021 (file-name (string-append name "-" version ".tar.gz"))
11024 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11025 (build-system python-build-system)
11027 `(#:tests? #f ; Tests require many optional packages
11029 (modify-phases %standard-phases
11030 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11031 (lambda* (#:key inputs #:allow-other-keys)
11032 (setenv "KIVY_SDL2_PATH"
11033 (string-append (assoc-ref inputs "sdl-union")
11038 ("pkg-config" ,pkg-config)
11039 ("python-cython" ,python-cython)))
11041 `(("gstreamer" ,gstreamer)
11044 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11045 (home-page "http://kivy.org")
11047 "Multitouch application framework")
11049 "A software library for rapid development of
11050 hardware-accelerated multitouch applications.")
11051 (license license:expat)))
11053 (define-public python2-kivy
11054 (package-with-python2 python-kivy))
11056 (define-public python-kivy-next
11057 (deprecated-package "python-kivy-next" python-kivy))
11059 (define-public python2-kivy-next
11060 (deprecated-package "python2-kivy-next" python2-kivy))
11062 (define-public python-binaryornot
11064 (name "python-binaryornot")
11068 (uri (pypi-uri "binaryornot" version))
11071 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11072 (build-system python-build-system)
11075 (modify-phases %standard-phases
11076 (add-after 'unpack 'patch-tests
11078 ;; TypeError: binary() got an unexpected keyword argument
11080 (substitute* "tests/test_check.py"
11081 (("average_size=512") ""))
11084 `(("python-chardet" ,python-chardet)
11085 ("python-hypothesis" ,python-hypothesis)))
11086 (home-page "https://github.com/audreyr/binaryornot")
11087 (synopsis "Package to check if a file is binary or text")
11088 (description "Ultra-lightweight pure Python package to check if a file is
11090 (license license:bsd-3)
11091 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11093 (define-public python2-binaryornot
11094 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11095 (package (inherit base)
11097 `(("python2-enum34" ,python2-enum34)
11098 ,@(package-propagated-inputs base))))))
11100 (define-public python-binwalk
11101 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11104 (name "python-binwalk")
11105 (version (git-version "2.1.1" revision commit))
11109 (uri (git-reference
11110 (url "https://github.com/ReFirmLabs/binwalk")
11112 (file-name (git-file-name name version))
11115 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11116 (build-system python-build-system)
11119 (modify-phases %standard-phases
11120 (add-before 'check 'set-pythonpath
11122 (setenv "PYTHONPATH"
11125 ":" (getenv "PYTHONPATH")))
11129 `(("python-coverage" ,python-coverage)
11130 ("python-nose" ,python-nose)))
11131 (home-page "https://github.com/ReFirmLabs/binwalk")
11132 (synopsis "Firmware analysis tool")
11133 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11134 (license license:expat))))
11136 (define-public python-nltk
11138 (name "python-nltk")
11142 (uri (pypi-uri "nltk" version))
11145 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11146 (build-system python-build-system)
11148 '(;; The tests require some extra resources to be downloaded.
11149 ;; TODO Try packaging these resources.
11151 (home-page "http://nltk.org/")
11152 (synopsis "Natural Language Toolkit")
11153 (description "It provides interfaces to over 50 corpora and lexical
11154 resources such as WordNet, along with a suite of text processing libraries
11155 for classification, tokenization, stemming, tagging, parsing, and semantic
11156 reasoning, wrappers for natural language processing libraries.")
11157 (license license:asl2.0)))
11159 (define-public python2-nltk
11160 (package-with-python2 python-nltk))
11162 (define-public python-pymongo
11164 (name "python-pymongo")
11168 (uri (pypi-uri "pymongo" version))
11171 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11172 (build-system python-build-system)
11174 `(("python-certifi" ,python-certifi)))
11175 (home-page "https://github.com/mongodb/mongo-python-driver")
11176 (synopsis "Python driver for MongoDB")
11177 (description "Python driver for MongoDB.")
11178 (license license:asl2.0)))
11180 (define-public python2-pymongo
11181 (package-with-python2 python-pymongo))
11183 (define-public python-consul
11185 (name "python-consul")
11190 (uri (pypi-uri "python-consul" version))
11193 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11194 (build-system python-build-system)
11196 '(#:tests? #f)) ; The tests are not distributed
11198 `(("python-requests" ,python-requests)
11199 ("python-six" ,python-six)))
11200 (home-page "https://github.com/cablehead/python-consul")
11201 (synopsis "Python client for Consul")
11203 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11204 discovery, monitoring and configuration.")
11205 (license license:expat)))
11207 (define-public python2-consul
11208 (package-with-python2 python-consul))
11210 (define-public python-schematics
11212 (name "python-schematics")
11217 (uri (git-reference
11218 (url "https://github.com/schematics/schematics.git")
11219 (commit (string-append "v" version))))
11220 (file-name (git-file-name name version))
11222 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11223 (build-system python-build-system)
11225 `(("python-six" ,python-six)))
11227 ;; The tests require a bunch of not very nice packages with fixed
11228 ;; version requirements (e.g. python-coveralls).
11230 (home-page "https://github.com/schematics/schematics")
11231 (synopsis "Python Data Structures for Humans")
11232 (description "Python Data Structures for Humans.")
11233 (license license:bsd-3)))
11235 (define-public python2-schematics
11236 (package-with-python2 python-schematics))
11238 (define-public python-odfpy
11240 (name "python-odfpy")
11244 (uri (pypi-uri "odfpy" version))
11247 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11249 `(#:modules ((srfi srfi-1)
11250 (guix build python-build-system)
11251 (guix build utils))
11253 (modify-phases %standard-phases
11255 ;; The test runner invokes python2 and python3 for test*.py.
11256 ;; To avoid having both in inputs, we replicate it here.
11258 (for-each (lambda (test-file) (invoke "python" test-file))
11259 (find-files "tests" "^test.*\\.py$"))
11261 (build-system python-build-system)
11262 (home-page "https://github.com/eea/odfpy")
11263 (synopsis "Python API and tools to manipulate OpenDocument files")
11264 (description "Collection of libraries and utility programs written in
11265 Python to manipulate OpenDocument 1.2 files.")
11267 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11268 ;; number of files with other licenses.
11269 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11271 (define-public python2-odfpy
11272 (package-with-python2 python-odfpy))
11274 (define-public python-natsort
11276 (name "python-natsort")
11280 (uri (pypi-uri "natsort" version))
11283 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11284 (build-system python-build-system)
11286 `(#:modules ((guix build utils)
11287 (guix build python-build-system)
11292 (modify-phases %standard-phases
11293 (add-before 'check 'set-cachedir
11294 ;; Tests require write access to $HOME by default
11295 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11298 (let ((cwd (getcwd)))
11299 (setenv "PYTHONPATH"
11302 (find (cut string-prefix? "lib" <>)
11303 (scandir (string-append cwd "/build")))
11305 (getenv "PYTHONPATH")))
11306 (invoke "pytest" "-v")))))))
11308 `(("python-hypothesis" ,python-hypothesis)
11309 ("python-pytest-cov" ,python-pytest-cov)
11310 ("python-pytest-mock" ,python-pytest-mock)
11311 ("python-pytest" ,python-pytest)))
11312 (propagated-inputs ; TODO: Add python-fastnumbers.
11313 `(("python-pyicu" ,python-pyicu)))
11314 (home-page "https://github.com/SethMMorton/natsort")
11315 (synopsis "Natural sorting for python and shell")
11317 "Natsort lets you apply natural sorting on lists instead of
11318 lexicographical. If you use the built-in @code{sorted} method in python
11319 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11320 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11321 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11322 identifies numbers and sorts them separately from strings. It can also sort
11323 version numbers, real numbers, mixed types and more, and comes with a shell
11324 command @command{natsort} that exposes this functionality in the command line.")
11325 (license license:expat)
11326 (properties `((python2-variant . ,(delay python2-natsort))))))
11328 (define-public python2-natsort
11329 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11330 (package (inherit base)
11332 `(("python2-pathlib" ,python2-pathlib)
11333 ,@(package-native-inputs base))))))
11335 (define-public python-glances
11337 (name "python-glances")
11342 (uri (pypi-uri "Glances" version))
11345 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11346 (modules '((guix build utils)))
11349 ;; Glances phones PyPI for weekly update checks by default.
11350 ;; Disable these. The user can re-enable them if desired.
11351 (substitute* "glances/outdated.py"
11352 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11353 (string-append indentation
11354 "self.args.disable_check_update = True\n"
11357 (build-system python-build-system)
11359 `(("python-future" ,python-future)
11360 ("python-psutil" ,python-psutil)))
11362 "https://github.com/nicolargo/glances")
11363 (synopsis "Cross-platform curses-based monitoring tool")
11365 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11366 Glances uses the PsUtil library to get information from your system. It
11367 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11368 (license license:lgpl3+)))
11370 (define-public python2-glances
11371 (package-with-python2 python-glances))
11373 (define-public python-graphql-core
11375 (name "python-graphql-core")
11380 (uri (pypi-uri "graphql-core" version))
11383 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11384 (build-system python-build-system)
11386 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11388 (modify-phases %standard-phases
11389 (add-after 'unpack 'patch-hardcoded-version
11390 (lambda _ (substitute*
11392 (("'gevent==1.1rc1'") "'gevent'"))
11395 `(("python-gevent" ,python-gevent)
11396 ("python-mock" ,python-mock)
11397 ("python-pytest-mock" ,python-pytest-mock)))
11399 `(("python-promise" ,python-promise)
11400 ("python-six" ,python-six)))
11401 (home-page "https://github.com/graphql-python/graphql-core")
11402 (synopsis "GraphQL implementation for Python")
11404 "GraphQL implementation for Python. GraphQL is a data query language and
11405 runtime designed and used to request and deliver data to mobile and web apps.
11406 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11408 (license license:expat)))
11410 (define-public python2-graphql-core
11411 (package-with-python2 python-graphql-core))
11413 (define-public python-graphql-relay
11415 (name "python-graphql-relay")
11420 (uri (pypi-uri "graphql-relay" version))
11423 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11424 (build-system python-build-system)
11426 '(#:tests? #f)) ; The tests are not distributed
11428 `(("python-graphql-core" ,python-graphql-core)
11429 ("python-promise" ,python-promise)
11430 ("python-six" ,python-six)))
11431 (home-page "https://github.com/graphql-python/graphql-relay-py")
11432 (synopsis "Relay implementation for Python")
11434 "This is a library to allow the easy creation of Relay-compliant servers
11435 using the GraphQL Python reference implementation of a GraphQL server. It
11436 should be noted that the code is a exact port of the original
11437 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11439 (license license:expat)))
11441 (define-public python2-graphql-relay
11442 (package-with-python2 python-graphql-relay))
11444 (define-public python-graphene
11446 (name "python-graphene")
11451 (uri (pypi-uri "graphene" version))
11454 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11455 (build-system python-build-system)
11457 `(("python-graphql-core" ,python-graphql-core)
11458 ("python-graphql-relay" ,python-graphql-relay)
11459 ("python-iso8601" ,python-iso8601)
11460 ("python-promise" ,python-promise)
11461 ("python-six" ,python-six)))
11463 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11464 (home-page "http://graphene-python.org/")
11465 (synopsis "GraphQL Framework for Python")
11467 "Graphene is a Python library for building GraphQL schemas/types.
11468 A GraphQL schema describes your data model, and provides a GraphQL server
11469 with an associated set of resolve methods that know how to fetch data.")
11470 (properties `((python2-variant . ,(delay python2-graphene))))
11471 (license license:expat)))
11473 (define-public python2-graphene
11474 (let ((base (package-with-python2
11475 (strip-python2-variant python-graphene))))
11476 (package (inherit base)
11478 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11479 ,@(package-native-inputs base))))))
11481 (define-public python-nautilus
11483 (name "python-nautilus")
11488 (uri (pypi-uri "nautilus" version))
11491 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11492 (build-system python-build-system)
11493 (arguments `(#:tests? #f)) ; fails to import test modules
11495 `(("python-bcrypt" ,python-bcrypt)
11496 ("python-click" ,python-click)
11497 ("python-consul" ,python-consul)
11498 ("python-graphene" ,python-graphene)
11499 ("python-jinja2" ,python-jinja2)
11500 ("python-peewee" ,python-peewee)
11501 ("python-pika" ,python-pika)
11502 ("python-tornado" ,python-tornado)
11503 ("python-wtforms" ,python-wtforms)))
11505 `(("python-nose2" ,python-nose2)))
11506 (home-page "https://github.com/AlecAivazis/nautilus")
11507 (synopsis "Library for creating microservice applications")
11509 "Nautilus is a framework for flux based microservices that looks to
11510 provide extendible implementations of common aspects of a cloud so that you can
11511 focus on building massively scalable web applications.")
11512 (license license:expat)))
11514 (define-public python-snowballstemmer
11516 (name "python-snowballstemmer")
11520 (uri (pypi-uri "snowballstemmer" version))
11523 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11524 (build-system python-build-system)
11526 `(;; No tests exist
11528 (home-page "https://github.com/shibukawa/snowball_py")
11529 (synopsis "Snowball stemming library collection for Python")
11530 (description "This package provides 16 word stemmer algorithms generated
11531 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11533 (license license:bsd-3)))
11535 (define-public python2-snowballstemmer
11536 (package-with-python2 python-snowballstemmer))
11538 (define-public python-setproctitle
11540 (name "python-setproctitle")
11545 (uri (pypi-uri "setproctitle" version))
11548 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11549 (build-system python-build-system)
11552 (modify-phases %standard-phases
11553 (add-before 'check 'patch-Makefile
11554 ;; Stricly this is only required for the python2 variant.
11555 ;; But adding a phase in an inherited package seems to be
11556 ;; cumbersum. So we patch even for python3.
11558 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11560 (substitute* "Makefile"
11561 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11562 (string-append nose "/bin/nosetests "))))
11566 (setenv "PYTHON" (or (which "python3") (which "python")))
11567 (setenv "PYCONFIG" (or (which "python3-config")
11568 (which "python-config")))
11569 (setenv "CC" "gcc")
11570 ;; No need to extend PYTHONPATH to find the built package, since
11571 ;; the Makefile will build anyway
11572 (invoke "make" "check"))))))
11574 `(("procps" ,procps))) ; required for tests
11576 "https://github.com/dvarrazzo/py-setproctitle")
11578 "Setproctitle implementation for Python to customize the process title")
11579 (description "The library allows a process to change its title (as displayed
11580 by system tools such as ps and top).
11582 Changing the title is mostly useful in multi-process systems, for
11583 example when a master process is forked: changing the children's title
11584 allows to identify the task each process is busy with. The technique
11585 is used by PostgreSQL and the OpenSSH Server for example.")
11586 (license license:bsd-3)
11587 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11589 (define-public python2-setproctitle
11590 (let ((base (package-with-python2
11591 (strip-python2-variant python-setproctitle))))
11594 (native-inputs `(("python2-nose" ,python2-nose)
11595 ,@(package-native-inputs base))))))
11597 (define-public python-validictory
11599 (name "python-validictory")
11604 (uri (pypi-uri "validictory" version))
11607 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11608 (build-system python-build-system)
11611 (modify-phases %standard-phases
11612 (add-after 'unpack 'bootstrap
11613 ;; Move the tests out of the package directory to avoid
11616 (rename-file "validictory/tests" "tests")
11617 (delete-file "tests/__init__.py")))
11620 ;; Extend PYTHONPATH so the built package will be found.
11621 (setenv "PYTHONPATH"
11622 (string-append (getcwd) "/build/lib:"
11623 (getenv "PYTHONPATH")))
11624 (invoke "py.test" "-vv" ))))))
11626 `(("python-pytest" ,python-pytest)))
11628 "https://github.com/jamesturk/validictory")
11629 (synopsis "General purpose Python data validator")
11630 (description "It allows validation of arbitrary Python data structures.
11632 The schema format is based on the JSON Schema
11633 proposal (http://json-schema.org), so combined with json the library is also
11634 useful as a validator for JSON data.")
11635 (license license:expat)))
11637 (define-public python2-validictory
11638 (package-with-python2 python-validictory))
11640 (define-public python-pyelftools
11642 (name "python-pyelftools")
11647 (uri (pypi-uri "pyelftools" version))
11650 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11651 (build-system python-build-system)
11654 (modify-phases %standard-phases
11655 (add-before 'check 'set-pythonpath
11657 (setenv "PYTHONPATH"
11660 ":" (getenv "PYTHONPATH")))
11663 "https://github.com/eliben/pyelftools")
11665 "Analyze binary and library file information")
11666 (description "This Python library provides interfaces for parsing and
11667 analyzing two binary and library file formats; the Executable and Linking
11668 Format (ELF), and debugging information in the Debugging With Attributed
11669 Record Format (DWARF).")
11670 (license license:public-domain)))
11672 (define-public python-pyev
11674 (name "python-pyev")
11679 (uri (pypi-uri "pyev" version))
11682 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11683 (build-system python-build-system)
11685 `(#:tests? #f ; no test suite
11687 (modify-phases %standard-phases
11688 (add-after 'unpack 'patch
11689 (lambda* (#:key inputs #:allow-other-keys)
11690 (let ((libev (string-append (assoc-ref inputs "libev")
11691 "/lib/libev.so.4")))
11692 (substitute* "setup.py"
11693 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11694 (string-append "libev_dll_name = \"" libev "\"")))))))))
11696 `(("libev" ,libev)))
11697 (home-page "http://pythonhosted.org/pyev/")
11698 (synopsis "Python libev interface")
11699 (description "Pyev provides a Python interface to libev.")
11700 (license license:gpl3)))
11702 (define-public python2-pyev
11703 (package-with-python2 python-pyev))
11705 (define-public python-imagesize
11707 (name "python-imagesize")
11712 (uri (pypi-uri "imagesize" version))
11715 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11716 (build-system python-build-system)
11717 (home-page "https://github.com/shibukawa/imagesize_py")
11718 (synopsis "Gets image size of files in various formats in Python")
11720 "This package allows determination of image size from
11721 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11722 (license license:expat)))
11724 (define-public python2-imagesize
11725 (package-with-python2 python-imagesize))
11727 (define-public python-termstyle
11729 (name "python-termstyle")
11734 (uri (pypi-uri "termstyle" version))
11737 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11738 (build-system python-build-system)
11741 (modify-phases %standard-phases
11744 (invoke "python" "test3.py"))))))
11745 (home-page "https://github.com/gfxmonk/termstyle")
11746 (synopsis "Console text coloring for Python")
11747 (description "This package provides console text coloring for Python.")
11748 (license license:bsd-3)))
11750 (define-public python-argcomplete
11752 (name "python-argcomplete")
11757 (uri (pypi-uri "argcomplete" version))
11760 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11761 (build-system python-build-system)
11763 `(("python-pexpect" ,python-pexpect)
11765 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11766 (home-page "https://github.com/kislyuk/argcomplete")
11767 (synopsis "Shell tab completion for Python argparse")
11768 (description "argcomplete provides extensible command line tab completion
11769 of arguments and options for Python scripts using @code{argparse}. It's
11770 particularly useful for programs with many options or sub-parsers that can
11771 dynamically suggest completions; for example, when browsing resources over the
11773 (license license:asl2.0)))
11775 (define-public python2-argcomplete
11776 (package-with-python2 python-argcomplete))
11778 (define-public python-xopen
11780 (name "python-xopen")
11785 (uri (pypi-uri "xopen" version))
11788 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11789 (build-system python-build-system)
11791 `(("python-setuptools-scm" ,python-setuptools-scm)))
11792 (home-page "https://github.com/marcelm/xopen/")
11793 (synopsis "Open compressed files transparently")
11794 (description "This module provides an @code{xopen} function that works like
11795 Python's built-in @code{open} function, but can also deal with compressed files.
11796 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11797 recognized by their file extensions. The focus is on being as efficient as
11798 possible on all supported Python versions.")
11799 (license license:expat)))
11801 (define-public python2-xopen
11802 (let ((base (package-with-python2
11803 (strip-python2-variant python-xopen))))
11806 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11807 ,@(package-propagated-inputs base))))))
11809 (define-public python-cheetah
11811 (name "python-cheetah")
11816 (uri (pypi-uri "Cheetah3" version))
11819 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11820 (build-system python-build-system)
11822 `(#:modules ((guix build utils)
11823 (guix build python-build-system)
11827 #:phases (modify-phases %standard-phases
11828 (add-after 'unpack 'use-absolute-python
11830 (substitute* "Cheetah/CheetahWrapper.py"
11831 (("#!/usr/bin/env python")
11832 (string-append "#!" (which "python"))))
11836 (let ((cwd (getcwd)))
11837 (setenv "PYTHONPATH"
11840 (find (cut string-prefix? "lib" <>)
11841 (scandir (string-append cwd "/build")))
11842 ":" (getenv "PYTHONPATH")))
11844 (string-append (getenv "PATH")
11846 (setenv "TMPDIR" "/tmp")
11848 (substitute* "Cheetah/Tests/Test.py"
11849 (("unittest.TextTestRunner\\(\\)")
11850 "unittest.TextTestRunner(verbosity=2)"))
11852 (invoke "python" "Cheetah/Tests/Test.py")))))))
11854 `(("python-markdown" ,python-markdown))) ;optional
11855 (home-page "http://cheetahtemplate.org/")
11856 (synopsis "Template engine")
11857 (description "Cheetah is a text-based template engine and Python code
11860 Cheetah can be used as a standalone templating utility or referenced as
11861 a library from other Python applications. It has many potential uses,
11862 but web developers looking for a viable alternative to ASP, JSP, PHP and
11863 PSP are expected to be its principle user group.
11867 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11869 @item Cleanly separates content, graphic design, and program code.
11870 @item Blends the power and flexibility of Python with a simple template language
11871 that non-programmers can understand.
11872 @item Gives template writers full access to any Python data structure, module,
11873 function, object, or method in their templates.
11874 @item Makes code reuse easy by providing an object-orientated interface to
11875 templates that is accessible from Python code or other Cheetah templates.
11876 One template can subclass another and selectively reimplement sections of it.
11877 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11878 improve the performance of a dynamic website.
11879 @item Compiles templates into optimized, yet readable, Python code.
11881 (license (license:x11-style "file://LICENSE"))))
11883 (define-public python2-cheetah
11884 (package-with-python2 python-cheetah))
11886 (define-public python-dulwich
11888 (name "python-dulwich")
11893 (uri (list (string-append "https://www.dulwich.io/releases/"
11894 "dulwich-" version ".tar.gz")
11895 (pypi-uri "dulwich" version)))
11898 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11899 (build-system python-build-system)
11902 (modify-phases %standard-phases
11903 (add-before 'check 'fix-tests
11904 (lambda* (#:key inputs #:allow-other-keys)
11905 ;; The tests use Popen with a custom environment which doesn't
11907 (substitute* "dulwich/tests/compat/utils.py"
11908 (("'git'") (string-append "'"
11911 (substitute* '("dulwich/tests/test_repository.py"
11912 "dulwich/tests/test_hooks.py")
11913 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11914 (setenv "TEST_RUNNER" "unittest")
11915 (setenv "PYTHONHASHSEED" "random")
11918 `(("python-fastimport" ,python-fastimport)))
11920 `(("python-mock" ,python-mock)
11921 ("python-geventhttpclient" ,python-geventhttpclient)
11923 (home-page "https://www.dulwich.io/")
11924 (synopsis "Git implementation in Python")
11925 (description "Dulwich is an implementation of the Git file formats and
11926 protocols written in pure Python.")
11927 ;; Can be used with either license.
11928 (license (list license:asl2.0 license:gpl2+))))
11930 (define-public python2-dulwich
11931 (package-with-python2 python-dulwich))
11933 (define-public python-pbkdf2
11935 (name "python-pbkdf2")
11940 (uri (pypi-uri "pbkdf2" version))
11943 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11944 (build-system python-build-system)
11947 (modify-phases %standard-phases
11950 (setenv "PYTHONPATH"
11951 (string-append (getcwd) "/build/lib:"
11952 (getenv "PYTHONPATH")))
11953 (invoke "python" "test/test_pbkdf2.py"))))))
11955 `(("python-pycrypto" ,python-pycrypto))) ; optional
11956 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11957 (synopsis "Password-based key derivation")
11958 (description "This module implements the password-based key derivation
11959 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11961 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11962 is part of the RSA Public Key Cryptography Standards series. The provided
11963 implementation takes a password or a passphrase and a salt value (and
11964 optionally a iteration count, a digest module, and a MAC module) and provides
11965 a file-like object from which an arbitrarly-sized key can be read.")
11966 (license license:expat)))
11968 (define-public python2-pbkdf2
11969 (package-with-python2 python-pbkdf2))
11971 (define-public python-qrcode
11973 (name "python-qrcode")
11978 (uri (pypi-uri "qrcode" version))
11980 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11981 (build-system python-build-system)
11983 ;; FIXME: Tests require packaging 'pymaging'.
11986 `(("python-lxml" ,python-lxml) ; for SVG output
11987 ("python-pillow" ,python-pillow) ; for PNG output
11988 ("python-six" ,python-six)))
11989 (home-page "https://github.com/lincolnloop/python-qrcode")
11990 (synopsis "QR Code image generator")
11991 (description "This package provides a pure Python QR Code generator
11992 module. It uses the Python Imaging Library (PIL) to allow for the generation
11995 In addition this package provides a command line tool to generate QR codes and
11996 either write these QR codes to a file or do the output as ascii art at the
11998 (license license:bsd-3)))
12000 (define-public python2-qrcode
12001 (package-with-python2 python-qrcode))
12003 (define-public python-rst2ansi
12005 (name "python-rst2ansi")
12010 (uri (pypi-uri "rst2ansi" version))
12013 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12014 (build-system python-build-system)
12016 `(("python-docutils" ,python-docutils)))
12017 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12018 (synopsis "Convert RST to ANSI-decorated console output")
12020 "Python module dedicated to rendering RST (reStructuredText) documents
12021 to ansi-escaped strings suitable for display in a terminal.")
12022 (license license:expat)))
12024 (define-public python-ansi2html
12026 (name "python-ansi2html")
12031 (uri (pypi-uri "ansi2html" version))
12034 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12035 (build-system python-build-system)
12037 `(("python-mock" ,python-mock)
12038 ("python-nose" ,python-nose)))
12040 `(("python-six" ,python-six)))
12041 (home-page "https://github.com/ralphbean/ansi2html")
12042 (synopsis "Convert ANSI-decorated console output to HTML")
12044 "@command{ansi2html} is a Python library and command line utility for
12045 convering text with ANSI color codes to HTML or LaTeX.")
12046 (license license:gpl3+)))
12048 (define-public python2-ansi2html
12049 (package-with-python2 python-ansi2html))
12051 (define-public python-ddt
12053 (name "python-ddt")
12058 (uri (pypi-uri "ddt" version))
12061 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12062 (build-system python-build-system)
12064 `(("python-mock" ,python-mock)
12065 ("python-nose" ,python-nose)))
12067 `(("python-six" ,python-six)
12068 ("python-pyyaml" ,python-pyyaml)))
12069 (home-page "https://github.com/txels/ddt")
12070 (synopsis "Data-Driven Tests")
12072 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12073 running it with different test data, and make it appear as multiple test
12075 (license license:expat)))
12077 (define-public python2-ddt
12078 (package-with-python2 python-ddt))
12080 (define-public python-pycountry
12082 (name "python-pycountry")
12083 (version "18.5.26")
12087 (uri (pypi-uri "pycountry" version))
12090 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12091 (build-system python-build-system)
12092 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12093 (synopsis "ISO databases for languages, countries, currencies, etc.")
12095 "@code{pycountry} provides the ISO databases for the standards:
12097 @item 639-3 (Languages)
12098 @item 3166 (Countries)
12099 @item 3166-3 (Deleted Countries)
12100 @item 3166-2 (Subdivisions of countries)
12101 @item 4217 (Currencies)
12102 @item 15924 (Scripts)
12104 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12105 through a Python API.")
12106 (license license:lgpl2.1+)))
12108 (define-public python2-pycountry
12109 (package-with-python2 python-pycountry))
12111 (define-public python-pycosat
12113 (name "python-pycosat")
12118 (uri (pypi-uri "pycosat" version))
12121 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12122 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12123 (build-system python-build-system)
12124 (home-page "https://github.com/ContinuumIO/pycosat")
12125 (synopsis "Bindings to picosat (a SAT solver)")
12127 "This package provides efficient Python bindings to @code{picosat} on
12128 the C level. When importing pycosat, the @code{picosat} solver becomes part
12129 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12130 Problem} (SAT) solver.")
12131 (license license:expat)))
12133 (define-public python2-pycosat
12134 (package-with-python2 python-pycosat))
12136 (define-public python2-ruamel.ordereddict
12138 (name "python2-ruamel.ordereddict")
12143 (uri (pypi-uri "ruamel.ordereddict" version))
12146 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12147 (build-system python-build-system)
12149 `(#:python ,python-2
12151 (modify-phases %standard-phases
12153 (add-after 'install 'check
12154 (lambda* (#:key inputs outputs #:allow-other-keys)
12155 (add-installed-pythonpath inputs outputs)
12156 (invoke "python" "test/testordereddict.py"))))))
12157 (home-page "https://bitbucket.org/ruamel/ordereddict")
12158 (synopsis "Version of dict that keeps keys in insertion order")
12160 "This is an implementation of an ordered dictionary with @dfn{Key
12161 Insertion Order} (KIO: updates of values do not affect the position of the
12162 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12163 removed and put at the back). The standard library module @code{OrderedDict},
12164 implemented later, implements a subset of @code{ordereddict} functionality.
12165 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12166 Order} (KSO, no sorting function can be specified, but a transform can be
12167 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12168 (license license:expat)))
12170 (define-public python-pypeg2
12172 (name "python-pypeg2")
12177 (uri (pypi-uri "pyPEG2" version))
12180 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12181 (build-system python-build-system)
12182 (propagated-inputs `(("python-lxml" ,python-lxml)))
12184 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12186 (home-page "https://fdik.org/pyPEG/")
12187 (synopsis "Parsering Expression Grammars in Python")
12188 (description "PyPEG is an intrinsic parser interpreter framework for
12189 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12190 parse many formal languages.")
12191 (license license:gpl2)))
12193 (define-public python-incremental
12195 (name "python-incremental")
12200 (uri (pypi-uri "incremental" version))
12203 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12204 (build-system python-build-system)
12205 (home-page "https://github.com/hawkowl/incremental")
12206 (synopsis "Library for versioning Python projects")
12207 (description "Incremental is a small library that versions your Python
12209 (license license:expat)))
12211 (define-public python2-incremental
12212 (package-with-python2 python-incremental))
12214 (define-public python-invoke
12216 (name "python-invoke")
12217 (home-page "http://www.pyinvoke.org/")
12221 (uri (pypi-uri "invoke" version))
12224 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12225 (build-system python-build-system)
12227 ;; XXX: Requires many dependencies that are not yet in Guix.
12229 (synopsis "Pythonic task execution")
12231 "Invoke is a Python task execution tool and library, drawing inspiration
12232 from various sources to arrive at a powerful and clean feature set. It is
12233 evolved from the Fabric project, but focuses on local and abstract concerns
12234 instead of servers and network commands.")
12235 (license license:bsd-3)))
12237 (define-public python2-invoke
12238 (package-with-python2 python-invoke))
12240 (define-public python-automat
12242 (name "python-automat")
12246 (uri (pypi-uri "Automat" version))
12249 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12250 (build-system python-build-system)
12251 ;; We disable the tests because they require python-twisted, while
12252 ;; python-twisted depends on python-automat. Twisted is optional, but the
12253 ;; tests fail if it is not available. Also see
12254 ;; <https://github.com/glyph/automat/issues/71>.
12255 (arguments '(#:tests? #f))
12257 `(("python-m2r" ,python-m2r)
12258 ("python-setuptools-scm" ,python-setuptools-scm)
12259 ("python-graphviz" ,python-graphviz)))
12261 `(("python-six" ,python-six)
12262 ("python-attrs" ,python-attrs)))
12263 (home-page "https://github.com/glyph/Automat")
12264 (synopsis "Self-service finite-state machines")
12265 (description "Automat is a library for concise, idiomatic Python
12266 expression of finite-state automata (particularly deterministic finite-state
12268 (license license:expat)))
12270 (define-public python2-automat
12271 (package-with-python2 python-automat))
12273 (define-public python-m2r
12275 (name "python-m2r")
12279 (uri (pypi-uri "m2r" version))
12282 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12283 (build-system python-build-system)
12285 `(("python-docutils" ,python-docutils)
12286 ("python-mistune" ,python-mistune)))
12288 `(("python-pygments" ,python-pygments)
12289 ("python-mock" ,python-mock)))
12290 (home-page "https://github.com/miyakogi/m2r")
12291 (synopsis "Markdown to reStructuredText converter")
12292 (description "M2R converts a markdown file including reST markups to valid
12294 (license license:expat)))
12296 (define-public python2-m2r
12297 (package-with-python2 python-m2r))
12299 (define-public python-constantly
12301 (name "python-constantly")
12305 (uri (pypi-uri "constantly" version))
12308 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12309 (build-system python-build-system)
12310 (home-page "https://github.com/twisted/constantly")
12311 (synopsis "Symbolic constants in Python")
12312 (description "Constantly is a Python library that provides symbolic
12313 constant support. It includes collections and constants with text, numeric,
12314 and bit flag values.")
12315 (license license:expat)))
12317 (define-public python2-constantly
12318 (package-with-python2 python-constantly))
12320 (define-public python-attrs
12322 (name "python-attrs")
12326 (uri (pypi-uri "attrs" version))
12329 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12330 (build-system python-build-system)
12332 `(#:modules ((guix build utils)
12333 (guix build python-build-system)
12337 #:phases (modify-phases %standard-phases
12340 (let ((cwd (getcwd)))
12341 (setenv "PYTHONPATH"
12344 (find (cut string-prefix? "lib" <>)
12345 (scandir (string-append cwd "/build")))
12347 (getenv "PYTHONPATH")))
12348 (invoke "python" "-m" "pytest")))))))
12350 `(("python-coverage" ,python-coverage)
12351 ("python-hypothesis" ,python-hypothesis)
12352 ("python-pympler" ,python-pympler)
12353 ("python-pytest" ,python-pytest)
12354 ("python-six" ,python-six)
12355 ("python-sphinx" ,python-sphinx)
12356 ("python-zope-interface" ,python-zope-interface)))
12357 (home-page "https://github.com/python-attrs/attrs/")
12358 (synopsis "Attributes without boilerplate")
12359 (description "@code{attrs} is a Python package with class decorators that
12360 ease the chores of implementing the most common attribute-related object
12362 (license license:expat)))
12364 (define-public python2-attrs
12365 (package-with-python2 python-attrs))
12367 (define-public python-attrs-bootstrap
12369 (inherit python-attrs)
12370 (name "python-attrs-bootstrap")
12371 (native-inputs `())
12372 (arguments `(#:tests? #f))))
12374 (define-public python2-attrs-bootstrap
12375 (package-with-python2 python-attrs-bootstrap))
12377 (define-public python2-cliapp
12379 (name "python2-cliapp")
12380 (version "1.20180812.1")
12384 (uri (string-append
12385 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12386 version ".tar.gz"))
12389 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12390 (build-system python-build-system)
12392 `(#:python ,python-2
12394 (modify-phases %standard-phases
12395 ;; check phase needs to be run before the build phase. If not,
12396 ;; coverage-test-runner looks for tests for the built source files,
12399 (add-before 'build 'check
12401 ;; Disable python3 tests
12402 (substitute* "check"
12403 (("python3") "# python3"))
12404 (invoke "./check"))))))
12406 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12407 ("python2-pep8" ,python2-pep8)))
12409 `(("python2-pyaml" ,python2-pyaml)))
12410 (home-page "https://liw.fi/cliapp/")
12411 (synopsis "Python framework for command line programs")
12412 (description "@code{python2-cliapp} is a python framework for
12413 command line programs. It contains the typical stuff such programs
12414 need to do, such as parsing the command line for options, and
12415 iterating over input files.")
12416 (license license:gpl2+)))
12418 (define-public python2-ttystatus
12420 (name "python2-ttystatus")
12425 (uri (string-append
12426 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12427 version ".tar.gz"))
12430 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12431 (build-system python-build-system)
12433 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12434 ("python2-pep8" ,python2-pep8)))
12436 `(#:python ,python-2
12438 (modify-phases %standard-phases
12439 ;; check phase needs to be run before the build phase. If not,
12440 ;; coverage-test-runner looks for tests for the built source files,
12443 (add-before 'build 'check
12444 (lambda _ (invoke "make" "check"))))))
12445 (home-page "https://liw.fi/ttystatus/")
12446 (synopsis "Python library for showing progress reporting and
12447 status updates on terminals")
12448 (description "@code{python2-ttystatus} is a python library for
12449 showing progress reporting and status updates on terminals, for
12450 command line programs. Output is automatically adapted to the width
12451 of the terminal: truncated if it does not fit, and resized if the
12452 terminal size changes.")
12453 (license license:gpl3+)))
12455 (define-public python2-tracing
12457 (name "python2-tracing")
12462 (uri (string-append
12463 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12464 version ".tar.gz"))
12467 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12468 (build-system python-build-system)
12470 `(#:python ,python-2))
12471 (home-page "https://liw.fi/tracing/")
12472 (synopsis "Python debug logging helper")
12473 (description "@code{python2-tracing} is a python library for
12474 logging debug messages. It provides a way to turn debugging messages
12475 on and off, based on the filename they occur in. It is much faster
12476 than using @code{logging.Filter} to accomplish the same thing, which
12477 matters when code is run in production mode. The actual logging still
12478 happens using the @code{logging} library.")
12479 (license license:gpl3+)))
12481 (define-public python2-larch
12483 (name "python2-larch")
12484 (version "1.20151025")
12488 (uri (string-append
12489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12490 version ".tar.gz"))
12491 (patches (search-patches
12492 "python2-larch-coverage-4.0a6-compatibility.patch"))
12495 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12496 (build-system python-build-system)
12498 `(#:python ,python-2
12500 (modify-phases %standard-phases
12501 ;; check phase needs to be run before the build phase. If not,
12502 ;; coverage-test-runner looks for tests for the built source files,
12505 (add-before 'build 'check
12506 (lambda _ (invoke "make" "check"))))))
12508 `(("cmdtest" ,cmdtest)
12509 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12511 `(("python2-tracing" ,python2-tracing)))
12512 (home-page "https://liw.fi/larch/")
12513 (synopsis "Python copy-on-write B-tree library")
12514 (description "@code{python2-larch} is an implementation of
12515 particular kind of B-tree, based on research by Ohad Rodeh. See
12516 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12517 on the data structure.
12519 The distinctive feature of this B-tree is that a node is never
12520 (conceptually) modified. Instead, all updates are done by
12521 copy-on-write. This makes it easy to clone a tree, and modify only the
12522 clone, while other processes access the original tree.")
12523 (license license:gpl3+)))
12525 (define-public python-astroid
12527 (name "python-astroid")
12532 (uri (pypi-uri "astroid" version))
12535 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12536 (build-system python-build-system)
12538 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12539 ("python-six" ,python-six)
12540 ("python-wrapt" ,python-wrapt)))
12542 `(("python-dateutil" ,python-dateutil)
12543 ("python-nose" ,python-nose)
12544 ("python-pytest" ,python-pytest)
12545 ("python-pytest-runner" ,python-pytest-runner)))
12548 (modify-phases %standard-phases
12549 (add-after 'unpack 'remove-spurious-test
12551 ;; This can be removed after upgrading from python-3.7
12552 ;; https://github.com/PyCQA/astroid/issues/593
12553 ;; https://bugs.python.org/issue34056
12554 (delete-file "astroid/tests/unittest_modutils.py")
12558 (invoke "pytest" "astroid"))))))
12559 (home-page "https://github.com/PyCQA/astroid")
12560 (synopsis "Common base representation of python source code for pylint and
12562 (description "@code{python-astroid} provides a common base representation
12563 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12565 It provides a compatible representation which comes from the _ast module. It
12566 rebuilds the tree generated by the builtin _ast module by recursively walking
12567 down the AST and building an extended ast. The new node classes have
12568 additional methods and attributes for different usages. They include some
12569 support for static inference and local name scopes. Furthermore, astroid
12570 builds partial trees by inspecting living objects.")
12571 (license license:lgpl2.1+)
12572 (properties `((python2-variant . ,(delay python2-astroid))))))
12574 (define-public python2-astroid
12575 (let ((base (package-with-python2
12576 (strip-python2-variant python-astroid))))
12577 (package (inherit base)
12578 ;; Version 2.x removes python2 support.
12583 (uri (pypi-uri "astroid" version))
12586 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12588 (substitute-keyword-arguments (package-arguments base)
12590 `(modify-phases ,phases
12591 (add-after 'unpack 'remove-spurious-test
12593 ;; https://github.com/PyCQA/astroid/issues/276
12594 (delete-file "astroid/tests/unittest_brain.py")
12598 (invoke"python" "-m" "unittest" "discover"
12599 "-p" "unittest*.py")))))))
12600 (native-inputs `())
12602 `(("python2-backports-functools-lru-cache"
12603 ,python2-backports-functools-lru-cache)
12604 ("python2-enum34" ,python2-enum34)
12605 ("python2-singledispatch" ,python2-singledispatch)
12606 ,@(package-propagated-inputs base))))))
12608 (define-public python-isort
12610 (name "python-isort")
12615 (uri (git-reference
12616 ;; Tests pass only from the Github sources
12617 (url "https://github.com/timothycrosley/isort")
12619 (file-name (git-file-name name version))
12622 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12623 (build-system python-build-system)
12625 `(("python-mock" ,python-mock)
12626 ("python-pytest" ,python-pytest)))
12627 (home-page "https://github.com/timothycrosley/isort")
12628 (synopsis "Python utility/library to sort python imports")
12629 (description "@code{python-isort} is a python utility/library to sort
12630 imports alphabetically, and automatically separated into sections. It
12631 provides a command line utility, a python library and plugins for various
12633 (license license:expat)
12634 (properties `((python2-variant . ,(delay python2-isort))))))
12636 (define-public python2-isort
12637 (let ((base (package-with-python2
12638 (strip-python2-variant python-isort))))
12639 (package (inherit base)
12641 `(("python2-futures" ,python2-futures)
12642 ,@(package-native-inputs base))))))
12644 (define-public python2-backports-functools-lru-cache
12646 (name "python2-backports-functools-lru-cache")
12651 ;; only the pypi tarballs contain the necessary metadata
12652 (uri (pypi-uri "backports.functools_lru_cache" version))
12655 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12656 (build-system python-build-system)
12658 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12660 `(#:python ,python-2))
12661 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12662 (synopsis "Backport of functools.lru_cache from Python 3.3")
12663 (description "@code{python2-backports-functools-lru-cache} is a backport
12664 of @code{functools.lru_cache} from python 3.3.")
12665 (license license:expat)))
12667 (define-public python-configparser
12669 (name "python-configparser")
12674 (uri (pypi-uri "configparser" version))
12677 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12678 (build-system python-build-system)
12679 (home-page "https://github.com/jaraco/configparser/")
12680 (synopsis "Backport of configparser from python 3.5")
12681 (description "@code{python-configparser} is a backport of
12682 @code{configparser} from Python 3.5 so that it can be used directly
12683 in other versions.")
12684 (license license:expat)))
12686 (define-public python2-configparser
12687 (package-with-python2 python-configparser))
12689 (define-public python-mando
12691 (name "python-mando")
12695 (uri (pypi-uri "mando" version))
12698 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12699 (build-system python-build-system)
12701 `(("python-rst2ansi" ,python-rst2ansi)
12702 ("python-six" ,python-six)))
12704 `(("python-pytest" ,python-pytest)))
12705 (home-page "https://mando.readthedocs.org/")
12707 "Wrapper around argparse, allowing creation of complete CLI applications")
12709 "This package is a wrapper around argparse, allowing you to write complete CLI
12710 applications in seconds while maintaining all the flexibility.")
12711 (license license:expat)))
12713 (define-public python2-mando
12714 (package-with-python2 python-mando))
12716 (define-public python2-argparse
12718 (name "python2-argparse")
12723 (uri (pypi-uri "argparse" version))
12726 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12727 (build-system python-build-system)
12729 `(#:python ,python-2))
12730 (home-page "https://github.com/ThomasWaldmann/argparse/")
12731 (synopsis "Python command-line parsing library")
12733 "This package is mostly for people who want to have @code{argparse} on
12734 older Pythons because it was not part of the standard library back then.")
12735 (license license:psfl)))
12737 (define-public python-fudge
12739 (name "python-fudge")
12740 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12741 ;; package, which is currently the only use of this package.
12746 (uri (pypi-uri "fudge" version))
12749 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12750 (build-system python-build-system)
12752 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12753 (home-page "https://github.com/fudge-py/fudge")
12754 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12756 "Fudge is a Python module for using fake objects (mocks and stubs) to
12759 In readable Python code, you declare the methods available on your fake object
12760 and how they should be called. Then you inject that into your application and
12761 start testing. This declarative approach means you don’t have to record and
12762 playback actions and you don’t have to inspect your fakes after running code.
12763 If the fake object was used incorrectly then you’ll see an informative
12764 exception message with a traceback that points to the culprit.")
12765 (license license:expat)))
12767 (define-public python2-fudge
12768 (package-with-python2 python-fudge))
12770 (define-public python-mwclient
12772 (name "python-mwclient")
12777 ;; The PyPI version wouldn't contain tests.
12778 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12779 "v" version ".tar.gz"))
12780 (file-name (string-append name "-" version ".tar.gz"))
12783 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12784 (build-system python-build-system)
12786 `(("python-requests" ,python-requests)
12787 ("python-requests-oauthlib"
12788 ,python-requests-oauthlib)
12789 ("python-six" ,python-six)))
12791 `(("python-mock" ,python-mock)
12792 ("python-pytest" ,python-pytest)
12793 ("python-pytest-pep8" ,python-pytest-pep8)
12794 ("python-pytest-cache" ,python-pytest-cache)
12795 ("python-pytest-cov" ,python-pytest-cov)
12796 ("python-responses" ,python-responses)))
12797 (home-page "https://github.com/btongminh/mwclient")
12798 (synopsis "MediaWiki API client")
12799 (description "This package provides a MediaWiki API client.")
12800 (license license:expat)))
12802 (define-public python2-mwclient
12803 (package-with-python2 python-mwclient))
12805 (define-public python-utils
12807 (name "python-utils")
12811 (uri (pypi-uri "python-utils" version))
12814 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12815 (build-system python-build-system)
12817 `(("pytest-runner" ,python-pytest-runner)
12818 ("pytest" ,python-pytest)
12819 ("six" ,python-six)))
12820 (home-page "https://github.com/WoLpH/python-utils")
12821 (synopsis "Convenient utilities not included with the standard Python install")
12823 "Python Utils is a collection of small Python functions and classes which
12824 make common patterns shorter and easier.")
12825 (license license:bsd-2)))
12827 (define-public python2-utils
12828 (package-with-python2 python-utils))
12830 (define-public python-diff-match-patch
12832 (name "python-diff-match-patch")
12833 (version "20121119")
12837 (uri (pypi-uri "diff-match-patch" version))
12840 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12841 (build-system python-build-system)
12842 (home-page "https://code.google.com/p/google-diff-match-patch")
12843 (synopsis "Synchronize plain text")
12844 (description "Diff Match and Patch libraries offer robust algorithms to
12845 perform the operations required for synchronizing plain text.")
12846 (license license:asl2.0)))
12848 (define-public python2-diff-match-patch
12849 (package-with-python2 python-diff-match-patch))
12851 (define-public python-dirsync
12853 (name "python-dirsync")
12858 (uri (pypi-uri "dirsync" version))
12861 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12862 (build-system python-build-system)
12864 `(("six" ,python-six)))
12865 (home-page "https://bitbucket.org/tkhyn/dirsync")
12866 (synopsis "Advanced directory tree synchronisation tool")
12867 (description "Advanced directory tree synchronisation tool.")
12868 (license license:expat)))
12870 (define-public python2-dirsync
12871 (package-with-python2 python-dirsync))
12873 (define-public python-levenshtein
12875 (name "python-levenshtein")
12880 (uri (pypi-uri "python-Levenshtein" version))
12883 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12884 (build-system python-build-system)
12885 (home-page "https://github.com/ztane/python-Levenshtein")
12886 (synopsis "Fast computation of Levenshtein distance and string similarity")
12888 "The Levenshtein Python C extension module contains functions for fast computation of
12890 @item Levenshtein (edit) distance, and edit operations
12891 @item string similarity
12892 @item approximate median strings, and generally string averaging
12893 @item string sequence and set similarity
12895 It supports both normal and Unicode strings.")
12896 (license license:gpl2+)))
12898 (define-public python2-levenshtein
12899 (package-with-python2 python-levenshtein))
12901 (define-public python-scandir
12903 (name "python-scandir")
12908 (uri (pypi-uri "scandir" version))
12910 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12911 (build-system python-build-system)
12913 `(#:phases (modify-phases %standard-phases
12916 (invoke "python" "test/run_tests.py"))))))
12917 (home-page "https://github.com/benhoyt/scandir")
12918 (synopsis "Directory iteration function")
12920 "Directory iteration function like os.listdir(), except that instead of
12921 returning a list of bare filenames, it yields DirEntry objects that include
12922 file type and stat information along with the name. Using scandir() increases
12923 the speed of os.walk() by 2-20 times (depending on the platform and file
12924 system) by avoiding unnecessary calls to os.stat() in most cases.
12926 This package is part of the Python standard library since version 3.5.")
12927 (license license:bsd-3)))
12929 (define-public python2-scandir
12930 (package-with-python2 python-scandir))
12932 (define-public python2-stemming
12934 (name "python2-stemming")
12939 (uri (pypi-uri "stemming" version))
12941 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12942 (build-system python-build-system)
12944 `(#:python ,python-2))
12945 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12946 (synopsis "Python implementations of various stemming algorithms")
12948 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12949 stemming algorithms for English. These implementations are straightforward and
12950 efficient, unlike some Python versions of the same algorithms available on the
12951 Web. This package is an extraction of the stemming code included in the Whoosh
12953 (license license:public-domain)))
12955 (define-public python-factory-boy
12957 (name "python-factory-boy")
12962 (uri (pypi-uri "factory_boy" version))
12964 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12965 (build-system python-build-system)
12967 ;; Tests are not included in the tarball.
12970 `(("faker" ,python-faker)))
12971 (home-page "https://github.com/benhoyt/scandir")
12972 (synopsis "Versatile test fixtures replacement")
12974 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12976 As a fixtures replacement tool, it aims to replace static, hard to maintain
12977 fixtures with easy-to-use factories for complex object.
12979 Instead of building an exhaustive test setup with every possible combination
12980 of corner cases, factory_boy allows you to use objects customized for the
12981 current test, while only declaring the test-specific fields")
12982 (license license:expat)))
12984 (define-public python2-factory-boy
12985 (package-with-python2 python-factory-boy))
12987 (define-public python-translate-toolkit
12989 (name "python-translate-toolkit")
12994 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12996 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12997 (build-system python-build-system)
12999 `(("python-pytest" ,python-pytest)
13000 ("python-sphinx" ,python-sphinx)))
13002 `(("python-babel" ,python-babel)
13003 ("python-beautifulsoup4" ,python-beautifulsoup4)
13004 ("python-chardet" ,python-chardet)
13005 ("python-diff-match-patch" ,python-diff-match-patch)
13006 ("python-levenshtein" ,python-levenshtein)
13007 ("python-lxml" ,python-lxml)
13008 ("python-six" ,python-six)
13009 ("python-vobject" ,python-vobject)
13010 ("python-pyyaml" ,python-pyyaml)))
13012 ;; TODO: tests are not run, because they end with
13013 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13015 ;; during test setup.
13017 (home-page "https://toolkit.translatehouse.org")
13018 (synopsis "Tools and API for translation and localization engineering")
13020 "Tools and API for translation and localization engineering. It contains
13021 several utilities, as well as an API for building localization tools.")
13022 (license license:gpl2+)))
13024 (define-public python2-translate-toolkit
13025 (package-with-python2 python-translate-toolkit))
13027 (define-public python-packaging
13029 (name "python-packaging")
13034 (uri (pypi-uri "packaging" version))
13037 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
13038 (build-system python-build-system)
13040 `(#:phases (modify-phases %standard-phases
13042 (lambda _ (invoke "py.test" "-vv"))))))
13044 `(("python-pretend" ,python-pretend)
13045 ("python-pytest" ,python-pytest)))
13047 `(("python-pyparsing" ,python-pyparsing)
13048 ("python-six" ,python-six)))
13049 (home-page "https://github.com/pypa/packaging")
13050 (synopsis "Core utilities for Python packages")
13051 (description "Packaging is a Python module for dealing with Python packages.
13052 It offers an interface for working with package versions, names, and dependency
13054 ;; From 'LICENSE': This software is made available under the terms of
13055 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13056 ;; Contributions to this software is made under the terms of *both* these
13058 (license (list license:asl2.0 license:bsd-2))))
13060 (define-public python2-packaging
13061 (package-with-python2 python-packaging))
13063 (define-public python-relatorio
13065 (name "python-relatorio")
13070 (uri (pypi-uri "relatorio" version))
13073 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13074 (build-system python-build-system)
13076 `(("python-lxml" ,python-lxml)
13077 ("python-genshi" ,python-genshi)))
13079 `(("python-magic" ,python-magic)))
13080 (home-page "https://relatorio.tryton.org/")
13081 (synopsis "Templating library able to output ODT and PDF files")
13082 (description "Relatorio is a templating library which provides a way to
13083 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13084 for more filetypes can be easily added by creating plugins for them.")
13085 (license license:gpl3+)))
13087 (define-public python2-relatorio
13088 (package-with-python2 python-relatorio))
13090 (define-public python-radon
13092 (name "python-radon")
13097 (uri (pypi-uri "radon" version))
13100 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13101 (build-system python-build-system)
13103 `(#:phases (modify-phases %standard-phases
13106 (invoke "python" "radon/tests/run.py"))))))
13108 `(("python-colorama" ,python-colorama)
13109 ("python-flake8-polyfill" ,python-flake8-polyfill)
13110 ("python-mando" ,python-mando)))
13112 `(("python-pytest" ,python-pytest)
13113 ("python-pytest-mock" ,python-pytest-mock)))
13114 (home-page "https://radon.readthedocs.org/")
13115 (synopsis "Code Metrics in Python")
13116 (description "Radon is a Python tool which computes various code metrics.
13117 Supported metrics are:
13119 @item raw metrics: SLOC, comment lines, blank lines, &c.
13120 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13121 @item Halstead metrics (all of them)
13122 @item the Maintainability Index (a Visual Studio metric)
13124 (license license:expat)))
13126 (define-public python2-radon
13127 (package-with-python2 python-radon))
13129 (define-public python-sure
13131 (name "python-sure")
13136 (uri (pypi-uri "sure" version))
13139 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13140 (build-system python-build-system)
13142 `(("python-mock" ,python-mock)
13143 ("python-six" ,python-six)))
13145 `(("python-nose" ,python-nose)))
13146 (home-page "https://github.com/gabrielfalcao/sure")
13147 (synopsis "Automated testing library in python for python")
13149 "Sure is a python library that leverages a DSL for writing assertions.
13150 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13151 (license license:gpl3+)))
13153 (define-public python2-sure
13154 (package-with-python2 python-sure))
13156 (define-public python2-couleur
13157 ;; This package does not seem to support python3 at all, hence,
13158 ;; only the python2 variant definition is provided.
13160 (name "python2-couleur")
13165 (uri (pypi-uri "couleur" version))
13168 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13169 (build-system python-build-system)
13171 `(#:python ,python-2))
13172 (home-page "https://github.com/gabrielfalcao/couleur")
13174 "ANSI terminal tool for python, colored shell and other handy fancy features")
13176 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13177 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13178 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13179 ;; https://github.com/gabrielfalcao/couleur/issues/11
13180 (license license:lgpl3+)))
13182 (define-public python-misaka
13184 (name "python-misaka")
13189 (uri (pypi-uri "misaka" version))
13192 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13193 (build-system python-build-system)
13195 `(;; Line 37 of setup.py calls self.run_command('develop')
13196 ;; in the 'check' phase. This command seems to be trying
13198 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13199 ;; for which it does not have the permission to write.
13202 `(("python-cffi" ,python-cffi)))
13203 (home-page "https://github.com/FSX/misaka")
13204 (synopsis "Python binding for Hoedown")
13206 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13207 library written in C. It features a fast HTML renderer and functionality to make custom
13208 renderers (e.g. man pages or LaTeX).")
13209 (license license:expat)))
13211 (define-public python2-misaka
13212 (package-with-python2 python-misaka))
13214 (define-public python2-steadymark
13215 ;; This is forced into being a python2 only variant
13216 ;; due to its dependence on couleur that has no support
13219 (name "python2-steadymark")
13224 (uri (pypi-uri "steadymark" version))
13227 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13228 (build-system python-build-system)
13230 `(("python-couleur" ,python2-couleur)
13231 ("python-sure" ,python2-sure)
13232 ("python-misaka" ,python2-misaka)))
13234 `(#:python ,python-2
13236 (modify-phases %standard-phases
13237 (add-before 'build 'patch-setup-py
13239 ;; Update requirements from dependency==version
13240 ;; to dependency>=version
13241 (substitute* "setup.py"
13244 (home-page "https://github.com/gabrielfalcao/steadymark")
13245 (synopsis "Markdown-based test runner for python")
13247 "@code{Steadymark} allows documentation to be written in github-flavoured
13248 markdown. The documentation may contain snippets of code surrounded by python
13249 code blocks and @code{Steadymark} will find these snippets and run them, making
13250 sure that there are no old malfunctional examples in the documentation examples.")
13251 (license license:expat)))
13253 (define-public python-jsonpointer
13255 (name "python-jsonpointer")
13260 (uri (pypi-uri "jsonpointer" version))
13263 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13264 (build-system python-build-system)
13265 (home-page "https://github.com/stefankoegl/python-json-pointer")
13266 (synopsis "Identify specific nodes in a JSON document")
13267 (description "@code{jsonpointer} allows you to access specific nodes
13268 by path in a JSON document (see RFC 6901).")
13269 (license license:bsd-3)))
13271 (define-public python2-jsonpointer
13272 (package-with-python2 python-jsonpointer))
13274 (define-public python-jsonpatch
13276 (name "python-jsonpatch")
13281 ;; pypi version lacks tests.js
13282 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13283 "archive/v" version ".tar.gz"))
13284 (file-name (string-append name "-" version ".tar.gz"))
13287 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13288 (build-system python-build-system)
13290 `(("python-jsonpointer" ,python-jsonpointer)))
13291 (home-page "https://github.com/stefankoegl/python-json-patch")
13292 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13293 (description "@code{jsonpatch} is a library and program that allows
13294 applying JSON Patches according to RFC 6902.")
13295 (license license:bsd-3)))
13297 (define-public python2-jsonpatch
13298 (package-with-python2 python-jsonpatch))
13300 (define-public python-jsonpatch-0.4
13301 (package (inherit python-jsonpatch)
13302 (name "python-jsonpatch")
13307 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13308 "archive/v" version ".tar.gz"))
13309 (file-name (string-append name "-" version ".tar.gz"))
13312 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13314 (define-public python2-jsonpatch-0.4
13315 (package-with-python2 python-jsonpatch-0.4))
13317 (define-public python-rfc3986
13319 (name "python-rfc3986")
13323 (uri (pypi-uri "rfc3986" version))
13326 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13327 (build-system python-build-system)
13329 `(#:modules ((guix build utils)
13330 (guix build python-build-system)
13335 (modify-phases %standard-phases
13338 (let ((cwd (getcwd)))
13339 (setenv "PYTHONPATH"
13340 (string-append cwd "/build/"
13341 (find (cut string-prefix? "lib" <>)
13342 (scandir (string-append cwd "/build")))
13344 (getenv "PYTHONPATH")))
13345 (invoke "pytest" "-v")))))))
13347 `(("python-pytest" ,python-pytest)))
13348 (home-page "https://rfc3986.readthedocs.io/")
13349 (synopsis "Parse and validate URI references")
13351 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13352 validation and authority parsing. This module also supports RFC@tie{}6874
13353 which adds support for zone identifiers to IPv6 addresses.")
13354 (license license:asl2.0)))
13356 (define-public python2-rfc3986
13357 (package-with-python2 python-rfc3986))
13359 (define-public python-rfc3987
13361 (name "python-rfc3987")
13366 (uri (pypi-uri "rfc3987" version))
13369 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13370 (build-system python-build-system)
13371 (home-page "https://pypi.python.org/pypi/rfc3987")
13372 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13373 (description "@code{rfc3987} provides routines for parsing and
13374 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13375 (license license:gpl3+)))
13377 (define-public python2-rfc3987
13378 (package-with-python2 python-rfc3987))
13380 (define-public python-validate-email
13382 (name "python-validate-email")
13387 (uri (pypi-uri "validate_email" version))
13390 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13391 (build-system python-build-system)
13392 (home-page "https://github.com/syrusakbary/validate_email")
13393 (synopsis "Verifies if an email address is valid and really exists")
13394 (description "@code{validate_email} can be used to verify if an email
13395 address is valid and really exists.")
13396 (license license:lgpl3+)))
13398 (define-public python2-validate-email
13399 (package-with-python2 python-validate-email))
13401 (define-public python-flex
13403 (name "python-flex")
13408 (uri (pypi-uri "flex" version))
13411 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13412 (build-system python-build-system)
13414 `(("python-click" ,python-click)
13415 ("python-iso8601" ,python-iso8601)
13416 ("python-jsonpointer" ,python-jsonpointer)
13417 ("python-pyyaml" ,python-pyyaml)
13418 ("python-requests" ,python-requests)
13419 ("python-rfc3987" ,python-rfc3987)
13420 ("python-six" ,python-six)
13421 ("python-validate-email" ,python-validate-email)))
13422 (home-page "https://github.com/pipermerriam/flex")
13423 (synopsis "Validates Swagger schemata")
13424 (description "@code{flex} can be used to validate Swagger schemata.")
13425 (license license:bsd-3)))
13427 (define-public python2-flex
13428 (package-with-python2 python-flex))
13430 (define-public python-marshmallow
13432 (name "python-marshmallow")
13433 (version "3.0.0b14")
13437 (uri (pypi-uri "marshmallow" version))
13440 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13441 (build-system python-build-system)
13443 `(("python-dateutil" ,python-dateutil)
13444 ("python-simplejson" ,python-simplejson)))
13446 `(("python-pytest" ,python-pytest)
13447 ("python-pytz" ,python-pytz)))
13448 (home-page "https://github.com/marshmallow-code/marshmallow")
13449 (synopsis "Convert complex datatypes to and from native
13450 Python datatypes.")
13451 (description "@code{marshmallow} provides a library for converting
13452 complex datatypes to and from native Python datatypes.")
13453 (license license:expat)))
13455 (define-public python2-marshmallow
13456 (package-with-python2 python-marshmallow))
13458 (define-public python-apispec
13460 (name "python-apispec")
13465 (uri (pypi-uri "apispec" version))
13468 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13469 (build-system python-build-system)
13471 `(("python-pyyaml" ,python-pyyaml)))
13473 `(("python-pytest" ,python-pytest)
13474 ("python-flask" ,python-flask)
13475 ("python-marshmallow" ,python-marshmallow)
13476 ("python-tornado" ,python-tornado)
13477 ("python-bottle" ,python-bottle)
13478 ("python-mock" ,python-mock)))
13479 (home-page "https://github.com/marshmallow-code/apispec")
13480 (synopsis "Swagger 2.0 API specification generator")
13481 (description "@code{python-apispec} is a pluggable API specification
13482 generator. Currently supports the OpenAPI specification (f.k.a.
13484 (license license:expat)))
13486 (define-public python2-apispec
13487 (package-with-python2 python-apispec))
13489 (define-public python-flasgger
13491 (name "python-flasgger")
13496 (uri (git-reference
13497 (url "https://github.com/rochacbruno/flasgger.git")
13499 (file-name (git-file-name name version))
13501 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13502 (build-system python-build-system)
13505 (modify-phases %standard-phases
13507 (lambda* (#:key inputs outputs #:allow-other-keys)
13508 (substitute* "Makefile"
13509 (("flake8 flasgger --ignore=F403")
13510 "flake8 flasgger --ignore=E731,F403"))
13511 (setenv "PYTHONPATH" (string-append (getcwd)
13513 (getenv "PYTHONPATH")))
13514 (invoke "py.test"))))))
13516 `(("python-flask" ,python-flask)
13517 ("python-pyyaml" ,python-pyyaml)
13518 ("python-jsonschema" ,python-jsonschema)
13519 ("python-mistune" ,python-mistune)
13520 ("python-six" ,python-six)))
13522 `(("python-decorator" ,python-decorator)
13523 ("python-flake8" ,python-flake8)
13524 ("python-flask-restful" ,python-flask-restful)
13525 ("python-flex" ,python-flex)
13526 ("python-pytest" ,python-pytest)
13527 ("python-pytest-cov" ,python-pytest-cov)
13528 ("python-marshmallow" ,python-marshmallow)
13529 ("python-apispec" ,python-apispec)))
13530 (home-page "https://github.com/rochacbruno/flasgger/")
13531 (synopsis "Extract Swagger specs from your Flask project")
13532 (description "@code{python-flasgger} allows extracting Swagger specs
13533 from your Flask project. It is a fork of Flask-Swagger.")
13534 (license license:expat)))
13536 (define-public python2-flasgger
13537 (package-with-python2 python-flasgger))
13539 (define-public python-swagger-spec-validator
13541 (name "python-swagger-spec-validator")
13546 (uri (pypi-uri "swagger-spec-validator" version))
13549 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13550 (build-system python-build-system)
13552 `(("python-jsonschema" ,python-jsonschema)
13553 ("python-pyyaml" ,python-pyyaml)
13554 ("python-six" ,python-six)))
13556 "https://github.com/Yelp/swagger_spec_validator")
13557 (synopsis "Validation of Swagger specifications")
13558 (description "@code{swagger_spec_validator} provides a library for
13559 validating Swagger API specifications.")
13560 (license license:asl2.0)))
13562 (define-public python2-swagger-spec-validator
13563 (package-with-python2 python-swagger-spec-validator))
13565 (define-public python-apache-libcloud
13567 (name "python-apache-libcloud")
13572 (uri (pypi-uri "apache-libcloud" version))
13575 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13576 (build-system python-build-system)
13579 (modify-phases %standard-phases
13580 (add-after 'unpack 'patch-ssh
13581 (lambda* (#:key inputs #:allow-other-keys)
13582 (substitute* "libcloud/compute/ssh.py"
13583 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13586 (add-after 'unpack 'patch-tests
13588 (substitute* "./libcloud/test/test_file_fixtures.py"
13589 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13590 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13591 return (httplib.OK,
13593 {\"test\": \"value\"},
13594 httplib.responses[httplib.OK])
13596 (substitute* "libcloud/test/compute/test_ssh_client.py"
13597 (("class ShellOutSSHClientTests")
13598 "@unittest.skip(\"Guix container doesn't have ssh service\")
13599 class ShellOutSSHClientTests")
13600 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13601 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13602 (("'.xF0', '.x90', '.x8D', '.x88'")
13603 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13605 (add-before 'check 'copy-secret
13607 (copy-file "libcloud/test/secrets.py-dist"
13608 "libcloud/test/secrets.py")
13611 `(("openssh" ,openssh)))
13613 `(("python-paramiko" ,python-paramiko)
13614 ("python-requests" ,python-requests)))
13616 `(("python-lockfile" ,python-lockfile)
13617 ("python-mock" ,python-mock)
13618 ("python-pytest" ,python-pytest)
13619 ("python-pytest-runner" ,python-pytest-runner)
13620 ("python-requests-mock" ,python-requests-mock)))
13621 (home-page "https://libcloud.apache.org/")
13622 (synopsis "Unified Cloud API")
13623 (description "@code{libcloud} is a Python library for interacting with
13624 many of the popular cloud service providers using a unified API.")
13625 (license license:asl2.0)))
13627 (define-public python2-apache-libcloud
13628 (package-with-python2 python-apache-libcloud))
13630 (define-public python-smmap2
13632 (name "python-smmap2")
13637 (uri (pypi-uri "smmap2" version))
13640 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13641 (build-system python-build-system)
13643 `(("python-nosexcover" ,python-nosexcover)))
13644 (home-page "https://github.com/Byron/smmap")
13645 (synopsis "Python sliding window memory map manager")
13646 (description "@code{smmap2} is a pure Python implementation of a sliding
13647 window memory map manager.")
13648 (license license:bsd-3)))
13650 (define-public python2-smmap2
13651 (package-with-python2 python-smmap2))
13653 (define-public python-regex
13655 (name "python-regex")
13656 (version "2019.04.14")
13659 (uri (pypi-uri "regex" version))
13662 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13663 ;; TODO: Fix and enable regex_test.py tests that complain about the
13664 ;; test.support module not existing.
13665 (build-system python-build-system)
13666 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13667 (synopsis "Alternative regular expression module")
13668 (description "This regular expression implementation is backwards-
13669 compatible with the standard @code{re} module, but offers additional
13670 functionality like full case-folding for case-insensitive matches in Unicode.")
13671 (license license:psfl)))
13673 (define-public python2-regex
13674 (package-with-python2 python-regex))
13676 (define-public python2-pyopengl
13678 (name "python2-pyopengl")
13683 (uri (pypi-uri "PyOpenGL" version))
13686 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13688 `(#:python ,python-2))
13689 (build-system python-build-system)
13690 (home-page "http://pyopengl.sourceforge.net")
13691 (synopsis "Standard OpenGL bindings for Python")
13693 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13694 related APIs. The binding is created using the standard @code{ctypes}
13696 (license license:bsd-3)))
13698 (define-public python2-pyopengl-accelerate
13700 (inherit python2-pyopengl)
13701 (name "python2-pyopengl-accelerate")
13706 (uri (pypi-uri "PyOpenGL-accelerate" version))
13709 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13710 (synopsis "Acceleration code for PyOpenGL")
13712 "This is the Cython-coded accelerator module for PyOpenGL.")))
13714 (define-public python-rencode
13716 (name "python-rencode")
13721 (uri (pypi-uri "rencode" version))
13724 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13725 (build-system python-build-system)
13728 (modify-phases %standard-phases
13729 (add-before 'check 'delete-bogus-test
13730 ;; This test requires /home/aresch/Downloads, which is not provided by
13731 ;; the build environment.
13733 (delete-file "rencode/t.py")
13735 (native-inputs `(("pkg-config" ,pkg-config)
13736 ("python-cython" ,python-cython)))
13737 (home-page "https://github.com/aresch/rencode")
13738 (synopsis "Serialization of heterogeneous data structures")
13740 "The @code{rencode} module is a data structure serialization library,
13741 similar to @code{bencode} from the BitTorrent project. For complex,
13742 heterogeneous data structures with many small elements, r-encoding stake up
13743 significantly less space than b-encodings. This version of rencode is a
13744 complete rewrite in Cython to attempt to increase the performance over the
13745 pure Python module.")
13746 (license license:bsd-3)))
13748 (define-public python2-rencode
13749 (package-with-python2 python-rencode))
13751 (define-public python-xenon
13753 (name "python-xenon")
13758 (uri (pypi-uri "xenon" version))
13761 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13762 (build-system python-build-system)
13764 `(("python-pyyaml" ,python-pyyaml)
13765 ("python-radon" ,python-radon)
13766 ("python-requests" ,python-requests)
13767 ("python-flake8" ,python-flake8)
13768 ("python-tox" ,python-tox)))
13771 (modify-phases %standard-phases
13772 (add-before 'build 'patch-test-requirements
13774 ;; Remove httpretty dependency for tests.
13775 (substitute* "setup.py"
13776 (("httpretty") ""))
13778 (home-page "https://xenon.readthedocs.org/")
13779 (synopsis "Monitor code metrics for Python on your CI server")
13781 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13782 Ideally, @code{xenon} is run every time code is committed. Through command
13783 line options, various thresholds can be set for the complexity of code. It
13784 will fail (i.e. it will exit with a non-zero exit code) when any of these
13785 requirements is not met.")
13786 (license license:expat)))
13788 (define-public python2-xenon
13789 (package-with-python2 python-xenon))
13791 (define-public python-pysocks
13793 (name "python-pysocks")
13798 (uri (pypi-uri "PySocks" version))
13801 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13802 (build-system python-build-system)
13803 (arguments `(#:tests? #f))
13804 (home-page "https://github.com/Anorov/PySocks")
13805 (synopsis "SOCKS client module")
13806 (description "@code{pysocks} is an updated and semi-actively maintained
13807 version of @code{SocksiPy} with bug fixes and extra features.")
13808 (license license:bsd-3)))
13810 (define-public python2-pysocks
13811 (package-with-python2 python-pysocks))
13813 (define-public python-pydiff
13815 (name "python-pydiff")
13820 (uri (pypi-uri "pydiff" version))
13823 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13824 (build-system python-build-system)
13825 (home-page "https://github.com/myint/pydiff")
13826 (synopsis "Library to diff two Python files at the bytecode level")
13828 "@code{pydiff} makes it easy to look for actual code changes while
13829 ignoring formatting changes.")
13830 (license license:expat)))
13832 (define-public python2-pydiff
13833 (package-with-python2 python-pydiff))
13835 (define-public python-tqdm
13837 (name "python-tqdm")
13842 (uri (pypi-uri "tqdm" version))
13845 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13846 (build-system python-build-system)
13848 `(("python-flake8" ,python-flake8)
13849 ("python-nose" ,python-nose)
13850 ("python-coverage" ,python-coverage)))
13851 (home-page "https://github.com/tqdm/tqdm")
13852 (synopsis "Fast, extensible progress meter")
13854 "Make loops show a progress bar on the console by just wrapping any
13855 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13856 design and layout.")
13857 (license (list license:mpl2.0 license:expat))
13858 (properties `((python2-variant . ,(delay python2-tqdm))))))
13860 (define-public python2-tqdm
13861 (let ((tqdm (package-with-python2
13862 (strip-python2-variant python-tqdm))))
13863 (package (inherit tqdm)
13864 (native-inputs `(("python2-functools32" ,python2-functools32)
13865 ,@(package-native-inputs tqdm))))))
13867 (define-public python-pkginfo
13869 (name "python-pkginfo")
13874 (uri (pypi-uri "pkginfo" version))
13877 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13878 (build-system python-build-system)
13880 ;; The tests are broken upstream.
13883 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13885 "Query metadatdata from sdists, bdists, and installed packages")
13887 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13888 source distriubtion (an sdist) or a binary distribution (e.g., created by
13889 running bdist_egg). It can also query the EGG-INFO directory of an installed
13890 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13891 created by running @code{python setup.py develop}).")
13892 (license license:expat)))
13894 (define-public python2-pkginfo
13895 (package-with-python2 python-pkginfo))
13897 (define-public python-twine
13899 (name "python-twine")
13904 (uri (pypi-uri "twine" version))
13907 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13908 (build-system python-build-system)
13910 `(("python-tqdm" ,python-tqdm)
13911 ("python-pkginfo" ,python-pkginfo)
13912 ("python-requests" ,python-requests)
13913 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13914 (home-page "https://github.com/pypa/twine")
13915 (synopsis "Collection of utilities for interacting with PyPI")
13917 "@code{twine} currently supports registering projects and uploading
13918 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13919 their files and supports any packaging format (including wheels).")
13920 (license license:asl2.0)))
13922 (define-public python2-twine
13923 (package-with-python2 python-twine))
13925 (define-public python-linecache2
13927 (name "python-linecache2")
13932 (uri (pypi-uri "linecache2" version))
13935 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13936 (build-system python-build-system)
13938 `(;; The tests depend on unittest2, and our version is a bit too old.
13941 `(("python-pbr" ,python-pbr-minimal)))
13943 "https://github.com/testing-cabal/linecache2")
13944 (synopsis "Backports of the linecache module")
13946 "The linecache module allows one to get any line from any file, while
13947 attempting to optimize internally, using a cache, the common case where many
13948 lines are read from a single file.")
13949 (license license:psfl)))
13951 (define-public python2-linecache2
13952 (package-with-python2 python-linecache2))
13954 (define-public python-traceback2
13956 (name "python-traceback2")
13961 (uri (pypi-uri "traceback2" version))
13964 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13965 (build-system python-build-system)
13967 `(;; python-traceback2 and python-unittest2 depend on one another.
13970 `(("python-pbr" ,python-pbr-minimal)))
13972 `(("python-linecache2" ,python-linecache2)))
13974 "https://github.com/testing-cabal/traceback2")
13975 (synopsis "Backports of the traceback module")
13977 "This module provides a standard interface to extract, format and print
13978 stack traces of Python programs. It exactly mimics the behavior of the Python
13979 interpreter when it prints a stack trace.")
13980 (license license:psfl)))
13982 (define-public python2-traceback2
13983 (package-with-python2 python-traceback2))
13985 (define-public python-ratelimiter
13987 (name "python-ratelimiter")
13992 (uri (pypi-uri "ratelimiter" version))
13995 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13996 (build-system python-build-system)
13998 '(#:tests? #f)) ; There are no tests in the pypi archive.
13999 (home-page "https://github.com/RazerM/ratelimiter")
14000 (synopsis "Simple rate limiting object")
14002 "The @code{ratelimiter} module ensures that an operation will not be
14003 executed more than a given number of times during a given period.")
14004 (license license:asl2.0)))
14006 (define-public python2-ratelimiter
14007 (package-with-python2 python-ratelimiter))
14009 (define-public python-dukpy
14011 (name "python-dukpy")
14016 (uri (git-reference
14017 (url "https://github.com/kovidgoyal/dukpy.git")
14018 (commit (string-append "v" version))))
14019 (file-name (git-file-name name version))
14021 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14022 (build-system python-build-system)
14023 (home-page "https://github.com/kovidgoyal/dukpy")
14024 (synopsis "Run JavaScript in python")
14026 "dukpy is a JavaScript runtime environment for Python using the duktape
14027 embeddable JavaScript engine.")
14028 ;; Dukpy is licensed under MIT like the embedded duktape library,
14029 ;; with 'errors.c' as GPL3.
14030 (license (list license:expat license:gpl3))))
14032 (define-public python2-dukpy
14033 (package-with-python2 python-dukpy))
14035 (define-public python-jsonrpclib-pelix
14037 (name "python-jsonrpclib-pelix")
14042 (uri (pypi-uri "jsonrpclib-pelix" version))
14045 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14046 (build-system python-build-system)
14048 `(#:tests? #f)) ; no tests in PyPI tarball
14049 (home-page "https://github.com/tcalmant/jsonrpclib/")
14050 (synopsis "JSON-RPC 2.0 client library for Python")
14052 "This library implements the JSON-RPC v2.0
14053 specification (backwards-compatible) as a client library for Python. This
14054 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14056 (license license:asl2.0)))
14058 (define-public python2-jsonrpclib-pelix
14059 (package-with-python2 python-jsonrpclib-pelix))
14061 (define-public python-setuptools-scm-git-archive
14063 (name "python-setuptools-scm-git-archive")
14068 (uri (pypi-uri "setuptools_scm_git_archive" version))
14071 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14072 (build-system python-build-system)
14074 `(("python-pytest" ,python-pytest)))
14076 `(("python-setuptools-scm" ,python-setuptools-scm)))
14077 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14078 (synopsis "Setuptools_scm plugin for git archives")
14080 "The setuptools_scm_git_archive package is a plugin to
14081 setuptools_scm, which supports obtaining versions from git archives that
14082 belong to tagged versions.")
14083 (license license:expat)))
14085 (define-public python2-setuptools-scm-git-archive
14086 (package-with-python2 python-setuptools-scm-git-archive))
14088 (define-public python-setuptools-git
14090 (name "python-setuptools-git")
14095 (uri (pypi-uri "setuptools-git" version))
14098 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14099 (build-system python-build-system)
14102 (modify-phases %standard-phases
14103 ;; This is needed for tests.
14104 (add-after 'unpack 'configure-git
14106 (setenv "HOME" "/tmp")
14107 (invoke "git" "config" "--global" "user.email" "guix")
14108 (invoke "git" "config" "--global" "user.name" "guix")
14111 `(("git" ,git-minimal)))
14112 (home-page "https://github.com/msabramo/setuptools-git")
14113 (synopsis "Setuptools revision control system plugin for Git")
14115 "This package provides a plugin for Setuptools for revision control with
14117 (license license:bsd-3)))
14119 (define-public python-pyclipper
14121 (name "python-pyclipper")
14122 (version "1.1.0.post1")
14126 (uri (pypi-uri "pyclipper" version ".zip"))
14129 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14130 (modules '((guix build utils)))
14133 ;; This file is generated by Cython.
14134 (delete-file "pyclipper/pyclipper.cpp") #t))))
14135 (build-system python-build-system)
14138 (modify-phases %standard-phases
14139 (add-before 'build 'cythonize-sources
14141 (with-directory-excursion "pyclipper"
14142 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14144 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14146 `(("python-cython" ,python-cython)
14147 ("python-pytest" ,python-pytest)
14148 ("python-pytest-runner" ,python-pytest-runner)
14149 ("python-unittest2" ,python-unittest2)
14151 (home-page "https://github.com/greginvm/pyclipper")
14152 (synopsis "Wrapper for Angus Johnson's Clipper library")
14154 "Pyclipper is a Cython wrapper for the C++ translation of the
14155 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14156 (license license:expat)))
14158 (define-public python2-pyclipper
14159 (package-with-python2 python-pyclipper))
14161 (define-public python2-booleanoperations
14163 (name "python2-booleanoperations")
14168 (uri (pypi-uri "booleanOperations" version ".zip"))
14171 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14172 (build-system python-build-system)
14174 `(#:python ,python-2))
14177 ("python2-pytest" ,python2-pytest)
14178 ("python2-pytest-runner" ,python2-pytest-runner)))
14180 `(("python-fonttools" ,python2-fonttools)
14181 ("python-pyclipper" ,python2-pyclipper)
14182 ("python-ufolib" ,python2-ufolib)))
14183 (home-page "https://github.com/typemytype/booleanOperations")
14184 (synopsis "Boolean operations on paths")
14186 "BooleanOperations provides a Python library that enables
14187 boolean operations on paths.")
14188 (license license:expat)))
14190 (define-public python-tempdir
14192 (name "python-tempdir")
14197 (uri (pypi-uri "tempdir" version))
14200 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14201 (build-system python-build-system)
14202 (home-page "https://pypi.org/project/tempdir/")
14204 ;; the package has no tests
14206 (synopsis "Python library for managing temporary directories")
14208 "This library manages temporary directories that are automatically
14209 deleted with all their contents when they are no longer needed. It is
14210 particularly convenient for use in tests.")
14211 (license license:expat)))
14213 (define-public python2-tempdir
14214 (package-with-python2 python-tempdir))
14216 (define-public python-activepapers
14218 (name "python-activepapers")
14223 (uri (pypi-uri "ActivePapers.Py" version))
14226 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14227 (build-system python-build-system)
14229 `(#:modules ((ice-9 ftw)
14232 (guix build python-build-system))
14235 (modify-phases %standard-phases
14236 (add-after 'unpack 'delete-python2-code
14238 (for-each delete-file
14239 '("lib/activepapers/builtins2.py"
14240 "lib/activepapers/standardlib2.py"
14241 "lib/activepapers/utility2.py"))))
14244 ;; Deactivate the test cases that download files
14245 (setenv "NO_NETWORK_ACCESS" "1")
14246 ;; For some strange reason, some tests fail if nosetests runs all
14247 ;; test modules in a single execution. They pass if each test
14248 ;; module is run individually.
14249 (for-each (lambda (filename)
14250 (invoke "nosetests"
14251 (string-append "tests/" filename)))
14254 (string-suffix? ".py" filename)))))))))
14256 `(("python-tempdir" ,python-tempdir)
14257 ("python-nose" ,python-nose)))
14259 `(("python-h5py" ,python-h5py)))
14260 (home-page "http://www.activepapers.org/")
14261 (synopsis "Executable papers for scientific computing")
14263 "ActivePapers is a tool for working with executable papers, which
14264 combine data, code, and documentation in single-file packages,
14265 suitable for publication as supplementary material or on repositories
14266 such as figshare or Zenodo.")
14267 (properties `((python2-variant . ,(delay python2-activepapers))))
14268 (license license:bsd-3)))
14270 (define-public python2-activepapers
14271 (let ((base (package-with-python2
14272 (strip-python2-variant python-activepapers))))
14276 (substitute-keyword-arguments (package-arguments base)
14278 `(modify-phases ,phases
14279 (delete 'delete-python2-code)
14280 (add-after 'unpack 'delete-python3-code
14282 (for-each delete-file
14283 '("lib/activepapers/builtins3.py"
14284 "lib/activepapers/standardlib3.py"
14285 "lib/activepapers/utility3.py")))))))))))
14287 (define-public python-semver
14289 (name "python-semver")
14294 (uri (pypi-uri "semver" version))
14297 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14298 (build-system python-build-system)
14301 (modify-phases %standard-phases
14302 (add-after 'unpack 'patch-test-requirements
14304 (substitute* "setup.py"
14305 ;; Our Python is new enough.
14306 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14309 `(("python-tox" ,python-tox)
14310 ("python-virtualenv" ,python-virtualenv)))
14311 (home-page "https://github.com/k-bx/python-semver")
14312 (synopsis "Python helper for Semantic Versioning")
14313 (description "This package provides a Python library for
14314 @url{Semantic Versioning, http://semver.org/}.")
14315 (license license:bsd-3)))
14317 (define-public python2-semver
14318 (package-with-python2 python-semver))
14320 (define-public python-pyro4
14322 (name "python-pyro4")
14327 (uri (pypi-uri "Pyro4" version))
14329 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14330 (build-system python-build-system)
14332 `(("python-serpent" ,python-serpent)))
14333 (home-page "https://pyro4.readthedocs.io")
14334 (synopsis "Distributed object middleware for Python")
14336 "Pyro enables you to build applications in which objects can talk to each
14337 other over the network. You can just use normal Python method calls to call
14338 objects on other machines, also known as remote procedure calls (RPC).")
14339 (license license:expat)))
14341 (define-public python2-pyro
14343 (name "python2-pyro")
14348 (uri (pypi-uri "Pyro" version))
14349 (file-name (string-append "Pyro-" version ".tar.gz"))
14352 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14353 (build-system python-build-system)
14355 ;; Pyro is not compatible with Python 3
14356 `(#:python ,python-2
14357 ;; Pyro has no test cases for automatic execution
14359 (home-page "http://pythonhosted.org/Pyro/")
14360 (synopsis "Distributed object manager for Python")
14361 (description "Pyro is a Distributed Object Technology system
14362 written in Python that is designed to be easy to use. It resembles
14363 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14364 which is a system and language independent Distributed Object Technology
14365 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14366 longer maintained. New projects should use Pyro4 instead, which
14367 is the new Pyro version that is actively developed.")
14368 (license license:expat)))
14370 (define-public python2-scientific
14372 (name "python2-scientific")
14377 (uri (string-append "https://bitbucket.org/khinsen/"
14378 "scientificpython/downloads/ScientificPython-"
14379 version ".tar.gz"))
14380 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14383 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14384 (build-system python-build-system)
14386 `(("netcdf" ,netcdf)))
14388 `(("python-numpy" ,python2-numpy-1.8)
14389 ("python-pyro" ,python2-pyro)))
14391 ;; ScientificPython is not compatible with Python 3
14392 `(#:python ,python-2
14393 #:tests? #f ; No test suite
14395 (modify-phases %standard-phases
14397 (lambda* (#:key inputs #:allow-other-keys)
14398 (invoke "python" "setup.py" "build"
14399 (string-append "--netcdf_prefix="
14400 (assoc-ref inputs "netcdf"))))))))
14401 (home-page "https://bitbucket.org/khinsen/scientificpython")
14402 (synopsis "Python modules for scientific computing")
14403 (description "ScientificPython is a collection of Python modules that are
14404 useful for scientific computing. Most modules are rather general (Geometry,
14405 physical units, automatic derivatives, ...) whereas others are more
14406 domain-specific (e.g. netCDF and PDB support). The library is currently
14407 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14408 (license license:cecill-c)))
14410 (define-public python2-mmtk
14412 (name "python2-mmtk")
14417 (uri (string-append "https://bitbucket.org/khinsen/"
14418 "mmtk/downloads/MMTK-" version ".tar.gz"))
14419 (file-name (string-append "MMTK-" version ".tar.gz"))
14422 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14423 (build-system python-build-system)
14425 `(("netcdf" ,netcdf)))
14427 `(("python-scientific" ,python2-scientific)
14428 ("python-tkinter" ,python-2 "tk")))
14430 `(#:python ,python-2
14433 (modify-phases %standard-phases
14434 (add-before 'build 'includes-from-scientific
14435 (lambda* (#:key inputs #:allow-other-keys)
14436 (mkdir-p "Include/Scientific")
14439 (assoc-ref inputs "python-scientific")
14440 "/include/python2.7/Scientific")
14441 "Include/Scientific"))))))
14442 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14443 (synopsis "Python library for molecular simulation")
14444 (description "MMTK is a library for molecular simulations with an emphasis
14445 on biomolecules. It provides widely used methods such as Molecular Dynamics
14446 and normal mode analysis, but also basic routines for implementing new methods
14447 for simulation and analysis. The library is currently not actively maintained
14448 and works only with Python 2 and NumPy < 1.9.")
14449 (license license:cecill-c)))
14451 (define-public python-phonenumbers
14453 (name "python-phonenumbers")
14458 (uri (pypi-uri "phonenumbers" version))
14461 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14462 (build-system python-build-system)
14464 "https://github.com/daviddrysdale/python-phonenumbers")
14466 "Python library for dealing with international phone numbers")
14468 "This package provides a Python port of Google's libphonenumber library.")
14469 (license license:asl2.0)))
14471 (define-public python2-phonenumbers
14472 (package-with-python2 python-phonenumbers))
14474 (define-public python-send2trash
14476 (name "python-send2trash")
14479 (origin (method git-fetch)
14480 ;; Source tarball on PyPI doesn't include tests.
14481 (uri (git-reference
14482 (url "https://github.com/hsoft/send2trash.git")
14484 (file-name (git-file-name name version))
14487 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14488 (build-system python-build-system)
14491 (modify-phases %standard-phases
14492 (add-before 'check 'pre-check
14494 (mkdir-p "/tmp/foo")
14495 (setenv "HOME" "/tmp/foo")
14497 (home-page "https://github.com/hsoft/send2trash")
14498 (synopsis "Send files to the user's @file{~/Trash} directory")
14499 (description "This package provides a Python library to send files to the
14500 user's @file{~/Trash} directory.")
14501 (properties `((python2-variant . ,(delay python2-send2trash))))
14502 (license license:bsd-3)))
14504 (define-public python2-send2trash
14506 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14508 (substitute-keyword-arguments (package-arguments python-send2trash)
14510 `(modify-phases ,phases
14511 (add-before 'check 'setenv
14513 (setenv "PYTHONPATH"
14514 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14517 (define-public python-yapf
14519 (name "python-yapf")
14524 (uri (pypi-uri "yapf" version))
14527 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14528 (build-system python-build-system)
14529 (home-page "https://github.com/google/yapf")
14530 (synopsis "Formatter for Python code")
14531 (description "YAPF is a formatter for Python code. It's based off of
14532 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14533 takes the code and reformats it to the best formatting that conforms to the
14534 style guide, even if the original code didn't violate the style guide.")
14535 (license license:asl2.0)))
14537 (define-public python2-yapf
14538 (package-with-python2 python-yapf))
14540 (define-public python-gyp
14541 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14544 (name "python-gyp")
14545 ;; Google does not release versions,
14546 ;; based on second most recent commit date.
14547 (version (git-version "0.0.0" revision commit))
14550 ;; Google does not release tarballs,
14551 ;; git checkout is needed.
14553 (uri (git-reference
14554 (url "https://chromium.googlesource.com/external/gyp")
14556 (file-name (git-file-name name version))
14559 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14560 (build-system python-build-system)
14561 (home-page "https://gyp.gsrc.io/")
14562 (synopsis "GYP is a Meta-Build system")
14564 "GYP builds build systems for large, cross platform applications.
14565 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14566 files, and Makefiles.")
14567 (license license:bsd-3))))
14569 (define-public python2-gyp
14570 (package-with-python2 python-gyp))
14572 (define-public python-whatever
14574 (name "python-whatever")
14579 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14583 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14584 (file-name (string-append name "-" version ".tar.gz"))))
14585 (build-system python-build-system)
14588 (modify-phases %standard-phases
14591 (invoke "py.test"))))))
14593 `(("python-pytest" ,python-pytest)))
14594 (home-page "http://github.com/Suor/whatever")
14595 (synopsis "Make anonymous functions by partial application of operators")
14596 (description "@code{whatever} provides an easy way to make anonymous
14597 functions by partial application of operators.")
14598 (license license:bsd-3)))
14600 (define-public python2-whatever
14601 (package-with-python2 python-whatever))
14603 (define-public python-funcy
14605 (name "python-funcy")
14610 (uri (git-reference
14611 (url "https://github.com/Suor/funcy.git")
14614 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14615 (file-name (git-file-name name version))))
14616 (build-system python-build-system)
14619 (modify-phases %standard-phases
14622 (invoke "py.test"))))))
14624 `(("python-pytest" ,python-pytest)
14625 ("python-whatever" ,python-whatever)))
14626 (home-page "http://github.com/Suor/funcy")
14627 (synopsis "Functional tools")
14628 (description "@code{funcy} is a library that provides functional tools.
14631 @item merge - Merges collections of the same type
14632 @item walk - Type-preserving map
14633 @item select - Selects a part of a collection
14634 @item take - Takes the first n items of a collection
14635 @item first - Takes the first item of a collection
14636 @item remove - Predicated-removes items of a collection
14637 @item concat - Concatenates two collections
14638 @item flatten - Flattens a collection with subcollections
14639 @item distinct - Returns only distinct items
14640 @item split - Predicated-splits a collection
14641 @item split_at - Splits a collection at a given item
14642 @item group_by - Groups items by group
14643 @item pairwise - Pairs off adjacent items
14644 @item partial - Partially-applies a function
14645 @item curry - Curries a function
14646 @item compose - Composes functions
14647 @item complement - Complements a predicate
14648 @item all_fn - \"all\" with predicate
14650 (license license:bsd-3)))
14652 (define-public python2-funcy
14653 (package-with-python2 python-funcy))
14655 (define-public python-isoweek
14657 (name "python-isoweek")
14662 (uri (pypi-uri "isoweek" version))
14665 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14666 (build-system python-build-system)
14667 (home-page "https://github.com/gisle/isoweek")
14668 (synopsis "Objects representing a week")
14669 (description "The @code{isoweek} module provide the class Week that
14670 implements the week definition of ISO 8601. This standard also defines
14671 a notation for identifying weeks; yyyyWww (where the W is a literal).
14672 Week instances stringify to this form.")
14673 (license license:bsd-3)))
14675 (define-public python2-isoweek
14676 (package-with-python2 python-isoweek))
14678 (define-public python-tokenize-rt
14680 (name "python-tokenize-rt")
14685 (uri (pypi-uri "tokenize-rt" version))
14688 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14689 (build-system python-build-system)
14690 (home-page "https://github.com/asottile/tokenize-rt")
14691 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14693 "This Python library is a wrapper around @code{tokenize} from the Python
14694 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14695 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14696 and @code{tokens_to_src} to roundtrip.")
14697 (license license:expat)))
14699 (define-public python-future-fstrings
14701 (name "python-future-fstrings")
14706 (uri (pypi-uri "future_fstrings" version))
14709 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14710 (build-system python-build-system)
14712 `(("python-tokenize-rt" ,python-tokenize-rt)))
14713 (home-page "https://github.com/asottile/future-fstrings")
14714 (synopsis "Backport of fstrings to Python < 3.6")
14716 "This package provides a UTF-8 compatible encoding
14717 @code{future_fstrings}, which performs source manipulation. It decodes the
14718 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14719 @code{f} strings.")
14720 (license license:expat)))
14722 (define-public python-typed-ast
14724 (name "python-typed-ast")
14729 (uri (pypi-uri "typed-ast" version))
14732 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14733 (build-system python-build-system)
14735 `(#:modules ((guix build utils)
14736 (guix build python-build-system)
14741 (modify-phases %standard-phases
14744 (let ((cwd (getcwd)))
14745 (setenv "PYTHONPATH"
14746 (string-append cwd "/build/"
14747 (find (cut string-prefix? "lib" <>)
14748 (scandir (string-append cwd "/build")))
14750 (getenv "PYTHONPATH"))))
14753 (native-inputs `(("python-pytest" ,python-pytest)))
14754 (home-page "https://github.com/python/typed_ast")
14755 (synopsis "Fork of Python @code{ast} modules with type comment support")
14756 (description "This package provides a parser similar to the standard
14757 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14758 include PEP 484 type comments and are independent of the version of Python
14759 under which they are run. The @code{typed_ast} parsers produce the standard
14760 Python AST (plus type comments), and are both fast and correct, as they are
14761 based on the CPython 2.7 and 3.7 parsers.")
14762 ;; See the file "LICENSE" for the details.
14763 (license (list license:psfl
14765 license:expat)))) ;ast27/Parser/spark.py
14767 (define-public python-typing
14769 (name "python-typing")
14774 (uri (pypi-uri "typing" version))
14777 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14778 (build-system python-build-system)
14779 (home-page "https://docs.python.org/3/library/typing.html")
14780 (synopsis "Type hints for Python")
14781 (description "This is a backport of the standard library @code{typing}
14782 module to Python versions older than 3.5. Typing defines a standard notation
14783 for Python function and variable type annotations. The notation can be used
14784 for documenting code in a concise, standard format, and it has been designed
14785 to also be used by static and runtime type checkers, static analyzers, IDEs
14787 (license license:psfl)))
14789 (define-public python2-typing
14790 (package-with-python2 python-typing))
14792 (define-public python-typing-extensions
14794 (name "python-typing-extensions")
14799 (uri (pypi-uri "typing_extensions" version))
14802 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14803 (build-system python-build-system)
14805 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14806 (synopsis "Experimental type hints for Python")
14808 "The typing_extensions module contains additional @code{typing} hints not
14809 yet present in the of the @code{typing} standard library.
14810 Included are implementations of:
14813 @item ContextManager
14824 @item TYPE_CHECKING
14825 @item AsyncGenerator
14827 (license license:psfl)))
14829 (define-public bpython
14836 (uri (pypi-uri "bpython" version))
14839 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14840 (build-system python-build-system)
14843 (modify-phases %standard-phases
14844 (add-after 'unpack 'remove-failing-test
14846 ;; Remove failing test. FIXME: make it pass
14847 (delete-file "bpython/test/test_args.py")
14849 (add-after 'wrap 'add-aliases
14850 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14851 (lambda* (#:key outputs #:allow-other-keys)
14852 (let ((out (assoc-ref outputs "out")))
14855 (symlink old (string-append out "/bin/" new)))
14856 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14857 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14860 `(("python-pygments" ,python-pygments)
14861 ("python-requests" ,python-requests)
14862 ("python-babel" ,python-babel) ; optional, for internationalization
14863 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14864 ("python-greenlet" ,python-greenlet)
14865 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14866 ("python-six" ,python-six)))
14868 `(("python-sphinx" ,python-sphinx)
14869 ("python-mock" ,python-mock)))
14870 (home-page "https://bpython-interpreter.org/")
14871 (synopsis "Fancy interface to the Python interpreter")
14872 (description "Bpython is a fancy interface to the Python
14873 interpreter. bpython's main features are
14876 @item in-line syntax highlighting,
14877 @item readline-like autocomplete with suggestions displayed as you type,
14878 @item expected parameter list for any Python function,
14879 @item \"rewind\" function to pop the last line of code from memory and
14881 @item send the code you've entered off to a pastebin,
14882 @item save the code you've entered to a file, and
14883 @item auto-indentation.
14885 (license license:expat)))
14887 (define-public bpython2
14888 (let ((base (package-with-python2
14889 (strip-python2-variant bpython))))
14890 (package (inherit base)
14893 `(#:python ,python-2
14895 (modify-phases %standard-phases
14896 (add-after 'unpack 'remove-failing-test
14898 ;; Remove failing test. FIXME: make it pass
14899 (delete-file "bpython/test/test_args.py")
14900 ;; Disable failing test-cases (renaming inhibits they are
14902 (substitute* "bpython/test/test_curtsies_repl.py"
14903 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14904 (string-append a "xxx_off_" b))
14905 (("^(\\s*def )(test_complex\\W)" _ a b)
14906 (string-append a "xxx_off_" b)))
14908 (add-before 'build 'rename-scripts
14909 ;; rename the scripts to bypthon2, bpdb2, etc.
14911 (substitute* "setup.py"
14912 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14913 (string-append name "2" rest "\n"))
14914 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14915 (string-append name "2" (or sub "") rest "\n")))
14918 (define-public python-pyinotify
14920 (name "python-pyinotify")
14924 (uri (pypi-uri "pyinotify" version))
14927 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14928 (build-system python-build-system)
14929 (arguments `(#:tests? #f)) ;no tests
14930 (home-page "https://github.com/seb-m/pyinotify")
14931 (synopsis "Python library for monitoring inotify events")
14933 "@code{pyinotify} provides a Python interface for monitoring
14934 file system events on Linux.")
14935 (license license:expat)))
14937 (define-public python2-pyinotify
14938 (package-with-python2 python-pyinotify))
14940 ;; Ada parser uses this version.
14941 (define-public python2-quex-0.67.3
14943 (name "python2-quex")
14948 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14949 (version-major+minor version)
14950 "/quex-" version ".zip"))
14953 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14954 (build-system python-build-system)
14956 `(("unzip" ,unzip)))
14958 `(#:python ,python-2
14961 (modify-phases %standard-phases
14962 (delete 'configure)
14965 (lambda* (#:key outputs #:allow-other-keys)
14966 (let* ((out (assoc-ref outputs "out"))
14967 (share/quex (string-append out "/share/quex"))
14968 (bin (string-append out "/bin")))
14969 (copy-recursively "." share/quex)
14971 (symlink (string-append share/quex "/quex-exe.py")
14972 (string-append bin "/quex"))
14974 (native-search-paths
14975 (list (search-path-specification
14976 (variable "QUEX_PATH")
14977 (files '("share/quex")))))
14978 (home-page "http://quex.sourceforge.net/")
14979 (synopsis "Lexical analyzer generator in Python")
14980 (description "@code{quex} is a lexical analyzer generator in Python.")
14981 (license license:lgpl2.1+))) ; Non-military
14983 (define-public python2-quex
14984 (package (inherit python2-quex-0.67.3)
14985 (name "python2-quex")
14990 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14993 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14994 (file-name (string-append name "-" version ".tar.gz"))))))
14996 (define-public python-more-itertools
14998 (name "python-more-itertools")
15003 (uri (pypi-uri "more-itertools" version))
15006 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15007 (build-system python-build-system)
15008 (home-page "https://github.com/erikrose/more-itertools")
15009 (synopsis "More routines for operating on iterables, beyond itertools")
15010 (description "Python's built-in @code{itertools} module implements a
15011 number of iterator building blocks inspired by constructs from APL, Haskell,
15012 and SML. @code{more-itertools} includes additional building blocks for
15013 working with iterables.")
15014 (properties `((python2-variant . ,(delay python2-more-itertools))))
15015 (license license:expat)))
15017 ;; The 5.x series are the last versions supporting Python 2.7.
15018 (define-public python2-more-itertools
15020 (inherit python-more-itertools)
15021 (name "python2-more-itertools")
15025 (uri (pypi-uri "more-itertools" version))
15028 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15030 `(#:python ,python2-minimal))
15032 `(("python2-six" ,python2-six-bootstrap)))))
15034 (define-public python-latexcodec
15036 (name "python-latexcodec")
15041 (uri (pypi-uri "latexcodec" version))
15043 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
15044 (build-system python-build-system)
15046 `(("python-six" ,python-six)))
15047 (home-page "https://readthedocs.org/projects/latexcodec/")
15048 (synopsis "Work with LaTeX code in Python")
15049 (description "Lexer and codec to work with LaTeX code in Python.")
15050 (license license:expat)))
15052 (define-public python-pybtex
15054 (name "python-pybtex")
15059 (uri (pypi-uri "pybtex" version))
15061 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15062 (build-system python-build-system)
15064 `(("python-nose" ,python-nose)))
15066 `(("python-latexcodec" ,python-latexcodec)
15067 ("python-pyyaml" ,python-pyyaml)
15068 ("python-six" ,python-six)))
15070 `(#:test-target "nosetests"))
15071 (home-page "https://pybtex.org/")
15072 (synopsis "BibTeX-compatible bibliography processor")
15073 (description "Pybtex is a BibTeX-compatible bibliography processor written
15074 in Python. You can simply type pybtex instead of bibtex.")
15075 (license license:expat)))
15077 (define-public python-onetimepass
15079 (name "python-onetimepass")
15084 (uri (pypi-uri "onetimepass" version))
15086 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15087 (build-system python-build-system)
15088 (propagated-inputs `(("python-six" ,python-six)))
15089 (home-page "https://github.com/tadeck/onetimepass/")
15090 (synopsis "One-time password library")
15091 (description "Python one-time password library for HMAC-based (HOTP) and
15092 time-based (TOTP) passwords.")
15093 (license license:expat)))
15095 (define-public python-parso
15097 (name "python-parso")
15102 (uri (pypi-uri "parso" version))
15105 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15107 `(("python-pytest" ,python-pytest)))
15108 (build-system python-build-system)
15110 `(#:phases (modify-phases %standard-phases
15112 (lambda _ (invoke "pytest" "-vv"))))))
15113 (home-page "https://github.com/davidhalter/parso")
15114 (synopsis "Python Parser")
15115 (description "Parso is a Python parser that supports error recovery and
15116 round-trip parsing for different Python versions (in multiple Python versions).
15117 Parso is also able to list multiple syntax errors in your Python file.")
15118 (license license:expat)))
15120 (define-public python2-parso
15121 (package-with-python2 python-parso))
15123 (define-public python-async-generator
15125 (name "python-async-generator")
15130 (uri (pypi-uri "async_generator" version))
15133 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15134 (build-system python-build-system)
15136 `(("python-pytest" ,python-pytest)))
15137 (home-page "https://github.com/python-trio/async_generator")
15138 (synopsis "Async generators and context managers for Python 3.5+")
15139 (description "@code{async_generator} back-ports Python 3.6's native async
15140 generators and Python 3.7's context managers into Python 3.5.")
15142 (license (list license:expat license:asl2.0))))
15144 (define-public python-async-timeout
15146 (name "python-async-timeout")
15151 (uri (pypi-uri "async-timeout" version))
15154 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15155 (build-system python-build-system)
15156 (home-page "https://github.com/aio-libs/async_timeout/")
15157 (synopsis "Timeout context manager for asyncio programs")
15158 (description "@code{async-timeout} provides a timeout timeout context
15159 manager compatible with @code{asyncio}.")
15160 (license license:asl2.0)))
15162 (define-public python-glob2
15164 (name "python-glob2")
15169 (uri (git-reference
15170 (url "https://github.com/miracle2k/python-glob2.git")
15171 (commit (string-append "v" version))))
15172 (file-name (git-file-name name version))
15174 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15175 (build-system python-build-system)
15176 (home-page "https://github.com/miracle2k/python-glob2/")
15177 (synopsis "Extended Version of the python buildin glob module")
15178 (description "This is an extended version of the Python
15179 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15183 @item The ability to capture the text matched by glob patterns, and return
15184 those matches alongside the file names.
15185 @item A recursive @code{**} globbing syntax, akin for example to the
15186 @code{globstar} option of Bash.
15187 @item The ability to replace the file system functions used, in order to glob
15188 on virtual file systems.
15189 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15192 Glob2 currently based on the glob code from Python 3.3.1.")
15193 (license license:bsd-2)))
15195 (define-public python2-glob2
15196 (package-with-python2 python-glob2))
15198 (define-public python-gipc
15200 (name "python-gipc")
15205 (uri (pypi-uri "gipc" version ".zip"))
15208 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15209 (build-system python-build-system)
15211 `(("unzip" ,unzip)))
15213 `(("python-gevent" ,python-gevent)))
15214 (home-page "http://gehrcke.de/gipc")
15215 (synopsis "Child process management in the context of gevent")
15216 (description "Usage of Python's multiprocessing package in a
15217 gevent-powered application may raise problems. With @code{gipc},
15218 process-based child processes can safely be created anywhere within a
15219 gevent-powered application.")
15220 (license license:expat)))
15222 (define-public python2-gipc
15223 (package-with-python2 python-gipc))
15225 (define-public python-fusepy
15227 (name "python-fusepy")
15232 (uri (pypi-uri "fusepy" version))
15235 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15236 (build-system python-build-system)
15239 (modify-phases %standard-phases
15240 (add-before 'build 'set-library-file-name
15241 (lambda* (#:key inputs #:allow-other-keys)
15242 (let ((fuse (assoc-ref inputs "fuse")))
15243 (substitute* "fuse.py"
15244 (("find_library\\('fuse'\\)")
15245 (string-append "'" fuse "/lib/libfuse.so'")))
15249 (home-page "https://github.com/fusepy/fusepy")
15250 (synopsis "Simple ctypes bindings for FUSE")
15251 (description "Python module that provides a simple interface to FUSE and
15252 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15253 (license license:isc)))
15255 (define-public python2-fusepy
15256 (package-with-python2 python-fusepy))
15258 (define-public python2-gdrivefs
15260 (name "python2-gdrivefs")
15265 (uri (pypi-uri "gdrivefs" version))
15268 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15269 (build-system python-build-system)
15271 `(#:python ,python-2
15273 (modify-phases %standard-phases
15274 (add-before 'build 'patch-setup-py
15276 ;; Update requirements from dependency==version
15277 ;; to dependency>=version
15278 (substitute* "gdrivefs/resources/requirements.txt"
15282 `(("python2-gipc" ,python2-gipc)
15283 ("python2-gevent" ,python2-gevent)
15284 ("python2-greenlet" ,python2-greenlet)
15285 ("python2-httplib2" ,python2-httplib2)
15286 ("python2-uritemplate" ,python2-uritemplate)
15287 ("python2-oauth2client" ,python2-oauth2client)
15288 ("python2-six" ,python2-six)))
15290 `(("python2-dateutil" ,python2-dateutil)
15291 ("python2-fusepy" ,python2-fusepy)
15292 ("python2-google-api-client" ,python2-google-api-client)))
15293 (home-page "https://github.com/dsoprea/GDriveFS")
15294 (synopsis "Mount Google Drive as a local file system")
15295 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15296 under Python 2.7.")
15297 (license license:gpl2)))
15299 (define-public pybind11
15305 (uri (git-reference
15306 (url "https://github.com/pybind/pybind11.git")
15307 (commit (string-append "v" version))))
15310 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15311 (file-name (git-file-name name version))))
15312 (build-system cmake-build-system)
15314 `(("python" ,python)
15315 ("python-pytest" ,python-pytest)))
15317 `(#:test-target "check"))
15318 (home-page "https://github.com/pybind/pybind11/")
15319 (synopsis "Seamless operability between C++11 and Python")
15320 (description "pybind11 is a lightweight header-only library that exposes
15321 C++ types in Python and vice versa, mainly to create Python bindings of
15322 existing C++ code. Its goals and syntax are similar to the excellent
15323 Boost.Python library by David Abrahams: to minimize boilerplate code in
15324 traditional extension modules by inferring type information using compile-time
15326 (license license:expat)))
15328 (define-public python-fasteners
15330 (name "python-fasteners")
15335 (uri (pypi-uri "fasteners" version))
15338 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15339 (build-system python-build-system)
15341 `(("python-monotonic" ,python-monotonic)
15342 ("python-six" ,python-six)
15343 ("python-testtools" ,python-testtools)))
15344 (home-page "https://github.com/harlowja/fasteners")
15345 (synopsis "Python package that provides useful locks")
15347 "This package provides a Python program that provides following locks:
15350 @item Locking decorator
15351 @item Reader-writer locks
15352 @item Inter-process locks
15353 @item Generic helpers
15355 (properties `((python2-variant . ,(delay python2-fasteners))))
15356 (license license:asl2.0)))
15358 (define-public python2-fasteners
15359 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15363 `(("python2-futures" ,python2-futures)
15364 ,@(package-propagated-inputs base))))))
15366 (define-public python-requests-file
15368 (name "python-requests-file")
15373 (uri (pypi-uri "requests-file" version))
15376 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15377 (build-system python-build-system)
15379 `(("python-requests" ,python-requests)
15380 ("python-six" ,python-six)))
15382 "https://github.com/dashea/requests-file")
15383 (synopsis "File transport adapter for Requests")
15385 "Requests-File is a transport adapter for use with the Requests Python
15386 library to allow local file system access via @code{file://} URLs.")
15387 (license license:asl2.0)))
15389 (define-public python2-requests-file
15390 (package-with-python2 python-requests-file))
15392 (define-public python-tldextract
15394 (name "python-tldextract")
15399 (uri (pypi-uri "tldextract" version))
15402 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15403 (build-system python-build-system)
15405 `(("python-pytest" ,python-pytest)
15406 ("python-responses" ,python-responses)))
15408 `(("python-idna" ,python-idna)
15409 ("python-requests" ,python-requests)
15410 ("python-requests-file" ,python-requests-file)))
15412 "https://github.com/john-kurkowski/tldextract")
15414 "Separate the TLD from the registered domain and subdomains of a URL")
15416 "TLDExtract accurately separates the TLD from the registered domain and
15417 subdomains of a URL, using the Public Suffix List. By default, this includes
15418 the public ICANN TLDs and their exceptions. It can optionally support the
15419 Public Suffix List's private domains as well.")
15420 (license license:bsd-3)))
15422 (define-public python2-tldextract
15423 (package-with-python2 python-tldextract))
15425 (define-public python-pynamecheap
15427 (name "python-pynamecheap")
15432 (uri (pypi-uri "PyNamecheap" version))
15435 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15436 (build-system python-build-system)
15438 `(("python-requests" ,python-requests)))
15440 "https://github.com/Bemmu/PyNamecheap")
15442 "Namecheap API client in Python")
15444 "PyNamecheap is a Namecheap API client in Python.")
15445 (license license:expat)))
15447 (define-public python2-pynamecheap
15448 (package-with-python2 python-pynamecheap))
15450 (define-public python-dns-lexicon
15452 (name "python-dns-lexicon")
15457 (uri (pypi-uri "dns-lexicon" version))
15460 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15461 (build-system python-build-system)
15463 `(#:tests? #f)) ;requires internet access
15465 `(("python-future" ,python-future)
15466 ("python-pynamecheap" ,python-pynamecheap)
15467 ("python-requests" ,python-requests)
15468 ("python-tldextract" ,python-tldextract)
15469 ("python-urllib3" ,python-urllib3)))
15470 (home-page "https://github.com/AnalogJ/lexicon")
15472 "Manipulate DNS records on various DNS providers")
15474 "Lexicon provides a way to manipulate DNS records on multiple DNS
15475 providers in a standardized way. It has a CLI but it can also be used as a
15476 Python library. It was designed to be used in automation, specifically with
15478 (license license:expat)))
15480 (define-public python2-dns-lexicon
15481 (package-with-python2 python-dns-lexicon))
15483 (define-public python-commandlines
15485 (name "python-commandlines")
15490 (uri (pypi-uri "commandlines" version))
15493 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15494 (build-system python-build-system)
15495 (home-page "https://github.com/chrissimpkins/commandlines")
15496 (synopsis "Command line argument to object parsing library")
15498 "@code{Commandlines} is a Python library for command line application
15499 development that supports command line argument parsing, command string
15500 validation testing and application logic.")
15501 (license license:expat)))
15503 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15504 ;; python-numba. They have a very unflexible relationship.
15505 (define-public python-numba
15507 (name "python-numba")
15512 (uri (pypi-uri "numba" version))
15515 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15516 (build-system python-build-system)
15518 `(#:modules ((guix build utils)
15519 (guix build python-build-system)
15524 (modify-phases %standard-phases
15525 (add-after 'unpack 'disable-proprietary-features
15527 (setenv "NUMBA_DISABLE_HSA" "1")
15528 (setenv "NUMBA_DISABLE_CUDA" "1")
15530 (add-after 'unpack 'remove-failing-tests
15532 ;; FIXME: these tests fail for unknown reasons:
15533 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15534 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15535 (substitute* "numba/tests/test_dispatcher.py"
15536 (("def test(_non_writable_pycache)" _ m)
15537 (string-append "def guix_skip" m))
15538 (("def test(_non_creatable_pycache)" _ m)
15539 (string-append "def guix_skip" m))
15540 (("def test(_frozen)" _ m)
15541 (string-append "def guix_skip" m)))
15543 ;; These tests fail because we don't run the tests from the build
15544 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15545 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15546 (substitute* "numba/tests/test_pycc.py"
15547 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15548 (string-append "def guix_skip" m)))
15552 (let ((cwd (getcwd)))
15553 (setenv "PYTHONPATH"
15554 (string-append cwd "/build/"
15555 (find (cut string-prefix? "lib" <>)
15556 (scandir (string-append cwd "/build")))
15558 (getenv "PYTHONPATH")))
15559 ;; Something is wrong with the PYTHONPATH when running the
15560 ;; tests from the build directory, as it complains about not being
15561 ;; able to import certain modules.
15562 (with-directory-excursion "/tmp"
15563 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15566 `(("python-llvmlite" ,python-llvmlite)
15567 ("python-numpy" ,python-numpy)
15568 ("python-singledispatch" ,python-singledispatch)))
15569 ;; Needed for tests.
15571 `(("python-jinja2" ,python-jinja2)
15572 ("python-pygments" ,python-pygments)))
15573 (home-page "https://numba.pydata.org")
15574 (synopsis "Compile Python code using LLVM")
15575 (description "Numba gives you the power to speed up your applications with
15576 high performance functions written directly in Python. With a few
15577 annotations, array-oriented and math-heavy Python code can be just-in-time
15578 compiled to native machine instructions, similar in performance to C, C++ and
15579 Fortran, without having to switch languages or Python interpreters.
15581 Numba works by generating optimized machine code using the LLVM compiler
15582 infrastructure at import time, runtime, or statically (using the included pycc
15584 (license license:bsd-3)))
15586 (define-public python-anndata
15588 (name "python-anndata")
15593 (uri (pypi-uri "anndata" version))
15596 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15597 (build-system python-build-system)
15599 `(("python-h5py" ,python-h5py)
15600 ("python-natsort" ,python-natsort)
15601 ("python-pandas" ,python-pandas)
15602 ("python-scipy" ,python-scipy)))
15603 (home-page "https://github.com/theislab/anndata")
15604 (synopsis "Annotated data for data analysis pipelines")
15605 (description "Anndata is a package for simple (functional) high-level APIs
15606 for data analysis pipelines. In this context, it provides an efficient,
15607 scalable way of keeping track of data together with learned annotations and
15608 reduces the code overhead typically encountered when using a mostly
15609 object-oriented library such as @code{scikit-learn}.")
15610 (license license:bsd-3)))
15612 (define-public python-dill
15614 (name "python-dill")
15619 (uri (pypi-uri "dill" version))
15621 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15622 (build-system python-build-system)
15623 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15624 (arguments '(#:tests? #f))
15625 (home-page "https://pypi.org/project/dill")
15626 (synopsis "Serialize all of Python")
15627 (description "Dill extends Python's @code{pickle} module for serializing
15628 and de-serializing Python objects to the majority of the built-in Python
15629 types. Dill provides the user the same interface as the @code{pickle} module,
15630 and also includes some additional features. In addition to pickling Python
15631 objects, @code{dill} provides the ability to save the state of an interpreter
15632 session in a single command. Hence, it would be feasible to save a
15633 interpreter session, close the interpreter, ship the pickled file to another
15634 computer, open a new interpreter, unpickle the session and thus continue from
15635 the saved state of the original interpreter session.")
15636 (license license:bsd-3)))
15638 (define-public python-multiprocess
15640 (name "python-multiprocess")
15641 (version "0.70.6.1")
15645 (uri (pypi-uri "multiprocess" version))
15648 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15649 (build-system python-build-system)
15651 `(("python-dill" ,python-dill)))
15652 (home-page "https://pypi.org/project/multiprocess")
15653 (synopsis "Multiprocessing and multithreading in Python")
15655 "This package is a fork of the multiprocessing Python package, a package
15656 which supports the spawning of processes using the API of the standard
15657 library's @code{threading} module.")
15658 (license license:bsd-3)))
15660 (define-public python-toolz
15662 (name "python-toolz")
15667 (uri (pypi-uri "toolz" version))
15670 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15671 (build-system python-build-system)
15672 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15673 ;; unregistered loader type"
15674 (arguments '(#:tests? #f))
15675 (home-page "https://github.com/pytoolz/toolz/")
15676 (synopsis "List processing tools and functional utilities")
15678 "This package provides a set of utility functions for iterators,
15679 functions, and dictionaries.")
15680 (license license:bsd-3)))
15682 (define-public python2-toolz
15683 (package-with-python2 python-toolz))
15685 (define-public python-cytoolz
15687 (name "python-cytoolz")
15688 (version "0.9.0.1")
15692 (uri (pypi-uri "cytoolz" version))
15695 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15696 (build-system python-build-system)
15697 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15699 (arguments '(#:tests? #f))
15701 `(("python-toolz" ,python-toolz)))
15703 `(("python-cython" ,python-cython)))
15704 (home-page "https://github.com/pytoolz/cytoolz")
15705 (synopsis "High performance functional utilities")
15707 "The cytoolz package implements the same API as provided by toolz. The
15708 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15709 that is accessible to other projects developed in Cython.")
15710 (license license:bsd-3)))
15712 (define-public python-sortedcontainers
15714 (name "python-sortedcontainers")
15719 (uri (pypi-uri "sortedcontainers" version))
15722 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15723 (build-system python-build-system)
15725 `(("python-tox" ,python-tox)))
15726 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15727 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15729 "This package provides a sorted collections library, written in
15731 (license license:asl2.0)))
15733 (define-public python-cloudpickle
15735 (name "python-cloudpickle")
15740 (uri (pypi-uri "cloudpickle" version))
15743 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15744 (build-system python-build-system)
15745 ;; FIXME: there are 5 errors in 122 tests:
15746 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15747 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15748 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15749 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15750 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15751 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15752 (arguments '(#:tests? #f))
15754 `(("python-pytest" ,python-pytest)
15755 ("python-mock" ,python-mock)
15756 ("python-tornado" ,python-tornado)))
15757 (home-page "https://github.com/cloudpipe/cloudpickle")
15758 (synopsis "Extended pickling support for Python objects")
15760 "Cloudpickle makes it possible to serialize Python constructs not
15761 supported by the default pickle module from the Python standard library. It
15762 is especially useful for cluster computing where Python expressions are
15763 shipped over the network to execute on remote hosts, possibly close to the
15765 (license license:bsd-3)))
15767 (define-public python2-cloudpickle
15768 (package-with-python2 python-cloudpickle))
15770 (define-public python-locket
15772 (name "python-locket")
15777 (uri (pypi-uri "locket" version))
15780 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15781 (build-system python-build-system)
15782 (home-page "https://github.com/mwilliamson/locket.py")
15783 (synopsis "File-based locks for Python")
15785 "Locket implements a lock that can be used by multiple processes provided
15786 they use the same path.")
15787 (license license:bsd-2)))
15789 (define-public python2-locket
15790 (package-with-python2 python-locket))
15792 (define-public python-blosc
15794 (name "python-blosc")
15799 (uri (pypi-uri "blosc" version))
15802 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15803 (build-system python-build-system)
15804 ;; FIXME: all tests pass, but then this error is printed:
15805 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15806 (arguments '(#:tests? #f))
15808 `(("python-numpy" ,python-numpy)))
15809 (home-page "https://github.com/blosc/python-blosc")
15810 (synopsis "Python wrapper for the Blosc data compressor library")
15811 (description "Blosc is a high performance compressor optimized for binary
15812 data. It has been designed to transmit data to the processor cache faster
15813 than the traditional, non-compressed, direct memory fetch approach via a
15814 @code{memcpy()} system call.
15816 Blosc works well for compressing numerical arrays that contains data with
15817 relatively low entropy, like sparse data, time series, grids with
15818 regular-spaced values, etc.
15820 This Python package wraps the Blosc library.")
15821 (license license:bsd-3)))
15823 (define-public python2-blosc
15824 (package-with-python2 python-blosc))
15826 (define-public python-partd
15828 (name "python-partd")
15833 (uri (pypi-uri "partd" version))
15836 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15837 (build-system python-build-system)
15839 `(("python-blosc" ,python-blosc)
15840 ("python-locket" ,python-locket)
15841 ("python-numpy" ,python-numpy)
15842 ("python-pandas" ,python-pandas)
15843 ("python-pyzmq" ,python-pyzmq)
15844 ("python-toolz" ,python-toolz)))
15845 (home-page "https://github.com/dask/partd/")
15846 (synopsis "Appendable key-value storage")
15847 (description "Partd stores key-value pairs. Values are raw bytes. We
15848 append on old values. Partd excels at shuffling operations.")
15849 (license license:bsd-3)))
15851 (define-public python2-partd
15852 (package-with-python2 python-partd))
15854 (define-public python-dask
15856 (name "python-dask")
15861 (uri (pypi-uri "dask" version))
15863 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15864 (build-system python-build-system)
15865 ;; A single test out of 5000+ fails. This test is marked as xfail when
15866 ;; pytest-xdist is used.
15869 (modify-phases %standard-phases
15870 (add-after 'unpack 'disable-broken-test
15872 (substitute* "dask/tests/test_threaded.py"
15873 (("def test_interrupt\\(\\)" m)
15874 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15876 (when (which "python2")
15877 ;; This test fails with recent Pandas:
15878 ;; <https://github.com/dask/dask/issues/3794>.
15879 (substitute* "dask/dataframe/tests/test_dataframe.py"
15880 (("def test_info\\(\\)" m)
15881 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15885 (lambda _ (invoke "pytest" "-vv"))))))
15887 `(("python-cloudpickle" ,python-cloudpickle)
15888 ("python-numpy" ,python-numpy)
15889 ("python-pandas" ,python-pandas)
15890 ("python-partd" ,python-partd)
15891 ("python-toolz" ,python-toolz)
15892 ("python-pyyaml" ,python-pyyaml)))
15894 `(("python-pytest" ,python-pytest)
15895 ("python-pytest-runner" ,python-pytest-runner)))
15896 (home-page "https://github.com/dask/dask/")
15897 (synopsis "Parallel computing with task scheduling")
15899 "Dask is a flexible parallel computing library for analytics. It
15900 consists of two components: dynamic task scheduling optimized for computation,
15901 and large data collections like parallel arrays, dataframes, and lists that
15902 extend common interfaces like NumPy, Pandas, or Python iterators to
15903 larger-than-memory or distributed environments. These parallel collections
15904 run on top of the dynamic task schedulers. ")
15905 (license license:bsd-3)))
15907 (define-public python2-dask
15908 (package-with-python2 python-dask))
15910 (define-public python-ilinkedlist
15912 (name "python-ilinkedlist")
15917 (uri (pypi-uri "ilinkedlist" version))
15920 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15921 (build-system python-build-system)
15922 (native-inputs `(("python-pytest" ,python-pytest)))
15923 (inputs `(("python" ,python)))
15924 (home-page "https://github.com/luther9/ilinkedlist-py")
15925 (synopsis "Immutable linked list library")
15927 "This is a implementation of immutable linked lists for Python. It
15928 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15929 Since a linked list is treated as immutable, it is hashable, and its length
15930 can be retrieved in constant time. Some of the terminology is inspired by
15931 LISP. It is possible to create an improper list by creating a @code{Pair}
15932 with a non-list @code{cdr}.")
15933 (license license:gpl3+)))
15935 (define-public python-readlike
15937 (name "python-readlike")
15942 (uri (pypi-uri "readlike" version))
15944 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15945 (build-system python-build-system)
15946 (home-page "https://github.com/jangler/readlike")
15947 (synopsis "GNU Readline-like line editing module")
15949 "This Python module provides line editing functions similar to the default
15950 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15951 @code{readline} package, this one allows access to those capabilties in settings
15952 outside of a standard command-line interface. It is especially well-suited to
15953 interfacing with Urwid, due to a shared syntax for describing key inputs.
15955 Currently, all stateless Readline commands are implemented. Yanking and history
15956 are not supported.")
15957 (license license:expat)))
15959 (define-public python2-readlike
15960 (package-with-python2 python-readlike))
15962 (define-public python-reparser
15964 (name "python-reparser")
15969 (uri (pypi-uri "ReParser" version))
15971 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15972 (build-system python-build-system)
15973 (home-page "https://github.com/xmikos/reparser")
15974 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15976 "This Python library provides a simple lexer/parser for inline markup based
15977 on regular expressions.")
15978 (license license:expat)))
15980 (define-public python2-reparser
15981 (let ((reparser (package-with-python2
15982 (strip-python2-variant python-reparser))))
15983 (package (inherit reparser)
15985 `(("python2-enum34" ,python2-enum34)
15986 ,@(package-propagated-inputs reparser))))))
15988 (define-public python-precis-i18n
15990 (name "python-precis-i18n")
15995 (uri (pypi-uri "precis_i18n" version))
15998 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15999 (build-system python-build-system)
16000 (home-page "https://github.com/byllyfish/precis_i18n")
16001 (synopsis "Implementation of the PRECIS framework")
16003 "This module implements the PRECIS Framework as described in RFC 8264,
16004 RFC 8265 and RFC 8266.")
16005 (license license:expat)))
16007 (define-public python-absl-py
16009 (name "python-absl-py")
16014 (uri (pypi-uri "absl-py" version))
16017 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16018 (build-system python-build-system)
16020 `(("python-six" ,python-six)))
16021 (home-page "https://github.com/abseil/abseil-py")
16022 (synopsis "Abseil Python common libraries")
16024 "This package provides the Abseil Python Common Libraries, a collection
16025 of Python libraries for building Python applications.")
16026 (license license:asl2.0)))
16028 (define-public python-astor
16030 (name "python-astor")
16035 (uri (pypi-uri "astor" version))
16038 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16039 (build-system python-build-system)
16040 ;; FIXME: There are two errors and two test failures.
16041 (arguments `(#:tests? #f))
16042 (home-page "https://github.com/berkerpeksag/astor")
16043 (synopsis "Read and write Python ASTs")
16044 (description "Astor is designed to allow easy manipulation of Python
16045 source via the Abstract Syntax Tree.")
16046 (license license:bsd-3)))
16048 (define-public python2-astor
16049 (package-with-python2 python-astor))
16051 (define-public python-grpcio
16053 (name "python-grpcio")
16058 (uri (pypi-uri "grpcio" version))
16061 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16062 (build-system python-build-system)
16064 `(("python-six" ,python-six)))
16065 (home-page "https://grpc.io")
16066 (synopsis "HTTP/2-based RPC framework")
16067 (description "This package provides a Python library for communicating
16068 with the HTTP/2-based RPC framework gRPC.")
16069 (license license:asl2.0)))
16071 (define-public python-astunparse
16073 (name "python-astunparse")
16078 (uri (pypi-uri "astunparse" version))
16080 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16081 (build-system python-build-system)
16082 (arguments '(#:tests? #f)) ; there are none
16084 `(("python-six" ,python-six)
16085 ("python-wheel" ,python-wheel)))
16086 (home-page "https://github.com/simonpercivall/astunparse")
16087 (synopsis "AST unparser for Python")
16088 (description "This package provides an AST unparser for Python. It is a
16089 factored out version of @code{unparse} found in the Python source
16091 (license license:bsd-3)))
16093 (define-public python-gast
16095 (name "python-gast")
16100 (uri (pypi-uri "gast" version))
16102 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16103 (build-system python-build-system)
16105 `(("python-astunparse" ,python-astunparse)))
16106 (home-page "https://pypi.org/project/gast/")
16107 (synopsis "Generic Python AST that abstracts the underlying Python version")
16109 "GAST provides a compatibility layer between the AST of various Python
16110 versions, as produced by @code{ast.parse} from the standard @code{ast}
16112 (license license:bsd-3)))
16114 (define-public python-wikidata
16116 (name "python-wikidata")
16121 (uri (pypi-uri "Wikidata" version))
16124 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16125 (build-system python-build-system)
16127 `(("python-babel" ,python-babel)))
16128 (home-page "https://github.com/dahlia/wikidata")
16129 (synopsis "Wikidata client library")
16131 "This package provides a Python interface to
16132 @url{https://www.wikidata.org/, Wikidata}.")
16133 (properties '((upstream-name . "Wikidata")))
16134 (license license:gpl3+)))
16136 (define-public python-doctest-ignore-unicode
16138 (name "python-doctest-ignore-unicode")
16143 (uri (pypi-uri "doctest-ignore-unicode" version))
16146 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16147 (build-system python-build-system)
16149 `(("python-nose" ,python-nose)))
16150 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16151 (synopsis "Ignore Unicode literal prefixes in doctests")
16153 "This package adds support for a flag to ignore Unicode literal prefixes
16155 (license license:asl2.0)))
16157 (define-public python-attr
16159 (name "python-attr")
16164 (uri (pypi-uri "attr" version))
16167 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16168 (build-system python-build-system)
16169 (home-page "https://github.com/denis-ryzhkov/attr")
16170 (synopsis "Decorator for attributes of target function or class")
16171 (description "Simple decorator to set attributes of target function or
16172 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16173 (license license:expat)))
16175 (define-public python-construct
16177 (name "python-construct")
16182 (uri (pypi-uri "construct" version))
16185 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16186 (build-system python-build-system)
16188 `(#:tests? #f)) ; No tests exist.
16190 `(("python-extras" ,python-extras)
16191 ("python-arrow" ,python-arrow)
16192 ("python-numpy" ,python-numpy)
16193 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16194 (home-page "http://construct.readthedocs.io")
16195 (synopsis "Declarative and symmetrical parser and builder for binary data")
16197 "This package provides both simple, atomic constructs (such as
16198 integers of various sizes), as well as composite ones which allow you
16199 form hierarchical and sequential structures of increasing complexity.
16200 It features bit and byte granularity, easy debugging and testing, an
16201 easy-to-extend subclass system, and lots of primitive constructs to
16202 make your work easier.")
16203 (license license:expat)))
16205 (define-public python-humanize
16207 (name "python-humanize")
16212 (uri (pypi-uri "humanize" version))
16215 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16217 '(#:tests? #f)) ; tests not in pypi archive
16218 (build-system python-build-system)
16219 (home-page "https://github.com/jmoiron/humanize")
16220 (synopsis "Print numerical information in a human-readable form")
16221 (description "This package provides a Python module that displays numbers
16222 and dates in \"human readable\" forms. For example, it would display
16223 \"12345591313\" as \"12.3 billion\".")
16224 (license license:expat)))
16226 (define-public python-txaio
16228 (name "python-txaio")
16233 (uri (pypi-uri "txaio" version))
16236 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16237 (build-system python-build-system)
16239 `(("python-twisted" ,python-twisted)
16240 ("python-six" ,python-six)))
16241 (home-page "https://github.com/crossbario/txaio")
16242 (synopsis "Compatibility layer between Python asyncio and Twisted")
16243 (description "Txaio provides a compatibility layer between the Python
16244 @code{asyncio} module and @code{Twisted}.")
16245 (license license:expat)))
16247 (define-public python-toolshed
16249 (name "python-toolshed")
16254 (uri (pypi-uri "toolshed" version))
16257 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16258 (build-system python-build-system)
16260 `(("python-nose" ,python-nose)))
16261 (home-page "https://github.com/brentp/toolshed/")
16262 (synopsis "Collection of modules and functions for working with data")
16263 (description "This is a collection of well-tested, simple modules and
16264 functions that aim to reduce boilerplate when working with data.")
16265 (license license:bsd-2)))
16267 (define-public python-annoy
16269 (name "python-annoy")
16274 (uri (pypi-uri "annoy" version))
16277 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16278 (build-system python-build-system)
16280 `(("python-nose" ,python-nose)))
16281 (home-page "https://github.com/spotify/annoy/")
16282 (synopsis "Approximate nearest neighbors library")
16284 "Annoy is a C++ library with Python bindings to search for points in
16285 space that are close to a given query point. It also creates large read-only
16286 file-based data structures that are @code{mmap}ped into memory so that many
16287 processes may share the same data.")
16288 (license license:asl2.0)))
16290 (define-public python-pylzma
16292 (name "python-pylzma")
16297 (uri (pypi-uri "pylzma" version))
16300 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16301 (build-system python-build-system)
16302 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16303 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16304 (description "This package provides Python bindings for the LZMA library
16306 (license license:lgpl2.1+)))
16308 (define-public python2-pylzma
16309 (package-with-python2 python-pylzma))
16311 (define-public python2-zeroconf
16313 (name "python2-zeroconf")
16315 ;; This is the last version that supports Python 2.x.
16320 (uri (pypi-uri "zeroconf" version))
16323 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16324 (build-system python-build-system)
16326 `(#:python ,python-2
16328 (modify-phases %standard-phases
16329 (add-after 'unpack 'patch-requires
16330 (lambda* (#:key inputs #:allow-other-keys)
16331 (substitute* "setup.py"
16336 `(("python2-six" ,python2-six)
16337 ("python2-enum32" ,python2-enum34)
16338 ("python2-netifaces" ,python2-netifaces)
16339 ("python2-typing" ,python2-typing)))
16340 (home-page "https://github.com/jstasiak/python-zeroconf")
16341 (synopsis "Pure Python mDNS service discovery")
16343 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16345 (license license:lgpl2.1+)))
16347 (define-public python-bsddb3
16349 (name "python-bsddb3")
16354 (uri (pypi-uri "bsddb3" version))
16357 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16358 (build-system python-build-system)
16363 (modify-phases %standard-phases
16364 (add-after 'unpack 'configure-locations
16365 (lambda* (#:key inputs #:allow-other-keys)
16366 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16367 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16371 (invoke "python3" "test3.py" "-v"))))))
16372 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16373 (synopsis "Python bindings for Oracle Berkeley DB")
16375 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16376 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16377 Transaction objects, and each of these is exposed as a Python type in the
16378 bsddb3.db module. The database objects can use various access methods: btree,
16379 hash, recno, and queue. Complete support of Berkeley DB distributed
16380 transactions. Complete support for Berkeley DB Replication Manager.
16381 Complete support for Berkeley DB Base Replication. Support for RPC.")
16382 (license license:bsd-3)))
16384 (define-public python-dbfread
16386 (name "python-dbfread")
16390 (uri (pypi-uri "dbfread" version))
16393 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16394 (build-system python-build-system)
16396 `(("python-pytest" ,python-pytest)))
16397 (home-page "https://dbfread.readthedocs.io")
16398 (synopsis "Read DBF Files with Python")
16400 "This library reads DBF files and returns the data as native Python data
16401 types for further processing. It is primarily intended for batch jobs and
16403 (license license:expat)))
16405 (define-public python-cached-property
16407 (name "python-cached-property")
16412 (uri (pypi-uri "cached-property" version))
16415 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16416 (build-system python-build-system)
16419 (modify-phases %standard-phases
16420 ;; https://github.com/pydanny/cached-property/issues/131
16421 ;; recent versions of freezegun break one test
16422 (add-after 'unpack 'disable-broken-test
16424 (substitute* "tests/test_cached_property.py"
16425 (("def test_threads_ttl_expiry\\(self\\)" m)
16426 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16430 `(("python-freezegun" ,python-freezegun)))
16432 "https://github.com/pydanny/cached-property")
16434 "Decorator for caching properties in classes")
16436 "This package provides a decorator which makes caching
16437 time-or-computationally-expensive properties quick and easy and works in Python
16439 (license license:bsd-3)))
16441 (define-public python-folium
16443 (name "python-folium")
16448 (uri (pypi-uri "folium" version))
16451 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16452 (build-system python-build-system)
16454 `(("python-branca" ,python-branca)
16455 ("python-jinja2" ,python-jinja2)
16456 ("python-numpy" ,python-numpy)
16457 ("python-requests" ,python-requests)))
16459 `(("python-pytest" ,python-pytest)))
16460 (home-page "https://github.com/python-visualization/folium")
16461 (synopsis "Make beautiful maps with Leaflet.js & Python")
16462 (description "@code{folium} makes it easy to visualize data that’s been
16463 manipulated in Python on an interactive leaflet map. It enables both the
16464 binding of data to a map for @code{choropleth} visualizations as well as
16465 passing rich vector/raster/HTML visualizations as markers on the map.
16467 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16468 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16469 supports Image, Video, GeoJSON and TopoJSON overlays.")
16470 (license license:expat)))
16472 (define-public jube
16474 ;; This is a command-line tool, so no "python-" prefix.
16479 (uri (string-append
16480 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16484 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16485 (file-name (string-append "jube-" version ".tar.gz"))))
16486 (build-system python-build-system)
16487 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16488 (synopsis "Benchmarking environment")
16490 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16491 benchmarked application, benchmark data is stored in a format that allows JUBE
16492 to deduct the desired information. This data can be parsed by automatic pre-
16493 and post-processing scripts that draw information and store it more densely
16494 for manual interpretation.")
16495 (license license:gpl3+)))
16497 (define-public python-pyroutelib3
16499 (name "python-pyroutelib3")
16500 (version "1.3.post1")
16504 (uri (pypi-uri "pyroutelib3" version))
16507 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16508 (build-system python-build-system)
16510 `(("python-dateutil" ,python-dateutil)))
16511 (home-page "https://github.com/MKuranowski/pyroutelib3")
16512 (synopsis "Library for simple routing on OSM data")
16513 (description "Library for simple routing on OSM data")
16514 (license license:gpl3+)))
16516 (define-public python-elementpath
16518 (name "python-elementpath")
16523 (uri (pypi-uri "elementpath" version))
16526 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16527 (build-system python-build-system)
16529 "https://github.com/sissaschool/elementpath")
16531 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16533 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16534 for Python's ElementTree XML data structures, both for the standard
16535 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16537 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16538 because lxml.etree already has it's own implementation of XPath 1.0.")
16539 (license license:expat)))
16541 (define-public python-bibtexparser
16543 (name "python-bibtexparser")
16548 (uri (pypi-uri "bibtexparser" version))
16551 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16552 (build-system python-build-system)
16554 `(("python-pyparsing" ,python-pyparsing)))
16556 `(("python-future" ,python-future)))
16557 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16558 (synopsis "Python library to parse BibTeX files")
16559 (description "BibtexParser is a Python library to parse BibTeX files.")
16560 (license (list license:bsd-3 license:lgpl3))))
16562 (define-public python-distro
16564 (name "python-distro")
16569 (uri (pypi-uri "distro" version))
16572 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16573 (build-system python-build-system)
16575 `(("python-pytest" ,python-pytest)))
16576 (home-page "https://github.com/nir0s/distro")
16578 "OS platform information API")
16580 "@code{distro} provides information about the OS distribution it runs on,
16581 such as a reliable machine-readable ID, or version information.
16583 It is the recommended replacement for Python's original
16584 `platform.linux_distribution` function (which will be removed in Python 3.8).
16585 @code{distro} also provides a command-line interface to output the platform
16586 information in various formats.")
16587 (license license:asl2.0)))