1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 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))
175 (base32 "1wv31zly44qj0rp2acg58xbnc7bf6ffyadasq093l455q30qafl6"))))
176 (build-system python-build-system)
178 ;; FIXME: some tests does not return and times out.
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
201 (define-public python-shapely
203 (name "python-shapely")
204 (version "1.6.4.post2")
208 (uri (pypi-uri "Shapely" version))
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
221 `(("python-numpy" ,python-numpy)))
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
244 (define-public python-shortuuid
246 (name "python-shortuuid")
251 (uri (pypi-uri "shortuuid" version))
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
266 (define-public python-logwrap
268 (name "python-logwrap")
273 (uri (pypi-uri "logwrap" version ".zip"))
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
296 (define-public python-clyent
298 (name "python-clyent")
303 (uri (pypi-uri "clyent" version))
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
319 (define-public python-babel
321 (name "python-babel")
326 (uri (pypi-uri "Babel" version))
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
335 `(("python-pytz" ,python-pytz)))
337 `(#:phases (modify-phases %standard-phases
340 (invoke "pytest" "-vv" "-k"
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
349 "Tools for internationalizing Python applications")
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
356 (license license:bsd-3)))
358 (define-public python2-babel
359 (package-with-python2 python-babel))
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
364 (inherit python2-babel)
368 (uri (pypi-uri "Babel" version))
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373 (define-public python2-backport-ssl-match-hostname
375 (name "python2-backport-ssl-match-hostname")
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
397 (define-public python-boolean.py
399 (name "python-boolean.py")
403 ;; There's no source tarball on PyPI.
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
415 "This is a small Python library that implements boolean algebra.
416 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417 @code{Symbol} class that can take on one of these two values. Calculations
418 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420 Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
423 (define-public python-hdf4
430 (uri (pypi-uri name version))
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
443 (modify-phases %standard-phases
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461 NetCDF files can also be read and modified. Python-HDF4 is a fork of
462 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
465 (define-public python2-hdf4
466 (package-with-python2 python-hdf4))
468 (define-public python-h5py
475 (uri (pypi-uri "h5py" version))
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
481 `(#:tests? #f ; no test target
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
507 "The h5py package provides both a high- and low-level interface to the
508 HDF5 library from Python. The low-level interface is intended to be a
509 complete wrapping of the HDF5 API, while the high-level component supports
510 access to HDF5 files, datasets and groups using established Python and NumPy
512 (license license:bsd-3)))
514 (define-public python2-h5py
515 (package-with-python2 python-h5py))
517 (define-public python-sh
524 (uri (pypi-uri "sh" version))
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
531 (modify-phases %standard-phases
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
536 (invoke "python" "sh.py" "test"))))))
538 `(("python-coverage" ,python-coverage)))
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542 @code{subprocess} feature.")
543 (license license:expat)))
545 (define-public python2-sh
546 (package-with-python2 python-sh))
548 (define-public python-cftime
550 (name "python-cftime")
555 (uri (pypi-uri "cftime" version))
557 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
558 (build-system python-build-system)
560 `(("python-numpy" ,python-numpy)))
562 `(("python-coveralls" ,python-coveralls)
563 ("python-cython" ,python-cython)
564 ("python-pytest-cov" ,python-pytest-cov)))
565 (home-page "https://github.com/Unidata/cftime")
566 (synopsis "Library for time handling")
568 "This package provides time-handling functionality that used to be part
569 of the netcdf4 package before.")
570 ;; This package claims to include code under the GPLv3 but is released
572 (license (list license:isc license:gpl3+))))
574 (define-public python-netcdf4
576 (name "python-netcdf4")
581 (uri (pypi-uri "netCDF4" version))
584 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
585 (build-system python-build-system)
588 (modify-phases %standard-phases
589 (add-after 'unpack 'configure-locations
590 (lambda* (#:key inputs #:allow-other-keys)
591 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
594 `(("python-cython" ,python-cython)))
596 `(("python-numpy" ,python-numpy)
597 ("python-cftime" ,python-cftime)))
602 (home-page "https://github.com/Unidata/netcdf4-python")
603 (synopsis "Python/numpy interface to the netCDF library")
604 (description "Netcdf4-python is a Python interface to the netCDF C
605 library. netCDF version 4 has many features not found in earlier
606 versions of the library and is implemented on top of HDF5. This module
607 can read and write files in both the new netCDF 4 and the old netCDF 3
608 format, and can create files that are readable by HDF5 clients. The
609 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
610 to users of that module.")
611 ;; The software is mainly ISC, but includes some files covered
612 ;; by the Expat license.
613 (license (list license:isc license:expat))))
615 (define-public python2-netcdf4
616 (package-with-python2 python-netcdf4))
618 (define-public python-license-expression
620 (name "python-license-expression")
625 (uri (pypi-uri "license-expression" version))
627 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
628 (build-system python-build-system)
630 `(("python-boolean.py" ,python-boolean.py)))
631 (home-page "https://github.com/nexB/license-expression")
632 (synopsis "Apply boolean logic to license expressions")
634 "This Python module defines a tiny language to evaluate and compare
635 license expressions using boolean logic. Logical combinations of licenses can
636 be tested for equality, containment, and equivalence. They can be normalised
637 and simplified. It supports SPDX license expressions as well as other naming
638 conventions and aliases in the same expression.")
639 (license license:gpl2+)))
641 (define-public python-lockfile
643 (name "python-lockfile")
648 (uri (pypi-uri "lockfile" version))
651 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
652 (build-system python-build-system)
653 (arguments '(#:test-target "check"))
655 `(("python-pbr" ,python-pbr)))
656 (home-page "https://launchpad.net/pylockfile")
657 (synopsis "Platform-independent file locking module")
659 "The lockfile package exports a LockFile class which provides a simple
660 API for locking files.")
661 (license license:expat)))
663 (define-public python2-lockfile
664 (package-with-python2 python-lockfile))
666 (define-public python-semantic-version
668 (name "python-semantic-version")
673 (uri (pypi-uri "semantic_version" version))
676 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
677 (build-system python-build-system)
679 `(#:tests? #f)) ; PyPI tarball lacks tests
680 (home-page "https://github.com/rbarrois/python-semanticversion")
681 (synopsis "Semantic versioning module for Python")
683 "The @code{semantic_version} class is a small library for handling
684 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
686 It can compare versions, generate a new version that represents a bump in one of
687 the version levels, and check whether any given string is a proper semantic
688 version identifier.")
689 (license license:bsd-3)))
691 (define-public python2-semantic-version
692 (package-with-python2 python-semantic-version))
694 (define-public python-serpent
696 (name "python-serpent")
701 (uri (pypi-uri "serpent" version))
703 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
704 (build-system python-build-system)
706 `(("python-attrs" ,python-attrs)
707 ("python-pytz" ,python-pytz)))
708 (home-page "https://github.com/irmen/Serpent")
709 (synopsis "Serializer for literal Python expressions")
711 "Serpent provides @code{ast.literal_eval()}-compatible object tree
712 serialization. It serializes an object tree into bytes (an utf-8 encoded
713 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
714 to rebuild the original object tree.
716 Because only safe literals are encoded, it is safe to send serpent data to
717 other machines, such as over the network.")
718 (license license:expat)))
720 (define-public python-setuptools
722 (name "python-setuptools")
727 (uri (pypi-uri "setuptools" version ".zip"))
730 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
731 (modules '((guix build utils)))
734 ;; Remove included binaries which are used to build self-extracting
735 ;; installers for Windows.
736 ;; TODO: Find some way to build them ourself so we can include them.
737 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
739 (build-system python-build-system)
740 ;; FIXME: Tests require pytest, which itself relies on setuptools.
741 ;; One could bootstrap with an internal untested setuptools.
744 (home-page "https://pypi.python.org/pypi/setuptools")
746 "Library designed to facilitate packaging Python projects")
748 "Setuptools is a fully-featured, stable library designed to facilitate
749 packaging Python projects, where packaging includes:
750 Python package and module definitions,
751 distribution package metadata,
753 project installation,
754 platform-specific details,
756 ;; TODO: setuptools now bundles the following libraries:
757 ;; packaging, pyparsing, six and appdirs. How to unbundle?
758 (license (list license:psfl ; setuptools itself
759 license:expat ; six, appdirs, pyparsing
760 license:asl2.0 ; packaging is dual ASL2/BSD-2
763 (define-public python2-setuptools
764 (package-with-python2 python-setuptools))
766 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
767 (define-public python-setuptools-for-tensorflow
770 (inherit python-setuptools)
773 (inherit (package-source python-setuptools))
774 (uri (pypi-uri "setuptools" version ".zip"))
777 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
779 (define-public python-uniseg
781 (name "python-uniseg")
786 (uri (pypi-uri "uniseg" version ".zip"))
789 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
790 (build-system python-build-system)
792 '(#:tests? #f)) ; The test suite requires network access.
796 "https://bitbucket.org/emptypage/uniseg-python")
798 "Python library to determine Unicode text segmentations")
800 "Uniseg is a Python package used to determine Unicode text segmentations.
801 Supported segmentations include:
803 @item @dfn{Code point} (any value in the Unicode codespace)
804 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
805 multiple Unicode code points, e.g. \"G\" + acute-accent)
810 (license license:expat)))
812 (define-public python2-uniseg
813 (package-with-python2 python-uniseg))
815 (define-public python-humanfriendly
817 (name "python-humanfriendly")
822 (uri (pypi-uri "humanfriendly" version))
825 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
826 (build-system python-build-system)
828 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
831 `(("python-monotonic" ,python-monotonic)))
832 (home-page "https://humanfriendly.readthedocs.io")
833 (synopsis "Human-friendly input and output in Python")
835 "The functions and classes in @code{humanfriendly} can be used to make
836 text interfaces more user-friendly. It includes tools to parse and format
837 numbers, file sizes, and timespans, timers for long-running operations, menus
838 to allow the user to choose from a list of options, and terminal interaction
840 (license license:expat)))
842 (define-public python2-humanfriendly
843 (package-with-python2 python-humanfriendly))
845 (define-public python-capturer
847 (name "python-capturer")
852 (uri (pypi-uri "capturer" version))
855 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
856 (build-system python-build-system)
860 `(("python-humanfriendly" ,python-humanfriendly)))
861 (home-page "https://capturer.readthedocs.io")
862 (synopsis "Capture stdout and stderr streams of the current process")
864 "The capturer package makes it easy to capture the stdout and stderr
865 streams of the current process and subprocesses. Output can be relayed
866 to the terminal in real time but is also available to the Python program
867 for additional processing.")
868 (license license:expat)))
870 (define-public python2-capturer
871 (package-with-python2 python-capturer))
873 (define-public python-case
880 (uri (pypi-uri "case" version))
883 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
884 (build-system python-build-system)
886 `(("python-mock" ,python-mock)
887 ("python-nose" ,python-nose)
888 ("python-six" ,python-six)
889 ("python-unittest2" ,python-unittest2)))
891 `(("python-coverage" ,python-coverage)))
892 (home-page "https://github.com/celery/case")
893 (synopsis "Unittest utilities and convenience methods")
895 "The @code{case} package provides utilities on top of unittest, including
896 some helpful Python 2 compatibility convenience methods.")
897 (license license:bsd-3)))
899 (define-public python-verboselogs
901 (name "python-verboselogs")
906 (uri (pypi-uri "verboselogs" version))
909 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
910 (build-system python-build-system)
913 (modify-phases %standard-phases
916 ;; Do not run pylint plugin test, as astroid is an old
917 ;; unsupported version.
918 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
919 "verboselogs/tests.py"))))))
921 `(("python-mock" ,python-mock)
922 ("python-pytest" ,python-pytest)))
923 (home-page "https://verboselogs.readthedocs.io")
924 (synopsis "Verbose logging level for Python's logging module")
926 "The @code{verboselogs} package extends Python's @code{logging} module to
927 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
928 (license license:expat)))
930 (define-public python2-verboselogs
931 (package-with-python2 python-verboselogs))
933 (define-public python-coloredlogs
935 (name "python-coloredlogs")
940 (uri (pypi-uri "coloredlogs" version))
943 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
944 (build-system python-build-system)
946 `(;Tests require some updated modules
949 `(("python-capturer" ,python-capturer)))
950 (home-page "https://coloredlogs.readthedocs.io")
951 (synopsis "Colored stream handler for Python's logging module")
953 "The @code{coloredlogs} package enables colored terminal output for
954 Python's logging module. The @code{ColoredFormatter} class inherits from
955 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
957 (license license:expat)))
959 (define-public python2-coloredlogs
960 (package-with-python2 python-coloredlogs))
962 (define-public python-editorconfig
964 (name "python-editorconfig")
969 (uri (pypi-uri "EditorConfig" version))
972 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
973 (build-system python-build-system)
974 (home-page "https://editorconfig.org/")
975 (synopsis "EditorConfig bindings for python")
976 (description "The EditorConfig project consists of a file format for
977 defining coding styles and a collection of text editor plugins that enable
978 editors to read the file format and adhere to defined styles. EditorConfig
979 files are easily readable and they work nicely with version control systems.")
980 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
981 (license (list license:bsd-2 license:psfl))))
983 (define-public python-et-xmlfile
985 (name "python-et-xmlfile")
990 (uri (pypi-uri "et_xmlfile" version))
993 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
994 (build-system python-build-system)
996 `(#:phases (modify-phases %standard-phases
999 (invoke "pytest"))))))
1001 `(("python-pytest" ,python-pytest)
1002 ("python-lxml" ,python-lxml))) ;used for the tests
1003 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1004 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1005 (description "This Python library is based upon the @code{xmlfile} module
1006 from @code{lxml}. It aims to provide a low memory, compatible implementation
1007 of @code{xmlfile}.")
1008 (license license:expat)))
1010 (define-public python2-et-xmlfile
1011 (package-with-python2 python-et-xmlfile))
1013 (define-public python-openpyxl
1015 (name "python-openpyxl")
1019 ;; We use the upstream repository, as the tests are not included in the
1023 (url "https://bitbucket.org/openpyxl/openpyxl")
1024 (changeset version)))
1025 (file-name (string-append name "-" version "-checkout"))
1027 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1028 (build-system python-build-system)
1030 `(#:phases (modify-phases %standard-phases
1033 (invoke "pytest"))))))
1035 ;; For the test suite.
1036 `(("python-lxml" ,python-lxml)
1037 ("python-pillow" ,python-pillow)
1038 ("python-pytest" ,python-pytest)))
1040 `(("python-et-xmlfile" ,python-et-xmlfile)
1041 ("python-jdcal" ,python-jdcal)))
1042 (home-page "https://openpyxl.readthedocs.io")
1043 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1044 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1045 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1047 (license license:expat)))
1049 (define-public python-eventlet
1051 (name "python-eventlet")
1056 (uri (pypi-uri "eventlet" version))
1059 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1060 (build-system python-build-system)
1062 `(("python-greenlet" ,python-greenlet)))
1064 ;; TODO: Requires unpackaged 'enum-compat'.
1066 (home-page "http://eventlet.net")
1067 (synopsis "Concurrent networking library for Python")
1069 "Eventlet is a concurrent networking library for Python that
1070 allows you to change how you run your code, not how you write it.
1071 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1072 Coroutines ensure that the developer uses a blocking style of programming
1073 that is similar to threading, but provide the benefits of non-blocking I/O.
1074 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1075 from the Python interpreter, or as a small part of a larger application.")
1076 (license license:expat)))
1078 (define-public python2-eventlet
1079 (let ((base (package-with-python2
1080 (strip-python2-variant python-eventlet))))
1081 (package (inherit base)
1083 `(("python2-enum34" ,python2-enum34)
1084 ,@(package-propagated-inputs base))))))
1086 (define-public python-six
1093 (uri (pypi-uri "six" version))
1096 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1097 (build-system python-build-system)
1100 (modify-phases %standard-phases
1103 (invoke "py.test" "-v"))))))
1105 `(("python-py" ,python-py)
1106 ("python-pytest" ,python-pytest-bootstrap)))
1107 (home-page "https://pypi.python.org/pypi/six/")
1108 (synopsis "Python 2 and 3 compatibility utilities")
1110 "Six is a Python 2 and 3 compatibility library. It provides utility
1111 functions for smoothing over the differences between the Python versions with
1112 the goal of writing Python code that is compatible on both Python versions.
1113 Six supports every Python version since 2.5. It is contained in only one
1114 Python file, so it can be easily copied into your project.")
1115 (license license:x11)))
1117 (define-public python2-six
1118 (package-with-python2 python-six))
1120 (define-public python-six-bootstrap
1122 (inherit python-six)
1123 (name "python-six-bootstrap")
1125 (arguments `(#:tests? #f))))
1127 (define-public python2-six-bootstrap
1128 (package-with-python2 python-six-bootstrap))
1130 (define-public python-schedule
1132 (name "python-schedule")
1137 (uri (pypi-uri "schedule" version))
1140 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1141 (build-system python-build-system)
1143 `(("python-pytest" ,python-pytest)
1144 ("python-mock" ,python-mock)))
1145 (home-page "https://github.com/dbader/schedule")
1146 (synopsis "Schedule periodic function calls in Python")
1148 "Schedule is an in-process scheduler for periodic jobs that uses the
1149 builder pattern for configuration. Schedule lets you run Python functions (or
1150 any other callable) periodically at pre-determined intervals using a simple,
1151 human-friendly syntax.")
1152 (license license:expat)))
1154 (define-public python2-schedule
1155 (package-with-python2 python-schedule))
1157 (define-public python-pandas
1159 (name "python-pandas")
1164 (uri (pypi-uri "pandas" version))
1166 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1167 (build-system python-build-system)
1169 `(#:modules ((guix build utils)
1170 (guix build python-build-system)
1173 #:phases (modify-phases %standard-phases
1174 (add-after 'unpack 'patch-which
1175 (lambda* (#:key inputs #:allow-other-keys)
1176 (let ((which (assoc-ref inputs "which")))
1177 (substitute* "pandas/io/clipboard/__init__.py"
1178 (("^CHECK_CMD = .*")
1179 (string-append "CHECK_CMD = \"" which "\"\n"))))
1183 (let ((build-directory
1186 (car (scandir "build"
1187 (cut string-prefix? "lib." <>))))))
1188 ;; Disable the "strict data files" option which causes
1189 ;; the build to error out if required data files are
1190 ;; not available (as is the case with PyPI archives).
1191 (substitute* "setup.cfg"
1192 (("addopts = --strict-data-files") "addopts = "))
1193 (with-directory-excursion build-directory
1194 ;; Delete tests that require "moto" which is not yet
1196 (for-each delete-file
1197 '("pandas/tests/io/conftest.py"
1198 "pandas/tests/io/json/test_compression.py"
1199 "pandas/tests/io/parser/test_network.py"
1200 "pandas/tests/io/test_parquet.py"))
1201 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1202 "--skip-network" "-k"
1203 ;; XXX: Due to the deleted tests above.
1204 "not test_read_s3_jsonl"))))))))
1206 `(("python-numpy" ,python-numpy)
1207 ("python-openpyxl" ,python-openpyxl)
1208 ("python-pytz" ,python-pytz)
1209 ("python-dateutil" ,python-dateutil)
1210 ("python-xlrd" ,python-xlrd)))
1212 `(("which" ,which)))
1214 `(("python-cython" ,python-cython)
1215 ("python-beautifulsoup4" ,python-beautifulsoup4)
1216 ("python-lxml" ,python-lxml)
1217 ("python-html5lib" ,python-html5lib)
1218 ("python-nose" ,python-nose)
1219 ("python-pytest" ,python-pytest)
1220 ("python-pytest-mock" ,python-pytest-mock)))
1221 (home-page "https://pandas.pydata.org")
1222 (synopsis "Data structures for data analysis, time series, and statistics")
1224 "Pandas is a Python package providing fast, flexible, and expressive data
1225 structures designed to make working with structured (tabular,
1226 multidimensional, potentially heterogeneous) and time series data both easy
1227 and intuitive. It aims to be the fundamental high-level building block for
1228 doing practical, real world data analysis in Python.")
1229 (license license:bsd-3)))
1231 (define-public python2-pandas
1232 (package-with-python2 python-pandas))
1234 (define-public python2-mechanize
1236 (name "python2-mechanize")
1241 (uri (pypi-uri "mechanize" version))
1244 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1245 (build-system python-build-system)
1247 `(#:python ,python-2 ; apparently incompatible with Python 3
1249 ;; test fails with message
1250 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1251 ;; (python-3.3.2) or
1252 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1254 ;; The source code is from March 2011 and probably not up-to-date
1255 ;; with respect to python unit tests.
1256 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1258 "Stateful programmatic web browsing in Python")
1260 "Mechanize implements stateful programmatic web browsing in Python,
1261 after Andy Lester’s Perl module WWW::Mechanize.")
1262 (license (license:non-copyleft
1264 "See COPYING in the distribution."))))
1267 (define-public python-simplejson
1269 (name "python-simplejson")
1274 (uri (pypi-uri "simplejson" version))
1277 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1278 (build-system python-build-system)
1279 (home-page "http://simplejson.readthedocs.org/en/latest/")
1281 "Json library for Python")
1283 "JSON (JavaScript Object Notation) is a subset of JavaScript
1284 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1287 Simplejson exposes an API familiar to users of the standard library marshal
1288 and pickle modules. It is the externally maintained version of the json
1289 library contained in Python 2.6, but maintains compatibility with Python 2.5
1290 and (currently) has significant performance advantages, even without using
1291 the optional C extension for speedups. Simplejson is also supported on
1293 (license license:x11)))
1295 (define-public python2-simplejson
1296 (package-with-python2 python-simplejson))
1299 (define-public python-pyicu
1301 (name "python-pyicu")
1306 (uri (pypi-uri "PyICU" version))
1309 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1310 (build-system python-build-system)
1312 `(("icu4c" ,icu4c)))
1314 `(("python-pytest" ,python-pytest)
1315 ("python-six" ,python-six)))
1316 (home-page "https://github.com/ovalhub/pyicu")
1317 (synopsis "Python extension wrapping the ICU C++ API")
1319 "PyICU is a python extension wrapping the ICU C++ API.")
1320 (properties `((python2-variant . ,(delay python2-pyicu))))
1321 (license license:x11)))
1323 (define-public python2-pyicu
1324 (let ((base (package-with-python2
1325 (strip-python2-variant python-pyicu))))
1329 `(,@(package-arguments base)
1331 (modify-phases %standard-phases
1332 (add-before 'check 'delete-failing-test
1334 ;; XXX: This fails due to Unicode issues unique to Python 2,
1335 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1336 (delete-file "test/test_Script.py")
1339 (define-public python2-dogtail
1340 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1341 ;; spaces in indentation" with Python 3.
1343 (name "python2-dogtail")
1347 (uri (pypi-uri "dogtail" version))
1350 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1351 (build-system python-build-system)
1352 (arguments `(#:python ,python-2
1353 #:tests? #f)) ; invalid command "test"
1354 ;; Currently no offical homepage.
1355 (home-page "https://pypi.python.org/pypi/dogtail/")
1356 (synopsis "GUI test tool and automation framework written in Python")
1358 "Dogtail is a GUI test tool and automation framework written in Python.
1359 It uses Accessibility (a11y) technologies to communicate with desktop
1360 applications. dogtail scripts are written in Python and executed like any
1361 other Python program.")
1362 (license license:gpl2+)))
1364 (define-public python-empy
1366 (name "python-empy")
1370 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1374 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1375 (build-system python-build-system)
1377 `(#:tests? #f)) ; python2 only
1378 (home-page "http://www.alcyone.com/software/empy/")
1379 (synopsis "Templating system for Python")
1381 "EmPy is a system for embedding Python expressions and statements in
1382 template text; it takes an EmPy source file, processes it, and produces
1383 output. This is accomplished via expansions, which are special signals to the
1384 EmPy system and are set off by a special prefix (by default the at sign, @@).
1385 EmPy can expand arbitrary Python expressions and statements in this way, as
1386 well as a variety of special forms. Textual data not explicitly delimited in
1387 this way is sent unaffected to the output, allowing Python to be used in
1388 effect as a markup language. Also supported are callbacks via hooks,
1389 recording and playback via diversions, and dynamic, chainable filters. The
1390 system is highly configurable via command line options and embedded
1392 (license license:lgpl2.1+)))
1394 (define-public python2-empy
1395 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1398 (arguments `(,@(package-arguments base)
1401 (define-public python2-element-tree
1403 (name "python2-element-tree")
1408 "http://effbot.org/media/downloads/elementtree-"
1409 version "-20050316.tar.gz"))
1412 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1413 (build-system python-build-system)
1415 `(#:python ,python-2 ; seems to be part of Python 3
1416 #:tests? #f)) ; no 'test' sub-command
1417 (synopsis "Toolkit for XML processing in Python")
1419 "ElementTree is a Python library supporting lightweight XML processing.")
1420 (home-page "http://effbot.org/zone/element-index.htm")
1421 (license (license:x11-style
1422 "http://docs.python.org/2/license.html"
1423 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1425 (define-public python2-pybugz
1427 (name "python2-pybugz")
1432 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1436 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1437 (patches (search-patches "pybugz-stty.patch"
1438 "pybugz-encode-error.patch"))))
1439 (build-system python-build-system)
1441 `(#:python ,python-2 ; SyntaxError with Python 3
1442 #:tests? #f)) ; no 'test' sub-command
1444 `(("element-tree" ,python2-element-tree)))
1445 (synopsis "Python and command-line interface to Bugzilla")
1447 "PyBugz is a Python library and command-line tool to query the Bugzilla
1448 bug tracking system. It is meant as an aid to speed up interaction with the
1450 (home-page "http://www.liquidx.net/pybugz/")
1451 (license license:gpl2)))
1453 (define-public python2-enum
1455 (name "python2-enum")
1459 (uri (pypi-uri "enum" version))
1462 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1463 (build-system python-build-system)
1465 `(#:python ,python-2))
1466 (home-page "http://pypi.python.org/pypi/enum/")
1467 (synopsis "Robust enumerated type support in Python")
1469 "This provides a module for robust enumerations in Python. It has
1470 been superseded by the Python standard library and is provided only for
1472 ;; Choice of either license.
1473 (license (list license:gpl3+ license:psfl))))
1475 (define-public python-enum34
1477 (name "python-enum34")
1482 (uri (pypi-uri "enum34" version))
1485 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1486 (build-system python-build-system)
1487 (home-page "https://pypi.python.org/pypi/enum34")
1488 (synopsis "Backported Python 3.4 Enum")
1490 "Enum34 is the new Python stdlib enum module available in Python 3.4
1491 backported for previous versions of Python from 2.4 to 3.3.")
1492 (license license:bsd-3)))
1494 (define-public python2-enum34
1495 (package-with-python2 python-enum34))
1497 (define-public python-parse-type
1499 (name "python-parse-type")
1504 (uri (pypi-uri "parse_type" version))
1507 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1508 (build-system python-build-system)
1510 `(("python-six" ,python-six)
1511 ("python-parse" ,python-parse)))
1513 `(("python-pytest" ,python-pytest)
1514 ("python-pytest-runner" ,python-pytest-runner)))
1515 (home-page "https://github.com/jenisys/parse_type")
1516 (synopsis "Extended parse module")
1518 "Parse_type extends the python parse module.")
1520 `((python2-variant . ,(delay python2-parse-type))))
1521 (license license:bsd-3)))
1523 (define-public python2-parse-type
1524 (let ((base (package-with-python2
1525 (strip-python2-variant python-parse-type))))
1526 (package (inherit base)
1528 `(("python2-enum34" ,python2-enum34)
1529 ,@(package-propagated-inputs base))))))
1531 (define-public python-parse
1533 (name "python-parse")
1538 (uri (pypi-uri "parse" version))
1541 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1542 (build-system python-build-system)
1545 (modify-phases %standard-phases
1547 (lambda _ (invoke "python" "test_parse.py"))))))
1548 (home-page "https://github.com/r1chardj0n3s/parse")
1549 (synopsis "Parse strings")
1551 "Parse strings using a specification based on the Python @code{format()}
1553 (license license:x11)))
1555 (define-public python-polib
1557 (name "python-polib")
1561 (uri (pypi-uri "polib" version))
1564 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1565 (build-system python-build-system)
1566 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1567 (synopsis "Manipulate, create and modify gettext files")
1568 (description "Polib can manipulate any gettext format (po, pot and mo)
1569 files. It can be used to create po files from scratch or to modify
1571 (license license:expat)))
1573 (define-public python2-polib
1574 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1577 (arguments `(,@(package-arguments base)
1578 ;; Tests don't work with python2.
1581 (define-public python-poyo
1583 (name "python-poyo")
1588 (uri (pypi-uri "poyo" version))
1591 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1592 (build-system python-build-system)
1593 (home-page "https://github.com/hackebrot/poyo")
1594 (synopsis "Lightweight YAML Parser for Python")
1596 "This package provides a lightweight YAML Parser for Python. It supports
1597 only a chosen subset of the YAML format that is required to parse cookiecutter
1598 user configuration files. It does not have support for serializing into YAML
1599 and is not compatible with JSON.")
1600 (license license:expat)))
1602 (define-public scons
1609 (url "https://github.com/SCons/scons.git")
1611 (file-name (git-file-name name version))
1614 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1615 (build-system python-build-system)
1617 `(#:use-setuptools? #f ; still relies on distutils
1618 #:tests? #f ; no 'python setup.py test' command
1620 (modify-phases %standard-phases
1621 (add-before 'build 'bootstrap
1623 (substitute* "src/engine/SCons/compat/__init__.py"
1624 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1625 "sys.modules[new] = __import__(old)"))
1626 (substitute* "src/engine/SCons/Platform/__init__.py"
1627 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1628 "mod = __import__(full_name)"))
1629 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1630 (chdir "build/scons")
1632 (home-page "http://scons.org/")
1633 (synopsis "Software construction tool written in Python")
1635 "SCons is a software construction tool. Think of SCons as an improved,
1636 cross-platform substitute for the classic Make utility with integrated
1637 functionality similar to autoconf/automake and compiler caches such as ccache.
1638 In short, SCons is an easier, more reliable and faster way to build
1640 (license license:x11)))
1642 (define-public scons-python2
1644 (inherit (package-with-python2 scons))
1645 (name "scons-python2")))
1647 (define-public python-extras
1649 (name "python-extras")
1654 (uri (pypi-uri "extras" version))
1657 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1658 (build-system python-build-system)
1660 ;; FIXME: Circular dependency on testtools.
1662 (home-page "https://github.com/testing-cabal/extras")
1663 (synopsis "Useful extensions to the Python standard library")
1665 "Extras is a set of extensions to the Python standard library.")
1666 (license license:expat)))
1668 (define-public python2-extras
1669 (package-with-python2 python-extras))
1671 (define-public python-mimeparse
1673 (name "python-mimeparse")
1678 (uri (pypi-uri "python-mimeparse" version))
1681 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1682 (build-system python-build-system)
1685 (modify-phases %standard-phases
1688 (invoke "./mimeparse_test.py"))))))
1690 "https://github.com/dbtsai/python-mimeparse")
1691 (synopsis "Python library for parsing MIME types")
1693 "Mimeparse provides basic functions for parsing MIME type names and
1694 matching them against a list of media-ranges.")
1695 (license license:expat)))
1697 (define-public python2-mimeparse
1698 (package-with-python2 python-mimeparse))
1700 (define-public python-miniboa
1702 (name "python-miniboa")
1707 (uri (pypi-uri "miniboa" version))
1710 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1711 (build-system python-build-system)
1712 (home-page "https://github.com/shmup/miniboa")
1713 (synopsis "Simple, single-threaded Telnet server")
1715 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1717 (license license:asl2.0)))
1719 (define-public python2-miniboa
1720 (package-with-python2 python-miniboa))
1722 (define-public python-pafy
1724 (name "python-pafy")
1729 (uri (pypi-uri "pafy" version))
1732 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1733 (build-system python-build-system)
1735 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1737 ;; Youtube-dl is a python package which is imported in the file
1738 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1739 `(("youtube-dl" ,youtube-dl)))
1740 (home-page "https://np1.github.io/pafy/")
1741 (synopsis "Retrieve YouTube content and metadata")
1743 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1744 (license license:lgpl3+)))
1746 (define-public python2-funcsigs
1748 (name "python2-funcsigs")
1752 (uri (pypi-uri "funcsigs" version))
1755 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1756 (build-system python-build-system)
1758 `(#:python ,python-2))
1760 `(("python2-unittest2" ,python2-unittest2)))
1761 (home-page "http://funcsigs.readthedocs.org")
1762 (synopsis "Python function signatures from PEP362")
1764 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1765 (license license:asl2.0)))
1767 (define-public python2-funcsigs-bootstrap
1769 (inherit python2-funcsigs)
1770 (name "python2-funcsigs-bootstrap")
1774 ,@(package-arguments python2-funcsigs)))))
1776 (define-public python-py
1783 (uri (pypi-uri "py" version))
1786 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1787 (build-system python-build-system)
1789 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1790 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1791 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1792 ;; Is this module globally installed?"
1795 `(("python-setuptools-scm" ,python-setuptools-scm)))
1796 (home-page "https://github.com/pytest-dev/py")
1797 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1799 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1800 code introspection, and logging.")
1801 (license license:expat)))
1803 (define-public python2-py
1804 (package-with-python2 python-py))
1806 ;; Recent versions of python-fixtures and python-testrepository need
1807 ;; python-pbr for packaging, which itself needs these two packages for
1809 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1810 ;; same source, just without any test dependencies and with tests disabled.
1811 ;; python-pbr-minmal is then used to package python-fixtures and
1812 ;; python-testrepository.
1813 ;; Strictly speaking we currently could remove the test-requirements from the
1814 ;; normal python-pbr package (and save this package) since test are disabled
1815 ;; there anyway. But this may change in future.
1816 (define-public python-pbr-minimal
1818 (name "python-pbr-minimal")
1823 (uri (pypi-uri "pbr" version))
1826 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1827 (build-system python-build-system)
1830 (home-page "http://docs.openstack.org/developer/pbr/")
1831 (synopsis "Minimal build of python-pbr used for bootstrapping")
1833 "Used only for bootstrapping python2-pbr, you should not need this.")
1834 (license license:asl2.0)))
1836 (define-public python2-pbr-minimal
1837 (package-with-python2 python-pbr-minimal))
1839 (define-public python-pbr
1841 (inherit python-pbr-minimal)
1844 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1846 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1848 `(("python-fixtures" ,python-fixtures-bootstrap)
1849 ;; discover, coverage, hacking, subunit
1850 ("python-mock" ,python-mock)
1851 ("python-six" ,python-six)
1852 ("python-sphinx" ,python-sphinx)
1853 ("python-testrepository" ,python-testrepository-bootstrap)
1854 ("python-testresources" ,python-testresources-bootstrap)
1855 ("python-testscenarios" ,python-testscenarios-bootstrap)
1856 ("python-testtools" ,python-testtools-bootstrap)
1857 ("python-virtualenv" ,python-virtualenv)))
1858 (synopsis "Enhance the default behavior of Python’s setuptools")
1860 "Python Build Reasonableness (PBR) is a library that injects some useful
1861 and sensible default behaviors into your setuptools run. It will set
1862 versions, process requirements files and generate AUTHORS and ChangeLog file
1863 from git information.
1866 (define-public python2-pbr
1867 (package-with-python2 python-pbr))
1869 (define-public python-pyrsistent
1871 (name "python-pyrsistent")
1873 (home-page "https://github.com/tobgu/pyrsistent")
1876 (uri (pypi-uri "pyrsistent" version))
1879 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1880 (build-system python-build-system)
1882 `(("python-hypothesis" ,python-hypothesis)
1883 ("python-pytest" ,python-pytest)
1884 ("python-pytest-runner" ,python-pytest-runner)))
1886 `(("python-six" ,python-six)))
1887 (synopsis "Persistent data structures for Python")
1889 "Pyrsistent is a number of persistent collections (by some referred to as
1890 functional data structures). Persistent in the sense that they are immutable.
1892 All methods on a data structure that would normally mutate it instead return a
1893 new copy of the structure containing the requested updates. The original
1894 structure is left untouched.")
1895 (license license:expat)))
1897 (define-public python2-pyrsistent
1898 (package-with-python2 python-pyrsistent))
1900 (define-public python-exif-read
1902 (name "python-exif-read")
1906 (uri (pypi-uri "ExifRead" version))
1909 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1910 (build-system python-build-system)
1911 (arguments `(#:tests? #f)) ; no tests
1912 (home-page "https://github.com/ianare/exif-py")
1913 (synopsis "Python library to extract EXIF data from image files")
1915 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1917 (license license:bsd-3)))
1919 (define-public python2-exif-read
1920 (package-with-python2 python-exif-read))
1922 (define-public python-pyld
1924 (name "python-pyld")
1928 (uri (pypi-uri "PyLD" version))
1931 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1932 (build-system python-build-system)
1933 (home-page "https://github.com/digitalbazaar/pyld")
1934 (synopsis "Python implementation of the JSON-LD specification")
1936 "PyLD is an implementation of the JSON-LD specification.")
1937 (license license:bsd-3)))
1939 (define-public python2-pyld
1940 (package-with-python2 python-pyld))
1942 (define-public python-click
1944 (name "python-click")
1949 (uri (pypi-uri "click" version))
1952 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1953 (build-system python-build-system)
1956 (modify-phases %standard-phases
1957 (add-after 'unpack 'fix-paths
1958 (lambda* (#:key inputs #:allow-other-keys)
1959 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1960 "cross-libc" "libc"))))
1961 (substitute* "click/_unicodefun.py"
1963 (string-append "'" glibc "/bin/locale'"))))
1967 (invoke "python" "-m" "pytest"))))))
1969 `(("python-pytest" ,python-pytest)))
1970 (home-page "https://palletsprojects.com/p/click/")
1971 (synopsis "Command line library for Python")
1973 "Click is a Python package for creating command line interfaces in a
1974 composable way with as little code as necessary. Its name stands for
1975 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1976 with sensible defaults out of the box.")
1977 (license license:bsd-3)))
1979 (define-public python2-click
1980 (package-with-python2 python-click))
1982 (define-public python-wheel
1984 (name "python-wheel")
1989 (uri (pypi-uri "wheel" version))
1992 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1993 (build-system python-build-system)
1995 `(("python-jsonschema" ,python-jsonschema)
1996 ("python-pytest-cov" ,python-pytest-cov)))
1997 (home-page "https://bitbucket.org/pypa/wheel/")
1998 (synopsis "Format for built Python packages")
2000 "A wheel is a ZIP-format archive with a specially formatted filename and
2001 the @code{.whl} extension. It is designed to contain all the files for a PEP
2002 376 compatible install in a way that is very close to the on-disk format. Many
2003 packages will be properly installed with only the @code{Unpack} step and the
2004 unpacked archive preserves enough information to @code{Spread} (copy data and
2005 scripts to their final locations) at any later time. Wheel files can be
2006 installed with a newer @code{pip} or with wheel's own command line utility.")
2007 (license license:expat)
2008 (properties `((python2-variant . ,(delay python2-wheel))))))
2010 (define-public python2-wheel
2011 (let ((wheel (package-with-python2
2012 (strip-python2-variant python-wheel))))
2013 (package (inherit wheel)
2014 (native-inputs `(("python2-functools32" ,python2-functools32)
2015 ,@(package-native-inputs wheel))))))
2017 (define-public python-vcversioner
2019 (name "python-vcversioner")
2020 (version "2.16.0.0")
2024 (uri (pypi-uri "vcversioner" version))
2027 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2028 (build-system python-build-system)
2029 (synopsis "Python library for version number discovery")
2030 (description "Vcversioner is a Python library that inspects tagging
2031 information in a variety of version control systems in order to discover
2033 (home-page "https://github.com/habnabit/vcversioner")
2034 (license license:isc)))
2036 (define-public python2-vcversioner
2037 (package-with-python2 python-vcversioner))
2039 (define-public python-jdcal
2041 (name "python-jdcal")
2046 (uri (pypi-uri "jdcal" version))
2049 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2050 (build-system python-build-system)
2052 `(#:phases (modify-phases %standard-phases
2055 (invoke "pytest"))))))
2057 `(("python-pytest" ,python-pytest)))
2058 (home-page "https://github.com/phn/jdcal")
2059 (synopsis "Functions to convert between Julian dates Gregorian dates")
2060 (description "This Python library provides functions for converting
2061 between Julian dates and Gregorian dates.")
2062 (license license:bsd-2)))
2064 (define-public python2-jdcal
2065 (package-with-python2 python-jdcal))
2067 (define-public python-jsonschema
2069 (name "python-jsonschema")
2073 (uri (pypi-uri "jsonschema" version))
2076 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2077 (build-system python-build-system)
2080 (modify-phases %standard-phases
2083 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2084 (invoke "trial" "jsonschema"))))))
2086 `(("python-setuptools_scm" ,python-setuptools-scm)
2087 ("python-twisted" ,python-twisted)))
2089 `(("python-attrs" ,python-attrs)
2090 ("python-pyrsistent" ,python-pyrsistent)
2091 ("python-six" ,python-six)))
2092 (home-page "https://github.com/Julian/jsonschema")
2093 (synopsis "Implementation of JSON Schema for Python")
2095 "Jsonschema is an implementation of JSON Schema for Python.")
2096 (license license:expat)
2097 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2099 (define-public python2-jsonschema
2100 (let ((jsonschema (package-with-python2
2101 (strip-python2-variant python-jsonschema))))
2102 (package (inherit jsonschema)
2104 `(("python2-functools32" ,python2-functools32)
2105 ,@(package-propagated-inputs jsonschema))))))
2107 ;; This old version is still required by docker-compose as of 1.24.0.
2108 (define-public python-jsonschema-2.6
2110 (name "python-jsonschema")
2114 (uri (pypi-uri "jsonschema" version))
2117 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2118 (build-system python-build-system)
2121 (modify-phases %standard-phases
2122 (replace 'check (lambda _ (invoke "nosetests"))))))
2124 `(("python-nose" ,python-nose)
2125 ("python-vcversioner" ,python-vcversioner)))
2126 (home-page "https://github.com/Julian/jsonschema")
2127 (synopsis "Implementation of JSON Schema for Python")
2129 "Jsonschema is an implementation of JSON Schema for Python.")
2130 (license license:expat)
2131 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2133 (define-public python-schema
2135 (name "python-schema")
2140 (uri (pypi-uri "schema" version))
2143 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2144 (build-system python-build-system)
2146 `(("python-pytest" ,python-pytest)))
2147 (home-page "https://github.com/keleshev/schema")
2148 (synopsis "Simple data validation library")
2150 "@code{python-schema} is a library for validating Python data
2151 structures, such as those obtained from config-files, forms, external
2152 services or command-line parsing, converted from JSON/YAML (or
2153 something else) to Python data-types.")
2154 (license license:psfl)))
2156 (define-public python2-schema
2157 (package-with-python2 python-schema))
2159 (define-public python-schema-0.5
2160 (package (inherit python-schema)
2165 (uri (pypi-uri "schema" version))
2168 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2170 (define-public python2-schema-0.5
2171 (package-with-python2 python-schema-0.5))
2173 (define-public python-kitchen
2175 (name "python-kitchen")
2180 (uri (pypi-uri "kitchen" version))
2183 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2184 (build-system python-build-system)
2186 `(("python-chardet" ,python-chardet)))
2187 (home-page "https://github.com/fedora-infra/kitchen")
2188 (synopsis "Python API for snippets")
2189 (description "@code{kitchen} module provides a python API for all sorts of
2190 little useful snippets of code that everybody ends up writing for their projects
2191 but never seem big enough to build an independent release. Use kitchen and stop
2192 cutting and pasting that code over and over.")
2193 (license (list license:lgpl2.1+
2194 ;; subprocess.py, test_subprocess.py,
2195 ;; kitchen/pycompat25/defaultdict.py:
2198 (define-public python2-kitchen
2199 (package-with-python2 python-kitchen))
2201 (define-public python-unidecode
2203 (name "python-unidecode")
2207 (uri (pypi-uri "Unidecode" version))
2210 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2211 (build-system python-build-system)
2212 (home-page "https://pypi.python.org/pypi/Unidecode")
2213 (synopsis "ASCII transliterations of Unicode text")
2215 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2216 useful when integrating with legacy code that doesn't support Unicode, or for
2217 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2218 machine identifiers from human-readable Unicode strings that should still be
2219 somewhat intelligible.")
2220 (license license:gpl2+)))
2222 (define-public python2-unidecode
2223 (package-with-python2 python-unidecode))
2225 (define-public python-pyjwt
2227 (name "python-pyjwt")
2232 (uri (pypi-uri "PyJWT" version))
2235 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2236 (modules '((guix build utils)))
2239 (for-each delete-file-recursively
2240 (find-files "." "\\.pyc$"))
2242 (build-system python-build-system)
2244 `(("python-pytest" ,python-pytest)
2245 ("python-pytest-cov" ,python-pytest-cov)
2246 ("python-pytest-runner" ,python-pytest-runner)))
2247 (home-page "https://github.com/progrium/pyjwt")
2248 (synopsis "JSON Web Token implementation in Python")
2250 "PyJWT is a JSON Web Token implementation written in Python.")
2251 (license license:expat)))
2253 (define-public python2-pyjwt
2254 (package-with-python2 python-pyjwt))
2256 (define-public python-pykka
2258 (name "python-pykka")
2263 (uri (pypi-uri "Pykka" version))
2266 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2267 (build-system python-build-system)
2269 `(("python-mock" ,python-mock)
2270 ("python-nose" ,python-nose)
2271 ("python-gevent" ,python-gevent)
2272 ("python-eventlet" ,python-eventlet)))
2273 (home-page "https://www.pykka.org/")
2274 (synopsis "Pykka is a Python implementation of the actor model")
2276 "Pykka is a Python implementation of the actor model.
2277 The actor model introduces some simple rules to control the sharing
2278 of state and cooperation between execution units, which makes it
2279 easier to build concurrent applications.")
2280 (license license:asl2.0)))
2282 (define-public python2-pykka
2283 (package-with-python2 python-pykka))
2285 (define-public python-pymsgbox
2287 (name "python-pymsgbox")
2293 ;; LICENSE.txt is not present on pypi
2294 (url "https://github.com/asweigart/PyMsgBox")
2295 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2296 (file-name (git-file-name name version))
2299 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2301 ;; Circular dependency to run tests:
2302 ;; Tests need pyautogui, which depends on pymsgbox.
2304 (build-system python-build-system)
2305 (home-page "https://github.com/asweigart/PyMsgBox")
2306 (synopsis "Python module for JavaScript-like message boxes")
2308 "PyMsgBox is a simple, cross-platform, pure Python module for
2309 JavaScript-like message boxes. Types of dialog boxes include:
2317 (license license:bsd-3)))
2319 (define-public python-pympler
2321 (name "python-pympler")
2322 (home-page "https://pythonhosted.org/Pympler/")
2326 (uri (pypi-uri "Pympler" version))
2329 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2330 (build-system python-build-system)
2332 `(#:phases (modify-phases %standard-phases
2334 (add-after 'install 'check
2335 (lambda* (#:key inputs outputs #:allow-other-keys)
2336 (add-installed-pythonpath inputs outputs)
2337 (invoke "python" "setup.py" "test"))))))
2338 (synopsis "Measure, monitor and analyze memory behavior")
2340 "Pympler is a development tool to measure, monitor and analyze
2341 the memory behavior of Python objects in a running Python application.
2343 By pympling a Python application, detailed insight in the size and the
2344 lifetime of Python objects can be obtained. Undesirable or unexpected
2345 runtime behavior like memory bloat and other @samp{pymples} can easily
2348 A web profiling frontend exposes process statistics, garbage
2349 visualisation and class tracker statistics.")
2350 (license license:asl2.0)))
2352 (define-public python2-pympler
2353 (package-with-python2 python-pympler))
2355 (define-public python-itsdangerous
2357 (name "python-itsdangerous")
2362 (uri (pypi-uri "itsdangerous" version))
2365 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2366 (build-system python-build-system)
2367 (home-page "https://palletsprojects.com/p/itsdangerous/")
2368 (synopsis "Python library for passing data to/from untrusted environments")
2370 "Itsdangerous provides various helpers to pass trusted data to untrusted
2371 environments and back.")
2372 (license license:bsd-3)))
2374 (define-public python2-itsdangerous
2375 (package-with-python2 python-itsdangerous))
2377 (define-public python-pyyaml
2379 (name "python-pyyaml")
2384 (uri (pypi-uri "PyYAML" version))
2387 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2388 (build-system python-build-system)
2390 `(("libyaml" ,libyaml)))
2391 (home-page "http://pyyaml.org/wiki/PyYAML")
2392 (synopsis "YAML parser and emitter for Python")
2394 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2395 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2396 API, and sensible error messages. PyYAML supports standard YAML tags and
2397 provides Python-specific tags that allow to represent an arbitrary Python
2399 (license license:expat)))
2401 (define-public python2-pyyaml
2402 (package-with-python2 python-pyyaml))
2404 (define-public python-vine
2406 (name "python-vine")
2411 (uri (pypi-uri "vine" version))
2414 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2415 (build-system python-build-system)
2417 `(("python-pytest" ,python-pytest)
2418 ("python-case" ,python-case)))
2419 (home-page "https://github.com/celery/vine")
2420 (synopsis "Promises for Python")
2422 "@code{vine} provides a special implementation of promises in that it can
2423 be used both for \"promise of a value\" and lazy evaluation. The biggest
2424 upside for this is that everything in a promise can also be a promise,
2425 e.g. filters, callbacks and errbacks can all be promises.")
2426 (license license:bsd-3)))
2428 (define-public python-virtualenv
2430 (name "python-virtualenv")
2435 (uri (pypi-uri "virtualenv" version))
2438 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2439 (build-system python-build-system)
2442 (modify-phases %standard-phases
2443 (add-before 'check 'disable-failing-test
2445 ;; Disable failing test. See upstream bug report
2446 ;; https://github.com/pypa/virtualenv/issues/957
2447 (substitute* "tests/test_virtualenv.py"
2448 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2451 `(("python-mock" ,python-mock)
2452 ("python-pytest" ,python-pytest)))
2453 (home-page "https://virtualenv.pypa.io/")
2454 (synopsis "Virtual Python environment builder")
2456 "Virtualenv is a tool to create isolated Python environments.")
2457 (license license:expat)))
2459 (define-public python2-virtualenv
2460 (package-with-python2 python-virtualenv))
2462 (define-public python-markupsafe
2464 (name "python-markupsafe")
2469 (uri (pypi-uri "MarkupSafe" version))
2472 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2473 (build-system python-build-system)
2475 `(#:modules ((ice-9 ftw)
2479 (guix build python-build-system))
2480 #:phases (modify-phases %standard-phases
2483 (let ((cwd (getcwd))
2484 (libdir (find (cut string-prefix? "lib." <>)
2485 (scandir "build"))))
2486 (setenv "PYTHONPATH"
2487 (string-append cwd "/build/" libdir ":"
2488 (getenv "PYTHONPATH")))
2489 (invoke "pytest" "-vv")))))))
2491 `(("python-pytest" ,python-pytest)))
2492 (home-page "https://github.com/mitsuhiko/markupsafe")
2493 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2495 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2497 (license license:bsd-3)))
2499 (define-public python2-markupsafe
2500 (package-with-python2 python-markupsafe))
2502 (define-public python-jinja2
2504 (name "python-jinja2")
2509 (uri (pypi-uri "Jinja2" version))
2512 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2513 (build-system python-build-system)
2515 `(("python-markupsafe" ,python-markupsafe)))
2516 (home-page "http://jinja.pocoo.org/")
2517 (synopsis "Python template engine")
2519 "Jinja2 is a small but fast and easy to use stand-alone template engine
2520 written in pure Python.")
2521 (license license:bsd-3)))
2523 (define-public python2-jinja2
2524 (package-with-python2 python-jinja2))
2526 (define-public python-jinja2-time
2528 (name "python-jinja2-time")
2533 (uri (pypi-uri "jinja2-time" version))
2536 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2537 (build-system python-build-system)
2539 `(("python-arrow" ,python-arrow)
2540 ("python-jinja2" ,python-jinja2)))
2542 "https://github.com/hackebrot/jinja2-time")
2543 (synopsis "Jinja2 Extension for Dates and Times")
2545 "This package provides an extension for the template engine Jinja2. It
2546 adds a 'now' tag providing a convenient access to the arrow.now() API from
2547 templates. A format string can be provided to control the output.")
2548 (license license:expat)))
2550 (define-public python-pystache
2552 (name "python-pystache")
2556 (uri (pypi-uri "pystache" version))
2559 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2560 (build-system python-build-system)
2562 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2563 (home-page "http://defunkt.io/pystache/")
2564 (synopsis "Python logic-less template engine")
2566 "Pystache is a Python implementation of the framework agnostic,
2567 logic-free templating system Mustache.")
2568 (license license:expat)
2569 (properties `((python2-variant . ,(delay python2-pystache))))))
2571 (define-public python2-pystache
2572 (package (inherit (package-with-python2
2573 (strip-python2-variant python-pystache)))
2575 `(#:python ,python-2
2577 (modify-phases %standard-phases
2580 (invoke "python" "test_pystache.py"))))))))
2582 (define-public python-joblib
2584 (name "python-joblib")
2588 (uri (pypi-uri "joblib" version))
2591 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2592 (build-system python-build-system)
2595 (modify-phases %standard-phases
2597 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2599 `(("python-pytest" ,python-pytest)))
2600 (home-page "https://joblib.readthedocs.io/")
2601 (synopsis "Using Python functions as pipeline jobs")
2603 "Joblib is a set of tools to provide lightweight pipelining in Python.
2604 In particular, joblib offers: transparent disk-caching of the output values
2605 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2606 logging and tracing of the execution.")
2607 (license license:bsd-3)))
2609 (define-public python2-joblib
2610 (package-with-python2 python-joblib))
2612 (define-public python-daemon
2614 (name "python-daemon")
2619 (uri (pypi-uri "python-daemon" version))
2622 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2623 (build-system python-build-system)
2626 (modify-phases %standard-phases
2627 (add-before 'check 'disable-tests
2629 ;; FIXME: Determine why test fails
2630 (substitute* "test/test_daemon.py"
2631 (("test_detaches_process_context")
2632 "skip_test_detaches_process_context"))
2635 `(("python-lockfile" ,python-lockfile)))
2637 `(("python-unittest2" ,python-unittest2)
2638 ("python-testtools" ,python-testtools)
2639 ("python-testscenarios" ,python-testscenarios)
2640 ("python-mock" ,python-mock)
2641 ("python-docutils" ,python-docutils)))
2642 (home-page "https://pagure.io/python-daemon/")
2643 (synopsis "Python library for making a Unix daemon process")
2644 (description "Python-daemon is a library that assists a Python program to
2645 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2647 This library provides a @code{DaemonContext} class that manages the following
2648 important tasks for becoming a daemon process:
2650 @item Detach the process into its own process group.
2651 @item Set process environment appropriate for running inside a chroot.
2652 @item Renounce suid and sgid privileges.
2653 @item Close all open file descriptors.
2654 @item Change the working directory, uid, gid, and umask.
2655 @item Set appropriate signal handlers.
2656 @item Open new file descriptors for stdin, stdout, and stderr.
2657 @item Manage a specified PID lock file.
2658 @item Register cleanup functions for at-exit processing.
2660 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2661 (license (list license:asl2.0 license:gpl3+))))
2663 (define-public python-docutils
2665 (name "python-docutils")
2670 (uri (pypi-uri "docutils" version))
2673 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2674 (build-system python-build-system)
2676 '(#:tests? #f)) ; no setup.py test command
2677 (home-page "http://docutils.sourceforge.net/")
2678 (synopsis "Python Documentation Utilities")
2680 "Docutils is a modular system for processing documentation into useful
2681 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2683 ;; Most of the source code is public domain, but some source files are
2684 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2685 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2687 (define-public python2-docutils
2688 (package-with-python2 python-docutils))
2690 (define-public python-pygments
2692 (name "python-pygments")
2697 (uri (pypi-uri "Pygments" version))
2700 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2701 (build-system python-build-system)
2703 ;; FIXME: Tests require sphinx, which depends on this.
2705 (home-page "http://pygments.org/")
2706 (synopsis "Syntax highlighting")
2708 "Pygments is a syntax highlighting package written in Python.")
2709 (license license:bsd-2)))
2711 (define-public python2-pygments
2712 (package-with-python2 python-pygments))
2714 (define-public python-bumpversion
2716 (name "python-bumpversion")
2721 (uri (pypi-uri "bumpversion" version))
2724 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2725 (build-system python-build-system)
2726 (home-page "https://github.com/peritus/bumpversion")
2727 (synopsis "Tool to bump software version")
2728 (description "This tool provides a command-line interface (CLI) to bump a
2729 software version simply.")
2730 (license license:expat)))
2732 (define-public python-deprecated
2734 (name "python-deprecated")
2740 (url "https://github.com/tantale/deprecated.git")
2741 (commit (string-append "v" version))))
2742 (file-name (git-file-name name version))
2745 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2746 (build-system python-build-system)
2748 `(#:phases (modify-phases %standard-phases
2751 (invoke "pytest"))))))
2753 `(("python-wrapt" ,python-wrapt)))
2755 `(("python-bumpversion" ,python-bumpversion)
2756 ("python-pytest" ,python-pytest)
2757 ("python-pytest-cov" ,python-pytest-cov)
2758 ("python-sphinx" ,python-sphinx)
2759 ("python-tox" ,python-tox)))
2760 (home-page "https://github.com/tantale/deprecated")
2761 (synopsis "Python decorator to deprecate classes, functions or methods")
2762 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2763 to deprecate classes, functions or methods.")
2764 (license license:expat)))
2766 (define-public python-pygithub
2768 (name "python-pygithub")
2771 ;; We fetch from the Git repo because there are no tests in the PyPI
2776 (url "https://github.com/PyGithub/PyGithub.git")
2777 (commit (string-append "v" version))))
2778 (file-name (git-file-name name version))
2780 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2781 (build-system python-build-system)
2783 `(#:phases (modify-phases %standard-phases
2784 ;; Some tests rely on the network.
2785 (add-after 'unpack 'disable-failing-tests
2787 (substitute* "tests/Issue142.py"
2788 (("testDecodeJson") "disabled_testDecodeJson"))
2790 (add-before 'check 'prepare-for-tests
2792 (for-each (lambda (f)
2794 (find-files "./tests"))
2795 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2796 (setenv "PYTHONPATH"
2797 (string-append "./tests:" (getenv "PYTHONPATH")))
2800 `(("python-deprecated" ,python-deprecated)
2801 ("python-pyjwt" ,python-pyjwt)
2802 ("python-requests" ,python-requests)))
2803 (native-inputs `(("python-httpretty" ,python-httpretty)))
2804 (home-page "https://pygithub.readthedocs.io/en/latest/")
2805 (synopsis "Python library for the GitHub API")
2806 (description "This library allows managing GitHub resources such as
2807 repositories, user profiles, and organizations in your Python applications,
2808 using version 3 of the GitHub application programming interface (API).")
2809 (license license:lgpl3+)))
2811 (define-public python-rellu
2813 (name "python-rellu")
2818 (uri (pypi-uri "rellu" version))
2821 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2822 (build-system python-build-system)
2824 `(("python-invoke" ,python-invoke)
2825 ("python-pygithub" ,python-pygithub)))
2826 (home-page "https://github.com/robotframework/rellu")
2827 (synopsis "Utilities to create PyPI releases")
2828 (description "This collection of utilities contains tooling and templates
2829 to assist in creating releases on GitHub and publishing them on PyPI. It is
2830 designed to be used by Robot Framework and tools and libraries in its
2831 ecosystem, but can naturally be used also by other projects.")
2832 (license license:asl2.0)))
2834 (define-public python-robotframework
2836 (name "python-robotframework")
2838 ;; There are no tests in the PyPI archive.
2843 (url "https://github.com/robotframework/robotframework.git")
2844 (commit (string-append "v" version))))
2845 (file-name (git-file-name name version))
2847 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2848 (patches (search-patches
2849 "python-robotframework-honor-source-date-epoch.patch"))))
2850 (build-system python-build-system)
2852 `(#:phases (modify-phases %standard-phases
2853 (add-before 'build 'build-and-install-doc
2854 (lambda* (#:key outputs #:allow-other-keys)
2855 (let* ((doc-output (assoc-ref outputs "doc"))
2856 (doc (string-append doc-output "/share/"
2857 ,name "-" ,version "/")))
2858 (invoke "invoke" "library-docs" "all")
2860 (copy-recursively "doc/libraries"
2861 (string-append doc "/libraries"))
2865 (invoke "python" "utest/run.py"))))))
2867 `(("python-invoke" ,python-invoke)
2868 ("python-rellu" ,python-rellu)
2869 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2870 (outputs '("out" "doc"))
2871 (home-page "https://robotframework.org")
2872 (synopsis "Generic automation framework")
2873 (description "Robot Framework is a generic automation framework for
2874 acceptance testing, acceptance test driven development (ATDD), and robotic
2875 process automation (RPA).")
2876 (license license:asl2.0)))
2878 (define-public python-robotframework-lint
2879 ;; There is no properly tagged release; the commit below seems to correspond
2880 ;; to the 0.9 stable release available from PyPI. The tests are not
2881 ;; included in the PyPI archive, so we fetch the sources from the upstream
2883 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2886 (name "python-robotframework-lint")
2887 (version (git-version "0.9.0" revision commit))
2892 (url "https://github.com/boakley/robotframework-lint.git")
2894 (file-name (git-file-name name version))
2897 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2898 (build-system python-build-system)
2901 (modify-phases %standard-phases
2904 (invoke "python" "-m" "robot" "-A"
2905 "tests/conf/default.args" "tests"))))))
2907 `(("python-robotframework" ,python-robotframework)))
2908 (home-page "https://github.com/boakley/robotframework-lint/")
2909 (synopsis "Static analysis tool (linter) for Robot Framework")
2910 (description "This package provides the @code{rflint} command-line
2911 utility, a static analysis tool (linter) for Robot Framework source files.")
2912 (license license:asl2.0))))
2914 (define-public python-robotframework-sshlibrary
2916 (name "python-robotframework-sshlibrary")
2918 ;; There are no tests in the PyPI archive.
2923 (url "https://github.com/robotframework/SSHLibrary.git")
2924 (commit (string-append "v" version))))
2925 (file-name (git-file-name name version))
2928 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2929 (build-system python-build-system)
2932 (modify-phases %standard-phases
2933 (add-before 'build 'build-and-install-doc
2934 (lambda* (#:key outputs #:allow-other-keys)
2935 (let* ((doc-output (assoc-ref outputs "doc"))
2936 (doc (string-append doc-output "/share/"
2937 ,name "-" ,version "/")))
2938 (invoke "chmod" "-R" "+w" "docs")
2939 (invoke "invoke" "kw-docs" "project-docs")
2941 (for-each delete-file (find-files "docs" "\\.rst"))
2942 (copy-recursively "docs" doc)
2946 ;; Some tests require an SSH server; we remove them.
2947 (delete-file "utest/test_client_api.py")
2948 (delete-file "utest/test_scp.py")
2949 (invoke "python" "utest/run.py"))))))
2951 `(("python-robotframework" ,python-robotframework)
2952 ("python-paramiko" ,python-paramiko)
2953 ("python-scp" ,python-scp)))
2955 `(("openssh" ,openssh)
2957 ;; To generate the documentation
2958 ("python-docutils" ,python-docutils)
2959 ("python-invoke" ,python-invoke)
2960 ("python-pygments" ,python-pygments)
2961 ("python-rellu" ,python-rellu)))
2962 (outputs '("out" "doc"))
2963 (home-page "https://github.com/robotframework/SSHLibrary")
2964 (synopsis "Robot Framework library for SSH and SFTP")
2965 (description "SSHLibrary is a Robot Framework library providing support
2966 for SSH and SFTP. It has the following main usages:
2968 @item Executing commands on the remote machine, either blocking or non-blocking.
2969 @item Writing and reading in an interactive shell.
2970 @item Transferring files and directories over SFTP.
2971 @item Ensuring that files and directories exist on the remote machine.
2973 (license license:asl2.0)))
2975 (define-public python-scp
2982 (uri (pypi-uri "scp" version))
2985 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2986 (build-system python-build-system)
2988 '(#:tests? #f)) ;tests require an SSH server
2990 `(("python-paramiko" ,python-paramiko)))
2991 (home-page "https://github.com/jbardin/scp.py")
2992 (synopsis "SCP protocol module for Python and Paramiko")
2993 (description "The scp module extends the Paramiko library to send and
2994 receive files via the SCP1 protocol, as implemented by the OpenSSH
2995 @command{scp} program.")
2996 (license license:gpl2+)))
2998 (define-public python-rst.linker
3000 (name "python-rst.linker")
3005 (uri (pypi-uri "rst.linker" version))
3007 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3008 (build-system python-build-system)
3010 `(("python-dateutil" ,python-dateutil)
3011 ("python-six" ,python-six)))
3013 `(("python-setuptools-scm" ,python-setuptools-scm)))
3014 ;; Test would require path.py, which would introduce a cyclic dependence.
3015 (arguments `(#:tests? #f))
3016 ;; Note: As of version 1.7 the documentation is not worth building.
3017 (home-page "https://github.com/jaraco/rst.linker")
3018 (synopsis "Sphinx plugin to add links and timestamps")
3019 (description "rst.linker allows to automatically replace text by a
3020 reStructuredText external reference or timestamps. It's primary purpose is to
3021 augment the changelog, but it can be used for other documents, too.")
3022 (license license:expat)))
3024 (define-public python2-rst.linker
3025 (package-with-python2 python-rst.linker))
3027 (define-public python-feedgenerator
3029 (name "python-feedgenerator")
3034 (uri (pypi-uri "feedgenerator" version))
3037 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3038 (modules '((guix build utils)))
3041 ;; Remove pre-compiled .pyc files from source.
3042 (for-each delete-file-recursively
3043 (find-files "." "__pycache__" #:directories? #t))
3044 (for-each delete-file (find-files "." "\\.pyc$"))
3046 (build-system python-build-system)
3048 `(("python-pytz" ,python-pytz)
3049 ("python-six" ,python-six)))
3050 (home-page "https://github.com/getpelican/feedgenerator")
3052 "Standalone version of Django's Atom/RSS feed generator")
3054 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3055 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3056 (license license:bsd-3)))
3058 (define-public python2-feedgenerator
3059 (package-with-python2 python-feedgenerator))
3061 (define-public python-toml
3063 (name "python-toml")
3068 (uri (pypi-uri "toml" version))
3071 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3072 (build-system python-build-system)
3074 `(#:tests? #f)) ;no tests suite in release
3075 (home-page "https://github.com/uiri/toml")
3076 (synopsis "Library for TOML")
3078 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3079 Language (TOML) configuration files.")
3080 (license license:expat)))
3082 (define-public python-jsonrpc-server
3084 (name "python-jsonrpc-server")
3089 (uri (pypi-uri "python-jsonrpc-server" version))
3092 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3093 (build-system python-build-system)
3095 `(("python-future" ,python-future)
3096 ("python-mock" ,python-mock)
3097 ("python-pytest" ,python-pytest)))
3099 "https://github.com/palantir/python-jsonrpc-server")
3100 (synopsis "JSON RPC 2.0 server library")
3102 "This package provides a JSON RPC 2.0 server library for Python.")
3103 (license license:expat)))
3105 (define-public python-pydocstyle
3107 (name "python-pydocstyle")
3112 (uri (pypi-uri "pydocstyle" version))
3115 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3116 (build-system python-build-system)
3118 `(("python-six" ,python-six)
3119 ("python-snowballstemmer" ,python-snowballstemmer)))
3121 "https://github.com/PyCQA/pydocstyle/")
3122 (synopsis "Python docstring style checker")
3124 "This package provides a style checker for the Python Language
3126 (license license:expat)))
3128 (define-public python-language-server
3130 (name "python-language-server")
3135 (uri (pypi-uri "python-language-server" version))
3138 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3139 (build-system python-build-system)
3141 `(("python-pluggy" ,python-pluggy)
3142 ("python-jsonrpc-server" ,python-jsonrpc-server)
3143 ("python-jedi" ,python-jedi)
3144 ("python-yapf" ,python-yapf)
3145 ("python-pyflakes" ,python-pyflakes)
3146 ("python-pydocstyle" ,python-pydocstyle)
3147 ("python-pycodestyle" ,python-pycodestyle)
3148 ("python-mccabe" ,python-mccabe)
3149 ("python-rope" ,python-rope)
3150 ("python-autopep8" ,python-autopep8)
3151 ("python-flake8" ,python-flake8)
3152 ("python-pylint" ,python-pylint)))
3153 (home-page "https://github.com/palantir/python-language-server")
3154 (synopsis "Python implementation of the Language Server Protocol")
3156 "The Python Language Server (pyls) is an implementation of the Python 3
3157 language specification for the Language Server Protocol (LSP). This tool is
3158 used in text editing environments to provide a complete and integrated
3159 feature-set for programming Python effectively.")
3160 (license license:expat)))
3162 (define-public python-black
3164 (name "python-black")
3169 (uri (pypi-uri "black" version))
3172 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3173 (build-system python-build-system)
3176 (modify-phases %standard-phases
3177 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3179 (let ((python3 (which "python3")))
3180 (substitute* '("tests/data/fmtonoff.py"
3181 "tests/data/string_prefixes.py"
3182 "tests/data/function.py")
3183 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3184 (string-append "#!" python3 (if (string? minor-version)
3188 `(("python-click" ,python-click)
3189 ("python-attrs" ,python-attrs)
3190 ("python-appdirs" ,python-appdirs)
3191 ("python-toml" ,python-toml)))
3192 (home-page "https://github.com/ambv/black")
3193 (synopsis "The uncompromising code formatter")
3194 (description "Black is the uncompromising Python code formatter.")
3195 (license license:expat)))
3197 (define-public python-blinker
3199 (name "python-blinker")
3204 (uri (pypi-uri "blinker" version))
3207 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3208 (build-system python-build-system)
3209 (home-page "http://pythonhosted.org/blinker/")
3210 (synopsis "Fast, simple object-to-object and broadcast signaling")
3212 "Blinker provides a fast dispatching system that allows any number of
3213 interested parties to subscribe to events, or \"signals\".")
3214 (license license:expat)))
3216 (define-public python2-blinker
3217 (package-with-python2 python-blinker))
3219 (define-public pelican
3226 (uri (pypi-uri "pelican" version))
3229 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3230 (build-system python-build-system)
3232 `(("python-feedgenerator" ,python-feedgenerator)
3233 ("python-jinja2" ,python-jinja2)
3234 ("python-pygments" ,python-pygments)
3235 ("python-docutils" ,python-docutils)
3236 ("python-pytz" ,python-pytz)
3237 ("python-blinker" ,python-blinker)
3238 ("python-unidecode" ,python-unidecode)
3239 ("python-six" ,python-six)
3240 ("python-dateutil" ,python-dateutil)
3241 ("python-markdown" ,python-markdown)))
3242 (home-page "https://getpelican.com/")
3244 `(;; XXX Requires a lot more packages to do unit tests :P
3246 #:phases (modify-phases %standard-phases
3248 'install 'adjust-requires
3249 ;; Since feedgenerator is installed from git, it doesn't
3250 ;; conform to the version requirements.
3252 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3253 ;; version requirement so setuptools doesn't get confused.
3255 (substitute* "setup.py"
3256 (("['\"]feedgenerator.*?['\"]")
3257 "'feedgenerator'")))))))
3258 (synopsis "Python-based static site publishing system")
3260 "Pelican is a tool to generate a static blog from reStructuredText,
3261 Markdown input files, and more. Pelican uses Jinja2 for templating
3262 and is very extensible.")
3263 (license license:agpl3+)))
3265 (define-public mallard-ducktype
3267 (name "mallard-ducktype")
3272 ;; git-reference because tests are not included in pypi source tarball
3273 ;; https://issues.guix.gnu.org/issue/36755#2
3275 (url "https://github.com/projectmallard/mallard-ducktype.git")
3277 (file-name (git-file-name name version))
3280 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3281 (build-system python-build-system)
3284 (modify-phases %standard-phases
3287 (with-directory-excursion "tests"
3288 (invoke "sh" "runtests")))))))
3289 (home-page "http://projectmallard.org")
3290 (synopsis "Convert Ducktype to Mallard documentation markup")
3292 "Ducktype is a lightweight syntax that can represent all the semantics
3293 of the Mallard XML documentation system. Ducktype files can be converted to
3294 Mallard using the @command{ducktype} tool. The yelp-tools package
3295 provides additional functionality on the produced Mallard documents.")
3296 (license license:expat)))
3298 (define-public python-scikit-image
3300 (name "python-scikit-image")
3305 (uri (pypi-uri "scikit-image" version))
3307 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3308 (build-system python-build-system)
3310 ;; TODO: Some tests require running X11 server. Disable them?
3312 ;; See DEPENDS.txt for the list of build and run time requiremnts
3314 `(("python-cloudpickle" ,python-cloudpickle)
3315 ("python-dask" ,python-dask)
3316 ("python-matplotlib" ,python-matplotlib)
3317 ("python-networkx" ,python-networkx)
3318 ("python-numpy" ,python-numpy)
3319 ("python-pillow" ,python-pillow)
3320 ("python-pywavelets" ,python-pywavelets)
3321 ("python-scipy" ,python-scipy)
3322 ("python-six" ,python-six)))
3324 `(("python-cython" ,python-cython)))
3325 (home-page "http://scikit-image.org/")
3326 (synopsis "Image processing in Python")
3328 "Scikit-image is a collection of algorithms for image processing.")
3329 (license license:bsd-3)))
3331 (define-public python2-scikit-image
3332 (package-with-python2 python-scikit-image))
3334 (define-public python-cython
3336 (name "python-cython")
3341 (uri (pypi-uri "Cython" version))
3344 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3345 (build-system python-build-system)
3346 ;; we need the full python package and not just the python-wrapper
3347 ;; because we need libpython3.3m.so
3349 `(("python" ,python)))
3352 (modify-phases %standard-phases
3353 (add-before 'check 'set-HOME
3354 ;; some tests require access to "$HOME/.cython"
3355 (lambda _ (setenv "HOME" "/tmp") #t))
3357 ;; FIXME: These tests started failing on armhf after the 0.28 update
3358 ;; (commit c69d11c5930), both with an error such as this:
3359 ;; compiling (cpp) and running dictcomp ...
3360 ;; === C/C++ compiler error output: ===
3362 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3363 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3364 ,@(if (target-arm32?)
3365 `((add-before 'check 'disable-failing-tests
3367 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3368 (for-each (lambda (test)
3369 (format disabled-tests "~a\n" test))
3370 '("memslice" "dictcomp"))
3371 (close-port disabled-tests)))))
3376 ;; Disable compiler optimizations to greatly reduce the running
3377 ;; time of the test suite.
3378 (setenv "CFLAGS" "-O0")
3380 (invoke "python" "runtests.py" "-vv"
3381 "-j" (number->string (parallel-job-count))))))))
3382 (home-page "https://cython.org/")
3383 (synopsis "C extensions for Python")
3384 (description "Cython is an optimising static compiler for both the Python
3385 programming language and the extended Cython programming language. It makes
3386 writing C extensions for Python as easy as Python itself.")
3387 (license license:asl2.0)
3388 (properties `((python2-variant . ,(delay python2-cython))))))
3390 (define-public python2-cython
3391 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3394 (name "python2-cython")
3396 `(("python-2" ,python-2))) ;this is not automatically changed
3398 (substitute-keyword-arguments (package-arguments base)
3400 `(modify-phases ,phases
3401 (add-before 'check 'adjust-test_embed
3403 (substitute* "runtests.py"
3404 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3405 ;; so it can give the right -L flag to GCC when embedding static
3406 ;; builds of Python. It is unaware that the Python "config"
3407 ;; directory (where the static library lives) was renamed in
3408 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3409 ;; which works fine, because that is where the shared library is.
3411 ;; It also appears to be unaware that the Makefile in Demos/embed
3412 ;; already unconditionally pass the static library location to GCC,
3413 ;; after checking sysconfig.get_config_var('LIBPL).
3415 ;; The effect is that the linker is unable to resolve libexpat
3416 ;; symbols when building for Python 2, because neither the Python 2
3417 ;; shared library nor Expat is available. To fix it, we can either
3418 ;; add Expat as an input and make it visible to the linker, or just
3419 ;; prevent it from overriding the Python shared library location.
3420 ;; The end result is identical, so we take the easy route.
3421 ((" or libname not in os\\.listdir\\(libdir\\)")
3425 ;; The RPython toolchain currently does not support Python 3.
3426 (define-public python2-rpython
3428 (name "python2-rpython")
3433 (uri (pypi-uri "rpython" version))
3436 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3437 (build-system python-build-system)
3438 (arguments `(#:python ,python-2))
3440 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3441 (home-page "https://rpython.readthedocs.org")
3442 (synopsis "Framework for implementing interpreters and virtual machines")
3443 (description "RPython is a translation and support framework for
3444 producing implementations of dynamic languages, emphasizing a clean separation
3445 between language specification and implementation aspects.")
3446 (license license:expat)))
3448 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3449 ;; python-scipy still build, as these three packages are often used together.
3450 (define-public python-numpy
3452 (name "python-numpy")
3458 "https://github.com/numpy/numpy/releases/download/v"
3459 version "/numpy-" version ".tar.gz"))
3462 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3463 (build-system python-build-system)
3465 `(("openblas" ,openblas)
3466 ("lapack" ,lapack)))
3468 `(("python-cython" ,python-cython)
3469 ("python-pytest" ,python-pytest)
3470 ("gfortran" ,gfortran)))
3473 (modify-phases %standard-phases
3474 (add-before 'build 'configure-blas-lapack
3475 (lambda* (#:key inputs #:allow-other-keys)
3476 (call-with-output-file "site.cfg"
3480 libraries = openblas
3481 library_dirs = ~a/lib
3482 include_dirs = ~a/include
3484 # backslash-n to make emacs happy
3486 lapack_libs = lapack
3487 library_dirs = ~a/lib
3488 include_dirs = ~a/include
3490 (assoc-ref inputs "openblas")
3491 (assoc-ref inputs "openblas")
3492 (assoc-ref inputs "lapack")
3493 (assoc-ref inputs "lapack"))))
3495 (add-before 'build 'fix-executable-paths
3496 (lambda* (#:key inputs #:allow-other-keys)
3497 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3498 ;; instead of /bin/sh.
3499 (substitute* "numpy/distutils/exec_command.py"
3500 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3501 (string-append match-start (assoc-ref inputs "bash") match-end)))
3502 ;; Use "gcc" executable, not "cc".
3503 (substitute* "numpy/distutils/system_info.py"
3504 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3505 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3507 ;; Tests can only be run after the library has been installed and not
3508 ;; within the source directory.
3510 (add-after 'install 'check
3511 (lambda* (#:key outputs inputs #:allow-other-keys)
3512 ;; Make installed package available for running the tests
3513 (add-installed-pythonpath inputs outputs)
3514 ;; Make sure "f2py" etc is found.
3515 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3516 ":" (getenv "PATH")))
3517 (with-directory-excursion "/tmp"
3518 (invoke "python" "-c"
3519 "import numpy; numpy.test(verbose=2)")))))))
3520 (home-page "http://www.numpy.org/")
3521 (synopsis "Fundamental package for scientific computing with Python")
3522 (description "NumPy is the fundamental package for scientific computing
3523 with Python. It contains among other things: a powerful N-dimensional array
3524 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3525 and Fortran code, useful linear algebra, Fourier transform, and random number
3527 (license license:bsd-3)))
3529 (define-public python2-numpy
3530 (package-with-python2 python-numpy))
3532 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3533 ;; interest only for legacy code going back to NumPy's predecessor
3535 (define-public python2-numpy-1.8
3536 (package (inherit python2-numpy)
3542 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3543 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3546 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3548 (substitute-keyword-arguments (package-arguments python2-numpy)
3550 `(modify-phases ,phases
3551 (replace 'configure-blas-lapack
3552 (lambda* (#:key inputs #:allow-other-keys)
3553 (call-with-output-file "site.cfg"
3557 libraries = openblas,lapack
3558 library_dirs = ~a/lib:~a/lib
3559 include_dirs = ~a/include:~a/include
3561 (assoc-ref inputs "openblas")
3562 (assoc-ref inputs "lapack")
3563 (assoc-ref inputs "openblas")
3564 (assoc-ref inputs "lapack"))))
3567 `(("python2-nose" ,python2-nose)))
3568 (description "NumPy is the fundamental package for scientific computing
3569 with Python. It contains among other things: a powerful N-dimensional array
3570 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3571 and Fortran code, useful linear algebra, Fourier transform, and random number
3572 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3573 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3575 (license license:bsd-3)))
3577 (define-public python-munch
3579 (name "python-munch")
3584 (uri (pypi-uri "munch" version))
3587 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3588 (build-system python-build-system)
3589 (home-page "https://github.com/Infinidat/munch")
3590 (synopsis "Dot-accessible dictionary")
3591 (description "Munch is a dot-accessible dictionary similar to JavaScript
3593 (license license:expat)))
3595 (define-public python2-munch
3596 (package-with-python2 python-munch))
3598 (define-public python-colormath
3600 (name "python-colormath")
3605 (uri (pypi-uri "colormath" version))
3608 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3609 (build-system python-build-system)
3611 `(("python-networkx" ,python-networkx)
3612 ("python-numpy" ,python-numpy)))
3613 (home-page "https://github.com/gtaylor/python-colormath")
3614 (synopsis "Color math and conversion library")
3616 "This is a Python library for color math and conversions.")
3617 (license license:bsd-3)))
3619 (define-public python2-colormath
3620 (package-with-python2 python-colormath))
3622 (define-public python-spectra
3624 (name "python-spectra")
3629 (uri (pypi-uri "spectra" version))
3632 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3633 (build-system python-build-system)
3636 (modify-phases %standard-phases
3638 (lambda _ (invoke "nosetests" "-v"))))))
3640 `(("python-colormath" ,python-colormath)))
3642 `(("python-nose" ,python-nose)))
3643 (home-page "https://github.com/jsvine/spectra")
3644 (synopsis "Color scales and color conversion")
3646 "This package provides a Python library intended to make color math,
3647 color scales, and color space conversion easy. It has support for:
3652 @item Color blending
3653 @item Brightening/darkening colors
3654 @item Saturating/desaturating colors
3655 @item Conversion to/from multiple color spaces.
3657 (license license:expat)))
3659 (define-public python2-spectra
3660 (package-with-python2 python-spectra))
3662 (define-public python-numpy-documentation
3664 (name "python-numpy-documentation")
3665 (version (package-version python-numpy))
3666 (source (package-source python-numpy))
3667 (build-system python-build-system)
3669 `(("python-matplotlib" ,python-matplotlib)
3670 ("python-numpy" ,python-numpy)
3671 ("pkg-config" ,pkg-config)
3672 ("python-sphinx" ,python-sphinx)
3673 ("python-numpydoc" ,python-numpydoc)
3674 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3676 texlive-generic-ifxetex
3677 texlive-generic-pdftex
3679 texlive-latex-capt-of
3681 texlive-latex-environ
3682 texlive-latex-eqparbox
3683 texlive-latex-etoolbox
3684 texlive-latex-expdlist
3685 texlive-latex-fancyhdr
3686 texlive-latex-fancyvrb
3687 texlive-latex-fncychap
3689 texlive-latex-framed
3690 texlive-latex-geometry
3691 texlive-latex-graphics
3692 texlive-latex-hyperref
3693 texlive-latex-mdwtools
3694 texlive-latex-multirow
3695 texlive-latex-needspace
3696 texlive-latex-oberdiek
3697 texlive-latex-parskip
3698 texlive-latex-preview
3699 texlive-latex-tabulary
3700 texlive-latex-threeparttable
3701 texlive-latex-titlesec
3702 texlive-latex-trimspaces
3704 texlive-latex-upquote
3706 texlive-latex-varwidth
3707 texlive-latex-wrapfig)))
3708 ("texinfo" ,texinfo)
3710 ("scipy-sphinx-theme"
3711 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3714 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3715 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3718 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3719 ,@(package-native-inputs python-numpy)))
3721 `(#:tests? #f ; we're only generating the documentation
3723 (modify-phases %standard-phases
3726 (lambda* (#:key inputs outputs #:allow-other-keys)
3727 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3729 data "/doc/" ,name "-"
3730 ,(package-version python-numpy)))
3731 (info-reader (string-append data "/info"))
3732 (html (string-append doc "/html"))
3733 (scipy-sphinx-theme "scipy-sphinx-theme")
3734 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3735 (pyver ,(string-append "PYVER=")))
3737 ;; FIXME: this is needed to for texlive-union to generate
3738 ;; fonts, which are not found.
3739 (setenv "HOME" "/tmp")
3741 (with-directory-excursion "doc"
3742 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3744 (invoke "make" "html" pyver)
3745 (invoke "make" "latex" "PAPER=a4" pyver)
3746 (invoke "make" "-C" "build/latex"
3747 "all-pdf" "PAPER=a4" pyver)
3748 ;; FIXME: Generation of the info file fails.
3749 ;; (invoke "make" "info" pyver)
3751 ;; (copy-file "build/texinfo/numpy.info"
3752 ;; (string-append info "/numpy.info"))
3753 (for-each (lambda (file)
3754 (copy-file (string-append "build/latex" file)
3755 (string-append doc file)))
3756 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3757 (with-directory-excursion "build/html"
3758 (for-each (lambda (file)
3759 (let* ((dir (dirname file))
3760 (tgt-dir (string-append html "/" dir)))
3761 (unless (equal? "." dir)
3763 (install-file file html)))
3764 (find-files "." ".*")))))
3766 (home-page (package-home-page python-numpy))
3767 (synopsis "Documentation for the python-numpy package")
3768 (description (package-description python-numpy))
3769 (license (package-license python-numpy))))
3771 (define-public python2-numpy-documentation
3772 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3774 (inherit numpy-documentation)
3775 (native-inputs `(("python2-functools32" ,python2-functools32)
3776 ,@(package-native-inputs numpy-documentation))))))
3778 (define-public python-pygit2
3780 (name "python-pygit2")
3785 (uri (pypi-uri "pygit2" version))
3787 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3788 (build-system python-build-system)
3790 '(#:tests? #f)) ; tests don't run correctly in our environment
3792 `(("python-six" ,python-six)
3793 ("python-cffi" ,python-cffi)
3794 ("libgit2" ,libgit2)
3795 ("python-tox" ,python-tox)))
3797 `(("python-pytest" ,python-pytest)))
3798 (home-page "https://github.com/libgit2/pygit2")
3799 (synopsis "Python bindings for libgit2")
3800 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3801 library, libgit2 implements Git plumbing.")
3802 ;; GPL2.0 only, with linking exception.
3803 (license license:gpl2)))
3805 (define-public python2-pygit2
3806 (package-with-python2 python-pygit2))
3808 (define-public python-pyparsing
3810 (name "python-pyparsing")
3815 (uri (pypi-uri "pyparsing" version))
3817 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3818 (build-system python-build-system)
3819 (outputs '("out" "doc"))
3821 `(#:tests? #f ; no test target
3823 (modify-phases %standard-phases
3824 (add-after 'install 'install-doc
3825 (lambda* (#:key outputs #:allow-other-keys)
3826 (let* ((doc (string-append (assoc-ref outputs "doc")
3827 "/share/doc/" ,name "-" ,version))
3828 (html-doc (string-append doc "/html"))
3829 (examples (string-append doc "/examples")))
3835 (install-file file tgt))
3836 (find-files dir ".*")))
3837 (list "docs" "htmldoc" "examples")
3838 (list doc html-doc examples))
3840 (home-page "https://github.com/pyparsing/pyparsing")
3841 (synopsis "Python parsing class library")
3843 "The pyparsing module is an alternative approach to creating and
3844 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3845 of regular expressions. The pyparsing module provides a library of classes
3846 that client code uses to construct the grammar directly in Python code.")
3847 (license license:expat)))
3849 (define-public python2-pyparsing
3850 (package-with-python2 python-pyparsing))
3852 (define-public python-numpydoc
3854 (name "python-numpydoc")
3859 (uri (pypi-uri "numpydoc" version))
3862 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3863 (build-system python-build-system)
3865 `(("python-sphinx" ,python-sphinx)))
3867 `(("python-nose" ,python-nose)))
3868 (home-page "https://pypi.python.org/pypi/numpydoc")
3870 "Numpy's Sphinx extensions")
3872 "Sphinx extension to support docstrings in Numpy format.")
3873 (license license:bsd-2)))
3875 (define-public python2-numpydoc
3876 (package-with-python2 python-numpydoc))
3878 (define-public python-numexpr
3880 (name "python-numexpr")
3885 (uri (pypi-uri "numexpr" version))
3888 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3889 (build-system python-build-system)
3890 (arguments `(#:tests? #f)) ; no tests included
3892 `(("python-numpy" ,python-numpy)))
3893 (home-page "https://github.com/pydata/numexpr")
3894 (synopsis "Fast numerical expression evaluator for NumPy")
3896 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3897 expressions that operate on arrays are accelerated and use less memory than
3898 doing the same calculation in Python. In addition, its multi-threaded
3899 capabilities can make use of all your cores, which may accelerate
3900 computations, most specially if they are not memory-bounded (e.g. those using
3901 transcendental functions).")
3902 (license license:expat)))
3904 (define-public python2-numexpr
3905 (package-with-python2 python-numexpr))
3907 (define-public python-cycler
3909 (name "python-cycler")
3913 (uri (pypi-uri "cycler" version))
3916 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3917 (build-system python-build-system)
3919 ;; XXX: The current version requires 'coveralls' which we don't have.
3920 ;; Enable this for the next release which uses 'python-pytest'.
3923 `(("python-six" ,python-six)))
3924 (home-page "http://matplotlib.org/cycler/")
3925 (synopsis "Composable keyword argument iterator")
3927 "When using @code{matplotlib} and plotting more than one line, it is
3928 common to want to be able to want to be able to cycle over one or more artist
3929 styles; but the plotting logic can quickly become involved.
3930 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3931 @code{Cycler} class was developed.")
3932 (license license:bsd-3)))
3934 (define-public python2-cycler
3935 (package-with-python2 python-cycler))
3937 (define-public python-colorspacious
3939 (name "python-colorspacious")
3945 (url "https://github.com/njsmith/colorspacious.git")
3946 (commit (string-append "v" version))))
3947 (file-name (git-file-name name version))
3949 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3950 (build-system python-build-system)
3952 `(("python-numpy" ,python-numpy)))
3954 `(("python-nose" ,python-nose)))
3957 (modify-phases %standard-phases
3960 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3961 (home-page "https://github.com/njsmith/colorspacious")
3962 (synopsis "Python library for colorspace conversions")
3963 (description "@code{colorspacious} is a Python library that lets you
3964 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3965 (license license:expat)))
3967 (define-public python2-colorspacious
3968 (package-with-python2 python-colorspacious))
3970 (define-public python-matplotlib
3972 (name "python-matplotlib")
3977 (uri (pypi-uri "matplotlib" version))
3980 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3981 (build-system python-build-system)
3982 (propagated-inputs ; the following packages are all needed at run time
3983 `(("python-cycler" ,python-cycler)
3984 ("python-kiwisolver" ,python-kiwisolver)
3985 ("python-pyparsing" ,python-pyparsing)
3986 ("python-pygobject" ,python-pygobject)
3987 ("gobject-introspection" ,gobject-introspection)
3988 ("python-tkinter" ,python "tk")
3989 ("python-dateutil" ,python-dateutil)
3990 ("python-numpy" ,python-numpy)
3991 ("python-pillow" ,python-pillow)
3992 ("python-pytz" ,python-pytz)
3993 ("python-six" ,python-six)
3994 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3995 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3996 ;; object. For this reason we need to import both libraries.
3997 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3998 ("python-pycairo" ,python-pycairo)
3999 ("python-cairocffi" ,python-cairocffi)))
4001 `(("libpng" ,libpng)
4002 ("imagemagick" ,imagemagick)
4003 ("freetype" ,freetype)
4006 ;; FIXME: Add backends when available.
4007 ;("python-wxpython" ,python-wxpython)
4011 `(("pkg-config" ,pkg-config)
4012 ("python-pytest" ,python-pytest)
4013 ("python-mock" ,python-mock)
4018 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4021 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4024 (modify-phases %standard-phases
4025 ;; XXX We disable all image comparison tests because we're using a
4026 ;; newer version of FreeType than matplotlib expects. This leads to
4027 ;; minor differences throughout the tests.
4028 (add-after 'unpack 'fix-and-disable-failing-tests
4030 (substitute* (append (find-files "lib/matplotlib/tests/"
4032 (find-files "lib/mpl_toolkits/tests"
4034 (("^from matplotlib" match)
4035 (string-append "import pytest\n" match))
4036 (("( *)@image_comparison" match indent)
4037 (string-append indent
4038 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4040 (substitute* "lib/matplotlib/tests/test_animation.py"
4041 (("/bin/sh") (which "sh")))
4042 (for-each delete-file
4043 ;; test_normal_axes, test_get_tightbbox_polar
4044 '("lib/matplotlib/tests/test_axes.py"
4045 ;; test_outward_ticks
4046 "lib/matplotlib/tests/test_tightlayout.py"
4047 ;; Fontconfig returns no fonts.
4048 "lib/matplotlib/tests/test_font_manager.py"))
4050 (add-before 'install 'install-jquery-ui
4051 (lambda* (#:key outputs inputs #:allow-other-keys)
4052 (let ((dir (string-append (assoc-ref outputs "out")
4053 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4056 (assoc-ref inputs "jquery-ui")
4060 (add-after 'install 'check
4061 (lambda* (#:key outputs inputs #:allow-other-keys)
4062 (add-installed-pythonpath inputs outputs)
4063 (invoke "python" "tests.py" "-v"
4064 "-m" "not network")))
4065 (add-before 'build 'configure-environment
4066 (lambda* (#:key outputs inputs #:allow-other-keys)
4067 (let ((cairo (assoc-ref inputs "cairo")))
4068 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4070 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4071 (setenv "HOME" (getcwd))
4072 (call-with-output-file "setup.cfg"
4074 (format port "[directories]~%
4075 basedirlist = ~a,~a~%
4078 (assoc-ref inputs "tcl")
4079 (assoc-ref inputs "tk")))))
4081 (home-page "https://matplotlib.org/")
4082 (synopsis "2D plotting library for Python")
4084 "Matplotlib is a Python 2D plotting library which produces publication
4085 quality figures in a variety of hardcopy formats and interactive environments
4086 across platforms. Matplotlib can be used in Python scripts, the python and
4087 ipython shell, web application servers, and six graphical user interface
4089 (license license:psfl)
4090 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4092 (define-public python2-matplotlib
4093 (let ((matplotlib (package-with-python2
4094 (strip-python2-variant python-matplotlib))))
4095 (package (inherit matplotlib)
4100 (uri (pypi-uri "matplotlib" version))
4103 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4105 (substitute-keyword-arguments (package-arguments matplotlib)
4107 `(modify-phases ,phases
4108 (replace 'install-jquery-ui
4109 (lambda* (#:key outputs inputs #:allow-other-keys)
4110 (let ((dir (string-append (assoc-ref outputs "out")
4111 "/lib/python2.7/site-packages/"
4112 "matplotlib/backends/web_backend/")))
4115 (assoc-ref inputs "jquery-ui")
4118 (delete 'check))))) ; These tests weren't run the the past.
4119 ;; Make sure to use special packages for Python 2 instead
4120 ;; of those automatically rewritten by package-with-python2.
4122 `(("python2-pycairo" ,python2-pycairo)
4123 ("python2-backports-functools-lru-cache"
4124 ,python2-backports-functools-lru-cache)
4125 ("python2-functools32" ,python2-functools32)
4126 ("python2-pygobject-2" ,python2-pygobject-2)
4127 ("python2-subprocess32" ,python2-subprocess32)
4128 ("python2-tkinter" ,python-2 "tk")
4129 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4130 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4132 (define-public python-matplotlib-documentation
4134 (name "python-matplotlib-documentation")
4135 (version (package-version python-matplotlib))
4136 (source (package-source python-matplotlib))
4137 (build-system python-build-system)
4139 `(("python-matplotlib" ,python-matplotlib)
4140 ("python-colorspacious" ,python-colorspacious)
4141 ("python-sphinx" ,python-sphinx)
4142 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4143 ("python-sphinx-gallery" ,python-sphinx-gallery)
4144 ("python-numpydoc" ,python-numpydoc)
4145 ("python-ipython" ,python-ipython)
4146 ("python-ipykernel" ,python-ipykernel)
4147 ("python-mock" ,python-mock)
4148 ("graphviz" ,graphviz)
4149 ("texlive" ,(texlive-union (list texlive-amsfonts
4150 texlive-latex-amsmath
4151 texlive-latex-enumitem
4152 texlive-latex-expdlist
4153 texlive-latex-geometry
4154 texlive-latex-preview
4155 texlive-latex-type1cm
4158 texlive-generic-pdftex
4161 texlive-fonts-adobe-times
4162 texlive-fonts-txfonts)))
4163 ("texinfo" ,texinfo)
4164 ,@(package-native-inputs python-matplotlib)))
4166 `(#:tests? #f ; we're only generating documentation
4168 (modify-phases %standard-phases
4169 ;; The tests in python-matplotlib are run after the install phase, so
4170 ;; we need to delete the extra phase here.
4175 (setenv "PYTHONPATH"
4176 (string-append (getenv "PYTHONPATH")
4177 ":" (getcwd) "/../examples/units"))
4178 (substitute* "conf.py"
4180 (("^SHA = check_output.*")
4181 (string-append "SHA = \"" ,version "\"\n"))
4182 ;; Don't fetch intersphinx files from the Internet
4183 (("^explicit_order_folders" m)
4184 (string-append "intersphinx_mapping = {}\n" m))
4185 (("'sphinx.ext.intersphinx',") "")
4186 ;; Disable URL embedding which requires internet access.
4187 (("'https://docs.scipy.org/doc/numpy'") "None")
4188 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4190 "SPHINXBUILD=sphinx-build"
4191 "SPHINXOPTS=" ; don't abort on warnings
4194 (lambda* (#:key inputs outputs #:allow-other-keys)
4195 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4196 (doc (string-append data "/doc/python-matplotlib-" ,version))
4197 (info (string-append data "/info"))
4198 (html (string-append doc "/html")))
4201 (copy-recursively "build/html" html)
4202 (symlink (string-append html "/_images")
4203 (string-append info "/matplotlib-figures"))
4204 (with-directory-excursion "build/texinfo"
4205 (substitute* "matplotlib.texi"
4206 (("@image\\{([^,]*)" all file)
4207 (string-append "@image{matplotlib-figures/" file)))
4208 (symlink (string-append html "/_images")
4209 "./matplotlib-figures")
4210 (invoke "makeinfo" "--no-split"
4211 "-o" "matplotlib.info" "matplotlib.texi"))
4212 (install-file "build/texinfo/matplotlib.info" info))
4214 (home-page (package-home-page python-matplotlib))
4215 (synopsis "Documentation for the python-matplotlib package")
4216 (description (package-description python-matplotlib))
4217 (license (package-license python-matplotlib))))
4219 (define-public python2-matplotlib-documentation
4220 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4224 (alist-delete "python-sphinx-copybutton"
4225 (package-native-inputs parent))))))
4227 (define-public python-matplotlib-venn
4229 (name "python-matplotlib-venn")
4234 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4237 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4238 (build-system python-build-system)
4239 (arguments '(#:tests? #f)) ; tests are not included
4241 `(("python-matplotlib" ,python-matplotlib)
4242 ("python-numpy" ,python-numpy)
4243 ("python-scipy" ,python-scipy)))
4245 `(("unzip" ,unzip)))
4246 (home-page "https://github.com/konstantint/matplotlib-venn")
4247 (synopsis "Plot area-proportional Venn diagrams")
4249 "This package provides tools for plotting area-proportional two- and
4250 three-way Venn diagrams in @code{matplotlib}.")
4251 (license license:expat)))
4253 (define-public python2-pysnptools
4255 (name "python2-pysnptools")
4260 (uri (pypi-uri "pysnptools" version))
4263 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4264 (build-system python-build-system)
4266 `(#:python ,python-2 ; only Python 2.7 is supported
4267 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4269 `(("python2-numpy" ,python2-numpy)
4270 ("python2-scipy" ,python2-scipy)
4271 ("python2-pandas" ,python2-pandas)))
4273 `(("python2-cython" ,python2-cython)))
4274 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4275 (synopsis "Library for reading and manipulating genetic data")
4277 "PySnpTools is a library for reading and manipulating genetic data. It
4278 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4279 those files. It can also efficiently manipulate ranges of integers using set
4280 operators such as union, intersection, and difference.")
4281 (license license:asl2.0)))
4283 (define-public python-scipy
4285 (name "python-scipy")
4290 (uri (pypi-uri "scipy" version))
4293 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4294 (build-system python-build-system)
4296 `(("python-numpy" ,python-numpy)
4297 ("python-matplotlib" ,python-matplotlib)
4298 ("python-pyparsing" ,python-pyparsing)))
4300 `(("lapack" ,lapack)
4301 ("openblas" ,openblas)))
4303 `(("python-cython" ,python-cython)
4304 ("python-pytest" ,python-pytest)
4305 ("python-sphinx" ,python-sphinx)
4306 ("python-numpydoc" ,python-numpydoc)
4307 ("gfortran" ,gfortran)
4310 (outputs '("out" "doc"))
4313 (modify-phases %standard-phases
4314 (add-after 'unpack 'disable-broken-tests
4316 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4317 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4318 (string-append indent
4319 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4321 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4322 (("^def test_parallel_threads\\(\\):" m)
4323 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4326 (add-before 'build 'configure-openblas
4327 (lambda* (#:key inputs #:allow-other-keys)
4328 (call-with-output-file "site.cfg"
4332 libraries = openblas
4333 library_dirs = ~a/lib
4334 include_dirs = ~a/include
4336 # backslash-n to make emacs happy
4338 library_dirs = ~a/lib
4339 atlas_libs = openblas
4341 (assoc-ref inputs "openblas")
4342 (assoc-ref inputs "openblas")
4343 (assoc-ref inputs "openblas"))))
4345 (add-after 'install 'install-doc
4346 (lambda* (#:key inputs outputs #:allow-other-keys)
4347 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4348 (doc (string-append data "/doc/" ,name "-" ,version))
4349 (html (string-append doc "/html"))
4350 (pyver ,(string-append "PYVER=" (version-major+minor
4351 (package-version python))))
4352 ;; By default it tries to run sphinx-build through the Python
4353 ;; interpreter which won't work with our shell wrapper.
4354 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4355 ;; Make installed package available for building the
4357 (add-installed-pythonpath inputs outputs)
4358 (with-directory-excursion "doc"
4359 ;; Fix generation of images for mathematical expressions.
4360 (substitute* (find-files "source" "conf\\.py")
4361 (("pngmath_use_preview = True")
4362 "pngmath_use_preview = False"))
4364 (invoke "make" "html" pyver sphinxbuild)
4365 (with-directory-excursion "build/html"
4366 (for-each (lambda (file)
4367 (let* ((dir (dirname file))
4368 (tgt-dir (string-append html "/" dir)))
4369 (install-file file html)))
4370 (find-files "." ".*")))))
4372 ;; Tests can only be run after the library has been installed and not
4373 ;; within the source directory.
4375 (add-after 'install 'check
4376 (lambda* (#:key inputs outputs #:allow-other-keys)
4377 (add-installed-pythonpath inputs outputs)
4378 (with-directory-excursion "/tmp"
4379 (invoke "python" "-c"
4380 "import scipy; scipy.test(verbose=2)")))))))
4381 (home-page "https://www.scipy.org/")
4382 (synopsis "The Scipy library provides efficient numerical routines")
4383 (description "The SciPy library is one of the core packages that make up
4384 the SciPy stack. It provides many user-friendly and efficient numerical
4385 routines such as routines for numerical integration and optimization.")
4386 (properties `((python2-variant . ,(delay python2-scipy))))
4387 (license license:bsd-3)))
4389 ;; Version 1.2.2 is the last version to support Python 2
4390 (define-public python2-scipy
4392 (inherit (package-with-python2
4393 (strip-python2-variant python-scipy)))
4398 (uri (pypi-uri "scipy" version))
4401 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4403 (define-public python-socksipy-branch
4405 (name "python-socksipy-branch")
4410 (uri (pypi-uri "SocksiPy-branch" version))
4413 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4414 (build-system python-build-system)
4416 `(#:tests? #f)) ; There are no tests
4417 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4418 (synopsis "Python SOCKS module")
4420 "SocksiPy - A Python SOCKS client module. It provides a
4421 socket-like interface that supports connections to any TCP
4422 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4423 The original version was developed by Dan Haim, this is a
4424 branch created by Mario Vilas to address some open issues,
4425 as the original project seems to have been abandoned circa 2007.")
4426 (license license:bsd-3)))
4428 (define-public python2-socksipy-branch
4429 (package-with-python2 python-socksipy-branch))
4431 (define-public python-pycodestyle
4433 (name "python-pycodestyle")
4438 (uri (pypi-uri "pycodestyle" version))
4441 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4442 (build-system python-build-system)
4443 (home-page "https://pycodestyle.readthedocs.io/")
4444 (synopsis "Python style guide checker")
4445 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4446 Python code against some of the style conventions in
4447 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4448 (license license:expat)))
4450 (define-public python2-pycodestyle
4451 (package-with-python2 python-pycodestyle))
4453 (define-public python-multidict
4455 (name "python-multidict")
4460 (uri (pypi-uri "multidict" version))
4463 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4464 (build-system python-build-system)
4466 `(("python-pytest" ,python-pytest)
4467 ("python-pytest-runner" ,python-pytest-runner)))
4468 (home-page "https://github.com/aio-libs/multidict/")
4469 (synopsis "Multidict implementation")
4470 (description "Multidict is dict-like collection of key-value pairs
4471 where key might be occurred more than once in the container.")
4472 (license license:asl2.0)))
4474 (define-public python-orderedmultidict
4476 (name "python-orderedmultidict")
4481 (uri (pypi-uri "orderedmultidict" version))
4484 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4485 (build-system python-build-system)
4488 (modify-phases %standard-phases
4489 (add-after 'unpack 'fix-tests
4491 ;; The package uses nosetest for running the tests.
4492 ;; Adding this initfile allows to run the test suite
4493 ;; without requiring nosetest.
4494 (with-output-to-file "tests/__init__.py" newline)
4497 `(("python-six" ,python-six)))
4499 `(("python-pycodestyle" ,python-pycodestyle)))
4500 (home-page "https://github.com/gruns/orderedmultidict")
4501 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4502 (description "This package contains a library for ordered multivalue
4503 dictionaries. A multivalue dictionary is a dictionary that can store
4504 multiple values for the same key. An ordered multivalue dictionary is a
4505 multivalue dictionary that retains the order of insertions and deletions.")
4506 (license license:unlicense)))
4508 (define-public python2-orderedmultidict
4509 (package-with-python2 python-orderedmultidict))
4511 (define-public python-autopep8
4513 (name "python-autopep8")
4518 (uri (pypi-uri "autopep8" version))
4521 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4522 (build-system python-build-system)
4524 `(("python-pycodestyle" ,python-pycodestyle)))
4525 (home-page "https://github.com/hhatto/autopep8")
4526 (synopsis "Format Python code according to the PEP 8 style guide")
4528 "@code{autopep8} automatically formats Python code to conform to
4529 the PEP 8 style guide. It uses the pycodestyle utility to determine
4530 what parts of the code needs to be formatted. @code{autopep8} is
4531 capable of fixing most of the formatting issues that can be reported
4533 (license (license:non-copyleft
4534 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4536 (define-public python2-autopep8
4537 (package-with-python2 python-autopep8))
4539 (define-public python-distutils-extra
4541 (name "python-distutils-extra")
4546 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4547 version "/+download/python-distutils-extra-"
4551 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4552 (build-system python-build-system)
4553 (home-page "https://launchpad.net/python-distutils-extra/")
4554 (synopsis "Enhancements to Python's distutils")
4556 "The python-distutils-extra module enables you to easily integrate
4557 gettext support, themed icons, and scrollkeeper-based documentation into
4558 Python's distutils.")
4559 (license license:gpl2)))
4561 (define-public python2-distutils-extra
4562 (package-with-python2 python-distutils-extra))
4564 (define-public python2-elib.intl
4566 (name "python2-elib.intl")
4570 ;; This project doesn't tag releases or publish tarballs, so we take
4571 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4574 (url "https://github.com/dieterv/elib.intl.git")
4575 (commit "d09997cfef")))
4576 (file-name (string-append name "-" version "-checkout"))
4579 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4580 (build-system python-build-system)
4582 ;; incompatible with Python 3 (exception syntax)
4583 `(#:python ,python-2
4585 (home-page "https://github.com/dieterv/elib.intl")
4586 (synopsis "Enhanced internationalization for Python")
4588 "The elib.intl module provides enhanced internationalization (I18N)
4589 services for your Python modules and applications.")
4590 (license license:lgpl3+)))
4592 (define-public python-olefile
4594 (name "python-olefile")
4599 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4600 "download/v" version "/olefile-" version ".tar.gz"))
4601 (file-name (string-append name "-" version ".tar.gz"))
4604 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4605 (build-system python-build-system)
4606 (home-page "https://www.decalage.info/python/olefileio")
4607 (synopsis "Read and write Microsoft OLE2 files.")
4609 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4610 Storage or Compound Document, Microsoft Office). It is an improved version of
4611 the OleFileIO module from PIL, the Python Image Library.")
4612 (license license:bsd-3)))
4614 (define-public python2-olefile
4615 (package-with-python2 python-olefile))
4617 (define-public python-pillow
4619 (name "python-pillow")
4624 (uri (pypi-uri "Pillow" version))
4627 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4628 (build-system python-build-system)
4630 `(("python-pytest" ,python-pytest)))
4632 `(("freetype" ,freetype)
4635 ("libjpeg" ,libjpeg)
4636 ("openjpeg" ,openjpeg)
4637 ("libtiff" ,libtiff)
4638 ("libwebp" ,libwebp)))
4640 `(("python-olefile" ,python-olefile)))
4643 (modify-phases %standard-phases
4644 (add-after 'unpack 'patch-ldconfig
4646 (substitute* "setup.py"
4647 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4648 (delete 'check) ; We must run checks after python-pillow is installed.
4649 (add-after 'install 'check-installed
4650 (lambda* (#:key outputs inputs #:allow-other-keys)
4652 (setenv "HOME" (getcwd))
4653 ;; Make installed package available for running the tests.
4654 (add-installed-pythonpath inputs outputs)
4655 (invoke "python" "selftest.py" "--installed")
4656 (invoke "python" "-m" "pytest" "-vv")))))))
4657 (home-page "https://python-pillow.org")
4658 (synopsis "Fork of the Python Imaging Library")
4660 "The Python Imaging Library adds image processing capabilities to your
4661 Python interpreter. This library provides extensive file format support, an
4662 efficient internal representation, and fairly powerful image processing
4663 capabilities. The core image library is designed for fast access to data
4664 stored in a few basic pixel formats. It should provide a solid foundation for
4665 a general image processing tool.")
4666 (license (license:x11-style
4667 "http://www.pythonware.com/products/pil/license.htm"
4668 "The PIL Software License"))))
4670 (define-public python2-pillow
4671 (package-with-python2 python-pillow))
4673 (define-public python-pycparser
4675 (name "python-pycparser")
4680 (uri (pypi-uri "pycparser" version))
4683 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4684 (outputs '("out" "doc"))
4685 (build-system python-build-system)
4687 `(("pkg-config" ,pkg-config)))
4690 (modify-phases %standard-phases
4693 (with-directory-excursion "tests"
4694 (invoke "python" "all_tests.py"))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4699 (doc (string-append data "/doc/" ,name "-" ,version))
4700 (examples (string-append doc "/examples")))
4702 (for-each (lambda (file)
4703 (copy-file (string-append "." file)
4704 (string-append doc file)))
4705 '("/README.rst" "/CHANGES" "/LICENSE"))
4706 (copy-recursively "examples" examples)
4708 (home-page "https://github.com/eliben/pycparser")
4709 (synopsis "C parser in Python")
4711 "Pycparser is a complete parser of the C language, written in pure Python
4712 using the PLY parsing library. It parses C code into an AST and can serve as
4713 a front-end for C compilers or analysis tools.")
4714 (license license:bsd-3)))
4716 (define-public python2-pycparser
4717 (package-with-python2 python-pycparser))
4719 (define-public python-pywavelets
4721 (name "python-pywavelets")
4723 (home-page "https://github.com/PyWavelets/pywt")
4726 (uri (pypi-uri "PyWavelets" version))
4729 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4730 (build-system python-build-system)
4732 '(#:modules ((ice-9 ftw)
4736 (guix build python-build-system))
4737 #:phases (modify-phases %standard-phases
4740 (let ((cwd (getcwd))
4741 (libdir (find (cut string-prefix? "lib." <>)
4742 (scandir "build"))))
4743 (with-directory-excursion (string-append cwd "/build/" libdir)
4744 (invoke "nosetests" "-v" "."))))))))
4746 `(("python-matplotlib" ,python-matplotlib) ;for tests
4747 ("python-nose" ,python-nose)))
4749 `(("python-numpy" ,python-numpy)))
4750 (synopsis "Wavelet transforms in Python")
4752 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4753 mathematical basis functions that are localized in both time and frequency.
4754 Wavelet transforms are time-frequency transforms employing wavelets. They are
4755 similar to Fourier transforms, the difference being that Fourier transforms are
4756 localized only in frequency instead of in time and frequency.")
4757 (license license:expat)))
4759 (define-public python2-pywavelets
4760 (package-with-python2 python-pywavelets))
4762 (define-public python-xcffib
4764 (name "python-xcffib")
4769 (uri (pypi-uri "xcffib" version))
4772 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4773 (build-system python-build-system)
4775 `(("libxcb" ,libxcb)))
4777 `(("python-cffi" ,python-cffi) ; used at run time
4778 ("python-six" ,python-six)))
4780 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4783 (modify-phases %standard-phases
4784 (add-after 'unpack 'fix-libxcb-path
4785 (lambda* (#:key inputs #:allow-other-keys)
4786 (let ((libxcb (assoc-ref inputs "libxcb")))
4787 (substitute* '("xcffib/__init__.py")
4788 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4790 (add-after 'install 'install-doc
4791 (lambda* (#:key outputs #:allow-other-keys)
4792 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4793 "/doc/" ,name "-" ,version)))
4795 (copy-file "README.md"
4796 (string-append doc "/README.md"))
4798 (home-page "https://github.com/tych0/xcffib")
4799 (synopsis "XCB Python bindings")
4801 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4802 support for Python 3 and PyPy. It is based on cffi.")
4803 (license license:expat)))
4805 (define-public python2-xcffib
4806 (package-with-python2 python-xcffib))
4808 (define-public python-cairocffi
4810 (name "python-cairocffi")
4815 (uri (pypi-uri "cairocffi" version))
4818 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4819 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4820 (build-system python-build-system)
4821 (outputs '("out" "doc"))
4825 ("gdk-pixbuf" ,gdk-pixbuf)
4829 `(("pkg-config" ,pkg-config)
4830 ("python-pytest" ,python-pytest)
4831 ("python-pytest-cov" ,python-pytest-cov)
4832 ("python-pytest-runner" ,python-pytest-runner)
4833 ("python-sphinx" ,python-sphinx)
4834 ("python-docutils" ,python-docutils)))
4836 `(("python-xcffib" ,python-xcffib))) ; used at run time
4839 (modify-phases %standard-phases
4840 (add-after 'unpack 'patch-paths
4841 (lambda* (#:key inputs outputs #:allow-other-keys)
4842 (substitute* (find-files "." "\\.py$")
4843 (("dlopen\\(ffi, 'cairo'")
4844 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4845 "/lib/libcairo.so.2'"))
4846 (("dlopen\\(ffi, 'gdk-3'")
4847 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4848 "/lib/libgtk-3.so.0'"))
4849 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4850 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4851 "/lib/libgdk_pixbuf-2.0.so.0'"))
4852 (("dlopen\\(ffi, 'glib-2.0'")
4853 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4854 "/lib/libglib-2.0.so.0'"))
4855 (("dlopen\\(ffi, 'gobject-2.0'")
4856 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4857 "/lib/libgobject-2.0.so.0'"))
4858 (("dlopen\\(ffi, 'pangocairo-1.0'")
4859 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4860 "/lib/libpangocairo-1.0.so.0'"))
4861 (("dlopen\\(ffi, 'pango-1.0'")
4862 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4863 "/lib/libpango-1.0.so.0'")))
4865 (add-after 'install 'install-doc
4866 (lambda* (#:key inputs outputs #:allow-other-keys)
4867 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4868 (doc (string-append data "/doc/" ,name "-" ,version))
4869 (html (string-append doc "/html")))
4870 (setenv "LD_LIBRARY_PATH"
4871 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4872 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4873 (setenv "LANG" "en_US.UTF-8")
4875 (for-each (lambda (file)
4876 (copy-file (string-append "." file)
4877 (string-append doc file)))
4878 '("/README.rst" "/CHANGES" "/LICENSE"))
4879 (system* "python" "setup.py" "build_sphinx")
4880 (copy-recursively "docs/_build/html" html)
4882 (home-page "https://github.com/Kozea/cairocffi")
4883 (synopsis "Python bindings and object-oriented API for Cairo")
4885 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4886 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4887 graphics library with support for multiple backends including image buffers,
4888 PNG, PostScript, PDF, and SVG file output.")
4889 (license license:bsd-3)))
4891 (define-public python2-cairocffi
4892 (package-with-python2 python-cairocffi))
4894 (define-public python-decorator
4896 (name "python-decorator")
4901 (uri (pypi-uri "decorator" version))
4903 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4904 (build-system python-build-system)
4905 (home-page "https://pypi.python.org/pypi/decorator/")
4906 (synopsis "Python module to simplify usage of decorators")
4908 "The aim of the decorator module is to simplify the usage of decorators
4909 for the average programmer, and to popularize decorators usage giving examples
4910 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4911 etc. The core of this module is a decorator factory.")
4912 (license license:expat)))
4914 (define-public python2-decorator
4915 (package-with-python2 python-decorator))
4917 (define-public python-drmaa
4919 (name "python-drmaa")
4924 (uri (pypi-uri "drmaa" version))
4926 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4927 (build-system python-build-system)
4928 ;; The test suite requires libdrmaa which is provided by the cluster
4929 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4930 ;; should be set to the path of the libdrmaa library.
4931 (arguments '(#:tests? #f))
4933 `(("python-nose" ,python-nose)))
4934 (home-page "https://pypi.python.org/pypi/drmaa")
4935 (synopsis "Python bindings for the DRMAA library")
4937 "A Python package for Distributed Resource Management (DRM) job
4938 submission and control. This package is an implementation of the DRMAA 1.0
4939 Python language binding specification.")
4940 (license license:bsd-3)))
4942 (define-public python2-drmaa
4943 (package-with-python2 python-drmaa))
4945 (define-public python-grako
4947 (name "python-grako")
4953 (pypi-uri "grako" version ".zip"))
4956 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4957 (build-system python-build-system)
4958 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4961 ("python-pytest" ,python-pytest)
4962 ("python-pytest-runner" ,python-pytest-runner)))
4963 (home-page "https://bitbucket.org/neogeny/grako")
4964 (synopsis "EBNF parser generator")
4966 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4967 memoizing PEG/Packrat parser in Python.")
4968 (license license:bsd-3)))
4970 (define-public python2-grako
4971 (package-with-python2 python-grako))
4973 (define-public python-gridmap
4975 (name "python-gridmap")
4981 (url "https://github.com/pygridtools/gridmap.git")
4982 (commit (string-append "v" version))))
4983 (file-name (git-file-name name version))
4985 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4986 (build-system python-build-system)
4988 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4990 `(("python-psutil" ,python-psutil)
4991 ("python-drmaa" ,python-drmaa)
4992 ("python-pyzmq" ,python-pyzmq)))
4993 (home-page "https://github.com/pygridtools/gridmap")
4994 (synopsis "Create jobs on a cluster directly from Python")
4996 "Gridmap is a Python package to allow you to easily create jobs on the
4997 cluster directly from Python. You can directly map Python functions onto the
4998 cluster without needing to write any wrapper code yourself.")
4999 (license license:gpl3+)))
5001 (define-public python2-gridmap
5002 (package-with-python2 python-gridmap))
5004 (define-public python-honcho
5006 (name "python-honcho")
5012 (url "https://github.com/nickstenning/honcho.git")
5013 (commit (string-append "v" version))))
5014 (file-name (git-file-name name version))
5016 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5017 (build-system python-build-system)
5019 `(("python-pytest" ,python-pytest)
5020 ("python-mock" ,python-mock)
5021 ("python-tox" ,python-tox)
5022 ("which" ,which))) ;for tests
5024 `(("python-jinja2" ,python-jinja2)))
5027 (modify-phases %standard-phases
5029 (add-after 'install 'check
5030 (lambda* (#:key outputs inputs #:allow-other-keys)
5031 ;; fix honcho path in testsuite
5032 (substitute* "tests/conftest.py"
5033 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5034 "/bin/honcho" "'")))
5035 ;; It's easier to run tests after install.
5036 ;; Make installed package available for running the tests
5037 (add-installed-pythonpath inputs outputs)
5038 (invoke "py.test" "-v"))))))
5039 (home-page "https://github.com/nickstenning/honcho")
5040 (synopsis "Manage Procfile-based applications")
5042 "A Procfile is a file which describes how to run an application
5043 consisting of several processes. honcho starts all listed processes.
5044 The output of all running processes is collected by honcho and
5046 (license license:expat)))
5048 (define-public python2-honcho
5049 (package-with-python2 python-honcho))
5051 (define-public python-pexpect
5053 (name "python-pexpect")
5058 (uri (pypi-uri "pexpect" version))
5060 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5061 (build-system python-build-system)
5064 (modify-phases %standard-phases
5065 (add-before 'check 'prepare-tests
5067 (substitute* (find-files "tests")
5068 (("/bin/ls") (which "ls"))
5069 (("/bin/echo") (which "echo"))
5070 (("/bin/which") (which "which"))
5071 ;; Many tests try to use the /bin directory which
5072 ;; is not present in the build environment.
5073 ;; Use one that's non-empty and unlikely to change.
5074 (("/bin'") "/dev'"))
5075 ;; XXX: Socket connection test gets "Connection reset by peer".
5076 ;; Why does it not work? Delete for now.
5077 (delete-file "tests/test_socket.py")
5079 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5081 `(("python-nose" ,python-nose)
5082 ("python-pytest" ,python-pytest)
5085 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5087 `(("python-ptyprocess" ,python-ptyprocess)))
5088 (home-page "http://pexpect.readthedocs.org/")
5089 (synopsis "Controlling interactive console applications")
5091 "Pexpect is a pure Python module for spawning child applications;
5092 controlling them; and responding to expected patterns in their output.
5093 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5094 child application and control it as if a human were typing commands.")
5095 (license license:isc)))
5097 (define-public python2-pexpect
5098 (package-with-python2 python-pexpect))
5100 (define-public python-setuptools-scm
5102 (name "python-setuptools-scm")
5106 (uri (pypi-uri "setuptools_scm" version))
5109 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5110 (build-system python-build-system)
5111 (home-page "https://github.com/pypa/setuptools_scm/")
5112 (synopsis "Manage Python package versions in SCM metadata")
5114 "Setuptools_scm handles managing your Python package versions in
5115 @dfn{software configuration management} (SCM) metadata instead of declaring
5116 them as the version argument or in a SCM managed file.")
5117 (license license:expat)))
5119 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5120 (define-public python-setuptools-scm-3.3
5122 (inherit python-setuptools-scm)
5126 (uri (pypi-uri "setuptools_scm" version))
5129 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5131 (define-public python2-setuptools-scm
5132 (package-with-python2 python-setuptools-scm))
5134 (define-public python-pathlib2
5136 (name "python-pathlib2")
5141 (uri (pypi-uri "pathlib2" version))
5144 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5145 (build-system python-build-system)
5147 `(("python-scandir" ,python-scandir)
5148 ("python-six" ,python-six)))
5149 (home-page "https://pypi.python.org/pypi/pathlib2/")
5150 (synopsis "Object-oriented file system paths")
5151 (description "The goal of pathlib2 is to provide a backport of the
5152 standard @code{pathlib} module which tracks the standard library module, so
5153 all the newest features of the standard @code{pathlib} can be used also on
5154 older Python versions.")
5155 (license license:expat)))
5157 (define-public python-importlib-metadata
5159 (name "python-importlib-metadata")
5164 (uri (pypi-uri "importlib_metadata" version))
5166 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5167 (build-system python-build-system)
5169 `(("python-configparser" ,python-configparser)
5170 ("python-contextlib2" ,python-contextlib2)
5171 ("python-docutils" ,python-docutils)
5172 ("python-pathlib2" ,python-pathlib2)
5173 ("python-rst.linker" ,python-rst.linker)
5174 ("python-zipp" ,python-zipp)))
5176 `(("python-setuptools-scm" ,python-setuptools-scm)
5177 ("python-sphinx" ,python-sphinx)))
5178 (home-page "https://importlib-metadata.readthedocs.io/")
5179 (synopsis "Read metadata from Python packages")
5181 "@code{importlib_metadata} is a library which provides an API for
5182 accessing an installed Python package's metadata, such as its entry points or
5183 its top-level name. This functionality intends to replace most uses of
5184 @code{pkg_resources} entry point API and metadata API. Along with
5185 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5186 need to use the older and less efficient @code{pkg_resources} package.")
5187 (license license:asl2.0)))
5189 (define-public python-jaraco-packaging
5191 (name "python-jaraco-packaging")
5196 (uri (pypi-uri "jaraco.packaging" version))
5199 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5200 (build-system python-build-system)
5202 `(("python-pytest" ,python-pytest)
5203 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5204 ("python-pytest-flake8" ,python-pytest-flake8)
5205 ("python-rst.linker" ,python-rst.linker)
5206 ("python-setuptools" ,python-setuptools)
5207 ("python-setuptools-scm" ,python-setuptools-scm)
5208 ("python-six" ,python-six)
5209 ("python-sphinx" ,python-sphinx)))
5210 (home-page "https://github.com/jaraco/jaraco.packaging")
5211 (synopsis "Tools to supplement packaging Python releases")
5213 "This package provides various tools to supplement packaging Python
5215 (license license:expat)))
5217 (define-public python-pathpy
5219 (name "python-pathpy")
5224 (uri (pypi-uri "path.py" version))
5226 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5227 (outputs '("out" "doc"))
5228 (build-system python-build-system)
5230 `(("python-appdirs" ,python-appdirs)
5231 ("python-importlib-metadata" ,python-importlib-metadata)))
5233 `(("python-setuptools-scm" ,python-setuptools-scm)
5234 ("python-sphinx" ,python-sphinx)
5235 ("python-rst.linker" ,python-rst.linker)
5236 ("python-pytest" ,python-pytest)
5237 ("python-pytest-runner" ,python-pytest-runner)
5238 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5241 (modify-phases %standard-phases
5242 (add-after 'build 'build-doc
5244 (setenv "LANG" "en_US.UTF-8")
5245 (invoke "python" "setup.py" "build_sphinx")))
5246 (add-after 'install 'install-doc
5247 (lambda* (#:key outputs #:allow-other-keys)
5248 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5249 (doc (string-append data "/doc/" ,name "-" ,version))
5250 (html (string-append doc "/html")))
5252 (for-each (lambda (file)
5253 (copy-file file (string-append doc "/" file)))
5254 '("README.rst" "CHANGES.rst"))
5255 (copy-recursively "build/sphinx/html" html)
5259 ;; The import time test aborts if an import takes longer than
5260 ;; 100ms. It may very well take a little longer than that.
5261 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5262 (home-page "https://github.com/jaraco/path.py")
5263 (synopsis "Python module wrapper for built-in os.path")
5265 "@code{path.py} implements path objects as first-class entities, allowing
5266 common operations on files to be invoked on those path objects directly.")
5267 (license license:expat)))
5269 (define-public python2-pathpy
5270 (package-with-python2 python-pathpy))
5272 (define-public python-simplegeneric
5274 (name "python-simplegeneric")
5279 (uri (pypi-uri "simplegeneric" version ".zip"))
5281 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5282 (build-system python-build-system)
5284 `(("unzip" ,unzip)))
5285 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5286 (synopsis "Python module for simple generic functions")
5288 "The simplegeneric module lets you define simple single-dispatch generic
5289 functions, akin to Python’s built-in generic functions like @code{len()},
5290 @code{iter()} and so on. However, instead of using specially-named methods,
5291 these generic functions use simple lookup tables, akin to those used by
5292 e.g. @code{pickle.dump()} and other generic functions found in the Python
5294 (license license:zpl2.1)))
5296 (define-public python2-simplegeneric
5297 (package-with-python2 python-simplegeneric))
5299 (define-public python-ipython-genutils
5300 ;; TODO: This package is retired, check if can be removed, see description.
5302 (name "python-ipython-genutils")
5307 (uri (pypi-uri "ipython_genutils" version))
5309 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5310 (build-system python-build-system)
5311 (arguments `(#:tests? #f)) ; no tests
5312 (home-page "https://ipython.org")
5313 (synopsis "Vestigial utilities from IPython")
5315 "This package provides retired utilities from IPython. No packages
5316 outside IPython/Jupyter should depend on it.
5318 This package shouldn't exist. It contains some common utilities shared by
5319 Jupyter and IPython projects during The Big Split. As soon as possible, those
5320 packages will remove their dependency on this, and this package will go
5322 (license license:bsd-3)))
5324 (define-public python2-ipython-genutils
5325 (package-with-python2 python-ipython-genutils))
5327 (define-public python-traitlets
5329 (name "python-traitlets")
5334 (uri (pypi-uri "traitlets" version))
5337 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5338 (build-system python-build-system)
5341 (modify-phases %standard-phases
5342 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5344 `(("python-ipython-genutils" ,python-ipython-genutils)
5345 ("python-decorator" ,python-decorator)))
5347 `(("python-pytest" ,python-pytest)))
5348 (properties `((python2-variant . ,(delay python2-traitlets))))
5349 (home-page "https://ipython.org")
5350 (synopsis "Configuration system for Python applications")
5352 "Traitlets is a framework that lets Python classes have attributes with
5353 type checking, dynamically calculated default values, and ‘on change’
5354 callbacks. The package also includes a mechanism to use traitlets for
5355 configuration, loading values from files or from command line arguments. This
5356 is a distinct layer on top of traitlets, so you can use traitlets in your code
5357 without using the configuration machinery.")
5358 (license license:bsd-3)))
5360 (define-public python2-traitlets
5361 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5365 `(("python2-enum34" ,python2-enum34)
5366 ,@(package-propagated-inputs traitlets))))))
5368 (define-public python-jupyter-core
5370 (name "python-jupyter-core")
5375 (uri (string-append (pypi-uri "jupyter_core" version)))
5378 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5379 (build-system python-build-system)
5380 ;; FIXME: not sure how to run the tests
5381 (arguments `(#:tests? #f))
5383 `(("python-traitlets" ,python-traitlets)))
5384 (home-page "http://jupyter.org/")
5385 (synopsis "Jupyter base package")
5387 "Jupyter core is the base package on which Jupyter projects rely.")
5388 (license license:bsd-3)))
5390 (define-public python2-jupyter-core
5391 (package-with-python2 python-jupyter-core))
5393 (define-public python-jupyter-client
5395 (name "python-jupyter-client")
5400 (uri (pypi-uri "jupyter_client" version))
5403 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5404 (build-system python-build-system)
5405 ;; Tests fail because of missing native python kernel which I assume is
5406 ;; provided by the ipython package, which we cannot use because it would
5407 ;; cause a dependency cycle.
5411 #:phases (modify-phases %standard-phases
5412 (add-after 'unpack 'set-tool-file-names
5413 (lambda* (#:key inputs #:allow-other-keys)
5414 (let ((iproute (assoc-ref inputs "iproute")))
5415 (substitute* "jupyter_client/localinterfaces.py"
5417 (string-append "'" iproute "/sbin/ip'")))
5420 `(("iproute" ,iproute)))
5422 `(("python-pyzmq" ,python-pyzmq)
5423 ("python-traitlets" ,python-traitlets)
5424 ("python-jupyter-core" ,python-jupyter-core)))
5425 (home-page "http://jupyter.org/")
5426 (synopsis "Jupyter protocol implementation and client libraries")
5428 "The @code{jupyter_client} package contains the reference implementation
5429 of the Jupyter protocol. It also provides client and kernel management APIs
5430 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5431 installing @code{kernelspec}s for use with Jupyter frontends.")
5432 (license license:bsd-3)))
5434 (define-public python2-jupyter-client
5435 (package-with-python2 python-jupyter-client))
5437 (define-public python-ipykernel
5439 (name "python-ipykernel")
5444 (uri (pypi-uri "ipykernel" version))
5446 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5447 (build-system python-build-system)
5450 (modify-phases %standard-phases
5453 (setenv "HOME" "/tmp")
5454 (invoke "pytest" "-v")
5456 (add-after 'install 'set-python-file-name
5457 (lambda* (#:key outputs #:allow-other-keys)
5458 ;; Record the absolute file name of the 'python' executable in
5460 (let ((out (assoc-ref outputs "out")))
5461 (substitute* (string-append out "/share/jupyter"
5462 "/kernels/python3/kernel.json")
5464 (string-append "\"" (which "python") "\"")))
5467 `(("python-ipython" ,python-ipython)
5468 ;; imported at runtime during connect
5469 ("python-jupyter-client" ,python-jupyter-client)))
5471 `(("python-flaky" ,python-flaky)
5472 ("python-nose" ,python-nose)
5473 ("python-pytest" ,python-pytest)))
5474 (home-page "https://ipython.org")
5475 (synopsis "IPython Kernel for Jupyter")
5477 "This package provides the IPython kernel for Jupyter.")
5478 (license license:bsd-3)))
5480 ;; Version 5.1.1 and above no longer support Python 2.
5481 (define-public python2-ipykernel
5483 (name "python2-ipykernel")
5488 (uri (pypi-uri "ipykernel" version))
5490 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5491 (build-system python-build-system)
5493 `(#:python ,python-2
5495 (modify-phases %standard-phases
5498 (setenv "HOME" "/tmp")
5499 (invoke "pytest" "-v")
5502 `(("python2-ipython" ,python2-ipython)
5503 ;; imported at runtime during connect
5504 ("python2-jupyter-client" ,python2-jupyter-client)))
5506 `(("python2-pytest" ,python2-pytest)
5507 ("python2-nose" ,python2-nose)))
5508 (home-page "https://ipython.org")
5509 (synopsis "IPython Kernel for Jupyter")
5511 "This package provides the IPython kernel for Jupyter.")
5512 (license license:bsd-3)))
5514 (define-public python-pari-jupyter
5516 (name "python-pari-jupyter")
5521 (uri (pypi-uri "pari_jupyter" version))
5524 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5525 (build-system python-build-system)
5527 `(("python-ipykernel" ,python-ipykernel)))
5529 `(("pari-gp" ,pari-gp)
5530 ("readline" ,readline)))
5532 `(#:tests? #f)) ; no test suite
5534 "https://github.com/jdemeyer/pari_jupyter")
5535 (synopsis "A Jupyter kernel for PARI/GP")
5536 (description "The package provides a PARI/GP kernel for Jupyter.")
5537 (license license:gpl3+)))
5539 (define-public python-backcall
5541 (name "python-backcall")
5546 (uri (pypi-uri "backcall" version))
5549 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5550 (build-system python-build-system)
5551 (home-page "https://github.com/takluyver/backcall/")
5552 (synopsis "Specifications for callback functions passed in to an API")
5554 "If your code lets other people supply callback functions, it's important
5555 to specify the function signature you expect, and check that functions support
5556 that. Adding extra parameters later would break other peoples code unless
5557 you're careful. The @code{backcall} package provides a way of specifying the
5558 callback signature using a prototype function.")
5559 (license license:bsd-3)))
5561 ;; This is the latest release of the LTS version of ipython with support for
5562 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5563 ;; dropped support for Python 2.7.
5564 (define-public python2-ipython
5566 (name "python2-ipython")
5571 (uri (pypi-uri "ipython" version ".tar.gz"))
5573 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5574 (build-system python-build-system)
5576 `(("python2-backports-shutil-get-terminal-size"
5577 ,python2-backports-shutil-get-terminal-size)
5578 ("python2-pathlib2" ,python2-pathlib2)
5579 ("python2-pyzmq" ,python2-pyzmq)
5580 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5581 ("python2-terminado" ,python2-terminado)
5582 ("python2-matplotlib" ,python2-matplotlib)
5583 ("python2-numpy" ,python2-numpy)
5584 ("python2-numpydoc" ,python2-numpydoc)
5585 ("python2-jinja2" ,python2-jinja2)
5586 ("python2-mistune" ,python2-mistune)
5587 ("python2-pexpect" ,python2-pexpect)
5588 ("python2-pickleshare" ,python2-pickleshare)
5589 ("python2-simplegeneric" ,python2-simplegeneric)
5590 ("python2-jsonschema" ,python2-jsonschema)
5591 ("python2-traitlets" ,python2-traitlets)
5592 ("python2-nbformat" ,python2-nbformat)
5593 ("python2-pygments" ,python2-pygments)))
5595 `(("readline" ,readline)
5598 `(("graphviz" ,graphviz)
5599 ("pkg-config" ,pkg-config)
5600 ("python2-requests" ,python2-requests) ;; for tests
5601 ("python2-testpath" ,python2-testpath)
5602 ("python2-mock" ,python2-mock)
5603 ("python2-nose" ,python2-nose)))
5605 `(#:python ,python-2
5607 (modify-phases %standard-phases
5608 (add-before 'check 'delete-broken-tests
5609 (lambda* (#:key inputs #:allow-other-keys)
5610 ;; These tests throw errors for unknown reasons.
5611 (delete-file "IPython/core/tests/test_profile.py")
5612 (delete-file "IPython/core/tests/test_interactiveshell.py")
5613 (delete-file "IPython/core/tests/test_magic.py")
5615 (home-page "https://ipython.org")
5616 (synopsis "IPython is a tool for interactive computing in Python")
5618 "IPython provides a rich architecture for interactive computing with:
5619 Powerful interactive shells, a browser-based notebook, support for interactive
5620 data visualization, embeddable interpreters and tools for parallel
5622 (license license:bsd-3)))
5624 (define-public python-ipython
5626 (name "python-ipython")
5631 (uri (pypi-uri "ipython" version ".tar.gz"))
5633 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5634 (build-system python-build-system)
5636 `(("python-backcall" ,python-backcall)
5637 ("python-pyzmq" ,python-pyzmq)
5638 ("python-prompt-toolkit" ,python-prompt-toolkit)
5639 ("python-terminado" ,python-terminado)
5640 ("python-matplotlib" ,python-matplotlib)
5641 ("python-numpy" ,python-numpy)
5642 ("python-numpydoc" ,python-numpydoc)
5643 ("python-jedi" ,python-jedi)
5644 ("python-jinja2" ,python-jinja2)
5645 ("python-mistune" ,python-mistune)
5646 ("python-pexpect" ,python-pexpect)
5647 ("python-pickleshare" ,python-pickleshare)
5648 ("python-simplegeneric" ,python-simplegeneric)
5649 ("python-jsonschema" ,python-jsonschema)
5650 ("python-traitlets" ,python-traitlets)
5651 ("python-nbformat" ,python-nbformat)
5652 ("python-pygments" ,python-pygments)))
5654 `(("readline" ,readline)
5657 `(("graphviz" ,graphviz)
5658 ("pkg-config" ,pkg-config)
5659 ("python-requests" ,python-requests) ;; for tests
5660 ("python-testpath" ,python-testpath)
5661 ("python-nose" ,python-nose)))
5664 (modify-phases %standard-phases
5665 (add-after 'unpack 'make-docs-reproducible
5667 (substitute* "IPython/sphinxext/ipython_directive.py"
5668 ((".*import datetime") "")
5669 ((".*datetime.datetime.now\\(\\)") "")
5670 (("%timeit") "# %timeit"))
5672 ;; Tests can only be run after the library has been installed and not
5673 ;; within the source directory.
5675 (add-after 'install 'check
5676 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5679 ;; Make installed package available for running the tests
5680 (add-installed-pythonpath inputs outputs)
5681 (setenv "HOME" "/tmp/") ;; required by a test
5682 ;; We only test the core because one of the other tests
5683 ;; tries to import ipykernel.
5684 (invoke "python" "IPython/testing/iptest.py"
5685 "-v" "IPython/core/tests"))
5687 (add-before 'check 'fix-tests
5688 (lambda* (#:key inputs #:allow-other-keys)
5689 (substitute* "./IPython/utils/_process_posix.py"
5690 (("/usr/bin/env', 'which") (which "which")))
5691 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5692 (("#!/usr/bin/env python")
5693 (string-append "#!" (which "python"))))
5694 ;; This test introduces a circular dependency on ipykernel
5695 ;; (which depends on ipython).
5696 (delete-file "IPython/core/tests/test_display.py")
5697 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5698 (delete-file "IPython/core/tests/test_interactiveshell.py")
5700 (home-page "https://ipython.org")
5701 (synopsis "IPython is a tool for interactive computing in Python")
5703 "IPython provides a rich architecture for interactive computing with:
5704 Powerful interactive shells, a browser-based notebook, support for interactive
5705 data visualization, embeddable interpreters and tools for parallel
5707 (license license:bsd-3)))
5709 (define-public python-ipython-documentation
5711 (inherit python-ipython)
5712 (name "python-ipython-documentation")
5713 (version (package-version python-ipython))
5716 (modify-phases %standard-phases
5720 (lambda* (#:key outputs #:allow-other-keys)
5721 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5722 (doc (string-append data "/doc/" ,name "-" ,version))
5723 (html (string-append doc "/html"))
5724 (man1 (string-append data "/man/man1"))
5725 (info (string-append data "/info"))
5726 (examples (string-append doc "/examples"))
5727 (python-arg (string-append "PYTHON=" (which "python"))))
5728 (setenv "LANG" "en_US.utf8")
5729 (with-directory-excursion "docs"
5730 ;; FIXME: pdf fails to build
5731 ;;(system* "make" "pdf" "PAPER=a4")
5732 (system* "make" python-arg "html")
5733 ;; FIXME: the generated texi file contains ^@^@, which trips
5735 ;; (system* "make" python-arg "info")
5737 (copy-recursively "docs/man" man1)
5738 (copy-recursively "examples" examples)
5739 (copy-recursively "docs/build/html" html)
5740 ;; (copy-file "docs/build/latex/ipython.pdf"
5741 ;; (string-append doc "/ipython.pdf"))
5743 ;; (copy-file "docs/build/texinfo/ipython.info"
5744 ;; (string-append info "/ipython.info"))
5745 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5748 `(("python-ipython" ,python-ipython)
5749 ("python-ipykernel" ,python-ipykernel)))
5751 `(("python-sphinx" ,python-sphinx)
5752 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5753 ;; FIXME: It's possible that a smaller union would work just as well.
5754 ("texlive" ,(texlive-union (list texlive-amsfonts
5756 texlive-generic-ifxetex
5757 texlive-generic-pdftex
5758 texlive-latex-capt-of
5760 texlive-latex-environ
5761 texlive-latex-eqparbox
5762 texlive-latex-etoolbox
5763 texlive-latex-expdlist
5764 texlive-latex-fancyhdr
5765 texlive-latex-fancyvrb
5766 texlive-latex-fncychap
5768 texlive-latex-framed
5769 texlive-latex-geometry
5770 texlive-latex-graphics
5771 texlive-latex-hyperref
5772 texlive-latex-mdwtools
5773 texlive-latex-multirow
5774 texlive-latex-needspace
5775 texlive-latex-oberdiek
5776 texlive-latex-parskip
5777 texlive-latex-preview
5778 texlive-latex-tabulary
5779 texlive-latex-threeparttable
5780 texlive-latex-titlesec
5781 texlive-latex-trimspaces
5783 texlive-latex-upquote
5785 texlive-latex-varwidth
5786 texlive-latex-wrapfig)))
5787 ("texinfo" ,texinfo)))))
5789 (define-public python-urwid
5791 (name "python-urwid")
5796 (uri (pypi-uri "urwid" version))
5799 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5800 (build-system python-build-system)
5801 (home-page "http://urwid.org")
5802 (synopsis "Console user interface library for Python")
5804 "Urwid is a curses-based UI/widget library for Python. It includes many
5805 features useful for text console applications.")
5806 (license license:lgpl2.1+)))
5808 (define-public python2-urwid
5809 (package-with-python2 python-urwid))
5811 (define-public python-urwidtrees
5813 (name "python-urwidtrees")
5818 ;; package author intends on distributing via github rather than pypi:
5819 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5820 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5822 (file-name (string-append name "-" version ".tar.gz"))
5825 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5826 (build-system python-build-system)
5828 '(#:tests? #f)) ; no tests
5829 (propagated-inputs `(("python-urwid" ,python-urwid)))
5830 (home-page "https://github.com/pazz/urwidtrees")
5831 (synopsis "Tree widgets for urwid")
5832 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5833 toolkit. Use it to build trees of widgets.")
5834 (license license:gpl3+)))
5836 (define-public python2-urwidtrees
5837 (package-with-python2 python-urwidtrees))
5839 (define-public python-ua-parser
5841 (name "python-ua-parser")
5846 (uri (pypi-uri "ua-parser" version))
5849 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5850 (build-system python-build-system)
5852 `(#:tests? #f)) ;no test suite in release
5854 `(("python-pyyaml" ,python-pyyaml)))
5855 (home-page "https://github.com/ua-parser/uap-python")
5856 (synopsis "User agent parser")
5858 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5859 (license license:asl2.0)))
5861 (define-public python2-ua-parser
5862 (package-with-python2 python-ua-parser))
5864 (define-public python-user-agents
5866 (name "python-user-agents")
5871 (uri (pypi-uri "user-agents" version))
5874 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5875 (build-system python-build-system)
5877 `(#:tests? #f)) ;missing devices.json test file in release
5879 `(("python-ua-parser" ,python-ua-parser)))
5880 (home-page "https://github.com/selwin/python-user-agents")
5881 (synopsis "User Agent strings parsing library")
5883 "A library to identify devices (phones, tablets) and their capabilities by
5884 parsing (browser/HTTP) user agent strings.")
5885 (license license:expat)))
5887 (define-public python2-user-agents
5888 (package-with-python2 python-user-agents))
5890 (define-public python-dbus
5892 (name "python-dbus")
5897 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5898 "dbus-python-" version ".tar.gz"))
5901 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5902 (build-system gnu-build-system)
5905 (modify-phases %standard-phases
5909 ;; XXX: For the missing '/etc/machine-id'.
5910 (substitute* "test/run-test.sh"
5911 (("DBUS_FATAL_WARNINGS=1")
5912 "DBUS_FATAL_WARNINGS=0"))
5915 `(("pkg-config" ,pkg-config)))
5917 `(("python" ,python-wrapper)
5918 ("dbus-glib" ,dbus-glib)))
5919 (synopsis "Python bindings for D-bus")
5920 (description "python-dbus provides bindings for libdbus, the reference
5921 implementation of D-Bus.")
5922 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5923 (license license:expat)))
5925 (define-public python2-dbus
5926 (package (inherit python-dbus)
5927 (name "python2-dbus")
5928 (inputs `(("python" ,python-2)
5929 ,@(alist-delete "python"
5930 (package-inputs python-dbus)
5932 ;; FIXME: on Python 2, the test_utf8 fails with:
5933 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5934 (arguments `(#:tests? #f))))
5936 (define-public python-notify2
5938 (name "python-notify2")
5943 (uri (pypi-uri "notify2" version))
5946 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5947 (build-system python-build-system)
5948 (arguments `(#:tests? #f)) ; tests depend on system state
5950 `(("python-dbus" ,python-dbus)))
5951 (home-page "https://bitbucket.org/takluyver/pynotify2")
5952 (synopsis "Python interface to D-Bus notifications")
5954 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5955 It is a reimplementation of pynotify in pure Python, and an alternative to
5956 the GObject Introspection bindings to libnotify for non-GTK applications.")
5957 (license (list license:bsd-2
5958 license:lgpl2.1+))))
5960 (define-public python2-notify2
5961 (package-with-python2 python-notify2))
5963 (define-public python-lxml
5965 (name "python-lxml")
5970 (uri (pypi-uri "lxml" version))
5973 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5974 (build-system python-build-system)
5976 `(#:phases (modify-phases %standard-phases
5979 (invoke "make" "test"))))))
5981 `(("libxml2" ,libxml2)
5982 ("libxslt" ,libxslt)))
5983 (home-page "http://lxml.de/")
5985 "Python XML processing library")
5987 "The lxml XML toolkit is a Pythonic binding for the C libraries
5988 libxml2 and libxslt.")
5989 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5991 (define-public python2-lxml
5992 (package-with-python2 python-lxml))
5994 ;; beautifulsoup4 has a totally different namespace than 3.x,
5995 ;; and pypi seems to put it under its own name, so I guess we should too
5996 (define-public python-beautifulsoup4
5998 (name "python-beautifulsoup4")
6003 (uri (pypi-uri "beautifulsoup4" version))
6006 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6007 (build-system python-build-system)
6010 (modify-phases %standard-phases
6011 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6012 ;; must use this conversion script when building with Python 3. The
6013 ;; conversion script also runs the tests.
6014 ;; For more information, see the file 'convert-py3k' in the source
6017 (lambda _ (invoke "./convert-py3k"))))))
6019 `(("python-soupsieve" ,python-soupsieve)))
6021 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6023 "Python screen-scraping library")
6025 "Beautiful Soup is a Python library designed for rapidly setting up
6026 screen-scraping projects. It offers Pythonic idioms for navigating,
6027 searching, and modifying a parse tree, providing a toolkit for
6028 dissecting a document and extracting what you need. It automatically
6029 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6030 (license license:expat)
6031 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6033 (define-public python2-beautifulsoup4
6035 (inherit (package-with-python2
6036 (strip-python2-variant python-beautifulsoup4)))
6037 (arguments `(#:python ,python-2))))
6039 (define-public python-soupsieve
6041 (name "python-soupsieve")
6046 (uri (pypi-uri "soupsieve" version))
6049 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
6050 (build-system python-build-system)
6051 (arguments `(#:tests? #f))
6052 ;;XXX: 2 tests fail currently despite claming they were to be
6053 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6054 ;;don't want to create a circular dependency.
6055 (home-page "https://github.com/facelessuser/soupsieve")
6056 (synopsis "CSS selector library")
6058 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6059 Soup 4. It aims to provide selecting, matching, and filtering using modern
6060 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6061 specifications up through the latest CSS level 4 drafts and beyond (though
6062 some are not yet implemented).")
6063 (properties `((python2-variant . ,(delay python2-soupsieve))))
6064 (license license:expat)))
6066 (define-public python2-soupsieve
6067 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6071 `(("python2-backports-functools-lru-cache"
6072 ,python2-backports-functools-lru-cache)
6073 ,@(package-propagated-inputs base))))))
6075 (define-public python-netifaces
6077 (name "python-netifaces")
6082 (uri (pypi-uri "netifaces" version))
6085 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6086 (build-system python-build-system)
6087 (home-page "https://github.com/al45tair/netifaces")
6089 "Python module for portable network interface information")
6091 "Netifaces is a Python module providing information on network
6092 interfaces in an easy and portable manner.")
6093 (license license:expat)))
6095 (define-public python2-netifaces
6096 (package-with-python2 python-netifaces))
6098 (define-public python-networkx
6100 (name "python-networkx")
6105 (uri (pypi-uri "networkx" version ".zip"))
6107 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6108 (build-system python-build-system)
6109 ;; python-decorator is needed at runtime.
6111 `(("python-decorator" ,python-decorator)))
6113 `(("python-nose" ,python-nose)
6115 (home-page "https://networkx.github.io/")
6116 (synopsis "Python module for creating and manipulating graphs and networks")
6118 "NetworkX is a Python package for the creation, manipulation, and study
6119 of the structure, dynamics, and functions of complex networks.")
6120 (license license:bsd-3)))
6122 (define-public python2-networkx
6123 (package-with-python2 python-networkx))
6125 (define-public python-datrie
6127 (name "python-datrie")
6132 (uri (pypi-uri "datrie" version))
6135 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6136 (build-system python-build-system)
6138 `(("python-cython" ,python-cython)
6139 ("python-hypothesis" ,python-hypothesis)
6140 ("python-pytest" ,python-pytest)
6141 ("python-pytest-runner" ,python-pytest-runner)))
6142 (home-page "https://github.com/kmike/datrie")
6143 (synopsis "Fast, efficiently stored trie for Python")
6145 "This package provides a fast, efficiently stored trie implementation for
6147 (license license:lgpl2.1+)))
6149 (define-public snakemake
6156 (uri (pypi-uri "snakemake" version))
6158 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6159 (build-system python-build-system)
6161 ;; TODO: Package missing test dependencies.
6164 (modify-phases %standard-phases
6165 ;; For cluster execution Snakemake will call Python. Since there is
6166 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6167 ;; this by calling the snakemake wrapper instead.
6168 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6169 (lambda* (#:key outputs #:allow-other-keys)
6170 (substitute* "snakemake/executors.py"
6171 (("\\{sys.executable\\} -m snakemake")
6172 (string-append (assoc-ref outputs "out")
6176 `(("python-appdirs" ,python-appdirs)
6177 ("python-configargparse" ,python-configargparse)
6178 ("python-datrie" ,python-datrie)
6179 ("python-docutils" ,python-docutils)
6180 ("python-gitpython" ,python-gitpython)
6181 ("python-jinja2" ,python-jinja2)
6182 ("python-jsonschema" ,python-jsonschema)
6183 ("python-networkx" ,python-networkx)
6184 ("python-psutil" ,python-psutil)
6185 ("python-pyyaml" ,python-pyyaml)
6186 ("python-ratelimiter" ,python-ratelimiter)
6187 ("python-requests" ,python-requests)
6188 ("python-wrapt" ,python-wrapt)))
6189 (home-page "https://snakemake.readthedocs.io")
6190 (synopsis "Python-based execution environment for make-like workflows")
6192 "Snakemake aims to reduce the complexity of creating workflows by
6193 providing a clean and modern domain specific specification language (DSL) in
6194 Python style, together with a fast and comfortable execution environment.")
6195 (license license:expat)))
6197 (define-public python-pyqrcode
6199 (name "python-pyqrcode")
6204 (uri (pypi-uri "PyQRCode" version))
6207 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6208 (build-system python-build-system)
6210 "https://github.com/mnooner256/pyqrcode")
6211 (synopsis "QR code generator")
6213 "Pyqrcode is a QR code generator written purely in Python with
6214 SVG, EPS, PNG and terminal output.")
6215 (license license:bsd-3)))
6217 (define-public python-seaborn
6219 (name "python-seaborn")
6224 (uri (pypi-uri "seaborn" version))
6226 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6227 (build-system python-build-system)
6230 (modify-phases %standard-phases
6231 (add-before 'check 'start-xserver
6232 (lambda* (#:key inputs #:allow-other-keys)
6233 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6234 ;; There must be a running X server and make check doesn't
6235 ;; start one. Therefore we must do it.
6236 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6237 (setenv "DISPLAY" ":1")
6239 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6241 `(("python-pandas" ,python-pandas)
6242 ("python-matplotlib" ,python-matplotlib)
6243 ("python-numpy" ,python-numpy)
6244 ("python-scipy" ,python-scipy)))
6246 `(("python-pytest" ,python-pytest)
6247 ("xorg-server" ,xorg-server)))
6248 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6249 (synopsis "Statistical data visualization")
6251 "Seaborn is a library for making attractive and informative statistical
6252 graphics in Python. It is built on top of matplotlib and tightly integrated
6253 with the PyData stack, including support for numpy and pandas data structures
6254 and statistical routines from scipy and statsmodels.")
6255 (license license:bsd-3)))
6257 (define-public python2-seaborn
6258 (package-with-python2 python-seaborn))
6260 (define-public python-mpmath
6262 (name "python-mpmath")
6266 (uri (string-append "http://mpmath.org/files/mpmath-"
6270 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6271 (build-system python-build-system)
6274 (modify-phases %standard-phases
6277 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6278 (home-page "http://mpmath.org")
6279 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6281 "@code{mpmath} can be used as an arbitrary-precision substitute for
6282 Python's float/complex types and math/cmath modules, but also does much
6283 more advanced mathematics.")
6284 (license license:bsd-3)))
6286 (define-public python2-mpmath
6287 (package-with-python2 python-mpmath))
6289 (define-public python-bigfloat
6291 (name "python-bigfloat")
6296 (uri (pypi-uri "bigfloat" version))
6298 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6299 (build-system python-build-system)
6302 (home-page "https://github.com/mdickinson/bigfloat")
6303 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6305 "This package provides a Python interface to the MPFR library for
6306 multiprecision arithmetic.")
6307 (license license:lgpl3+)))
6309 (define-public python2-bigfloat
6310 (package-with-python2 python-bigfloat))
6312 (define-public python-sympy
6314 (name "python-sympy")
6320 "https://github.com/sympy/sympy/releases/download/sympy-"
6321 version "/sympy-" version ".tar.gz"))
6323 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6324 (build-system python-build-system)
6327 (modify-phases %standard-phases
6328 ;; Run the core tests after installation. By default it would run
6329 ;; *all* tests, which take a very long time to complete and are known
6332 (add-after 'install 'check
6333 (lambda* (#:key outputs #:allow-other-keys)
6334 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6337 `(("python-mpmath" ,python-mpmath)))
6338 (home-page "http://www.sympy.org/")
6339 (synopsis "Python library for symbolic mathematics")
6341 "SymPy is a Python library for symbolic mathematics. It aims to become a
6342 full-featured computer algebra system (CAS) while keeping the code as simple
6343 as possible in order to be comprehensible and easily extensible.")
6344 (license license:bsd-3)))
6346 (define-public python2-sympy
6348 (inherit (package-with-python2 python-sympy))
6351 (modify-phases %standard-phases
6352 ;; Run the core tests after installation. By default it would run
6353 ;; *all* tests, which take a very long time to complete and are known
6356 (add-after 'install 'check
6357 (lambda* (#:key outputs #:allow-other-keys)
6358 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6361 (define-public python-q
6368 (uri (pypi-uri "q" version))
6371 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6372 (build-system python-build-system)
6373 (home-page "https://github.com/zestyping/q")
6374 (synopsis "Quick-and-dirty debugging output for tired programmers")
6376 "q is a Python module for \"print\" style of debugging Python code. It
6377 provides convenient short API for print out of values, tracebacks, and
6378 falling into the Python interpreter.")
6379 (license license:asl2.0)))
6381 (define-public python2-q
6382 (package-with-python2 python-q))
6384 (define-public python2-xlib
6386 (name "python2-xlib")
6390 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6392 "python-xlib-" version ".tar.gz"))
6395 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6396 (build-system python-build-system)
6398 `(#:python ,python-2 ;Python 2 only
6399 #:tests? #f)) ;no tests
6400 (home-page "http://python-xlib.sourceforge.net/")
6401 (synopsis "Python X11 client library")
6403 "The Python X Library is intended to be a fully functional X client
6404 library for Python programs. It is useful to implement low-level X clients.
6405 It is written entirely in Python.")
6406 (license license:gpl2+)))
6408 (define-public python-singledispatch
6410 (name "python-singledispatch")
6415 (uri (pypi-uri "singledispatch" version))
6418 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6419 (build-system python-build-system)
6421 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6423 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6424 (synopsis "Backport of singledispatch feature from Python 3.4")
6426 "This library brings functools.singledispatch from Python 3.4 to Python
6428 (license license:expat)))
6430 (define-public python2-singledispatch
6431 (package-with-python2 python-singledispatch))
6433 ;; the python- version can be removed with python-3.5
6434 (define-public python-backports-abc
6436 (name "python-backports-abc")
6441 (uri (pypi-uri "backports_abc" version))
6444 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6445 (build-system python-build-system)
6446 (home-page "https://github.com/cython/backports_abc")
6447 (synopsis "Backport of additions to the 'collections.abc' module")
6449 "Python-backports-abc provides a backport of additions to the
6450 @code{collections.abc} module in Python-3.5.")
6451 (license license:psfl)))
6453 (define-public python2-backports-abc
6454 (package-with-python2 python-backports-abc))
6456 (define-public python-backports-csv
6458 (name "python-backports-csv")
6463 (uri (pypi-uri "backports.csv" version))
6466 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6467 (build-system python-build-system)
6468 (home-page "https://github.com/ryanhiebert/backports.csv")
6469 (synopsis "Backport of Python 3's csv module for Python 2")
6471 "Provides a backport of Python 3's @code{csv} module for parsing
6472 comma separated values. The API of the @code{csv} module in Python 2
6473 is drastically different from the @code{csv} module in Python 3.
6474 This is due, for the most part, to the difference between str in
6475 Python 2 and Python 3.")
6476 (license license:psfl)))
6478 (define-public python2-backports-csv
6479 (package-with-python2 python-backports-csv))
6481 (define-public python2-backports-shutil-get-terminal-size
6483 (name "python2-backports-shutil-get-terminal-size")
6488 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6491 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6492 (build-system python-build-system)
6494 `(#:python ,python-2
6496 (modify-phases %standard-phases
6499 (invoke "py.test" "-v"))))))
6501 `(("python2-pytest" ,python2-pytest)))
6502 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6503 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6505 "This package provides a backport of the @code{get_terminal_size
6506 function} from Python 3.3's @code{shutil}.
6507 Unlike the original version it is written in pure Python rather than C,
6508 so it might be a tiny bit slower.")
6509 (license license:expat)))
6511 (define-public python-waf
6517 (uri (string-append "https://waf.io/"
6518 "waf-" version ".tar.bz2"))
6521 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6522 (build-system python-build-system)
6525 (modify-phases %standard-phases
6528 (invoke "python" "waf-light" "configure" "build")))
6531 (invoke "python" "waf" "--version")))
6533 (lambda* (#:key outputs #:allow-other-keys)
6534 (let ((out (assoc-ref outputs "out")))
6535 (install-file "waf" (string-append out "/bin")))
6537 ;; waf breaks when it is wrapped.
6539 (home-page "https://waf.io/")
6540 (synopsis "Python-based build system")
6542 "Waf is a Python-based framework for configuring, compiling and installing
6544 (license license:bsd-3)))
6546 (define-public python2-waf
6547 (package-with-python2 python-waf))
6549 (define-public python-pyzmq
6551 (name "python-pyzmq")
6556 (uri (pypi-uri "pyzmq" version))
6558 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6559 (build-system python-build-system)
6562 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6563 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6564 ;; --inplace' for 'python setup.py test' to work.
6567 `(("zeromq" ,zeromq)))
6569 `(("pkg-config" ,pkg-config)
6570 ("python-nose" ,python-nose)))
6571 (home-page "https://github.com/zeromq/pyzmq")
6572 (synopsis "Python bindings for 0MQ")
6574 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6575 (license license:bsd-4)))
6577 (define-public python2-pyzmq
6578 (package-with-python2 python-pyzmq))
6580 (define-public python-pep8
6581 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6582 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6583 ;; some dependents' test suites, and nothing more.
6585 (name "python-pep8")
6590 (uri (pypi-uri "pep8" version))
6593 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6594 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6595 (build-system python-build-system)
6596 (home-page "https://pep8.readthedocs.org/")
6597 (synopsis "Python style guide checker")
6599 "This tools checks Python code against some of the style conventions in
6601 (license license:expat)))
6603 (define-public python2-pep8
6604 (package-with-python2 python-pep8))
6606 (define-public python-pyflakes
6608 (name "python-pyflakes")
6613 (uri (pypi-uri "pyflakes" version))
6616 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6617 (build-system python-build-system)
6619 "https://github.com/pyflakes/pyflakes")
6620 (synopsis "Passive checker of Python programs")
6622 "Pyflakes statically checks Python source code for common errors.")
6623 (license license:expat)))
6625 (define-public python2-pyflakes
6626 (package-with-python2 python-pyflakes))
6628 (define-public python-mccabe
6630 (name "python-mccabe")
6635 (uri (pypi-uri "mccabe" version))
6638 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6639 (build-system python-build-system)
6641 `(("python-pytest" ,python-pytest-bootstrap)
6642 ("python-pytest-runner" ,python-pytest-runner)))
6643 (home-page "https://github.com/flintwork/mccabe")
6644 (synopsis "McCabe checker, plugin for flake8")
6646 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6647 complexity of Python source code.")
6648 (license license:expat)))
6650 (define-public python2-mccabe
6651 (package-with-python2 python-mccabe))
6653 (define-public python-mccabe-0.2.1
6654 (package (inherit python-mccabe)
6659 (uri (pypi-uri "mccabe" version))
6662 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6664 (define-public python2-mccabe-0.2.1
6665 (package-with-python2 python-mccabe-0.2.1))
6667 ;; Flake8 2.4.1 requires an older version of pep8.
6668 ;; This should be removed ASAP.
6669 (define-public python-pep8-1.5.7
6670 (package (inherit python-pep8)
6675 (uri (pypi-uri "pep8" version))
6678 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6680 ;; XXX Tests not compatible with Python 3.5.
6683 (define-public python2-pep8-1.5.7
6684 (package-with-python2 python-pep8-1.5.7))
6686 ;; Flake8 2.4.1 requires an older version of pyflakes.
6687 ;; This should be removed ASAP.
6688 (define-public python-pyflakes-0.8.1
6689 (package (inherit python-pyflakes)
6694 (uri (pypi-uri "pyflakes" version))
6697 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6699 ;; XXX Tests not compatible with Python 3.5.
6702 (define-public python2-pyflakes-0.8.1
6703 (package-with-python2 python-pyflakes-0.8.1))
6705 (define-public python-flake8
6707 (name "python-flake8")
6711 (uri (pypi-uri "flake8" version))
6714 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6715 (build-system python-build-system)
6718 (modify-phases %standard-phases
6720 (add-after 'install 'check
6721 (lambda* (#:key inputs outputs #:allow-other-keys)
6722 (add-installed-pythonpath inputs outputs)
6723 (invoke "pytest" "-v")
6726 `(("python-pycodestyle" ,python-pycodestyle)
6727 ("python-entrypoints" ,python-entrypoints)
6728 ("python-pyflakes" ,python-pyflakes)
6729 ("python-mccabe" ,python-mccabe)))
6731 `(("python-mock" ,python-mock)
6732 ("python-pytest" ,python-pytest-bootstrap)
6733 ("python-pytest-runner" ,python-pytest-runner)))
6734 (home-page "https://gitlab.com/pycqa/flake8")
6736 "The modular source code checker: pep8, pyflakes and co")
6738 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6739 (properties `((python2-variant . ,(delay python2-flake8))))
6740 (license license:expat)))
6742 (define-public python2-flake8
6743 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6744 (package (inherit base)
6746 `(("python2-configparser" ,python2-configparser)
6747 ("python2-enum34" ,python2-enum34)
6748 ("python2-typing" ,python2-typing)
6749 ,@(package-propagated-inputs base))))))
6751 ;; python-hacking requires flake8 <2.6.0.
6752 (define-public python-flake8-2.5
6754 (inherit python-flake8)
6758 (uri (pypi-uri "flake8" version))
6761 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6763 `(("python-pep8" ,python-pep8)
6764 ,@(package-propagated-inputs python-flake8)))
6765 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6767 (define-public python2-flake8-2.5
6769 (inherit python2-flake8)
6770 (version (package-version python-flake8-2.5))
6772 (inherit (package-source python-flake8-2.5))))
6774 `(("python2-pep8" ,python2-pep8)
6775 ,@(package-propagated-inputs python2-flake8)))))
6777 (define-public python-flake8-polyfill
6779 (name "python-flake8-polyfill")
6784 (uri (pypi-uri "flake8-polyfill" version))
6787 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6788 (build-system python-build-system)
6791 (modify-phases %standard-phases
6794 ;; Be compatible with Pytest 4:
6795 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6796 (substitute* "setup.cfg"
6800 (setenv "PYTHONPATH"
6801 (string-append (getcwd) "/build/lib:"
6802 (getenv "PYTHONPATH")))
6803 (invoke "py.test" "-v"))))))
6805 `(("python-flake8" ,python-flake8)
6806 ("python-mock" ,python-mock)
6807 ("python-pep8" ,python-pep8)
6808 ("python-pycodestyle" ,python-pycodestyle)
6809 ("python-pytest" ,python-pytest)))
6810 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6811 (synopsis "Polyfill package for Flake8 plugins")
6813 "This package that provides some compatibility helpers for Flake8
6814 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6815 (license license:expat)))
6817 (define-public python2-flake8-polyfill
6818 (package-with-python2 python-flake8-polyfill))
6820 (define-public python-mistune
6822 (name "python-mistune")
6827 (uri (pypi-uri "mistune" version))
6830 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6831 (build-system python-build-system)
6833 `(("python-nose" ,python-nose)
6834 ("python-cython" ,python-cython)))
6835 (home-page "https://github.com/lepture/mistune")
6836 (synopsis "Markdown parser in pure Python")
6837 (description "This package provides a fast markdown parser in pure
6839 (license license:bsd-3)))
6841 (define-public python2-mistune
6842 (package-with-python2 python-mistune))
6844 (define-public python-markdown
6846 (name "python-markdown")
6851 (uri (pypi-uri "Markdown" version))
6854 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6855 (build-system python-build-system)
6857 `(("python-nose" ,python-nose)
6858 ("python-pyyaml" ,python-pyyaml)))
6859 (home-page "https://python-markdown.github.io/")
6860 (synopsis "Python implementation of Markdown")
6862 "This package provides a Python implementation of John Gruber's
6863 Markdown. The library features international input, various Markdown
6864 extensions, and several HTML output formats. A command line wrapper
6865 markdown_py is also provided to convert Markdown files to HTML.")
6866 (license license:bsd-3)))
6868 (define-public python2-markdown
6869 (package-with-python2 python-markdown))
6871 (define-public python-ptyprocess
6873 (name "python-ptyprocess")
6878 (uri (pypi-uri "ptyprocess" version))
6881 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6882 (build-system python-build-system)
6884 `(("python-nose" ,python-nose)))
6887 (modify-phases %standard-phases
6889 (lambda _ (invoke "nosetests"))))))
6890 (home-page "https://github.com/pexpect/ptyprocess")
6891 (synopsis "Run a subprocess in a pseudo terminal")
6893 "This package provides a Python library used to launch a subprocess in a
6894 pseudo terminal (pty), and interact with both the process and its pty.")
6895 (license license:isc)))
6897 (define-public python2-ptyprocess
6898 (package-with-python2 python-ptyprocess))
6900 (define-public python-cram
6902 (name "python-cram")
6904 (home-page "https://bitheap.org/cram/")
6907 (uri (list (string-append home-page "cram-"
6909 (pypi-uri "cram" version)))
6912 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6915 (modify-phases %standard-phases
6916 (add-after 'unpack 'patch-source
6918 (substitute* (find-files "cram" ".*\\.py$")
6919 ;; Replace default shell path.
6920 (("/bin/sh") (which "sh")))
6921 (substitute* (find-files "tests" ".*\\.t$")
6923 (("/bin/bash") (which "bash"))
6924 (("/bin/sh") (which "sh")))
6925 (substitute* "cram/_test.py"
6926 ;; This hack works around a bug triggered by substituting
6927 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6928 ;; "cram -h", which breaks the output at 80 characters. This
6929 ;; causes the line showing the default shell to break into two
6930 ;; lines, but the test expects a single line...
6931 (("env\\['COLUMNS'\\] = '80'")
6932 "env['COLUMNS'] = '160'"))
6934 (substitute* "Makefile"
6935 ;; Recent versions of python-coverage have caused the test
6936 ;; coverage to decrease (as of version 0.7). Allow that.
6937 (("--fail-under=100")
6942 ;; The test phase uses the built library and executable.
6943 (lambda* (#:key inputs outputs #:allow-other-keys)
6944 (add-installed-pythonpath inputs outputs)
6945 (setenv "PATH" (string-append (getenv "PATH") ":"
6946 (assoc-ref outputs "out") "/bin"))
6947 (invoke "make" "test"))))))
6948 (build-system python-build-system)
6950 `(("python-coverage" ,python-coverage)
6952 (synopsis "Simple testing framework for command line applications")
6954 "Cram is a functional testing framework for command line applications.
6955 Cram tests look like snippets of interactive shell sessions. Cram runs each
6956 command and compares the command output in the test with the command’s actual
6958 (license license:gpl2+)))
6960 (define-public python2-cram
6961 (package-with-python2 python-cram))
6963 (define-public python-straight-plugin
6965 (name "python-straight-plugin")
6970 (uri (pypi-uri "straight.plugin" version))
6973 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6974 (build-system python-build-system)
6975 (home-page "https://github.com/ironfroggy/straight.plugin")
6976 (synopsis "Simple namespaced plugin facility")
6977 (description "Straight Plugin provides a type of plugin you can create from
6978 almost any existing Python modules, and an easy way for outside developers to
6979 add functionality and customization to your projects with their own plugins.")
6980 (license license:expat)))
6982 (define-public python2-straight-plugin
6983 (package-with-python2 python-straight-plugin))
6985 (define-public python-fonttools
6987 (name "python-fonttools")
6991 (uri (pypi-uri "fonttools" version ".zip"))
6994 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6995 (build-system python-build-system)
6998 ("python-pytest" ,python-pytest)
6999 ("python-pytest-runner" ,python-pytest-runner)))
7000 (home-page "https://github.com/behdad/fonttools")
7001 (synopsis "Tools to manipulate font files")
7003 "FontTools/TTX is a library to manipulate font files from Python. It
7004 supports reading and writing of TrueType/OpenType fonts, reading and writing
7005 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7006 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7007 from an XML-based format.")
7008 (license license:expat)))
7010 (define-public python2-fonttools
7011 (package-with-python2 python-fonttools))
7013 (define-public python-ly
7020 (uri (pypi-uri name version))
7023 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7024 (build-system python-build-system)
7026 ;; FIXME: Some tests need network access.
7028 (synopsis "Tool and library for manipulating LilyPond files")
7029 (description "This package provides a Python library to parse, manipulate
7030 or create documents in LilyPond format. A command line program ly is also
7031 provided that can be used to do various manipulations with LilyPond files.")
7032 (home-page "https://pypi.python.org/pypi/python-ly")
7033 (license license:gpl2+)))
7035 (define-public python-appdirs
7037 (name "python-appdirs")
7042 (uri (pypi-uri "appdirs" version))
7045 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7046 (build-system python-build-system)
7047 (home-page "https://github.com/ActiveState/appdirs")
7049 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7051 "This module provides a portable way of finding out where user data
7052 should be stored on various operating systems.")
7053 (license license:expat)))
7055 (define-public python2-appdirs
7056 (package-with-python2 python-appdirs))
7058 (define-public python-llfuse
7060 (name "python-llfuse")
7064 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7067 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7068 (build-system python-build-system)
7073 `(("pkg-config" ,pkg-config)))
7074 (synopsis "Python bindings for FUSE")
7076 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7077 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7078 (license license:lgpl2.0+)
7079 (properties `((python2-variant . ,(delay python2-llfuse))))))
7081 (define-public python2-llfuse
7082 (package (inherit (package-with-python2
7083 (strip-python2-variant python-llfuse)))
7084 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7087 (define-public python-llfuse-0.41
7088 (package (inherit python-llfuse)
7093 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7094 "llfuse-" version ".tar.bz2"))
7097 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7098 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7099 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7100 (license (list license:expat license:lgpl2.0+))))
7102 (define-public python-msgpack
7104 (name "python-msgpack")
7108 (uri (pypi-uri "msgpack" version))
7111 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7112 (build-system python-build-system)
7114 `(#:modules ((guix build utils)
7115 (guix build python-build-system)
7120 (modify-phases %standard-phases
7123 (let ((cwd (getcwd)))
7124 (setenv "PYTHONPATH"
7125 (string-append cwd "/build/"
7126 (find (cut string-prefix? "lib" <>)
7127 (scandir (string-append cwd "/build")))
7129 (getenv "PYTHONPATH")))
7130 (invoke "pytest" "-v" "test")))))))
7132 `(("python-pytest" ,python-pytest)))
7133 (synopsis "MessagePack (de)serializer")
7134 (description "MessagePack is a fast, compact binary serialization format,
7135 suitable for similar data to JSON. This package provides CPython bindings for
7136 reading and writing MessagePack data.")
7137 (home-page "https://pypi.python.org/pypi/msgpack/")
7138 (license license:asl2.0)))
7140 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7141 ;; release 0.5. Some packages like borg still call it by the old name for now.
7142 ;; <https://bugs.gnu.org/30662>
7143 (define-public python-msgpack-transitional
7145 (inherit python-msgpack)
7146 (name "python-msgpack-transitional")
7148 (substitute-keyword-arguments (package-arguments python-msgpack)
7150 `(modify-phases ,phases
7151 (add-after 'unpack 'configure-transitional
7153 ;; Keep using the old name.
7154 (substitute* "setup.py"
7155 (("TRANSITIONAL = False")
7156 "TRANSITIONAL = 1"))
7159 (define-public python2-msgpack
7160 (package-with-python2 python-msgpack))
7162 (define-public python-netaddr
7164 (name "python-netaddr")
7169 (uri (pypi-uri "netaddr" version))
7172 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7173 (build-system python-build-system)
7174 (arguments `(#:tests? #f)) ;; No tests.
7175 (home-page "https://github.com/drkjam/netaddr/")
7176 (synopsis "Pythonic manipulation of network addresses")
7178 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7179 and MAC network addresses.")
7180 (license license:bsd-3)))
7182 (define-public python2-netaddr
7183 (package-with-python2 python-netaddr))
7185 (define-public python2-pyroute2
7187 (name "python2-pyroute2")
7192 (uri (pypi-uri "pyroute2" version))
7195 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7196 (build-system python-build-system)
7198 `(#:python ,python-2)) ;Python 3.x is not supported
7199 (home-page "https://github.com/svinota/pyroute2")
7200 (synopsis "Python netlink library")
7202 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7203 Supported netlink families and protocols include:
7205 @item rtnl, network settings - addresses, routes, traffic controls
7206 @item nfnetlink - netfilter API: ipset, nftables, ...
7207 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7208 @item devlink - manage and monitor devlink-enabled hardware
7209 @item generic - generic netlink families
7211 @item nl80211 - wireless functions API (basic support)
7212 @item taskstats - extended process statistics
7213 @item acpi_events - ACPI events monitoring
7214 @item thermal_events - thermal events monitoring
7215 @item VFS_DQUOT - disk quota events monitoring
7218 (license license:gpl2+)))
7220 (define-public python-wrapt
7222 (name "python-wrapt")
7227 (uri (pypi-uri "wrapt" version))
7230 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7231 (build-system python-build-system)
7233 ;; Tests are not included in the tarball, they are only available in the
7236 (home-page "https://github.com/GrahamDumpleton/wrapt")
7237 (synopsis "Module for decorators, wrappers and monkey patching")
7239 "The aim of the wrapt module is to provide a transparent object proxy for
7240 Python, which can be used as the basis for the construction of function
7241 wrappers and decorator functions.")
7242 (license license:bsd-2)))
7244 (define-public python2-wrapt
7245 (package-with-python2 python-wrapt))
7247 (define-public python-xlrd
7249 (name "python-xlrd")
7253 (uri (pypi-uri "xlrd" version))
7256 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7257 (build-system python-build-system)
7260 (modify-phases %standard-phases
7261 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7262 ;; run tests instead for now.
7263 (replace 'check (lambda _ (invoke "nosetests"))))))
7264 (native-inputs `(("python-nose" ,python-nose)))
7265 (home-page "http://www.python-excel.org/")
7266 (synopsis "Library for extracting data from Excel files")
7267 (description "This package provides a library to extract data from
7268 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7269 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7270 Unicode-aware. It is not intended as an end-user tool.")
7271 (license license:bsd-3)))
7273 (define-public python2-xlrd
7274 (package-with-python2 python-xlrd))
7276 (define-public python-prettytable
7278 (name "python-prettytable")
7283 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7286 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7287 (build-system python-build-system)
7288 (home-page "http://code.google.com/p/prettytable/")
7289 (synopsis "Display tabular data in an ASCII table format")
7291 "A library designed to represent tabular data in visually appealing ASCII
7292 tables. PrettyTable allows for selection of which columns are to be printed,
7293 independent alignment of columns (left or right justified or centred) and
7294 printing of sub-tables by specifying a row range.")
7295 (license license:bsd-3)))
7297 (define-public python2-prettytable
7298 (package-with-python2 python-prettytable))
7300 (define-public python-tables
7302 (name "python-tables")
7307 (uri (pypi-uri "tables" version))
7310 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7311 (modules '((guix build utils)))
7314 ;; Remove pre-compiled .pyc files from source.
7315 (for-each delete-file-recursively
7316 (find-files "." "__pycache__" #:directories? #t))
7317 (for-each delete-file (find-files "." "\\.pyc$"))
7319 (build-system python-build-system)
7321 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7322 ;; or "check", so we must override the build and check phases.
7324 (modify-phases %standard-phases
7325 (add-after 'unpack 'use-gcc
7327 (substitute* "setup.py"
7328 (("compiler = new_compiler\\(\\)" line)
7330 "\ncompiler.set_executables(compiler='gcc',"
7331 "compiler_so='gcc',"
7333 "linker_so='gcc -shared')")))
7336 (lambda* (#:key inputs #:allow-other-keys)
7337 (invoke "python" "setup.py" "build"
7338 (string-append "--hdf5="
7339 (assoc-ref inputs "hdf5")))))
7341 (lambda* (#:key inputs #:allow-other-keys)
7342 (invoke "python" "setup.py" "check"
7343 (string-append "--hdf5="
7344 (assoc-ref inputs "hdf5"))))))))
7346 `(("python-numexpr" ,python-numexpr)
7347 ("python-numpy" ,python-numpy)))
7349 `(("python-cython" ,python-cython)
7350 ("pkg-config" ,pkg-config)))
7355 (home-page "http://www.pytables.org/")
7356 (synopsis "Hierarchical datasets for Python")
7357 (description "PyTables is a package for managing hierarchical datasets and
7358 designed to efficiently cope with extremely large amounts of data.")
7359 (license license:bsd-3)))
7361 (define-public python2-tables
7362 (package-with-python2 python-tables))
7364 (define-public python-pyasn1
7366 (name "python-pyasn1")
7371 (uri (pypi-uri "pyasn1" version))
7374 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7375 (build-system python-build-system)
7376 (home-page "http://pyasn1.sourceforge.net/")
7377 (synopsis "ASN.1 types and codecs")
7379 "This is an implementation of ASN.1 types and codecs in Python. It is
7380 suitable for a wide range of protocols based on the ASN.1 specification.")
7381 (license license:bsd-2)))
7383 (define-public python2-pyasn1
7384 (package-with-python2 python-pyasn1))
7386 (define-public python-pyasn1-modules
7388 (name "python-pyasn1-modules")
7393 (uri (pypi-uri "pyasn1-modules" version))
7396 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7397 (build-system python-build-system)
7399 `(("python-pyasn1" ,python-pyasn1)))
7400 (home-page "https://sourceforge.net/projects/pyasn1/")
7401 (synopsis "ASN.1 codec implementations")
7403 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7404 implementations of ASN.1-based codecs and protocols.")
7405 (license license:bsd-3)))
7407 (define-public python2-pyasn1-modules
7408 (package-with-python2 python-pyasn1-modules))
7410 (define-public python-ipaddress
7412 (name "python-ipaddress")
7416 (uri (pypi-uri "ipaddress" version))
7419 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7420 (build-system python-build-system)
7421 (home-page "https://github.com/phihag/ipaddress")
7422 (synopsis "IP address manipulation library")
7424 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7425 in Python. This library is used to create, poke at, and manipulate IPv4 and
7426 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7427 module to older versions of Python.")
7428 (license license:psfl)))
7430 (define-public python2-ipaddress
7431 (package-with-python2 python-ipaddress))
7433 (define-public python2-ipaddr
7435 (name "python2-ipaddr")
7440 (uri (pypi-uri "ipaddr" version))
7442 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7443 (build-system python-build-system)
7445 `(#:python ,python-2 ;version 2 only
7447 (modify-phases %standard-phases
7449 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7450 (home-page "https://github.com/google/ipaddr-py")
7451 (synopsis "IP address manipulation library")
7453 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7454 IPv6 addresses and networks.
7456 For new implementations you may prefer to use the standard module
7457 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7458 versions of Python.")
7459 (license license:asl2.0)))
7461 (define-public python-idna
7463 (name "python-idna")
7468 (uri (pypi-uri "idna" version))
7471 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7472 (build-system python-build-system)
7473 (home-page "https://github.com/kjd/idna")
7474 (synopsis "Internationalized domain names in applications")
7476 "This is a library to support the Internationalised Domain Names in
7477 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7478 protocol is often referred to as “IDNA2008” and can produce different results
7479 from the earlier standard from 2003. The library is also intended to act as a
7480 suitable drop-in replacement for the “encodings.idna” module that comes with
7481 the Python standard library but currently only supports the older 2003
7483 (license license:bsd-4)))
7485 (define-public python-idna-2.7
7486 (package (inherit python-idna)
7490 (uri (pypi-uri "idna" version))
7493 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7496 (define-public python2-idna
7497 (package-with-python2 python-idna))
7499 (define-public python-idna-ssl
7501 (name "python-idna-ssl")
7506 (uri (pypi-uri "idna-ssl" version))
7509 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7510 (build-system python-build-system)
7512 `(#:tests? #f)) ;circular dependency with python-aiohttp
7513 (home-page "https://github.com/aio-libs/idna-ssl")
7514 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7515 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7517 (license license:expat)))
7519 (define-public python-pretend
7521 (name "python-pretend")
7526 (uri (pypi-uri "pretend" version))
7529 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7530 (build-system python-build-system)
7531 (home-page "https://github.com/alex/pretend")
7532 (synopsis "Library for stubbing in Python")
7534 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7535 technique for writing tests. You may hear the term mixed up with mocks,
7536 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7537 responses, rather than doing any computation.")
7538 (license license:bsd-3)))
7540 (define-public python2-pretend
7541 (package-with-python2 python-pretend))
7543 (define-public python-pip
7550 (uri (pypi-uri "pip" version))
7553 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7554 (build-system python-build-system)
7556 '(#:tests? #f)) ; there are no tests in the pypi archive.
7557 (home-page "https://pip.pypa.io/")
7558 (synopsis "Package manager for Python software")
7560 "Pip is a package manager for Python software, that finds packages on the
7561 Python Package Index (PyPI).")
7562 (license license:expat)))
7564 (define-public python2-pip
7565 (package-with-python2 python-pip))
7567 (define-public python-tlsh
7569 (name "python-tlsh")
7571 (home-page "https://github.com/trendmicro/tlsh")
7576 (url "https://github.com/trendmicro/tlsh.git")
7577 (commit (string-append "v" version))))
7578 (file-name (git-file-name name version))
7580 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7581 (build-system cmake-build-system)
7583 '(#:out-of-source? #f
7584 #:phases (modify-phases %standard-phases
7587 (lambda* (#:key outputs #:allow-other-keys)
7588 ;; Build and install the Python bindings. The underlying
7589 ;; C++ library is apparently not meant to be installed.
7590 (let ((out (assoc-ref outputs "out")))
7591 (with-directory-excursion "py_ext"
7592 (and (system* "python" "setup.py" "build")
7593 (system* "python" "setup.py" "install"
7594 (string-append "--prefix=" out))))))))))
7595 (inputs `(("python" ,python-wrapper))) ;for the bindings
7596 (synopsis "Fuzzy matching library for Python")
7598 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7599 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7600 value which can be used for similarity comparisons. Similar objects have
7601 similar hash values, which allows for the detection of similar objects by
7602 comparing their hash values. The byte stream should have a sufficient amount
7603 of complexity; for example, a byte stream of identical bytes will not generate
7605 (license license:asl2.0)))
7607 (define-public python2-tlsh
7609 (inherit python-tlsh)
7610 (name "python2-tlsh")
7611 (inputs `(("python" ,python-2)))))
7613 (define-public python-termcolor
7615 (name "python-termcolor")
7620 (uri (pypi-uri "termcolor" version))
7623 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7624 (build-system python-build-system)
7626 ;; There are no tests.
7628 (home-page "https://pypi.python.org/pypi/termcolor")
7629 (synopsis "ANSII Color formatting for terminal output")
7631 "This package provides ANSII Color formatting for output in terminals.")
7632 (license license:expat)))
7634 (define-public python2-termcolor
7635 (package-with-python2 python-termcolor))
7637 (define-public python-libarchive-c
7639 (name "python-libarchive-c")
7643 (uri (pypi-uri "libarchive-c" version))
7646 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7647 (build-system python-build-system)
7649 '(#:phases (modify-phases %standard-phases
7651 'build 'reference-libarchive
7652 (lambda* (#:key inputs #:allow-other-keys)
7653 ;; Retain the absolute file name of libarchive.so.
7654 (let ((libarchive (assoc-ref inputs "libarchive")))
7655 (substitute* "libarchive/ffi.py"
7656 (("find_library\\('archive'\\)")
7657 (string-append "'" libarchive
7658 "/lib/libarchive.so'"))))))
7660 (lambda _ (invoke "pytest" "-vv"))))))
7662 `(("python-mock" ,python-mock)
7663 ("python-pytest" ,python-pytest)))
7665 `(("libarchive" ,libarchive)))
7666 (home-page "https://github.com/Changaco/python-libarchive-c")
7667 (synopsis "Python interface to libarchive")
7669 "This package provides Python bindings to libarchive, a C library to
7670 access possibly compressed archives in many different formats. It uses
7671 Python's @code{ctypes} foreign function interface (FFI).")
7672 (license license:lgpl2.0+)))
7674 (define-public python2-libarchive-c
7675 (package-with-python2 python-libarchive-c))
7677 (define-public python-file
7680 (name "python-file")
7681 (build-system python-build-system)
7683 '(#:tests? #f ;no tests
7684 #:configure-flags '("--single-version-externally-managed" "--root=/")
7685 #:phases (modify-phases %standard-phases
7686 (add-before 'build 'change-directory
7690 (add-before 'build 'set-library-file-name
7691 (lambda* (#:key inputs #:allow-other-keys)
7692 (let ((file (assoc-ref inputs "file")))
7693 (substitute* "magic.py"
7694 (("find_library\\('magic'\\)")
7695 (string-append "'" file "/lib/libmagic.so'")))
7697 (inputs `(("file" ,file)))
7698 (native-inputs (if (%current-target-system)
7699 `(("self" ,this-package))
7701 (synopsis "Python bindings to the libmagic file type guesser. Note that
7702 this module and the python-magic module both provide a \"magic.py\" file;
7703 these two modules, which are different and were developed separately, both
7704 serve the same purpose: provide Python bindings for libmagic.")))
7706 (define-public python2-file
7707 (package-with-python2 python-file))
7709 (define-public python-debian
7711 (name "python-debian")
7712 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7716 ;; Use git-fetch, as pypi doesn't include test suite.
7721 (file-name (git-file-name name version))
7724 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7725 (build-system python-build-system)
7727 `(#:phases (modify-phases %standard-phases
7728 (add-after 'unpack 'remove-debian-specific-tests
7729 ;; python-apt, apt and dpkg are not yet available in guix,
7730 ;; and these tests heavily depend on them.
7732 (delete-file "lib/debian/tests/test_deb822.py")
7733 (delete-file "lib/debian/tests/test_debfile.py")
7736 `(("python-six" ,python-six)
7737 ("python-chardet" ,python-chardet)))
7738 (synopsis "Debian package related modules")
7740 ;; XXX: Use @enumerate instead of @itemize to work around
7741 ;; <http://bugs.gnu.org/21772>.
7742 "This package provides Python modules that abstract many formats of
7743 Debian-related files, such as:
7746 @item Debtags information;
7747 @item @file{debian/changelog} files;
7748 @item packages files, pdiffs;
7749 @item control files of single or multiple RFC822-style paragraphs---e.g.
7750 @file{debian/control}, @file{.changes}, @file{.dsc};
7751 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7752 contained files and meta-information.
7755 ;; Modules are either GPLv2+ or GPLv3+.
7756 (license license:gpl3+)))
7758 (define-public python2-debian
7759 (package-with-python2 python-debian))
7761 (define-public python-nbformat
7763 (name "python-nbformat")
7768 (uri (pypi-uri "nbformat" version))
7771 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7772 (build-system python-build-system)
7773 (arguments `(#:tests? #f)) ; no test target
7775 `(("python-ipython-genutils" ,python-ipython-genutils)
7776 ("python-jsonschema" ,python-jsonschema)
7777 ("python-jupyter-core" ,python-jupyter-core)
7778 ("python-traitlets" ,python-traitlets)))
7779 (home-page "http://jupyter.org")
7780 (synopsis "Jupyter Notebook format")
7781 (description "This package provides the reference implementation of the
7782 Jupyter Notebook format and Python APIs for working with notebooks.")
7783 (license license:bsd-3)))
7785 (define-public python2-nbformat
7786 (package-with-python2 python-nbformat))
7788 (define-public python-bleach
7790 (name "python-bleach")
7795 (uri (pypi-uri "bleach" version))
7798 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7799 (build-system python-build-system)
7801 `(("python-webencodings" ,python-webencodings)
7802 ("python-six" ,python-six)))
7804 `(("python-pytest" ,python-pytest)
7805 ("python-pytest-runner" ,python-pytest-runner-2)))
7806 (home-page "https://github.com/jsocol/bleach")
7807 (synopsis "Whitelist-based HTML-sanitizing tool")
7808 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7809 (license license:asl2.0)))
7811 (define-public python2-bleach
7812 (package-with-python2 python-bleach))
7814 (define-public python-entrypoints
7816 (name "python-entrypoints")
7821 (uri (pypi-uri "entrypoints" version))
7824 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7825 (build-system python-build-system)
7826 ;; The package does not come with a setup.py file, so we have to generate
7831 (modify-phases %standard-phases
7832 (add-after 'unpack 'create-setup.py
7834 (call-with-output-file "setup.py"
7837 from setuptools import setup
7838 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7840 (home-page "https://github.com/takluyver/entrypoints")
7841 (synopsis "Discover and load entry points from installed Python packages")
7842 (description "Entry points are a way for Python packages to advertise
7843 objects with some common interface. The most common examples are
7844 @code{console_scripts} entry points, which define shell commands by
7845 identifying a Python function to run. The @code{entrypoints} module contains
7846 functions to find and load entry points.")
7847 (license license:expat)))
7849 (define-public python2-entrypoints
7850 (package-with-python2 python-entrypoints))
7852 (define-public python-nbconvert
7854 (name "python-nbconvert")
7859 (uri (pypi-uri "nbconvert" version))
7862 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7863 (build-system python-build-system)
7865 `(;; The "bdist_egg" target is disabled by default, causing the installation
7867 #:configure-flags (list "bdist_egg")
7868 ;; FIXME: 5 failures, 40 errors.
7871 ;; (modify-phases %standard-phases
7874 ;; (zero? (system* "py.test" "-v")))))
7876 `(("python-pytest" ,python-pytest)))
7878 `(("python-bleach" ,python-bleach)
7879 ("python-entrypoints" ,python-entrypoints)
7880 ("python-jinja2" ,python-jinja2)
7881 ("python-jupyter-core" ,python-jupyter-core)
7882 ("python-mistune" ,python-mistune)
7883 ("python-nbformat" ,python-nbformat)
7884 ("python-pygments" ,python-pygments)
7885 ("python-traitlets" ,python-traitlets)))
7886 (home-page "http://jupyter.org")
7887 (synopsis "Converting Jupyter Notebooks")
7888 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7889 notebooks to various other formats via Jinja templates. It allows you to
7890 convert an @code{.ipynb} notebook file into various static formats including:
7898 @item ReStructured Text (rst)
7899 @item executable script
7901 (license license:bsd-3)))
7903 (define-public python2-nbconvert
7904 (package-with-python2 python-nbconvert))
7906 (define-public python-notebook
7908 (name "python-notebook")
7912 (uri (pypi-uri "notebook" version))
7915 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7916 (build-system python-build-system)
7919 (modify-phases %standard-phases
7922 ;; These tests require a browser
7923 (delete-file-recursively "notebook/tests/selenium")
7924 ;; Some tests need HOME
7925 (setenv "HOME" "/tmp")
7926 ;; This file contains "warningfilters", which are not supported
7927 ;; by this version of nose.
7928 (delete-file "setup.cfg")
7929 (with-directory-excursion "/tmp"
7930 (invoke "nosetests" "-v"))
7933 `(("python-jupyter-core" ,python-jupyter-core)
7934 ("python-nbformat" ,python-nbformat)
7935 ("python-nbconvert" ,python-nbconvert)
7936 ("python-prometheus-client" ,python-prometheus-client)
7937 ("python-send2trash" ,python-send2trash)
7938 ("python-terminado" ,python-terminado)))
7940 `(("python-nose" ,python-nose)
7941 ("python-sphinx" ,python-sphinx)
7942 ("python-requests" ,python-requests)))
7943 (home-page "http://jupyter.org/")
7944 (synopsis "Web-based notebook environment for interactive computing")
7946 "The Jupyter HTML notebook is a web-based notebook environment for
7947 interactive computing.")
7948 (properties `((python2-variant . ,(delay python2-notebook))))
7949 (license license:bsd-3)))
7951 (define-public python2-notebook
7952 (let ((base (package-with-python2
7953 (strip-python2-variant python-notebook))))
7954 (package (inherit base)
7956 `(("python2-mock" ,python2-mock)
7957 ,@(package-native-inputs base)))
7959 (substitute-keyword-arguments (package-arguments base)
7961 `(modify-phases ,phases
7962 (add-before 'check 'disable-test-case
7963 ;; The test requires network access to localhost. Curiously it
7964 ;; fails with Python 2 only. Simply make the test-case return
7968 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7969 (("formats = self.nbconvert_api") "return #")))))))))))
7971 (define-public python-widgetsnbextension
7973 (name "python-widgetsnbextension")
7978 (uri (pypi-uri "widgetsnbextension" version))
7981 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7982 (build-system python-build-system)
7984 `(("python-ipykernel" ,python-ipykernel)
7985 ("python-notebook" ,python-notebook)))
7987 `(("python-certifi" ,python-certifi)
7988 ("python-nose" ,python-nose)))
7989 (home-page "https://ipython.org")
7990 (synopsis "IPython HTML widgets for Jupyter")
7991 (description "This package provides interactive HTML widgets for Jupyter
7993 (license license:bsd-3)))
7995 (define-public python2-widgetsnbextension
7996 (package-with-python2 python-widgetsnbextension))
7998 (define-public python-ipywidgets
8000 (name "python-ipywidgets")
8005 (uri (pypi-uri "ipywidgets" version))
8008 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8009 (build-system python-build-system)
8011 `(("python-ipython" ,python-ipython)
8012 ("python-traitlets" ,python-traitlets)
8013 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8015 `(("python-nose" ,python-nose)
8016 ("python-pytest" ,python-pytest)))
8017 (home-page "https://ipython.org")
8018 (synopsis "IPython HTML widgets for Jupyter")
8019 (description "Ipywidgets are interactive HTML widgets for Jupyter
8020 notebooks and the IPython kernel. Notebooks come alive when interactive
8021 widgets are used. Users gain control of their data and can visualize changes
8023 (license license:bsd-3)))
8025 (define-public python2-ipywidgets
8026 (package-with-python2 python-ipywidgets))
8028 (define-public python-jupyter-console
8030 (name "python-jupyter-console")
8035 (uri (pypi-uri "jupyter_console" version))
8038 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8039 (build-system python-build-system)
8041 `(("python-ipykernel" ,python-ipykernel)
8042 ("python-jupyter-client" ,python-jupyter-client)
8043 ("python-prompt-toolkit" ,python-prompt-toolkit)
8044 ("python-pygments" ,python-pygments)))
8046 `(("python-nose" ,python-nose)))
8047 (home-page "https://jupyter.org")
8048 (synopsis "Jupyter terminal console")
8049 (description "This package provides a terminal-based console frontend for
8050 Jupyter kernels. It also allows for console-based interaction with non-Python
8051 Jupyter kernels such as IJulia and IRKernel.")
8052 (license license:bsd-3)))
8054 (define-public python2-jupyter-console
8056 (name "python2-jupyter-console")
8061 (uri (pypi-uri "jupyter_console" version))
8064 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8065 (build-system python-build-system)
8066 ;; Tests only run in an TTY.
8067 (arguments `(#:tests? #f))
8069 `(("python2-ipykernel" ,python2-ipykernel)
8070 ("python2-jupyter-client" ,python2-jupyter-client)
8071 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8072 ("python2-pygments" ,python2-pygments)))
8074 `(("python2-nose" ,python2-nose)))
8075 (home-page "https://jupyter.org")
8076 (synopsis "Jupyter terminal console")
8077 (description "This package provides a terminal-based console frontend for
8078 Jupyter kernels. It also allows for console-based interaction with non-Python
8079 Jupyter kernels such as IJulia and IRKernel.")
8080 (license license:bsd-3)))
8082 ;; The python-ipython and python-jupyter-console require each other. To get
8083 ;; the functionality in both packages working, strip down the
8084 ;; python-jupyter-console package when using it as an input to python-ipython.
8085 (define python-jupyter-console-minimal
8087 (inherit python-jupyter-console)
8088 (name "python-jupyter-console-minimal")
8090 (substitute-keyword-arguments
8091 (package-arguments python-jupyter-console)
8093 `(modify-phases ,phases
8094 (add-after 'install 'delete-bin
8095 (lambda* (#:key outputs #:allow-other-keys)
8096 ;; Delete the bin files, to avoid conflicts in profiles
8097 ;; where python-ipython and python-jupyter-console are
8099 (delete-file-recursively
8101 (assoc-ref outputs "out") "/bin"))))))))
8102 ;; Remove the python-ipython propagated input, to avoid the cycle
8106 (package-propagated-inputs python-jupyter-console)))))
8108 (define-public python-qtconsole
8110 (name "python-qtconsole")
8115 (uri (pypi-uri "qtconsole" version))
8118 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8119 (build-system python-build-system)
8121 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8122 ;; but we only have the LTS version 5.x. This means that there might be
8123 ;; runtime errors, but since this is a dependency of the Jupyter package,
8124 ;; and Jupyter can be used without the qtconsole we can overlook this for
8128 (modify-phases %standard-phases
8129 (add-before 'check 'pre-check
8131 (setenv "QT_QPA_PLATFORM" "offscreen")
8134 `(("python-ipykernel" ,python-ipykernel)
8135 ("python-ipython" ,python-ipython)))
8137 `(("python-pytest" ,python-pytest)))
8138 (home-page "http://jupyter.org")
8139 (synopsis "Jupyter Qt console")
8140 (description "This package provides a Qt-based console for Jupyter with
8141 support for rich media output.")
8142 (license license:bsd-3)))
8144 (define-public python-jsbeautifier
8146 (name "python-jsbeautifier")
8148 (home-page "https://github.com/beautify-web/js-beautify")
8153 (commit (string-append "v" version))))
8154 (file-name (git-file-name name version))
8157 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8158 (build-system python-build-system)
8160 `(#:phases (modify-phases %standard-phases
8161 (add-after 'unpack 'chdir
8163 ;; The upstream Git repository contains all the code,
8164 ;; but this package only builds the python code.
8167 (add-after 'unpack 'patch-python-six-requirements
8169 (substitute* "python/setup.py"
8174 `(("python-editorconfig" ,python-editorconfig)
8175 ("python-six" ,python-six)))
8177 `(("python-pytest" ,python-pytest)))
8178 (synopsis "JavaScript unobfuscator and beautifier")
8179 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8180 popular online obfuscators.")
8181 (license license:expat)))
8183 (define-public jupyter
8190 (uri (pypi-uri "jupyter" version))
8193 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8194 (build-system python-build-system)
8195 (arguments '(#:tests? #f)) ; there are none.
8197 `(("python-ipykernel" ,python-ipykernel)
8198 ("python-ipywidgets" ,python-ipywidgets)
8199 ("python-jupyter-console" ,python-jupyter-console)
8200 ("python-nbconvert" ,python-nbconvert)
8201 ("python-notebook" ,python-notebook)
8202 ("python-qtconsole" ,python-qtconsole)))
8203 (native-search-paths
8204 (list (search-path-specification
8205 (variable "JUPYTER_PATH")
8206 (files '("share/jupyter")))))
8207 (home-page "https://jupyter.org")
8208 (synopsis "Web application for interactive documents")
8210 "The Jupyter Notebook is a web application that allows you to create and
8211 share documents that contain live code, equations, visualizations and
8212 explanatory text. Uses include: data cleaning and transformation, numerical
8213 simulation, statistical modeling, machine learning and much more.")
8214 (license license:bsd-3)))
8216 (define-public python-chardet
8218 (name "python-chardet")
8223 (uri (pypi-uri "chardet" version))
8226 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8228 `(("python-hypothesis" ,python-hypothesis)
8229 ("python-pytest" ,python-pytest)
8230 ("python-pytest-runner" ,python-pytest-runner)))
8231 (build-system python-build-system)
8232 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8233 (arguments `(#:tests? #f))
8234 (home-page "https://github.com/chardet/chardet")
8235 (synopsis "Universal encoding detector for Python 2 and 3")
8237 "This package provides @code{chardet}, a Python module that can
8238 automatically detect a wide range of file encodings.")
8239 (license license:lgpl2.1+)))
8241 (define-public python2-chardet
8242 (package-with-python2 python-chardet))
8244 (define-public python-docopt
8246 (name "python-docopt")
8251 ;; The release on PyPI does not include tests.
8253 "https://github.com/docopt/docopt/archive/"
8255 (file-name (string-append name "-" version ".tar.gz"))
8258 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8259 (build-system python-build-system)
8261 `(("python-pytest" ,python-pytest)))
8264 (modify-phases %standard-phases
8266 (lambda _ (invoke "py.test"))))))
8267 (home-page "http://docopt.org")
8268 (synopsis "Command-line interface description language for Python")
8269 (description "This library allows the user to define a command-line
8270 interface from a program's help message rather than specifying it
8271 programmatically with command-line parsers like @code{getopt} and
8273 (license license:expat)))
8275 (define-public python2-docopt
8276 (package-with-python2 python-docopt))
8278 (define-public python-pythondialog
8280 (name "python-pythondialog")
8285 (uri (pypi-uri "pythondialog" version))
8288 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8289 (build-system python-build-system)
8292 (modify-phases %standard-phases
8293 (add-after 'unpack 'patch-path
8294 (lambda* (#:key inputs #:allow-other-keys)
8295 (let* ((dialog (assoc-ref inputs "dialog")))
8296 ;; Since this library really wants to grovel the search path, we
8297 ;; must hardcode dialog's store path into it.
8298 (substitute* "dialog.py"
8299 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8300 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8302 #:tests? #f)) ; no test suite
8304 `(("dialog" ,dialog)))
8305 (home-page "http://pythondialog.sourceforge.net/")
8306 (synopsis "Python interface to the UNIX dialog utility")
8307 (description "A Python wrapper for the dialog utility. Its purpose is to
8308 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8309 This allows one to make simple text-mode user interfaces on Unix-like systems")
8310 (license license:lgpl2.1)
8311 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8313 (define-public python2-pythondialog
8314 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8317 (version (package-version python-pythondialog))
8320 (uri (pypi-uri "python2-pythondialog" version))
8323 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8325 (define-public python-configobj
8327 (name "python-configobj")
8331 (uri (pypi-uri "configobj" version))
8334 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8335 ;; Patch setup.py so it looks for python-setuptools, which is
8336 ;; required to parse the keyword 'install_requires' in setup.py.
8337 (patches (search-patches "python-configobj-setuptools.patch"))))
8338 (build-system python-build-system)
8340 `(("python-six" ,python-six)))
8341 (synopsis "Config file reading, writing and validation")
8342 (description "ConfigObj is a simple but powerful config file reader and
8343 writer: an ini file round tripper. Its main feature is that it is very easy to
8344 use, with a straightforward programmer’s interface and a simple syntax for
8346 (home-page "https://github.com/DiffSK/configobj")
8347 (license license:bsd-3)))
8349 (define-public python2-configobj
8350 (package-with-python2 python-configobj))
8352 (define-public python-configargparse
8354 (name "python-configargparse")
8358 (uri (pypi-uri "ConfigArgParse" version))
8361 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8362 (build-system python-build-system)
8364 `(("python-pyyaml" ,python-pyyaml)))
8367 (modify-phases %standard-phases
8370 ;; Bypass setuptools-shim because one test relies on "setup.py"
8371 ;; being the first argument passed to the python call.
8373 ;; NOTE: Many tests do not run because they rely on Python's
8374 ;; built-in test.test_argparse, but we remove the unit tests from
8375 ;; our Python installation.
8376 (invoke "python" "setup.py" "test"))))))
8377 (synopsis "Replacement for argparse")
8378 (description "A drop-in replacement for argparse that allows options to also
8379 be set via config files and/or environment variables.")
8380 (home-page "https://github.com/bw2/ConfigArgParse")
8381 (license license:expat)))
8383 (define-public python2-configargparse
8384 (package-with-python2 python-configargparse))
8386 (define-public python-argparse-manpage
8388 (name "python-argparse-manpage")
8393 (uri (pypi-uri "argparse-manpage" version))
8396 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8397 (build-system python-build-system)
8398 (home-page "https://github.com/praiskup/argparse-manpage")
8399 (synopsis "Build manual page from Python's ArgumentParser object")
8401 "This package provides tools to build manual pages from Python's
8402 @code{ArgumentParser} object.")
8403 (license license:asl2.0)))
8405 (define-public python-contextlib2
8407 (name "python-contextlib2")
8412 (uri (pypi-uri "contextlib2" version))
8415 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8416 (build-system python-build-system)
8417 (home-page "http://contextlib2.readthedocs.org/")
8418 (synopsis "Tools for decorators and context managers")
8419 (description "This module is primarily a backport of the Python
8420 3.2 contextlib to earlier Python versions. Like contextlib, it
8421 provides utilities for common tasks involving decorators and context
8422 managers. It also contains additional features that are not part of
8423 the standard library.")
8424 (license license:psfl)))
8426 (define-public python2-contextlib2
8428 (name "python2-contextlib2")
8433 (uri (pypi-uri "contextlib2" version))
8436 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8437 (build-system python-build-system)
8439 `(#:python ,python-2
8441 (modify-phases %standard-phases
8443 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8445 `(("python2-unittest2" ,python2-unittest2)))
8446 (home-page "http://contextlib2.readthedocs.org/")
8447 (synopsis "Tools for decorators and context managers")
8448 (description "This module is primarily a backport of the Python
8449 3.2 contextlib to earlier Python versions. Like contextlib, it
8450 provides utilities for common tasks involving decorators and context
8451 managers. It also contains additional features that are not part of
8452 the standard library.")
8453 (license license:psfl)))
8455 (define-public python-texttable
8457 (name "python-texttable")
8462 (uri (pypi-uri "texttable" version))
8465 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8466 (build-system python-build-system)
8467 (arguments '(#:tests? #f)) ; no tests
8468 (home-page "https://github.com/foutaise/texttable/")
8469 (synopsis "Python module for creating simple ASCII tables")
8470 (description "Texttable is a Python module for creating simple ASCII
8472 (license license:lgpl2.1+)))
8474 (define-public python2-texttable
8475 (package-with-python2 python-texttable))
8477 (define-public python-atomicwrites
8479 (name "python-atomicwrites")
8483 (uri (pypi-uri "atomicwrites" version))
8486 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8487 (build-system python-build-system)
8488 (synopsis "Atomic file writes in Python")
8489 (description "Library for atomic file writes using platform dependent tools
8490 for atomic file system operations.")
8491 (home-page "https://github.com/untitaker/python-atomicwrites")
8492 (license license:expat)))
8494 (define-public python2-atomicwrites
8495 (package-with-python2 python-atomicwrites))
8497 (define-public python-click-threading
8499 (name "python-click-threading")
8503 (uri (pypi-uri "click-threading" version))
8506 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8507 (build-system python-build-system)
8509 `(("python-click" ,python-click)))
8510 (synopsis "Utilities for multithreading in Click")
8511 (description "This package provides utilities for multithreading in Click
8513 (home-page "https://github.com/click-contrib/click-threading")
8514 (license license:expat)))
8516 (define-public python-click-log
8518 (name "python-click-log")
8522 (uri (pypi-uri "click-log" version))
8525 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8526 (build-system python-build-system)
8528 `(("python-click" ,python-click)))
8529 (synopsis "Logging for click applications")
8530 (description "This package provides a Python library for logging Click
8532 (home-page "https://github.com/click-contrib/click-log")
8533 (license license:expat)))
8535 (define-public python-apipkg
8537 (name "python-apipkg")
8541 (uri (pypi-uri "apipkg" version))
8544 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8545 (build-system python-build-system)
8547 `(("python-pytest" ,python-pytest)))
8548 (synopsis "Namespace control and lazy-import mechanism")
8549 (description "With apipkg you can control the exported namespace of a Python
8550 package and greatly reduce the number of imports for your users. It is a small
8551 pure Python module that works on virtually all Python versions.")
8552 (home-page "https://github.com/pytest-dev/apipkg")
8553 (license license:expat)))
8555 (define-public python2-apipkg
8556 (package-with-python2 python-apipkg))
8558 (define-public python-execnet
8560 (name "python-execnet")
8564 (uri (pypi-uri "execnet" version))
8567 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8568 (build-system python-build-system)
8570 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8571 ;; The two test failures are caused by the lack of an `ssh` executable.
8572 ;; The test suite can be run with pytest after the 'install' phase.
8575 `(("python-pytest" ,python-pytest)
8576 ("python-setuptools-scm" ,python-setuptools-scm)))
8578 `(("python-apipkg" ,python-apipkg)))
8579 (synopsis "Rapid multi-Python deployment")
8580 (description "Execnet provides a share-nothing model with
8581 channel-send/receive communication for distributing execution across many
8582 Python interpreters across version, platform and network barriers. It has a
8583 minimal and fast API targeting the following uses:
8585 @item distribute tasks to (many) local or remote CPUs
8586 @item write and deploy hybrid multi-process applications
8587 @item write scripts to administer multiple environments
8589 (home-page "http://codespeak.net/execnet/")
8590 (license license:expat)))
8592 (define-public python2-execnet
8593 (package-with-python2 python-execnet))
8595 (define-public python-icalendar
8597 (name "python-icalendar")
8601 (uri (pypi-uri "icalendar" version))
8604 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8605 (build-system python-build-system)
8607 `(("python-dateutil" ,python-dateutil)
8608 ("python-pytz" ,python-pytz)))
8609 (synopsis "Python library for parsing iCalendar files")
8610 (description "The icalendar package is a parser/generator of iCalendar
8611 files for use with Python.")
8612 (home-page "https://github.com/collective/icalendar")
8613 (license license:bsd-2)))
8615 (define-public python-args
8617 (name "python-args")
8621 (uri (pypi-uri "args" version))
8624 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8625 (build-system python-build-system)
8626 (home-page "https://github.com/kennethreitz/args")
8627 (synopsis "Command-line argument parser")
8629 "This library provides a Python module to parse command-line arguments.")
8630 (license license:bsd-3)))
8632 (define-public python2-args
8633 (package-with-python2 python-args))
8635 (define-public python-clint
8637 (name "python-clint")
8641 (uri (pypi-uri "clint" version))
8644 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8645 (build-system python-build-system)
8648 (modify-phases %standard-phases
8650 (lambda _ (invoke "py.test" "-v"))))))
8652 `(("python-pytest" ,python-pytest)))
8654 `(("python-args" ,python-args)))
8655 (home-page "https://github.com/kennethreitz/clint")
8656 (synopsis "Command-line interface tools")
8658 "Clint is a Python module filled with a set of tools for developing
8659 command-line applications, including tools for colored and indented
8660 output, progress bar display, and pipes.")
8661 (license license:isc)))
8663 (define-public python2-clint
8664 (package-with-python2 python-clint))
8666 (define-public python-rply
8668 (name "python-rply")
8672 (uri (pypi-uri "rply" version))
8675 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8676 (build-system python-build-system)
8678 `(("python-appdirs" ,python-appdirs)))
8679 (home-page "https://github.com/alex/rply")
8680 (synopsis "Parser generator for Python")
8682 "This package provides a pure Python based parser generator, that also
8683 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8684 with a new public API, and RPython support.")
8685 (license license:bsd-3)))
8687 (define-public python2-rply
8688 (package-with-python2 python-rply))
8690 (define-public python-hy
8696 (uri (pypi-uri "hy" version))
8699 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8700 (build-system python-build-system)
8703 (modify-phases %standard-phases
8706 ;; Tests require write access to HOME.
8707 (setenv "HOME" "/tmp")
8708 (invoke "nosetests"))))))
8710 `(("python-coverage" ,python-coverage)
8711 ("python-nose" ,python-nose)))
8713 `(("python-astor" ,python-astor)
8714 ("python-clint" ,python-clint)
8715 ("python-rply" ,python-rply)))
8716 (home-page "http://hylang.org/")
8717 (synopsis "Lisp frontend to Python")
8719 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8720 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8721 Python at your fingertips, in Lisp form.")
8722 (license license:expat)))
8724 (define-public python2-hy
8725 (package-with-python2 python-hy))
8727 (define-public python2-functools32
8729 (name "python2-functools32")
8734 (uri (pypi-uri "functools32" version))
8737 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8738 (build-system python-build-system)
8740 `(#:python ,python-2
8741 #:tests? #f)) ; no test target
8742 (home-page "https://github.com/MiCHiLU/python-functools32")
8744 "Backport of the functools module from Python 3.2.3")
8746 "This package is a backport of the @code{functools} module from Python
8747 3.2.3 for use with older versions of Python and PyPy.")
8748 (license license:expat)))
8750 (define-public python2-subprocess32
8752 (name "python2-subprocess32")
8756 (uri (pypi-uri "subprocess32" version))
8759 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8761 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8762 (build-system python-build-system)
8764 `(#:python ,python-2
8765 ;; The test suite fails with Python > 2.7.13:
8766 ;; import test.support
8767 ;; ImportError: No module named support
8770 (modify-phases %standard-phases
8771 (add-after 'unpack 'patch-/bin/sh
8773 (substitute* '("subprocess32.py"
8774 "test_subprocess32.py")
8775 (("/bin/sh") (which "sh")))
8777 (home-page "https://github.com/google/python-subprocess32")
8778 (synopsis "Backport of the subprocess module from Python 3.2")
8780 "This is a backport of the @code{subprocess} standard library module
8781 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8782 new features. On POSIX systems it is guaranteed to be reliable when used
8783 in threaded applications. It includes timeout support from Python 3.3 but
8784 otherwise matches 3.2’s API.")
8785 (license license:psfl)))
8787 (define-public python2-futures
8789 (name "python2-futures")
8794 (uri (pypi-uri "futures" version))
8797 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8798 (build-system python-build-system)
8800 `(#:python ,python-2
8802 (modify-phases %standard-phases
8805 (invoke "python" "test_futures.py")
8807 (home-page "https://github.com/agronholm/pythonfutures")
8809 "Backport of the concurrent.futures package from Python 3.2")
8811 "The concurrent.futures module provides a high-level interface for
8812 asynchronously executing callables. This package backports the
8813 concurrent.futures package from Python 3.2")
8814 (license license:bsd-3)))
8816 (define-public python-promise
8818 (name "python-promise")
8823 (uri (pypi-uri "promise" version))
8826 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8827 (build-system python-build-system)
8828 ;; Tests wants python-futures, which is a python2 only program, and
8829 ;; can't be found by python-promise at test time.
8830 (arguments `(#:tests? #f))
8831 (home-page "https://github.com/syrusakbary/promise")
8832 (synopsis "Promises/A+ implementation for Python")
8834 "Promises/A+ implementation for Python")
8835 (properties `((python2-variant . ,(delay python2-promise))))
8836 (license license:expat)))
8838 (define-public python2-promise
8839 (let ((promise (package-with-python2
8840 (strip-python2-variant python-promise))))
8841 (package (inherit promise)
8842 (arguments (substitute-keyword-arguments (package-arguments promise)
8845 `(("python2-futures" ,python2-futures)
8846 ("python2-pytest" ,python2-pytest)
8847 ,@(package-native-inputs promise))))))
8849 (define-public python-progressbar33
8851 (name "python-progressbar33")
8856 (uri (pypi-uri "progressbar33" version))
8859 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8860 (build-system python-build-system)
8861 (home-page "http://github.com/germangh/python-progressbar")
8862 (synopsis "Text progress bar library for Python")
8864 "This package provides a text progress bar library for Python. This
8865 version only differs from the original @code{progressbar} package in that it
8866 uses relative package imports instead of absolute imports, which is necessary
8867 for the module to work under Python 3.3.")
8868 ;; Either or both of these licenses may be selected.
8869 (license (list license:lgpl2.1+ license:bsd-3))))
8871 (define-public python-colorama
8873 (name "python-colorama")
8878 (uri (pypi-uri "colorama" version))
8881 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8882 (build-system python-build-system)
8883 (synopsis "Colored terminal text rendering for Python")
8884 (description "Colorama is a Python library for rendering colored terminal
8886 (home-page "https://pypi.python.org/pypi/colorama")
8887 (license license:bsd-3)))
8889 (define-public python2-colorama
8890 (package-with-python2 python-colorama))
8892 (define-public python-rsa
8899 (uri (pypi-uri "rsa" version))
8902 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8903 (build-system python-build-system)
8905 `(("python-pyasn1" ,python-pyasn1)))
8906 (synopsis "Pure-Python RSA implementation")
8907 (description "Python-RSA is a pure-Python RSA implementation. It supports
8908 encryption and decryption, signing and verifying signatures, and key
8909 generation according to PKCS#1 version 1.5. It can be used as a Python
8910 library as well as on the command line.")
8911 (home-page "https://stuvel.eu/rsa")
8912 (license license:asl2.0)))
8914 (define-public python2-rsa
8915 (package-with-python2 python-rsa))
8917 (define-public python-pluggy
8919 (name "python-pluggy")
8924 (uri (pypi-uri "pluggy" version))
8927 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8928 (build-system python-build-system)
8930 `(("python-setuptools-scm" ,python-setuptools-scm)))
8931 (synopsis "Plugin and hook calling mechanism for Python")
8932 (description "Pluggy is an extraction of the plugin manager as used by
8933 Pytest but stripped of Pytest specific details.")
8934 (home-page "https://pypi.python.org/pypi/pluggy")
8935 (license license:expat)))
8937 (define-public python2-pluggy
8938 (package-with-python2 python-pluggy))
8940 (define-public python-tox
8947 (uri (pypi-uri "tox" version))
8950 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8951 (build-system python-build-system)
8953 ;; FIXME: Tests require pytest-timeout, which itself requires
8954 ;; pytest>=2.8.0 for installation.
8957 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8958 ("python-py" ,python-py)
8959 ("python-virtualenv" ,python-virtualenv)))
8961 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8962 ("python-pytest" ,python-pytest) ; >= 2.3.5
8963 ("python-setuptools-scm" ,python-setuptools-scm)))
8964 (home-page "http://tox.testrun.org/")
8965 (synopsis "Virtualenv-based automation of test activities")
8966 (description "Tox is a generic virtualenv management and test command line
8967 tool. It can be used to check that a package installs correctly with
8968 different Python versions and interpreters, or run tests in each type of
8969 supported environment, or act as a frontend to continuous integration
8971 (license license:expat)))
8973 (define-public python2-tox
8974 (package-with-python2 python-tox))
8976 (define-public python-jmespath
8978 (name "python-jmespath")
8983 (uri (pypi-uri "jmespath" version))
8986 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8987 (build-system python-build-system)
8989 `(("python-nose" ,python-nose)))
8990 (synopsis "JSON Matching Expressions")
8991 (description "JMESPath (pronounced “james path”) is a Python library that
8992 allows one to declaratively specify how to extract elements from a JSON
8994 (home-page "https://github.com/jmespath/jmespath.py")
8995 (license license:expat)))
8997 (define-public python2-jmespath
8998 (package-with-python2 python-jmespath))
9000 (define-public python-botocore
9002 (name "python-botocore")
9003 (version "1.12.149")
9007 (uri (pypi-uri "botocore" version))
9010 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9011 (build-system python-build-system)
9013 ;; FIXME: Many tests are failing.
9016 `(("python-dateutil" ,python-dateutil)
9017 ("python-docutils" ,python-docutils)
9018 ("python-jmespath" ,python-jmespath)))
9020 `(("python-mock" ,python-mock)
9021 ("python-nose" ,python-nose)
9023 ("python-tox" ,python-tox)
9024 ("python-urllib3" ,python-urllib3)
9025 ("python-wheel" ,python-wheel)))
9026 (home-page "https://github.com/boto/botocore")
9027 (synopsis "Low-level interface to AWS")
9028 (description "Botocore is a Python library that provides a low-level
9029 interface to the Amazon Web Services (AWS) API.")
9030 (license license:asl2.0)))
9032 (define-public python2-botocore
9033 (package-with-python2 python-botocore))
9035 (define-public python-xdo
9042 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9043 "python-xdo_" version ".orig.tar.gz"))
9046 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9047 (build-system python-build-system)
9050 (modify-phases %standard-phases
9051 (add-before 'install 'patch-libxdo-path
9052 ;; Hardcode the path of dynamically loaded libxdo library.
9053 (lambda* (#:key inputs #:allow-other-keys)
9054 (let ((libxdo (string-append
9055 (assoc-ref inputs "xdotool")
9057 (substitute* "xdo/_xdo.py"
9058 (("find_library\\(\"xdo\"\\)")
9059 (simple-format #f "\"~a\"" libxdo)))
9061 #:tests? #f)) ; no tests provided
9063 `(("python-six" ,python-six)))
9065 `(("xdotool" ,xdotool)
9066 ("libX11" ,libx11)))
9067 (home-page "https://tracker.debian.org/pkg/python-xdo")
9068 (synopsis "Python library for simulating X11 keyboard/mouse input")
9069 (description "Provides bindings to libxdo for manipulating X11 via simulated
9070 input. (Note that this is mostly a legacy library; you may wish to look at
9071 python-xdo for newer bindings.)")
9072 (license license:bsd-3)))
9074 (define-public python2-xdo
9075 (package-with-python2 python-xdo))
9077 (define-public python-mako
9079 (name "python-mako")
9084 (uri (pypi-uri "Mako" version))
9087 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9088 (build-system python-build-system)
9090 `(#:phases (modify-phases %standard-phases
9093 (invoke "pytest" "-vv"))))))
9095 `(("python-markupsafe" ,python-markupsafe)))
9097 `(("python-mock" ,python-mock)
9098 ("python-pytest" ,python-pytest)))
9099 (home-page "https://www.makotemplates.org/")
9100 (synopsis "Templating language for Python")
9101 (description "Mako is a templating language for Python that compiles
9102 templates into Python modules.")
9103 (license license:expat)))
9105 (define-public python2-mako
9106 (package-with-python2 python-mako))
9108 (define-public python-waitress
9110 (name "python-waitress")
9115 (uri (pypi-uri "waitress" version))
9116 (patches (search-patches "python-waitress-fix-tests.patch"))
9119 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9120 (build-system python-build-system)
9121 (home-page "https://github.com/Pylons/waitress")
9122 (synopsis "Waitress WSGI server")
9123 (description "Waitress is meant to be a production-quality pure-Python WSGI
9124 server with very acceptable performance.")
9125 (license license:zpl2.1)))
9127 (define-public python2-waitress
9128 (package-with-python2 python-waitress))
9130 (define-public python-whichcraft
9132 (name "python-whichcraft")
9137 (uri (pypi-uri "whichcraft" version))
9140 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9141 (build-system python-build-system)
9143 `(("python-pytest" ,python-pytest)))
9144 (home-page "https://github.com/pydanny/whichcraft")
9145 (synopsis "Cross-platform cross-python shutil.which functionality")
9147 "This package provides a shim of the shutil.which function that's
9148 designed to work across multiple versions of Python.")
9149 (license license:bsd-3)))
9151 (define-public python-cookiecutter
9153 (name "python-cookiecutter")
9158 (uri (pypi-uri "cookiecutter" version))
9161 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9162 (build-system python-build-system)
9164 `(("python-freezegun" ,python-freezegun)
9165 ("python-pytest" ,python-pytest)
9166 ("python-pytest-catchlog" ,python-pytest-catchlog)
9167 ("python-pytest-cov" ,python-pytest-cov)
9168 ("python-pytest-mock" ,python-pytest-mock)))
9170 `(("python-binaryornot" ,python-binaryornot)
9171 ("python-click" ,python-click)
9172 ("python-future" ,python-future)
9173 ("python-jinja2" ,python-jinja2)
9174 ("python-jinja2-time" ,python-jinja2-time)
9175 ("python-poyo" ,python-poyo)
9176 ("python-requests" ,python-requests)
9177 ("python-whichcraft" ,python-whichcraft)))
9178 (home-page "https://github.com/audreyr/cookiecutter")
9180 "Command-line utility that creates projects from project templates")
9182 "This package provides a command-line utility that creates projects from
9183 project templates, e.g. creating a Python package project from a Python package
9185 (license license:bsd-3)))
9187 (define-public python-pyquery
9189 (name "python-pyquery")
9194 (uri (pypi-uri "pyquery" version))
9197 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9198 (build-system python-build-system)
9200 `(("python-webob" ,python-webob)
9201 ("python-webtest" ,python-webtest)))
9203 `(("python-lxml" ,python-lxml)
9204 ("python-cssselect" ,python-cssselect)))
9205 (home-page "https://github.com/gawel/pyquery")
9206 (synopsis "Make jQuery-like queries on xml documents")
9207 (description "pyquery allows you to make jQuery queries on xml documents.
9208 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9209 fast xml and html manipulation.")
9210 (license license:bsd-3)))
9212 (define-public python-anyjson
9214 (name "python-anyjson")
9219 (uri (pypi-uri "anyjson" version))
9222 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9223 (build-system python-build-system)
9225 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9226 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9227 ;; whatever) so this transformation needs to be done before the tests
9228 ;; can be run. Maybe we could add a build step to transform beforehand
9229 ;; but it could be annoying/difficult.
9230 ;; We can enable tests for the Python 2 version, though, and do below.
9232 (home-page "https://bitbucket.org/runeh/anyjson/")
9234 "Wraps best available JSON implementation in a common interface")
9236 "Anyjson loads whichever is the fastest JSON module installed
9237 and provides a uniform API regardless of which JSON implementation is used.")
9238 (license license:bsd-3)
9239 (properties `((python2-variant . ,(delay python2-anyjson))))))
9241 (define-public python2-anyjson
9242 (let ((anyjson (package-with-python2
9243 (strip-python2-variant python-anyjson))))
9246 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9248 ,@(package-arguments anyjson)))
9249 (native-inputs `(("python2-nose" ,python2-nose))))))
9251 (define-public python-amqp
9253 (name "python-amqp")
9258 (uri (pypi-uri "amqp" version))
9261 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9262 (build-system python-build-system)
9264 `(("python-case" ,python-case)
9265 ("python-pytest-sugar" ,python-pytest-sugar)
9266 ("python-mock" ,python-mock)))
9268 `(("python-vine" ,python-vine)))
9269 (home-page "https://github.com/celery/py-amqp")
9271 "Low-level AMQP client for Python (fork of amqplib)")
9273 "This is a fork of amqplib which was originally written by Barry Pederson.
9274 It is maintained by the Celery project, and used by kombu as a pure python
9275 alternative when librabbitmq is not available.")
9276 (license license:lgpl2.1+)
9277 (properties `((python2-variant . ,(delay python2-amqp))))))
9279 (define-public python2-amqp
9280 (let ((amqp (package-with-python2
9281 (strip-python2-variant python-amqp))))
9284 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9285 ;; unmaintained. Weirdly, does not do this on the python 3
9288 ,@(package-arguments amqp))))))
9290 (define-public python-txamqp
9292 (name "python-txamqp")
9297 (uri (pypi-uri "txAMQP" version))
9300 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9301 (build-system python-build-system)
9303 `(("python-six" ,python-six)
9304 ("python-twisted" ,python-twisted)))
9305 (home-page "https://github.com/txamqp/txamqp")
9306 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9308 "This package provides a Python library for communicating with AMQP peers
9309 and brokers using the asynchronous networking framework Twisted. It contains
9310 all the necessary code to connect, send and receive messages to/from an
9311 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9312 also includes support for using Thrift RPC over AMQP in Twisted
9314 (license license:asl2.0)))
9316 (define-public python2-txamqp
9317 (package-with-python2 python-txamqp))
9319 (define-public python-kombu
9321 (name "python-kombu")
9326 (uri (pypi-uri "kombu" version))
9329 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9330 (build-system python-build-system)
9332 `(("python-mock" ,python-mock)
9333 ("python-case" ,python-case)
9334 ("python-pyro4" ,python-pyro4)
9335 ("python-pytest-sugar" ,python-pytest-sugar)
9336 ("python-pytz" ,python-pytz)))
9338 `(("python-anyjson" ,python-anyjson)
9339 ("python-amqp" ,python-amqp)
9340 ("python-redis" ,python-redis)))
9341 (home-page "https://kombu.readthedocs.io")
9342 (synopsis "Message passing library for Python")
9343 (description "The aim of Kombu is to make messaging in Python as easy as
9344 possible by providing an idiomatic high-level interface for the AMQ protocol,
9345 and also provide proven and tested solutions to common messaging problems.
9346 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9347 message orientation, queuing, routing, reliability and security, for which the
9348 RabbitMQ messaging server is the most popular implementation.")
9349 (license license:bsd-3)
9350 (properties `((python2-variant . ,(delay python2-kombu))))))
9352 (define-public python2-kombu
9353 (let ((kombu (package-with-python2
9354 (strip-python2-variant python-kombu))))
9357 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9358 ;; It works fine on the python3 variant.
9360 ,@(package-arguments kombu)))
9361 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9362 ,@(package-native-inputs kombu))))))
9364 (define-public python-billiard
9366 (name "python-billiard")
9371 (uri (pypi-uri "billiard" version))
9374 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9375 (build-system python-build-system)
9377 `(("python-case" ,python-case)
9378 ("python-pytest" ,python-pytest)))
9379 (home-page "https://github.com/celery/billiard")
9381 "Python multiprocessing fork with improvements and bugfixes")
9383 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9384 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9385 pyprocessing package. This standalone variant is intended to be compatible with
9386 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9387 (license license:bsd-3)
9388 (properties `((python2-variant . ,(delay python2-billiard))))))
9390 (define-public python2-billiard
9391 (let ((billiard (package-with-python2
9392 (strip-python2-variant python-billiard))))
9395 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9396 ("python2-mock" ,python2-mock)
9397 ,@(package-native-inputs billiard))))))
9399 (define-public python-celery
9401 (name "python-celery")
9406 (uri (pypi-uri "celery" version))
9409 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9410 (build-system python-build-system)
9412 '(;; TODO The tests fail with Python 3.7
9413 ;; https://github.com/celery/celery/issues/4849
9416 (modify-phases %standard-phases
9417 (add-after 'unpack 'patch-requirements
9419 (substitute* "requirements/test.txt"
9420 (("pytest>=3\\.0,<3\\.3")
9424 `(("python-case" ,python-case)
9425 ("python-pytest" ,python-pytest)))
9427 `(("python-pytz" ,python-pytz)
9428 ("python-billiard" ,python-billiard)
9429 ("python-kombu" ,python-kombu)))
9430 (home-page "https://celeryproject.org")
9431 (synopsis "Distributed Task Queue")
9432 (description "Celery is an asynchronous task queue/job queue based on
9433 distributed message passing. It is focused on real-time operation, but
9434 supports scheduling as well. The execution units, called tasks, are executed
9435 concurrently on a single or more worker servers using multiprocessing,
9436 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9437 synchronously (wait until ready).")
9438 (license license:bsd-3)
9439 (properties `((python2-variant . ,(delay python2-celery))))))
9441 (define-public python2-celery
9442 (let ((celery (package-with-python2
9443 (strip-python2-variant python-celery))))
9446 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9447 ("python2-mock" ,python2-mock)
9448 ,@(package-native-inputs celery))))))
9450 (define-public python-translitcodec
9452 (name "python-translitcodec")
9457 (uri (pypi-uri "translitcodec" version))
9460 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9461 (build-system python-build-system)
9463 `(#:tests? #f)) ; no tests provided
9465 "https://github.com/claudep/translitcodec")
9467 "Unicode to 8-bit charset transliteration codec")
9469 "This package contains codecs for transliterating ISO 10646 texts into
9470 best-effort representations using smaller coded character sets (ASCII,
9472 (license license:expat)))
9474 (define-public python2-translitcodec
9475 (package-with-python2 python-translitcodec))
9477 (define-public python-editor
9479 (name "python-editor")
9484 (uri (pypi-uri "python-editor" version))
9487 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9488 (build-system python-build-system)
9490 "https://github.com/fmoo/python-editor")
9492 "Programmatically open an editor, capture the result")
9494 "python-editor is a library that provides the editor module for
9495 programmatically interfacing with your system's $EDITOR.")
9496 (license license:asl2.0)))
9498 (define-public python2-editor
9499 (package-with-python2 python-editor))
9501 (define-public python-vobject
9503 (name "python-vobject")
9507 (uri (pypi-uri "vobject" version))
9510 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9511 (build-system python-build-system)
9513 '(;; The test suite relies on some non-portable Windows interfaces.
9516 `(("python-dateutil" ,python-dateutil)
9517 ("python-pyicu" ,python-pyicu)))
9518 (synopsis "Parse and generate vCard and vCalendar files")
9519 (description "Vobject is intended to be a full featured Python package for
9520 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9521 are supported and well tested. vCard 3.0 files are supported, and all data
9522 should be imported, but only a few components are understood in a sophisticated
9524 (home-page "http://eventable.github.io/vobject/")
9525 (license license:asl2.0)))
9527 (define-public python2-vobject
9528 (package-with-python2 python-vobject))
9530 (define-public python-munkres
9532 (name "python-munkres")
9536 (uri (pypi-uri "munkres" version))
9539 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9540 (build-system python-build-system)
9542 '(#:tests? #f)) ; no test suite
9543 (home-page "http://software.clapper.org/munkres/")
9544 (synopsis "Implementation of the Munkres algorithm")
9545 (description "The Munkres module provides an implementation of the Munkres
9546 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9547 useful for solving the Assignment Problem.")
9548 (license license:bsd-3)))
9550 (define-public python2-munkres
9551 (package-with-python2 python-munkres))
9553 (define-public python-whoosh
9555 (name "python-whoosh")
9560 (uri (pypi-uri "Whoosh" version))
9563 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9564 (build-system python-build-system)
9566 `(("python-pytest" ,python-pytest)))
9567 (home-page "https://bitbucket.org/mchaput/whoosh")
9568 (synopsis "Full text indexing, search, and spell checking library")
9570 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9572 (license license:bsd-2)))
9574 (define-public python2-whoosh
9575 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9576 (package (inherit whoosh)
9578 `(("python2-backport-ssl-match-hostname"
9579 ,python2-backport-ssl-match-hostname)
9580 ,@(package-propagated-inputs whoosh))))))
9582 (define-public python-pathlib
9584 (name "python-pathlib")
9588 (uri (pypi-uri "pathlib" version))
9591 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9592 (build-system python-build-system)
9593 ;; The tests depend on the internal "test" module, which does not provide
9594 ;; a stable interface.
9595 (arguments `(#:tests? #f))
9596 (home-page "https://pathlib.readthedocs.org/")
9597 (synopsis "Object-oriented file system paths")
9598 (description "Pathlib offers a set of classes to handle file system paths.
9599 It offers the following advantages over using string objects:
9602 @item No more cumbersome use of os and os.path functions. Everything can
9603 be done easily through operators, attribute accesses, and method calls.
9604 @item Embodies the semantics of different path types. For example,
9605 comparing Windows paths ignores casing.
9606 @item Well-defined semantics, eliminating any inconsistencies or
9607 ambiguities (forward vs. backward slashes, etc.).
9610 Note: In Python 3.4, pathlib is now part of the standard library. For other
9611 Python versions please consider python-pathlib2 instead, which tracks the
9612 standard library module. This module (python-pathlib) isn't maintained
9614 (license license:expat)))
9616 (define-public python2-pathlib
9617 (package-with-python2 python-pathlib))
9619 (define-public python2-pathlib2
9621 (name "python2-pathlib2")
9625 (uri (pypi-uri "pathlib2" version))
9628 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9629 (build-system python-build-system)
9630 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9631 ;; version is 3.4 which already includes this package as part of the
9632 ;; standard library.
9634 `(#:python ,python-2))
9636 `(("python2-scandir" ,python2-scandir)
9637 ("python2-six" ,python2-six)))
9638 (home-page "https://pypi.python.org/pypi/pathlib2/")
9639 (synopsis "Object-oriented file system paths - backport of standard
9641 (description "The goal of pathlib2 is to provide a backport of standard
9642 pathlib module which tracks the standard library module, so all the newest
9643 features of the standard pathlib can be used also on older Python versions.
9645 Pathlib offers a set of classes to handle file system paths. It offers the
9646 following advantages over using string objects:
9649 @item No more cumbersome use of os and os.path functions. Everything can
9650 be done easily through operators, attribute accesses, and method calls.
9651 @item Embodies the semantics of different path types. For example,
9652 comparing Windows paths ignores casing.
9653 @item Well-defined semantics, eliminating any inconsistencies or
9654 ambiguities (forward vs. backward slashes, etc.).
9656 (license license:expat)))
9658 (define-public python2-pathlib2-bootstrap
9661 (inherit python2-pathlib2)
9662 (name "python2-pathlib2-bootstrap")
9664 `(("python2-scandir" ,python2-scandir)
9665 ("python2-six" ,python2-six-bootstrap))))))
9667 (define-public python-jellyfish
9669 (name "python-jellyfish")
9673 (uri (pypi-uri "jellyfish" version))
9676 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9677 (build-system python-build-system)
9679 `(("python-pytest" ,python-pytest)))
9680 (home-page "https://github.com/jamesturk/jellyfish")
9681 (synopsis "Approximate and phonetic matching of strings")
9682 (description "Jellyfish uses a variety of string comparison and phonetic
9683 encoding algorithms to do fuzzy string matching.")
9684 (license license:bsd-2)
9685 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9687 (define-public python2-jellyfish
9688 (let ((jellyfish (package-with-python2
9689 (strip-python2-variant python-jellyfish))))
9690 (package (inherit jellyfish)
9691 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9692 ,@(package-native-inputs jellyfish))))))
9694 (define-public python2-unicodecsv
9696 (name "python2-unicodecsv")
9700 ;; The test suite is not included in the PyPi release.
9701 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9702 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9703 "archive/" version ".tar.gz"))
9704 (file-name (string-append name "-" version ".tar.gz"))
9707 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9708 (build-system python-build-system)
9710 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9711 #:python ,python-2))
9713 `(("python2-unittest2" ,python2-unittest2)))
9714 (home-page "https://github.com/jdunck/python-unicodecsv")
9715 (synopsis "Unicode CSV module for Python 2")
9716 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9717 module, adding support for Unicode strings.")
9718 (license license:bsd-2)))
9720 (define-public python-rarfile
9722 (name "python-rarfile")
9726 (uri (pypi-uri "rarfile" version))
9729 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9730 (build-system python-build-system)
9733 (modify-phases %standard-phases
9735 ;; Many tests fail, but the installation proceeds.
9736 (lambda _ (invoke "make" "-C" "test" "test"))))))
9738 `(("which" ,which))) ; required for tests
9740 `(("libarchive" ,libarchive)))
9741 (home-page "https://github.com/markokr/rarfile")
9742 (synopsis "RAR archive reader for Python")
9743 (description "This is Python module for RAR archive reading. The interface
9744 is made as zipfile like as possible.")
9745 (license license:isc)))
9747 (define-public python2-rarfile
9748 (package-with-python2 python-rarfile))
9750 (define-public python-magic
9752 (name "python-magic")
9757 (uri (pypi-uri "python-magic" version))
9760 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9761 (file-name (string-append name "-" version "-checkout"))))
9762 (build-system python-build-system)
9764 ;; The tests are unreliable, so don't run them. The tests fail
9765 ;; under Python3 because they were written for Python2 and
9766 ;; contain import statements that do not work in Python3. One of
9767 ;; the tests fails under Python2 because its assertions are
9768 ;; overly stringent; it relies on comparing output strings which
9769 ;; are brittle and can change depending on the version of
9770 ;; libmagic being used and the system on which the test is
9771 ;; running. In my case, under GuixSD 0.10.0, only one test
9772 ;; failed, and it seems to have failed only because the version
9773 ;; of libmagic that is packaged in Guix outputs a slightly
9774 ;; different (but not wrong) string than the one that the test
9777 #:phases (modify-phases %standard-phases
9778 ;; Replace a specific method call with a hard-coded
9779 ;; path to the necessary libmagic.so file in the
9780 ;; store. If we don't do this, then the method call
9781 ;; will fail to find the libmagic.so file, which in
9782 ;; turn will cause any application using
9783 ;; python-magic to fail.
9784 (add-before 'build 'hard-code-path-to-libmagic
9785 (lambda* (#:key inputs #:allow-other-keys)
9786 (let ((file (assoc-ref inputs "file")))
9787 (substitute* "magic.py"
9788 (("ctypes.util.find_library\\('magic'\\)")
9789 (string-append "'" file "/lib/libmagic.so'")))
9791 (add-before 'install 'disable-egg-compression
9793 (let ((port (open-file "setup.cfg" "a")))
9794 (display "\n[easy_install]\nzip_ok = 0\n"
9799 ;; python-magic needs to be able to find libmagic.so.
9802 "https://github.com/ahupp/python-magic")
9804 "File type identification using libmagic")
9806 "This module uses ctypes to access the libmagic file type
9807 identification library. It makes use of the local magic database and
9808 supports both textual and MIME-type output. Note that this module and
9809 the python-file module both provide a \"magic.py\" file; these two
9810 modules, which are different and were developed separately, both serve
9811 the same purpose: to provide Python bindings for libmagic.")
9812 (license license:expat)))
9814 (define-public python2-magic
9815 (package-with-python2 python-magic))
9817 (define-public python2-s3cmd
9819 (name "python2-s3cmd")
9824 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9825 "s3cmd-" version ".tar.gz"))
9828 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9829 (build-system python-build-system)
9831 ;; s3cmd is written for python2 only and contains no tests.
9832 `(#:python ,python-2
9835 `(("python2-dateutil" ,python2-dateutil)
9836 ;; The python-file package also provides a magic.py module.
9837 ;; This is an unfortunate state of affairs; however, s3cmd
9838 ;; fails to install if it cannot find specifically the
9839 ;; python-magic package. Thus we include it, instead of using
9840 ;; python-file. Ironically, s3cmd sometimes works better
9841 ;; without libmagic bindings at all:
9842 ;; https://github.com/s3tools/s3cmd/issues/198
9843 ("python2-magic" ,python2-magic)))
9844 (home-page "http://s3tools.org/s3cmd")
9845 (synopsis "Command line tool for S3-compatible storage services")
9847 "S3cmd is a command line tool for uploading, retrieving and managing data
9848 in storage services that are compatible with the Amazon Simple Storage
9849 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9850 GnuPG encryption, and more. It also supports management of Amazon's
9851 CloudFront content delivery network.")
9852 (license license:gpl2+)))
9854 (define-public python-pkgconfig
9856 (name "python-pkgconfig")
9861 (uri (pypi-uri "pkgconfig" version))
9864 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9865 (build-system python-build-system)
9867 `(("python-nose" ,python-nose)))
9869 `(("pkg-config" ,pkg-config)))
9872 (modify-phases %standard-phases
9873 (add-before 'build 'patch
9874 ;; Hard-code the path to pkg-config.
9876 (substitute* "pkgconfig/pkgconfig.py"
9877 (("cmd = 'pkg-config")
9878 (string-append "cmd = '" (which "pkg-config"))))
9882 (invoke "nosetests" "test.py"))))))
9883 (home-page "https://github.com/matze/pkgconfig")
9884 (synopsis "Python interface for pkg-config")
9885 (description "This module provides a Python interface to pkg-config. It
9886 can be used to find all pkg-config packages, check if a package exists,
9887 check if a package meets certain version requirements, query CFLAGS and
9888 LDFLAGS and parse the output to build extensions with setup.py.")
9889 (license license:expat)))
9891 (define-public python2-pkgconfig
9892 (package-with-python2 python-pkgconfig))
9894 (define-public python-bz2file
9896 (name "python-bz2file")
9901 (uri (pypi-uri "bz2file" version))
9904 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9905 (build-system python-build-system)
9907 `(#:tests? #f)) ; Tests use deprecated python modules.
9908 (home-page "https://github.com/nvawda/bz2file")
9909 (synopsis "Read and write bzip2-compressed files")
9911 "Bz2file is a Python library for reading and writing bzip2-compressed
9912 files. It contains a drop-in replacement for the I/O interface in the
9913 standard library's @code{bz2} module, including features from the latest
9914 development version of CPython that are not available in older releases.")
9915 (license license:asl2.0)))
9917 (define-public python2-bz2file
9918 (package-with-python2 python-bz2file))
9920 (define-public python-future
9922 (name "python-future")
9927 (uri (pypi-uri "future" version))
9930 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9931 (build-system python-build-system)
9932 ;; Many tests connect to the network or are otherwise flawed.
9933 ;; https://github.com/PythonCharmers/python-future/issues/210
9936 (home-page "http://python-future.org")
9937 (synopsis "Single-source support for Python 3 and 2")
9939 "@code{python-future} is the missing compatibility layer between Python 2 and
9940 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9941 to support both Python 2 and Python 3 with minimal overhead.")
9942 (license license:expat)))
9944 (define-public python2-future
9945 (package-with-python2 python-future))
9947 (define-public python-cysignals
9949 (name "python-cysignals")
9954 (uri (pypi-uri "cysignals" version))
9957 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9958 (build-system python-build-system)
9960 `(("python-cython" ,python-cython)
9961 ("python-sphinx" ,python-sphinx)))
9963 `(("pari-gp" ,pari-gp)))
9965 `(#:modules ((guix build python-build-system)
9966 ((guix build gnu-build-system) #:prefix gnu:)
9968 ;; FIXME: Tests are executed after installation and currently fail
9969 ;; when not installing into standard locations; the author is working
9973 (modify-phases %standard-phases
9976 (assoc-ref gnu:%standard-phases 'configure)))))
9978 "https://github.com/sagemath/cysignals")
9980 "Handling of interrupts and signals for Cython")
9982 "The cysignals package provides mechanisms to handle interrupts (and
9983 other signals and errors) in Cython code, using two related approaches,
9984 for mixed Cython/Python code or external C libraries and pure Cython code,
9986 (license license:lgpl3+)))
9988 (define-public python2-cysignals
9989 (package-with-python2 python-cysignals))
9991 (define-public python2-shedskin
9993 (name "python2-shedskin")
9998 (uri (string-append "https://github.com/shedskin/shedskin/"
9999 "releases/download/v" version
10000 "/shedskin-" version ".tgz"))
10003 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10004 (build-system python-build-system)
10006 `(#:python ,python-2
10007 #:phases (modify-phases %standard-phases
10008 (add-after 'unpack 'fix-resulting-include-libs
10009 (lambda* (#:key inputs #:allow-other-keys)
10010 (let ((libgc (assoc-ref inputs "libgc"))
10011 (pcre (assoc-ref inputs "pcre")))
10012 (substitute* "shedskin/makefile.py"
10013 (("variable == 'CCFLAGS':[ ]*")
10014 (string-append "variable == 'CCFLAGS':\n"
10015 " line += ' -I " pcre "/include"
10016 " -I " libgc "/include'"))
10017 (("variable == 'LFLAGS':[ ]*")
10018 (string-append "variable == 'LFLAGS':\n"
10019 " line += ' -L" pcre "/lib"
10020 " -L " libgc "/lib'")))
10022 (inputs `(("pcre" ,pcre)
10024 (home-page "https://shedskin.github.io/")
10025 (synopsis "Experimental Python-2 to C++ Compiler")
10026 (description (string-append "This is an experimental compiler for a subset of
10027 Python. It generates C++ code and a Makefile."))
10028 (license (list license:gpl3 license:bsd-3 license:expat))))
10030 (define-public python2-rope
10032 (name "python2-rope")
10037 (uri (pypi-uri "rope" version))
10040 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10042 ;; Rope has only partial python3 support, see `python-rope'
10043 `(#:python ,python-2))
10044 (build-system python-build-system)
10046 `(("python2-unittest2" ,python2-unittest2)))
10047 (home-page "https://github.com/python-rope/rope")
10048 (synopsis "Refactoring library for Python")
10049 (description "Rope is a refactoring library for Python. It facilitates
10050 the renaming, moving and extracting of attributes, functions, modules, fields
10051 and parameters in Python 2 source code. These refactorings can also be applied
10052 to occurrences in strings and comments.")
10053 (license license:gpl2)))
10055 (define-public python-rope
10057 (inherit python2-rope)
10058 (name "python-rope")
10059 (arguments `(#:python ,python-wrapper
10060 ;; XXX: Only partial python3 support, results in some failing
10061 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10063 (properties `((python2-variant . ,(delay python2-rope))))))
10065 (define-public python-py3status
10067 (name "python-py3status")
10072 (uri (pypi-uri "py3status" version))
10074 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10075 (build-system python-build-system)
10080 (modify-phases %standard-phases
10081 ;; 'file' is used for detection of configuration file encoding
10082 ;; let's make link the dependency to particular input
10083 (add-before 'build 'patch-file-path
10084 (lambda* (#:key inputs #:allow-other-keys)
10085 (let ((file-path (assoc-ref inputs "file")))
10086 (substitute* "py3status/parse_config.py"
10087 (("\\['file', '-b'")
10088 (string-append "['" file-path "/bin/file', '-b'")))
10090 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10091 (home-page "https://github.com/ultrabug/py3status")
10092 (synopsis "Extensible i3status wrapper written in Python")
10093 (description "py3status is an i3status wrapper which extends i3status
10094 functionality in a modular way, allowing you to extend your panel with your
10095 own code, responding to click events and updating clock every second.")
10096 (license license:bsd-3)))
10098 (define-public python-tblib
10100 (name "python-tblib")
10104 (uri (pypi-uri "tblib" version))
10106 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10107 (build-system python-build-system)
10110 (modify-phases %standard-phases
10111 (add-before 'check 'adjust-tests
10113 (when (which "python3")
10114 ;; Adjust the example output to match that of Python 3.7:
10115 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10116 (substitute* "README.rst"
10117 (("Exception\\('fail',") "Exception('fail'"))
10121 ;; Upstream runs tests after installation and the package itself
10122 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10124 (setenv "PYTHONPATH"
10125 (string-append (getcwd) "/build/lib:"
10126 (getenv "PYTHONPATH")))
10127 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10129 `(("python-pytest" ,python-pytest)
10130 ("python-six" ,python-six)))
10131 (home-page "https://github.com/ionelmc/python-tblib")
10132 (synopsis "Traceback serialization library")
10134 "Traceback serialization allows you to:
10137 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10138 different processes. This allows better error handling when running code over
10139 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10141 @item Parse traceback strings and raise with the parsed tracebacks.
10143 (license license:bsd-3)))
10145 (define-public python2-tblib
10146 (package-with-python2 python-tblib))
10148 (define-public python-greenlet
10150 (name "python-greenlet")
10154 (uri (pypi-uri "greenlet" version))
10157 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10158 (build-system python-build-system)
10159 (home-page "https://greenlet.readthedocs.io/")
10160 (synopsis "Lightweight in-process concurrent programming")
10162 "Greenlet package is a spin-off of Stackless, a version of CPython
10163 that supports micro-threads called \"tasklets\". Tasklets run
10164 pseudo-concurrently (typically in a single or a few OS-level threads) and
10165 are synchronized with data exchanges on \"channels\".")
10166 (license (list license:psfl license:expat))))
10168 (define-public python2-greenlet
10169 (package-with-python2 python-greenlet))
10171 (define-public python-objgraph
10173 (name "python-objgraph")
10178 (uri (pypi-uri "objgraph" version))
10181 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10182 (build-system python-build-system)
10184 `(("python-graphviz" ,python-graphviz)))
10186 `(("python-mock" ,python-mock)
10187 ("graphviz" ,graphviz)))
10188 (home-page "https://mg.pov.lt/objgraph/")
10189 (synopsis "Draw Python object reference graphs with graphviz")
10191 "This package provides tools to draw Python object reference graphs with
10193 (license license:expat)))
10195 (define-public python-gevent
10197 (name "python-gevent")
10201 (uri (pypi-uri "gevent" version))
10204 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10205 (modules '((guix build utils)))
10208 ;; unbunding libev and c-ares
10209 (delete-file-recursively "deps")
10211 (build-system python-build-system)
10213 `(#:modules ((ice-9 ftw)
10217 (guix build python-build-system))
10218 #:phases (modify-phases %standard-phases
10219 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10221 (substitute* "src/gevent/subprocess.py"
10222 (("/bin/sh") (which "sh")))
10223 (for-each (lambda (file)
10225 (("/bin/sh") (which "sh"))
10226 (("/bin/true") (which "true"))))
10227 (find-files "src/greentest" "\\.py$"))
10229 (add-before 'build 'do-not-use-bundled-sources
10230 (lambda* (#:key inputs #:allow-other-keys)
10231 (setenv "CONFIG_SHELL" (which "bash"))
10232 (setenv "LIBEV_EMBED" "false")
10233 (setenv "CARES_EMBED" "false")
10234 (setenv "EMBED" "false")
10236 ;; Prevent building bundled libev.
10237 (substitute* "setup.py"
10238 (("run_make=_BUILDING")
10241 (let ((greenlet (string-append
10242 (assoc-ref inputs "python-greenlet")
10244 (match (scandir greenlet
10246 (string-prefix? "python" item)))
10248 (setenv "C_INCLUDE_PATH"
10249 (string-append greenlet "/" python)))))
10251 (add-before 'check 'skip-timer-test
10253 ;; XXX: Skip 'TestTimerResolution', which appears to be
10255 (substitute* "src/greentest/test__core_timer.py"
10256 (("not greentest.RUNNING_ON_CI") "False"))
10260 ;; Make sure the build directory is on PYTHONPATH.
10261 (setenv "PYTHONPATH"
10263 (getenv "PYTHONPATH") ":"
10265 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10266 (with-directory-excursion "src/greentest"
10267 ;; XXX: Many tests require network access. Instead we only
10268 ;; run known-good tests. Unfortunately we cannot use
10269 ;; recursion here since this directory also contains
10270 ;; Python-version-specific subfolders.
10271 (apply invoke "python" "testrunner.py" "--config"
10272 "known_failures.py"
10273 (scandir "." (cut regexp-exec
10274 (make-regexp "test_+(subprocess|core)")
10277 `(("python-greenlet" ,python-greenlet)
10278 ("python-objgraph" ,python-objgraph)))
10280 `(("python-six" ,python-six)))
10282 `(("c-ares" ,c-ares)
10284 (home-page "http://www.gevent.org/")
10285 (synopsis "Coroutine-based network library")
10287 "gevent is a coroutine-based Python networking library that uses greenlet
10288 to provide a high-level synchronous API on top of the libev event loop.")
10289 (license license:expat)
10290 (properties `((python2-variant . ,(delay python2-gevent))))))
10292 (define-public python2-gevent
10293 (let ((base (package-with-python2
10294 (strip-python2-variant python-gevent))))
10297 (native-inputs `(,@(package-native-inputs python-gevent)
10298 ("python-mock" ,python2-mock))))))
10300 (define-public python-fastimport
10302 (name "python-fastimport")
10307 (uri (pypi-uri "fastimport" version))
10309 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10310 (build-system python-build-system)
10311 (home-page "https://github.com/jelmer/python-fastimport")
10312 (synopsis "VCS fastimport parser and generator in Python")
10313 (description "This package provides a parser for and generator of the Git
10314 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10316 (license license:gpl2+)))
10318 (define-public python2-fastimport
10319 (package-with-python2 python-fastimport))
10321 (define-public python-twisted
10323 (name "python-twisted")
10327 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10330 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10331 (build-system python-build-system)
10333 '(#:tests? #f)) ; FIXME: some tests fail
10335 `(("python-zope-interface" ,python-zope-interface)
10336 ("python-pyhamcrest" ,python-pyhamcrest)
10337 ("python-incremental" ,python-incremental)
10338 ("python-hyperlink" ,python-hyperlink)
10339 ("python-constantly" ,python-constantly)
10340 ("python-automat" ,python-automat)))
10341 (home-page "https://twistedmatrix.com/")
10342 (synopsis "Asynchronous networking framework written in Python")
10344 "Twisted is an extensible framework for Python programming, with special
10345 focus on event-based network programming and multiprotocol integration.")
10346 (license license:expat)))
10348 (define-public python2-twisted
10349 (package-with-python2 python-twisted))
10351 (define-public python-pika
10353 (name "python-pika")
10358 (uri (pypi-uri "pika" version))
10361 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10362 (build-system python-build-system)
10364 `(("python-pyev" ,python-pyev)
10365 ("python-tornado" ,python-tornado)
10366 ("python-twisted" ,python-twisted)))
10367 (home-page "https://pika.readthedocs.org")
10368 (synopsis "Pure Python AMQP Client Library")
10370 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10371 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10372 network support library.")
10373 (license license:bsd-3)))
10375 (define-public python2-pika
10376 (package-with-python2 python-pika))
10378 (define-public python-ply
10380 (name "python-ply")
10385 (uri (pypi-uri "ply" version))
10388 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10389 (build-system python-build-system)
10390 (home-page "http://www.dabeaz.com/ply/")
10391 (synopsis "Python Lex & Yacc")
10392 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10393 It uses LR parsing and does extensive error checking.")
10394 (license license:bsd-3)))
10396 (define-public python2-ply
10397 (package-with-python2 python-ply))
10399 (define-public python-tabulate
10401 (name "python-tabulate")
10405 (uri (pypi-uri "tabulate" version))
10408 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10409 (build-system python-build-system)
10411 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10412 ;; and the latest release is not tagged in the upstream repository.
10414 (home-page "https://bitbucket.org/astanin/python-tabulate")
10415 (synopsis "Pretty-print tabular data")
10417 "Tabulate is a library and command-line utility to pretty-print tabular
10419 (license license:expat)))
10421 (define-public python2-tabulate
10422 (package-with-python2 python-tabulate))
10424 (define-public python-kazoo
10426 (name "python-kazoo")
10431 (uri (pypi-uri "kazoo" version))
10434 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10435 (build-system python-build-system)
10436 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10438 `(("python-six" ,python-six)))
10439 (home-page "https://kazoo.readthedocs.org")
10440 (synopsis "High-level Zookeeper client library")
10442 "Kazoo is a Python client library for the Apache Zookeeper distributed
10443 application service. It is designed to be easy to use and to avoid common
10444 programming errors.")
10445 (license license:asl2.0)))
10447 (define-public python2-kazoo
10448 (package-with-python2 python-kazoo))
10450 (define-public python-pykafka
10452 (name "python-pykafka")
10456 (uri (pypi-uri "pykafka" version))
10459 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10460 (build-system python-build-system)
10461 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10463 `(("python-gevent" ,python-gevent)
10464 ("python-kazoo" ,python-kazoo)
10465 ("python-tabulate" ,python-tabulate)))
10467 `(("librdkafka" ,librdkafka)))
10468 (home-page "https://pykafka.readthedocs.io/")
10469 (synopsis "Apache Kafka client for Python")
10471 "PyKafka is a client for the Apache Kafka distributed messaging system.
10472 It includes Python implementations of Kafka producers and consumers, which
10473 are optionally backed by a C extension built on librdkafka.")
10474 (license license:asl2.0)))
10476 (define-public python2-pykafka
10477 (package-with-python2 python-pykafka))
10479 (define-public python-wcwidth
10481 (name "python-wcwidth")
10486 (uri (pypi-uri "wcwidth" version))
10489 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10490 (build-system python-build-system)
10491 (home-page "https://github.com/jquast/wcwidth")
10492 (synopsis "Measure number of terminal column cells of wide-character codes")
10493 (description "Wcwidth measures the number of terminal column cells of
10494 wide-character codes. It is useful for those implementing a terminal emulator,
10495 or programs that carefully produce output to be interpreted by one. It is a
10496 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10497 specified in POSIX.1-2001 and POSIX.1-2008.")
10498 (license license:expat)))
10500 (define-public python2-wcwidth
10501 (package-with-python2 python-wcwidth))
10503 (define-public python2-jsonrpclib
10505 (name "python2-jsonrpclib")
10509 (uri (pypi-uri "jsonrpclib" version))
10512 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10513 (build-system python-build-system)
10516 #:python ,python-2))
10517 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10518 (synopsis "Implementation of JSON-RPC specification for Python")
10520 "This library is an implementation of the JSON-RPC specification.
10521 It supports both the original 1.0 specification, as well as the
10522 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10524 (license license:asl2.0)))
10526 (define-public python-chai
10528 (name "python-chai")
10532 (uri (pypi-uri "chai" version))
10535 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10536 (build-system python-build-system)
10537 (home-page "https://github.com/agoragames/chai")
10538 (synopsis "Mocking framework for Python")
10540 "Chai provides an api for mocking, stubbing and spying your python
10541 objects, patterned after the Mocha library for Ruby.")
10542 (license license:bsd-3)))
10544 (define-public python2-chai
10545 (package-with-python2 python-chai))
10547 (define-public python-inflection
10549 (name "python-inflection")
10552 (origin (method url-fetch)
10553 (uri (pypi-uri "inflection" version))
10556 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10557 (build-system python-build-system)
10559 `(("python-pytest" ,python-pytest)))
10560 (home-page "https://github.com/jpvanhal/inflection")
10561 (synopsis "Python string transformation library")
10563 "Inflection is a string transformation library. It singularizes
10564 and pluralizes English words, and transforms strings from CamelCase to
10565 underscored string.")
10566 (license license:expat)))
10568 (define-public python2-inflection
10569 (package-with-python2 python-inflection))
10571 (define-public python-pylev
10573 (name "python-pylev")
10577 (uri (pypi-uri "pylev" version))
10580 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10581 (build-system python-build-system)
10582 (home-page "https://github.com/toastdriven/pylev")
10583 (synopsis "Levenshtein distance implementation in Python")
10584 (description "Pure Python Levenshtein implementation, based off the
10585 Wikipedia code samples at
10586 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10587 (license license:bsd-3)))
10589 (define-public python2-pylev
10590 (package-with-python2 python-pylev))
10592 (define-public python-cleo
10594 (name "python-cleo")
10598 (uri (pypi-uri "cleo" version))
10601 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10602 (build-system python-build-system)
10605 ("python-mock" ,python-mock)
10606 ("python-pytest-mock" ,python-pytest-mock)
10607 ("python-pytest" ,python-pytest)))
10609 `(("python-backpack" ,python-backpack)
10610 ("python-pastel" ,python-pastel)
10611 ("python-pylev" ,python-pylev)))
10612 (home-page "https://github.com/sdispater/cleo")
10613 (synopsis "Command-line arguments library for Python")
10615 "Cleo allows you to create command-line commands with signature in
10616 docstring and colored output.")
10617 (license license:expat)))
10619 (define-public python2-cleo
10620 (package-with-python2 python-cleo))
10622 (define-public python-lazy-object-proxy
10624 (name "python-lazy-object-proxy")
10628 (uri (pypi-uri "lazy-object-proxy" version))
10631 "1wgl0fmddi0ind78a74yyk2qrr9pb5llvj1892cdpp6z6n6mn4zx"))))
10633 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10636 (synopsis "Lazy object proxy for python")
10638 "Lazy object proxy is an object that wraps a callable but defers the call
10639 until the object is actually required, and caches the result of said call.")
10640 (license license:bsd-2)))
10642 (define-public python2-lazy-object-proxy
10643 (package-with-python2 python-lazy-object-proxy))
10645 (define-public python-dnspython
10647 (name "python-dnspython")
10651 (uri (string-append "http://www.dnspython.org/kits/"
10652 version "/dnspython-" version ".tar.gz"))
10655 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10656 (build-system python-build-system)
10657 (arguments '(#:tests? #f)) ; XXX: requires internet access
10658 (home-page "http://www.dnspython.org")
10659 (synopsis "DNS toolkit for Python")
10661 "dnspython is a DNS toolkit for Python. It supports almost all record
10662 types. It can be used for queries, zone transfers, and dynamic updates.
10663 It supports TSIG authenticated messages and EDNS0.")
10664 (license license:expat)))
10666 (define-public python2-dnspython
10667 (package-with-python2 python-dnspython))
10669 (define-public python-email-validator
10671 (name "python-email-validator")
10674 (origin (method url-fetch)
10675 (uri (pypi-uri "email_validator" version))
10678 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10679 (build-system python-build-system)
10682 (modify-phases %standard-phases
10683 (add-before 'build 'use-dnspython
10685 (substitute* "setup.py"
10686 (("dnspython3") "dnspython"))
10689 `(("python-dnspython" ,python-dnspython)
10690 ("python-idna" ,python-idna)))
10691 (home-page "https://github.com/JoshData/python-email-validator")
10692 (synopsis "Email address validation library for Python")
10694 "This library validates email address syntax and deliverability.")
10695 (license license:cc0)))
10697 (define-public python2-email-validator
10698 (package-with-python2 python-email-validator))
10700 (define-public python-ukpostcodeparser
10702 (name "python-ukpostcodeparser")
10706 (uri (pypi-uri "UkPostcodeParser" version))
10709 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10710 (build-system python-build-system)
10711 (home-page "https://github.com/hamstah/ukpostcodeparser")
10712 (synopsis "UK Postcode parser for Python")
10714 "This library provides the @code{parse_uk_postcode} function for
10715 parsing UK postcodes.")
10716 (license license:expat)))
10718 (define-public python2-ukpostcodeparser
10719 (package-with-python2 python-ukpostcodeparser))
10721 (define-public python-faker
10723 (name "python-faker")
10727 (uri (pypi-uri "Faker" version))
10730 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10732 (search-patches "python-faker-fix-build-32bit.patch"))
10733 (modules '((guix build utils)))
10736 (for-each delete-file (find-files "." "\\.pyc$"))
10738 (build-system python-build-system)
10741 (modify-phases %standard-phases
10743 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10746 ("python-email-validator" ,python-email-validator)
10747 ("python-mock" ,python-mock)
10748 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10750 `(("python-dateutil" ,python-dateutil)
10751 ("python-six" ,python-six)))
10752 (home-page "https://github.com/joke2k/faker")
10753 (synopsis "Python package that generates fake data")
10755 "Faker is a Python package that generates fake data such as names,
10756 addresses, and phone numbers.")
10757 (license license:expat)
10758 (properties `((python2-variant . ,(delay python2-faker))))))
10760 (define-public python2-faker
10761 (let ((base (package-with-python2 (strip-python2-variant
10766 `(("python2-ipaddress" ,python2-ipaddress)
10767 ,@(package-propagated-inputs base))))))
10769 (define-public python-pyaml
10771 (name "python-pyaml")
10772 (version "18.11.0")
10775 (uri (pypi-uri "pyaml" version))
10778 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10779 (build-system python-build-system)
10781 `(("python-unidecode" ,python-unidecode)))
10783 `(("python-pyyaml" ,python-pyyaml)))
10784 (home-page "https://github.com/mk-fg/pretty-yaml")
10785 (synopsis "YAML pretty-print library for Python")
10787 "pyaml is a PyYAML based python module to produce pretty and readable
10788 YAML-serialized data.")
10789 (license license:wtfpl2)))
10791 (define-public python2-pyaml
10792 (package-with-python2 python-pyaml))
10794 (define-public python-backpack
10796 (name "python-backpack")
10801 (uri (pypi-uri "backpack" version))
10804 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10805 (build-system python-build-system)
10807 `(("python-pytest" ,python-pytest)
10808 ("python-nose" ,python-nose)))
10810 `(("python-simplejson" ,python-simplejson)))
10811 (home-page "https://github.com/sdispater/backpack")
10812 (synopsis "Utilities for working with Python collections")
10813 (description "Backpack provides some useful utilities for working with
10814 collections of data.")
10815 (license license:expat)))
10817 (define-public python2-backpack
10818 (package-with-python2 python-backpack))
10820 (define-public python-prompt-toolkit
10822 (name "python-prompt-toolkit")
10827 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10830 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10831 (build-system python-build-system)
10834 (modify-phases %standard-phases
10836 (add-after 'install 'post-install-check
10837 (lambda* (#:key inputs outputs #:allow-other-keys)
10838 ;; HOME is needed for the test
10839 ;; "test_pathcompleter_can_expanduser".
10840 (setenv "HOME" "/tmp")
10841 (add-installed-pythonpath inputs outputs)
10842 (invoke "py.test"))))))
10844 `(("python-wcwidth" ,python-wcwidth)
10845 ("python-six" ,python-six)
10846 ("python-pygments" ,python-pygments)))
10848 `(("python-pytest" ,python-pytest)))
10849 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10850 (synopsis "Library for building command line interfaces in Python")
10852 "Prompt-Toolkit is a library for building interactive command line
10853 interfaces in Python. It's like GNU Readline but it also features syntax
10854 highlighting while typing, out-of-the-box multi-line input editing, advanced
10855 code completion, incremental search, support for Chinese double-width
10856 characters, mouse support, and auto suggestions.")
10857 (license license:bsd-3)))
10859 (define-public python2-prompt-toolkit
10860 (package-with-python2 python-prompt-toolkit))
10862 (define-public python-prompt-toolkit-1
10863 (package (inherit python-prompt-toolkit)
10868 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10871 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10873 (define-public python2-prompt-toolkit-1
10874 (package-with-python2 python-prompt-toolkit-1))
10876 (define-public python-jedi
10878 (name "python-jedi")
10883 (uri (pypi-uri "jedi" version))
10886 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10887 (build-system python-build-system)
10890 (modify-phases %standard-phases
10891 (add-after 'unpack 'disable-file-completion-test
10892 ;; A single parameterized test currently fail (see:
10893 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10895 (substitute* "test/test_api/test_completion.py"
10896 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10900 (setenv "HOME" "/tmp")
10901 (invoke "python" "-m" "pytest"))))))
10903 `(("python-pytest" ,python-pytest)
10904 ("python-docopt" ,python-docopt)))
10906 `(("python-parso" ,python-parso)))
10907 (home-page "https://github.com/davidhalter/jedi")
10908 (synopsis "Autocompletion and static analysis library for Python")
10910 "Jedi is a static analysis tool for Python that can be used in Integrated
10911 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10912 on a deeper level than many other static analysis frameworks for Python.
10914 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10916 (license license:expat)))
10918 (define-public python2-jedi
10919 (package-with-python2 python-jedi))
10921 (define-public ptpython
10927 (uri (pypi-uri "ptpython" version))
10930 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10931 (build-system python-build-system)
10933 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10935 `(("python-docopt" ,python-docopt)
10936 ("python-jedi" ,python-jedi)
10937 ("python-prompt-toolkit" ,python-prompt-toolkit)
10938 ("python-pygments" ,python-pygments)))
10939 (home-page "https://github.com/jonathanslenders/ptpython")
10940 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10942 "ptpython is a Python read-eval-print loop with IDE-like features.
10943 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10944 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10946 (license license:bsd-3)
10947 (properties `((python2-variant . ,(delay ptpython-2))))))
10949 (define-public ptpython-2
10950 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10953 (name "ptpython2"))))
10955 (define-public python-stem
10957 (name "python-stem")
10962 (uri (pypi-uri "stem" version))
10965 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10966 (build-system python-build-system)
10969 (modify-phases %standard-phases
10972 (invoke "./run_tests.py" "--unit")
10975 `(("python-mock" ,python-mock)
10976 ("python-pycodestyle" ,python-pycodestyle)
10977 ("python-pyflakes" ,python-pyflakes)))
10978 (home-page "https://stem.torproject.org/")
10980 "Python controller library that allows applications to interact with Tor")
10982 "Stem is a Python controller library for Tor. With it you can use Tor's
10983 control protocol to script against the Tor process and read descriptor data
10984 relays publish about themselves.")
10985 (license license:lgpl3)))
10987 (define-public python2-stem
10988 (package-with-python2 python-stem))
10990 (define-public python-pyserial
10992 (name "python-pyserial")
10997 (uri (pypi-uri "pyserial" version))
11000 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11001 (build-system python-build-system)
11003 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11005 ;; (modify-phases %standard-phases
11008 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11010 "https://github.com/pyserial/pyserial")
11011 (synopsis "Python Serial Port Bindings")
11012 (description "@code{pyserial} provide serial port bindings for Python. It
11013 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11014 and/or Xon/Xoff. The port is accessed in RAW mode.")
11015 (license license:bsd-3)))
11017 (define-public python2-pyserial
11018 (package-with-python2 python-pyserial))
11020 (define-public python-kivy
11022 (name "python-kivy")
11027 (uri (pypi-uri "Kivy" version))
11028 (file-name (string-append name "-" version ".tar.gz"))
11031 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11032 (build-system python-build-system)
11034 `(#:tests? #f ; Tests require many optional packages
11036 (modify-phases %standard-phases
11037 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11038 (lambda* (#:key inputs #:allow-other-keys)
11039 (setenv "KIVY_SDL2_PATH"
11040 (string-append (assoc-ref inputs "sdl-union")
11045 ("pkg-config" ,pkg-config)
11046 ("python-cython" ,python-cython)))
11048 `(("gstreamer" ,gstreamer)
11051 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11052 (home-page "http://kivy.org")
11054 "Multitouch application framework")
11056 "A software library for rapid development of
11057 hardware-accelerated multitouch applications.")
11058 (license license:expat)))
11060 (define-public python2-kivy
11061 (package-with-python2 python-kivy))
11063 (define-public python-kivy-next
11064 (deprecated-package "python-kivy-next" python-kivy))
11066 (define-public python2-kivy-next
11067 (deprecated-package "python2-kivy-next" python2-kivy))
11069 (define-public python-binaryornot
11071 (name "python-binaryornot")
11075 (uri (pypi-uri "binaryornot" version))
11078 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11079 (build-system python-build-system)
11082 (modify-phases %standard-phases
11083 (add-after 'unpack 'patch-tests
11085 ;; TypeError: binary() got an unexpected keyword argument
11087 (substitute* "tests/test_check.py"
11088 (("average_size=512") ""))
11091 `(("python-chardet" ,python-chardet)
11092 ("python-hypothesis" ,python-hypothesis)))
11093 (home-page "https://github.com/audreyr/binaryornot")
11094 (synopsis "Package to check if a file is binary or text")
11095 (description "Ultra-lightweight pure Python package to check if a file is
11097 (license license:bsd-3)
11098 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11100 (define-public python2-binaryornot
11101 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11102 (package (inherit base)
11104 `(("python2-enum34" ,python2-enum34)
11105 ,@(package-propagated-inputs base))))))
11107 (define-public python-binwalk
11108 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11111 (name "python-binwalk")
11112 (version (git-version "2.1.1" revision commit))
11116 (uri (git-reference
11117 (url "https://github.com/ReFirmLabs/binwalk")
11119 (file-name (git-file-name name version))
11122 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11123 (build-system python-build-system)
11126 (modify-phases %standard-phases
11127 (add-before 'check 'set-pythonpath
11129 (setenv "PYTHONPATH"
11132 ":" (getenv "PYTHONPATH")))
11136 `(("python-coverage" ,python-coverage)
11137 ("python-nose" ,python-nose)))
11138 (home-page "https://github.com/ReFirmLabs/binwalk")
11139 (synopsis "Firmware analysis tool")
11140 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11141 (license license:expat))))
11143 (define-public python-nltk
11145 (name "python-nltk")
11149 (uri (pypi-uri "nltk" version))
11152 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11153 (build-system python-build-system)
11155 '(;; The tests require some extra resources to be downloaded.
11156 ;; TODO Try packaging these resources.
11158 (home-page "http://nltk.org/")
11159 (synopsis "Natural Language Toolkit")
11160 (description "It provides interfaces to over 50 corpora and lexical
11161 resources such as WordNet, along with a suite of text processing libraries
11162 for classification, tokenization, stemming, tagging, parsing, and semantic
11163 reasoning, wrappers for natural language processing libraries.")
11164 (license license:asl2.0)))
11166 (define-public python2-nltk
11167 (package-with-python2 python-nltk))
11169 (define-public python-pymongo
11171 (name "python-pymongo")
11175 (uri (pypi-uri "pymongo" version))
11178 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11179 (build-system python-build-system)
11181 `(("python-certifi" ,python-certifi)))
11182 (home-page "https://github.com/mongodb/mongo-python-driver")
11183 (synopsis "Python driver for MongoDB")
11184 (description "Python driver for MongoDB.")
11185 (license license:asl2.0)))
11187 (define-public python2-pymongo
11188 (package-with-python2 python-pymongo))
11190 (define-public python-consul
11192 (name "python-consul")
11197 (uri (pypi-uri "python-consul" version))
11200 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11201 (build-system python-build-system)
11203 '(#:tests? #f)) ; The tests are not distributed
11205 `(("python-requests" ,python-requests)
11206 ("python-six" ,python-six)))
11207 (home-page "https://github.com/cablehead/python-consul")
11208 (synopsis "Python client for Consul")
11210 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11211 discovery, monitoring and configuration.")
11212 (license license:expat)))
11214 (define-public python2-consul
11215 (package-with-python2 python-consul))
11217 (define-public python-schematics
11219 (name "python-schematics")
11224 (uri (git-reference
11225 (url "https://github.com/schematics/schematics.git")
11226 (commit (string-append "v" version))))
11227 (file-name (git-file-name name version))
11229 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11230 (build-system python-build-system)
11232 `(("python-six" ,python-six)))
11234 ;; The tests require a bunch of not very nice packages with fixed
11235 ;; version requirements (e.g. python-coveralls).
11237 (home-page "https://github.com/schematics/schematics")
11238 (synopsis "Python Data Structures for Humans")
11239 (description "Python Data Structures for Humans.")
11240 (license license:bsd-3)))
11242 (define-public python2-schematics
11243 (package-with-python2 python-schematics))
11245 (define-public python-odfpy
11247 (name "python-odfpy")
11251 (uri (pypi-uri "odfpy" version))
11254 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11256 `(#:modules ((srfi srfi-1)
11257 (guix build python-build-system)
11258 (guix build utils))
11260 (modify-phases %standard-phases
11262 ;; The test runner invokes python2 and python3 for test*.py.
11263 ;; To avoid having both in inputs, we replicate it here.
11265 (for-each (lambda (test-file) (invoke "python" test-file))
11266 (find-files "tests" "^test.*\\.py$"))
11268 (build-system python-build-system)
11269 (home-page "https://github.com/eea/odfpy")
11270 (synopsis "Python API and tools to manipulate OpenDocument files")
11271 (description "Collection of libraries and utility programs written in
11272 Python to manipulate OpenDocument 1.2 files.")
11274 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11275 ;; number of files with other licenses.
11276 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11278 (define-public python2-odfpy
11279 (package-with-python2 python-odfpy))
11281 (define-public python-natsort
11283 (name "python-natsort")
11287 (uri (pypi-uri "natsort" version))
11290 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11291 (build-system python-build-system)
11293 `(#:modules ((guix build utils)
11294 (guix build python-build-system)
11299 (modify-phases %standard-phases
11300 (add-before 'check 'set-cachedir
11301 ;; Tests require write access to $HOME by default
11302 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11305 (let ((cwd (getcwd)))
11306 (setenv "PYTHONPATH"
11309 (find (cut string-prefix? "lib" <>)
11310 (scandir (string-append cwd "/build")))
11312 (getenv "PYTHONPATH")))
11313 (invoke "pytest" "-v")))))))
11315 `(("python-hypothesis" ,python-hypothesis)
11316 ("python-pytest-cov" ,python-pytest-cov)
11317 ("python-pytest-mock" ,python-pytest-mock)
11318 ("python-pytest" ,python-pytest)))
11319 (propagated-inputs ; TODO: Add python-fastnumbers.
11320 `(("python-pyicu" ,python-pyicu)))
11321 (home-page "https://github.com/SethMMorton/natsort")
11322 (synopsis "Natural sorting for python and shell")
11324 "Natsort lets you apply natural sorting on lists instead of
11325 lexicographical. If you use the built-in @code{sorted} method in python
11326 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11327 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11328 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11329 identifies numbers and sorts them separately from strings. It can also sort
11330 version numbers, real numbers, mixed types and more, and comes with a shell
11331 command @command{natsort} that exposes this functionality in the command line.")
11332 (license license:expat)
11333 (properties `((python2-variant . ,(delay python2-natsort))))))
11335 (define-public python2-natsort
11336 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11337 (package (inherit base)
11339 `(("python2-pathlib" ,python2-pathlib)
11340 ,@(package-native-inputs base))))))
11342 (define-public python-glances
11344 (name "python-glances")
11349 (uri (pypi-uri "Glances" version))
11352 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11353 (modules '((guix build utils)))
11356 ;; Glances phones PyPI for weekly update checks by default.
11357 ;; Disable these. The user can re-enable them if desired.
11358 (substitute* "glances/outdated.py"
11359 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11360 (string-append indentation
11361 "self.args.disable_check_update = True\n"
11364 (build-system python-build-system)
11366 `(("python-future" ,python-future)
11367 ("python-psutil" ,python-psutil)))
11369 "https://github.com/nicolargo/glances")
11370 (synopsis "Cross-platform curses-based monitoring tool")
11372 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11373 Glances uses the PsUtil library to get information from your system. It
11374 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11375 (license license:lgpl3+)))
11377 (define-public python2-glances
11378 (package-with-python2 python-glances))
11380 (define-public python-graphql-core
11382 (name "python-graphql-core")
11387 (uri (pypi-uri "graphql-core" version))
11390 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11391 (build-system python-build-system)
11393 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11395 (modify-phases %standard-phases
11396 (add-after 'unpack 'patch-hardcoded-version
11397 (lambda _ (substitute*
11399 (("'gevent==1.1rc1'") "'gevent'"))
11402 `(("python-gevent" ,python-gevent)
11403 ("python-mock" ,python-mock)
11404 ("python-pytest-mock" ,python-pytest-mock)))
11406 `(("python-promise" ,python-promise)
11407 ("python-six" ,python-six)))
11408 (home-page "https://github.com/graphql-python/graphql-core")
11409 (synopsis "GraphQL implementation for Python")
11411 "GraphQL implementation for Python. GraphQL is a data query language and
11412 runtime designed and used to request and deliver data to mobile and web apps.
11413 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11415 (license license:expat)))
11417 (define-public python2-graphql-core
11418 (package-with-python2 python-graphql-core))
11420 (define-public python-graphql-relay
11422 (name "python-graphql-relay")
11427 (uri (pypi-uri "graphql-relay" version))
11430 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11431 (build-system python-build-system)
11433 '(#:tests? #f)) ; The tests are not distributed
11435 `(("python-graphql-core" ,python-graphql-core)
11436 ("python-promise" ,python-promise)
11437 ("python-six" ,python-six)))
11438 (home-page "https://github.com/graphql-python/graphql-relay-py")
11439 (synopsis "Relay implementation for Python")
11441 "This is a library to allow the easy creation of Relay-compliant servers
11442 using the GraphQL Python reference implementation of a GraphQL server. It
11443 should be noted that the code is a exact port of the original
11444 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11446 (license license:expat)))
11448 (define-public python2-graphql-relay
11449 (package-with-python2 python-graphql-relay))
11451 (define-public python-graphene
11453 (name "python-graphene")
11458 (uri (pypi-uri "graphene" version))
11461 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11462 (build-system python-build-system)
11464 `(("python-graphql-core" ,python-graphql-core)
11465 ("python-graphql-relay" ,python-graphql-relay)
11466 ("python-iso8601" ,python-iso8601)
11467 ("python-promise" ,python-promise)
11468 ("python-six" ,python-six)))
11470 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11471 (home-page "http://graphene-python.org/")
11472 (synopsis "GraphQL Framework for Python")
11474 "Graphene is a Python library for building GraphQL schemas/types.
11475 A GraphQL schema describes your data model, and provides a GraphQL server
11476 with an associated set of resolve methods that know how to fetch data.")
11477 (properties `((python2-variant . ,(delay python2-graphene))))
11478 (license license:expat)))
11480 (define-public python2-graphene
11481 (let ((base (package-with-python2
11482 (strip-python2-variant python-graphene))))
11483 (package (inherit base)
11485 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11486 ,@(package-native-inputs base))))))
11488 (define-public python-nautilus
11490 (name "python-nautilus")
11495 (uri (pypi-uri "nautilus" version))
11498 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11499 (build-system python-build-system)
11500 (arguments `(#:tests? #f)) ; fails to import test modules
11502 `(("python-bcrypt" ,python-bcrypt)
11503 ("python-click" ,python-click)
11504 ("python-consul" ,python-consul)
11505 ("python-graphene" ,python-graphene)
11506 ("python-jinja2" ,python-jinja2)
11507 ("python-peewee" ,python-peewee)
11508 ("python-pika" ,python-pika)
11509 ("python-tornado" ,python-tornado)
11510 ("python-wtforms" ,python-wtforms)))
11512 `(("python-nose2" ,python-nose2)))
11513 (home-page "https://github.com/AlecAivazis/nautilus")
11514 (synopsis "Library for creating microservice applications")
11516 "Nautilus is a framework for flux based microservices that looks to
11517 provide extendible implementations of common aspects of a cloud so that you can
11518 focus on building massively scalable web applications.")
11519 (license license:expat)))
11521 (define-public python-snowballstemmer
11523 (name "python-snowballstemmer")
11527 (uri (pypi-uri "snowballstemmer" version))
11530 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11531 (build-system python-build-system)
11533 `(;; No tests exist
11535 (home-page "https://github.com/shibukawa/snowball_py")
11536 (synopsis "Snowball stemming library collection for Python")
11537 (description "This package provides 16 word stemmer algorithms generated
11538 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11540 (license license:bsd-3)))
11542 (define-public python2-snowballstemmer
11543 (package-with-python2 python-snowballstemmer))
11545 (define-public python-setproctitle
11547 (name "python-setproctitle")
11552 (uri (pypi-uri "setproctitle" version))
11555 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11556 (build-system python-build-system)
11559 (modify-phases %standard-phases
11560 (add-before 'check 'patch-Makefile
11561 ;; Stricly this is only required for the python2 variant.
11562 ;; But adding a phase in an inherited package seems to be
11563 ;; cumbersum. So we patch even for python3.
11565 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11567 (substitute* "Makefile"
11568 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11569 (string-append nose "/bin/nosetests "))))
11573 (setenv "PYTHON" (or (which "python3") (which "python")))
11574 (setenv "PYCONFIG" (or (which "python3-config")
11575 (which "python-config")))
11576 (setenv "CC" "gcc")
11577 ;; No need to extend PYTHONPATH to find the built package, since
11578 ;; the Makefile will build anyway
11579 (invoke "make" "check"))))))
11581 `(("procps" ,procps))) ; required for tests
11583 "https://github.com/dvarrazzo/py-setproctitle")
11585 "Setproctitle implementation for Python to customize the process title")
11586 (description "The library allows a process to change its title (as displayed
11587 by system tools such as ps and top).
11589 Changing the title is mostly useful in multi-process systems, for
11590 example when a master process is forked: changing the children's title
11591 allows to identify the task each process is busy with. The technique
11592 is used by PostgreSQL and the OpenSSH Server for example.")
11593 (license license:bsd-3)
11594 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11596 (define-public python2-setproctitle
11597 (let ((base (package-with-python2
11598 (strip-python2-variant python-setproctitle))))
11601 (native-inputs `(("python2-nose" ,python2-nose)
11602 ,@(package-native-inputs base))))))
11604 (define-public python-validictory
11606 (name "python-validictory")
11611 (uri (pypi-uri "validictory" version))
11614 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11615 (build-system python-build-system)
11618 (modify-phases %standard-phases
11619 (add-after 'unpack 'bootstrap
11620 ;; Move the tests out of the package directory to avoid
11623 (rename-file "validictory/tests" "tests")
11624 (delete-file "tests/__init__.py")))
11627 ;; Extend PYTHONPATH so the built package will be found.
11628 (setenv "PYTHONPATH"
11629 (string-append (getcwd) "/build/lib:"
11630 (getenv "PYTHONPATH")))
11631 (invoke "py.test" "-vv" ))))))
11633 `(("python-pytest" ,python-pytest)))
11635 "https://github.com/jamesturk/validictory")
11636 (synopsis "General purpose Python data validator")
11637 (description "It allows validation of arbitrary Python data structures.
11639 The schema format is based on the JSON Schema
11640 proposal (http://json-schema.org), so combined with json the library is also
11641 useful as a validator for JSON data.")
11642 (license license:expat)))
11644 (define-public python2-validictory
11645 (package-with-python2 python-validictory))
11647 (define-public python-pyelftools
11649 (name "python-pyelftools")
11654 (uri (pypi-uri "pyelftools" version))
11657 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11658 (build-system python-build-system)
11661 (modify-phases %standard-phases
11662 (add-before 'check 'set-pythonpath
11664 (setenv "PYTHONPATH"
11667 ":" (getenv "PYTHONPATH")))
11670 "https://github.com/eliben/pyelftools")
11672 "Analyze binary and library file information")
11673 (description "This Python library provides interfaces for parsing and
11674 analyzing two binary and library file formats; the Executable and Linking
11675 Format (ELF), and debugging information in the Debugging With Attributed
11676 Record Format (DWARF).")
11677 (license license:public-domain)))
11679 (define-public python-pyev
11681 (name "python-pyev")
11686 (uri (pypi-uri "pyev" version))
11689 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11690 (build-system python-build-system)
11692 `(#:tests? #f ; no test suite
11694 (modify-phases %standard-phases
11695 (add-after 'unpack 'patch
11696 (lambda* (#:key inputs #:allow-other-keys)
11697 (let ((libev (string-append (assoc-ref inputs "libev")
11698 "/lib/libev.so.4")))
11699 (substitute* "setup.py"
11700 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11701 (string-append "libev_dll_name = \"" libev "\"")))))))))
11703 `(("libev" ,libev)))
11704 (home-page "http://pythonhosted.org/pyev/")
11705 (synopsis "Python libev interface")
11706 (description "Pyev provides a Python interface to libev.")
11707 (license license:gpl3)))
11709 (define-public python2-pyev
11710 (package-with-python2 python-pyev))
11712 (define-public python-imagesize
11714 (name "python-imagesize")
11719 (uri (pypi-uri "imagesize" version))
11722 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11723 (build-system python-build-system)
11724 (home-page "https://github.com/shibukawa/imagesize_py")
11725 (synopsis "Gets image size of files in various formats in Python")
11727 "This package allows determination of image size from
11728 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11729 (license license:expat)))
11731 (define-public python2-imagesize
11732 (package-with-python2 python-imagesize))
11734 (define-public python-termstyle
11736 (name "python-termstyle")
11741 (uri (pypi-uri "termstyle" version))
11744 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11745 (build-system python-build-system)
11748 (modify-phases %standard-phases
11751 (invoke "python" "test3.py"))))))
11752 (home-page "https://github.com/gfxmonk/termstyle")
11753 (synopsis "Console text coloring for Python")
11754 (description "This package provides console text coloring for Python.")
11755 (license license:bsd-3)))
11757 (define-public python-argcomplete
11759 (name "python-argcomplete")
11764 (uri (pypi-uri "argcomplete" version))
11767 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11768 (build-system python-build-system)
11770 `(("python-pexpect" ,python-pexpect)
11772 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11773 (home-page "https://github.com/kislyuk/argcomplete")
11774 (synopsis "Shell tab completion for Python argparse")
11775 (description "argcomplete provides extensible command line tab completion
11776 of arguments and options for Python scripts using @code{argparse}. It's
11777 particularly useful for programs with many options or sub-parsers that can
11778 dynamically suggest completions; for example, when browsing resources over the
11780 (license license:asl2.0)))
11782 (define-public python2-argcomplete
11783 (package-with-python2 python-argcomplete))
11785 (define-public python-xopen
11787 (name "python-xopen")
11792 (uri (pypi-uri "xopen" version))
11795 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11796 (build-system python-build-system)
11798 `(("python-setuptools-scm" ,python-setuptools-scm)))
11799 (home-page "https://github.com/marcelm/xopen/")
11800 (synopsis "Open compressed files transparently")
11801 (description "This module provides an @code{xopen} function that works like
11802 Python's built-in @code{open} function, but can also deal with compressed files.
11803 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11804 recognized by their file extensions. The focus is on being as efficient as
11805 possible on all supported Python versions.")
11806 (license license:expat)))
11808 (define-public python2-xopen
11809 (let ((base (package-with-python2
11810 (strip-python2-variant python-xopen))))
11813 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11814 ,@(package-propagated-inputs base))))))
11816 (define-public python-cheetah
11818 (name "python-cheetah")
11823 (uri (pypi-uri "Cheetah3" version))
11826 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11827 (build-system python-build-system)
11829 `(#:modules ((guix build utils)
11830 (guix build python-build-system)
11834 #:phases (modify-phases %standard-phases
11835 (add-after 'unpack 'use-absolute-python
11837 (substitute* "Cheetah/CheetahWrapper.py"
11838 (("#!/usr/bin/env python")
11839 (string-append "#!" (which "python"))))
11843 (let ((cwd (getcwd)))
11844 (setenv "PYTHONPATH"
11847 (find (cut string-prefix? "lib" <>)
11848 (scandir (string-append cwd "/build")))
11849 ":" (getenv "PYTHONPATH")))
11851 (string-append (getenv "PATH")
11853 (setenv "TMPDIR" "/tmp")
11855 (substitute* "Cheetah/Tests/Test.py"
11856 (("unittest.TextTestRunner\\(\\)")
11857 "unittest.TextTestRunner(verbosity=2)"))
11859 (invoke "python" "Cheetah/Tests/Test.py")))))))
11861 `(("python-markdown" ,python-markdown))) ;optional
11862 (home-page "http://cheetahtemplate.org/")
11863 (synopsis "Template engine")
11864 (description "Cheetah is a text-based template engine and Python code
11867 Cheetah can be used as a standalone templating utility or referenced as
11868 a library from other Python applications. It has many potential uses,
11869 but web developers looking for a viable alternative to ASP, JSP, PHP and
11870 PSP are expected to be its principle user group.
11874 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11876 @item Cleanly separates content, graphic design, and program code.
11877 @item Blends the power and flexibility of Python with a simple template language
11878 that non-programmers can understand.
11879 @item Gives template writers full access to any Python data structure, module,
11880 function, object, or method in their templates.
11881 @item Makes code reuse easy by providing an object-orientated interface to
11882 templates that is accessible from Python code or other Cheetah templates.
11883 One template can subclass another and selectively reimplement sections of it.
11884 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11885 improve the performance of a dynamic website.
11886 @item Compiles templates into optimized, yet readable, Python code.
11888 (license (license:x11-style "file://LICENSE"))))
11890 (define-public python2-cheetah
11891 (package-with-python2 python-cheetah))
11893 (define-public python-dulwich
11895 (name "python-dulwich")
11900 (uri (list (string-append "https://www.dulwich.io/releases/"
11901 "dulwich-" version ".tar.gz")
11902 (pypi-uri "dulwich" version)))
11905 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11906 (build-system python-build-system)
11909 (modify-phases %standard-phases
11910 (add-before 'check 'fix-tests
11911 (lambda* (#:key inputs #:allow-other-keys)
11912 ;; The tests use Popen with a custom environment which doesn't
11914 (substitute* "dulwich/tests/compat/utils.py"
11915 (("'git'") (string-append "'"
11918 (substitute* '("dulwich/tests/test_repository.py"
11919 "dulwich/tests/test_hooks.py")
11920 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11921 (setenv "TEST_RUNNER" "unittest")
11922 (setenv "PYTHONHASHSEED" "random")
11925 `(("python-fastimport" ,python-fastimport)))
11927 `(("python-mock" ,python-mock)
11928 ("python-geventhttpclient" ,python-geventhttpclient)
11930 (home-page "https://www.dulwich.io/")
11931 (synopsis "Git implementation in Python")
11932 (description "Dulwich is an implementation of the Git file formats and
11933 protocols written in pure Python.")
11934 ;; Can be used with either license.
11935 (license (list license:asl2.0 license:gpl2+))))
11937 (define-public python2-dulwich
11938 (package-with-python2 python-dulwich))
11940 (define-public python-pbkdf2
11942 (name "python-pbkdf2")
11947 (uri (pypi-uri "pbkdf2" version))
11950 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11951 (build-system python-build-system)
11954 (modify-phases %standard-phases
11957 (setenv "PYTHONPATH"
11958 (string-append (getcwd) "/build/lib:"
11959 (getenv "PYTHONPATH")))
11960 (invoke "python" "test/test_pbkdf2.py"))))))
11962 `(("python-pycrypto" ,python-pycrypto))) ; optional
11963 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11964 (synopsis "Password-based key derivation")
11965 (description "This module implements the password-based key derivation
11966 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11968 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11969 is part of the RSA Public Key Cryptography Standards series. The provided
11970 implementation takes a password or a passphrase and a salt value (and
11971 optionally a iteration count, a digest module, and a MAC module) and provides
11972 a file-like object from which an arbitrarly-sized key can be read.")
11973 (license license:expat)))
11975 (define-public python2-pbkdf2
11976 (package-with-python2 python-pbkdf2))
11978 (define-public python-qrcode
11980 (name "python-qrcode")
11985 (uri (pypi-uri "qrcode" version))
11987 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11988 (build-system python-build-system)
11990 ;; FIXME: Tests require packaging 'pymaging'.
11993 `(("python-lxml" ,python-lxml) ; for SVG output
11994 ("python-pillow" ,python-pillow) ; for PNG output
11995 ("python-six" ,python-six)))
11996 (home-page "https://github.com/lincolnloop/python-qrcode")
11997 (synopsis "QR Code image generator")
11998 (description "This package provides a pure Python QR Code generator
11999 module. It uses the Python Imaging Library (PIL) to allow for the generation
12002 In addition this package provides a command line tool to generate QR codes and
12003 either write these QR codes to a file or do the output as ascii art at the
12005 (license license:bsd-3)))
12007 (define-public python2-qrcode
12008 (package-with-python2 python-qrcode))
12010 (define-public python-rst2ansi
12012 (name "python-rst2ansi")
12017 (uri (pypi-uri "rst2ansi" version))
12020 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12021 (build-system python-build-system)
12023 `(("python-docutils" ,python-docutils)))
12024 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12025 (synopsis "Convert RST to ANSI-decorated console output")
12027 "Python module dedicated to rendering RST (reStructuredText) documents
12028 to ansi-escaped strings suitable for display in a terminal.")
12029 (license license:expat)))
12031 (define-public python-ansi2html
12033 (name "python-ansi2html")
12038 (uri (pypi-uri "ansi2html" version))
12041 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12042 (build-system python-build-system)
12044 `(("python-mock" ,python-mock)
12045 ("python-nose" ,python-nose)))
12047 `(("python-six" ,python-six)))
12048 (home-page "https://github.com/ralphbean/ansi2html")
12049 (synopsis "Convert ANSI-decorated console output to HTML")
12051 "@command{ansi2html} is a Python library and command line utility for
12052 convering text with ANSI color codes to HTML or LaTeX.")
12053 (license license:gpl3+)))
12055 (define-public python2-ansi2html
12056 (package-with-python2 python-ansi2html))
12058 (define-public python-ddt
12060 (name "python-ddt")
12065 (uri (pypi-uri "ddt" version))
12068 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12069 (build-system python-build-system)
12071 `(("python-mock" ,python-mock)
12072 ("python-nose" ,python-nose)))
12074 `(("python-six" ,python-six)
12075 ("python-pyyaml" ,python-pyyaml)))
12076 (home-page "https://github.com/txels/ddt")
12077 (synopsis "Data-Driven Tests")
12079 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12080 running it with different test data, and make it appear as multiple test
12082 (license license:expat)))
12084 (define-public python2-ddt
12085 (package-with-python2 python-ddt))
12087 (define-public python-pycountry
12089 (name "python-pycountry")
12090 (version "18.5.26")
12094 (uri (pypi-uri "pycountry" version))
12097 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12098 (build-system python-build-system)
12099 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12100 (synopsis "ISO databases for languages, countries, currencies, etc.")
12102 "@code{pycountry} provides the ISO databases for the standards:
12104 @item 639-3 (Languages)
12105 @item 3166 (Countries)
12106 @item 3166-3 (Deleted Countries)
12107 @item 3166-2 (Subdivisions of countries)
12108 @item 4217 (Currencies)
12109 @item 15924 (Scripts)
12111 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12112 through a Python API.")
12113 (license license:lgpl2.1+)))
12115 (define-public python2-pycountry
12116 (package-with-python2 python-pycountry))
12118 (define-public python-pycosat
12120 (name "python-pycosat")
12125 (uri (pypi-uri "pycosat" version))
12128 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12129 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12130 (build-system python-build-system)
12131 (home-page "https://github.com/ContinuumIO/pycosat")
12132 (synopsis "Bindings to picosat (a SAT solver)")
12134 "This package provides efficient Python bindings to @code{picosat} on
12135 the C level. When importing pycosat, the @code{picosat} solver becomes part
12136 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12137 Problem} (SAT) solver.")
12138 (license license:expat)))
12140 (define-public python2-pycosat
12141 (package-with-python2 python-pycosat))
12143 (define-public python2-ruamel.ordereddict
12145 (name "python2-ruamel.ordereddict")
12150 (uri (pypi-uri "ruamel.ordereddict" version))
12153 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12154 (build-system python-build-system)
12156 `(#:python ,python-2
12158 (modify-phases %standard-phases
12160 (add-after 'install 'check
12161 (lambda* (#:key inputs outputs #:allow-other-keys)
12162 (add-installed-pythonpath inputs outputs)
12163 (invoke "python" "test/testordereddict.py"))))))
12164 (home-page "https://bitbucket.org/ruamel/ordereddict")
12165 (synopsis "Version of dict that keeps keys in insertion order")
12167 "This is an implementation of an ordered dictionary with @dfn{Key
12168 Insertion Order} (KIO: updates of values do not affect the position of the
12169 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12170 removed and put at the back). The standard library module @code{OrderedDict},
12171 implemented later, implements a subset of @code{ordereddict} functionality.
12172 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12173 Order} (KSO, no sorting function can be specified, but a transform can be
12174 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12175 (license license:expat)))
12177 (define-public python-pypeg2
12179 (name "python-pypeg2")
12184 (uri (pypi-uri "pyPEG2" version))
12187 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12188 (build-system python-build-system)
12189 (propagated-inputs `(("python-lxml" ,python-lxml)))
12191 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12193 (home-page "https://fdik.org/pyPEG/")
12194 (synopsis "Parsering Expression Grammars in Python")
12195 (description "PyPEG is an intrinsic parser interpreter framework for
12196 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12197 parse many formal languages.")
12198 (license license:gpl2)))
12200 (define-public python-incremental
12202 (name "python-incremental")
12207 (uri (pypi-uri "incremental" version))
12210 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12211 (build-system python-build-system)
12212 (home-page "https://github.com/hawkowl/incremental")
12213 (synopsis "Library for versioning Python projects")
12214 (description "Incremental is a small library that versions your Python
12216 (license license:expat)))
12218 (define-public python2-incremental
12219 (package-with-python2 python-incremental))
12221 (define-public python-invoke
12223 (name "python-invoke")
12224 (home-page "http://www.pyinvoke.org/")
12228 (uri (pypi-uri "invoke" version))
12231 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12232 (build-system python-build-system)
12234 ;; XXX: Requires many dependencies that are not yet in Guix.
12236 (synopsis "Pythonic task execution")
12238 "Invoke is a Python task execution tool and library, drawing inspiration
12239 from various sources to arrive at a powerful and clean feature set. It is
12240 evolved from the Fabric project, but focuses on local and abstract concerns
12241 instead of servers and network commands.")
12242 (license license:bsd-3)))
12244 (define-public python2-invoke
12245 (package-with-python2 python-invoke))
12247 (define-public python-automat
12249 (name "python-automat")
12253 (uri (pypi-uri "Automat" version))
12256 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12257 (build-system python-build-system)
12258 ;; We disable the tests because they require python-twisted, while
12259 ;; python-twisted depends on python-automat. Twisted is optional, but the
12260 ;; tests fail if it is not available. Also see
12261 ;; <https://github.com/glyph/automat/issues/71>.
12262 (arguments '(#:tests? #f))
12264 `(("python-m2r" ,python-m2r)
12265 ("python-setuptools-scm" ,python-setuptools-scm)
12266 ("python-graphviz" ,python-graphviz)))
12268 `(("python-six" ,python-six)
12269 ("python-attrs" ,python-attrs)))
12270 (home-page "https://github.com/glyph/Automat")
12271 (synopsis "Self-service finite-state machines")
12272 (description "Automat is a library for concise, idiomatic Python
12273 expression of finite-state automata (particularly deterministic finite-state
12275 (license license:expat)))
12277 (define-public python2-automat
12278 (package-with-python2 python-automat))
12280 (define-public python-m2r
12282 (name "python-m2r")
12286 (uri (pypi-uri "m2r" version))
12289 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12290 (build-system python-build-system)
12292 `(("python-docutils" ,python-docutils)
12293 ("python-mistune" ,python-mistune)))
12295 `(("python-pygments" ,python-pygments)
12296 ("python-mock" ,python-mock)))
12297 (home-page "https://github.com/miyakogi/m2r")
12298 (synopsis "Markdown to reStructuredText converter")
12299 (description "M2R converts a markdown file including reST markups to valid
12301 (license license:expat)))
12303 (define-public python2-m2r
12304 (package-with-python2 python-m2r))
12306 (define-public python-constantly
12308 (name "python-constantly")
12312 (uri (pypi-uri "constantly" version))
12315 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12316 (build-system python-build-system)
12317 (home-page "https://github.com/twisted/constantly")
12318 (synopsis "Symbolic constants in Python")
12319 (description "Constantly is a Python library that provides symbolic
12320 constant support. It includes collections and constants with text, numeric,
12321 and bit flag values.")
12322 (license license:expat)))
12324 (define-public python2-constantly
12325 (package-with-python2 python-constantly))
12327 (define-public python-attrs
12329 (name "python-attrs")
12333 (uri (pypi-uri "attrs" version))
12336 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12337 (build-system python-build-system)
12339 `(#:modules ((guix build utils)
12340 (guix build python-build-system)
12344 #:phases (modify-phases %standard-phases
12347 (let ((cwd (getcwd)))
12348 (setenv "PYTHONPATH"
12351 (find (cut string-prefix? "lib" <>)
12352 (scandir (string-append cwd "/build")))
12354 (getenv "PYTHONPATH")))
12355 (invoke "python" "-m" "pytest")))))))
12357 `(("python-coverage" ,python-coverage)
12358 ("python-hypothesis" ,python-hypothesis)
12359 ("python-pympler" ,python-pympler)
12360 ("python-pytest" ,python-pytest)
12361 ("python-six" ,python-six)
12362 ("python-sphinx" ,python-sphinx)
12363 ("python-zope-interface" ,python-zope-interface)))
12364 (home-page "https://github.com/python-attrs/attrs/")
12365 (synopsis "Attributes without boilerplate")
12366 (description "@code{attrs} is a Python package with class decorators that
12367 ease the chores of implementing the most common attribute-related object
12369 (license license:expat)))
12371 (define-public python2-attrs
12372 (package-with-python2 python-attrs))
12374 (define-public python-attrs-bootstrap
12376 (inherit python-attrs)
12377 (name "python-attrs-bootstrap")
12378 (native-inputs `())
12379 (arguments `(#:tests? #f))))
12381 (define-public python2-attrs-bootstrap
12382 (package-with-python2 python-attrs-bootstrap))
12384 (define-public python2-cliapp
12386 (name "python2-cliapp")
12387 (version "1.20180812.1")
12391 (uri (string-append
12392 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12393 version ".tar.gz"))
12396 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12397 (build-system python-build-system)
12399 `(#:python ,python-2
12401 (modify-phases %standard-phases
12402 ;; check phase needs to be run before the build phase. If not,
12403 ;; coverage-test-runner looks for tests for the built source files,
12406 (add-before 'build 'check
12408 ;; Disable python3 tests
12409 (substitute* "check"
12410 (("python3") "# python3"))
12411 (invoke "./check"))))))
12413 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12414 ("python2-pep8" ,python2-pep8)))
12416 `(("python2-pyaml" ,python2-pyaml)))
12417 (home-page "https://liw.fi/cliapp/")
12418 (synopsis "Python framework for command line programs")
12419 (description "@code{python2-cliapp} is a python framework for
12420 command line programs. It contains the typical stuff such programs
12421 need to do, such as parsing the command line for options, and
12422 iterating over input files.")
12423 (license license:gpl2+)))
12425 (define-public python2-ttystatus
12427 (name "python2-ttystatus")
12432 (uri (string-append
12433 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12434 version ".tar.gz"))
12437 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12438 (build-system python-build-system)
12440 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12441 ("python2-pep8" ,python2-pep8)))
12443 `(#:python ,python-2
12445 (modify-phases %standard-phases
12446 ;; check phase needs to be run before the build phase. If not,
12447 ;; coverage-test-runner looks for tests for the built source files,
12450 (add-before 'build 'check
12451 (lambda _ (invoke "make" "check"))))))
12452 (home-page "https://liw.fi/ttystatus/")
12453 (synopsis "Python library for showing progress reporting and
12454 status updates on terminals")
12455 (description "@code{python2-ttystatus} is a python library for
12456 showing progress reporting and status updates on terminals, for
12457 command line programs. Output is automatically adapted to the width
12458 of the terminal: truncated if it does not fit, and resized if the
12459 terminal size changes.")
12460 (license license:gpl3+)))
12462 (define-public python2-tracing
12464 (name "python2-tracing")
12469 (uri (string-append
12470 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12471 version ".tar.gz"))
12474 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12475 (build-system python-build-system)
12477 `(#:python ,python-2))
12478 (home-page "https://liw.fi/tracing/")
12479 (synopsis "Python debug logging helper")
12480 (description "@code{python2-tracing} is a python library for
12481 logging debug messages. It provides a way to turn debugging messages
12482 on and off, based on the filename they occur in. It is much faster
12483 than using @code{logging.Filter} to accomplish the same thing, which
12484 matters when code is run in production mode. The actual logging still
12485 happens using the @code{logging} library.")
12486 (license license:gpl3+)))
12488 (define-public python2-larch
12490 (name "python2-larch")
12491 (version "1.20151025")
12495 (uri (string-append
12496 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12497 version ".tar.gz"))
12498 (patches (search-patches
12499 "python2-larch-coverage-4.0a6-compatibility.patch"))
12502 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12503 (build-system python-build-system)
12505 `(#:python ,python-2
12507 (modify-phases %standard-phases
12508 ;; check phase needs to be run before the build phase. If not,
12509 ;; coverage-test-runner looks for tests for the built source files,
12512 (add-before 'build 'check
12513 (lambda _ (invoke "make" "check"))))))
12515 `(("cmdtest" ,cmdtest)
12516 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12518 `(("python2-tracing" ,python2-tracing)))
12519 (home-page "https://liw.fi/larch/")
12520 (synopsis "Python copy-on-write B-tree library")
12521 (description "@code{python2-larch} is an implementation of
12522 particular kind of B-tree, based on research by Ohad Rodeh. See
12523 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12524 on the data structure.
12526 The distinctive feature of this B-tree is that a node is never
12527 (conceptually) modified. Instead, all updates are done by
12528 copy-on-write. This makes it easy to clone a tree, and modify only the
12529 clone, while other processes access the original tree.")
12530 (license license:gpl3+)))
12532 (define-public python-astroid
12534 (name "python-astroid")
12539 (uri (pypi-uri "astroid" version))
12542 "0crfhpblcy5a6nh694hc2073gw389f01yilamzqi34si2skgp8q9"))))
12543 (build-system python-build-system)
12545 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12546 ("python-six" ,python-six)
12547 ("python-typed-ast" ,python-typed-ast)
12548 ("python-wrapt" ,python-wrapt)))
12550 `(("python-dateutil" ,python-dateutil)
12551 ("python-nose" ,python-nose)
12552 ("python-pytest" ,python-pytest)
12553 ("python-pytest-runner" ,python-pytest-runner)))
12556 (modify-phases %standard-phases
12557 (add-after 'unpack 'remove-spurious-test
12559 ;; This can be removed after upgrading from python-3.7
12560 ;; https://github.com/PyCQA/astroid/issues/593
12561 ;; https://bugs.python.org/issue34056
12562 (delete-file "astroid/tests/unittest_modutils.py")
12566 (invoke "pytest" "astroid"))))))
12567 (home-page "https://github.com/PyCQA/astroid")
12568 (synopsis "Common base representation of python source code for pylint and
12570 (description "@code{python-astroid} provides a common base representation
12571 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12573 It provides a compatible representation which comes from the _ast module. It
12574 rebuilds the tree generated by the builtin _ast module by recursively walking
12575 down the AST and building an extended ast. The new node classes have
12576 additional methods and attributes for different usages. They include some
12577 support for static inference and local name scopes. Furthermore, astroid
12578 builds partial trees by inspecting living objects.")
12579 (license license:lgpl2.1+)
12580 (properties `((python2-variant . ,(delay python2-astroid))))))
12582 (define-public python2-astroid
12583 (let ((base (package-with-python2
12584 (strip-python2-variant python-astroid))))
12585 (package (inherit base)
12586 ;; Version 2.x removes python2 support.
12591 (uri (pypi-uri "astroid" version))
12594 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12596 (substitute-keyword-arguments (package-arguments base)
12598 `(modify-phases ,phases
12599 (add-after 'unpack 'remove-spurious-test
12601 ;; https://github.com/PyCQA/astroid/issues/276
12602 (delete-file "astroid/tests/unittest_brain.py")
12606 (invoke"python" "-m" "unittest" "discover"
12607 "-p" "unittest*.py")))))))
12608 (native-inputs `())
12610 `(("python2-backports-functools-lru-cache"
12611 ,python2-backports-functools-lru-cache)
12612 ("python2-enum34" ,python2-enum34)
12613 ("python2-singledispatch" ,python2-singledispatch)
12614 ,@(alist-delete "python-typed-ast"
12615 (package-propagated-inputs base)))))))
12617 (define-public python-isort
12619 (name "python-isort")
12624 (uri (git-reference
12625 ;; Tests pass only from the Github sources
12626 (url "https://github.com/timothycrosley/isort")
12628 (file-name (git-file-name name version))
12631 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12632 (build-system python-build-system)
12634 `(("python-mock" ,python-mock)
12635 ("python-pytest" ,python-pytest)))
12636 (home-page "https://github.com/timothycrosley/isort")
12637 (synopsis "Python utility/library to sort python imports")
12638 (description "@code{python-isort} is a python utility/library to sort
12639 imports alphabetically, and automatically separated into sections. It
12640 provides a command line utility, a python library and plugins for various
12642 (license license:expat)
12643 (properties `((python2-variant . ,(delay python2-isort))))))
12645 (define-public python2-isort
12646 (let ((base (package-with-python2
12647 (strip-python2-variant python-isort))))
12648 (package (inherit base)
12650 `(("python2-futures" ,python2-futures)
12651 ,@(package-native-inputs base))))))
12653 (define-public python2-backports-functools-lru-cache
12655 (name "python2-backports-functools-lru-cache")
12660 ;; only the pypi tarballs contain the necessary metadata
12661 (uri (pypi-uri "backports.functools_lru_cache" version))
12664 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12665 (build-system python-build-system)
12667 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12669 `(#:python ,python-2))
12670 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12671 (synopsis "Backport of functools.lru_cache from Python 3.3")
12672 (description "@code{python2-backports-functools-lru-cache} is a backport
12673 of @code{functools.lru_cache} from python 3.3.")
12674 (license license:expat)))
12676 (define-public python-configparser
12678 (name "python-configparser")
12683 (uri (pypi-uri "configparser" version))
12686 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12687 (build-system python-build-system)
12688 (home-page "https://github.com/jaraco/configparser/")
12689 (synopsis "Backport of configparser from python 3.5")
12690 (description "@code{python-configparser} is a backport of
12691 @code{configparser} from Python 3.5 so that it can be used directly
12692 in other versions.")
12693 (license license:expat)))
12695 (define-public python2-configparser
12696 (package-with-python2 python-configparser))
12698 (define-public python-mando
12700 (name "python-mando")
12704 (uri (pypi-uri "mando" version))
12707 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12708 (build-system python-build-system)
12710 `(("python-rst2ansi" ,python-rst2ansi)
12711 ("python-six" ,python-six)))
12713 `(("python-pytest" ,python-pytest)))
12714 (home-page "https://mando.readthedocs.org/")
12716 "Wrapper around argparse, allowing creation of complete CLI applications")
12718 "This package is a wrapper around argparse, allowing you to write complete CLI
12719 applications in seconds while maintaining all the flexibility.")
12720 (license license:expat)))
12722 (define-public python2-mando
12723 (package-with-python2 python-mando))
12725 (define-public python2-argparse
12727 (name "python2-argparse")
12732 (uri (pypi-uri "argparse" version))
12735 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12736 (build-system python-build-system)
12738 `(#:python ,python-2))
12739 (home-page "https://github.com/ThomasWaldmann/argparse/")
12740 (synopsis "Python command-line parsing library")
12742 "This package is mostly for people who want to have @code{argparse} on
12743 older Pythons because it was not part of the standard library back then.")
12744 (license license:psfl)))
12746 (define-public python-fudge
12748 (name "python-fudge")
12749 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12750 ;; package, which is currently the only use of this package.
12755 (uri (pypi-uri "fudge" version))
12758 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12759 (build-system python-build-system)
12761 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12762 (home-page "https://github.com/fudge-py/fudge")
12763 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12765 "Fudge is a Python module for using fake objects (mocks and stubs) to
12768 In readable Python code, you declare the methods available on your fake object
12769 and how they should be called. Then you inject that into your application and
12770 start testing. This declarative approach means you don’t have to record and
12771 playback actions and you don’t have to inspect your fakes after running code.
12772 If the fake object was used incorrectly then you’ll see an informative
12773 exception message with a traceback that points to the culprit.")
12774 (license license:expat)))
12776 (define-public python2-fudge
12777 (package-with-python2 python-fudge))
12779 (define-public python-mwclient
12781 (name "python-mwclient")
12786 ;; The PyPI version wouldn't contain tests.
12787 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12788 "v" version ".tar.gz"))
12789 (file-name (string-append name "-" version ".tar.gz"))
12792 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12793 (build-system python-build-system)
12795 `(("python-requests" ,python-requests)
12796 ("python-requests-oauthlib"
12797 ,python-requests-oauthlib)
12798 ("python-six" ,python-six)))
12800 `(("python-mock" ,python-mock)
12801 ("python-pytest" ,python-pytest)
12802 ("python-pytest-pep8" ,python-pytest-pep8)
12803 ("python-pytest-cache" ,python-pytest-cache)
12804 ("python-pytest-cov" ,python-pytest-cov)
12805 ("python-responses" ,python-responses)))
12806 (home-page "https://github.com/btongminh/mwclient")
12807 (synopsis "MediaWiki API client")
12808 (description "This package provides a MediaWiki API client.")
12809 (license license:expat)))
12811 (define-public python2-mwclient
12812 (package-with-python2 python-mwclient))
12814 (define-public python-utils
12816 (name "python-utils")
12820 (uri (pypi-uri "python-utils" version))
12823 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12824 (build-system python-build-system)
12826 `(("pytest-runner" ,python-pytest-runner)
12827 ("pytest" ,python-pytest)
12828 ("six" ,python-six)))
12829 (home-page "https://github.com/WoLpH/python-utils")
12830 (synopsis "Convenient utilities not included with the standard Python install")
12832 "Python Utils is a collection of small Python functions and classes which
12833 make common patterns shorter and easier.")
12834 (license license:bsd-2)))
12836 (define-public python2-utils
12837 (package-with-python2 python-utils))
12839 (define-public python-diff-match-patch
12841 (name "python-diff-match-patch")
12842 (version "20121119")
12846 (uri (pypi-uri "diff-match-patch" version))
12849 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12850 (build-system python-build-system)
12851 (home-page "https://code.google.com/p/google-diff-match-patch")
12852 (synopsis "Synchronize plain text")
12853 (description "Diff Match and Patch libraries offer robust algorithms to
12854 perform the operations required for synchronizing plain text.")
12855 (license license:asl2.0)))
12857 (define-public python2-diff-match-patch
12858 (package-with-python2 python-diff-match-patch))
12860 (define-public python-dirsync
12862 (name "python-dirsync")
12867 (uri (pypi-uri "dirsync" version))
12870 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12871 (build-system python-build-system)
12873 `(("six" ,python-six)))
12874 (home-page "https://bitbucket.org/tkhyn/dirsync")
12875 (synopsis "Advanced directory tree synchronisation tool")
12876 (description "Advanced directory tree synchronisation tool.")
12877 (license license:expat)))
12879 (define-public python2-dirsync
12880 (package-with-python2 python-dirsync))
12882 (define-public python-levenshtein
12884 (name "python-levenshtein")
12889 (uri (pypi-uri "python-Levenshtein" version))
12892 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12893 (build-system python-build-system)
12894 (home-page "https://github.com/ztane/python-Levenshtein")
12895 (synopsis "Fast computation of Levenshtein distance and string similarity")
12897 "The Levenshtein Python C extension module contains functions for fast computation of
12899 @item Levenshtein (edit) distance, and edit operations
12900 @item string similarity
12901 @item approximate median strings, and generally string averaging
12902 @item string sequence and set similarity
12904 It supports both normal and Unicode strings.")
12905 (license license:gpl2+)))
12907 (define-public python2-levenshtein
12908 (package-with-python2 python-levenshtein))
12910 (define-public python-scandir
12912 (name "python-scandir")
12917 (uri (pypi-uri "scandir" version))
12919 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12920 (build-system python-build-system)
12922 `(#:phases (modify-phases %standard-phases
12925 (invoke "python" "test/run_tests.py"))))))
12926 (home-page "https://github.com/benhoyt/scandir")
12927 (synopsis "Directory iteration function")
12929 "Directory iteration function like os.listdir(), except that instead of
12930 returning a list of bare filenames, it yields DirEntry objects that include
12931 file type and stat information along with the name. Using scandir() increases
12932 the speed of os.walk() by 2-20 times (depending on the platform and file
12933 system) by avoiding unnecessary calls to os.stat() in most cases.
12935 This package is part of the Python standard library since version 3.5.")
12936 (license license:bsd-3)))
12938 (define-public python2-scandir
12939 (package-with-python2 python-scandir))
12941 (define-public python2-stemming
12943 (name "python2-stemming")
12948 (uri (pypi-uri "stemming" version))
12950 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12951 (build-system python-build-system)
12953 `(#:python ,python-2))
12954 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12955 (synopsis "Python implementations of various stemming algorithms")
12957 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12958 stemming algorithms for English. These implementations are straightforward and
12959 efficient, unlike some Python versions of the same algorithms available on the
12960 Web. This package is an extraction of the stemming code included in the Whoosh
12962 (license license:public-domain)))
12964 (define-public python-factory-boy
12966 (name "python-factory-boy")
12971 (uri (pypi-uri "factory_boy" version))
12973 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12974 (build-system python-build-system)
12976 ;; Tests are not included in the tarball.
12979 `(("faker" ,python-faker)))
12980 (home-page "https://github.com/benhoyt/scandir")
12981 (synopsis "Versatile test fixtures replacement")
12983 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12985 As a fixtures replacement tool, it aims to replace static, hard to maintain
12986 fixtures with easy-to-use factories for complex object.
12988 Instead of building an exhaustive test setup with every possible combination
12989 of corner cases, factory_boy allows you to use objects customized for the
12990 current test, while only declaring the test-specific fields")
12991 (license license:expat)))
12993 (define-public python2-factory-boy
12994 (package-with-python2 python-factory-boy))
12996 (define-public python-translate-toolkit
12998 (name "python-translate-toolkit")
13003 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13005 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13006 (build-system python-build-system)
13008 `(("python-pytest" ,python-pytest)
13009 ("python-sphinx" ,python-sphinx)))
13011 `(("python-babel" ,python-babel)
13012 ("python-beautifulsoup4" ,python-beautifulsoup4)
13013 ("python-chardet" ,python-chardet)
13014 ("python-diff-match-patch" ,python-diff-match-patch)
13015 ("python-levenshtein" ,python-levenshtein)
13016 ("python-lxml" ,python-lxml)
13017 ("python-six" ,python-six)
13018 ("python-vobject" ,python-vobject)
13019 ("python-pyyaml" ,python-pyyaml)))
13021 ;; TODO: tests are not run, because they end with
13022 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13024 ;; during test setup.
13026 (home-page "https://toolkit.translatehouse.org")
13027 (synopsis "Tools and API for translation and localization engineering")
13029 "Tools and API for translation and localization engineering. It contains
13030 several utilities, as well as an API for building localization tools.")
13031 (license license:gpl2+)))
13033 (define-public python2-translate-toolkit
13034 (package-with-python2 python-translate-toolkit))
13036 (define-public python-packaging
13038 (name "python-packaging")
13043 (uri (pypi-uri "packaging" version))
13046 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
13047 (build-system python-build-system)
13049 `(#:phases (modify-phases %standard-phases
13051 (lambda _ (invoke "py.test" "-vv"))))))
13053 `(("python-pretend" ,python-pretend)
13054 ("python-pytest" ,python-pytest)))
13056 `(("python-pyparsing" ,python-pyparsing)
13057 ("python-six" ,python-six)))
13058 (home-page "https://github.com/pypa/packaging")
13059 (synopsis "Core utilities for Python packages")
13060 (description "Packaging is a Python module for dealing with Python packages.
13061 It offers an interface for working with package versions, names, and dependency
13063 ;; From 'LICENSE': This software is made available under the terms of
13064 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13065 ;; Contributions to this software is made under the terms of *both* these
13067 (license (list license:asl2.0 license:bsd-2))))
13069 (define-public python2-packaging
13070 (package-with-python2 python-packaging))
13072 (define-public python-relatorio
13074 (name "python-relatorio")
13079 (uri (pypi-uri "relatorio" version))
13082 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13083 (build-system python-build-system)
13085 `(("python-lxml" ,python-lxml)
13086 ("python-genshi" ,python-genshi)))
13088 `(("python-magic" ,python-magic)))
13089 (home-page "https://relatorio.tryton.org/")
13090 (synopsis "Templating library able to output ODT and PDF files")
13091 (description "Relatorio is a templating library which provides a way to
13092 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13093 for more filetypes can be easily added by creating plugins for them.")
13094 (license license:gpl3+)))
13096 (define-public python2-relatorio
13097 (package-with-python2 python-relatorio))
13099 (define-public python-radon
13101 (name "python-radon")
13106 (uri (pypi-uri "radon" version))
13109 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13110 (build-system python-build-system)
13112 `(#:phases (modify-phases %standard-phases
13115 (invoke "python" "radon/tests/run.py"))))))
13117 `(("python-colorama" ,python-colorama)
13118 ("python-flake8-polyfill" ,python-flake8-polyfill)
13119 ("python-mando" ,python-mando)))
13121 `(("python-pytest" ,python-pytest)
13122 ("python-pytest-mock" ,python-pytest-mock)))
13123 (home-page "https://radon.readthedocs.org/")
13124 (synopsis "Code Metrics in Python")
13125 (description "Radon is a Python tool which computes various code metrics.
13126 Supported metrics are:
13128 @item raw metrics: SLOC, comment lines, blank lines, &c.
13129 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13130 @item Halstead metrics (all of them)
13131 @item the Maintainability Index (a Visual Studio metric)
13133 (license license:expat)))
13135 (define-public python2-radon
13136 (package-with-python2 python-radon))
13138 (define-public python-sure
13140 (name "python-sure")
13145 (uri (pypi-uri "sure" version))
13148 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13149 (build-system python-build-system)
13151 `(("python-mock" ,python-mock)
13152 ("python-six" ,python-six)))
13154 `(("python-nose" ,python-nose)))
13155 (home-page "https://github.com/gabrielfalcao/sure")
13156 (synopsis "Automated testing library in python for python")
13158 "Sure is a python library that leverages a DSL for writing assertions.
13159 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13160 (license license:gpl3+)))
13162 (define-public python2-sure
13163 (package-with-python2 python-sure))
13165 (define-public python2-couleur
13166 ;; This package does not seem to support python3 at all, hence,
13167 ;; only the python2 variant definition is provided.
13169 (name "python2-couleur")
13174 (uri (pypi-uri "couleur" version))
13177 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13178 (build-system python-build-system)
13180 `(#:python ,python-2))
13181 (home-page "https://github.com/gabrielfalcao/couleur")
13183 "ANSI terminal tool for python, colored shell and other handy fancy features")
13185 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13186 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13187 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13188 ;; https://github.com/gabrielfalcao/couleur/issues/11
13189 (license license:lgpl3+)))
13191 (define-public python-misaka
13193 (name "python-misaka")
13198 (uri (pypi-uri "misaka" version))
13201 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13202 (build-system python-build-system)
13204 `(;; Line 37 of setup.py calls self.run_command('develop')
13205 ;; in the 'check' phase. This command seems to be trying
13207 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13208 ;; for which it does not have the permission to write.
13211 `(("python-cffi" ,python-cffi)))
13212 (home-page "https://github.com/FSX/misaka")
13213 (synopsis "Python binding for Hoedown")
13215 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13216 library written in C. It features a fast HTML renderer and functionality to make custom
13217 renderers (e.g. man pages or LaTeX).")
13218 (license license:expat)))
13220 (define-public python2-misaka
13221 (package-with-python2 python-misaka))
13223 (define-public python2-steadymark
13224 ;; This is forced into being a python2 only variant
13225 ;; due to its dependence on couleur that has no support
13228 (name "python2-steadymark")
13233 (uri (pypi-uri "steadymark" version))
13236 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13237 (build-system python-build-system)
13239 `(("python-couleur" ,python2-couleur)
13240 ("python-sure" ,python2-sure)
13241 ("python-misaka" ,python2-misaka)))
13243 `(#:python ,python-2
13245 (modify-phases %standard-phases
13246 (add-before 'build 'patch-setup-py
13248 ;; Update requirements from dependency==version
13249 ;; to dependency>=version
13250 (substitute* "setup.py"
13253 (home-page "https://github.com/gabrielfalcao/steadymark")
13254 (synopsis "Markdown-based test runner for python")
13256 "@code{Steadymark} allows documentation to be written in github-flavoured
13257 markdown. The documentation may contain snippets of code surrounded by python
13258 code blocks and @code{Steadymark} will find these snippets and run them, making
13259 sure that there are no old malfunctional examples in the documentation examples.")
13260 (license license:expat)))
13262 (define-public python-jsonpointer
13264 (name "python-jsonpointer")
13269 (uri (pypi-uri "jsonpointer" version))
13272 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13273 (build-system python-build-system)
13274 (home-page "https://github.com/stefankoegl/python-json-pointer")
13275 (synopsis "Identify specific nodes in a JSON document")
13276 (description "@code{jsonpointer} allows you to access specific nodes
13277 by path in a JSON document (see RFC 6901).")
13278 (license license:bsd-3)))
13280 (define-public python2-jsonpointer
13281 (package-with-python2 python-jsonpointer))
13283 (define-public python-jsonpatch
13285 (name "python-jsonpatch")
13290 ;; pypi version lacks tests.js
13291 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13292 "archive/v" version ".tar.gz"))
13293 (file-name (string-append name "-" version ".tar.gz"))
13296 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13297 (build-system python-build-system)
13299 `(("python-jsonpointer" ,python-jsonpointer)))
13300 (home-page "https://github.com/stefankoegl/python-json-patch")
13301 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13302 (description "@code{jsonpatch} is a library and program that allows
13303 applying JSON Patches according to RFC 6902.")
13304 (license license:bsd-3)))
13306 (define-public python2-jsonpatch
13307 (package-with-python2 python-jsonpatch))
13309 (define-public python-jsonpatch-0.4
13310 (package (inherit python-jsonpatch)
13311 (name "python-jsonpatch")
13316 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13317 "archive/v" version ".tar.gz"))
13318 (file-name (string-append name "-" version ".tar.gz"))
13321 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13323 (define-public python2-jsonpatch-0.4
13324 (package-with-python2 python-jsonpatch-0.4))
13326 (define-public python-rfc3986
13328 (name "python-rfc3986")
13332 (uri (pypi-uri "rfc3986" version))
13335 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13336 (build-system python-build-system)
13338 `(#:modules ((guix build utils)
13339 (guix build python-build-system)
13344 (modify-phases %standard-phases
13347 (let ((cwd (getcwd)))
13348 (setenv "PYTHONPATH"
13349 (string-append cwd "/build/"
13350 (find (cut string-prefix? "lib" <>)
13351 (scandir (string-append cwd "/build")))
13353 (getenv "PYTHONPATH")))
13354 (invoke "pytest" "-v")))))))
13356 `(("python-pytest" ,python-pytest)))
13357 (home-page "https://rfc3986.readthedocs.io/")
13358 (synopsis "Parse and validate URI references")
13360 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13361 validation and authority parsing. This module also supports RFC@tie{}6874
13362 which adds support for zone identifiers to IPv6 addresses.")
13363 (license license:asl2.0)))
13365 (define-public python2-rfc3986
13366 (package-with-python2 python-rfc3986))
13368 (define-public python-rfc3987
13370 (name "python-rfc3987")
13375 (uri (pypi-uri "rfc3987" version))
13378 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13379 (build-system python-build-system)
13380 (home-page "https://pypi.python.org/pypi/rfc3987")
13381 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13382 (description "@code{rfc3987} provides routines for parsing and
13383 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13384 (license license:gpl3+)))
13386 (define-public python2-rfc3987
13387 (package-with-python2 python-rfc3987))
13389 (define-public python-validate-email
13391 (name "python-validate-email")
13396 (uri (pypi-uri "validate_email" version))
13399 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13400 (build-system python-build-system)
13401 (home-page "https://github.com/syrusakbary/validate_email")
13402 (synopsis "Verifies if an email address is valid and really exists")
13403 (description "@code{validate_email} can be used to verify if an email
13404 address is valid and really exists.")
13405 (license license:lgpl3+)))
13407 (define-public python2-validate-email
13408 (package-with-python2 python-validate-email))
13410 (define-public python-flex
13412 (name "python-flex")
13417 (uri (pypi-uri "flex" version))
13420 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13421 (build-system python-build-system)
13423 `(("python-click" ,python-click)
13424 ("python-iso8601" ,python-iso8601)
13425 ("python-jsonpointer" ,python-jsonpointer)
13426 ("python-pyyaml" ,python-pyyaml)
13427 ("python-requests" ,python-requests)
13428 ("python-rfc3987" ,python-rfc3987)
13429 ("python-six" ,python-six)
13430 ("python-validate-email" ,python-validate-email)))
13431 (home-page "https://github.com/pipermerriam/flex")
13432 (synopsis "Validates Swagger schemata")
13433 (description "@code{flex} can be used to validate Swagger schemata.")
13434 (license license:bsd-3)))
13436 (define-public python2-flex
13437 (package-with-python2 python-flex))
13439 (define-public python-marshmallow
13441 (name "python-marshmallow")
13442 (version "3.0.0b14")
13446 (uri (pypi-uri "marshmallow" version))
13449 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13450 (build-system python-build-system)
13452 `(("python-dateutil" ,python-dateutil)
13453 ("python-simplejson" ,python-simplejson)))
13455 `(("python-pytest" ,python-pytest)
13456 ("python-pytz" ,python-pytz)))
13457 (home-page "https://github.com/marshmallow-code/marshmallow")
13458 (synopsis "Convert complex datatypes to and from native
13459 Python datatypes.")
13460 (description "@code{marshmallow} provides a library for converting
13461 complex datatypes to and from native Python datatypes.")
13462 (license license:expat)))
13464 (define-public python2-marshmallow
13465 (package-with-python2 python-marshmallow))
13467 (define-public python-apispec
13469 (name "python-apispec")
13474 (uri (pypi-uri "apispec" version))
13477 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13478 (build-system python-build-system)
13480 `(("python-pyyaml" ,python-pyyaml)))
13482 `(("python-pytest" ,python-pytest)
13483 ("python-flask" ,python-flask)
13484 ("python-marshmallow" ,python-marshmallow)
13485 ("python-tornado" ,python-tornado)
13486 ("python-bottle" ,python-bottle)
13487 ("python-mock" ,python-mock)))
13488 (home-page "https://github.com/marshmallow-code/apispec")
13489 (synopsis "Swagger 2.0 API specification generator")
13490 (description "@code{python-apispec} is a pluggable API specification
13491 generator. Currently supports the OpenAPI specification (f.k.a.
13493 (license license:expat)))
13495 (define-public python2-apispec
13496 (package-with-python2 python-apispec))
13498 (define-public python-flasgger
13500 (name "python-flasgger")
13505 (uri (git-reference
13506 (url "https://github.com/rochacbruno/flasgger.git")
13508 (file-name (git-file-name name version))
13510 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13511 (build-system python-build-system)
13514 (modify-phases %standard-phases
13516 (lambda* (#:key inputs outputs #:allow-other-keys)
13517 (substitute* "Makefile"
13518 (("flake8 flasgger --ignore=F403")
13519 "flake8 flasgger --ignore=E731,F403"))
13520 (setenv "PYTHONPATH" (string-append (getcwd)
13522 (getenv "PYTHONPATH")))
13523 (invoke "py.test"))))))
13525 `(("python-flask" ,python-flask)
13526 ("python-pyyaml" ,python-pyyaml)
13527 ("python-jsonschema" ,python-jsonschema)
13528 ("python-mistune" ,python-mistune)
13529 ("python-six" ,python-six)))
13531 `(("python-decorator" ,python-decorator)
13532 ("python-flake8" ,python-flake8)
13533 ("python-flask-restful" ,python-flask-restful)
13534 ("python-flex" ,python-flex)
13535 ("python-pytest" ,python-pytest)
13536 ("python-pytest-cov" ,python-pytest-cov)
13537 ("python-marshmallow" ,python-marshmallow)
13538 ("python-apispec" ,python-apispec)))
13539 (home-page "https://github.com/rochacbruno/flasgger/")
13540 (synopsis "Extract Swagger specs from your Flask project")
13541 (description "@code{python-flasgger} allows extracting Swagger specs
13542 from your Flask project. It is a fork of Flask-Swagger.")
13543 (license license:expat)))
13545 (define-public python2-flasgger
13546 (package-with-python2 python-flasgger))
13548 (define-public python-swagger-spec-validator
13550 (name "python-swagger-spec-validator")
13555 (uri (pypi-uri "swagger-spec-validator" version))
13558 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13559 (build-system python-build-system)
13561 `(("python-jsonschema" ,python-jsonschema)
13562 ("python-pyyaml" ,python-pyyaml)
13563 ("python-six" ,python-six)))
13565 "https://github.com/Yelp/swagger_spec_validator")
13566 (synopsis "Validation of Swagger specifications")
13567 (description "@code{swagger_spec_validator} provides a library for
13568 validating Swagger API specifications.")
13569 (license license:asl2.0)))
13571 (define-public python2-swagger-spec-validator
13572 (package-with-python2 python-swagger-spec-validator))
13574 (define-public python-apache-libcloud
13576 (name "python-apache-libcloud")
13581 (uri (pypi-uri "apache-libcloud" version))
13584 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13585 (build-system python-build-system)
13588 (modify-phases %standard-phases
13589 (add-after 'unpack 'patch-ssh
13590 (lambda* (#:key inputs #:allow-other-keys)
13591 (substitute* "libcloud/compute/ssh.py"
13592 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13595 (add-after 'unpack 'patch-tests
13597 (substitute* "./libcloud/test/test_file_fixtures.py"
13598 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13599 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13600 return (httplib.OK,
13602 {\"test\": \"value\"},
13603 httplib.responses[httplib.OK])
13605 (substitute* "libcloud/test/compute/test_ssh_client.py"
13606 (("class ShellOutSSHClientTests")
13607 "@unittest.skip(\"Guix container doesn't have ssh service\")
13608 class ShellOutSSHClientTests")
13609 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13610 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13611 (("'.xF0', '.x90', '.x8D', '.x88'")
13612 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13614 (add-before 'check 'copy-secret
13616 (copy-file "libcloud/test/secrets.py-dist"
13617 "libcloud/test/secrets.py")
13620 `(("openssh" ,openssh)))
13622 `(("python-paramiko" ,python-paramiko)
13623 ("python-requests" ,python-requests)))
13625 `(("python-lockfile" ,python-lockfile)
13626 ("python-mock" ,python-mock)
13627 ("python-pytest" ,python-pytest)
13628 ("python-pytest-runner" ,python-pytest-runner)
13629 ("python-requests-mock" ,python-requests-mock)))
13630 (home-page "https://libcloud.apache.org/")
13631 (synopsis "Unified Cloud API")
13632 (description "@code{libcloud} is a Python library for interacting with
13633 many of the popular cloud service providers using a unified API.")
13634 (license license:asl2.0)))
13636 (define-public python2-apache-libcloud
13637 (package-with-python2 python-apache-libcloud))
13639 (define-public python-smmap2
13641 (name "python-smmap2")
13646 (uri (pypi-uri "smmap2" version))
13649 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13650 (build-system python-build-system)
13652 `(("python-nosexcover" ,python-nosexcover)))
13653 (home-page "https://github.com/Byron/smmap")
13654 (synopsis "Python sliding window memory map manager")
13655 (description "@code{smmap2} is a pure Python implementation of a sliding
13656 window memory map manager.")
13657 (license license:bsd-3)))
13659 (define-public python2-smmap2
13660 (package-with-python2 python-smmap2))
13662 (define-public python-regex
13664 (name "python-regex")
13665 (version "2019.04.14")
13668 (uri (pypi-uri "regex" version))
13671 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13672 ;; TODO: Fix and enable regex_test.py tests that complain about the
13673 ;; test.support module not existing.
13674 (build-system python-build-system)
13675 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13676 (synopsis "Alternative regular expression module")
13677 (description "This regular expression implementation is backwards-
13678 compatible with the standard @code{re} module, but offers additional
13679 functionality like full case-folding for case-insensitive matches in Unicode.")
13680 (license license:psfl)))
13682 (define-public python2-regex
13683 (package-with-python2 python-regex))
13685 (define-public python2-pyopengl
13687 (name "python2-pyopengl")
13692 (uri (pypi-uri "PyOpenGL" version))
13695 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13697 `(#:python ,python-2))
13698 (build-system python-build-system)
13699 (home-page "http://pyopengl.sourceforge.net")
13700 (synopsis "Standard OpenGL bindings for Python")
13702 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13703 related APIs. The binding is created using the standard @code{ctypes}
13705 (license license:bsd-3)))
13707 (define-public python2-pyopengl-accelerate
13709 (inherit python2-pyopengl)
13710 (name "python2-pyopengl-accelerate")
13715 (uri (pypi-uri "PyOpenGL-accelerate" version))
13718 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13719 (synopsis "Acceleration code for PyOpenGL")
13721 "This is the Cython-coded accelerator module for PyOpenGL.")))
13723 (define-public python-rencode
13725 (name "python-rencode")
13730 (uri (pypi-uri "rencode" version))
13733 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13734 (build-system python-build-system)
13737 (modify-phases %standard-phases
13738 (add-before 'check 'delete-bogus-test
13739 ;; This test requires /home/aresch/Downloads, which is not provided by
13740 ;; the build environment.
13742 (delete-file "rencode/t.py")
13744 (native-inputs `(("pkg-config" ,pkg-config)
13745 ("python-cython" ,python-cython)))
13746 (home-page "https://github.com/aresch/rencode")
13747 (synopsis "Serialization of heterogeneous data structures")
13749 "The @code{rencode} module is a data structure serialization library,
13750 similar to @code{bencode} from the BitTorrent project. For complex,
13751 heterogeneous data structures with many small elements, r-encoding stake up
13752 significantly less space than b-encodings. This version of rencode is a
13753 complete rewrite in Cython to attempt to increase the performance over the
13754 pure Python module.")
13755 (license license:bsd-3)))
13757 (define-public python2-rencode
13758 (package-with-python2 python-rencode))
13760 (define-public python-xenon
13762 (name "python-xenon")
13767 (uri (pypi-uri "xenon" version))
13770 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13771 (build-system python-build-system)
13773 `(("python-pyyaml" ,python-pyyaml)
13774 ("python-radon" ,python-radon)
13775 ("python-requests" ,python-requests)
13776 ("python-flake8" ,python-flake8)
13777 ("python-tox" ,python-tox)))
13780 (modify-phases %standard-phases
13781 (add-before 'build 'patch-test-requirements
13783 ;; Remove httpretty dependency for tests.
13784 (substitute* "setup.py"
13785 (("httpretty") ""))
13787 (home-page "https://xenon.readthedocs.org/")
13788 (synopsis "Monitor code metrics for Python on your CI server")
13790 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13791 Ideally, @code{xenon} is run every time code is committed. Through command
13792 line options, various thresholds can be set for the complexity of code. It
13793 will fail (i.e. it will exit with a non-zero exit code) when any of these
13794 requirements is not met.")
13795 (license license:expat)))
13797 (define-public python2-xenon
13798 (package-with-python2 python-xenon))
13800 (define-public python-pysocks
13802 (name "python-pysocks")
13807 (uri (pypi-uri "PySocks" version))
13810 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13811 (build-system python-build-system)
13812 (arguments `(#:tests? #f))
13813 (home-page "https://github.com/Anorov/PySocks")
13814 (synopsis "SOCKS client module")
13815 (description "@code{pysocks} is an updated and semi-actively maintained
13816 version of @code{SocksiPy} with bug fixes and extra features.")
13817 (license license:bsd-3)))
13819 (define-public python2-pysocks
13820 (package-with-python2 python-pysocks))
13822 (define-public python-pydiff
13824 (name "python-pydiff")
13829 (uri (pypi-uri "pydiff" version))
13832 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13833 (build-system python-build-system)
13834 (home-page "https://github.com/myint/pydiff")
13835 (synopsis "Library to diff two Python files at the bytecode level")
13837 "@code{pydiff} makes it easy to look for actual code changes while
13838 ignoring formatting changes.")
13839 (license license:expat)))
13841 (define-public python2-pydiff
13842 (package-with-python2 python-pydiff))
13844 (define-public python-tqdm
13846 (name "python-tqdm")
13851 (uri (pypi-uri "tqdm" version))
13854 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13855 (build-system python-build-system)
13857 `(("python-flake8" ,python-flake8)
13858 ("python-nose" ,python-nose)
13859 ("python-coverage" ,python-coverage)))
13860 (home-page "https://github.com/tqdm/tqdm")
13861 (synopsis "Fast, extensible progress meter")
13863 "Make loops show a progress bar on the console by just wrapping any
13864 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13865 design and layout.")
13866 (license (list license:mpl2.0 license:expat))
13867 (properties `((python2-variant . ,(delay python2-tqdm))))))
13869 (define-public python2-tqdm
13870 (let ((tqdm (package-with-python2
13871 (strip-python2-variant python-tqdm))))
13872 (package (inherit tqdm)
13873 (native-inputs `(("python2-functools32" ,python2-functools32)
13874 ,@(package-native-inputs tqdm))))))
13876 (define-public python-pkginfo
13878 (name "python-pkginfo")
13883 (uri (pypi-uri "pkginfo" version))
13886 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13887 (build-system python-build-system)
13889 ;; The tests are broken upstream.
13892 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13894 "Query metadatdata from sdists, bdists, and installed packages")
13896 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13897 source distriubtion (an sdist) or a binary distribution (e.g., created by
13898 running bdist_egg). It can also query the EGG-INFO directory of an installed
13899 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13900 created by running @code{python setup.py develop}).")
13901 (license license:expat)))
13903 (define-public python2-pkginfo
13904 (package-with-python2 python-pkginfo))
13906 (define-public python-twine
13908 (name "python-twine")
13913 (uri (pypi-uri "twine" version))
13916 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13917 (build-system python-build-system)
13919 `(("python-tqdm" ,python-tqdm)
13920 ("python-pkginfo" ,python-pkginfo)
13921 ("python-requests" ,python-requests)
13922 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13923 (home-page "https://github.com/pypa/twine")
13924 (synopsis "Collection of utilities for interacting with PyPI")
13926 "@code{twine} currently supports registering projects and uploading
13927 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13928 their files and supports any packaging format (including wheels).")
13929 (license license:asl2.0)))
13931 (define-public python2-twine
13932 (package-with-python2 python-twine))
13934 (define-public python-linecache2
13936 (name "python-linecache2")
13941 (uri (pypi-uri "linecache2" version))
13944 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13945 (build-system python-build-system)
13947 `(;; The tests depend on unittest2, and our version is a bit too old.
13950 `(("python-pbr" ,python-pbr-minimal)))
13952 "https://github.com/testing-cabal/linecache2")
13953 (synopsis "Backports of the linecache module")
13955 "The linecache module allows one to get any line from any file, while
13956 attempting to optimize internally, using a cache, the common case where many
13957 lines are read from a single file.")
13958 (license license:psfl)))
13960 (define-public python2-linecache2
13961 (package-with-python2 python-linecache2))
13963 (define-public python-traceback2
13965 (name "python-traceback2")
13970 (uri (pypi-uri "traceback2" version))
13973 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13974 (build-system python-build-system)
13976 `(;; python-traceback2 and python-unittest2 depend on one another.
13979 `(("python-pbr" ,python-pbr-minimal)))
13981 `(("python-linecache2" ,python-linecache2)))
13983 "https://github.com/testing-cabal/traceback2")
13984 (synopsis "Backports of the traceback module")
13986 "This module provides a standard interface to extract, format and print
13987 stack traces of Python programs. It exactly mimics the behavior of the Python
13988 interpreter when it prints a stack trace.")
13989 (license license:psfl)))
13991 (define-public python2-traceback2
13992 (package-with-python2 python-traceback2))
13994 (define-public python-ratelimiter
13996 (name "python-ratelimiter")
14001 (uri (pypi-uri "ratelimiter" version))
14004 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14005 (build-system python-build-system)
14007 '(#:tests? #f)) ; There are no tests in the pypi archive.
14008 (home-page "https://github.com/RazerM/ratelimiter")
14009 (synopsis "Simple rate limiting object")
14011 "The @code{ratelimiter} module ensures that an operation will not be
14012 executed more than a given number of times during a given period.")
14013 (license license:asl2.0)))
14015 (define-public python2-ratelimiter
14016 (package-with-python2 python-ratelimiter))
14018 (define-public python-dukpy
14020 (name "python-dukpy")
14025 (uri (git-reference
14026 (url "https://github.com/kovidgoyal/dukpy.git")
14027 (commit (string-append "v" version))))
14028 (file-name (git-file-name name version))
14030 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14031 (build-system python-build-system)
14032 (home-page "https://github.com/kovidgoyal/dukpy")
14033 (synopsis "Run JavaScript in python")
14035 "dukpy is a JavaScript runtime environment for Python using the duktape
14036 embeddable JavaScript engine.")
14037 ;; Dukpy is licensed under MIT like the embedded duktape library,
14038 ;; with 'errors.c' as GPL3.
14039 (license (list license:expat license:gpl3))))
14041 (define-public python2-dukpy
14042 (package-with-python2 python-dukpy))
14044 (define-public python-jsonrpclib-pelix
14046 (name "python-jsonrpclib-pelix")
14051 (uri (pypi-uri "jsonrpclib-pelix" version))
14054 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14055 (build-system python-build-system)
14057 `(#:tests? #f)) ; no tests in PyPI tarball
14058 (home-page "https://github.com/tcalmant/jsonrpclib/")
14059 (synopsis "JSON-RPC 2.0 client library for Python")
14061 "This library implements the JSON-RPC v2.0
14062 specification (backwards-compatible) as a client library for Python. This
14063 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14065 (license license:asl2.0)))
14067 (define-public python2-jsonrpclib-pelix
14068 (package-with-python2 python-jsonrpclib-pelix))
14070 (define-public python-setuptools-scm-git-archive
14072 (name "python-setuptools-scm-git-archive")
14077 (uri (pypi-uri "setuptools_scm_git_archive" version))
14080 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14081 (build-system python-build-system)
14083 `(("python-pytest" ,python-pytest)))
14085 `(("python-setuptools-scm" ,python-setuptools-scm)))
14086 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14087 (synopsis "Setuptools_scm plugin for git archives")
14089 "The setuptools_scm_git_archive package is a plugin to
14090 setuptools_scm, which supports obtaining versions from git archives that
14091 belong to tagged versions.")
14092 (license license:expat)))
14094 (define-public python2-setuptools-scm-git-archive
14095 (package-with-python2 python-setuptools-scm-git-archive))
14097 (define-public python-setuptools-git
14099 (name "python-setuptools-git")
14104 (uri (pypi-uri "setuptools-git" version))
14107 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14108 (build-system python-build-system)
14111 (modify-phases %standard-phases
14112 ;; This is needed for tests.
14113 (add-after 'unpack 'configure-git
14115 (setenv "HOME" "/tmp")
14116 (invoke "git" "config" "--global" "user.email" "guix")
14117 (invoke "git" "config" "--global" "user.name" "guix")
14120 `(("git" ,git-minimal)))
14121 (home-page "https://github.com/msabramo/setuptools-git")
14122 (synopsis "Setuptools revision control system plugin for Git")
14124 "This package provides a plugin for Setuptools for revision control with
14126 (license license:bsd-3)))
14128 (define-public python-pyclipper
14130 (name "python-pyclipper")
14131 (version "1.1.0.post1")
14135 (uri (pypi-uri "pyclipper" version ".zip"))
14138 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14139 (modules '((guix build utils)))
14142 ;; This file is generated by Cython.
14143 (delete-file "pyclipper/pyclipper.cpp") #t))))
14144 (build-system python-build-system)
14147 (modify-phases %standard-phases
14148 (add-before 'build 'cythonize-sources
14150 (with-directory-excursion "pyclipper"
14151 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14153 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14155 `(("python-cython" ,python-cython)
14156 ("python-pytest" ,python-pytest)
14157 ("python-pytest-runner" ,python-pytest-runner)
14158 ("python-unittest2" ,python-unittest2)
14160 (home-page "https://github.com/greginvm/pyclipper")
14161 (synopsis "Wrapper for Angus Johnson's Clipper library")
14163 "Pyclipper is a Cython wrapper for the C++ translation of the
14164 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14165 (license license:expat)))
14167 (define-public python2-pyclipper
14168 (package-with-python2 python-pyclipper))
14170 (define-public python2-booleanoperations
14172 (name "python2-booleanoperations")
14177 (uri (pypi-uri "booleanOperations" version ".zip"))
14180 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14181 (build-system python-build-system)
14183 `(#:python ,python-2))
14186 ("python2-pytest" ,python2-pytest)
14187 ("python2-pytest-runner" ,python2-pytest-runner)))
14189 `(("python-fonttools" ,python2-fonttools)
14190 ("python-pyclipper" ,python2-pyclipper)
14191 ("python-ufolib" ,python2-ufolib)))
14192 (home-page "https://github.com/typemytype/booleanOperations")
14193 (synopsis "Boolean operations on paths")
14195 "BooleanOperations provides a Python library that enables
14196 boolean operations on paths.")
14197 (license license:expat)))
14199 (define-public python-tempdir
14201 (name "python-tempdir")
14206 (uri (pypi-uri "tempdir" version))
14209 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14210 (build-system python-build-system)
14211 (home-page "https://pypi.org/project/tempdir/")
14213 ;; the package has no tests
14215 (synopsis "Python library for managing temporary directories")
14217 "This library manages temporary directories that are automatically
14218 deleted with all their contents when they are no longer needed. It is
14219 particularly convenient for use in tests.")
14220 (license license:expat)))
14222 (define-public python2-tempdir
14223 (package-with-python2 python-tempdir))
14225 (define-public python-activepapers
14227 (name "python-activepapers")
14232 (uri (pypi-uri "ActivePapers.Py" version))
14235 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14236 (build-system python-build-system)
14238 `(#:modules ((ice-9 ftw)
14241 (guix build python-build-system))
14244 (modify-phases %standard-phases
14245 (add-after 'unpack 'delete-python2-code
14247 (for-each delete-file
14248 '("lib/activepapers/builtins2.py"
14249 "lib/activepapers/standardlib2.py"
14250 "lib/activepapers/utility2.py"))))
14253 ;; Deactivate the test cases that download files
14254 (setenv "NO_NETWORK_ACCESS" "1")
14255 ;; For some strange reason, some tests fail if nosetests runs all
14256 ;; test modules in a single execution. They pass if each test
14257 ;; module is run individually.
14258 (for-each (lambda (filename)
14259 (invoke "nosetests"
14260 (string-append "tests/" filename)))
14263 (string-suffix? ".py" filename)))))))))
14265 `(("python-tempdir" ,python-tempdir)
14266 ("python-nose" ,python-nose)))
14268 `(("python-h5py" ,python-h5py)))
14269 (home-page "http://www.activepapers.org/")
14270 (synopsis "Executable papers for scientific computing")
14272 "ActivePapers is a tool for working with executable papers, which
14273 combine data, code, and documentation in single-file packages,
14274 suitable for publication as supplementary material or on repositories
14275 such as figshare or Zenodo.")
14276 (properties `((python2-variant . ,(delay python2-activepapers))))
14277 (license license:bsd-3)))
14279 (define-public python2-activepapers
14280 (let ((base (package-with-python2
14281 (strip-python2-variant python-activepapers))))
14285 (substitute-keyword-arguments (package-arguments base)
14287 `(modify-phases ,phases
14288 (delete 'delete-python2-code)
14289 (add-after 'unpack 'delete-python3-code
14291 (for-each delete-file
14292 '("lib/activepapers/builtins3.py"
14293 "lib/activepapers/standardlib3.py"
14294 "lib/activepapers/utility3.py")))))))))))
14296 (define-public python-semver
14298 (name "python-semver")
14303 (uri (pypi-uri "semver" version))
14306 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14307 (build-system python-build-system)
14310 (modify-phases %standard-phases
14311 (add-after 'unpack 'patch-test-requirements
14313 (substitute* "setup.py"
14314 ;; Our Python is new enough.
14315 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14318 `(("python-tox" ,python-tox)
14319 ("python-virtualenv" ,python-virtualenv)))
14320 (home-page "https://github.com/k-bx/python-semver")
14321 (synopsis "Python helper for Semantic Versioning")
14322 (description "This package provides a Python library for
14323 @url{Semantic Versioning, http://semver.org/}.")
14324 (license license:bsd-3)))
14326 (define-public python2-semver
14327 (package-with-python2 python-semver))
14329 (define-public python-pyro4
14331 (name "python-pyro4")
14336 (uri (pypi-uri "Pyro4" version))
14338 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14339 (build-system python-build-system)
14341 '(#:tests? #f)) ;FIXME: Some tests require network access.
14343 `(("python-cloudpickle" ,python-cloudpickle)
14344 ("python-dill" ,python-dill)
14345 ("python-msgpack" ,python-msgpack)))
14347 `(("python-serpent" ,python-serpent)))
14348 (home-page "https://pyro4.readthedocs.io")
14349 (synopsis "Distributed object middleware for Python")
14351 "Pyro enables you to build applications in which objects can talk to each
14352 other over the network. You can just use normal Python method calls to call
14353 objects on other machines, also known as remote procedure calls (RPC).")
14354 (license license:expat)))
14356 (define-public python2-pyro
14358 (name "python2-pyro")
14363 (uri (pypi-uri "Pyro" version))
14364 (file-name (string-append "Pyro-" version ".tar.gz"))
14367 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14368 (build-system python-build-system)
14370 ;; Pyro is not compatible with Python 3
14371 `(#:python ,python-2
14372 ;; Pyro has no test cases for automatic execution
14374 (home-page "http://pythonhosted.org/Pyro/")
14375 (synopsis "Distributed object manager for Python")
14376 (description "Pyro is a Distributed Object Technology system
14377 written in Python that is designed to be easy to use. It resembles
14378 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14379 which is a system and language independent Distributed Object Technology
14380 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14381 longer maintained. New projects should use Pyro4 instead, which
14382 is the new Pyro version that is actively developed.")
14383 (license license:expat)))
14385 (define-public python2-scientific
14387 (name "python2-scientific")
14392 (uri (string-append "https://bitbucket.org/khinsen/"
14393 "scientificpython/downloads/ScientificPython-"
14394 version ".tar.gz"))
14395 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14398 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14399 (build-system python-build-system)
14401 `(("netcdf" ,netcdf)))
14403 `(("python-numpy" ,python2-numpy-1.8)
14404 ("python-pyro" ,python2-pyro)))
14406 ;; ScientificPython is not compatible with Python 3
14407 `(#:python ,python-2
14408 #:tests? #f ; No test suite
14410 (modify-phases %standard-phases
14412 (lambda* (#:key inputs #:allow-other-keys)
14413 (invoke "python" "setup.py" "build"
14414 (string-append "--netcdf_prefix="
14415 (assoc-ref inputs "netcdf"))))))))
14416 (home-page "https://bitbucket.org/khinsen/scientificpython")
14417 (synopsis "Python modules for scientific computing")
14418 (description "ScientificPython is a collection of Python modules that are
14419 useful for scientific computing. Most modules are rather general (Geometry,
14420 physical units, automatic derivatives, ...) whereas others are more
14421 domain-specific (e.g. netCDF and PDB support). The library is currently
14422 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14423 (license license:cecill-c)))
14425 (define-public python2-mmtk
14427 (name "python2-mmtk")
14432 (uri (string-append "https://bitbucket.org/khinsen/"
14433 "mmtk/downloads/MMTK-" version ".tar.gz"))
14434 (file-name (string-append "MMTK-" version ".tar.gz"))
14437 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14438 (build-system python-build-system)
14440 `(("netcdf" ,netcdf)))
14442 `(("python-scientific" ,python2-scientific)
14443 ("python-tkinter" ,python-2 "tk")))
14445 `(#:python ,python-2
14448 (modify-phases %standard-phases
14449 (add-before 'build 'includes-from-scientific
14450 (lambda* (#:key inputs #:allow-other-keys)
14451 (mkdir-p "Include/Scientific")
14454 (assoc-ref inputs "python-scientific")
14455 "/include/python2.7/Scientific")
14456 "Include/Scientific"))))))
14457 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14458 (synopsis "Python library for molecular simulation")
14459 (description "MMTK is a library for molecular simulations with an emphasis
14460 on biomolecules. It provides widely used methods such as Molecular Dynamics
14461 and normal mode analysis, but also basic routines for implementing new methods
14462 for simulation and analysis. The library is currently not actively maintained
14463 and works only with Python 2 and NumPy < 1.9.")
14464 (license license:cecill-c)))
14466 (define-public python-phonenumbers
14468 (name "python-phonenumbers")
14473 (uri (pypi-uri "phonenumbers" version))
14476 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14477 (build-system python-build-system)
14479 "https://github.com/daviddrysdale/python-phonenumbers")
14481 "Python library for dealing with international phone numbers")
14483 "This package provides a Python port of Google's libphonenumber library.")
14484 (license license:asl2.0)))
14486 (define-public python2-phonenumbers
14487 (package-with-python2 python-phonenumbers))
14489 (define-public python-send2trash
14491 (name "python-send2trash")
14494 (origin (method git-fetch)
14495 ;; Source tarball on PyPI doesn't include tests.
14496 (uri (git-reference
14497 (url "https://github.com/hsoft/send2trash.git")
14499 (file-name (git-file-name name version))
14502 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14503 (build-system python-build-system)
14506 (modify-phases %standard-phases
14507 (add-before 'check 'pre-check
14509 (mkdir-p "/tmp/foo")
14510 (setenv "HOME" "/tmp/foo")
14512 (home-page "https://github.com/hsoft/send2trash")
14513 (synopsis "Send files to the user's @file{~/Trash} directory")
14514 (description "This package provides a Python library to send files to the
14515 user's @file{~/Trash} directory.")
14516 (properties `((python2-variant . ,(delay python2-send2trash))))
14517 (license license:bsd-3)))
14519 (define-public python2-send2trash
14521 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14523 (substitute-keyword-arguments (package-arguments python-send2trash)
14525 `(modify-phases ,phases
14526 (add-before 'check 'setenv
14528 (setenv "PYTHONPATH"
14529 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14532 (define-public python-yapf
14534 (name "python-yapf")
14539 (uri (pypi-uri "yapf" version))
14542 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14543 (build-system python-build-system)
14544 (home-page "https://github.com/google/yapf")
14545 (synopsis "Formatter for Python code")
14546 (description "YAPF is a formatter for Python code. It's based off of
14547 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14548 takes the code and reformats it to the best formatting that conforms to the
14549 style guide, even if the original code didn't violate the style guide.")
14550 (license license:asl2.0)))
14552 (define-public python2-yapf
14553 (package-with-python2 python-yapf))
14555 (define-public python-gyp
14556 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14559 (name "python-gyp")
14560 ;; Google does not release versions,
14561 ;; based on second most recent commit date.
14562 (version (git-version "0.0.0" revision commit))
14565 ;; Google does not release tarballs,
14566 ;; git checkout is needed.
14568 (uri (git-reference
14569 (url "https://chromium.googlesource.com/external/gyp")
14571 (file-name (git-file-name name version))
14574 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14575 (build-system python-build-system)
14576 (home-page "https://gyp.gsrc.io/")
14577 (synopsis "GYP is a Meta-Build system")
14579 "GYP builds build systems for large, cross platform applications.
14580 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14581 files, and Makefiles.")
14582 (license license:bsd-3))))
14584 (define-public python2-gyp
14585 (package-with-python2 python-gyp))
14587 (define-public python-whatever
14589 (name "python-whatever")
14594 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14598 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14599 (file-name (string-append name "-" version ".tar.gz"))))
14600 (build-system python-build-system)
14603 (modify-phases %standard-phases
14606 (invoke "py.test"))))))
14608 `(("python-pytest" ,python-pytest)))
14609 (home-page "http://github.com/Suor/whatever")
14610 (synopsis "Make anonymous functions by partial application of operators")
14611 (description "@code{whatever} provides an easy way to make anonymous
14612 functions by partial application of operators.")
14613 (license license:bsd-3)))
14615 (define-public python2-whatever
14616 (package-with-python2 python-whatever))
14618 (define-public python-funcy
14620 (name "python-funcy")
14625 (uri (git-reference
14626 (url "https://github.com/Suor/funcy.git")
14629 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14630 (file-name (git-file-name name version))))
14631 (build-system python-build-system)
14634 (modify-phases %standard-phases
14637 (invoke "py.test"))))))
14639 `(("python-pytest" ,python-pytest)
14640 ("python-whatever" ,python-whatever)))
14641 (home-page "http://github.com/Suor/funcy")
14642 (synopsis "Functional tools")
14643 (description "@code{funcy} is a library that provides functional tools.
14646 @item merge - Merges collections of the same type
14647 @item walk - Type-preserving map
14648 @item select - Selects a part of a collection
14649 @item take - Takes the first n items of a collection
14650 @item first - Takes the first item of a collection
14651 @item remove - Predicated-removes items of a collection
14652 @item concat - Concatenates two collections
14653 @item flatten - Flattens a collection with subcollections
14654 @item distinct - Returns only distinct items
14655 @item split - Predicated-splits a collection
14656 @item split_at - Splits a collection at a given item
14657 @item group_by - Groups items by group
14658 @item pairwise - Pairs off adjacent items
14659 @item partial - Partially-applies a function
14660 @item curry - Curries a function
14661 @item compose - Composes functions
14662 @item complement - Complements a predicate
14663 @item all_fn - \"all\" with predicate
14665 (license license:bsd-3)))
14667 (define-public python2-funcy
14668 (package-with-python2 python-funcy))
14670 (define-public python-isoweek
14672 (name "python-isoweek")
14677 (uri (pypi-uri "isoweek" version))
14680 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14681 (build-system python-build-system)
14682 (home-page "https://github.com/gisle/isoweek")
14683 (synopsis "Objects representing a week")
14684 (description "The @code{isoweek} module provide the class Week that
14685 implements the week definition of ISO 8601. This standard also defines
14686 a notation for identifying weeks; yyyyWww (where the W is a literal).
14687 Week instances stringify to this form.")
14688 (license license:bsd-3)))
14690 (define-public python2-isoweek
14691 (package-with-python2 python-isoweek))
14693 (define-public python-tokenize-rt
14695 (name "python-tokenize-rt")
14700 (uri (pypi-uri "tokenize-rt" version))
14703 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14704 (build-system python-build-system)
14705 (home-page "https://github.com/asottile/tokenize-rt")
14706 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14708 "This Python library is a wrapper around @code{tokenize} from the Python
14709 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14710 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14711 and @code{tokens_to_src} to roundtrip.")
14712 (license license:expat)))
14714 (define-public python-future-fstrings
14716 (name "python-future-fstrings")
14721 (uri (pypi-uri "future_fstrings" version))
14724 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14725 (build-system python-build-system)
14727 `(("python-tokenize-rt" ,python-tokenize-rt)))
14728 (home-page "https://github.com/asottile/future-fstrings")
14729 (synopsis "Backport of fstrings to Python < 3.6")
14731 "This package provides a UTF-8 compatible encoding
14732 @code{future_fstrings}, which performs source manipulation. It decodes the
14733 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14734 @code{f} strings.")
14735 (license license:expat)))
14737 (define-public python-typed-ast
14739 (name "python-typed-ast")
14744 (uri (git-reference
14745 (url "https://github.com/python/typed_ast.git")
14748 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14749 (file-name (git-file-name name version))))
14750 (build-system python-build-system)
14752 `(#:modules ((guix build utils)
14753 (guix build python-build-system)
14758 (modify-phases %standard-phases
14761 (let ((cwd (getcwd)))
14762 (setenv "PYTHONPATH"
14763 (string-append cwd "/build/"
14764 (find (cut string-prefix? "lib" <>)
14765 (scandir (string-append cwd "/build")))
14767 (getenv "PYTHONPATH"))))
14770 (native-inputs `(("python-pytest" ,python-pytest)))
14771 (home-page "https://github.com/python/typed_ast")
14772 (synopsis "Fork of Python @code{ast} modules with type comment support")
14773 (description "This package provides a parser similar to the standard
14774 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14775 include PEP 484 type comments and are independent of the version of Python
14776 under which they are run. The @code{typed_ast} parsers produce the standard
14777 Python AST (plus type comments), and are both fast and correct, as they are
14778 based on the CPython 2.7 and 3.7 parsers.")
14779 ;; See the file "LICENSE" for the details.
14780 (license (list license:psfl
14782 license:expat)))) ;ast27/Parser/spark.py
14784 (define-public python-typing
14786 (name "python-typing")
14791 (uri (pypi-uri "typing" version))
14794 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14795 (build-system python-build-system)
14796 (home-page "https://docs.python.org/3/library/typing.html")
14797 (synopsis "Type hints for Python")
14798 (description "This is a backport of the standard library @code{typing}
14799 module to Python versions older than 3.5. Typing defines a standard notation
14800 for Python function and variable type annotations. The notation can be used
14801 for documenting code in a concise, standard format, and it has been designed
14802 to also be used by static and runtime type checkers, static analyzers, IDEs
14804 (license license:psfl)))
14806 (define-public python2-typing
14807 (package-with-python2 python-typing))
14809 (define-public python-typing-extensions
14811 (name "python-typing-extensions")
14816 (uri (pypi-uri "typing_extensions" version))
14819 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14820 (build-system python-build-system)
14822 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14823 (synopsis "Experimental type hints for Python")
14825 "The typing_extensions module contains additional @code{typing} hints not
14826 yet present in the of the @code{typing} standard library.
14827 Included are implementations of:
14830 @item ContextManager
14841 @item TYPE_CHECKING
14842 @item AsyncGenerator
14844 (license license:psfl)))
14846 (define-public bpython
14853 (uri (pypi-uri "bpython" version))
14855 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14856 (build-system python-build-system)
14859 (modify-phases %standard-phases
14860 (add-after 'unpack 'remove-failing-test
14862 ;; Remove failing test. FIXME: make it pass
14863 (delete-file "bpython/test/test_args.py")
14865 (add-after 'wrap 'add-aliases
14866 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14867 (lambda* (#:key outputs #:allow-other-keys)
14868 (let ((out (assoc-ref outputs "out")))
14871 (symlink old (string-append out "/bin/" new)))
14872 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14873 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14876 `(("python-pygments" ,python-pygments)
14877 ("python-requests" ,python-requests)
14878 ("python-babel" ,python-babel) ; optional, for internationalization
14879 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14880 ("python-greenlet" ,python-greenlet)
14881 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14882 ("python-six" ,python-six)))
14884 `(("python-sphinx" ,python-sphinx)
14885 ("python-mock" ,python-mock)))
14886 (home-page "https://bpython-interpreter.org/")
14887 (synopsis "Fancy interface to the Python interpreter")
14888 (description "Bpython is a fancy interface to the Python
14889 interpreter. bpython's main features are
14892 @item in-line syntax highlighting,
14893 @item readline-like autocomplete with suggestions displayed as you type,
14894 @item expected parameter list for any Python function,
14895 @item \"rewind\" function to pop the last line of code from memory and
14897 @item send the code you've entered off to a pastebin,
14898 @item save the code you've entered to a file, and
14899 @item auto-indentation.
14901 (license license:expat)))
14903 (define-public bpython2
14904 (let ((base (package-with-python2
14905 (strip-python2-variant bpython))))
14906 (package (inherit base)
14909 `(#:python ,python-2
14911 (modify-phases %standard-phases
14912 (add-after 'unpack 'remove-failing-test
14914 ;; Remove failing test. FIXME: make it pass
14915 (delete-file "bpython/test/test_args.py")
14916 ;; Disable failing test-cases (renaming inhibits they are
14918 (substitute* "bpython/test/test_curtsies_repl.py"
14919 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14920 (string-append a "xxx_off_" b))
14921 (("^(\\s*def )(test_complex\\W)" _ a b)
14922 (string-append a "xxx_off_" b)))
14924 (add-before 'build 'rename-scripts
14925 ;; rename the scripts to bypthon2, bpdb2, etc.
14927 (substitute* "setup.py"
14928 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14929 (string-append name "2" rest "\n"))
14930 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14931 (string-append name "2" (or sub "") rest "\n")))
14934 (define-public python-pyinotify
14936 (name "python-pyinotify")
14940 (uri (pypi-uri "pyinotify" version))
14943 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14944 (build-system python-build-system)
14945 (arguments `(#:tests? #f)) ;no tests
14946 (home-page "https://github.com/seb-m/pyinotify")
14947 (synopsis "Python library for monitoring inotify events")
14949 "@code{pyinotify} provides a Python interface for monitoring
14950 file system events on Linux.")
14951 (license license:expat)))
14953 (define-public python2-pyinotify
14954 (package-with-python2 python-pyinotify))
14956 ;; Ada parser uses this version.
14957 (define-public python2-quex-0.67.3
14959 (name "python2-quex")
14964 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14965 (version-major+minor version)
14966 "/quex-" version ".zip"))
14969 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14970 (build-system python-build-system)
14972 `(("unzip" ,unzip)))
14974 `(#:python ,python-2
14977 (modify-phases %standard-phases
14978 (delete 'configure)
14981 (lambda* (#:key outputs #:allow-other-keys)
14982 (let* ((out (assoc-ref outputs "out"))
14983 (share/quex (string-append out "/share/quex"))
14984 (bin (string-append out "/bin")))
14985 (copy-recursively "." share/quex)
14987 (symlink (string-append share/quex "/quex-exe.py")
14988 (string-append bin "/quex"))
14990 (native-search-paths
14991 (list (search-path-specification
14992 (variable "QUEX_PATH")
14993 (files '("share/quex")))))
14994 (home-page "http://quex.sourceforge.net/")
14995 (synopsis "Lexical analyzer generator in Python")
14996 (description "@code{quex} is a lexical analyzer generator in Python.")
14997 (license license:lgpl2.1+))) ; Non-military
14999 (define-public python2-quex
15000 (package (inherit python2-quex-0.67.3)
15001 (name "python2-quex")
15006 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15009 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15010 (file-name (string-append name "-" version ".tar.gz"))))))
15012 (define-public python-more-itertools
15014 (name "python-more-itertools")
15019 (uri (pypi-uri "more-itertools" version))
15022 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15023 (build-system python-build-system)
15024 (home-page "https://github.com/erikrose/more-itertools")
15025 (synopsis "More routines for operating on iterables, beyond itertools")
15026 (description "Python's built-in @code{itertools} module implements a
15027 number of iterator building blocks inspired by constructs from APL, Haskell,
15028 and SML. @code{more-itertools} includes additional building blocks for
15029 working with iterables.")
15030 (properties `((python2-variant . ,(delay python2-more-itertools))))
15031 (license license:expat)))
15033 ;; The 5.x series are the last versions supporting Python 2.7.
15034 (define-public python2-more-itertools
15036 (inherit python-more-itertools)
15037 (name "python2-more-itertools")
15041 (uri (pypi-uri "more-itertools" version))
15044 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15046 `(#:python ,python2-minimal))
15048 `(("python2-six" ,python2-six-bootstrap)))))
15050 (define-public python-latexcodec
15052 (name "python-latexcodec")
15057 (uri (pypi-uri "latexcodec" version))
15059 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
15060 (build-system python-build-system)
15062 `(("python-six" ,python-six)))
15063 (home-page "https://readthedocs.org/projects/latexcodec/")
15064 (synopsis "Work with LaTeX code in Python")
15065 (description "Lexer and codec to work with LaTeX code in Python.")
15066 (license license:expat)))
15068 (define-public python-pybtex
15070 (name "python-pybtex")
15075 (uri (pypi-uri "pybtex" version))
15077 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15078 (build-system python-build-system)
15080 `(("python-nose" ,python-nose)))
15082 `(("python-latexcodec" ,python-latexcodec)
15083 ("python-pyyaml" ,python-pyyaml)
15084 ("python-six" ,python-six)))
15086 `(#:test-target "nosetests"))
15087 (home-page "https://pybtex.org/")
15088 (synopsis "BibTeX-compatible bibliography processor")
15089 (description "Pybtex is a BibTeX-compatible bibliography processor written
15090 in Python. You can simply type pybtex instead of bibtex.")
15091 (license license:expat)))
15093 (define-public python-onetimepass
15095 (name "python-onetimepass")
15100 (uri (pypi-uri "onetimepass" version))
15102 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15103 (build-system python-build-system)
15104 (propagated-inputs `(("python-six" ,python-six)))
15105 (home-page "https://github.com/tadeck/onetimepass/")
15106 (synopsis "One-time password library")
15107 (description "Python one-time password library for HMAC-based (HOTP) and
15108 time-based (TOTP) passwords.")
15109 (license license:expat)))
15111 (define-public python-parso
15113 (name "python-parso")
15118 (uri (pypi-uri "parso" version))
15121 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15123 `(("python-pytest" ,python-pytest)))
15124 (build-system python-build-system)
15126 `(#:phases (modify-phases %standard-phases
15128 (lambda _ (invoke "pytest" "-vv"))))))
15129 (home-page "https://github.com/davidhalter/parso")
15130 (synopsis "Python Parser")
15131 (description "Parso is a Python parser that supports error recovery and
15132 round-trip parsing for different Python versions (in multiple Python versions).
15133 Parso is also able to list multiple syntax errors in your Python file.")
15134 (license license:expat)))
15136 (define-public python2-parso
15137 (package-with-python2 python-parso))
15139 (define-public python-async-generator
15141 (name "python-async-generator")
15146 (uri (pypi-uri "async_generator" version))
15149 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15150 (build-system python-build-system)
15152 `(("python-pytest" ,python-pytest)))
15153 (home-page "https://github.com/python-trio/async_generator")
15154 (synopsis "Async generators and context managers for Python 3.5+")
15155 (description "@code{async_generator} back-ports Python 3.6's native async
15156 generators and Python 3.7's context managers into Python 3.5.")
15158 (license (list license:expat license:asl2.0))))
15160 (define-public python-async-timeout
15162 (name "python-async-timeout")
15167 (uri (pypi-uri "async-timeout" version))
15170 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15171 (build-system python-build-system)
15172 (home-page "https://github.com/aio-libs/async_timeout/")
15173 (synopsis "Timeout context manager for asyncio programs")
15174 (description "@code{async-timeout} provides a timeout timeout context
15175 manager compatible with @code{asyncio}.")
15176 (license license:asl2.0)))
15178 (define-public python-glob2
15180 (name "python-glob2")
15185 (uri (git-reference
15186 (url "https://github.com/miracle2k/python-glob2.git")
15187 (commit (string-append "v" version))))
15188 (file-name (git-file-name name version))
15190 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15191 (build-system python-build-system)
15192 (home-page "https://github.com/miracle2k/python-glob2/")
15193 (synopsis "Extended Version of the python buildin glob module")
15194 (description "This is an extended version of the Python
15195 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15199 @item The ability to capture the text matched by glob patterns, and return
15200 those matches alongside the file names.
15201 @item A recursive @code{**} globbing syntax, akin for example to the
15202 @code{globstar} option of Bash.
15203 @item The ability to replace the file system functions used, in order to glob
15204 on virtual file systems.
15205 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15208 Glob2 currently based on the glob code from Python 3.3.1.")
15209 (license license:bsd-2)))
15211 (define-public python2-glob2
15212 (package-with-python2 python-glob2))
15214 (define-public python-gipc
15216 (name "python-gipc")
15221 (uri (pypi-uri "gipc" version ".zip"))
15224 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15225 (build-system python-build-system)
15227 `(("unzip" ,unzip)))
15229 `(("python-gevent" ,python-gevent)))
15230 (home-page "http://gehrcke.de/gipc")
15231 (synopsis "Child process management in the context of gevent")
15232 (description "Usage of Python's multiprocessing package in a
15233 gevent-powered application may raise problems. With @code{gipc},
15234 process-based child processes can safely be created anywhere within a
15235 gevent-powered application.")
15236 (license license:expat)))
15238 (define-public python2-gipc
15239 (package-with-python2 python-gipc))
15241 (define-public python-fusepy
15243 (name "python-fusepy")
15248 (uri (pypi-uri "fusepy" version))
15251 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15252 (build-system python-build-system)
15255 (modify-phases %standard-phases
15256 (add-before 'build 'set-library-file-name
15257 (lambda* (#:key inputs #:allow-other-keys)
15258 (let ((fuse (assoc-ref inputs "fuse")))
15259 (substitute* "fuse.py"
15260 (("find_library\\('fuse'\\)")
15261 (string-append "'" fuse "/lib/libfuse.so'")))
15265 (home-page "https://github.com/fusepy/fusepy")
15266 (synopsis "Simple ctypes bindings for FUSE")
15267 (description "Python module that provides a simple interface to FUSE and
15268 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15269 (license license:isc)))
15271 (define-public python2-fusepy
15272 (package-with-python2 python-fusepy))
15274 (define-public python2-gdrivefs
15276 (name "python2-gdrivefs")
15281 (uri (pypi-uri "gdrivefs" version))
15284 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15285 (build-system python-build-system)
15287 `(#:python ,python-2
15289 (modify-phases %standard-phases
15290 (add-before 'build 'patch-setup-py
15292 ;; Update requirements from dependency==version
15293 ;; to dependency>=version
15294 (substitute* "gdrivefs/resources/requirements.txt"
15298 `(("python2-gipc" ,python2-gipc)
15299 ("python2-gevent" ,python2-gevent)
15300 ("python2-greenlet" ,python2-greenlet)
15301 ("python2-httplib2" ,python2-httplib2)
15302 ("python2-uritemplate" ,python2-uritemplate)
15303 ("python2-oauth2client" ,python2-oauth2client)
15304 ("python2-six" ,python2-six)))
15306 `(("python2-dateutil" ,python2-dateutil)
15307 ("python2-fusepy" ,python2-fusepy)
15308 ("python2-google-api-client" ,python2-google-api-client)))
15309 (home-page "https://github.com/dsoprea/GDriveFS")
15310 (synopsis "Mount Google Drive as a local file system")
15311 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15312 under Python 2.7.")
15313 (license license:gpl2)))
15315 (define-public pybind11
15321 (uri (git-reference
15322 (url "https://github.com/pybind/pybind11.git")
15323 (commit (string-append "v" version))))
15326 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15327 (file-name (git-file-name name version))))
15328 (build-system cmake-build-system)
15330 `(("python" ,python)
15331 ("python-pytest" ,python-pytest)))
15333 `(#:test-target "check"))
15334 (home-page "https://github.com/pybind/pybind11/")
15335 (synopsis "Seamless operability between C++11 and Python")
15336 (description "pybind11 is a lightweight header-only library that exposes
15337 C++ types in Python and vice versa, mainly to create Python bindings of
15338 existing C++ code. Its goals and syntax are similar to the excellent
15339 Boost.Python library by David Abrahams: to minimize boilerplate code in
15340 traditional extension modules by inferring type information using compile-time
15342 (license license:expat)))
15344 (define-public python-fasteners
15346 (name "python-fasteners")
15351 (uri (pypi-uri "fasteners" version))
15354 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15355 (build-system python-build-system)
15357 `(("python-monotonic" ,python-monotonic)
15358 ("python-six" ,python-six)
15359 ("python-testtools" ,python-testtools)))
15360 (home-page "https://github.com/harlowja/fasteners")
15361 (synopsis "Python package that provides useful locks")
15363 "This package provides a Python program that provides following locks:
15366 @item Locking decorator
15367 @item Reader-writer locks
15368 @item Inter-process locks
15369 @item Generic helpers
15371 (properties `((python2-variant . ,(delay python2-fasteners))))
15372 (license license:asl2.0)))
15374 (define-public python2-fasteners
15375 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15379 `(("python2-futures" ,python2-futures)
15380 ,@(package-propagated-inputs base))))))
15382 (define-public python-requests-file
15384 (name "python-requests-file")
15389 (uri (pypi-uri "requests-file" version))
15392 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15393 (build-system python-build-system)
15395 `(("python-requests" ,python-requests)
15396 ("python-six" ,python-six)))
15398 "https://github.com/dashea/requests-file")
15399 (synopsis "File transport adapter for Requests")
15401 "Requests-File is a transport adapter for use with the Requests Python
15402 library to allow local file system access via @code{file://} URLs.")
15403 (license license:asl2.0)))
15405 (define-public python2-requests-file
15406 (package-with-python2 python-requests-file))
15408 (define-public python-tldextract
15410 (name "python-tldextract")
15415 (uri (pypi-uri "tldextract" version))
15418 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15419 (build-system python-build-system)
15421 `(("python-pytest" ,python-pytest)
15422 ("python-responses" ,python-responses)))
15424 `(("python-idna" ,python-idna)
15425 ("python-requests" ,python-requests)
15426 ("python-requests-file" ,python-requests-file)))
15428 "https://github.com/john-kurkowski/tldextract")
15430 "Separate the TLD from the registered domain and subdomains of a URL")
15432 "TLDExtract accurately separates the TLD from the registered domain and
15433 subdomains of a URL, using the Public Suffix List. By default, this includes
15434 the public ICANN TLDs and their exceptions. It can optionally support the
15435 Public Suffix List's private domains as well.")
15436 (license license:bsd-3)))
15438 (define-public python2-tldextract
15439 (package-with-python2 python-tldextract))
15441 (define-public python-pynamecheap
15443 (name "python-pynamecheap")
15448 (uri (pypi-uri "PyNamecheap" version))
15451 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15452 (build-system python-build-system)
15454 `(("python-requests" ,python-requests)))
15456 "https://github.com/Bemmu/PyNamecheap")
15458 "Namecheap API client in Python")
15460 "PyNamecheap is a Namecheap API client in Python.")
15461 (license license:expat)))
15463 (define-public python2-pynamecheap
15464 (package-with-python2 python-pynamecheap))
15466 (define-public python-dns-lexicon
15468 (name "python-dns-lexicon")
15473 (uri (pypi-uri "dns-lexicon" version))
15476 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15477 (build-system python-build-system)
15479 `(#:tests? #f)) ;requires internet access
15481 `(("python-future" ,python-future)
15482 ("python-pynamecheap" ,python-pynamecheap)
15483 ("python-requests" ,python-requests)
15484 ("python-tldextract" ,python-tldextract)
15485 ("python-urllib3" ,python-urllib3)))
15486 (home-page "https://github.com/AnalogJ/lexicon")
15488 "Manipulate DNS records on various DNS providers")
15490 "Lexicon provides a way to manipulate DNS records on multiple DNS
15491 providers in a standardized way. It has a CLI but it can also be used as a
15492 Python library. It was designed to be used in automation, specifically with
15494 (license license:expat)))
15496 (define-public python2-dns-lexicon
15497 (package-with-python2 python-dns-lexicon))
15499 (define-public python-commandlines
15501 (name "python-commandlines")
15506 (uri (pypi-uri "commandlines" version))
15509 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15510 (build-system python-build-system)
15511 (home-page "https://github.com/chrissimpkins/commandlines")
15512 (synopsis "Command line argument to object parsing library")
15514 "@code{Commandlines} is a Python library for command line application
15515 development that supports command line argument parsing, command string
15516 validation testing and application logic.")
15517 (license license:expat)))
15519 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15520 ;; python-numba. They have a very unflexible relationship.
15521 (define-public python-numba
15523 (name "python-numba")
15528 (uri (pypi-uri "numba" version))
15531 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15532 (build-system python-build-system)
15534 `(#:modules ((guix build utils)
15535 (guix build python-build-system)
15540 (modify-phases %standard-phases
15541 (add-after 'unpack 'disable-proprietary-features
15543 (setenv "NUMBA_DISABLE_HSA" "1")
15544 (setenv "NUMBA_DISABLE_CUDA" "1")
15546 (add-after 'unpack 'remove-failing-tests
15548 ;; FIXME: these tests fail for unknown reasons:
15549 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15550 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15551 (substitute* "numba/tests/test_dispatcher.py"
15552 (("def test(_non_writable_pycache)" _ m)
15553 (string-append "def guix_skip" m))
15554 (("def test(_non_creatable_pycache)" _ m)
15555 (string-append "def guix_skip" m))
15556 (("def test(_frozen)" _ m)
15557 (string-append "def guix_skip" m)))
15559 ;; These tests fail because we don't run the tests from the build
15560 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15561 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15562 (substitute* "numba/tests/test_pycc.py"
15563 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15564 (string-append "def guix_skip" m)))
15568 (let ((cwd (getcwd)))
15569 (setenv "PYTHONPATH"
15570 (string-append cwd "/build/"
15571 (find (cut string-prefix? "lib" <>)
15572 (scandir (string-append cwd "/build")))
15574 (getenv "PYTHONPATH")))
15575 ;; Something is wrong with the PYTHONPATH when running the
15576 ;; tests from the build directory, as it complains about not being
15577 ;; able to import certain modules.
15578 (with-directory-excursion "/tmp"
15579 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15582 `(("python-llvmlite" ,python-llvmlite)
15583 ("python-numpy" ,python-numpy)
15584 ("python-singledispatch" ,python-singledispatch)))
15585 ;; Needed for tests.
15587 `(("python-jinja2" ,python-jinja2)
15588 ("python-pygments" ,python-pygments)))
15589 (home-page "https://numba.pydata.org")
15590 (synopsis "Compile Python code using LLVM")
15591 (description "Numba gives you the power to speed up your applications with
15592 high performance functions written directly in Python. With a few
15593 annotations, array-oriented and math-heavy Python code can be just-in-time
15594 compiled to native machine instructions, similar in performance to C, C++ and
15595 Fortran, without having to switch languages or Python interpreters.
15597 Numba works by generating optimized machine code using the LLVM compiler
15598 infrastructure at import time, runtime, or statically (using the included pycc
15600 (license license:bsd-3)))
15602 (define-public python-anndata
15604 (name "python-anndata")
15609 (uri (pypi-uri "anndata" version))
15612 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15613 (build-system python-build-system)
15615 `(("python-h5py" ,python-h5py)
15616 ("python-natsort" ,python-natsort)
15617 ("python-pandas" ,python-pandas)
15618 ("python-scipy" ,python-scipy)))
15619 (home-page "https://github.com/theislab/anndata")
15620 (synopsis "Annotated data for data analysis pipelines")
15621 (description "Anndata is a package for simple (functional) high-level APIs
15622 for data analysis pipelines. In this context, it provides an efficient,
15623 scalable way of keeping track of data together with learned annotations and
15624 reduces the code overhead typically encountered when using a mostly
15625 object-oriented library such as @code{scikit-learn}.")
15626 (license license:bsd-3)))
15628 (define-public python-dill
15630 (name "python-dill")
15635 (uri (pypi-uri "dill" version))
15637 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15638 (build-system python-build-system)
15639 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15640 (arguments '(#:tests? #f))
15641 (home-page "https://pypi.org/project/dill")
15642 (synopsis "Serialize all of Python")
15643 (description "Dill extends Python's @code{pickle} module for serializing
15644 and de-serializing Python objects to the majority of the built-in Python
15645 types. Dill provides the user the same interface as the @code{pickle} module,
15646 and also includes some additional features. In addition to pickling Python
15647 objects, @code{dill} provides the ability to save the state of an interpreter
15648 session in a single command. Hence, it would be feasible to save a
15649 interpreter session, close the interpreter, ship the pickled file to another
15650 computer, open a new interpreter, unpickle the session and thus continue from
15651 the saved state of the original interpreter session.")
15652 (license license:bsd-3)))
15654 (define-public python-multiprocess
15656 (name "python-multiprocess")
15657 (version "0.70.6.1")
15661 (uri (pypi-uri "multiprocess" version))
15664 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15665 (build-system python-build-system)
15667 `(("python-dill" ,python-dill)))
15668 (home-page "https://pypi.org/project/multiprocess")
15669 (synopsis "Multiprocessing and multithreading in Python")
15671 "This package is a fork of the multiprocessing Python package, a package
15672 which supports the spawning of processes using the API of the standard
15673 library's @code{threading} module.")
15674 (license license:bsd-3)))
15676 (define-public python-toolz
15678 (name "python-toolz")
15683 (uri (pypi-uri "toolz" version))
15686 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15687 (build-system python-build-system)
15688 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15689 ;; unregistered loader type"
15690 (arguments '(#:tests? #f))
15691 (home-page "https://github.com/pytoolz/toolz/")
15692 (synopsis "List processing tools and functional utilities")
15694 "This package provides a set of utility functions for iterators,
15695 functions, and dictionaries.")
15696 (license license:bsd-3)))
15698 (define-public python2-toolz
15699 (package-with-python2 python-toolz))
15701 (define-public python-cytoolz
15703 (name "python-cytoolz")
15704 (version "0.9.0.1")
15708 (uri (pypi-uri "cytoolz" version))
15711 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15712 (build-system python-build-system)
15713 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15715 (arguments '(#:tests? #f))
15717 `(("python-toolz" ,python-toolz)))
15719 `(("python-cython" ,python-cython)))
15720 (home-page "https://github.com/pytoolz/cytoolz")
15721 (synopsis "High performance functional utilities")
15723 "The cytoolz package implements the same API as provided by toolz. The
15724 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15725 that is accessible to other projects developed in Cython.")
15726 (license license:bsd-3)))
15728 (define-public python-sortedcontainers
15730 (name "python-sortedcontainers")
15735 (uri (pypi-uri "sortedcontainers" version))
15738 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15739 (build-system python-build-system)
15741 `(("python-tox" ,python-tox)))
15742 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15743 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15745 "This package provides a sorted collections library, written in
15747 (license license:asl2.0)))
15749 (define-public python-cloudpickle
15751 (name "python-cloudpickle")
15756 (uri (pypi-uri "cloudpickle" version))
15759 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15760 (build-system python-build-system)
15761 ;; FIXME: there are 5 errors in 122 tests:
15762 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15763 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15764 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15765 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15766 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15767 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15768 (arguments '(#:tests? #f))
15770 `(("python-pytest" ,python-pytest)
15771 ("python-mock" ,python-mock)
15772 ("python-tornado" ,python-tornado)))
15773 (home-page "https://github.com/cloudpipe/cloudpickle")
15774 (synopsis "Extended pickling support for Python objects")
15776 "Cloudpickle makes it possible to serialize Python constructs not
15777 supported by the default pickle module from the Python standard library. It
15778 is especially useful for cluster computing where Python expressions are
15779 shipped over the network to execute on remote hosts, possibly close to the
15781 (license license:bsd-3)))
15783 (define-public python2-cloudpickle
15784 (package-with-python2 python-cloudpickle))
15786 (define-public python-locket
15788 (name "python-locket")
15793 (uri (pypi-uri "locket" version))
15796 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15797 (build-system python-build-system)
15798 (home-page "https://github.com/mwilliamson/locket.py")
15799 (synopsis "File-based locks for Python")
15801 "Locket implements a lock that can be used by multiple processes provided
15802 they use the same path.")
15803 (license license:bsd-2)))
15805 (define-public python2-locket
15806 (package-with-python2 python-locket))
15808 (define-public python-blosc
15810 (name "python-blosc")
15815 (uri (pypi-uri "blosc" version))
15818 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15819 (build-system python-build-system)
15820 ;; FIXME: all tests pass, but then this error is printed:
15821 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15822 (arguments '(#:tests? #f))
15824 `(("python-numpy" ,python-numpy)))
15825 (home-page "https://github.com/blosc/python-blosc")
15826 (synopsis "Python wrapper for the Blosc data compressor library")
15827 (description "Blosc is a high performance compressor optimized for binary
15828 data. It has been designed to transmit data to the processor cache faster
15829 than the traditional, non-compressed, direct memory fetch approach via a
15830 @code{memcpy()} system call.
15832 Blosc works well for compressing numerical arrays that contains data with
15833 relatively low entropy, like sparse data, time series, grids with
15834 regular-spaced values, etc.
15836 This Python package wraps the Blosc library.")
15837 (license license:bsd-3)))
15839 (define-public python2-blosc
15840 (package-with-python2 python-blosc))
15842 (define-public python-partd
15844 (name "python-partd")
15849 (uri (pypi-uri "partd" version))
15852 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15853 (build-system python-build-system)
15855 `(("python-blosc" ,python-blosc)
15856 ("python-locket" ,python-locket)
15857 ("python-numpy" ,python-numpy)
15858 ("python-pandas" ,python-pandas)
15859 ("python-pyzmq" ,python-pyzmq)
15860 ("python-toolz" ,python-toolz)))
15861 (home-page "https://github.com/dask/partd/")
15862 (synopsis "Appendable key-value storage")
15863 (description "Partd stores key-value pairs. Values are raw bytes. We
15864 append on old values. Partd excels at shuffling operations.")
15865 (license license:bsd-3)))
15867 (define-public python2-partd
15868 (package-with-python2 python-partd))
15870 (define-public python-dask
15872 (name "python-dask")
15877 (uri (pypi-uri "dask" version))
15879 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15880 (build-system python-build-system)
15881 ;; A single test out of 5000+ fails. This test is marked as xfail when
15882 ;; pytest-xdist is used.
15885 (modify-phases %standard-phases
15886 (add-after 'unpack 'disable-broken-test
15888 (substitute* "dask/tests/test_threaded.py"
15889 (("def test_interrupt\\(\\)" m)
15890 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15892 (when (which "python2")
15893 ;; This test fails with recent Pandas:
15894 ;; <https://github.com/dask/dask/issues/3794>.
15895 (substitute* "dask/dataframe/tests/test_dataframe.py"
15896 (("def test_info\\(\\)" m)
15897 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15901 (lambda _ (invoke "pytest" "-vv"))))))
15903 `(("python-cloudpickle" ,python-cloudpickle)
15904 ("python-numpy" ,python-numpy)
15905 ("python-pandas" ,python-pandas)
15906 ("python-partd" ,python-partd)
15907 ("python-toolz" ,python-toolz)
15908 ("python-pyyaml" ,python-pyyaml)))
15910 `(("python-pytest" ,python-pytest)
15911 ("python-pytest-runner" ,python-pytest-runner)))
15912 (home-page "https://github.com/dask/dask/")
15913 (synopsis "Parallel computing with task scheduling")
15915 "Dask is a flexible parallel computing library for analytics. It
15916 consists of two components: dynamic task scheduling optimized for computation,
15917 and large data collections like parallel arrays, dataframes, and lists that
15918 extend common interfaces like NumPy, Pandas, or Python iterators to
15919 larger-than-memory or distributed environments. These parallel collections
15920 run on top of the dynamic task schedulers. ")
15921 (license license:bsd-3)))
15923 (define-public python2-dask
15924 (package-with-python2 python-dask))
15926 (define-public python-ilinkedlist
15928 (name "python-ilinkedlist")
15933 (uri (pypi-uri "ilinkedlist" version))
15936 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15937 (build-system python-build-system)
15938 (native-inputs `(("python-pytest" ,python-pytest)))
15939 (inputs `(("python" ,python)))
15940 (home-page "https://github.com/luther9/ilinkedlist-py")
15941 (synopsis "Immutable linked list library")
15943 "This is a implementation of immutable linked lists for Python. It
15944 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15945 Since a linked list is treated as immutable, it is hashable, and its length
15946 can be retrieved in constant time. Some of the terminology is inspired by
15947 LISP. It is possible to create an improper list by creating a @code{Pair}
15948 with a non-list @code{cdr}.")
15949 (license license:gpl3+)))
15951 (define-public python-readlike
15953 (name "python-readlike")
15958 (uri (pypi-uri "readlike" version))
15960 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15961 (build-system python-build-system)
15962 (home-page "https://github.com/jangler/readlike")
15963 (synopsis "GNU Readline-like line editing module")
15965 "This Python module provides line editing functions similar to the default
15966 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15967 @code{readline} package, this one allows access to those capabilties in settings
15968 outside of a standard command-line interface. It is especially well-suited to
15969 interfacing with Urwid, due to a shared syntax for describing key inputs.
15971 Currently, all stateless Readline commands are implemented. Yanking and history
15972 are not supported.")
15973 (license license:expat)))
15975 (define-public python2-readlike
15976 (package-with-python2 python-readlike))
15978 (define-public python-reparser
15980 (name "python-reparser")
15985 (uri (pypi-uri "ReParser" version))
15987 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15988 (build-system python-build-system)
15989 (home-page "https://github.com/xmikos/reparser")
15990 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15992 "This Python library provides a simple lexer/parser for inline markup based
15993 on regular expressions.")
15994 (license license:expat)))
15996 (define-public python2-reparser
15997 (let ((reparser (package-with-python2
15998 (strip-python2-variant python-reparser))))
15999 (package (inherit reparser)
16001 `(("python2-enum34" ,python2-enum34)
16002 ,@(package-propagated-inputs reparser))))))
16004 (define-public python-precis-i18n
16006 (name "python-precis-i18n")
16011 (uri (pypi-uri "precis_i18n" version))
16014 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16015 (build-system python-build-system)
16016 (home-page "https://github.com/byllyfish/precis_i18n")
16017 (synopsis "Implementation of the PRECIS framework")
16019 "This module implements the PRECIS Framework as described in RFC 8264,
16020 RFC 8265 and RFC 8266.")
16021 (license license:expat)))
16023 (define-public python-absl-py
16025 (name "python-absl-py")
16030 (uri (pypi-uri "absl-py" version))
16033 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16034 (build-system python-build-system)
16036 `(("python-six" ,python-six)))
16037 (home-page "https://github.com/abseil/abseil-py")
16038 (synopsis "Abseil Python common libraries")
16040 "This package provides the Abseil Python Common Libraries, a collection
16041 of Python libraries for building Python applications.")
16042 (license license:asl2.0)))
16044 (define-public python-astor
16046 (name "python-astor")
16051 (uri (pypi-uri "astor" version))
16054 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16055 (build-system python-build-system)
16056 ;; FIXME: There are two errors and two test failures.
16057 (arguments `(#:tests? #f))
16058 (home-page "https://github.com/berkerpeksag/astor")
16059 (synopsis "Read and write Python ASTs")
16060 (description "Astor is designed to allow easy manipulation of Python
16061 source via the Abstract Syntax Tree.")
16062 (license license:bsd-3)))
16064 (define-public python2-astor
16065 (package-with-python2 python-astor))
16067 (define-public python-grpcio
16069 (name "python-grpcio")
16074 (uri (pypi-uri "grpcio" version))
16077 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16078 (build-system python-build-system)
16080 `(("python-six" ,python-six)))
16081 (home-page "https://grpc.io")
16082 (synopsis "HTTP/2-based RPC framework")
16083 (description "This package provides a Python library for communicating
16084 with the HTTP/2-based RPC framework gRPC.")
16085 (license license:asl2.0)))
16087 (define-public python-astunparse
16089 (name "python-astunparse")
16094 (uri (pypi-uri "astunparse" version))
16096 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16097 (build-system python-build-system)
16098 (arguments '(#:tests? #f)) ; there are none
16100 `(("python-six" ,python-six)
16101 ("python-wheel" ,python-wheel)))
16102 (home-page "https://github.com/simonpercivall/astunparse")
16103 (synopsis "AST unparser for Python")
16104 (description "This package provides an AST unparser for Python. It is a
16105 factored out version of @code{unparse} found in the Python source
16107 (license license:bsd-3)))
16109 (define-public python-gast
16111 (name "python-gast")
16116 (uri (pypi-uri "gast" version))
16118 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16119 (build-system python-build-system)
16121 `(("python-astunparse" ,python-astunparse)))
16122 (home-page "https://pypi.org/project/gast/")
16123 (synopsis "Generic Python AST that abstracts the underlying Python version")
16125 "GAST provides a compatibility layer between the AST of various Python
16126 versions, as produced by @code{ast.parse} from the standard @code{ast}
16128 (license license:bsd-3)))
16130 (define-public python-wikidata
16132 (name "python-wikidata")
16137 (uri (pypi-uri "Wikidata" version))
16140 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16141 (build-system python-build-system)
16143 `(("python-babel" ,python-babel)))
16144 (home-page "https://github.com/dahlia/wikidata")
16145 (synopsis "Wikidata client library")
16147 "This package provides a Python interface to
16148 @url{https://www.wikidata.org/, Wikidata}.")
16149 (properties '((upstream-name . "Wikidata")))
16150 (license license:gpl3+)))
16152 (define-public python-doctest-ignore-unicode
16154 (name "python-doctest-ignore-unicode")
16159 (uri (pypi-uri "doctest-ignore-unicode" version))
16162 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16163 (build-system python-build-system)
16165 `(("python-nose" ,python-nose)))
16166 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16167 (synopsis "Ignore Unicode literal prefixes in doctests")
16169 "This package adds support for a flag to ignore Unicode literal prefixes
16171 (license license:asl2.0)))
16173 (define-public python-attr
16175 (name "python-attr")
16180 (uri (pypi-uri "attr" version))
16183 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16184 (build-system python-build-system)
16185 (home-page "https://github.com/denis-ryzhkov/attr")
16186 (synopsis "Decorator for attributes of target function or class")
16187 (description "Simple decorator to set attributes of target function or
16188 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16189 (license license:expat)))
16191 (define-public python-construct
16193 (name "python-construct")
16198 (uri (pypi-uri "construct" version))
16201 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16202 (build-system python-build-system)
16204 `(#:tests? #f)) ; No tests exist.
16206 `(("python-extras" ,python-extras)
16207 ("python-arrow" ,python-arrow)
16208 ("python-numpy" ,python-numpy)
16209 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16210 (home-page "http://construct.readthedocs.io")
16211 (synopsis "Declarative and symmetrical parser and builder for binary data")
16213 "This package provides both simple, atomic constructs (such as
16214 integers of various sizes), as well as composite ones which allow you
16215 form hierarchical and sequential structures of increasing complexity.
16216 It features bit and byte granularity, easy debugging and testing, an
16217 easy-to-extend subclass system, and lots of primitive constructs to
16218 make your work easier.")
16219 (license license:expat)))
16221 (define-public python-humanize
16223 (name "python-humanize")
16228 (uri (pypi-uri "humanize" version))
16231 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16233 '(#:tests? #f)) ; tests not in pypi archive
16234 (build-system python-build-system)
16235 (home-page "https://github.com/jmoiron/humanize")
16236 (synopsis "Print numerical information in a human-readable form")
16237 (description "This package provides a Python module that displays numbers
16238 and dates in \"human readable\" forms. For example, it would display
16239 \"12345591313\" as \"12.3 billion\".")
16240 (license license:expat)))
16242 (define-public python-txaio
16244 (name "python-txaio")
16249 (uri (pypi-uri "txaio" version))
16252 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16253 (build-system python-build-system)
16255 `(("python-twisted" ,python-twisted)
16256 ("python-six" ,python-six)))
16257 (home-page "https://github.com/crossbario/txaio")
16258 (synopsis "Compatibility layer between Python asyncio and Twisted")
16259 (description "Txaio provides a compatibility layer between the Python
16260 @code{asyncio} module and @code{Twisted}.")
16261 (license license:expat)))
16263 (define-public python-toolshed
16265 (name "python-toolshed")
16270 (uri (pypi-uri "toolshed" version))
16273 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16274 (build-system python-build-system)
16276 `(("python-nose" ,python-nose)))
16277 (home-page "https://github.com/brentp/toolshed/")
16278 (synopsis "Collection of modules and functions for working with data")
16279 (description "This is a collection of well-tested, simple modules and
16280 functions that aim to reduce boilerplate when working with data.")
16281 (license license:bsd-2)))
16283 (define-public python-annoy
16285 (name "python-annoy")
16290 (uri (pypi-uri "annoy" version))
16293 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16294 (build-system python-build-system)
16296 `(("python-nose" ,python-nose)))
16297 (home-page "https://github.com/spotify/annoy/")
16298 (synopsis "Approximate nearest neighbors library")
16300 "Annoy is a C++ library with Python bindings to search for points in
16301 space that are close to a given query point. It also creates large read-only
16302 file-based data structures that are @code{mmap}ped into memory so that many
16303 processes may share the same data.")
16304 (license license:asl2.0)))
16306 (define-public python-pylzma
16308 (name "python-pylzma")
16313 (uri (pypi-uri "pylzma" version))
16316 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16317 (build-system python-build-system)
16318 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16319 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16320 (description "This package provides Python bindings for the LZMA library
16322 (license license:lgpl2.1+)))
16324 (define-public python2-pylzma
16325 (package-with-python2 python-pylzma))
16327 (define-public python2-zeroconf
16329 (name "python2-zeroconf")
16331 ;; This is the last version that supports Python 2.x.
16336 (uri (pypi-uri "zeroconf" version))
16339 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16340 (build-system python-build-system)
16342 `(#:python ,python-2
16344 (modify-phases %standard-phases
16345 (add-after 'unpack 'patch-requires
16346 (lambda* (#:key inputs #:allow-other-keys)
16347 (substitute* "setup.py"
16352 `(("python2-six" ,python2-six)
16353 ("python2-enum32" ,python2-enum34)
16354 ("python2-netifaces" ,python2-netifaces)
16355 ("python2-typing" ,python2-typing)))
16356 (home-page "https://github.com/jstasiak/python-zeroconf")
16357 (synopsis "Pure Python mDNS service discovery")
16359 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16361 (license license:lgpl2.1+)))
16363 (define-public python-bsddb3
16365 (name "python-bsddb3")
16370 (uri (pypi-uri "bsddb3" version))
16373 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16374 (build-system python-build-system)
16379 (modify-phases %standard-phases
16380 (add-after 'unpack 'configure-locations
16381 (lambda* (#:key inputs #:allow-other-keys)
16382 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16383 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16387 (invoke "python3" "test3.py" "-v"))))))
16388 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16389 (synopsis "Python bindings for Oracle Berkeley DB")
16391 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16392 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16393 Transaction objects, and each of these is exposed as a Python type in the
16394 bsddb3.db module. The database objects can use various access methods: btree,
16395 hash, recno, and queue. Complete support of Berkeley DB distributed
16396 transactions. Complete support for Berkeley DB Replication Manager.
16397 Complete support for Berkeley DB Base Replication. Support for RPC.")
16398 (license license:bsd-3)))
16400 (define-public python-dbfread
16402 (name "python-dbfread")
16406 (uri (pypi-uri "dbfread" version))
16409 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16410 (build-system python-build-system)
16412 `(("python-pytest" ,python-pytest)))
16413 (home-page "https://dbfread.readthedocs.io")
16414 (synopsis "Read DBF Files with Python")
16416 "This library reads DBF files and returns the data as native Python data
16417 types for further processing. It is primarily intended for batch jobs and
16419 (license license:expat)))
16421 (define-public python-cached-property
16423 (name "python-cached-property")
16428 (uri (pypi-uri "cached-property" version))
16431 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16432 (build-system python-build-system)
16435 (modify-phases %standard-phases
16436 ;; https://github.com/pydanny/cached-property/issues/131
16437 ;; recent versions of freezegun break one test
16438 (add-after 'unpack 'disable-broken-test
16440 (substitute* "tests/test_cached_property.py"
16441 (("def test_threads_ttl_expiry\\(self\\)" m)
16442 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16446 `(("python-freezegun" ,python-freezegun)))
16448 "https://github.com/pydanny/cached-property")
16450 "Decorator for caching properties in classes")
16452 "This package provides a decorator which makes caching
16453 time-or-computationally-expensive properties quick and easy and works in Python
16455 (license license:bsd-3)))
16457 (define-public python-folium
16459 (name "python-folium")
16464 (uri (pypi-uri "folium" version))
16467 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16468 (build-system python-build-system)
16470 `(("python-branca" ,python-branca)
16471 ("python-jinja2" ,python-jinja2)
16472 ("python-numpy" ,python-numpy)
16473 ("python-requests" ,python-requests)))
16475 `(("python-pytest" ,python-pytest)))
16476 (home-page "https://github.com/python-visualization/folium")
16477 (synopsis "Make beautiful maps with Leaflet.js & Python")
16478 (description "@code{folium} makes it easy to visualize data that’s been
16479 manipulated in Python on an interactive leaflet map. It enables both the
16480 binding of data to a map for @code{choropleth} visualizations as well as
16481 passing rich vector/raster/HTML visualizations as markers on the map.
16483 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16484 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16485 supports Image, Video, GeoJSON and TopoJSON overlays.")
16486 (license license:expat)))
16488 (define-public jube
16490 ;; This is a command-line tool, so no "python-" prefix.
16495 (uri (string-append
16496 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16500 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16501 (file-name (string-append "jube-" version ".tar.gz"))))
16502 (build-system python-build-system)
16503 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16504 (synopsis "Benchmarking environment")
16506 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16507 benchmarked application, benchmark data is stored in a format that allows JUBE
16508 to deduct the desired information. This data can be parsed by automatic pre-
16509 and post-processing scripts that draw information and store it more densely
16510 for manual interpretation.")
16511 (license license:gpl3+)))
16513 (define-public python-pyroutelib3
16515 (name "python-pyroutelib3")
16516 (version "1.3.post1")
16520 (uri (pypi-uri "pyroutelib3" version))
16523 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16524 (build-system python-build-system)
16526 `(("python-dateutil" ,python-dateutil)))
16527 (home-page "https://github.com/MKuranowski/pyroutelib3")
16528 (synopsis "Library for simple routing on OSM data")
16529 (description "Library for simple routing on OSM data")
16530 (license license:gpl3+)))
16532 (define-public python-elementpath
16534 (name "python-elementpath")
16539 (uri (pypi-uri "elementpath" version))
16542 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16543 (build-system python-build-system)
16545 "https://github.com/sissaschool/elementpath")
16547 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16549 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16550 for Python's ElementTree XML data structures, both for the standard
16551 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16553 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16554 because lxml.etree already has it's own implementation of XPath 1.0.")
16555 (license license:expat)))
16557 (define-public python-bibtexparser
16559 (name "python-bibtexparser")
16564 (uri (pypi-uri "bibtexparser" version))
16567 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16568 (build-system python-build-system)
16570 `(("python-pyparsing" ,python-pyparsing)))
16572 `(("python-future" ,python-future)))
16573 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16574 (synopsis "Python library to parse BibTeX files")
16575 (description "BibtexParser is a Python library to parse BibTeX files.")
16576 (license (list license:bsd-3 license:lgpl3))))
16578 (define-public python-distro
16580 (name "python-distro")
16585 (uri (pypi-uri "distro" version))
16588 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16589 (build-system python-build-system)
16591 `(("python-pytest" ,python-pytest)))
16592 (home-page "https://github.com/nir0s/distro")
16594 "OS platform information API")
16596 "@code{distro} provides information about the OS distribution it runs on,
16597 such as a reliable machine-readable ID, or version information.
16599 It is the recommended replacement for Python's original
16600 `platform.linux_distribution` function (which will be removed in Python 3.8).
16601 @code{distro} also provides a command-line interface to output the platform
16602 information in various formats.")
16603 (license license:asl2.0)))
16605 (define-public python-cairosvg
16607 (name "python-cairosvg")
16612 (uri (pypi-uri "CairoSVG" version))
16614 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16615 (build-system python-build-system)
16618 (modify-phases %standard-phases
16620 (lambda _ (invoke "pytest"))))))
16622 `(("python-cairocffi" ,python-cairocffi)
16623 ("python-cssselect2" ,python-cssselect2)
16624 ("python-defusedxml" ,python-defusedxml)
16625 ("python-pillow" ,python-pillow)
16626 ("python-tinycss2" ,python-tinycss2)))
16628 `(("python-pytest-flake8" ,python-pytest-flake8)
16629 ("python-pytest-isort" ,python-pytest-isort)
16630 ("python-pytest-runner" ,python-pytest-runner)))
16631 (home-page "https://cairosvg.org/")
16632 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16633 (description "CairoSVG is a SVG converter based on Cairo. It can export
16634 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16635 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16636 parsed, the result is drawn to a Cairo surface that can be exported to
16637 qvarious formats: PDF, PostScript, PNG and even SVG.")
16638 (license license:lgpl3+)))
16640 (define-public python-pyphen
16642 (name "python-pyphen")
16647 (uri (pypi-uri "Pyphen" version))
16649 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16650 (build-system python-build-system)
16651 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16652 ;; embedded set provided by upstream - like Debian does.
16653 (home-page "https://github.com/Kozea/Pyphen")
16654 (synopsis "Pure Python module to hyphenate text")
16655 (description "Pyphen is a pure Python module to hyphenate text using
16656 existing Hunspell hyphenation dictionaries.")
16657 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))