1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
69 ;;; This file is part of GNU Guix.
71 ;;; GNU Guix is free software; you can redistribute it and/or modify it
72 ;;; under the terms of the GNU General Public License as published by
73 ;;; the Free Software Foundation; either version 3 of the License, or (at
74 ;;; your option) any later version.
76 ;;; GNU Guix is distributed in the hope that it will be useful, but
77 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 ;;; GNU General Public License for more details.
81 ;;; You should have received a copy of the GNU General Public License
82 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
84 (define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages dbm)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
117 #:use-module (gnu packages monitoring)
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-check)
127 #:use-module (gnu packages python-compression)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sphinx)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
151 #:use-module (gnu packages serialization)
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
155 #:use-module (guix hg-download)
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
164 (define-public python-psutil
166 (name "python-psutil")
171 (uri (pypi-uri "psutil" version))
174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
175 (build-system python-build-system)
177 ;; FIXME: some tests does not return and times out.
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
182 "psutil (Python system and process utilities) is a library for retrieving
183 information on running processes and system utilization (CPU, memory, disks,
184 network) in Python. It is useful mainly for system monitoring, profiling and
185 limiting process resources and management of running processes. It implements
186 many functionalities offered by command line tools such as: ps, top, lsof,
187 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188 pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
192 (define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
200 (define-public python-shapely
202 (name "python-shapely")
203 (version "1.6.4.post2")
207 (uri (pypi-uri "Shapely" version))
210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
211 (build-system python-build-system)
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
220 `(("python-numpy" ,python-numpy)))
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240 planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
243 (define-public python-shortuuid
245 (name "python-shortuuid")
250 (uri (pypi-uri "shortuuid" version))
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262 module and then similar looking characters are removed.")
263 (license license:bsd-3)))
265 (define-public python-logwrap
267 (name "python-logwrap")
272 (uri (pypi-uri "logwrap" version ".zip"))
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289 and function call return values in a human-readable way.")
290 (license license:asl2.0)))
292 (define-public python2-shapely
293 (package-with-python2 python-shapely))
295 (define-public python-clyent
297 (name "python-clyent")
302 (uri (pypi-uri "clyent" version))
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
315 (define-public python2-clyent
316 (package-with-python2 python-clyent))
318 (define-public python-babel
320 (name "python-babel")
325 (uri (pypi-uri "Babel" version))
328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
329 (build-system python-build-system)
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
334 `(("python-pytz" ,python-pytz)))
336 `(#:phases (modify-phases %standard-phases
339 (invoke "pytest" "-vv" "-k"
341 ;; XXX: These tests fail when using Pytest 4.x and
342 ;; Babel 2.6.0. Try removing this for later versions.
343 "not test_no_inherit_metazone_marker_never_in_output"
344 " and not test_smoke_dates"
345 " and not test_smoke_numbers")))))))
346 (home-page "http://babel.pocoo.org/")
348 "Tools for internationalizing Python applications")
350 "Babel is composed of two major parts:
351 - tools to build and work with gettext message catalogs
352 - a Python interface to the CLDR (Common Locale Data Repository), providing
353 access to various locale display names, localized number and date formatting,
355 (license license:bsd-3)))
357 (define-public python2-babel
358 (package-with-python2 python-babel))
360 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
361 (define-public python2-babel-2.6
363 (inherit python2-babel)
367 (uri (pypi-uri "Babel" version))
370 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372 (define-public python2-backport-ssl-match-hostname
374 (name "python2-backport-ssl-match-hostname")
379 (uri (pypi-uri "backports.ssl_match_hostname" version))
382 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
383 (build-system python-build-system)
386 #:tests? #f)) ; no test target
387 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
388 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 "This backport brings the ssl.match_hostname() function to users of
391 earlier versions of Python. The function checks the hostname in the
392 certificate returned by the server to which a connection has been established,
393 and verifies that it matches the intended target hostname.")
394 (license license:psfl)))
396 (define-public python-hdf4
403 (uri (pypi-uri name version))
406 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
407 (build-system python-build-system)
408 (native-inputs `(("nose" ,python-nose)))
409 (propagated-inputs `(("numpy" ,python-numpy)))
416 (modify-phases %standard-phases
419 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
420 ;; on to import numpy. Somehow this works on their CI system.
421 ;; Let's just manage PYTHONPATH here instead.
422 (substitute* "runexamples.sh"
423 (("export PYTHONPATH=.*") ""))
425 (string-append (getcwd) ":"
426 (getenv "PYTHONPATH")))
427 (invoke "./runexamples.sh")
428 (invoke "nosetests" "-v"))))))
429 (home-page "https://github.com/fhs/python-hdf4")
430 (synopsis "Python interface to the NCSA HDF4 library")
432 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
433 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
434 NetCDF files can also be read and modified. Python-HDF4 is a fork of
435 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
436 (license license:expat)))
438 (define-public python2-hdf4
439 (package-with-python2 python-hdf4))
441 (define-public python-h5py
448 (uri (pypi-uri "h5py" version))
451 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
452 (build-system python-build-system)
454 `(#:tests? #f ; no test target
456 (modify-phases %standard-phases
457 (add-after 'unpack 'fix-hdf5-paths
458 (lambda* (#:key inputs #:allow-other-keys)
459 (let ((prefix (assoc-ref inputs "hdf5")))
460 (substitute* "setup_build.py"
461 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
462 (string-append "['" prefix "/lib" "']"))
463 (("'/opt/local/include', '/usr/local/include'")
464 (string-append "'" prefix "/include" "'")))
465 (substitute* "setup_configure.py"
466 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
467 (string-append "['" prefix "/lib" "']")))
470 `(("python-six" ,python-six)
471 ("python-numpy" ,python-numpy)))
475 `(("python-cython" ,python-cython)
476 ("python-pkgconfig" ,python-pkgconfig)))
477 (home-page "http://www.h5py.org/")
478 (synopsis "Read and write HDF5 files from Python")
480 "The h5py package provides both a high- and low-level interface to the
481 HDF5 library from Python. The low-level interface is intended to be a
482 complete wrapping of the HDF5 API, while the high-level component supports
483 access to HDF5 files, datasets and groups using established Python and NumPy
485 (license license:bsd-3)))
487 (define-public python2-h5py
488 (package-with-python2 python-h5py))
490 (define-public python-sh
497 (uri (pypi-uri "sh" version))
500 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
501 (build-system python-build-system)
504 (modify-phases %standard-phases
507 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
508 (setenv "HOME" "/tmp")
509 (invoke "python" "sh.py" "test"))))))
511 `(("python-coverage" ,python-coverage)))
512 (home-page "https://github.com/amoffat/sh")
513 (synopsis "Python subprocess replacement")
514 (description "This package provides a replacement for Python's
515 @code{subprocess} feature.")
516 (license license:expat)))
518 (define-public python2-sh
519 (package-with-python2 python-sh))
521 (define-public python-cftime
523 (name "python-cftime")
528 (uri (pypi-uri "cftime" version))
531 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
532 (build-system python-build-system)
534 `(("python-numpy" ,python-numpy)))
536 `(("python-coveralls" ,python-coveralls)
537 ("python-cython" ,python-cython)
538 ("python-pytest-cov" ,python-pytest-cov)))
539 (home-page "https://github.com/Unidata/cftime")
540 (synopsis "Library for time handling")
542 "This package provides time-handling functionality that used to be part
543 of the netcdf4 package before.")
544 ;; This package claims to include code under the GPLv3 but is released
546 (license (list license:isc license:gpl3+))))
548 (define-public python-netcdf4
550 (name "python-netcdf4")
555 (uri (pypi-uri "netCDF4" version))
558 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
559 (build-system python-build-system)
562 (modify-phases %standard-phases
563 (add-after 'unpack 'configure-locations
564 (lambda* (#:key inputs #:allow-other-keys)
565 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
568 `(("python-cython" ,python-cython)))
570 `(("python-numpy" ,python-numpy)
571 ("python-cftime" ,python-cftime)))
576 (home-page "https://github.com/Unidata/netcdf4-python")
577 (synopsis "Python/numpy interface to the netCDF library")
578 (description "Netcdf4-python is a Python interface to the netCDF C
579 library. netCDF version 4 has many features not found in earlier
580 versions of the library and is implemented on top of HDF5. This module
581 can read and write files in both the new netCDF 4 and the old netCDF 3
582 format, and can create files that are readable by HDF5 clients. The
583 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
584 to users of that module.")
585 ;; The software is mainly ISC, but includes some files covered
586 ;; by the Expat license.
587 (license (list license:isc license:expat))))
589 (define-public python2-netcdf4
590 (package-with-python2 python-netcdf4))
592 (define-public python-lockfile
594 (name "python-lockfile")
599 (uri (pypi-uri "lockfile" version))
602 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
603 (build-system python-build-system)
604 (arguments '(#:test-target "check"))
606 `(("python-pbr" ,python-pbr)))
607 (home-page "https://launchpad.net/pylockfile")
608 (synopsis "Platform-independent file locking module")
610 "The lockfile package exports a LockFile class which provides a simple
611 API for locking files.")
612 (license license:expat)))
614 (define-public python2-lockfile
615 (package-with-python2 python-lockfile))
617 (define-public python-semantic-version
619 (name "python-semantic-version")
624 (uri (pypi-uri "semantic_version" version))
627 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
628 (build-system python-build-system)
630 `(#:tests? #f)) ; PyPI tarball lacks tests
631 (home-page "https://github.com/rbarrois/python-semanticversion")
632 (synopsis "Semantic versioning module for Python")
634 "The @code{semantic_version} class is a small library for handling
635 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
637 It can compare versions, generate a new version that represents a bump in one of
638 the version levels, and check whether any given string is a proper semantic
639 version identifier.")
640 (license license:bsd-3)))
642 (define-public python2-semantic-version
643 (package-with-python2 python-semantic-version))
645 (define-public python-serpent
647 (name "python-serpent")
652 (uri (pypi-uri "serpent" version))
654 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
655 (build-system python-build-system)
657 `(("python-attrs" ,python-attrs)
658 ("python-pytz" ,python-pytz)))
659 (home-page "https://github.com/irmen/Serpent")
660 (synopsis "Serializer for literal Python expressions")
662 "Serpent provides @code{ast.literal_eval()}-compatible object tree
663 serialization. It serializes an object tree into bytes (an utf-8 encoded
664 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
665 to rebuild the original object tree.
667 Because only safe literals are encoded, it is safe to send serpent data to
668 other machines, such as over the network.")
669 (license license:expat)))
671 (define-public python-setuptools
673 (name "python-setuptools")
678 (uri (pypi-uri "setuptools" version ".zip"))
681 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
682 (modules '((guix build utils)))
685 ;; Remove included binaries which are used to build self-extracting
686 ;; installers for Windows.
687 ;; TODO: Find some way to build them ourself so we can include them.
688 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
690 (build-system python-build-system)
691 ;; FIXME: Tests require pytest, which itself relies on setuptools.
692 ;; One could bootstrap with an internal untested setuptools.
695 (home-page "https://pypi.python.org/pypi/setuptools")
697 "Library designed to facilitate packaging Python projects")
699 "Setuptools is a fully-featured, stable library designed to facilitate
700 packaging Python projects, where packaging includes:
701 Python package and module definitions,
702 distribution package metadata,
704 project installation,
705 platform-specific details,
707 ;; TODO: setuptools now bundles the following libraries:
708 ;; packaging, pyparsing, six and appdirs. How to unbundle?
709 (license (list license:psfl ; setuptools itself
710 license:expat ; six, appdirs, pyparsing
711 license:asl2.0 ; packaging is dual ASL2/BSD-2
714 (define-public python2-setuptools
715 (package-with-python2 python-setuptools))
717 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
718 (define-public python-setuptools-for-tensorflow
721 (inherit python-setuptools)
724 (inherit (package-source python-setuptools))
725 (uri (pypi-uri "setuptools" version ".zip"))
728 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
730 (define-public python-uniseg
732 (name "python-uniseg")
737 (uri (pypi-uri "uniseg" version ".zip"))
740 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
741 (build-system python-build-system)
743 '(#:tests? #f)) ; The test suite requires network access.
747 "https://bitbucket.org/emptypage/uniseg-python")
749 "Python library to determine Unicode text segmentations")
751 "Uniseg is a Python package used to determine Unicode text segmentations.
752 Supported segmentations include:
754 @item @dfn{Code point} (any value in the Unicode codespace)
755 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
756 multiple Unicode code points, e.g. \"G\" + acute-accent)
761 (license license:expat)))
763 (define-public python2-uniseg
764 (package-with-python2 python-uniseg))
766 (define-public python-humanfriendly
768 (name "python-humanfriendly")
773 (uri (pypi-uri "humanfriendly" version))
776 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
777 (build-system python-build-system)
779 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
782 `(("python-monotonic" ,python-monotonic)))
783 (home-page "https://humanfriendly.readthedocs.io")
784 (synopsis "Human-friendly input and output in Python")
786 "The functions and classes in @code{humanfriendly} can be used to make
787 text interfaces more user-friendly. It includes tools to parse and format
788 numbers, file sizes, and timespans, timers for long-running operations, menus
789 to allow the user to choose from a list of options, and terminal interaction
791 (license license:expat)))
793 (define-public python2-humanfriendly
794 (package-with-python2 python-humanfriendly))
796 (define-public python-capturer
798 (name "python-capturer")
803 (uri (pypi-uri "capturer" version))
806 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
807 (build-system python-build-system)
811 `(("python-humanfriendly" ,python-humanfriendly)))
812 (home-page "https://capturer.readthedocs.io")
813 (synopsis "Capture stdout and stderr streams of the current process")
815 "The capturer package makes it easy to capture the stdout and stderr
816 streams of the current process and subprocesses. Output can be relayed
817 to the terminal in real time but is also available to the Python program
818 for additional processing.")
819 (license license:expat)))
821 (define-public python2-capturer
822 (package-with-python2 python-capturer))
824 (define-public python-case
831 (uri (pypi-uri "case" version))
834 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
835 (build-system python-build-system)
837 `(("python-mock" ,python-mock)
838 ("python-nose" ,python-nose)
839 ("python-six" ,python-six)
840 ("python-unittest2" ,python-unittest2)))
842 `(("python-coverage" ,python-coverage)))
843 (home-page "https://github.com/celery/case")
844 (synopsis "Unittest utilities and convenience methods")
846 "The @code{case} package provides utilities on top of unittest, including
847 some helpful Python 2 compatibility convenience methods.")
848 (license license:bsd-3)))
850 (define-public python-verboselogs
852 (name "python-verboselogs")
857 (uri (pypi-uri "verboselogs" version))
860 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
861 (build-system python-build-system)
863 `(("python-mock" ,python-mock)
864 ("python-astroid" ,python-astroid)
865 ("python-pylint" ,python-pylint)))
866 (home-page "https://verboselogs.readthedocs.io")
867 (synopsis "Verbose logging level for Python's logging module")
869 "The @code{verboselogs} package extends Python's @code{logging} module to
870 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
871 (license license:expat)))
873 (define-public python2-verboselogs
874 (package-with-python2 python-verboselogs))
876 (define-public python-coloredlogs
878 (name "python-coloredlogs")
883 (uri (pypi-uri "coloredlogs" version))
886 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
887 (build-system python-build-system)
889 `(;Tests require some updated modules
892 `(("python-capturer" ,python-capturer)))
893 (home-page "https://coloredlogs.readthedocs.io")
894 (synopsis "Colored stream handler for Python's logging module")
896 "The @code{coloredlogs} package enables colored terminal output for
897 Python's logging module. The @code{ColoredFormatter} class inherits from
898 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
900 (license license:expat)))
902 (define-public python2-coloredlogs
903 (package-with-python2 python-coloredlogs))
905 (define-public python-et-xmlfile
907 (name "python-et-xmlfile")
912 (uri (pypi-uri "et_xmlfile" version))
915 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
916 (build-system python-build-system)
918 `(#:phases (modify-phases %standard-phases
921 (invoke "pytest"))))))
923 `(("python-pytest" ,python-pytest)
924 ("python-lxml" ,python-lxml))) ;used for the tests
925 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
926 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
927 (description "This Python library is based upon the @code{xmlfile} module
928 from @code{lxml}. It aims to provide a low memory, compatible implementation
930 (license license:expat)))
932 (define-public python2-et-xmlfile
933 (package-with-python2 python-et-xmlfile))
935 (define-public python-openpyxl
937 (name "python-openpyxl")
941 ;; We use the upstream repository, as the tests are not included in the
945 (url "https://bitbucket.org/openpyxl/openpyxl")
946 (changeset version)))
947 (file-name (string-append name "-" version "-checkout"))
949 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
950 (build-system python-build-system)
952 `(#:phases (modify-phases %standard-phases
955 (invoke "pytest"))))))
957 ;; For the test suite.
958 `(("python-lxml" ,python-lxml)
959 ("python-pillow" ,python-pillow)
960 ("python-pytest" ,python-pytest)))
962 `(("python-et-xmlfile" ,python-et-xmlfile)
963 ("python-jdcal" ,python-jdcal)))
964 (home-page "https://openpyxl.readthedocs.io")
965 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
966 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
967 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
969 (license license:expat)))
971 (define-public python-eventlet
973 (name "python-eventlet")
978 (uri (pypi-uri "eventlet" version))
981 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
982 (build-system python-build-system)
984 `(("python-greenlet" ,python-greenlet)))
986 ;; TODO: Requires unpackaged 'enum-compat'.
988 (home-page "http://eventlet.net")
989 (synopsis "Concurrent networking library for Python")
991 "Eventlet is a concurrent networking library for Python that
992 allows you to change how you run your code, not how you write it.
993 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
994 Coroutines ensure that the developer uses a blocking style of programming
995 that is similar to threading, but provide the benefits of non-blocking I/O.
996 The event dispatch is implicit, which means you can easily use @code{Eventlet}
997 from the Python interpreter, or as a small part of a larger application.")
998 (license license:expat)))
1000 (define-public python2-eventlet
1001 (let ((base (package-with-python2
1002 (strip-python2-variant python-eventlet))))
1003 (package (inherit base)
1005 `(("python2-enum34" ,python2-enum34)
1006 ,@(package-propagated-inputs base))))))
1008 (define-public python-six
1015 (uri (pypi-uri "six" version))
1018 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1019 (build-system python-build-system)
1022 (modify-phases %standard-phases
1025 (invoke "py.test" "-v"))))))
1027 `(("python-py" ,python-py)
1028 ("python-pytest" ,python-pytest-bootstrap)))
1029 (home-page "https://pypi.python.org/pypi/six/")
1030 (synopsis "Python 2 and 3 compatibility utilities")
1032 "Six is a Python 2 and 3 compatibility library. It provides utility
1033 functions for smoothing over the differences between the Python versions with
1034 the goal of writing Python code that is compatible on both Python versions.
1035 Six supports every Python version since 2.5. It is contained in only one
1036 Python file, so it can be easily copied into your project.")
1037 (license license:x11)))
1039 (define-public python2-six
1040 (package-with-python2 python-six))
1042 (define-public python-six-bootstrap
1044 (inherit python-six)
1045 (name "python-six-bootstrap")
1047 (arguments `(#:tests? #f))))
1049 (define-public python2-six-bootstrap
1050 (package-with-python2 python-six-bootstrap))
1052 (define-public python-schedule
1054 (name "python-schedule")
1059 (uri (pypi-uri "schedule" version))
1062 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1063 (build-system python-build-system)
1065 `(("python-pytest" ,python-pytest)
1066 ("python-mock" ,python-mock)))
1067 (home-page "https://github.com/dbader/schedule")
1068 (synopsis "Schedule periodic function calls in Python")
1070 "Schedule is an in-process scheduler for periodic jobs that uses the
1071 builder pattern for configuration. Schedule lets you run Python functions (or
1072 any other callable) periodically at pre-determined intervals using a simple,
1073 human-friendly syntax.")
1074 (license license:expat)))
1076 (define-public python2-schedule
1077 (package-with-python2 python-schedule))
1079 (define-public python-pandas
1081 (name "python-pandas")
1086 (uri (pypi-uri "pandas" version))
1088 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1089 (build-system python-build-system)
1091 `(#:modules ((guix build utils)
1092 (guix build python-build-system)
1095 #:phases (modify-phases %standard-phases
1096 (add-after 'unpack 'patch-which
1097 (lambda* (#:key inputs #:allow-other-keys)
1098 (let ((which (assoc-ref inputs "which")))
1099 (substitute* "pandas/io/clipboard/__init__.py"
1100 (("^CHECK_CMD = .*")
1101 (string-append "CHECK_CMD = \"" which "\"\n"))))
1105 (let ((build-directory
1108 (car (scandir "build"
1109 (cut string-prefix? "lib." <>))))))
1110 ;; Disable the "strict data files" option which causes
1111 ;; the build to error out if required data files are
1112 ;; not available (as is the case with PyPI archives).
1113 (substitute* "setup.cfg"
1114 (("addopts = --strict-data-files") "addopts = "))
1115 (with-directory-excursion build-directory
1116 ;; Delete tests that require "moto" which is not yet
1118 (for-each delete-file
1119 '("pandas/tests/io/conftest.py"
1120 "pandas/tests/io/json/test_compression.py"
1121 "pandas/tests/io/parser/test_network.py"
1122 "pandas/tests/io/test_parquet.py"))
1123 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1124 "--skip-network" "-k"
1125 ;; XXX: Due to the deleted tests above.
1126 "not test_read_s3_jsonl"))))))))
1128 `(("python-numpy" ,python-numpy)
1129 ("python-openpyxl" ,python-openpyxl)
1130 ("python-pytz" ,python-pytz)
1131 ("python-dateutil" ,python-dateutil)
1132 ("python-xlrd" ,python-xlrd)))
1134 `(("which" ,which)))
1136 `(("python-cython" ,python-cython)
1137 ("python-beautifulsoup4" ,python-beautifulsoup4)
1138 ("python-lxml" ,python-lxml)
1139 ("python-html5lib" ,python-html5lib)
1140 ("python-nose" ,python-nose)
1141 ("python-pytest" ,python-pytest)
1142 ("python-pytest-mock" ,python-pytest-mock)))
1143 (home-page "https://pandas.pydata.org")
1144 (synopsis "Data structures for data analysis, time series, and statistics")
1146 "Pandas is a Python package providing fast, flexible, and expressive data
1147 structures designed to make working with structured (tabular,
1148 multidimensional, potentially heterogeneous) and time series data both easy
1149 and intuitive. It aims to be the fundamental high-level building block for
1150 doing practical, real world data analysis in Python.")
1151 (license license:bsd-3)))
1153 (define-public python2-pandas
1154 (package-with-python2 python-pandas))
1156 (define-public python2-mechanize
1158 (name "python2-mechanize")
1163 (uri (pypi-uri "mechanize" version))
1166 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1167 (build-system python-build-system)
1169 `(#:python ,python-2 ; apparently incompatible with Python 3
1171 ;; test fails with message
1172 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1173 ;; (python-3.3.2) or
1174 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1176 ;; The source code is from March 2011 and probably not up-to-date
1177 ;; with respect to python unit tests.
1178 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1180 "Stateful programmatic web browsing in Python")
1182 "Mechanize implements stateful programmatic web browsing in Python,
1183 after Andy Lester’s Perl module WWW::Mechanize.")
1184 (license (license:non-copyleft
1186 "See COPYING in the distribution."))))
1189 (define-public python-simplejson
1191 (name "python-simplejson")
1196 (uri (pypi-uri "simplejson" version))
1199 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1200 (build-system python-build-system)
1201 (home-page "http://simplejson.readthedocs.org/en/latest/")
1203 "Json library for Python")
1205 "JSON (JavaScript Object Notation) is a subset of JavaScript
1206 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1209 Simplejson exposes an API familiar to users of the standard library marshal
1210 and pickle modules. It is the externally maintained version of the json
1211 library contained in Python 2.6, but maintains compatibility with Python 2.5
1212 and (currently) has significant performance advantages, even without using
1213 the optional C extension for speedups. Simplejson is also supported on
1215 (license license:x11)))
1217 (define-public python2-simplejson
1218 (package-with-python2 python-simplejson))
1221 (define-public python-pyicu
1223 (name "python-pyicu")
1228 (uri (pypi-uri "PyICU" version))
1231 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1232 (build-system python-build-system)
1234 `(("icu4c" ,icu4c)))
1236 `(("python-pytest" ,python-pytest)
1237 ("python-six" ,python-six)))
1238 (home-page "https://github.com/ovalhub/pyicu")
1239 (synopsis "Python extension wrapping the ICU C++ API")
1241 "PyICU is a python extension wrapping the ICU C++ API.")
1242 (properties `((python2-variant . ,(delay python2-pyicu))))
1243 (license license:x11)))
1245 (define-public python2-pyicu
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-pyicu))))
1251 `(,@(package-arguments base)
1253 (modify-phases %standard-phases
1254 (add-before 'check 'delete-failing-test
1256 ;; XXX: This fails due to Unicode issues unique to Python 2,
1257 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1258 (delete-file "test/test_Script.py")
1261 (define-public python2-dogtail
1262 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1263 ;; spaces in indentation" with Python 3.
1265 (name "python2-dogtail")
1269 (uri (pypi-uri "dogtail" version))
1272 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1273 (build-system python-build-system)
1274 (arguments `(#:python ,python-2
1275 #:tests? #f)) ; invalid command "test"
1276 ;; Currently no offical homepage.
1277 (home-page "https://pypi.python.org/pypi/dogtail/")
1278 (synopsis "GUI test tool and automation framework written in Python")
1280 "Dogtail is a GUI test tool and automation framework written in Python.
1281 It uses Accessibility (a11y) technologies to communicate with desktop
1282 applications. dogtail scripts are written in Python and executed like any
1283 other Python program.")
1284 (license license:gpl2+)))
1286 (define-public python-empy
1288 (name "python-empy")
1292 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1296 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1297 (build-system python-build-system)
1299 `(#:tests? #f)) ; python2 only
1300 (home-page "http://www.alcyone.com/software/empy/")
1301 (synopsis "Templating system for Python")
1303 "EmPy is a system for embedding Python expressions and statements in
1304 template text; it takes an EmPy source file, processes it, and produces
1305 output. This is accomplished via expansions, which are special signals to the
1306 EmPy system and are set off by a special prefix (by default the at sign, @@).
1307 EmPy can expand arbitrary Python expressions and statements in this way, as
1308 well as a variety of special forms. Textual data not explicitly delimited in
1309 this way is sent unaffected to the output, allowing Python to be used in
1310 effect as a markup language. Also supported are callbacks via hooks,
1311 recording and playback via diversions, and dynamic, chainable filters. The
1312 system is highly configurable via command line options and embedded
1314 (license license:lgpl2.1+)))
1316 (define-public python2-empy
1317 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1320 (arguments `(,@(package-arguments base)
1323 (define-public python2-element-tree
1325 (name "python2-element-tree")
1330 "http://effbot.org/media/downloads/elementtree-"
1331 version "-20050316.tar.gz"))
1334 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1335 (build-system python-build-system)
1337 `(#:python ,python-2 ; seems to be part of Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (synopsis "Toolkit for XML processing in Python")
1341 "ElementTree is a Python library supporting lightweight XML processing.")
1342 (home-page "http://effbot.org/zone/element-index.htm")
1343 (license (license:x11-style
1344 "http://docs.python.org/2/license.html"
1345 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1347 (define-public python2-pybugz
1349 (name "python2-pybugz")
1354 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1358 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1359 (patches (search-patches "pybugz-stty.patch"
1360 "pybugz-encode-error.patch"))))
1361 (build-system python-build-system)
1363 `(#:python ,python-2 ; SyntaxError with Python 3
1364 #:tests? #f)) ; no 'test' sub-command
1366 `(("element-tree" ,python2-element-tree)))
1367 (synopsis "Python and command-line interface to Bugzilla")
1369 "PyBugz is a Python library and command-line tool to query the Bugzilla
1370 bug tracking system. It is meant as an aid to speed up interaction with the
1372 (home-page "http://www.liquidx.net/pybugz/")
1373 (license license:gpl2)))
1375 (define-public python2-enum
1377 (name "python2-enum")
1381 (uri (pypi-uri "enum" version))
1384 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1385 (build-system python-build-system)
1387 `(#:python ,python-2))
1388 (home-page "http://pypi.python.org/pypi/enum/")
1389 (synopsis "Robust enumerated type support in Python")
1391 "This provides a module for robust enumerations in Python. It has
1392 been superseded by the Python standard library and is provided only for
1394 ;; Choice of either license.
1395 (license (list license:gpl3+ license:psfl))))
1397 (define-public python-enum34
1399 (name "python-enum34")
1404 (uri (pypi-uri "enum34" version))
1407 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1408 (build-system python-build-system)
1409 (home-page "https://pypi.python.org/pypi/enum34")
1410 (synopsis "Backported Python 3.4 Enum")
1412 "Enum34 is the new Python stdlib enum module available in Python 3.4
1413 backported for previous versions of Python from 2.4 to 3.3.")
1414 (license license:bsd-3)))
1416 (define-public python2-enum34
1417 (package-with-python2 python-enum34))
1419 (define-public python-parse-type
1421 (name "python-parse-type")
1426 (uri (pypi-uri "parse_type" version))
1429 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1430 (build-system python-build-system)
1432 `(("python-six" ,python-six)
1433 ("python-parse" ,python-parse)))
1435 `(("python-pytest" ,python-pytest)
1436 ("python-pytest-runner" ,python-pytest-runner)))
1437 (home-page "https://github.com/jenisys/parse_type")
1438 (synopsis "Extended parse module")
1440 "Parse_type extends the python parse module.")
1442 `((python2-variant . ,(delay python2-parse-type))))
1443 (license license:bsd-3)))
1445 (define-public python2-parse-type
1446 (let ((base (package-with-python2
1447 (strip-python2-variant python-parse-type))))
1448 (package (inherit base)
1450 `(("python2-enum34" ,python2-enum34)
1451 ,@(package-propagated-inputs base))))))
1453 (define-public python-parse
1455 (name "python-parse")
1460 (uri (pypi-uri "parse" version))
1463 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1464 (build-system python-build-system)
1467 (modify-phases %standard-phases
1469 (lambda _ (invoke "python" "test_parse.py"))))))
1470 (home-page "https://github.com/r1chardj0n3s/parse")
1471 (synopsis "Parse strings")
1473 "Parse strings using a specification based on the Python @code{format()}
1475 (license license:x11)))
1477 (define-public python-polib
1479 (name "python-polib")
1483 (uri (pypi-uri "polib" version))
1486 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1487 (build-system python-build-system)
1488 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1489 (synopsis "Manipulate, create and modify gettext files")
1490 (description "Polib can manipulate any gettext format (po, pot and mo)
1491 files. It can be used to create po files from scratch or to modify
1493 (license license:expat)))
1495 (define-public python2-polib
1496 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1499 (arguments `(,@(package-arguments base)
1500 ;; Tests don't work with python2.
1503 (define-public scons
1510 (url "https://github.com/SCons/scons.git")
1512 (file-name (git-file-name name version))
1515 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1516 (build-system python-build-system)
1518 `(#:use-setuptools? #f ; still relies on distutils
1519 #:tests? #f ; no 'python setup.py test' command
1521 (modify-phases %standard-phases
1522 (add-before 'build 'bootstrap
1524 (substitute* "src/engine/SCons/compat/__init__.py"
1525 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1526 "sys.modules[new] = __import__(old)"))
1527 (substitute* "src/engine/SCons/Platform/__init__.py"
1528 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1529 "mod = __import__(full_name)"))
1530 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1531 (chdir "build/scons")
1533 (home-page "http://scons.org/")
1534 (synopsis "Software construction tool written in Python")
1536 "SCons is a software construction tool. Think of SCons as an improved,
1537 cross-platform substitute for the classic Make utility with integrated
1538 functionality similar to autoconf/automake and compiler caches such as ccache.
1539 In short, SCons is an easier, more reliable and faster way to build
1541 (license license:x11)))
1543 (define-public scons-python2
1545 (inherit (package-with-python2 scons))
1546 (name "scons-python2")))
1548 (define-public python-extras
1550 (name "python-extras")
1555 (uri (pypi-uri "extras" version))
1558 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1559 (build-system python-build-system)
1561 ;; FIXME: Circular dependency on testtools.
1563 (home-page "https://github.com/testing-cabal/extras")
1564 (synopsis "Useful extensions to the Python standard library")
1566 "Extras is a set of extensions to the Python standard library.")
1567 (license license:expat)))
1569 (define-public python2-extras
1570 (package-with-python2 python-extras))
1572 (define-public python-mimeparse
1574 (name "python-mimeparse")
1579 (uri (pypi-uri "python-mimeparse" version))
1582 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1583 (build-system python-build-system)
1586 (modify-phases %standard-phases
1589 (invoke "./mimeparse_test.py"))))))
1591 "https://github.com/dbtsai/python-mimeparse")
1592 (synopsis "Python library for parsing MIME types")
1594 "Mimeparse provides basic functions for parsing MIME type names and
1595 matching them against a list of media-ranges.")
1596 (license license:expat)))
1598 (define-public python2-mimeparse
1599 (package-with-python2 python-mimeparse))
1601 (define-public python-miniboa
1603 (name "python-miniboa")
1608 (uri (pypi-uri "miniboa" version))
1611 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1612 (build-system python-build-system)
1613 (home-page "https://github.com/shmup/miniboa")
1614 (synopsis "Simple, single-threaded Telnet server")
1616 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1618 (license license:asl2.0)))
1620 (define-public python2-miniboa
1621 (package-with-python2 python-miniboa))
1623 (define-public python-pafy
1625 (name "python-pafy")
1630 (uri (pypi-uri "pafy" version))
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1647 (define-public python2-funcsigs
1649 (name "python2-funcsigs")
1653 (uri (pypi-uri "funcsigs" version))
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1659 `(#:python ,python-2))
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1668 (define-public python2-funcsigs-bootstrap
1670 (inherit python2-funcsigs)
1671 (name "python2-funcsigs-bootstrap")
1675 ,@(package-arguments python2-funcsigs)))))
1677 (define-public python-py
1684 (uri (pypi-uri "py" version))
1687 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1688 (build-system python-build-system)
1690 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1691 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1692 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1693 ;; Is this module globally installed?"
1696 `(("python-setuptools-scm" ,python-setuptools-scm)))
1697 (home-page "https://github.com/pytest-dev/py")
1698 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1700 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1701 code introspection, and logging.")
1702 (license license:expat)))
1704 (define-public python2-py
1705 (package-with-python2 python-py))
1707 ;; Recent versions of python-fixtures and python-testrepository need
1708 ;; python-pbr for packaging, which itself needs these two packages for
1710 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1711 ;; same source, just without any test dependencies and with tests disabled.
1712 ;; python-pbr-minmal is then used to package python-fixtures and
1713 ;; python-testrepository.
1714 ;; Strictly speaking we currently could remove the test-requirements from the
1715 ;; normal python-pbr package (and save this package) since test are disabled
1716 ;; there anyway. But this may change in future.
1717 (define-public python-pbr-minimal
1719 (name "python-pbr-minimal")
1724 (uri (pypi-uri "pbr" version))
1727 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1728 (build-system python-build-system)
1731 (home-page "http://docs.openstack.org/developer/pbr/")
1732 (synopsis "Minimal build of python-pbr used for bootstrapping")
1734 "Used only for bootstrapping python2-pbr, you should not need this.")
1735 (license license:asl2.0)))
1737 (define-public python2-pbr-minimal
1738 (package-with-python2 python-pbr-minimal))
1740 (define-public python-pbr
1742 (inherit python-pbr-minimal)
1745 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1747 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1749 `(("python-fixtures" ,python-fixtures-bootstrap)
1750 ;; discover, coverage, hacking, subunit
1751 ("python-mock" ,python-mock)
1752 ("python-six" ,python-six)
1753 ("python-sphinx" ,python-sphinx)
1754 ("python-testrepository" ,python-testrepository-bootstrap)
1755 ("python-testresources" ,python-testresources-bootstrap)
1756 ("python-testscenarios" ,python-testscenarios-bootstrap)
1757 ("python-testtools" ,python-testtools-bootstrap)
1758 ("python-virtualenv" ,python-virtualenv)))
1759 (synopsis "Enhance the default behavior of Python’s setuptools")
1761 "Python Build Reasonableness (PBR) is a library that injects some useful
1762 and sensible default behaviors into your setuptools run. It will set
1763 versions, process requirements files and generate AUTHORS and ChangeLog file
1764 from git information.
1767 (define-public python2-pbr
1768 (package-with-python2 python-pbr))
1770 (define-public python-pyrsistent
1772 (name "python-pyrsistent")
1774 (home-page "https://github.com/tobgu/pyrsistent")
1777 (uri (pypi-uri "pyrsistent" version))
1780 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1781 (build-system python-build-system)
1783 `(("python-hypothesis" ,python-hypothesis)
1784 ("python-pytest" ,python-pytest)
1785 ("python-pytest-runner" ,python-pytest-runner)))
1787 `(("python-six" ,python-six)))
1788 (synopsis "Persistent data structures for Python")
1790 "Pyrsistent is a number of persistent collections (by some referred to as
1791 functional data structures). Persistent in the sense that they are immutable.
1793 All methods on a data structure that would normally mutate it instead return a
1794 new copy of the structure containing the requested updates. The original
1795 structure is left untouched.")
1796 (license license:expat)))
1798 (define-public python2-pyrsistent
1799 (package-with-python2 python-pyrsistent))
1801 (define-public python-exif-read
1803 (name "python-exif-read")
1807 (uri (pypi-uri "ExifRead" version))
1810 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1811 (build-system python-build-system)
1812 (arguments `(#:tests? #f)) ; no tests
1813 (home-page "https://github.com/ianare/exif-py")
1814 (synopsis "Python library to extract EXIF data from image files")
1816 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1818 (license license:bsd-3)))
1820 (define-public python2-exif-read
1821 (package-with-python2 python-exif-read))
1823 (define-public python-pyld
1825 (name "python-pyld")
1829 (uri (pypi-uri "PyLD" version))
1832 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1833 (build-system python-build-system)
1834 (home-page "https://github.com/digitalbazaar/pyld")
1835 (synopsis "Python implementation of the JSON-LD specification")
1837 "PyLD is an implementation of the JSON-LD specification.")
1838 (license license:bsd-3)))
1840 (define-public python2-pyld
1841 (package-with-python2 python-pyld))
1843 (define-public python-click
1845 (name "python-click")
1850 (uri (pypi-uri "click" version))
1853 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1854 (build-system python-build-system)
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'fix-paths
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1861 "cross-libc" "libc"))))
1862 (substitute* "click/_unicodefun.py"
1864 (string-append "'" glibc "/bin/locale'"))))
1868 (invoke "python" "-m" "pytest"))))))
1870 `(("python-pytest" ,python-pytest)))
1871 (home-page "https://palletsprojects.com/p/click/")
1872 (synopsis "Command line library for Python")
1874 "Click is a Python package for creating command line interfaces in a
1875 composable way with as little code as necessary. Its name stands for
1876 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1877 with sensible defaults out of the box.")
1878 (license license:bsd-3)))
1880 (define-public python2-click
1881 (package-with-python2 python-click))
1883 (define-public python-wheel
1885 (name "python-wheel")
1890 (uri (pypi-uri "wheel" version))
1893 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1894 (build-system python-build-system)
1896 `(("python-jsonschema" ,python-jsonschema)
1897 ("python-pytest-cov" ,python-pytest-cov)))
1898 (home-page "https://bitbucket.org/pypa/wheel/")
1899 (synopsis "Format for built Python packages")
1901 "A wheel is a ZIP-format archive with a specially formatted filename and
1902 the @code{.whl} extension. It is designed to contain all the files for a PEP
1903 376 compatible install in a way that is very close to the on-disk format. Many
1904 packages will be properly installed with only the @code{Unpack} step and the
1905 unpacked archive preserves enough information to @code{Spread} (copy data and
1906 scripts to their final locations) at any later time. Wheel files can be
1907 installed with a newer @code{pip} or with wheel's own command line utility.")
1908 (license license:expat)
1909 (properties `((python2-variant . ,(delay python2-wheel))))))
1911 (define-public python2-wheel
1912 (let ((wheel (package-with-python2
1913 (strip-python2-variant python-wheel))))
1914 (package (inherit wheel)
1915 (native-inputs `(("python2-functools32" ,python2-functools32)
1916 ,@(package-native-inputs wheel))))))
1918 (define-public python-vcversioner
1920 (name "python-vcversioner")
1921 (version "2.16.0.0")
1925 (uri (pypi-uri "vcversioner" version))
1928 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1929 (build-system python-build-system)
1930 (synopsis "Python library for version number discovery")
1931 (description "Vcversioner is a Python library that inspects tagging
1932 information in a variety of version control systems in order to discover
1934 (home-page "https://github.com/habnabit/vcversioner")
1935 (license license:isc)))
1937 (define-public python2-vcversioner
1938 (package-with-python2 python-vcversioner))
1940 (define-public python-jdcal
1942 (name "python-jdcal")
1947 (uri (pypi-uri "jdcal" version))
1950 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1951 (build-system python-build-system)
1953 `(#:phases (modify-phases %standard-phases
1956 (invoke "pytest"))))))
1958 `(("python-pytest" ,python-pytest)))
1959 (home-page "https://github.com/phn/jdcal")
1960 (synopsis "Functions to convert between Julian dates Gregorian dates")
1961 (description "This Python library provides functions for converting
1962 between Julian dates and Gregorian dates.")
1963 (license license:bsd-2)))
1965 (define-public python2-jdcal
1966 (package-with-python2 python-jdcal))
1968 (define-public python-jsonschema
1970 (name "python-jsonschema")
1974 (uri (pypi-uri "jsonschema" version))
1977 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1978 (build-system python-build-system)
1981 (modify-phases %standard-phases
1984 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1985 (invoke "trial" "jsonschema"))))))
1987 `(("python-setuptools_scm" ,python-setuptools-scm)
1988 ("python-twisted" ,python-twisted)))
1990 `(("python-attrs" ,python-attrs)
1991 ("python-pyrsistent" ,python-pyrsistent)
1992 ("python-six" ,python-six)))
1993 (home-page "https://github.com/Julian/jsonschema")
1994 (synopsis "Implementation of JSON Schema for Python")
1996 "Jsonschema is an implementation of JSON Schema for Python.")
1997 (license license:expat)
1998 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2000 (define-public python2-jsonschema
2001 (let ((jsonschema (package-with-python2
2002 (strip-python2-variant python-jsonschema))))
2003 (package (inherit jsonschema)
2005 `(("python2-functools32" ,python2-functools32)
2006 ,@(package-propagated-inputs jsonschema))))))
2008 ;; This old version is still required by docker-compose as of 1.24.0.
2009 (define-public python-jsonschema-2.6
2011 (name "python-jsonschema")
2015 (uri (pypi-uri "jsonschema" version))
2018 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2019 (build-system python-build-system)
2022 (modify-phases %standard-phases
2023 (replace 'check (lambda _ (invoke "nosetests"))))))
2025 `(("python-nose" ,python-nose)
2026 ("python-vcversioner" ,python-vcversioner)))
2027 (home-page "https://github.com/Julian/jsonschema")
2028 (synopsis "Implementation of JSON Schema for Python")
2030 "Jsonschema is an implementation of JSON Schema for Python.")
2031 (license license:expat)
2032 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2034 (define-public python-schema
2036 (name "python-schema")
2041 (uri (pypi-uri "schema" version))
2044 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2045 (build-system python-build-system)
2047 `(("python-pytest" ,python-pytest)))
2048 (home-page "https://github.com/keleshev/schema")
2049 (synopsis "Simple data validation library")
2051 "@code{python-schema} is a library for validating Python data
2052 structures, such as those obtained from config-files, forms, external
2053 services or command-line parsing, converted from JSON/YAML (or
2054 something else) to Python data-types.")
2055 (license license:psfl)))
2057 (define-public python2-schema
2058 (package-with-python2 python-schema))
2060 (define-public python-schema-0.5
2061 (package (inherit python-schema)
2066 (uri (pypi-uri "schema" version))
2069 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2071 (define-public python2-schema-0.5
2072 (package-with-python2 python-schema-0.5))
2074 (define-public python-kitchen
2076 (name "python-kitchen")
2081 (uri (pypi-uri "kitchen" version))
2084 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2085 (build-system python-build-system)
2087 `(("python-chardet" ,python-chardet)))
2088 (home-page "https://github.com/fedora-infra/kitchen")
2089 (synopsis "Python API for snippets")
2090 (description "@code{kitchen} module provides a python API for all sorts of
2091 little useful snippets of code that everybody ends up writing for their projects
2092 but never seem big enough to build an independent release. Use kitchen and stop
2093 cutting and pasting that code over and over.")
2094 (license (list license:lgpl2.1+
2095 ;; subprocess.py, test_subprocess.py,
2096 ;; kitchen/pycompat25/defaultdict.py:
2099 (define-public python2-kitchen
2100 (package-with-python2 python-kitchen))
2102 (define-public python-unidecode
2104 (name "python-unidecode")
2108 (uri (pypi-uri "Unidecode" version))
2111 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2112 (build-system python-build-system)
2113 (home-page "https://pypi.python.org/pypi/Unidecode")
2114 (synopsis "ASCII transliterations of Unicode text")
2116 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2117 useful when integrating with legacy code that doesn't support Unicode, or for
2118 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2119 machine identifiers from human-readable Unicode strings that should still be
2120 somewhat intelligible.")
2121 (license license:gpl2+)))
2123 (define-public python2-unidecode
2124 (package-with-python2 python-unidecode))
2126 (define-public python-pyjwt
2128 (name "python-pyjwt")
2133 (uri (pypi-uri "PyJWT" version))
2136 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2137 (modules '((guix build utils)))
2140 (for-each delete-file-recursively
2141 (find-files "." "\\.pyc$"))
2143 (build-system python-build-system)
2145 `(("python-pytest" ,python-pytest)
2146 ("python-pytest-cov" ,python-pytest-cov)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/progrium/pyjwt")
2149 (synopsis "JSON Web Token implementation in Python")
2151 "PyJWT is a JSON Web Token implementation written in Python.")
2152 (license license:expat)))
2154 (define-public python2-pyjwt
2155 (package-with-python2 python-pyjwt))
2157 (define-public python-pykka
2159 (name "python-pykka")
2164 (uri (pypi-uri "Pykka" version))
2167 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2168 (build-system python-build-system)
2170 `(("python-mock" ,python-mock)
2171 ("python-nose" ,python-nose)
2172 ("python-gevent" ,python-gevent)
2173 ("python-eventlet" ,python-eventlet)))
2174 (home-page "https://www.pykka.org/")
2175 (synopsis "Pykka is a Python implementation of the actor model")
2177 "Pykka is a Python implementation of the actor model.
2178 The actor model introduces some simple rules to control the sharing
2179 of state and cooperation between execution units, which makes it
2180 easier to build concurrent applications.")
2181 (license license:asl2.0)))
2183 (define-public python2-pykka
2184 (package-with-python2 python-pykka))
2186 (define-public python-pymsgbox
2188 (name "python-pymsgbox")
2194 ;; LICENSE.txt is not present on pypi
2195 (url "https://github.com/asweigart/PyMsgBox")
2196 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2197 (file-name (git-file-name name version))
2200 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2202 ;; Circular dependency to run tests:
2203 ;; Tests need pyautogui, which depends on pymsgbox.
2205 (build-system python-build-system)
2206 (home-page "https://github.com/asweigart/PyMsgBox")
2207 (synopsis "Python module for JavaScript-like message boxes")
2209 "PyMsgBox is a simple, cross-platform, pure Python module for
2210 JavaScript-like message boxes. Types of dialog boxes include:
2218 (license license:bsd-3)))
2220 (define-public python-pympler
2222 (name "python-pympler")
2223 (home-page "https://pythonhosted.org/Pympler/")
2227 (uri (pypi-uri "Pympler" version))
2230 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2231 (build-system python-build-system)
2233 `(#:phases (modify-phases %standard-phases
2235 (add-after 'install 'check
2236 (lambda* (#:key inputs outputs #:allow-other-keys)
2237 (add-installed-pythonpath inputs outputs)
2238 (invoke "python" "setup.py" "test"))))))
2239 (synopsis "Measure, monitor and analyze memory behavior")
2241 "Pympler is a development tool to measure, monitor and analyze
2242 the memory behavior of Python objects in a running Python application.
2244 By pympling a Python application, detailed insight in the size and the
2245 lifetime of Python objects can be obtained. Undesirable or unexpected
2246 runtime behavior like memory bloat and other @samp{pymples} can easily
2249 A web profiling frontend exposes process statistics, garbage
2250 visualisation and class tracker statistics.")
2251 (license license:asl2.0)))
2253 (define-public python2-pympler
2254 (package-with-python2 python-pympler))
2256 (define-public python-itsdangerous
2258 (name "python-itsdangerous")
2263 (uri (pypi-uri "itsdangerous" version))
2266 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2267 (build-system python-build-system)
2268 (home-page "https://palletsprojects.com/p/itsdangerous/")
2269 (synopsis "Python library for passing data to/from untrusted environments")
2271 "Itsdangerous provides various helpers to pass trusted data to untrusted
2272 environments and back.")
2273 (license license:bsd-3)))
2275 (define-public python2-itsdangerous
2276 (package-with-python2 python-itsdangerous))
2278 (define-public python-pyyaml
2280 (name "python-pyyaml")
2285 (uri (pypi-uri "PyYAML" version))
2288 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2289 (build-system python-build-system)
2291 `(("libyaml" ,libyaml)))
2292 (home-page "http://pyyaml.org/wiki/PyYAML")
2293 (synopsis "YAML parser and emitter for Python")
2295 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2296 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2297 API, and sensible error messages. PyYAML supports standard YAML tags and
2298 provides Python-specific tags that allow to represent an arbitrary Python
2300 (license license:expat)))
2302 (define-public python2-pyyaml
2303 (package-with-python2 python-pyyaml))
2305 (define-public python-vine
2307 (name "python-vine")
2312 (uri (pypi-uri "vine" version))
2315 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2316 (build-system python-build-system)
2318 `(("python-pytest" ,python-pytest)
2319 ("python-case" ,python-case)))
2320 (home-page "https://github.com/celery/vine")
2321 (synopsis "Promises for Python")
2323 "@code{vine} provides a special implementation of promises in that it can
2324 be used both for \"promise of a value\" and lazy evaluation. The biggest
2325 upside for this is that everything in a promise can also be a promise,
2326 e.g. filters, callbacks and errbacks can all be promises.")
2327 (license license:bsd-3)))
2329 (define-public python-virtualenv
2331 (name "python-virtualenv")
2336 (uri (pypi-uri "virtualenv" version))
2339 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2340 (build-system python-build-system)
2343 (modify-phases %standard-phases
2344 (add-before 'check 'disable-failing-test
2346 ;; Disable failing test. See upstream bug report
2347 ;; https://github.com/pypa/virtualenv/issues/957
2348 (substitute* "tests/test_virtualenv.py"
2349 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2352 `(("python-mock" ,python-mock)
2353 ("python-pytest" ,python-pytest)))
2354 (home-page "https://virtualenv.pypa.io/")
2355 (synopsis "Virtual Python environment builder")
2357 "Virtualenv is a tool to create isolated Python environments.")
2358 (license license:expat)))
2360 (define-public python2-virtualenv
2361 (package-with-python2 python-virtualenv))
2363 (define-public python-markupsafe
2365 (name "python-markupsafe")
2370 (uri (pypi-uri "MarkupSafe" version))
2373 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2374 (build-system python-build-system)
2376 `(#:modules ((ice-9 ftw)
2380 (guix build python-build-system))
2381 #:phases (modify-phases %standard-phases
2384 (let ((cwd (getcwd))
2385 (libdir (find (cut string-prefix? "lib." <>)
2386 (scandir "build"))))
2387 (setenv "PYTHONPATH"
2388 (string-append cwd "/build/" libdir ":"
2389 (getenv "PYTHONPATH")))
2390 (invoke "pytest" "-vv")))))))
2392 `(("python-pytest" ,python-pytest)))
2393 (home-page "https://github.com/mitsuhiko/markupsafe")
2394 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2396 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2398 (license license:bsd-3)))
2400 (define-public python2-markupsafe
2401 (package-with-python2 python-markupsafe))
2403 (define-public python-jinja2
2405 (name "python-jinja2")
2410 (uri (pypi-uri "Jinja2" version))
2413 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2414 (build-system python-build-system)
2416 `(("python-markupsafe" ,python-markupsafe)))
2417 (home-page "http://jinja.pocoo.org/")
2418 (synopsis "Python template engine")
2420 "Jinja2 is a small but fast and easy to use stand-alone template engine
2421 written in pure Python.")
2422 (license license:bsd-3)))
2424 (define-public python2-jinja2
2425 (package-with-python2 python-jinja2))
2427 (define-public python-pystache
2429 (name "python-pystache")
2433 (uri (pypi-uri "pystache" version))
2436 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2437 (build-system python-build-system)
2439 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2440 (home-page "http://defunkt.io/pystache/")
2441 (synopsis "Python logic-less template engine")
2443 "Pystache is a Python implementation of the framework agnostic,
2444 logic-free templating system Mustache.")
2445 (license license:expat)
2446 (properties `((python2-variant . ,(delay python2-pystache))))))
2448 (define-public python2-pystache
2449 (package (inherit (package-with-python2
2450 (strip-python2-variant python-pystache)))
2452 `(#:python ,python-2
2454 (modify-phases %standard-phases
2457 (invoke "python" "test_pystache.py"))))))))
2459 (define-public python-joblib
2461 (name "python-joblib")
2465 (uri (pypi-uri "joblib" version))
2468 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2469 (build-system python-build-system)
2472 (modify-phases %standard-phases
2474 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2476 `(("python-pytest" ,python-pytest)))
2477 (home-page "https://joblib.readthedocs.io/")
2478 (synopsis "Using Python functions as pipeline jobs")
2480 "Joblib is a set of tools to provide lightweight pipelining in Python.
2481 In particular, joblib offers: transparent disk-caching of the output values
2482 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2483 logging and tracing of the execution.")
2484 (license license:bsd-3)))
2486 (define-public python2-joblib
2487 (package-with-python2 python-joblib))
2489 (define-public python-daemon
2491 (name "python-daemon")
2496 (uri (pypi-uri "python-daemon" version))
2499 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2500 (build-system python-build-system)
2503 (modify-phases %standard-phases
2504 (add-before 'check 'disable-tests
2506 ;; FIXME: Determine why test fails
2507 (substitute* "test/test_daemon.py"
2508 (("test_detaches_process_context")
2509 "skip_test_detaches_process_context"))
2512 `(("python-lockfile" ,python-lockfile)))
2514 `(("python-unittest2" ,python-unittest2)
2515 ("python-testtools" ,python-testtools)
2516 ("python-testscenarios" ,python-testscenarios)
2517 ("python-mock" ,python-mock)
2518 ("python-docutils" ,python-docutils)))
2519 (home-page "https://pagure.io/python-daemon/")
2520 (synopsis "Python library for making a Unix daemon process")
2521 (description "Python-daemon is a library that assists a Python program to
2522 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2524 This library provides a @code{DaemonContext} class that manages the following
2525 important tasks for becoming a daemon process:
2527 @item Detach the process into its own process group.
2528 @item Set process environment appropriate for running inside a chroot.
2529 @item Renounce suid and sgid privileges.
2530 @item Close all open file descriptors.
2531 @item Change the working directory, uid, gid, and umask.
2532 @item Set appropriate signal handlers.
2533 @item Open new file descriptors for stdin, stdout, and stderr.
2534 @item Manage a specified PID lock file.
2535 @item Register cleanup functions for at-exit processing.
2537 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2538 (license (list license:asl2.0 license:gpl3+))))
2540 (define-public python-docutils
2542 (name "python-docutils")
2547 (uri (pypi-uri "docutils" version))
2550 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2551 (build-system python-build-system)
2553 '(#:tests? #f)) ; no setup.py test command
2554 (home-page "http://docutils.sourceforge.net/")
2555 (synopsis "Python Documentation Utilities")
2557 "Docutils is a modular system for processing documentation into useful
2558 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2560 ;; Most of the source code is public domain, but some source files are
2561 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2562 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2564 (define-public python2-docutils
2565 (package-with-python2 python-docutils))
2567 (define-public python-pygments
2569 (name "python-pygments")
2574 (uri (pypi-uri "Pygments" version))
2577 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2578 (build-system python-build-system)
2580 ;; FIXME: Tests require sphinx, which depends on this.
2582 (home-page "http://pygments.org/")
2583 (synopsis "Syntax highlighting")
2585 "Pygments is a syntax highlighting package written in Python.")
2586 (license license:bsd-2)))
2588 (define-public python2-pygments
2589 (package-with-python2 python-pygments))
2591 (define-public python-bumpversion
2593 (name "python-bumpversion")
2598 (uri (pypi-uri "bumpversion" version))
2601 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2602 (build-system python-build-system)
2603 (home-page "https://github.com/peritus/bumpversion")
2604 (synopsis "Tool to bump software version")
2605 (description "This tool provides a command-line interface (CLI) to bump a
2606 software version simply.")
2607 (license license:expat)))
2609 (define-public python-deprecated
2611 (name "python-deprecated")
2617 (url "https://github.com/tantale/deprecated.git")
2618 (commit (string-append "v" version))))
2619 (file-name (git-file-name name version))
2622 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2623 (build-system python-build-system)
2625 `(#:phases (modify-phases %standard-phases
2628 (invoke "pytest"))))))
2630 `(("python-wrapt" ,python-wrapt)))
2632 `(("python-bumpversion" ,python-bumpversion)
2633 ("python-pytest" ,python-pytest)
2634 ("python-pytest-cov" ,python-pytest-cov)
2635 ("python-sphinx" ,python-sphinx)
2636 ("python-tox" ,python-tox)))
2637 (home-page "https://github.com/tantale/deprecated")
2638 (synopsis "Python decorator to deprecate classes, functions or methods")
2639 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2640 to deprecate classes, functions or methods.")
2641 (license license:expat)))
2643 (define-public python-pygithub
2645 (name "python-pygithub")
2648 ;; We fetch from the Git repo because there are no tests in the PyPI
2653 (url "https://github.com/PyGithub/PyGithub.git")
2654 (commit (string-append "v" version))))
2655 (file-name (git-file-name name version))
2658 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2659 (build-system python-build-system)
2661 `(#:phases (modify-phases %standard-phases
2662 ;; Some tests rely on the network.
2663 (add-after 'unpack 'disable-failing-tests
2665 (substitute* "tests/Issue142.py"
2666 (("testDecodeJson") "disabled_testDecodeJson"))
2668 (add-before 'check 'prepare-for-tests
2670 (for-each (lambda (f)
2672 (find-files "./tests"))
2673 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2674 (setenv "PYTHONPATH"
2675 (string-append "./tests:" (getenv "PYTHONPATH")))
2678 `(("python-deprecated" ,python-deprecated)
2679 ("python-pyjwt" ,python-pyjwt)
2680 ("python-requests" ,python-requests)))
2681 (native-inputs `(("python-httpretty" ,python-httpretty)))
2682 (home-page "https://pygithub.readthedocs.io/en/latest/")
2683 (synopsis "Python library for the GitHub API")
2684 (description "This library allows managing GitHub resources such as
2685 repositories, user profiles, and organizations in your Python applications,
2686 using version 3 of the GitHub application programming interface (API).")
2687 (license license:lgpl3+)))
2689 (define-public python-rellu
2691 (name "python-rellu")
2696 (uri (pypi-uri "rellu" version))
2699 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2700 (build-system python-build-system)
2702 `(("python-invoke" ,python-invoke)
2703 ("python-pygithub" ,python-pygithub)))
2704 (home-page "https://github.com/robotframework/rellu")
2705 (synopsis "Utilities to create PyPI releases")
2706 (description "This collection of utilities contains tooling and templates
2707 to assist in creating releases on GitHub and publishing them on PyPI. It is
2708 designed to be used by Robot Framework and tools and libraries in its
2709 ecosystem, but can naturally be used also by other projects.")
2710 (license license:asl2.0)))
2712 (define-public python-robotframework
2714 (name "python-robotframework")
2716 ;; There are no tests in the PyPI archive.
2721 (url "https://github.com/robotframework/robotframework.git")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2725 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2726 (patches (search-patches
2727 "python-robotframework-honor-source-date-epoch.patch"))))
2728 (build-system python-build-system)
2730 `(#:phases (modify-phases %standard-phases
2731 (add-before 'build 'build-and-install-doc
2732 (lambda* (#:key outputs #:allow-other-keys)
2733 (let* ((doc-output (assoc-ref outputs "doc"))
2734 (doc (string-append doc-output "/share/"
2735 ,name "-" ,version "/")))
2736 (invoke "invoke" "library-docs" "all")
2738 (copy-recursively "doc/libraries"
2739 (string-append doc "/libraries"))
2743 (invoke "python" "utest/run.py"))))))
2745 `(("python-invoke" ,python-invoke)
2746 ("python-rellu" ,python-rellu)
2747 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2748 (outputs '("out" "doc"))
2749 (home-page "https://robotframework.org")
2750 (synopsis "Generic automation framework")
2751 (description "Robot Framework is a generic automation framework for
2752 acceptance testing, acceptance test driven development (ATDD), and robotic
2753 process automation (RPA).")
2754 (license license:asl2.0)))
2756 (define-public python-robotframework-lint
2757 ;; There is no properly tagged release; the commit below seems to correspond
2758 ;; to the 0.9 stable release available from PyPI. The tests are not
2759 ;; included in the PyPI archive, so we fetch the sources from the upstream
2761 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2764 (name "python-robotframework-lint")
2765 (version (git-version "0.9.0" revision commit))
2770 (url "https://github.com/boakley/robotframework-lint.git")
2772 (file-name (git-file-name name version))
2775 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2776 (build-system python-build-system)
2779 (modify-phases %standard-phases
2782 (invoke "python" "-m" "robot" "-A"
2783 "tests/conf/default.args" "tests"))))))
2785 `(("python-robotframework" ,python-robotframework)))
2786 (home-page "https://github.com/boakley/robotframework-lint/")
2787 (synopsis "Static analysis tool (linter) for Robot Framework")
2788 (description "This package provides the @code{rflint} command-line
2789 utility, a static analysis tool (linter) for Robot Framework source files.")
2790 (license license:asl2.0))))
2792 (define-public python-robotframework-sshlibrary
2794 (name "python-robotframework-sshlibrary")
2796 ;; There are no tests in the PyPI archive.
2801 (url "https://github.com/robotframework/SSHLibrary.git")
2802 (commit (string-append "v" version))))
2803 (file-name (git-file-name name version))
2806 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2807 (build-system python-build-system)
2810 (modify-phases %standard-phases
2811 (add-before 'build 'build-and-install-doc
2812 (lambda* (#:key outputs #:allow-other-keys)
2813 (let* ((doc-output (assoc-ref outputs "doc"))
2814 (doc (string-append doc-output "/share/"
2815 ,name "-" ,version "/")))
2816 (invoke "chmod" "-R" "+w" "docs")
2817 (invoke "invoke" "kw-docs" "project-docs")
2819 (for-each delete-file (find-files "docs" "\\.rst"))
2820 (copy-recursively "docs" doc)
2824 ;; Some tests require an SSH server; we remove them.
2825 (delete-file "utest/test_client_api.py")
2826 (delete-file "utest/test_scp.py")
2827 (invoke "python" "utest/run.py"))))))
2829 `(("python-robotframework" ,python-robotframework)
2830 ("python-paramiko" ,python-paramiko)
2831 ("python-scp" ,python-scp)))
2833 `(("openssh" ,openssh)
2835 ;; To generate the documentation
2836 ("python-docutils" ,python-docutils)
2837 ("python-invoke" ,python-invoke)
2838 ("python-pygments" ,python-pygments)
2839 ("python-rellu" ,python-rellu)))
2840 (outputs '("out" "doc"))
2841 (home-page "https://github.com/robotframework/SSHLibrary")
2842 (synopsis "Robot Framework library for SSH and SFTP")
2843 (description "SSHLibrary is a Robot Framework library providing support
2844 for SSH and SFTP. It has the following main usages:
2846 @item Executing commands on the remote machine, either blocking or non-blocking.
2847 @item Writing and reading in an interactive shell.
2848 @item Transferring files and directories over SFTP.
2849 @item Ensuring that files and directories exist on the remote machine.
2851 (license license:asl2.0)))
2853 (define-public python-scp
2860 (uri (pypi-uri "scp" version))
2863 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2864 (build-system python-build-system)
2866 '(#:tests? #f)) ;tests require an SSH server
2868 `(("python-paramiko" ,python-paramiko)))
2869 (home-page "https://github.com/jbardin/scp.py")
2870 (synopsis "SCP protocol module for Python and Paramiko")
2871 (description "The scp module extends the Paramiko library to send and
2872 receive files via the SCP1 protocol, as implemented by the OpenSSH
2873 @command{scp} program.")
2874 (license license:gpl2+)))
2876 (define-public python-rst.linker
2878 (name "python-rst.linker")
2883 (uri (pypi-uri "rst.linker" version))
2886 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2887 (build-system python-build-system)
2889 `(("python-dateutil" ,python-dateutil)
2890 ("python-six" ,python-six)))
2892 `(("python-setuptools-scm" ,python-setuptools-scm)))
2893 ;; Test would require path.py, which would introduce a cyclic dependence.
2894 (arguments `(#:tests? #f))
2895 ;; Note: As of version 1.7 the documentation is not worth building.
2896 (home-page "https://github.com/jaraco/rst.linker")
2897 (synopsis "Sphinx plugin to add links and timestamps")
2898 (description "rst.linker allows to automatically replace text by a
2899 reStructuredText external reference or timestamps. It's primary purpose is to
2900 augment the changelog, but it can be used for other documents, too.")
2901 (license license:expat)))
2903 (define-public python2-rst.linker
2904 (package-with-python2 python-rst.linker))
2906 (define-public python-feedgenerator
2908 (name "python-feedgenerator")
2913 (uri (pypi-uri "feedgenerator" version))
2916 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2917 (modules '((guix build utils)))
2920 ;; Remove pre-compiled .pyc files from source.
2921 (for-each delete-file-recursively
2922 (find-files "." "__pycache__" #:directories? #t))
2923 (for-each delete-file (find-files "." "\\.pyc$"))
2925 (build-system python-build-system)
2927 `(("python-pytz" ,python-pytz)
2928 ("python-six" ,python-six)))
2929 (home-page "https://github.com/getpelican/feedgenerator")
2931 "Standalone version of Django's Atom/RSS feed generator")
2933 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2934 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2935 (license license:bsd-3)))
2937 (define-public python2-feedgenerator
2938 (package-with-python2 python-feedgenerator))
2940 (define-public python-toml
2942 (name "python-toml")
2947 (uri (pypi-uri "toml" version))
2950 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2951 (build-system python-build-system)
2953 `(#:tests? #f)) ;no tests suite in release
2954 (home-page "https://github.com/uiri/toml")
2955 (synopsis "Library for TOML")
2957 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2958 Language (TOML) configuration files.")
2959 (license license:expat)))
2961 (define-public python-jsonrpc-server
2963 (name "python-jsonrpc-server")
2968 (uri (pypi-uri "python-jsonrpc-server" version))
2971 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2972 (build-system python-build-system)
2974 `(("python-future" ,python-future)
2975 ("python-mock" ,python-mock)
2976 ("python-pytest" ,python-pytest)))
2978 "https://github.com/palantir/python-jsonrpc-server")
2979 (synopsis "JSON RPC 2.0 server library")
2981 "This package provides a JSON RPC 2.0 server library for Python.")
2982 (license license:expat)))
2984 (define-public python-pydocstyle
2986 (name "python-pydocstyle")
2991 (uri (pypi-uri "pydocstyle" version))
2994 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2995 (build-system python-build-system)
2997 `(("python-six" ,python-six)
2998 ("python-snowballstemmer" ,python-snowballstemmer)))
3000 "https://github.com/PyCQA/pydocstyle/")
3001 (synopsis "Python docstring style checker")
3003 "This package provides a style checker for the Python Language
3005 (license license:expat)))
3007 ;; XXX: We must use a non-release version since the latest release version
3008 ;; requires python-jedi version < 0.15.
3009 (define-public python-language-server
3010 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3013 (name "python-language-server")
3014 (version (git-version "0.28.3" revision commit))
3019 (url "https://github.com/palantir/python-language-server.git")
3023 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3024 (build-system python-build-system)
3026 `(("python-pluggy" ,python-pluggy)
3027 ("python-jsonrpc-server" ,python-jsonrpc-server)
3028 ("python-jedi" ,python-jedi)
3029 ("python-yapf" ,python-yapf)
3030 ("python-pyflakes" ,python-pyflakes)
3031 ("python-pydocstyle" ,python-pydocstyle)
3032 ("python-pycodestyle" ,python-pycodestyle)
3033 ("python-mccabe" ,python-mccabe)
3034 ("python-rope" ,python-rope)
3035 ("python-autopep8" ,python-autopep8)
3036 ("python-pylint" ,python-pylint)))
3037 (home-page "https://github.com/palantir/python-language-server")
3038 (synopsis "Python implementation of the Language Server Protocol")
3040 "The Python Language Server (pyls) is an implementation of the Python 3
3041 language specification for the Language Server Protocol (LSP). This tool is
3042 used in text editing environments to provide a complete and integrated
3043 feature-set for programming Python effectively.")
3044 (license license:expat))))
3046 (define-public python-black
3048 (name "python-black")
3053 (uri (pypi-uri "black" version))
3056 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3057 (build-system python-build-system)
3060 (modify-phases %standard-phases
3061 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3063 (let ((python3 (which "python3")))
3064 (substitute* '("tests/data/fmtonoff.py"
3065 "tests/data/string_prefixes.py"
3066 "tests/data/function.py")
3067 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3068 (string-append "#!" python3 (if (string? minor-version)
3072 `(("python-click" ,python-click)
3073 ("python-attrs" ,python-attrs)
3074 ("python-appdirs" ,python-appdirs)
3075 ("python-toml" ,python-toml)))
3076 (home-page "https://github.com/ambv/black")
3077 (synopsis "The uncompromising code formatter")
3078 (description "Black is the uncompromising Python code formatter.")
3079 (license license:expat)))
3081 (define-public python-blinker
3083 (name "python-blinker")
3088 (uri (pypi-uri "blinker" version))
3091 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3092 (build-system python-build-system)
3093 (home-page "http://pythonhosted.org/blinker/")
3094 (synopsis "Fast, simple object-to-object and broadcast signaling")
3096 "Blinker provides a fast dispatching system that allows any number of
3097 interested parties to subscribe to events, or \"signals\".")
3098 (license license:expat)))
3100 (define-public python2-blinker
3101 (package-with-python2 python-blinker))
3103 (define-public pelican
3110 (uri (pypi-uri "pelican" version))
3113 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3114 (build-system python-build-system)
3116 `(("python-feedgenerator" ,python-feedgenerator)
3117 ("python-jinja2" ,python-jinja2)
3118 ("python-pygments" ,python-pygments)
3119 ("python-docutils" ,python-docutils)
3120 ("python-pytz" ,python-pytz)
3121 ("python-blinker" ,python-blinker)
3122 ("python-unidecode" ,python-unidecode)
3123 ("python-six" ,python-six)
3124 ("python-dateutil" ,python-dateutil)
3125 ("python-markdown" ,python-markdown)))
3126 (home-page "https://getpelican.com/")
3128 `(;; XXX Requires a lot more packages to do unit tests :P
3130 #:phases (modify-phases %standard-phases
3132 'install 'adjust-requires
3133 ;; Since feedgenerator is installed from git, it doesn't
3134 ;; conform to the version requirements.
3136 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3137 ;; version requirement so setuptools doesn't get confused.
3139 (substitute* "setup.py"
3140 (("['\"]feedgenerator.*?['\"]")
3141 "'feedgenerator'")))))))
3142 (synopsis "Python-based static site publishing system")
3144 "Pelican is a tool to generate a static blog from reStructuredText,
3145 Markdown input files, and more. Pelican uses Jinja2 for templating
3146 and is very extensible.")
3147 (license license:agpl3+)))
3149 (define-public mallard-ducktype
3151 (name "mallard-ducktype")
3156 ;; git-reference because tests are not included in pypi source tarball
3157 ;; https://issues.guix.gnu.org/issue/36755#2
3159 (url "https://github.com/projectmallard/mallard-ducktype.git")
3161 (file-name (git-file-name name version))
3164 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3165 (build-system python-build-system)
3168 (modify-phases %standard-phases
3171 (with-directory-excursion "tests"
3172 (invoke "sh" "runtests")))))))
3173 (home-page "http://projectmallard.org")
3174 (synopsis "Convert Ducktype to Mallard documentation markup")
3176 "Ducktype is a lightweight syntax that can represent all the semantics
3177 of the Mallard XML documentation system. Ducktype files can be converted to
3178 Mallard using the @command{ducktype} tool. The yelp-tools package
3179 provides additional functionality on the produced Mallard documents.")
3180 (license license:expat)))
3182 (define-public python-scikit-image
3184 (name "python-scikit-image")
3189 (uri (pypi-uri "scikit-image" version))
3191 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3192 (build-system python-build-system)
3194 ;; TODO: Some tests require running X11 server. Disable them?
3196 ;; See DEPENDS.txt for the list of build and run time requiremnts
3198 `(("python-cloudpickle" ,python-cloudpickle)
3199 ("python-dask" ,python-dask)
3200 ("python-matplotlib" ,python-matplotlib)
3201 ("python-networkx" ,python-networkx)
3202 ("python-numpy" ,python-numpy)
3203 ("python-pillow" ,python-pillow)
3204 ("python-pywavelets" ,python-pywavelets)
3205 ("python-scipy" ,python-scipy)
3206 ("python-six" ,python-six)))
3208 `(("python-cython" ,python-cython)))
3209 (home-page "http://scikit-image.org/")
3210 (synopsis "Image processing in Python")
3212 "Scikit-image is a collection of algorithms for image processing.")
3213 (license license:bsd-3)))
3215 (define-public python2-scikit-image
3216 (package-with-python2 python-scikit-image))
3218 (define-public python-cython
3220 (name "python-cython")
3225 (uri (pypi-uri "Cython" version))
3228 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3229 (build-system python-build-system)
3230 ;; we need the full python package and not just the python-wrapper
3231 ;; because we need libpython3.3m.so
3233 `(("python" ,python)))
3236 (modify-phases %standard-phases
3237 (add-before 'check 'set-HOME
3238 ;; some tests require access to "$HOME/.cython"
3239 (lambda _ (setenv "HOME" "/tmp") #t))
3241 ;; FIXME: These tests started failing on armhf after the 0.28 update
3242 ;; (commit c69d11c5930), both with an error such as this:
3243 ;; compiling (cpp) and running dictcomp ...
3244 ;; === C/C++ compiler error output: ===
3246 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3247 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3248 ,@(if (target-arm32?)
3249 `((add-before 'check 'disable-failing-tests
3251 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3252 (for-each (lambda (test)
3253 (format disabled-tests "~a\n" test))
3254 '("memslice" "dictcomp"))
3255 (close-port disabled-tests)))))
3260 ;; Disable compiler optimizations to greatly reduce the running
3261 ;; time of the test suite.
3262 (setenv "CFLAGS" "-O0")
3264 (invoke "python" "runtests.py" "-vv"
3265 "-j" (number->string (parallel-job-count))))))))
3266 (home-page "https://cython.org/")
3267 (synopsis "C extensions for Python")
3268 (description "Cython is an optimising static compiler for both the Python
3269 programming language and the extended Cython programming language. It makes
3270 writing C extensions for Python as easy as Python itself.")
3271 (license license:asl2.0)
3272 (properties `((python2-variant . ,(delay python2-cython))))))
3274 (define-public python2-cython
3275 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3278 (name "python2-cython")
3280 `(("python-2" ,python-2))) ;this is not automatically changed
3282 (substitute-keyword-arguments (package-arguments base)
3284 `(modify-phases ,phases
3285 (add-before 'check 'adjust-test_embed
3287 (substitute* "runtests.py"
3288 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3289 ;; so it can give the right -L flag to GCC when embedding static
3290 ;; builds of Python. It is unaware that the Python "config"
3291 ;; directory (where the static library lives) was renamed in
3292 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3293 ;; which works fine, because that is where the shared library is.
3295 ;; It also appears to be unaware that the Makefile in Demos/embed
3296 ;; already unconditionally pass the static library location to GCC,
3297 ;; after checking sysconfig.get_config_var('LIBPL).
3299 ;; The effect is that the linker is unable to resolve libexpat
3300 ;; symbols when building for Python 2, because neither the Python 2
3301 ;; shared library nor Expat is available. To fix it, we can either
3302 ;; add Expat as an input and make it visible to the linker, or just
3303 ;; prevent it from overriding the Python shared library location.
3304 ;; The end result is identical, so we take the easy route.
3305 ((" or libname not in os\\.listdir\\(libdir\\)")
3309 ;; The RPython toolchain currently does not support Python 3.
3310 (define-public python2-rpython
3312 (name "python2-rpython")
3317 (uri (pypi-uri "rpython" version))
3320 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3321 (build-system python-build-system)
3322 (arguments `(#:python ,python-2))
3324 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3325 (home-page "https://rpython.readthedocs.org")
3326 (synopsis "Framework for implementing interpreters and virtual machines")
3327 (description "RPython is a translation and support framework for
3328 producing implementations of dynamic languages, emphasizing a clean separation
3329 between language specification and implementation aspects.")
3330 (license license:expat)))
3332 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3333 ;; python-scipy still build, as these three packages are often used together.
3334 (define-public python-numpy
3336 (name "python-numpy")
3342 "https://github.com/numpy/numpy/releases/download/v"
3343 version "/numpy-" version ".tar.gz"))
3346 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3347 (build-system python-build-system)
3349 `(("openblas" ,openblas)
3350 ("lapack" ,lapack)))
3352 `(("python-cython" ,python-cython)
3353 ("python-pytest" ,python-pytest)
3354 ("gfortran" ,gfortran)))
3357 (modify-phases %standard-phases
3358 (add-before 'build 'configure-blas-lapack
3359 (lambda* (#:key inputs #:allow-other-keys)
3360 (call-with-output-file "site.cfg"
3364 libraries = openblas
3365 library_dirs = ~a/lib
3366 include_dirs = ~a/include
3368 # backslash-n to make emacs happy
3370 lapack_libs = lapack
3371 library_dirs = ~a/lib
3372 include_dirs = ~a/include
3374 (assoc-ref inputs "openblas")
3375 (assoc-ref inputs "openblas")
3376 (assoc-ref inputs "lapack")
3377 (assoc-ref inputs "lapack"))))
3379 (add-before 'build 'fix-executable-paths
3380 (lambda* (#:key inputs #:allow-other-keys)
3381 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3382 ;; instead of /bin/sh.
3383 (substitute* "numpy/distutils/exec_command.py"
3384 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3385 (string-append match-start (assoc-ref inputs "bash") match-end)))
3386 ;; Use "gcc" executable, not "cc".
3387 (substitute* "numpy/distutils/system_info.py"
3388 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3389 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3391 ;; Tests can only be run after the library has been installed and not
3392 ;; within the source directory.
3394 (add-after 'install 'check
3395 (lambda* (#:key outputs inputs #:allow-other-keys)
3396 ;; Make installed package available for running the tests
3397 (add-installed-pythonpath inputs outputs)
3398 ;; Make sure "f2py" etc is found.
3399 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3400 ":" (getenv "PATH")))
3401 (with-directory-excursion "/tmp"
3402 (invoke "python" "-c"
3403 "import numpy; numpy.test(verbose=2)")))))))
3404 (home-page "http://www.numpy.org/")
3405 (synopsis "Fundamental package for scientific computing with Python")
3406 (description "NumPy is the fundamental package for scientific computing
3407 with Python. It contains among other things: a powerful N-dimensional array
3408 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3409 and Fortran code, useful linear algebra, Fourier transform, and random number
3411 (license license:bsd-3)))
3413 (define-public python2-numpy
3414 (package-with-python2 python-numpy))
3416 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3417 ;; interest only for legacy code going back to NumPy's predecessor
3419 (define-public python2-numpy-1.8
3420 (package (inherit python2-numpy)
3426 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3427 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3430 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3432 (substitute-keyword-arguments (package-arguments python2-numpy)
3434 `(modify-phases ,phases
3435 (replace 'configure-blas-lapack
3436 (lambda* (#:key inputs #:allow-other-keys)
3437 (call-with-output-file "site.cfg"
3441 libraries = openblas,lapack
3442 library_dirs = ~a/lib:~a/lib
3443 include_dirs = ~a/include:~a/include
3445 (assoc-ref inputs "openblas")
3446 (assoc-ref inputs "lapack")
3447 (assoc-ref inputs "openblas")
3448 (assoc-ref inputs "lapack"))))
3451 `(("python2-nose" ,python2-nose)))
3452 (description "NumPy is the fundamental package for scientific computing
3453 with Python. It contains among other things: a powerful N-dimensional array
3454 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3455 and Fortran code, useful linear algebra, Fourier transform, and random number
3456 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3457 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3459 (license license:bsd-3)))
3461 (define-public python-munch
3463 (name "python-munch")
3468 (uri (pypi-uri "munch" version))
3471 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3472 (build-system python-build-system)
3473 (home-page "https://github.com/Infinidat/munch")
3474 (synopsis "Dot-accessible dictionary")
3475 (description "Munch is a dot-accessible dictionary similar to JavaScript
3477 (license license:expat)))
3479 (define-public python2-munch
3480 (package-with-python2 python-munch))
3482 (define-public python-colormath
3484 (name "python-colormath")
3489 (uri (pypi-uri "colormath" version))
3492 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3493 (build-system python-build-system)
3495 `(("python-networkx" ,python-networkx)
3496 ("python-numpy" ,python-numpy)))
3497 (home-page "https://github.com/gtaylor/python-colormath")
3498 (synopsis "Color math and conversion library")
3500 "This is a Python library for color math and conversions.")
3501 (license license:bsd-3)))
3503 (define-public python2-colormath
3504 (package-with-python2 python-colormath))
3506 (define-public python-spectra
3508 (name "python-spectra")
3513 (uri (pypi-uri "spectra" version))
3516 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3517 (build-system python-build-system)
3520 (modify-phases %standard-phases
3522 (lambda _ (invoke "nosetests" "-v"))))))
3524 `(("python-colormath" ,python-colormath)))
3526 `(("python-nose" ,python-nose)))
3527 (home-page "https://github.com/jsvine/spectra")
3528 (synopsis "Color scales and color conversion")
3530 "This package provides a Python library intended to make color math,
3531 color scales, and color space conversion easy. It has support for:
3536 @item Color blending
3537 @item Brightening/darkening colors
3538 @item Saturating/desaturating colors
3539 @item Conversion to/from multiple color spaces.
3541 (license license:expat)))
3543 (define-public python2-spectra
3544 (package-with-python2 python-spectra))
3546 (define-public python-numpy-documentation
3548 (name "python-numpy-documentation")
3549 (version (package-version python-numpy))
3550 (source (package-source python-numpy))
3551 (build-system python-build-system)
3553 `(("python-matplotlib" ,python-matplotlib)
3554 ("python-numpy" ,python-numpy)
3555 ("pkg-config" ,pkg-config)
3556 ("python-sphinx" ,python-sphinx)
3557 ("python-numpydoc" ,python-numpydoc)
3558 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3560 texlive-generic-ifxetex
3561 texlive-generic-pdftex
3563 texlive-latex-capt-of
3565 texlive-latex-environ
3566 texlive-latex-eqparbox
3567 texlive-latex-etoolbox
3568 texlive-latex-expdlist
3569 texlive-latex-fancyhdr
3570 texlive-latex-fancyvrb
3571 texlive-latex-fncychap
3573 texlive-latex-framed
3574 texlive-latex-geometry
3575 texlive-latex-graphics
3576 texlive-latex-hyperref
3577 texlive-latex-mdwtools
3578 texlive-latex-multirow
3579 texlive-latex-needspace
3580 texlive-latex-oberdiek
3581 texlive-latex-parskip
3582 texlive-latex-preview
3583 texlive-latex-tabulary
3584 texlive-latex-threeparttable
3585 texlive-latex-titlesec
3586 texlive-latex-trimspaces
3588 texlive-latex-upquote
3590 texlive-latex-varwidth
3591 texlive-latex-wrapfig)))
3592 ("texinfo" ,texinfo)
3594 ("scipy-sphinx-theme"
3595 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3598 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3599 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3602 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3603 ,@(package-native-inputs python-numpy)))
3605 `(#:tests? #f ; we're only generating the documentation
3607 (modify-phases %standard-phases
3610 (lambda* (#:key inputs outputs #:allow-other-keys)
3611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3613 data "/doc/" ,name "-"
3614 ,(package-version python-numpy)))
3615 (info-reader (string-append data "/info"))
3616 (html (string-append doc "/html"))
3617 (scipy-sphinx-theme "scipy-sphinx-theme")
3618 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3619 (pyver ,(string-append "PYVER=")))
3621 ;; FIXME: this is needed to for texlive-union to generate
3622 ;; fonts, which are not found.
3623 (setenv "HOME" "/tmp")
3625 (with-directory-excursion "doc"
3626 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3628 (invoke "make" "html" pyver)
3629 (invoke "make" "latex" "PAPER=a4" pyver)
3630 (invoke "make" "-C" "build/latex"
3631 "all-pdf" "PAPER=a4" pyver)
3632 ;; FIXME: Generation of the info file fails.
3633 ;; (invoke "make" "info" pyver)
3635 ;; (copy-file "build/texinfo/numpy.info"
3636 ;; (string-append info "/numpy.info"))
3637 (for-each (lambda (file)
3638 (copy-file (string-append "build/latex" file)
3639 (string-append doc file)))
3640 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3641 (with-directory-excursion "build/html"
3642 (for-each (lambda (file)
3643 (let* ((dir (dirname file))
3644 (tgt-dir (string-append html "/" dir)))
3645 (unless (equal? "." dir)
3647 (install-file file html)))
3648 (find-files "." ".*")))))
3650 (home-page (package-home-page python-numpy))
3651 (synopsis "Documentation for the python-numpy package")
3652 (description (package-description python-numpy))
3653 (license (package-license python-numpy))))
3655 (define-public python2-numpy-documentation
3656 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3658 (inherit numpy-documentation)
3659 (native-inputs `(("python2-functools32" ,python2-functools32)
3660 ,@(package-native-inputs numpy-documentation))))))
3662 (define-public python-pygit2
3664 (name "python-pygit2")
3669 (uri (pypi-uri "pygit2" version))
3671 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3672 (build-system python-build-system)
3674 '(#:tests? #f)) ; tests don't run correctly in our environment
3676 `(("python-six" ,python-six)
3677 ("python-cffi" ,python-cffi)
3678 ("libgit2" ,libgit2)
3679 ("python-tox" ,python-tox)))
3681 `(("python-pytest" ,python-pytest)))
3682 (home-page "https://github.com/libgit2/pygit2")
3683 (synopsis "Python bindings for libgit2")
3684 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3685 library, libgit2 implements Git plumbing.")
3686 ;; GPL2.0 only, with linking exception.
3687 (license license:gpl2)))
3689 (define-public python2-pygit2
3690 (package-with-python2 python-pygit2))
3692 (define-public python-pyparsing
3694 (name "python-pyparsing")
3699 (uri (pypi-uri "pyparsing" version))
3701 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3702 (build-system python-build-system)
3703 (outputs '("out" "doc"))
3705 `(#:tests? #f ; no test target
3707 (modify-phases %standard-phases
3708 (add-after 'install 'install-doc
3709 (lambda* (#:key outputs #:allow-other-keys)
3710 (let* ((doc (string-append (assoc-ref outputs "doc")
3711 "/share/doc/" ,name "-" ,version))
3712 (html-doc (string-append doc "/html"))
3713 (examples (string-append doc "/examples")))
3719 (install-file file tgt))
3720 (find-files dir ".*")))
3721 (list "docs" "htmldoc" "examples")
3722 (list doc html-doc examples))
3724 (home-page "https://github.com/pyparsing/pyparsing")
3725 (synopsis "Python parsing class library")
3727 "The pyparsing module is an alternative approach to creating and
3728 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3729 of regular expressions. The pyparsing module provides a library of classes
3730 that client code uses to construct the grammar directly in Python code.")
3731 (license license:expat)))
3733 (define-public python2-pyparsing
3734 (package-with-python2 python-pyparsing))
3736 (define-public python-numpydoc
3738 (name "python-numpydoc")
3743 (uri (pypi-uri "numpydoc" version))
3746 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3747 (build-system python-build-system)
3749 `(("python-sphinx" ,python-sphinx)))
3751 `(("python-nose" ,python-nose)))
3752 (home-page "https://pypi.python.org/pypi/numpydoc")
3754 "Numpy's Sphinx extensions")
3756 "Sphinx extension to support docstrings in Numpy format.")
3757 (license license:bsd-2)))
3759 (define-public python2-numpydoc
3760 (package-with-python2 python-numpydoc))
3762 (define-public python-numexpr
3764 (name "python-numexpr")
3769 (uri (pypi-uri "numexpr" version))
3772 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3773 (build-system python-build-system)
3774 (arguments `(#:tests? #f)) ; no tests included
3776 `(("python-numpy" ,python-numpy)))
3777 (home-page "https://github.com/pydata/numexpr")
3778 (synopsis "Fast numerical expression evaluator for NumPy")
3780 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3781 expressions that operate on arrays are accelerated and use less memory than
3782 doing the same calculation in Python. In addition, its multi-threaded
3783 capabilities can make use of all your cores, which may accelerate
3784 computations, most specially if they are not memory-bounded (e.g. those using
3785 transcendental functions).")
3786 (license license:expat)))
3788 (define-public python2-numexpr
3789 (package-with-python2 python-numexpr))
3791 (define-public python-cycler
3793 (name "python-cycler")
3797 (uri (pypi-uri "cycler" version))
3800 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3801 (build-system python-build-system)
3803 ;; XXX: The current version requires 'coveralls' which we don't have.
3804 ;; Enable this for the next release which uses 'python-pytest'.
3807 `(("python-six" ,python-six)))
3808 (home-page "http://matplotlib.org/cycler/")
3809 (synopsis "Composable keyword argument iterator")
3811 "When using @code{matplotlib} and plotting more than one line, it is
3812 common to want to be able to want to be able to cycle over one or more artist
3813 styles; but the plotting logic can quickly become involved.
3814 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3815 @code{Cycler} class was developed.")
3816 (license license:bsd-3)))
3818 (define-public python2-cycler
3819 (package-with-python2 python-cycler))
3821 (define-public python-colorspacious
3823 (name "python-colorspacious")
3829 (url "https://github.com/njsmith/colorspacious.git")
3830 (commit (string-append "v" version))))
3831 (file-name (git-file-name name version))
3833 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3834 (build-system python-build-system)
3836 `(("python-numpy" ,python-numpy)))
3838 `(("python-nose" ,python-nose)))
3841 (modify-phases %standard-phases
3844 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3845 (home-page "https://github.com/njsmith/colorspacious")
3846 (synopsis "Python library for colorspace conversions")
3847 (description "@code{colorspacious} is a Python library that lets you
3848 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3849 (license license:expat)))
3851 (define-public python2-colorspacious
3852 (package-with-python2 python-colorspacious))
3854 (define-public python-matplotlib
3856 (name "python-matplotlib")
3861 (uri (pypi-uri "matplotlib" version))
3864 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3865 (build-system python-build-system)
3866 (propagated-inputs ; the following packages are all needed at run time
3867 `(("python-cycler" ,python-cycler)
3868 ("python-kiwisolver" ,python-kiwisolver)
3869 ("python-pyparsing" ,python-pyparsing)
3870 ("python-pygobject" ,python-pygobject)
3871 ("gobject-introspection" ,gobject-introspection)
3872 ("python-tkinter" ,python "tk")
3873 ("python-dateutil" ,python-dateutil)
3874 ("python-numpy" ,python-numpy)
3875 ("python-pillow" ,python-pillow)
3876 ("python-pytz" ,python-pytz)
3877 ("python-six" ,python-six)
3878 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3879 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3880 ;; object. For this reason we need to import both libraries.
3881 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3882 ("python-pycairo" ,python-pycairo)
3883 ("python-cairocffi" ,python-cairocffi)))
3885 `(("libpng" ,libpng)
3886 ("imagemagick" ,imagemagick)
3887 ("freetype" ,freetype)
3890 ;; FIXME: Add backends when available.
3891 ;("python-wxpython" ,python-wxpython)
3895 `(("pkg-config" ,pkg-config)
3896 ("python-pytest" ,python-pytest)
3897 ("python-mock" ,python-mock)
3902 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3905 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3908 (modify-phases %standard-phases
3909 ;; XXX We disable all image comparison tests because we're using a
3910 ;; newer version of FreeType than matplotlib expects. This leads to
3911 ;; minor differences throughout the tests.
3912 (add-after 'unpack 'fix-and-disable-failing-tests
3914 (substitute* (append (find-files "lib/matplotlib/tests/"
3916 (find-files "lib/mpl_toolkits/tests"
3918 (("^from matplotlib" match)
3919 (string-append "import pytest\n" match))
3920 (("( *)@image_comparison" match indent)
3921 (string-append indent
3922 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3924 (substitute* "lib/matplotlib/tests/test_animation.py"
3925 (("/bin/sh") (which "sh")))
3926 (for-each delete-file
3927 ;; test_normal_axes, test_get_tightbbox_polar
3928 '("lib/matplotlib/tests/test_axes.py"
3929 ;; test_outward_ticks
3930 "lib/matplotlib/tests/test_tightlayout.py"
3931 ;; Fontconfig returns no fonts.
3932 "lib/matplotlib/tests/test_font_manager.py"))
3934 (add-before 'install 'install-jquery-ui
3935 (lambda* (#:key outputs inputs #:allow-other-keys)
3936 (let ((dir (string-append (assoc-ref outputs "out")
3937 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3940 (assoc-ref inputs "jquery-ui")
3944 (add-after 'install 'check
3945 (lambda* (#:key outputs inputs #:allow-other-keys)
3946 (add-installed-pythonpath inputs outputs)
3947 (invoke "python" "tests.py" "-v"
3948 "-m" "not network")))
3949 (add-before 'build 'configure-environment
3950 (lambda* (#:key outputs inputs #:allow-other-keys)
3951 (let ((cairo (assoc-ref inputs "cairo")))
3952 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3954 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3955 (setenv "HOME" (getcwd))
3956 (call-with-output-file "setup.cfg"
3958 (format port "[directories]~%
3959 basedirlist = ~a,~a~%
3962 (assoc-ref inputs "tcl")
3963 (assoc-ref inputs "tk")))))
3965 (home-page "http://matplotlib.org")
3966 (synopsis "2D plotting library for Python")
3968 "Matplotlib is a Python 2D plotting library which produces publication
3969 quality figures in a variety of hardcopy formats and interactive environments
3970 across platforms. Matplotlib can be used in Python scripts, the python and
3971 ipython shell, web application servers, and six graphical user interface
3973 (license license:psfl)
3974 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3976 (define-public python2-matplotlib
3977 (let ((matplotlib (package-with-python2
3978 (strip-python2-variant python-matplotlib))))
3979 (package (inherit matplotlib)
3984 (uri (pypi-uri "matplotlib" version))
3987 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3988 ;; Make sure to use special packages for Python 2 instead
3989 ;; of those automatically rewritten by package-with-python2.
3991 `(("python2-pycairo" ,python2-pycairo)
3992 ("python2-backports-functools-lru-cache"
3993 ,python2-backports-functools-lru-cache)
3994 ("python2-functools32" ,python2-functools32)
3995 ("python2-pygobject-2" ,python2-pygobject-2)
3996 ("python2-subprocess32" ,python2-subprocess32)
3997 ("python2-tkinter" ,python-2 "tk")
3998 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3999 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4001 (define-public python-matplotlib-documentation
4003 (name "python-matplotlib-documentation")
4004 (version (package-version python-matplotlib))
4005 (source (package-source python-matplotlib))
4006 (build-system python-build-system)
4008 `(("python-matplotlib" ,python-matplotlib)
4009 ("python-colorspacious" ,python-colorspacious)
4010 ("python-sphinx" ,python-sphinx)
4011 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4012 ("python-sphinx-gallery" ,python-sphinx-gallery)
4013 ("python-numpydoc" ,python-numpydoc)
4014 ("python-ipython" ,python-ipython)
4015 ("python-ipykernel" ,python-ipykernel)
4016 ("python-mock" ,python-mock)
4017 ("graphviz" ,graphviz)
4018 ("texlive" ,(texlive-union (list texlive-amsfonts
4019 texlive-latex-amsmath
4020 texlive-latex-enumitem
4021 texlive-latex-expdlist
4022 texlive-latex-geometry
4023 texlive-latex-preview
4024 texlive-latex-type1cm
4027 texlive-generic-pdftex
4030 texlive-fonts-adobe-times
4031 texlive-fonts-txfonts)))
4032 ("texinfo" ,texinfo)
4033 ,@(package-native-inputs python-matplotlib)))
4035 `(#:tests? #f ; we're only generating documentation
4037 (modify-phases %standard-phases
4038 ;; The tests in python-matplotlib are run after the install phase, so
4039 ;; we need to delete the extra phase here.
4044 (setenv "PYTHONPATH"
4045 (string-append (getenv "PYTHONPATH")
4046 ":" (getcwd) "/../examples/units"))
4047 (substitute* "conf.py"
4049 (("^SHA = check_output.*")
4050 (string-append "SHA = \"" ,version "\"\n"))
4051 ;; Don't fetch intersphinx files from the Internet
4052 (("^explicit_order_folders" m)
4053 (string-append "intersphinx_mapping = {}\n" m))
4054 (("'sphinx.ext.intersphinx',") "")
4055 ;; Disable URL embedding which requires internet access.
4056 (("'https://docs.scipy.org/doc/numpy'") "None")
4057 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4059 "SPHINXBUILD=sphinx-build"
4060 "SPHINXOPTS=" ; don't abort on warnings
4063 (lambda* (#:key inputs outputs #:allow-other-keys)
4064 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4065 (doc (string-append data "/doc/python-matplotlib-" ,version))
4066 (info (string-append data "/info"))
4067 (html (string-append doc "/html")))
4070 (copy-recursively "build/html" html)
4071 (symlink (string-append html "/_images")
4072 (string-append info "/matplotlib-figures"))
4073 (with-directory-excursion "build/texinfo"
4074 (substitute* "matplotlib.texi"
4075 (("@image\\{([^,]*)" all file)
4076 (string-append "@image{matplotlib-figures/" file)))
4077 (symlink (string-append html "/_images")
4078 "./matplotlib-figures")
4079 (invoke "makeinfo" "--no-split"
4080 "-o" "matplotlib.info" "matplotlib.texi"))
4081 (install-file "build/texinfo/matplotlib.info" info))
4083 (home-page (package-home-page python-matplotlib))
4084 (synopsis "Documentation for the python-matplotlib package")
4085 (description (package-description python-matplotlib))
4086 (license (package-license python-matplotlib))))
4088 (define-public python2-matplotlib-documentation
4089 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4093 (alist-delete "python-sphinx-copybutton"
4094 (package-native-inputs parent))))))
4096 (define-public python-matplotlib-venn
4098 (name "python-matplotlib-venn")
4103 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4106 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4107 (build-system python-build-system)
4108 (arguments '(#:tests? #f)) ; tests are not included
4110 `(("python-matplotlib" ,python-matplotlib)
4111 ("python-numpy" ,python-numpy)
4112 ("python-scipy" ,python-scipy)))
4114 `(("unzip" ,unzip)))
4115 (home-page "https://github.com/konstantint/matplotlib-venn")
4116 (synopsis "Plot area-proportional Venn diagrams")
4118 "This package provides tools for plotting area-proportional two- and
4119 three-way Venn diagrams in @code{matplotlib}.")
4120 (license license:expat)))
4122 (define-public python2-pysnptools
4124 (name "python2-pysnptools")
4129 (uri (pypi-uri "pysnptools" version))
4132 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4133 (build-system python-build-system)
4135 `(#:python ,python-2 ; only Python 2.7 is supported
4136 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4138 `(("python2-numpy" ,python2-numpy)
4139 ("python2-scipy" ,python2-scipy)
4140 ("python2-pandas" ,python2-pandas)))
4142 `(("python2-cython" ,python2-cython)))
4143 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4144 (synopsis "Library for reading and manipulating genetic data")
4146 "PySnpTools is a library for reading and manipulating genetic data. It
4147 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4148 those files. It can also efficiently manipulate ranges of integers using set
4149 operators such as union, intersection, and difference.")
4150 (license license:asl2.0)))
4152 (define-public python-scipy
4154 (name "python-scipy")
4159 (uri (pypi-uri "scipy" version))
4162 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4163 (build-system python-build-system)
4165 `(("python-numpy" ,python-numpy)
4166 ("python-matplotlib" ,python-matplotlib)
4167 ("python-pyparsing" ,python-pyparsing)))
4169 `(("lapack" ,lapack)
4170 ("openblas" ,openblas)))
4172 `(("python-cython" ,python-cython)
4173 ("python-pytest" ,python-pytest)
4174 ("python-sphinx" ,python-sphinx)
4175 ("python-numpydoc" ,python-numpydoc)
4176 ("gfortran" ,gfortran)
4179 (outputs '("out" "doc"))
4182 (modify-phases %standard-phases
4183 (add-after 'unpack 'disable-broken-tests
4185 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4186 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4187 (string-append indent
4188 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4190 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4191 (("^def test_parallel_threads\\(\\):" m)
4192 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4195 (add-before 'build 'configure-openblas
4196 (lambda* (#:key inputs #:allow-other-keys)
4197 (call-with-output-file "site.cfg"
4201 libraries = openblas
4202 library_dirs = ~a/lib
4203 include_dirs = ~a/include
4205 # backslash-n to make emacs happy
4207 library_dirs = ~a/lib
4208 atlas_libs = openblas
4210 (assoc-ref inputs "openblas")
4211 (assoc-ref inputs "openblas")
4212 (assoc-ref inputs "openblas"))))
4214 (add-after 'install 'install-doc
4215 (lambda* (#:key inputs outputs #:allow-other-keys)
4216 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4217 (doc (string-append data "/doc/" ,name "-" ,version))
4218 (html (string-append doc "/html"))
4219 (pyver ,(string-append "PYVER=" (version-major+minor
4220 (package-version python))))
4221 ;; By default it tries to run sphinx-build through the Python
4222 ;; interpreter which won't work with our shell wrapper.
4223 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4224 ;; Make installed package available for building the
4226 (add-installed-pythonpath inputs outputs)
4227 (with-directory-excursion "doc"
4228 ;; Fix generation of images for mathematical expressions.
4229 (substitute* (find-files "source" "conf\\.py")
4230 (("pngmath_use_preview = True")
4231 "pngmath_use_preview = False"))
4233 (invoke "make" "html" pyver sphinxbuild)
4234 (with-directory-excursion "build/html"
4235 (for-each (lambda (file)
4236 (let* ((dir (dirname file))
4237 (tgt-dir (string-append html "/" dir)))
4238 (install-file file html)))
4239 (find-files "." ".*")))))
4241 ;; Tests can only be run after the library has been installed and not
4242 ;; within the source directory.
4244 (add-after 'install 'check
4245 (lambda* (#:key inputs outputs #:allow-other-keys)
4246 (add-installed-pythonpath inputs outputs)
4247 (with-directory-excursion "/tmp"
4248 (invoke "python" "-c"
4249 "import scipy; scipy.test(verbose=2)")))))))
4250 (home-page "https://www.scipy.org/")
4251 (synopsis "The Scipy library provides efficient numerical routines")
4252 (description "The SciPy library is one of the core packages that make up
4253 the SciPy stack. It provides many user-friendly and efficient numerical
4254 routines such as routines for numerical integration and optimization.")
4255 (properties `((python2-variant . ,(delay python2-scipy))))
4256 (license license:bsd-3)))
4258 ;; Version 1.2.2 is the last version to support Python 2
4259 (define-public python2-scipy
4261 (inherit (package-with-python2
4262 (strip-python2-variant python-scipy)))
4267 (uri (pypi-uri "scipy" version))
4270 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4272 (define-public python-socksipy-branch
4274 (name "python-socksipy-branch")
4279 (uri (pypi-uri "SocksiPy-branch" version))
4282 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4283 (build-system python-build-system)
4285 `(#:tests? #f)) ; There are no tests
4286 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4287 (synopsis "Python SOCKS module")
4289 "SocksiPy - A Python SOCKS client module. It provides a
4290 socket-like interface that supports connections to any TCP
4291 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4292 The original version was developed by Dan Haim, this is a
4293 branch created by Mario Vilas to address some open issues,
4294 as the original project seems to have been abandoned circa 2007.")
4295 (license license:bsd-3)))
4297 (define-public python2-socksipy-branch
4298 (package-with-python2 python-socksipy-branch))
4300 (define-public python-pycodestyle
4302 (name "python-pycodestyle")
4307 (uri (pypi-uri "pycodestyle" version))
4310 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4311 (build-system python-build-system)
4312 (home-page "https://pycodestyle.readthedocs.io/")
4313 (synopsis "Python style guide checker")
4314 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4315 Python code against some of the style conventions in
4316 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4317 (license license:expat)))
4319 (define-public python2-pycodestyle
4320 (package-with-python2 python-pycodestyle))
4322 (define-public python-multidict
4324 (name "python-multidict")
4329 (uri (pypi-uri "multidict" version))
4332 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4333 (build-system python-build-system)
4335 `(("python-pytest" ,python-pytest)
4336 ("python-pytest-runner" ,python-pytest-runner)))
4337 (home-page "https://github.com/aio-libs/multidict/")
4338 (synopsis "Multidict implementation")
4339 (description "Multidict is dict-like collection of key-value pairs
4340 where key might be occurred more than once in the container.")
4341 (license license:asl2.0)))
4343 (define-public python-orderedmultidict
4345 (name "python-orderedmultidict")
4350 (uri (pypi-uri "orderedmultidict" version))
4353 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4354 (build-system python-build-system)
4357 (modify-phases %standard-phases
4358 (add-after 'unpack 'fix-tests
4360 ;; The package uses nosetest for running the tests.
4361 ;; Adding this initfile allows to run the test suite
4362 ;; without requiring nosetest.
4363 (with-output-to-file "tests/__init__.py" newline)
4366 `(("python-six" ,python-six)))
4368 `(("python-pycodestyle" ,python-pycodestyle)))
4369 (home-page "https://github.com/gruns/orderedmultidict")
4370 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4371 (description "This package contains a library for ordered multivalue
4372 dictionaries. A multivalue dictionary is a dictionary that can store
4373 multiple values for the same key. An ordered multivalue dictionary is a
4374 multivalue dictionary that retains the order of insertions and deletions.")
4375 (license license:unlicense)))
4377 (define-public python2-orderedmultidict
4378 (package-with-python2 python-orderedmultidict))
4380 (define-public python-autopep8
4382 (name "python-autopep8")
4387 (uri (pypi-uri "autopep8" version))
4390 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4391 (build-system python-build-system)
4393 `(("python-pycodestyle" ,python-pycodestyle)))
4394 (home-page "https://github.com/hhatto/autopep8")
4395 (synopsis "Format Python code according to the PEP 8 style guide")
4397 "@code{autopep8} automatically formats Python code to conform to
4398 the PEP 8 style guide. It uses the pycodestyle utility to determine
4399 what parts of the code needs to be formatted. @code{autopep8} is
4400 capable of fixing most of the formatting issues that can be reported
4402 (license (license:non-copyleft
4403 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4405 (define-public python2-autopep8
4406 (package-with-python2 python-autopep8))
4408 (define-public python-distutils-extra
4410 (name "python-distutils-extra")
4415 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4416 version "/+download/python-distutils-extra-"
4420 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4421 (build-system python-build-system)
4422 (home-page "https://launchpad.net/python-distutils-extra/")
4423 (synopsis "Enhancements to Python's distutils")
4425 "The python-distutils-extra module enables you to easily integrate
4426 gettext support, themed icons, and scrollkeeper-based documentation into
4427 Python's distutils.")
4428 (license license:gpl2)))
4430 (define-public python2-distutils-extra
4431 (package-with-python2 python-distutils-extra))
4433 (define-public python2-elib.intl
4435 (name "python2-elib.intl")
4439 ;; This project doesn't tag releases or publish tarballs, so we take
4440 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4443 (url "https://github.com/dieterv/elib.intl.git")
4444 (commit "d09997cfef")))
4445 (file-name (string-append name "-" version "-checkout"))
4448 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4449 (build-system python-build-system)
4451 ;; incompatible with Python 3 (exception syntax)
4452 `(#:python ,python-2
4454 (home-page "https://github.com/dieterv/elib.intl")
4455 (synopsis "Enhanced internationalization for Python")
4457 "The elib.intl module provides enhanced internationalization (I18N)
4458 services for your Python modules and applications.")
4459 (license license:lgpl3+)))
4461 (define-public python-olefile
4463 (name "python-olefile")
4468 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4469 "download/v" version "/olefile-" version ".tar.gz"))
4470 (file-name (string-append name "-" version ".tar.gz"))
4473 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4474 (build-system python-build-system)
4475 (home-page "https://www.decalage.info/python/olefileio")
4476 (synopsis "Read and write Microsoft OLE2 files.")
4478 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4479 Storage or Compound Document, Microsoft Office). It is an improved version of
4480 the OleFileIO module from PIL, the Python Image Library.")
4481 (license license:bsd-3)))
4483 (define-public python2-olefile
4484 (package-with-python2 python-olefile))
4486 (define-public python-pillow
4488 (name "python-pillow")
4493 (uri (pypi-uri "Pillow" version))
4496 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4497 (build-system python-build-system)
4499 `(("python-pytest" ,python-pytest)))
4501 `(("freetype" ,freetype)
4504 ("libjpeg" ,libjpeg)
4505 ("openjpeg" ,openjpeg)
4506 ("libtiff" ,libtiff)
4507 ("libwebp" ,libwebp)))
4509 `(("python-olefile" ,python-olefile)))
4512 (modify-phases %standard-phases
4513 (add-after 'unpack 'patch-ldconfig
4515 (substitute* "setup.py"
4516 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4517 (delete 'check) ; We must run checks after python-pillow is installed.
4518 (add-after 'install 'check-installed
4519 (lambda* (#:key outputs inputs #:allow-other-keys)
4521 (setenv "HOME" (getcwd))
4522 ;; Make installed package available for running the tests.
4523 (add-installed-pythonpath inputs outputs)
4524 (invoke "python" "selftest.py" "--installed")
4525 (invoke "python" "-m" "pytest" "-vv")))))))
4526 (home-page "https://python-pillow.org")
4527 (synopsis "Fork of the Python Imaging Library")
4529 "The Python Imaging Library adds image processing capabilities to your
4530 Python interpreter. This library provides extensive file format support, an
4531 efficient internal representation, and fairly powerful image processing
4532 capabilities. The core image library is designed for fast access to data
4533 stored in a few basic pixel formats. It should provide a solid foundation for
4534 a general image processing tool.")
4535 (license (license:x11-style
4536 "http://www.pythonware.com/products/pil/license.htm"
4537 "The PIL Software License"))))
4539 (define-public python2-pillow
4540 (package-with-python2 python-pillow))
4542 (define-public python-pycparser
4544 (name "python-pycparser")
4549 (uri (pypi-uri "pycparser" version))
4552 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4553 (outputs '("out" "doc"))
4554 (build-system python-build-system)
4556 `(("pkg-config" ,pkg-config)))
4559 (modify-phases %standard-phases
4562 (with-directory-excursion "tests"
4563 (invoke "python" "all_tests.py"))
4565 (add-after 'install 'install-doc
4566 (lambda* (#:key outputs #:allow-other-keys)
4567 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4568 (doc (string-append data "/doc/" ,name "-" ,version))
4569 (examples (string-append doc "/examples")))
4571 (for-each (lambda (file)
4572 (copy-file (string-append "." file)
4573 (string-append doc file)))
4574 '("/README.rst" "/CHANGES" "/LICENSE"))
4575 (copy-recursively "examples" examples)
4577 (home-page "https://github.com/eliben/pycparser")
4578 (synopsis "C parser in Python")
4580 "Pycparser is a complete parser of the C language, written in pure Python
4581 using the PLY parsing library. It parses C code into an AST and can serve as
4582 a front-end for C compilers or analysis tools.")
4583 (license license:bsd-3)))
4585 (define-public python2-pycparser
4586 (package-with-python2 python-pycparser))
4588 (define-public python-pywavelets
4590 (name "python-pywavelets")
4592 (home-page "https://github.com/PyWavelets/pywt")
4595 (uri (pypi-uri "PyWavelets" version))
4598 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4599 (build-system python-build-system)
4601 '(#:modules ((ice-9 ftw)
4605 (guix build python-build-system))
4606 #:phases (modify-phases %standard-phases
4609 (let ((cwd (getcwd))
4610 (libdir (find (cut string-prefix? "lib." <>)
4611 (scandir "build"))))
4612 (with-directory-excursion (string-append cwd "/build/" libdir)
4613 (invoke "nosetests" "-v" "."))))))))
4615 `(("python-matplotlib" ,python-matplotlib) ;for tests
4616 ("python-nose" ,python-nose)))
4618 `(("python-numpy" ,python-numpy)))
4619 (synopsis "Wavelet transforms in Python")
4621 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4622 mathematical basis functions that are localized in both time and frequency.
4623 Wavelet transforms are time-frequency transforms employing wavelets. They are
4624 similar to Fourier transforms, the difference being that Fourier transforms are
4625 localized only in frequency instead of in time and frequency.")
4626 (license license:expat)))
4628 (define-public python2-pywavelets
4629 (package-with-python2 python-pywavelets))
4631 (define-public python-xcffib
4633 (name "python-xcffib")
4638 (uri (pypi-uri "xcffib" version))
4641 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4642 (build-system python-build-system)
4644 `(("libxcb" ,libxcb)))
4646 `(("python-cffi" ,python-cffi) ; used at run time
4647 ("python-six" ,python-six)))
4649 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4652 (modify-phases %standard-phases
4653 (add-after 'unpack 'fix-libxcb-path
4654 (lambda* (#:key inputs #:allow-other-keys)
4655 (let ((libxcb (assoc-ref inputs "libxcb")))
4656 (substitute* '("xcffib/__init__.py")
4657 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4659 (add-after 'install 'install-doc
4660 (lambda* (#:key outputs #:allow-other-keys)
4661 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4662 "/doc/" ,name "-" ,version)))
4664 (copy-file "README.md"
4665 (string-append doc "/README.md"))
4667 (home-page "https://github.com/tych0/xcffib")
4668 (synopsis "XCB Python bindings")
4670 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4671 support for Python 3 and PyPy. It is based on cffi.")
4672 (license license:expat)))
4674 (define-public python2-xcffib
4675 (package-with-python2 python-xcffib))
4677 (define-public python-cairocffi
4679 (name "python-cairocffi")
4684 (uri (pypi-uri "cairocffi" version))
4687 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4688 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4689 (build-system python-build-system)
4690 (outputs '("out" "doc"))
4694 ("gdk-pixbuf" ,gdk-pixbuf)
4698 `(("pkg-config" ,pkg-config)
4699 ("python-pytest" ,python-pytest)
4700 ("python-pytest-cov" ,python-pytest-cov)
4701 ("python-pytest-runner" ,python-pytest-runner)
4702 ("python-sphinx" ,python-sphinx)
4703 ("python-docutils" ,python-docutils)))
4705 `(("python-xcffib" ,python-xcffib))) ; used at run time
4708 (modify-phases %standard-phases
4709 (add-after 'unpack 'patch-paths
4710 (lambda* (#:key inputs outputs #:allow-other-keys)
4711 (substitute* (find-files "." "\\.py$")
4712 (("dlopen\\(ffi, 'cairo'")
4713 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4714 "/lib/libcairo.so.2'"))
4715 (("dlopen\\(ffi, 'gdk-3'")
4716 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4717 "/lib/libgtk-3.so.0'"))
4718 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4719 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4720 "/lib/libgdk_pixbuf-2.0.so.0'"))
4721 (("dlopen\\(ffi, 'glib-2.0'")
4722 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4723 "/lib/libglib-2.0.so.0'"))
4724 (("dlopen\\(ffi, 'gobject-2.0'")
4725 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4726 "/lib/libgobject-2.0.so.0'"))
4727 (("dlopen\\(ffi, 'pangocairo-1.0'")
4728 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4729 "/lib/libpangocairo-1.0.so.0'"))
4730 (("dlopen\\(ffi, 'pango-1.0'")
4731 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4732 "/lib/libpango-1.0.so.0'")))
4734 (add-after 'install 'install-doc
4735 (lambda* (#:key inputs outputs #:allow-other-keys)
4736 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4737 (doc (string-append data "/doc/" ,name "-" ,version))
4738 (html (string-append doc "/html")))
4739 (setenv "LD_LIBRARY_PATH"
4740 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4741 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4742 (setenv "LANG" "en_US.UTF-8")
4744 (for-each (lambda (file)
4745 (copy-file (string-append "." file)
4746 (string-append doc file)))
4747 '("/README.rst" "/CHANGES" "/LICENSE"))
4748 (system* "python" "setup.py" "build_sphinx")
4749 (copy-recursively "docs/_build/html" html)
4751 (home-page "https://github.com/Kozea/cairocffi")
4752 (synopsis "Python bindings and object-oriented API for Cairo")
4754 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4755 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4756 graphics library with support for multiple backends including image buffers,
4757 PNG, PostScript, PDF, and SVG file output.")
4758 (license license:bsd-3)))
4760 (define-public python2-cairocffi
4761 (package-with-python2 python-cairocffi))
4763 (define-public python-decorator
4765 (name "python-decorator")
4770 (uri (pypi-uri "decorator" version))
4772 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4773 (build-system python-build-system)
4774 (home-page "https://pypi.python.org/pypi/decorator/")
4775 (synopsis "Python module to simplify usage of decorators")
4777 "The aim of the decorator module is to simplify the usage of decorators
4778 for the average programmer, and to popularize decorators usage giving examples
4779 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4780 etc. The core of this module is a decorator factory.")
4781 (license license:expat)))
4783 (define-public python2-decorator
4784 (package-with-python2 python-decorator))
4786 (define-public python-drmaa
4788 (name "python-drmaa")
4793 (uri (pypi-uri "drmaa" version))
4795 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4796 (build-system python-build-system)
4797 ;; The test suite requires libdrmaa which is provided by the cluster
4798 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4799 ;; should be set to the path of the libdrmaa library.
4800 (arguments '(#:tests? #f))
4802 `(("python-nose" ,python-nose)))
4803 (home-page "https://pypi.python.org/pypi/drmaa")
4804 (synopsis "Python bindings for the DRMAA library")
4806 "A Python package for Distributed Resource Management (DRM) job
4807 submission and control. This package is an implementation of the DRMAA 1.0
4808 Python language binding specification.")
4809 (license license:bsd-3)))
4811 (define-public python2-drmaa
4812 (package-with-python2 python-drmaa))
4814 (define-public python-grako
4816 (name "python-grako")
4822 (pypi-uri "grako" version ".zip"))
4825 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4826 (build-system python-build-system)
4827 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4830 ("python-pytest" ,python-pytest)
4831 ("python-pytest-runner" ,python-pytest-runner)))
4832 (home-page "https://bitbucket.org/neogeny/grako")
4833 (synopsis "EBNF parser generator")
4835 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4836 memoizing PEG/Packrat parser in Python.")
4837 (license license:bsd-3)))
4839 (define-public python2-grako
4840 (package-with-python2 python-grako))
4842 (define-public python-gridmap
4844 (name "python-gridmap")
4850 (url "https://github.com/pygridtools/gridmap.git")
4851 (commit (string-append "v" version))))
4852 (file-name (git-file-name name version))
4854 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4855 (build-system python-build-system)
4857 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4859 `(("python-psutil" ,python-psutil)
4860 ("python-drmaa" ,python-drmaa)
4861 ("python-pyzmq" ,python-pyzmq)))
4862 (home-page "https://github.com/pygridtools/gridmap")
4863 (synopsis "Create jobs on a cluster directly from Python")
4865 "Gridmap is a Python package to allow you to easily create jobs on the
4866 cluster directly from Python. You can directly map Python functions onto the
4867 cluster without needing to write any wrapper code yourself.")
4868 (license license:gpl3+)))
4870 (define-public python2-gridmap
4871 (package-with-python2 python-gridmap))
4873 (define-public python-honcho
4875 (name "python-honcho")
4881 (url "https://github.com/nickstenning/honcho.git")
4882 (commit (string-append "v" version))))
4883 (file-name (git-file-name name version))
4885 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4886 (build-system python-build-system)
4888 `(("python-pytest" ,python-pytest)
4889 ("python-mock" ,python-mock)
4890 ("python-tox" ,python-tox)
4891 ("which" ,which))) ;for tests
4893 `(("python-jinja2" ,python-jinja2)))
4896 (modify-phases %standard-phases
4898 (add-after 'install 'check
4899 (lambda* (#:key outputs inputs #:allow-other-keys)
4900 ;; fix honcho path in testsuite
4901 (substitute* "tests/conftest.py"
4902 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4903 "/bin/honcho" "'")))
4904 ;; It's easier to run tests after install.
4905 ;; Make installed package available for running the tests
4906 (add-installed-pythonpath inputs outputs)
4907 (invoke "py.test" "-v"))))))
4908 (home-page "https://github.com/nickstenning/honcho")
4909 (synopsis "Manage Procfile-based applications")
4911 "A Procfile is a file which describes how to run an application
4912 consisting of several processes. honcho starts all listed processes.
4913 The output of all running processes is collected by honcho and
4915 (license license:expat)))
4917 (define-public python2-honcho
4918 (package-with-python2 python-honcho))
4920 (define-public python-pexpect
4922 (name "python-pexpect")
4927 (uri (pypi-uri "pexpect" version))
4929 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4930 (build-system python-build-system)
4933 (modify-phases %standard-phases
4934 (add-before 'check 'prepare-tests
4936 (substitute* (find-files "tests")
4937 (("/bin/ls") (which "ls"))
4938 (("/bin/echo") (which "echo"))
4939 (("/bin/which") (which "which"))
4940 ;; Many tests try to use the /bin directory which
4941 ;; is not present in the build environment.
4942 ;; Use one that's non-empty and unlikely to change.
4943 (("/bin'") "/dev'"))
4944 ;; XXX: Socket connection test gets "Connection reset by peer".
4945 ;; Why does it not work? Delete for now.
4946 (delete-file "tests/test_socket.py")
4948 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4950 `(("python-nose" ,python-nose)
4951 ("python-pytest" ,python-pytest)
4954 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4956 `(("python-ptyprocess" ,python-ptyprocess)))
4957 (home-page "http://pexpect.readthedocs.org/")
4958 (synopsis "Controlling interactive console applications")
4960 "Pexpect is a pure Python module for spawning child applications;
4961 controlling them; and responding to expected patterns in their output.
4962 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4963 child application and control it as if a human were typing commands.")
4964 (license license:isc)))
4966 (define-public python2-pexpect
4967 (package-with-python2 python-pexpect))
4969 (define-public python-setuptools-scm
4971 (name "python-setuptools-scm")
4975 (uri (pypi-uri "setuptools_scm" version))
4978 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4979 (build-system python-build-system)
4980 (home-page "https://github.com/pypa/setuptools_scm/")
4981 (synopsis "Manage Python package versions in SCM metadata")
4983 "Setuptools_scm handles managing your Python package versions in
4984 @dfn{software configuration management} (SCM) metadata instead of declaring
4985 them as the version argument or in a SCM managed file.")
4986 (license license:expat)))
4988 (define-public python2-setuptools-scm
4989 (package-with-python2 python-setuptools-scm))
4991 (define-public python-pathlib2
4993 (name "python-pathlib2")
4998 (uri (pypi-uri "pathlib2" version))
5001 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5002 (build-system python-build-system)
5004 `(("python-scandir" ,python-scandir)
5005 ("python-six" ,python-six)))
5006 (home-page "https://pypi.python.org/pypi/pathlib2/")
5007 (synopsis "Object-oriented file system paths")
5008 (description "The goal of pathlib2 is to provide a backport of the
5009 standard @code{pathlib} module which tracks the standard library module, so
5010 all the newest features of the standard @code{pathlib} can be used also on
5011 older Python versions.")
5012 (license license:expat)))
5014 (define-public python-importlib-metadata
5016 (name "python-importlib-metadata")
5021 (uri (pypi-uri "importlib_metadata" version))
5024 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
5025 (build-system python-build-system)
5027 `(("python-configparser" ,python-configparser)
5028 ("python-contextlib2" ,python-contextlib2)
5029 ("python-docutils" ,python-docutils)
5030 ("python-pathlib2" ,python-pathlib2)
5031 ("python-rst.linker" ,python-rst.linker)
5032 ("python-zipp" ,python-zipp)))
5034 `(("python-setuptools-scm" ,python-setuptools-scm)
5035 ("python-sphinx" ,python-sphinx)))
5036 (home-page "https://importlib-metadata.readthedocs.io/")
5037 (synopsis "Read metadata from Python packages")
5039 "@code{importlib_metadata} is a library which provides an API for
5040 accessing an installed Python package's metadata, such as its entry points or
5041 its top-level name. This functionality intends to replace most uses of
5042 @code{pkg_resources} entry point API and metadata API. Along with
5043 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5044 need to use the older and less efficient @code{pkg_resources} package.")
5045 (license license:asl2.0)))
5047 (define-public python-jaraco-packaging
5049 (name "python-jaraco-packaging")
5054 (uri (pypi-uri "jaraco.packaging" version))
5057 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5058 (build-system python-build-system)
5060 `(("python-pytest" ,python-pytest)
5061 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5062 ("python-pytest-flake8" ,python-pytest-flake8)
5063 ("python-rst.linker" ,python-rst.linker)
5064 ("python-setuptools" ,python-setuptools)
5065 ("python-setuptools-scm" ,python-setuptools-scm)
5066 ("python-six" ,python-six)
5067 ("python-sphinx" ,python-sphinx)))
5068 (home-page "https://github.com/jaraco/jaraco.packaging")
5069 (synopsis "Tools to supplement packaging Python releases")
5071 "This package provides various tools to supplement packaging Python
5073 (license license:expat)))
5075 (define-public python-pathpy
5077 (name "python-pathpy")
5082 (uri (pypi-uri "path.py" version))
5084 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5085 (outputs '("out" "doc"))
5086 (build-system python-build-system)
5088 `(("python-appdirs" ,python-appdirs)
5089 ("python-importlib-metadata" ,python-importlib-metadata)))
5091 `(("python-setuptools-scm" ,python-setuptools-scm)
5092 ("python-sphinx" ,python-sphinx)
5093 ("python-rst.linker" ,python-rst.linker)
5094 ("python-pytest" ,python-pytest)
5095 ("python-pytest-runner" ,python-pytest-runner)
5096 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5099 (modify-phases %standard-phases
5100 (add-after 'build 'build-doc
5102 (setenv "LANG" "en_US.UTF-8")
5103 (invoke "python" "setup.py" "build_sphinx")))
5104 (add-after 'install 'install-doc
5105 (lambda* (#:key outputs #:allow-other-keys)
5106 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5107 (doc (string-append data "/doc/" ,name "-" ,version))
5108 (html (string-append doc "/html")))
5110 (for-each (lambda (file)
5111 (copy-file file (string-append doc "/" file)))
5112 '("README.rst" "CHANGES.rst"))
5113 (copy-recursively "build/sphinx/html" html)
5117 ;; The import time test aborts if an import takes longer than
5118 ;; 100ms. It may very well take a little longer than that.
5119 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5120 (home-page "https://github.com/jaraco/path.py")
5121 (synopsis "Python module wrapper for built-in os.path")
5123 "@code{path.py} implements path objects as first-class entities, allowing
5124 common operations on files to be invoked on those path objects directly.")
5125 (license license:expat)))
5127 (define-public python2-pathpy
5128 (package-with-python2 python-pathpy))
5130 (define-public python-simplegeneric
5132 (name "python-simplegeneric")
5137 (uri (pypi-uri "simplegeneric" version ".zip"))
5139 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5140 (build-system python-build-system)
5142 `(("unzip" ,unzip)))
5143 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5144 (synopsis "Python module for simple generic functions")
5146 "The simplegeneric module lets you define simple single-dispatch generic
5147 functions, akin to Python’s built-in generic functions like @code{len()},
5148 @code{iter()} and so on. However, instead of using specially-named methods,
5149 these generic functions use simple lookup tables, akin to those used by
5150 e.g. @code{pickle.dump()} and other generic functions found in the Python
5152 (license license:zpl2.1)))
5154 (define-public python2-simplegeneric
5155 (package-with-python2 python-simplegeneric))
5157 (define-public python-ipython-genutils
5158 ;; TODO: This package is retired, check if can be removed, see description.
5160 (name "python-ipython-genutils")
5165 (uri (pypi-uri "ipython_genutils" version))
5167 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5168 (build-system python-build-system)
5169 (arguments `(#:tests? #f)) ; no tests
5170 (home-page "https://ipython.org")
5171 (synopsis "Vestigial utilities from IPython")
5173 "This package provides retired utilities from IPython. No packages
5174 outside IPython/Jupyter should depend on it.
5176 This package shouldn't exist. It contains some common utilities shared by
5177 Jupyter and IPython projects during The Big Split. As soon as possible, those
5178 packages will remove their dependency on this, and this package will go
5180 (license license:bsd-3)))
5182 (define-public python2-ipython-genutils
5183 (package-with-python2 python-ipython-genutils))
5185 (define-public python-traitlets
5187 (name "python-traitlets")
5192 (uri (pypi-uri "traitlets" version))
5195 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5196 (build-system python-build-system)
5199 (modify-phases %standard-phases
5200 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5202 `(("python-ipython-genutils" ,python-ipython-genutils)
5203 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5205 `(("python-pytest" ,python-pytest)))
5206 (properties `((python2-variant . ,(delay python2-traitlets))))
5207 (home-page "https://ipython.org")
5208 (synopsis "Configuration system for Python applications")
5210 "Traitlets is a framework that lets Python classes have attributes with
5211 type checking, dynamically calculated default values, and ‘on change’
5212 callbacks. The package also includes a mechanism to use traitlets for
5213 configuration, loading values from files or from command line arguments. This
5214 is a distinct layer on top of traitlets, so you can use traitlets in your code
5215 without using the configuration machinery.")
5216 (license license:bsd-3)))
5218 (define-public python2-traitlets
5219 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5223 `(("python2-enum34" ,python2-enum34)
5224 ,@(package-propagated-inputs traitlets))))))
5226 (define-public python-jupyter-core
5228 (name "python-jupyter-core")
5233 (uri (string-append (pypi-uri "jupyter_core" version)))
5236 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5237 (build-system python-build-system)
5238 ;; FIXME: not sure how to run the tests
5239 (arguments `(#:tests? #f))
5241 `(("python-traitlets" ,python-traitlets)))
5242 (home-page "http://jupyter.org/")
5243 (synopsis "Jupyter base package")
5245 "Jupyter core is the base package on which Jupyter projects rely.")
5246 (license license:bsd-3)))
5248 (define-public python2-jupyter-core
5249 (package-with-python2 python-jupyter-core))
5251 (define-public python-jupyter-client
5253 (name "python-jupyter-client")
5258 (uri (pypi-uri "jupyter_client" version))
5261 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5262 (build-system python-build-system)
5263 ;; Tests fail because of missing native python kernel which I assume is
5264 ;; provided by the ipython package, which we cannot use because it would
5265 ;; cause a dependency cycle.
5269 #:phases (modify-phases %standard-phases
5270 (add-after 'unpack 'set-tool-file-names
5271 (lambda* (#:key inputs #:allow-other-keys)
5272 (let ((iproute (assoc-ref inputs "iproute")))
5273 (substitute* "jupyter_client/localinterfaces.py"
5275 (string-append "'" iproute "/sbin/ip'")))
5278 `(("iproute" ,iproute)))
5280 `(("python-pyzmq" ,python-pyzmq)
5281 ("python-traitlets" ,python-traitlets)
5282 ("python-jupyter-core" ,python-jupyter-core)))
5283 (home-page "http://jupyter.org/")
5284 (synopsis "Jupyter protocol implementation and client libraries")
5286 "The @code{jupyter_client} package contains the reference implementation
5287 of the Jupyter protocol. It also provides client and kernel management APIs
5288 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5289 installing @code{kernelspec}s for use with Jupyter frontends.")
5290 (license license:bsd-3)))
5292 (define-public python2-jupyter-client
5293 (package-with-python2 python-jupyter-client))
5295 (define-public python-ipykernel
5297 (name "python-ipykernel")
5302 (uri (pypi-uri "ipykernel" version))
5304 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5305 (build-system python-build-system)
5308 (modify-phases %standard-phases
5311 (setenv "HOME" "/tmp")
5312 (invoke "pytest" "-v")
5314 (add-after 'install 'set-python-file-name
5315 (lambda* (#:key outputs #:allow-other-keys)
5316 ;; Record the absolute file name of the 'python' executable in
5318 (let ((out (assoc-ref outputs "out")))
5319 (substitute* (string-append out "/share/jupyter"
5320 "/kernels/python3/kernel.json")
5322 (string-append "\"" (which "python") "\"")))
5325 `(("python-ipython" ,python-ipython)
5326 ;; imported at runtime during connect
5327 ("python-jupyter-client" ,python-jupyter-client)))
5329 `(("python-pytest" ,python-pytest)
5330 ("python-nose" ,python-nose)))
5331 (home-page "https://ipython.org")
5332 (synopsis "IPython Kernel for Jupyter")
5334 "This package provides the IPython kernel for Jupyter.")
5335 (license license:bsd-3)))
5337 ;; Version 5.1.1 and above no longer support Python 2.
5338 (define-public python2-ipykernel
5340 (name "python2-ipykernel")
5345 (uri (pypi-uri "ipykernel" version))
5347 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5348 (build-system python-build-system)
5350 `(#:python ,python-2
5352 (modify-phases %standard-phases
5355 (setenv "HOME" "/tmp")
5356 (invoke "pytest" "-v")
5359 `(("python2-ipython" ,python2-ipython)
5360 ;; imported at runtime during connect
5361 ("python2-jupyter-client" ,python2-jupyter-client)))
5363 `(("python2-pytest" ,python2-pytest)
5364 ("python2-nose" ,python2-nose)))
5365 (home-page "https://ipython.org")
5366 (synopsis "IPython Kernel for Jupyter")
5368 "This package provides the IPython kernel for Jupyter.")
5369 (license license:bsd-3)))
5371 (define-public python-pari-jupyter
5373 (name "python-pari-jupyter")
5378 (uri (pypi-uri "pari_jupyter" version))
5381 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5382 (build-system python-build-system)
5384 `(("python-ipykernel" ,python-ipykernel)))
5386 `(("pari-gp" ,pari-gp)
5387 ("readline" ,readline)))
5389 `(#:tests? #f)) ; no test suite
5391 "https://github.com/jdemeyer/pari_jupyter")
5392 (synopsis "A Jupyter kernel for PARI/GP")
5393 (description "The package provides a PARI/GP kernel for Jupyter.")
5394 (license license:gpl3+)))
5396 (define-public python-backcall
5398 (name "python-backcall")
5403 (uri (pypi-uri "backcall" version))
5406 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5407 (build-system python-build-system)
5408 (home-page "https://github.com/takluyver/backcall/")
5409 (synopsis "Specifications for callback functions passed in to an API")
5411 "If your code lets other people supply callback functions, it's important
5412 to specify the function signature you expect, and check that functions support
5413 that. Adding extra parameters later would break other peoples code unless
5414 you're careful. The @code{backcall} package provides a way of specifying the
5415 callback signature using a prototype function.")
5416 (license license:bsd-3)))
5418 ;; This is the latest release of the LTS version of ipython with support for
5419 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5420 ;; dropped support for Python 2.7.
5421 (define-public python2-ipython
5423 (name "python2-ipython")
5428 (uri (pypi-uri "ipython" version ".tar.gz"))
5430 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5431 (build-system python-build-system)
5433 `(("python2-backports-shutil-get-terminal-size"
5434 ,python2-backports-shutil-get-terminal-size)
5435 ("python2-pathlib2" ,python2-pathlib2)
5436 ("python2-pyzmq" ,python2-pyzmq)
5437 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5438 ("python2-terminado" ,python2-terminado)
5439 ("python2-matplotlib" ,python2-matplotlib)
5440 ("python2-numpy" ,python2-numpy)
5441 ("python2-numpydoc" ,python2-numpydoc)
5442 ("python2-jinja2" ,python2-jinja2)
5443 ("python2-mistune" ,python2-mistune)
5444 ("python2-pexpect" ,python2-pexpect)
5445 ("python2-pickleshare" ,python2-pickleshare)
5446 ("python2-simplegeneric" ,python2-simplegeneric)
5447 ("python2-jsonschema" ,python2-jsonschema)
5448 ("python2-traitlets" ,python2-traitlets)
5449 ("python2-nbformat" ,python2-nbformat)
5450 ("python2-pygments" ,python2-pygments)))
5452 `(("readline" ,readline)
5455 `(("graphviz" ,graphviz)
5456 ("pkg-config" ,pkg-config)
5457 ("python2-requests" ,python2-requests) ;; for tests
5458 ("python2-testpath" ,python2-testpath)
5459 ("python2-mock" ,python2-mock)
5460 ("python2-nose" ,python2-nose)))
5462 `(#:python ,python-2
5464 (modify-phases %standard-phases
5465 (add-before 'check 'delete-broken-tests
5466 (lambda* (#:key inputs #:allow-other-keys)
5467 ;; These tests throw errors for unknown reasons.
5468 (delete-file "IPython/core/tests/test_profile.py")
5469 (delete-file "IPython/core/tests/test_interactiveshell.py")
5470 (delete-file "IPython/core/tests/test_magic.py")
5472 (home-page "https://ipython.org")
5473 (synopsis "IPython is a tool for interactive computing in Python")
5475 "IPython provides a rich architecture for interactive computing with:
5476 Powerful interactive shells, a browser-based notebook, support for interactive
5477 data visualization, embeddable interpreters and tools for parallel
5479 (license license:bsd-3)))
5481 (define-public python-ipython
5483 (name "python-ipython")
5488 (uri (pypi-uri "ipython" version ".tar.gz"))
5490 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5491 (build-system python-build-system)
5493 `(("python-backcall" ,python-backcall)
5494 ("python-pyzmq" ,python-pyzmq)
5495 ("python-prompt-toolkit" ,python-prompt-toolkit)
5496 ("python-terminado" ,python-terminado)
5497 ("python-matplotlib" ,python-matplotlib)
5498 ("python-numpy" ,python-numpy)
5499 ("python-numpydoc" ,python-numpydoc)
5500 ("python-jedi" ,python-jedi)
5501 ("python-jinja2" ,python-jinja2)
5502 ("python-mistune" ,python-mistune)
5503 ("python-pexpect" ,python-pexpect)
5504 ("python-pickleshare" ,python-pickleshare)
5505 ("python-simplegeneric" ,python-simplegeneric)
5506 ("python-jsonschema" ,python-jsonschema)
5507 ("python-traitlets" ,python-traitlets)
5508 ("python-nbformat" ,python-nbformat)
5509 ("python-pygments" ,python-pygments)))
5511 `(("readline" ,readline)
5514 `(("graphviz" ,graphviz)
5515 ("pkg-config" ,pkg-config)
5516 ("python-requests" ,python-requests) ;; for tests
5517 ("python-testpath" ,python-testpath)
5518 ("python-nose" ,python-nose)))
5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'make-docs-reproducible
5524 (substitute* "IPython/sphinxext/ipython_directive.py"
5525 ((".*import datetime") "")
5526 ((".*datetime.datetime.now\\(\\)") "")
5527 (("%timeit") "# %timeit"))
5529 ;; Tests can only be run after the library has been installed and not
5530 ;; within the source directory.
5532 (add-after 'install 'check
5533 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5536 ;; Make installed package available for running the tests
5537 (add-installed-pythonpath inputs outputs)
5538 (setenv "HOME" "/tmp/") ;; required by a test
5539 ;; We only test the core because one of the other tests
5540 ;; tries to import ipykernel.
5541 (invoke "python" "IPython/testing/iptest.py"
5542 "-v" "IPython/core/tests"))
5544 (add-before 'check 'fix-tests
5545 (lambda* (#:key inputs #:allow-other-keys)
5546 (substitute* "./IPython/utils/_process_posix.py"
5547 (("/usr/bin/env', 'which") (which "which")))
5548 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5549 (("#!/usr/bin/env python")
5550 (string-append "#!" (which "python"))))
5551 ;; This test introduces a circular dependency on ipykernel
5552 ;; (which depends on ipython).
5553 (delete-file "IPython/core/tests/test_display.py")
5554 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5555 (delete-file "IPython/core/tests/test_interactiveshell.py")
5557 (home-page "https://ipython.org")
5558 (synopsis "IPython is a tool for interactive computing in Python")
5560 "IPython provides a rich architecture for interactive computing with:
5561 Powerful interactive shells, a browser-based notebook, support for interactive
5562 data visualization, embeddable interpreters and tools for parallel
5564 (license license:bsd-3)))
5566 (define-public python-ipython-documentation
5568 (inherit python-ipython)
5569 (name "python-ipython-documentation")
5570 (version (package-version python-ipython))
5573 (modify-phases %standard-phases
5577 (lambda* (#:key outputs #:allow-other-keys)
5578 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5579 (doc (string-append data "/doc/" ,name "-" ,version))
5580 (html (string-append doc "/html"))
5581 (man1 (string-append data "/man/man1"))
5582 (info (string-append data "/info"))
5583 (examples (string-append doc "/examples"))
5584 (python-arg (string-append "PYTHON=" (which "python"))))
5585 (setenv "LANG" "en_US.utf8")
5586 (with-directory-excursion "docs"
5587 ;; FIXME: pdf fails to build
5588 ;;(system* "make" "pdf" "PAPER=a4")
5589 (system* "make" python-arg "html")
5590 ;; FIXME: the generated texi file contains ^@^@, which trips
5592 ;; (system* "make" python-arg "info")
5594 (copy-recursively "docs/man" man1)
5595 (copy-recursively "examples" examples)
5596 (copy-recursively "docs/build/html" html)
5597 ;; (copy-file "docs/build/latex/ipython.pdf"
5598 ;; (string-append doc "/ipython.pdf"))
5600 ;; (copy-file "docs/build/texinfo/ipython.info"
5601 ;; (string-append info "/ipython.info"))
5602 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5605 `(("python-ipython" ,python-ipython)
5606 ("python-ipykernel" ,python-ipykernel)))
5608 `(("python-sphinx" ,python-sphinx)
5609 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5610 ;; FIXME: It's possible that a smaller union would work just as well.
5611 ("texlive" ,(texlive-union (list texlive-amsfonts
5613 texlive-generic-ifxetex
5614 texlive-generic-pdftex
5615 texlive-latex-capt-of
5617 texlive-latex-environ
5618 texlive-latex-eqparbox
5619 texlive-latex-etoolbox
5620 texlive-latex-expdlist
5621 texlive-latex-fancyhdr
5622 texlive-latex-fancyvrb
5623 texlive-latex-fncychap
5625 texlive-latex-framed
5626 texlive-latex-geometry
5627 texlive-latex-graphics
5628 texlive-latex-hyperref
5629 texlive-latex-mdwtools
5630 texlive-latex-multirow
5631 texlive-latex-needspace
5632 texlive-latex-oberdiek
5633 texlive-latex-parskip
5634 texlive-latex-preview
5635 texlive-latex-tabulary
5636 texlive-latex-threeparttable
5637 texlive-latex-titlesec
5638 texlive-latex-trimspaces
5640 texlive-latex-upquote
5642 texlive-latex-varwidth
5643 texlive-latex-wrapfig)))
5644 ("texinfo" ,texinfo)))))
5646 (define-public python-urwid
5648 (name "python-urwid")
5653 (uri (pypi-uri "urwid" version))
5656 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5657 (build-system python-build-system)
5658 (home-page "http://urwid.org")
5659 (synopsis "Console user interface library for Python")
5661 "Urwid is a curses-based UI/widget library for Python. It includes many
5662 features useful for text console applications.")
5663 (license license:lgpl2.1+)))
5665 (define-public python2-urwid
5666 (package-with-python2 python-urwid))
5668 (define-public python-urwidtrees
5670 (name "python-urwidtrees")
5675 ;; package author intends on distributing via github rather than pypi:
5676 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5677 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5679 (file-name (string-append name "-" version ".tar.gz"))
5682 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5683 (build-system python-build-system)
5685 '(#:tests? #f)) ; no tests
5686 (propagated-inputs `(("python-urwid" ,python-urwid)))
5687 (home-page "https://github.com/pazz/urwidtrees")
5688 (synopsis "Tree widgets for urwid")
5689 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5690 toolkit. Use it to build trees of widgets.")
5691 (license license:gpl3+)))
5693 (define-public python2-urwidtrees
5694 (package-with-python2 python-urwidtrees))
5696 (define-public python-ua-parser
5698 (name "python-ua-parser")
5703 (uri (pypi-uri "ua-parser" version))
5706 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5707 (build-system python-build-system)
5709 `(#:tests? #f)) ;no test suite in release
5711 `(("python-pyyaml" ,python-pyyaml)))
5712 (home-page "https://github.com/ua-parser/uap-python")
5713 (synopsis "User agent parser")
5715 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5716 (license license:asl2.0)))
5718 (define-public python2-ua-parser
5719 (package-with-python2 python-ua-parser))
5721 (define-public python-user-agents
5723 (name "python-user-agents")
5728 (uri (pypi-uri "user-agents" version))
5731 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5732 (build-system python-build-system)
5734 `(#:tests? #f)) ;missing devices.json test file in release
5736 `(("python-ua-parser" ,python-ua-parser)))
5737 (home-page "https://github.com/selwin/python-user-agents")
5738 (synopsis "User Agent strings parsing library")
5740 "A library to identify devices (phones, tablets) and their capabilities by
5741 parsing (browser/HTTP) user agent strings.")
5742 (license license:expat)))
5744 (define-public python2-user-agents
5745 (package-with-python2 python-user-agents))
5747 (define-public python-dbus
5749 (name "python-dbus")
5754 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5755 "dbus-python-" version ".tar.gz"))
5758 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5759 (build-system gnu-build-system)
5762 (modify-phases %standard-phases
5766 ;; XXX: For the missing '/etc/machine-id'.
5767 (substitute* "test/run-test.sh"
5768 (("DBUS_FATAL_WARNINGS=1")
5769 "DBUS_FATAL_WARNINGS=0"))
5772 `(("pkg-config" ,pkg-config)))
5774 `(("python" ,python-wrapper)
5775 ("dbus-glib" ,dbus-glib)))
5776 (synopsis "Python bindings for D-bus")
5777 (description "python-dbus provides bindings for libdbus, the reference
5778 implementation of D-Bus.")
5779 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5780 (license license:expat)))
5782 (define-public python2-dbus
5783 (package (inherit python-dbus)
5784 (name "python2-dbus")
5785 (inputs `(("python" ,python-2)
5786 ,@(alist-delete "python"
5787 (package-inputs python-dbus)
5789 ;; FIXME: on Python 2, the test_utf8 fails with:
5790 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5791 (arguments `(#:tests? #f))))
5793 (define-public python-notify2
5795 (name "python-notify2")
5800 (uri (pypi-uri "notify2" version))
5803 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5804 (build-system python-build-system)
5805 (arguments `(#:tests? #f)) ; tests depend on system state
5807 `(("python-dbus" ,python-dbus)))
5808 (home-page "https://bitbucket.org/takluyver/pynotify2")
5809 (synopsis "Python interface to D-Bus notifications")
5811 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5812 It is a reimplementation of pynotify in pure Python, and an alternative to
5813 the GObject Introspection bindings to libnotify for non-GTK applications.")
5814 (license (list license:bsd-2
5815 license:lgpl2.1+))))
5817 (define-public python2-notify2
5818 (package-with-python2 python-notify2))
5820 (define-public python-lxml
5822 (name "python-lxml")
5827 (uri (pypi-uri "lxml" version))
5830 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5831 (build-system python-build-system)
5833 `(("libxml2" ,libxml2)
5834 ("libxslt" ,libxslt)))
5835 (home-page "http://lxml.de/")
5837 "Python XML processing library")
5839 "The lxml XML toolkit is a Pythonic binding for the C libraries
5840 libxml2 and libxslt.")
5841 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5843 (define-public python2-lxml
5844 (package-with-python2 python-lxml))
5846 ;; beautifulsoup4 has a totally different namespace than 3.x,
5847 ;; and pypi seems to put it under its own name, so I guess we should too
5848 (define-public python-beautifulsoup4
5850 (name "python-beautifulsoup4")
5855 (uri (pypi-uri "beautifulsoup4" version))
5858 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5859 (build-system python-build-system)
5862 (modify-phases %standard-phases
5863 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5864 ;; must use this conversion script when building with Python 3. The
5865 ;; conversion script also runs the tests.
5866 ;; For more information, see the file 'convert-py3k' in the source
5869 (lambda _ (invoke "./convert-py3k"))))))
5871 `(("python-soupsieve" ,python-soupsieve)))
5873 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5875 "Python screen-scraping library")
5877 "Beautiful Soup is a Python library designed for rapidly setting up
5878 screen-scraping projects. It offers Pythonic idioms for navigating,
5879 searching, and modifying a parse tree, providing a toolkit for
5880 dissecting a document and extracting what you need. It automatically
5881 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5882 (license license:expat)
5883 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5885 (define-public python2-beautifulsoup4
5887 (inherit (package-with-python2
5888 (strip-python2-variant python-beautifulsoup4)))
5889 (arguments `(#:python ,python-2))))
5891 (define-public python-soupsieve
5893 (name "python-soupsieve")
5898 (uri (pypi-uri "soupsieve" version))
5901 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5902 (build-system python-build-system)
5903 (arguments `(#:tests? #f))
5904 ;;XXX: 2 tests fail currently despite claming they were to be
5905 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5906 ;;don't want to create a circular dependency.
5907 (home-page "https://github.com/facelessuser/soupsieve")
5908 (synopsis "CSS selector library")
5910 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5911 Soup 4. It aims to provide selecting, matching, and filtering using modern
5912 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5913 specifications up through the latest CSS level 4 drafts and beyond (though
5914 some are not yet implemented).")
5915 (properties `((python2-variant . ,(delay python2-soupsieve))))
5916 (license license:expat)))
5918 (define-public python2-soupsieve
5919 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5923 `(("python2-backports-functools-lru-cache"
5924 ,python2-backports-functools-lru-cache)
5925 ,@(package-propagated-inputs base))))))
5927 (define-public python-netifaces
5929 (name "python-netifaces")
5934 (uri (pypi-uri "netifaces" version))
5937 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5938 (build-system python-build-system)
5939 (home-page "https://github.com/al45tair/netifaces")
5941 "Python module for portable network interface information")
5943 "Netifaces is a Python module providing information on network
5944 interfaces in an easy and portable manner.")
5945 (license license:expat)))
5947 (define-public python2-netifaces
5948 (package-with-python2 python-netifaces))
5950 (define-public python-networkx
5952 (name "python-networkx")
5957 (uri (pypi-uri "networkx" version ".zip"))
5959 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5960 (build-system python-build-system)
5961 ;; python-decorator is needed at runtime.
5963 `(("python-decorator" ,python-decorator)))
5965 `(("python-nose" ,python-nose)
5967 (home-page "https://networkx.github.io/")
5968 (synopsis "Python module for creating and manipulating graphs and networks")
5970 "NetworkX is a Python package for the creation, manipulation, and study
5971 of the structure, dynamics, and functions of complex networks.")
5972 (license license:bsd-3)))
5974 (define-public python2-networkx
5975 (package-with-python2 python-networkx))
5977 (define-public python-datrie
5979 (name "python-datrie")
5984 (uri (pypi-uri "datrie" version))
5987 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5988 (build-system python-build-system)
5990 `(("python-cython" ,python-cython)
5991 ("python-hypothesis" ,python-hypothesis)
5992 ("python-pytest" ,python-pytest)
5993 ("python-pytest-runner" ,python-pytest-runner)))
5994 (home-page "https://github.com/kmike/datrie")
5995 (synopsis "Fast, efficiently stored trie for Python")
5997 "This package provides a fast, efficiently stored trie implementation for
5999 (license license:lgpl2.1+)))
6001 (define-public snakemake
6008 (uri (pypi-uri "snakemake" version))
6010 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6011 (build-system python-build-system)
6013 ;; TODO: Package missing test dependencies.
6016 (modify-phases %standard-phases
6017 ;; For cluster execution Snakemake will call Python. Since there is
6018 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6019 ;; this by calling the snakemake wrapper instead.
6020 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6021 (lambda* (#:key outputs #:allow-other-keys)
6022 (substitute* "snakemake/executors.py"
6023 (("\\{sys.executable\\} -m snakemake")
6024 (string-append (assoc-ref outputs "out")
6028 `(("python-gitpython" ,python-gitpython)
6029 ("python-wrapt" ,python-wrapt)
6030 ("python-requests" ,python-requests)
6031 ("python-appdirs" ,python-appdirs)
6032 ("python-configargparse" ,python-configargparse)
6033 ("python-datrie" ,python-datrie)
6034 ("python-docutils" ,python-docutils)
6035 ("python-jinja2" ,python-jinja2)
6036 ("python-jsonschema" ,python-jsonschema)
6037 ("python-networkx" ,python-networkx)
6038 ("python-pyyaml" ,python-pyyaml)
6039 ("python-ratelimiter" ,python-ratelimiter)))
6040 (home-page "https://snakemake.readthedocs.io")
6041 (synopsis "Python-based execution environment for make-like workflows")
6043 "Snakemake aims to reduce the complexity of creating workflows by
6044 providing a clean and modern domain specific specification language (DSL) in
6045 Python style, together with a fast and comfortable execution environment.")
6046 (license license:expat)))
6048 ;; This is currently needed for the pigx-* packages.
6049 (define-public snakemake-4
6050 (package (inherit snakemake)
6055 (uri (pypi-uri "snakemake" version))
6057 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6059 `(("python-wrapt" ,python-wrapt)
6060 ("python-requests" ,python-requests)
6061 ("python-appdirs" ,python-appdirs)
6062 ("python-configargparse" ,python-configargparse)
6063 ("python-pyyaml" ,python-pyyaml)
6064 ("python-ratelimiter" ,python-ratelimiter)))))
6066 (define-public python-pyqrcode
6068 (name "python-pyqrcode")
6073 (uri (pypi-uri "PyQRCode" version))
6076 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6077 (build-system python-build-system)
6079 "https://github.com/mnooner256/pyqrcode")
6080 (synopsis "QR code generator")
6082 "Pyqrcode is a QR code generator written purely in Python with
6083 SVG, EPS, PNG and terminal output.")
6084 (license license:bsd-3)))
6086 (define-public python-seaborn
6088 (name "python-seaborn")
6093 (uri (pypi-uri "seaborn" version))
6095 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6096 (build-system python-build-system)
6099 (modify-phases %standard-phases
6100 (add-before 'check 'start-xserver
6101 (lambda* (#:key inputs #:allow-other-keys)
6102 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6103 ;; There must be a running X server and make check doesn't
6104 ;; start one. Therefore we must do it.
6105 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6106 (setenv "DISPLAY" ":1")
6108 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6110 `(("python-pandas" ,python-pandas)
6111 ("python-matplotlib" ,python-matplotlib)
6112 ("python-numpy" ,python-numpy)
6113 ("python-scipy" ,python-scipy)))
6115 `(("python-pytest" ,python-pytest)
6116 ("xorg-server" ,xorg-server)))
6117 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6118 (synopsis "Statistical data visualization")
6120 "Seaborn is a library for making attractive and informative statistical
6121 graphics in Python. It is built on top of matplotlib and tightly integrated
6122 with the PyData stack, including support for numpy and pandas data structures
6123 and statistical routines from scipy and statsmodels.")
6124 (license license:bsd-3)))
6126 (define-public python2-seaborn
6127 (package-with-python2 python-seaborn))
6129 (define-public python-mpmath
6131 (name "python-mpmath")
6135 (uri (string-append "http://mpmath.org/files/mpmath-"
6139 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6140 (build-system python-build-system)
6143 (modify-phases %standard-phases
6146 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6147 (home-page "http://mpmath.org")
6148 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6150 "@code{mpmath} can be used as an arbitrary-precision substitute for
6151 Python's float/complex types and math/cmath modules, but also does much
6152 more advanced mathematics.")
6153 (license license:bsd-3)))
6155 (define-public python2-mpmath
6156 (package-with-python2 python-mpmath))
6158 (define-public python-bigfloat
6160 (name "python-bigfloat")
6165 (uri (pypi-uri "bigfloat" version))
6167 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6168 (build-system python-build-system)
6171 (home-page "https://github.com/mdickinson/bigfloat")
6172 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6174 "This package provides a Python interface to the MPFR library for
6175 multiprecision arithmetic.")
6176 (license license:lgpl3+)))
6178 (define-public python2-bigfloat
6179 (package-with-python2 python-bigfloat))
6181 (define-public python-sympy
6183 (name "python-sympy")
6189 "https://github.com/sympy/sympy/releases/download/sympy-"
6190 version "/sympy-" version ".tar.gz"))
6192 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6193 (build-system python-build-system)
6196 (modify-phases %standard-phases
6197 ;; Run the core tests after installation. By default it would run
6198 ;; *all* tests, which take a very long time to complete and are known
6201 (add-after 'install 'check
6202 (lambda* (#:key outputs #:allow-other-keys)
6203 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6206 `(("python-mpmath" ,python-mpmath)))
6207 (home-page "http://www.sympy.org/")
6208 (synopsis "Python library for symbolic mathematics")
6210 "SymPy is a Python library for symbolic mathematics. It aims to become a
6211 full-featured computer algebra system (CAS) while keeping the code as simple
6212 as possible in order to be comprehensible and easily extensible.")
6213 (license license:bsd-3)))
6215 (define-public python2-sympy
6217 (inherit (package-with-python2 python-sympy))
6220 (modify-phases %standard-phases
6221 ;; Run the core tests after installation. By default it would run
6222 ;; *all* tests, which take a very long time to complete and are known
6225 (add-after 'install 'check
6226 (lambda* (#:key outputs #:allow-other-keys)
6227 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6230 (define-public python-q
6237 (uri (pypi-uri "q" version))
6240 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6241 (build-system python-build-system)
6242 (home-page "https://github.com/zestyping/q")
6243 (synopsis "Quick-and-dirty debugging output for tired programmers")
6245 "q is a Python module for \"print\" style of debugging Python code. It
6246 provides convenient short API for print out of values, tracebacks, and
6247 falling into the Python interpreter.")
6248 (license license:asl2.0)))
6250 (define-public python2-q
6251 (package-with-python2 python-q))
6253 (define-public python2-xlib
6255 (name "python2-xlib")
6259 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6261 "python-xlib-" version ".tar.gz"))
6264 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6265 (build-system python-build-system)
6267 `(#:python ,python-2 ;Python 2 only
6268 #:tests? #f)) ;no tests
6269 (home-page "http://python-xlib.sourceforge.net/")
6270 (synopsis "Python X11 client library")
6272 "The Python X Library is intended to be a fully functional X client
6273 library for Python programs. It is useful to implement low-level X clients.
6274 It is written entirely in Python.")
6275 (license license:gpl2+)))
6277 (define-public python-singledispatch
6279 (name "python-singledispatch")
6284 (uri (pypi-uri "singledispatch" version))
6287 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6288 (build-system python-build-system)
6290 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6292 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6293 (synopsis "Backport of singledispatch feature from Python 3.4")
6295 "This library brings functools.singledispatch from Python 3.4 to Python
6297 (license license:expat)))
6299 (define-public python2-singledispatch
6300 (package-with-python2 python-singledispatch))
6302 ;; the python- version can be removed with python-3.5
6303 (define-public python-backports-abc
6305 (name "python-backports-abc")
6310 (uri (pypi-uri "backports_abc" version))
6313 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6314 (build-system python-build-system)
6315 (home-page "https://github.com/cython/backports_abc")
6316 (synopsis "Backport of additions to the 'collections.abc' module")
6318 "Python-backports-abc provides a backport of additions to the
6319 @code{collections.abc} module in Python-3.5.")
6320 (license license:psfl)))
6322 (define-public python2-backports-abc
6323 (package-with-python2 python-backports-abc))
6325 (define-public python-backports-csv
6327 (name "python-backports-csv")
6332 (uri (pypi-uri "backports.csv" version))
6335 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6336 (build-system python-build-system)
6337 (home-page "https://github.com/ryanhiebert/backports.csv")
6338 (synopsis "Backport of Python 3's csv module for Python 2")
6340 "Provides a backport of Python 3's @code{csv} module for parsing
6341 comma separated values. The API of the @code{csv} module in Python 2
6342 is drastically different from the @code{csv} module in Python 3.
6343 This is due, for the most part, to the difference between str in
6344 Python 2 and Python 3.")
6345 (license license:psfl)))
6347 (define-public python2-backports-csv
6348 (package-with-python2 python-backports-csv))
6350 (define-public python2-backports-shutil-get-terminal-size
6352 (name "python2-backports-shutil-get-terminal-size")
6357 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6360 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6361 (build-system python-build-system)
6363 `(#:python ,python-2
6365 (modify-phases %standard-phases
6368 (invoke "py.test" "-v"))))))
6370 `(("python2-pytest" ,python2-pytest)))
6371 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6372 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6374 "This package provides a backport of the @code{get_terminal_size
6375 function} from Python 3.3's @code{shutil}.
6376 Unlike the original version it is written in pure Python rather than C,
6377 so it might be a tiny bit slower.")
6378 (license license:expat)))
6380 (define-public python-waf
6386 (uri (string-append "https://waf.io/"
6387 "waf-" version ".tar.bz2"))
6390 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6391 (build-system python-build-system)
6394 (modify-phases %standard-phases
6397 (invoke "python" "waf-light" "configure" "build")))
6400 (invoke "python" "waf" "--version")))
6402 (lambda* (#:key outputs #:allow-other-keys)
6403 (let ((out (assoc-ref outputs "out")))
6404 (install-file "waf" (string-append out "/bin")))
6406 ;; waf breaks when it is wrapped.
6408 (home-page "https://waf.io/")
6409 (synopsis "Python-based build system")
6411 "Waf is a Python-based framework for configuring, compiling and installing
6413 (license license:bsd-3)))
6415 (define-public python2-waf
6416 (package-with-python2 python-waf))
6418 (define-public python-pyzmq
6420 (name "python-pyzmq")
6425 (uri (pypi-uri "pyzmq" version))
6427 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6428 (build-system python-build-system)
6431 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6432 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6433 ;; --inplace' for 'python setup.py test' to work.
6436 `(("zeromq" ,zeromq)))
6438 `(("pkg-config" ,pkg-config)
6439 ("python-nose" ,python-nose)))
6440 (home-page "https://github.com/zeromq/pyzmq")
6441 (synopsis "Python bindings for 0MQ")
6443 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6444 (license license:bsd-4)))
6446 (define-public python2-pyzmq
6447 (package-with-python2 python-pyzmq))
6449 (define-public python-pep8
6450 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6451 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6452 ;; some dependents' test suites, and nothing more.
6454 (name "python-pep8")
6459 (uri (pypi-uri "pep8" version))
6462 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6463 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6464 (build-system python-build-system)
6465 (home-page "https://pep8.readthedocs.org/")
6466 (synopsis "Python style guide checker")
6468 "This tools checks Python code against some of the style conventions in
6470 (license license:expat)))
6472 (define-public python2-pep8
6473 (package-with-python2 python-pep8))
6475 (define-public python-pyflakes
6477 (name "python-pyflakes")
6482 (uri (pypi-uri "pyflakes" version))
6485 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6486 (build-system python-build-system)
6488 "https://github.com/pyflakes/pyflakes")
6489 (synopsis "Passive checker of Python programs")
6491 "Pyflakes statically checks Python source code for common errors.")
6492 (license license:expat)))
6494 (define-public python2-pyflakes
6495 (package-with-python2 python-pyflakes))
6497 (define-public python-mccabe
6499 (name "python-mccabe")
6504 (uri (pypi-uri "mccabe" version))
6507 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6508 (build-system python-build-system)
6510 `(("python-pytest" ,python-pytest-bootstrap)
6511 ("python-pytest-runner" ,python-pytest-runner)))
6512 (home-page "https://github.com/flintwork/mccabe")
6513 (synopsis "McCabe checker, plugin for flake8")
6515 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6516 complexity of Python source code.")
6517 (license license:expat)))
6519 (define-public python2-mccabe
6520 (package-with-python2 python-mccabe))
6522 (define-public python-mccabe-0.2.1
6523 (package (inherit python-mccabe)
6528 (uri (pypi-uri "mccabe" version))
6531 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6533 (define-public python2-mccabe-0.2.1
6534 (package-with-python2 python-mccabe-0.2.1))
6536 ;; Flake8 2.4.1 requires an older version of pep8.
6537 ;; This should be removed ASAP.
6538 (define-public python-pep8-1.5.7
6539 (package (inherit python-pep8)
6544 (uri (pypi-uri "pep8" version))
6547 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6549 ;; XXX Tests not compatible with Python 3.5.
6552 (define-public python2-pep8-1.5.7
6553 (package-with-python2 python-pep8-1.5.7))
6555 ;; Flake8 2.4.1 requires an older version of pyflakes.
6556 ;; This should be removed ASAP.
6557 (define-public python-pyflakes-0.8.1
6558 (package (inherit python-pyflakes)
6563 (uri (pypi-uri "pyflakes" version))
6566 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6568 ;; XXX Tests not compatible with Python 3.5.
6571 (define-public python2-pyflakes-0.8.1
6572 (package-with-python2 python-pyflakes-0.8.1))
6574 (define-public python-flake8
6576 (name "python-flake8")
6580 (uri (pypi-uri "flake8" version))
6583 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6584 (build-system python-build-system)
6587 (modify-phases %standard-phases
6589 (add-after 'install 'check
6590 (lambda* (#:key inputs outputs #:allow-other-keys)
6591 (add-installed-pythonpath inputs outputs)
6592 (invoke "pytest" "-v")
6595 `(("python-pycodestyle" ,python-pycodestyle)
6596 ("python-entrypoints" ,python-entrypoints)
6597 ("python-pyflakes" ,python-pyflakes)
6598 ("python-mccabe" ,python-mccabe)))
6600 `(("python-mock" ,python-mock)
6601 ("python-pytest" ,python-pytest-bootstrap)
6602 ("python-pytest-runner" ,python-pytest-runner)))
6603 (home-page "https://gitlab.com/pycqa/flake8")
6605 "The modular source code checker: pep8, pyflakes and co")
6607 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6608 (properties `((python2-variant . ,(delay python2-flake8))))
6609 (license license:expat)))
6611 (define-public python2-flake8
6612 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6613 (package (inherit base)
6615 `(("python2-configparser" ,python2-configparser)
6616 ("python2-enum34" ,python2-enum34)
6617 ("python2-typing" ,python2-typing)
6618 ,@(package-propagated-inputs base))))))
6620 ;; python-hacking requires flake8 <2.6.0.
6621 (define-public python-flake8-2.5
6623 (inherit python-flake8)
6627 (uri (pypi-uri "flake8" version))
6630 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6632 `(("python-pep8" ,python-pep8)
6633 ,@(package-propagated-inputs python-flake8)))
6634 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6636 (define-public python2-flake8-2.5
6638 (inherit python2-flake8)
6639 (version (package-version python-flake8-2.5))
6641 (inherit (package-source python-flake8-2.5))))
6643 `(("python2-pep8" ,python2-pep8)
6644 ,@(package-propagated-inputs python2-flake8)))))
6646 (define-public python-flake8-polyfill
6648 (name "python-flake8-polyfill")
6653 (uri (pypi-uri "flake8-polyfill" version))
6656 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6657 (build-system python-build-system)
6660 (modify-phases %standard-phases
6663 ;; Be compatible with Pytest 4:
6664 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6665 (substitute* "setup.cfg"
6669 (setenv "PYTHONPATH"
6670 (string-append (getcwd) "/build/lib:"
6671 (getenv "PYTHONPATH")))
6672 (invoke "py.test" "-v"))))))
6674 `(("python-flake8" ,python-flake8)
6675 ("python-mock" ,python-mock)
6676 ("python-pep8" ,python-pep8)
6677 ("python-pycodestyle" ,python-pycodestyle)
6678 ("python-pytest" ,python-pytest)))
6679 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6680 (synopsis "Polyfill package for Flake8 plugins")
6682 "This package that provides some compatibility helpers for Flake8
6683 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6684 (license license:expat)))
6686 (define-public python2-flake8-polyfill
6687 (package-with-python2 python-flake8-polyfill))
6689 (define-public python-mistune
6691 (name "python-mistune")
6696 (uri (pypi-uri "mistune" version))
6699 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6700 (build-system python-build-system)
6702 `(("python-nose" ,python-nose)
6703 ("python-cython" ,python-cython)))
6704 (home-page "https://github.com/lepture/mistune")
6705 (synopsis "Markdown parser in pure Python")
6706 (description "This package provides a fast markdown parser in pure
6708 (license license:bsd-3)))
6710 (define-public python2-mistune
6711 (package-with-python2 python-mistune))
6713 (define-public python-markdown
6715 (name "python-markdown")
6720 (uri (pypi-uri "Markdown" version))
6723 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6724 (build-system python-build-system)
6726 `(("python-nose" ,python-nose)
6727 ("python-pyyaml" ,python-pyyaml)))
6728 (home-page "https://python-markdown.github.io/")
6729 (synopsis "Python implementation of Markdown")
6731 "This package provides a Python implementation of John Gruber's
6732 Markdown. The library features international input, various Markdown
6733 extensions, and several HTML output formats. A command line wrapper
6734 markdown_py is also provided to convert Markdown files to HTML.")
6735 (license license:bsd-3)))
6737 (define-public python2-markdown
6738 (package-with-python2 python-markdown))
6740 (define-public python-ptyprocess
6742 (name "python-ptyprocess")
6747 (uri (pypi-uri "ptyprocess" version))
6750 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6751 (build-system python-build-system)
6753 `(("python-nose" ,python-nose)))
6756 (modify-phases %standard-phases
6758 (lambda _ (invoke "nosetests"))))))
6759 (home-page "https://github.com/pexpect/ptyprocess")
6760 (synopsis "Run a subprocess in a pseudo terminal")
6762 "This package provides a Python library used to launch a subprocess in a
6763 pseudo terminal (pty), and interact with both the process and its pty.")
6764 (license license:isc)))
6766 (define-public python2-ptyprocess
6767 (package-with-python2 python-ptyprocess))
6769 (define-public python-cram
6771 (name "python-cram")
6773 (home-page "https://bitheap.org/cram/")
6776 (uri (list (string-append home-page "cram-"
6778 (pypi-uri "cram" version)))
6781 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6784 (modify-phases %standard-phases
6785 (add-after 'unpack 'patch-source
6787 (substitute* (find-files "cram" ".*\\.py$")
6788 ;; Replace default shell path.
6789 (("/bin/sh") (which "sh")))
6790 (substitute* (find-files "tests" ".*\\.t$")
6792 (("/bin/bash") (which "bash"))
6793 (("/bin/sh") (which "sh")))
6794 (substitute* "cram/_test.py"
6795 ;; This hack works around a bug triggered by substituting
6796 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6797 ;; "cram -h", which breaks the output at 80 characters. This
6798 ;; causes the line showing the default shell to break into two
6799 ;; lines, but the test expects a single line...
6800 (("env\\['COLUMNS'\\] = '80'")
6801 "env['COLUMNS'] = '160'"))
6803 (substitute* "Makefile"
6804 ;; Recent versions of python-coverage have caused the test
6805 ;; coverage to decrease (as of version 0.7). Allow that.
6806 (("--fail-under=100")
6811 ;; The test phase uses the built library and executable.
6812 (lambda* (#:key inputs outputs #:allow-other-keys)
6813 (add-installed-pythonpath inputs outputs)
6814 (setenv "PATH" (string-append (getenv "PATH") ":"
6815 (assoc-ref outputs "out") "/bin"))
6816 (invoke "make" "test"))))))
6817 (build-system python-build-system)
6819 `(("python-coverage" ,python-coverage)
6821 (synopsis "Simple testing framework for command line applications")
6823 "Cram is a functional testing framework for command line applications.
6824 Cram tests look like snippets of interactive shell sessions. Cram runs each
6825 command and compares the command output in the test with the command’s actual
6827 (license license:gpl2+)))
6829 (define-public python2-cram
6830 (package-with-python2 python-cram))
6832 (define-public python-straight-plugin
6834 (name "python-straight-plugin")
6839 (uri (pypi-uri "straight.plugin" version))
6842 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6843 (build-system python-build-system)
6844 (home-page "https://github.com/ironfroggy/straight.plugin")
6845 (synopsis "Simple namespaced plugin facility")
6846 (description "Straight Plugin provides a type of plugin you can create from
6847 almost any existing Python modules, and an easy way for outside developers to
6848 add functionality and customization to your projects with their own plugins.")
6849 (license license:expat)))
6851 (define-public python2-straight-plugin
6852 (package-with-python2 python-straight-plugin))
6854 (define-public python-fonttools
6856 (name "python-fonttools")
6860 (uri (pypi-uri "fonttools" version ".zip"))
6863 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6864 (build-system python-build-system)
6867 ("python-pytest" ,python-pytest)
6868 ("python-pytest-runner" ,python-pytest-runner)))
6869 (home-page "https://github.com/behdad/fonttools")
6870 (synopsis "Tools to manipulate font files")
6872 "FontTools/TTX is a library to manipulate font files from Python. It
6873 supports reading and writing of TrueType/OpenType fonts, reading and writing
6874 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6875 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6876 from an XML-based format.")
6877 (license license:expat)))
6879 (define-public python2-fonttools
6880 (package-with-python2 python-fonttools))
6882 (define-public python-ly
6889 (uri (pypi-uri name version))
6892 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6893 (build-system python-build-system)
6895 ;; FIXME: Some tests need network access.
6897 (synopsis "Tool and library for manipulating LilyPond files")
6898 (description "This package provides a Python library to parse, manipulate
6899 or create documents in LilyPond format. A command line program ly is also
6900 provided that can be used to do various manipulations with LilyPond files.")
6901 (home-page "https://pypi.python.org/pypi/python-ly")
6902 (license license:gpl2+)))
6904 (define-public python-appdirs
6906 (name "python-appdirs")
6911 (uri (pypi-uri "appdirs" version))
6914 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6915 (build-system python-build-system)
6916 (home-page "https://github.com/ActiveState/appdirs")
6918 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6920 "This module provides a portable way of finding out where user data
6921 should be stored on various operating systems.")
6922 (license license:expat)))
6924 (define-public python2-appdirs
6925 (package-with-python2 python-appdirs))
6927 (define-public python-llfuse
6929 (name "python-llfuse")
6933 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6936 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6937 (build-system python-build-system)
6942 `(("pkg-config" ,pkg-config)))
6943 (synopsis "Python bindings for FUSE")
6945 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6946 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6947 (license license:lgpl2.0+)
6948 (properties `((python2-variant . ,(delay python2-llfuse))))))
6950 (define-public python2-llfuse
6951 (package (inherit (package-with-python2
6952 (strip-python2-variant python-llfuse)))
6953 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6956 (define-public python-llfuse-0.41
6957 (package (inherit python-llfuse)
6962 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6963 "llfuse-" version ".tar.bz2"))
6966 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6967 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6968 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6969 (license (list license:expat license:lgpl2.0+))))
6971 (define-public python-msgpack
6973 (name "python-msgpack")
6977 (uri (pypi-uri "msgpack" version))
6980 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6981 (build-system python-build-system)
6983 `(#:modules ((guix build utils)
6984 (guix build python-build-system)
6989 (modify-phases %standard-phases
6992 (let ((cwd (getcwd)))
6993 (setenv "PYTHONPATH"
6994 (string-append cwd "/build/"
6995 (find (cut string-prefix? "lib" <>)
6996 (scandir (string-append cwd "/build")))
6998 (getenv "PYTHONPATH")))
6999 (invoke "pytest" "-v" "test")))))))
7001 `(("python-pytest" ,python-pytest)))
7002 (synopsis "MessagePack (de)serializer")
7003 (description "MessagePack is a fast, compact binary serialization format,
7004 suitable for similar data to JSON. This package provides CPython bindings for
7005 reading and writing MessagePack data.")
7006 (home-page "https://pypi.python.org/pypi/msgpack/")
7007 (license license:asl2.0)))
7009 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7010 ;; release 0.5. Some packages like borg still call it by the old name for now.
7011 ;; <https://bugs.gnu.org/30662>
7012 (define-public python-msgpack-transitional
7014 (inherit python-msgpack)
7015 (name "python-msgpack-transitional")
7017 (substitute-keyword-arguments (package-arguments python-msgpack)
7019 `(modify-phases ,phases
7020 (add-after 'unpack 'configure-transitional
7022 ;; Keep using the old name.
7023 (substitute* "setup.py"
7024 (("TRANSITIONAL = False")
7025 "TRANSITIONAL = 1"))
7028 (define-public python2-msgpack
7029 (package-with-python2 python-msgpack))
7031 (define-public python-netaddr
7033 (name "python-netaddr")
7038 (uri (pypi-uri "netaddr" version))
7041 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7042 (build-system python-build-system)
7043 (arguments `(#:tests? #f)) ;; No tests.
7044 (home-page "https://github.com/drkjam/netaddr/")
7045 (synopsis "Pythonic manipulation of network addresses")
7047 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7048 and MAC network addresses.")
7049 (license license:bsd-3)))
7051 (define-public python2-netaddr
7052 (package-with-python2 python-netaddr))
7054 (define-public python2-pyroute2
7056 (name "python2-pyroute2")
7061 (uri (pypi-uri "pyroute2" version))
7064 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7065 (build-system python-build-system)
7067 `(#:python ,python-2)) ;Python 3.x is not supported
7068 (home-page "https://github.com/svinota/pyroute2")
7069 (synopsis "Python netlink library")
7071 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7072 Supported netlink families and protocols include:
7074 @item rtnl, network settings - addresses, routes, traffic controls
7075 @item nfnetlink - netfilter API: ipset, nftables, ...
7076 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7077 @item devlink - manage and monitor devlink-enabled hardware
7078 @item generic - generic netlink families
7080 @item nl80211 - wireless functions API (basic support)
7081 @item taskstats - extended process statistics
7082 @item acpi_events - ACPI events monitoring
7083 @item thermal_events - thermal events monitoring
7084 @item VFS_DQUOT - disk quota events monitoring
7087 (license license:gpl2+)))
7089 (define-public python-wrapt
7091 (name "python-wrapt")
7096 (uri (pypi-uri "wrapt" version))
7099 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7100 (build-system python-build-system)
7102 ;; Tests are not included in the tarball, they are only available in the
7105 (home-page "https://github.com/GrahamDumpleton/wrapt")
7106 (synopsis "Module for decorators, wrappers and monkey patching")
7108 "The aim of the wrapt module is to provide a transparent object proxy for
7109 Python, which can be used as the basis for the construction of function
7110 wrappers and decorator functions.")
7111 (license license:bsd-2)))
7113 (define-public python2-wrapt
7114 (package-with-python2 python-wrapt))
7116 (define-public python-xlrd
7118 (name "python-xlrd")
7122 (uri (pypi-uri "xlrd" version))
7125 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7126 (build-system python-build-system)
7129 (modify-phases %standard-phases
7130 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7131 ;; run tests instead for now.
7132 (replace 'check (lambda _ (invoke "nosetests"))))))
7133 (native-inputs `(("python-nose" ,python-nose)))
7134 (home-page "http://www.python-excel.org/")
7135 (synopsis "Library for extracting data from Excel files")
7136 (description "This package provides a library to extract data from
7137 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7138 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7139 Unicode-aware. It is not intended as an end-user tool.")
7140 (license license:bsd-3)))
7142 (define-public python2-xlrd
7143 (package-with-python2 python-xlrd))
7145 (define-public python-prettytable
7147 (name "python-prettytable")
7152 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7155 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7156 (build-system python-build-system)
7157 (home-page "http://code.google.com/p/prettytable/")
7158 (synopsis "Display tabular data in an ASCII table format")
7160 "A library designed to represent tabular data in visually appealing ASCII
7161 tables. PrettyTable allows for selection of which columns are to be printed,
7162 independent alignment of columns (left or right justified or centred) and
7163 printing of sub-tables by specifying a row range.")
7164 (license license:bsd-3)))
7166 (define-public python2-prettytable
7167 (package-with-python2 python-prettytable))
7169 (define-public python-tables
7171 (name "python-tables")
7176 (uri (pypi-uri "tables" version))
7179 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7180 (modules '((guix build utils)))
7183 ;; Remove pre-compiled .pyc files from source.
7184 (for-each delete-file-recursively
7185 (find-files "." "__pycache__" #:directories? #t))
7186 (for-each delete-file (find-files "." "\\.pyc$"))
7188 (build-system python-build-system)
7190 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7191 ;; or "check", so we must override the build and check phases.
7193 (modify-phases %standard-phases
7194 (add-after 'unpack 'use-gcc
7196 (substitute* "setup.py"
7197 (("compiler = new_compiler\\(\\)" line)
7199 "\ncompiler.set_executables(compiler='gcc',"
7200 "compiler_so='gcc',"
7202 "linker_so='gcc -shared')")))
7205 (lambda* (#:key inputs #:allow-other-keys)
7206 (invoke "python" "setup.py" "build"
7207 (string-append "--hdf5="
7208 (assoc-ref inputs "hdf5")))))
7210 (lambda* (#:key inputs #:allow-other-keys)
7211 (invoke "python" "setup.py" "check"
7212 (string-append "--hdf5="
7213 (assoc-ref inputs "hdf5"))))))))
7215 `(("python-numexpr" ,python-numexpr)
7216 ("python-numpy" ,python-numpy)))
7218 `(("python-cython" ,python-cython)
7219 ("pkg-config" ,pkg-config)))
7224 (home-page "http://www.pytables.org/")
7225 (synopsis "Hierarchical datasets for Python")
7226 (description "PyTables is a package for managing hierarchical datasets and
7227 designed to efficiently cope with extremely large amounts of data.")
7228 (license license:bsd-3)))
7230 (define-public python2-tables
7231 (package-with-python2 python-tables))
7233 (define-public python-pyasn1
7235 (name "python-pyasn1")
7240 (uri (pypi-uri "pyasn1" version))
7243 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7244 (build-system python-build-system)
7245 (home-page "http://pyasn1.sourceforge.net/")
7246 (synopsis "ASN.1 types and codecs")
7248 "This is an implementation of ASN.1 types and codecs in Python. It is
7249 suitable for a wide range of protocols based on the ASN.1 specification.")
7250 (license license:bsd-2)))
7252 (define-public python2-pyasn1
7253 (package-with-python2 python-pyasn1))
7255 (define-public python-pyasn1-modules
7257 (name "python-pyasn1-modules")
7262 (uri (pypi-uri "pyasn1-modules" version))
7265 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7266 (build-system python-build-system)
7268 `(("python-pyasn1" ,python-pyasn1)))
7269 (home-page "https://sourceforge.net/projects/pyasn1/")
7270 (synopsis "ASN.1 codec implementations")
7272 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7273 implementations of ASN.1-based codecs and protocols.")
7274 (license license:bsd-3)))
7276 (define-public python2-pyasn1-modules
7277 (package-with-python2 python-pyasn1-modules))
7279 (define-public python-ipaddress
7281 (name "python-ipaddress")
7285 (uri (pypi-uri "ipaddress" version))
7288 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7289 (build-system python-build-system)
7290 (home-page "https://github.com/phihag/ipaddress")
7291 (synopsis "IP address manipulation library")
7293 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7294 in Python. This library is used to create, poke at, and manipulate IPv4 and
7295 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7296 module to older versions of Python.")
7297 (license license:psfl)))
7299 (define-public python2-ipaddress
7300 (package-with-python2 python-ipaddress))
7302 (define-public python2-ipaddr
7304 (name "python2-ipaddr")
7309 (uri (pypi-uri "ipaddr" version))
7311 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7312 (build-system python-build-system)
7314 `(#:python ,python-2 ;version 2 only
7316 (modify-phases %standard-phases
7318 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7319 (home-page "https://github.com/google/ipaddr-py")
7320 (synopsis "IP address manipulation library")
7322 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7323 IPv6 addresses and networks.
7325 For new implementations you may prefer to use the standard module
7326 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7327 versions of Python.")
7328 (license license:asl2.0)))
7330 (define-public python-idna
7332 (name "python-idna")
7337 (uri (pypi-uri "idna" version))
7340 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7341 (build-system python-build-system)
7342 (home-page "https://github.com/kjd/idna")
7343 (synopsis "Internationalized domain names in applications")
7345 "This is a library to support the Internationalised Domain Names in
7346 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7347 protocol is often referred to as “IDNA2008” and can produce different results
7348 from the earlier standard from 2003. The library is also intended to act as a
7349 suitable drop-in replacement for the “encodings.idna” module that comes with
7350 the Python standard library but currently only supports the older 2003
7352 (license license:bsd-4)))
7354 (define-public python-idna-2.7
7355 (package (inherit python-idna)
7359 (uri (pypi-uri "idna" version))
7362 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7365 (define-public python2-idna
7366 (package-with-python2 python-idna))
7368 (define-public python-idna-ssl
7370 (name "python-idna-ssl")
7375 (uri (pypi-uri "idna-ssl" version))
7378 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7379 (build-system python-build-system)
7381 `(#:tests? #f)) ;circular dependency with python-aiohttp
7382 (home-page "https://github.com/aio-libs/idna-ssl")
7383 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7384 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7386 (license license:expat)))
7388 (define-public python-pretend
7390 (name "python-pretend")
7395 (uri (pypi-uri "pretend" version))
7398 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7399 (build-system python-build-system)
7400 (home-page "https://github.com/alex/pretend")
7401 (synopsis "Library for stubbing in Python")
7403 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7404 technique for writing tests. You may hear the term mixed up with mocks,
7405 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7406 responses, rather than doing any computation.")
7407 (license license:bsd-3)))
7409 (define-public python2-pretend
7410 (package-with-python2 python-pretend))
7412 (define-public python-pip
7419 (uri (pypi-uri "pip" version))
7422 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7423 (build-system python-build-system)
7425 '(#:tests? #f)) ; there are no tests in the pypi archive.
7426 (home-page "https://pip.pypa.io/")
7427 (synopsis "Package manager for Python software")
7429 "Pip is a package manager for Python software, that finds packages on the
7430 Python Package Index (PyPI).")
7431 (license license:expat)))
7433 (define-public python2-pip
7434 (package-with-python2 python-pip))
7436 (define-public python-tlsh
7438 (name "python-tlsh")
7440 (home-page "https://github.com/trendmicro/tlsh")
7445 (url "https://github.com/trendmicro/tlsh.git")
7446 (commit (string-append "v" version))))
7447 (file-name (git-file-name name version))
7449 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7450 (build-system cmake-build-system)
7452 '(#:out-of-source? #f
7453 #:phases (modify-phases %standard-phases
7456 (lambda* (#:key outputs #:allow-other-keys)
7457 ;; Build and install the Python bindings. The underlying
7458 ;; C++ library is apparently not meant to be installed.
7459 (let ((out (assoc-ref outputs "out")))
7460 (with-directory-excursion "py_ext"
7461 (and (system* "python" "setup.py" "build")
7462 (system* "python" "setup.py" "install"
7463 (string-append "--prefix=" out))))))))))
7464 (inputs `(("python" ,python-wrapper))) ;for the bindings
7465 (synopsis "Fuzzy matching library for Python")
7467 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7468 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7469 value which can be used for similarity comparisons. Similar objects have
7470 similar hash values, which allows for the detection of similar objects by
7471 comparing their hash values. The byte stream should have a sufficient amount
7472 of complexity; for example, a byte stream of identical bytes will not generate
7474 (license license:asl2.0)))
7476 (define-public python2-tlsh
7478 (inherit python-tlsh)
7479 (name "python2-tlsh")
7480 (inputs `(("python" ,python-2)))))
7482 (define-public python-termcolor
7484 (name "python-termcolor")
7489 (uri (pypi-uri "termcolor" version))
7492 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7493 (build-system python-build-system)
7495 ;; There are no tests.
7497 (home-page "https://pypi.python.org/pypi/termcolor")
7498 (synopsis "ANSII Color formatting for terminal output")
7500 "This package provides ANSII Color formatting for output in terminals.")
7501 (license license:expat)))
7503 (define-public python2-termcolor
7504 (package-with-python2 python-termcolor))
7506 (define-public python-libarchive-c
7508 (name "python-libarchive-c")
7512 (uri (pypi-uri "libarchive-c" version))
7515 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7516 (build-system python-build-system)
7518 '(#:phases (modify-phases %standard-phases
7520 'build 'reference-libarchive
7521 (lambda* (#:key inputs #:allow-other-keys)
7522 ;; Retain the absolute file name of libarchive.so.
7523 (let ((libarchive (assoc-ref inputs "libarchive")))
7524 (substitute* "libarchive/ffi.py"
7525 (("find_library\\('archive'\\)")
7526 (string-append "'" libarchive
7527 "/lib/libarchive.so'"))))))
7529 (lambda _ (invoke "pytest" "-vv"))))))
7531 `(("python-mock" ,python-mock)
7532 ("python-pytest" ,python-pytest)))
7534 `(("libarchive" ,libarchive)))
7535 (home-page "https://github.com/Changaco/python-libarchive-c")
7536 (synopsis "Python interface to libarchive")
7538 "This package provides Python bindings to libarchive, a C library to
7539 access possibly compressed archives in many different formats. It uses
7540 Python's @code{ctypes} foreign function interface (FFI).")
7541 (license license:lgpl2.0+)))
7543 (define-public python2-libarchive-c
7544 (package-with-python2 python-libarchive-c))
7546 (define-public python-file
7549 (name "python-file")
7550 (build-system python-build-system)
7552 '(#:tests? #f ;no tests
7553 #:configure-flags '("--single-version-externally-managed" "--root=/")
7554 #:phases (modify-phases %standard-phases
7555 (add-before 'build 'change-directory
7559 (add-before 'build 'set-library-file-name
7560 (lambda* (#:key inputs #:allow-other-keys)
7561 (let ((file (assoc-ref inputs "file")))
7562 (substitute* "magic.py"
7563 (("find_library\\('magic'\\)")
7564 (string-append "'" file "/lib/libmagic.so'")))
7566 (inputs `(("file" ,file)))
7567 (native-inputs (if (%current-target-system)
7568 `(("self" ,this-package))
7570 (synopsis "Python bindings to the libmagic file type guesser. Note that
7571 this module and the python-magic module both provide a \"magic.py\" file;
7572 these two modules, which are different and were developed separately, both
7573 serve the same purpose: provide Python bindings for libmagic.")))
7575 (define-public python2-file
7576 (package-with-python2 python-file))
7578 (define-public python-debian
7580 (name "python-debian")
7581 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7585 ;; Use git-fetch, as pypi doesn't include test suite.
7590 (file-name (git-file-name name version))
7593 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7594 (build-system python-build-system)
7596 `(#:phases (modify-phases %standard-phases
7597 (add-after 'unpack 'remove-debian-specific-tests
7598 ;; python-apt, apt and dpkg are not yet available in guix,
7599 ;; and these tests heavily depend on them.
7601 (delete-file "lib/debian/tests/test_deb822.py")
7602 (delete-file "lib/debian/tests/test_debfile.py")
7605 `(("python-six" ,python-six)
7606 ("python-chardet" ,python-chardet)))
7607 (synopsis "Debian package related modules")
7609 ;; XXX: Use @enumerate instead of @itemize to work around
7610 ;; <http://bugs.gnu.org/21772>.
7611 "This package provides Python modules that abstract many formats of
7612 Debian-related files, such as:
7615 @item Debtags information;
7616 @item @file{debian/changelog} files;
7617 @item packages files, pdiffs;
7618 @item control files of single or multiple RFC822-style paragraphs---e.g.
7619 @file{debian/control}, @file{.changes}, @file{.dsc};
7620 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7621 contained files and meta-information.
7624 ;; Modules are either GPLv2+ or GPLv3+.
7625 (license license:gpl3+)))
7627 (define-public python2-debian
7628 (package-with-python2 python-debian))
7630 (define-public python-nbformat
7632 (name "python-nbformat")
7637 (uri (pypi-uri "nbformat" version))
7640 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7641 (build-system python-build-system)
7642 (arguments `(#:tests? #f)) ; no test target
7644 `(("python-ipython-genutils" ,python-ipython-genutils)
7645 ("python-jsonschema" ,python-jsonschema)
7646 ("python-jupyter-core" ,python-jupyter-core)
7647 ("python-traitlets" ,python-traitlets)))
7648 (home-page "http://jupyter.org")
7649 (synopsis "Jupyter Notebook format")
7650 (description "This package provides the reference implementation of the
7651 Jupyter Notebook format and Python APIs for working with notebooks.")
7652 (license license:bsd-3)))
7654 (define-public python2-nbformat
7655 (package-with-python2 python-nbformat))
7657 (define-public python-bleach
7659 (name "python-bleach")
7664 (uri (pypi-uri "bleach" version))
7667 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7668 (build-system python-build-system)
7670 `(("python-html5lib" ,python-html5lib-0.9)
7671 ("python-six" ,python-six)))
7673 `(("python-nose" ,python-nose)))
7674 (home-page "https://github.com/jsocol/bleach")
7675 (synopsis "Whitelist-based HTML-sanitizing tool")
7676 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7677 (license license:asl2.0)))
7679 (define-public python2-bleach
7680 (package-with-python2 python-bleach))
7682 (define-public python-entrypoints
7684 (name "python-entrypoints")
7689 (uri (pypi-uri "entrypoints" version))
7692 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7693 (build-system python-build-system)
7694 ;; The package does not come with a setup.py file, so we have to generate
7699 (modify-phases %standard-phases
7700 (add-after 'unpack 'create-setup.py
7702 (call-with-output-file "setup.py"
7705 from setuptools import setup
7706 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7708 (home-page "https://github.com/takluyver/entrypoints")
7709 (synopsis "Discover and load entry points from installed Python packages")
7710 (description "Entry points are a way for Python packages to advertise
7711 objects with some common interface. The most common examples are
7712 @code{console_scripts} entry points, which define shell commands by
7713 identifying a Python function to run. The @code{entrypoints} module contains
7714 functions to find and load entry points.")
7715 (license license:expat)))
7717 (define-public python2-entrypoints
7718 (package-with-python2 python-entrypoints))
7720 (define-public python-nbconvert
7722 (name "python-nbconvert")
7727 (uri (pypi-uri "nbconvert" version))
7730 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7731 (build-system python-build-system)
7733 `(;; The "bdist_egg" target is disabled by default, causing the installation
7735 #:configure-flags (list "bdist_egg")
7736 ;; FIXME: 5 failures, 40 errors.
7739 ;; (modify-phases %standard-phases
7742 ;; (zero? (system* "py.test" "-v")))))
7744 `(("python-pytest" ,python-pytest)))
7746 `(("python-bleach" ,python-bleach)
7747 ("python-entrypoints" ,python-entrypoints)
7748 ("python-jinja2" ,python-jinja2)
7749 ("python-jupyter-core" ,python-jupyter-core)
7750 ("python-mistune" ,python-mistune)
7751 ("python-nbformat" ,python-nbformat)
7752 ("python-pygments" ,python-pygments)
7753 ("python-traitlets" ,python-traitlets)))
7754 (home-page "http://jupyter.org")
7755 (synopsis "Converting Jupyter Notebooks")
7756 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7757 notebooks to various other formats via Jinja templates. It allows you to
7758 convert an @code{.ipynb} notebook file into various static formats including:
7766 @item ReStructured Text (rst)
7767 @item executable script
7769 (license license:bsd-3)))
7771 (define-public python2-nbconvert
7772 (package-with-python2 python-nbconvert))
7774 (define-public python-notebook
7776 (name "python-notebook")
7780 (uri (pypi-uri "notebook" version))
7783 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7784 (build-system python-build-system)
7787 (modify-phases %standard-phases
7790 ;; These tests require a browser
7791 (delete-file-recursively "notebook/tests/selenium")
7792 ;; Some tests need HOME
7793 (setenv "HOME" "/tmp")
7794 ;; This file contains "warningfilters", which are not supported
7795 ;; by this version of nose.
7796 (delete-file "setup.cfg")
7797 (with-directory-excursion "/tmp"
7798 (invoke "nosetests" "-v"))
7801 `(("python-jupyter-core" ,python-jupyter-core)
7802 ("python-nbformat" ,python-nbformat)
7803 ("python-nbconvert" ,python-nbconvert)
7804 ("python-prometheus-client" ,python-prometheus-client)
7805 ("python-send2trash" ,python-send2trash)
7806 ("python-terminado" ,python-terminado)))
7808 `(("python-nose" ,python-nose)
7809 ("python-sphinx" ,python-sphinx)
7810 ("python-requests" ,python-requests)))
7811 (home-page "http://jupyter.org/")
7812 (synopsis "Web-based notebook environment for interactive computing")
7814 "The Jupyter HTML notebook is a web-based notebook environment for
7815 interactive computing.")
7816 (properties `((python2-variant . ,(delay python2-notebook))))
7817 (license license:bsd-3)))
7819 (define-public python2-notebook
7820 (let ((base (package-with-python2
7821 (strip-python2-variant python-notebook))))
7822 (package (inherit base)
7824 `(("python2-mock" ,python2-mock)
7825 ,@(package-native-inputs base)))
7827 (substitute-keyword-arguments (package-arguments base)
7829 `(modify-phases ,phases
7830 (add-before 'check 'disable-test-case
7831 ;; The test requires network access to localhost. Curiously it
7832 ;; fails with Python 2 only. Simply make the test-case return
7836 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7837 (("formats = self.nbconvert_api") "return #")))))))))))
7839 (define-public python-widgetsnbextension
7841 (name "python-widgetsnbextension")
7846 (uri (pypi-uri "widgetsnbextension" version))
7849 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7850 (build-system python-build-system)
7852 `(("python-ipykernel" ,python-ipykernel)
7853 ("python-notebook" ,python-notebook)))
7855 `(("python-certifi" ,python-certifi)
7856 ("python-nose" ,python-nose)))
7857 (home-page "https://ipython.org")
7858 (synopsis "IPython HTML widgets for Jupyter")
7859 (description "This package provides interactive HTML widgets for Jupyter
7861 (license license:bsd-3)))
7863 (define-public python2-widgetsnbextension
7864 (package-with-python2 python-widgetsnbextension))
7866 (define-public python-ipywidgets
7868 (name "python-ipywidgets")
7873 (uri (pypi-uri "ipywidgets" version))
7876 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7877 (build-system python-build-system)
7879 `(("python-ipython" ,python-ipython)
7880 ("python-traitlets" ,python-traitlets)
7881 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7883 `(("python-nose" ,python-nose)
7884 ("python-pytest" ,python-pytest)))
7885 (home-page "https://ipython.org")
7886 (synopsis "IPython HTML widgets for Jupyter")
7887 (description "Ipywidgets are interactive HTML widgets for Jupyter
7888 notebooks and the IPython kernel. Notebooks come alive when interactive
7889 widgets are used. Users gain control of their data and can visualize changes
7891 (license license:bsd-3)))
7893 (define-public python2-ipywidgets
7894 (package-with-python2 python-ipywidgets))
7896 (define-public python-jupyter-console
7898 (name "python-jupyter-console")
7903 (uri (pypi-uri "jupyter_console" version))
7906 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7907 (build-system python-build-system)
7909 `(("python-ipykernel" ,python-ipykernel)
7910 ("python-jupyter-client" ,python-jupyter-client)
7911 ("python-prompt-toolkit" ,python-prompt-toolkit)
7912 ("python-pygments" ,python-pygments)))
7914 `(("python-nose" ,python-nose)))
7915 (home-page "https://jupyter.org")
7916 (synopsis "Jupyter terminal console")
7917 (description "This package provides a terminal-based console frontend for
7918 Jupyter kernels. It also allows for console-based interaction with non-Python
7919 Jupyter kernels such as IJulia and IRKernel.")
7920 (license license:bsd-3)))
7922 (define-public python2-jupyter-console
7924 (name "python2-jupyter-console")
7929 (uri (pypi-uri "jupyter_console" version))
7932 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7933 (build-system python-build-system)
7934 ;; Tests only run in an TTY.
7935 (arguments `(#:tests? #f))
7937 `(("python2-ipykernel" ,python2-ipykernel)
7938 ("python2-jupyter-client" ,python2-jupyter-client)
7939 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7940 ("python2-pygments" ,python2-pygments)))
7942 `(("python2-nose" ,python2-nose)))
7943 (home-page "https://jupyter.org")
7944 (synopsis "Jupyter terminal console")
7945 (description "This package provides a terminal-based console frontend for
7946 Jupyter kernels. It also allows for console-based interaction with non-Python
7947 Jupyter kernels such as IJulia and IRKernel.")
7948 (license license:bsd-3)))
7950 ;; The python-ipython and python-jupyter-console require each other. To get
7951 ;; the functionality in both packages working, strip down the
7952 ;; python-jupyter-console package when using it as an input to python-ipython.
7953 (define python-jupyter-console-minimal
7955 (inherit python-jupyter-console)
7956 (name "python-jupyter-console-minimal")
7958 (substitute-keyword-arguments
7959 (package-arguments python-jupyter-console)
7961 `(modify-phases ,phases
7962 (add-after 'install 'delete-bin
7963 (lambda* (#:key outputs #:allow-other-keys)
7964 ;; Delete the bin files, to avoid conflicts in profiles
7965 ;; where python-ipython and python-jupyter-console are
7967 (delete-file-recursively
7969 (assoc-ref outputs "out") "/bin"))))))))
7970 ;; Remove the python-ipython propagated input, to avoid the cycle
7974 (package-propagated-inputs python-jupyter-console)))))
7976 (define-public python-qtconsole
7978 (name "python-qtconsole")
7983 (uri (pypi-uri "qtconsole" version))
7986 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7987 (build-system python-build-system)
7989 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7990 ;; but we only have the LTS version 5.x. This means that there might be
7991 ;; runtime errors, but since this is a dependency of the Jupyter package,
7992 ;; and Jupyter can be used without the qtconsole we can overlook this for
7996 (modify-phases %standard-phases
7997 (add-before 'check 'pre-check
7999 (setenv "QT_QPA_PLATFORM" "offscreen")
8002 `(("python-ipykernel" ,python-ipykernel)
8003 ("python-ipython" ,python-ipython)))
8005 `(("python-pytest" ,python-pytest)))
8006 (home-page "http://jupyter.org")
8007 (synopsis "Jupyter Qt console")
8008 (description "This package provides a Qt-based console for Jupyter with
8009 support for rich media output.")
8010 (license license:bsd-3)))
8012 (define-public jupyter
8019 (uri (pypi-uri "jupyter" version))
8022 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8023 (build-system python-build-system)
8024 (arguments '(#:tests? #f)) ; there are none.
8026 `(("python-ipykernel" ,python-ipykernel)
8027 ("python-ipywidgets" ,python-ipywidgets)
8028 ("python-jupyter-console" ,python-jupyter-console)
8029 ("python-nbconvert" ,python-nbconvert)
8030 ("python-notebook" ,python-notebook)
8031 ("python-qtconsole" ,python-qtconsole)))
8032 (native-search-paths
8033 (list (search-path-specification
8034 (variable "JUPYTER_PATH")
8035 (files '("share/jupyter")))))
8036 (home-page "https://jupyter.org")
8037 (synopsis "Web application for interactive documents")
8039 "The Jupyter Notebook is a web application that allows you to create and
8040 share documents that contain live code, equations, visualizations and
8041 explanatory text. Uses include: data cleaning and transformation, numerical
8042 simulation, statistical modeling, machine learning and much more.")
8043 (license license:bsd-3)))
8045 (define-public python-chardet
8047 (name "python-chardet")
8052 (uri (pypi-uri "chardet" version))
8055 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8057 `(("python-hypothesis" ,python-hypothesis)
8058 ("python-pytest" ,python-pytest)
8059 ("python-pytest-runner" ,python-pytest-runner)))
8060 (build-system python-build-system)
8061 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8062 (arguments `(#:tests? #f))
8063 (home-page "https://github.com/chardet/chardet")
8064 (synopsis "Universal encoding detector for Python 2 and 3")
8066 "This package provides @code{chardet}, a Python module that can
8067 automatically detect a wide range of file encodings.")
8068 (license license:lgpl2.1+)))
8070 (define-public python2-chardet
8071 (package-with-python2 python-chardet))
8073 (define-public python-docopt
8075 (name "python-docopt")
8080 ;; The release on PyPI does not include tests.
8082 "https://github.com/docopt/docopt/archive/"
8084 (file-name (string-append name "-" version ".tar.gz"))
8087 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8088 (build-system python-build-system)
8090 `(("python-pytest" ,python-pytest)))
8093 (modify-phases %standard-phases
8095 (lambda _ (invoke "py.test"))))))
8096 (home-page "http://docopt.org")
8097 (synopsis "Command-line interface description language for Python")
8098 (description "This library allows the user to define a command-line
8099 interface from a program's help message rather than specifying it
8100 programmatically with command-line parsers like @code{getopt} and
8102 (license license:expat)))
8104 (define-public python2-docopt
8105 (package-with-python2 python-docopt))
8107 (define-public python-pythondialog
8109 (name "python-pythondialog")
8114 (uri (pypi-uri "pythondialog" version))
8117 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8118 (build-system python-build-system)
8121 (modify-phases %standard-phases
8122 (add-after 'unpack 'patch-path
8123 (lambda* (#:key inputs #:allow-other-keys)
8124 (let* ((dialog (assoc-ref inputs "dialog")))
8125 ;; Since this library really wants to grovel the search path, we
8126 ;; must hardcode dialog's store path into it.
8127 (substitute* "dialog.py"
8128 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8129 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8131 #:tests? #f)) ; no test suite
8133 `(("dialog" ,dialog)))
8134 (home-page "http://pythondialog.sourceforge.net/")
8135 (synopsis "Python interface to the UNIX dialog utility")
8136 (description "A Python wrapper for the dialog utility. Its purpose is to
8137 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8138 This allows one to make simple text-mode user interfaces on Unix-like systems")
8139 (license license:lgpl2.1)
8140 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8142 (define-public python2-pythondialog
8143 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8146 (version (package-version python-pythondialog))
8149 (uri (pypi-uri "python2-pythondialog" version))
8152 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8154 (define-public python-configobj
8156 (name "python-configobj")
8160 (uri (pypi-uri "configobj" version))
8163 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8164 ;; Patch setup.py so it looks for python-setuptools, which is
8165 ;; required to parse the keyword 'install_requires' in setup.py.
8166 (patches (search-patches "python-configobj-setuptools.patch"))))
8167 (build-system python-build-system)
8169 `(("python-six" ,python-six)))
8170 (synopsis "Config file reading, writing and validation")
8171 (description "ConfigObj is a simple but powerful config file reader and
8172 writer: an ini file round tripper. Its main feature is that it is very easy to
8173 use, with a straightforward programmer’s interface and a simple syntax for
8175 (home-page "https://github.com/DiffSK/configobj")
8176 (license license:bsd-3)))
8178 (define-public python2-configobj
8179 (package-with-python2 python-configobj))
8181 (define-public python-configargparse
8183 (name "python-configargparse")
8187 (uri (pypi-uri "ConfigArgParse" version))
8190 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8191 (build-system python-build-system)
8193 `(("python-pyyaml" ,python-pyyaml)))
8196 (modify-phases %standard-phases
8199 ;; Bypass setuptools-shim because one test relies on "setup.py"
8200 ;; being the first argument passed to the python call.
8202 ;; NOTE: Many tests do not run because they rely on Python's
8203 ;; built-in test.test_argparse, but we remove the unit tests from
8204 ;; our Python installation.
8205 (invoke "python" "setup.py" "test"))))))
8206 (synopsis "Replacement for argparse")
8207 (description "A drop-in replacement for argparse that allows options to also
8208 be set via config files and/or environment variables.")
8209 (home-page "https://github.com/bw2/ConfigArgParse")
8210 (license license:expat)))
8212 (define-public python2-configargparse
8213 (package-with-python2 python-configargparse))
8215 (define-public python-argparse-manpage
8217 (name "python-argparse-manpage")
8222 (uri (pypi-uri "argparse-manpage" version))
8225 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8226 (build-system python-build-system)
8227 (home-page "https://github.com/praiskup/argparse-manpage")
8228 (synopsis "Build manual page from Python's ArgumentParser object")
8230 "This package provides tools to build manual pages from Python's
8231 @code{ArgumentParser} object.")
8232 (license license:asl2.0)))
8234 (define-public python-contextlib2
8236 (name "python-contextlib2")
8241 (uri (pypi-uri "contextlib2" version))
8244 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8245 (build-system python-build-system)
8246 (home-page "http://contextlib2.readthedocs.org/")
8247 (synopsis "Tools for decorators and context managers")
8248 (description "This module is primarily a backport of the Python
8249 3.2 contextlib to earlier Python versions. Like contextlib, it
8250 provides utilities for common tasks involving decorators and context
8251 managers. It also contains additional features that are not part of
8252 the standard library.")
8253 (license license:psfl)))
8255 (define-public python2-contextlib2
8257 (name "python2-contextlib2")
8262 (uri (pypi-uri "contextlib2" version))
8265 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8266 (build-system python-build-system)
8268 `(#:python ,python-2
8270 (modify-phases %standard-phases
8272 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8274 `(("python2-unittest2" ,python2-unittest2)))
8275 (home-page "http://contextlib2.readthedocs.org/")
8276 (synopsis "Tools for decorators and context managers")
8277 (description "This module is primarily a backport of the Python
8278 3.2 contextlib to earlier Python versions. Like contextlib, it
8279 provides utilities for common tasks involving decorators and context
8280 managers. It also contains additional features that are not part of
8281 the standard library.")
8282 (license license:psfl)))
8284 (define-public python-texttable
8286 (name "python-texttable")
8291 (uri (pypi-uri "texttable" version))
8294 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8295 (build-system python-build-system)
8296 (arguments '(#:tests? #f)) ; no tests
8297 (home-page "https://github.com/foutaise/texttable/")
8298 (synopsis "Python module for creating simple ASCII tables")
8299 (description "Texttable is a Python module for creating simple ASCII
8301 (license license:lgpl2.1+)))
8303 (define-public python2-texttable
8304 (package-with-python2 python-texttable))
8306 (define-public python-atomicwrites
8308 (name "python-atomicwrites")
8312 (uri (pypi-uri "atomicwrites" version))
8315 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8316 (build-system python-build-system)
8317 (synopsis "Atomic file writes in Python")
8318 (description "Library for atomic file writes using platform dependent tools
8319 for atomic file system operations.")
8320 (home-page "https://github.com/untitaker/python-atomicwrites")
8321 (license license:expat)))
8323 (define-public python2-atomicwrites
8324 (package-with-python2 python-atomicwrites))
8326 (define-public python-click-threading
8328 (name "python-click-threading")
8332 (uri (pypi-uri "click-threading" version))
8335 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8336 (build-system python-build-system)
8338 `(("python-click" ,python-click)))
8339 (synopsis "Utilities for multithreading in Click")
8340 (description "This package provides utilities for multithreading in Click
8342 (home-page "https://github.com/click-contrib/click-threading")
8343 (license license:expat)))
8345 (define-public python-click-log
8347 (name "python-click-log")
8351 (uri (pypi-uri "click-log" version))
8354 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8355 (build-system python-build-system)
8357 `(("python-click" ,python-click)))
8358 (synopsis "Logging for click applications")
8359 (description "This package provides a Python library for logging Click
8361 (home-page "https://github.com/click-contrib/click-log")
8362 (license license:expat)))
8364 (define-public python-apipkg
8366 (name "python-apipkg")
8370 (uri (pypi-uri "apipkg" version))
8373 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8374 (build-system python-build-system)
8376 `(("python-pytest" ,python-pytest)))
8377 (synopsis "Namespace control and lazy-import mechanism")
8378 (description "With apipkg you can control the exported namespace of a Python
8379 package and greatly reduce the number of imports for your users. It is a small
8380 pure Python module that works on virtually all Python versions.")
8381 (home-page "https://github.com/pytest-dev/apipkg")
8382 (license license:expat)))
8384 (define-public python2-apipkg
8385 (package-with-python2 python-apipkg))
8387 (define-public python-execnet
8389 (name "python-execnet")
8393 (uri (pypi-uri "execnet" version))
8396 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8397 (build-system python-build-system)
8399 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8400 ;; The two test failures are caused by the lack of an `ssh` executable.
8401 ;; The test suite can be run with pytest after the 'install' phase.
8404 `(("python-pytest" ,python-pytest)
8405 ("python-setuptools-scm" ,python-setuptools-scm)))
8407 `(("python-apipkg" ,python-apipkg)))
8408 (synopsis "Rapid multi-Python deployment")
8409 (description "Execnet provides a share-nothing model with
8410 channel-send/receive communication for distributing execution across many
8411 Python interpreters across version, platform and network barriers. It has a
8412 minimal and fast API targeting the following uses:
8414 @item distribute tasks to (many) local or remote CPUs
8415 @item write and deploy hybrid multi-process applications
8416 @item write scripts to administer multiple environments
8418 (home-page "http://codespeak.net/execnet/")
8419 (license license:expat)))
8421 (define-public python2-execnet
8422 (package-with-python2 python-execnet))
8424 (define-public python-icalendar
8426 (name "python-icalendar")
8430 (uri (pypi-uri "icalendar" version))
8433 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8434 (build-system python-build-system)
8436 `(("python-dateutil" ,python-dateutil)
8437 ("python-pytz" ,python-pytz)))
8438 (synopsis "Python library for parsing iCalendar files")
8439 (description "The icalendar package is a parser/generator of iCalendar
8440 files for use with Python.")
8441 (home-page "https://github.com/collective/icalendar")
8442 (license license:bsd-2)))
8444 (define-public python-args
8446 (name "python-args")
8450 (uri (pypi-uri "args" version))
8453 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8454 (build-system python-build-system)
8455 (home-page "https://github.com/kennethreitz/args")
8456 (synopsis "Command-line argument parser")
8458 "This library provides a Python module to parse command-line arguments.")
8459 (license license:bsd-3)))
8461 (define-public python2-args
8462 (package-with-python2 python-args))
8464 (define-public python-clint
8466 (name "python-clint")
8470 (uri (pypi-uri "clint" version))
8473 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8474 (build-system python-build-system)
8477 (modify-phases %standard-phases
8479 (lambda _ (invoke "py.test" "-v"))))))
8481 `(("python-pytest" ,python-pytest)))
8483 `(("python-args" ,python-args)))
8484 (home-page "https://github.com/kennethreitz/clint")
8485 (synopsis "Command-line interface tools")
8487 "Clint is a Python module filled with a set of tools for developing
8488 command-line applications, including tools for colored and indented
8489 output, progress bar display, and pipes.")
8490 (license license:isc)))
8492 (define-public python2-clint
8493 (package-with-python2 python-clint))
8495 (define-public python-rply
8497 (name "python-rply")
8501 (uri (pypi-uri "rply" version))
8504 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8505 (build-system python-build-system)
8507 `(("python-appdirs" ,python-appdirs)))
8508 (home-page "https://github.com/alex/rply")
8509 (synopsis "Parser generator for Python")
8511 "This package provides a pure Python based parser generator, that also
8512 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8513 with a new public API, and RPython support.")
8514 (license license:bsd-3)))
8516 (define-public python2-rply
8517 (package-with-python2 python-rply))
8519 (define-public python-hy
8525 (uri (pypi-uri "hy" version))
8528 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8529 (build-system python-build-system)
8532 (modify-phases %standard-phases
8535 ;; Tests require write access to HOME.
8536 (setenv "HOME" "/tmp")
8537 (invoke "nosetests"))))))
8539 `(("python-coverage" ,python-coverage)
8540 ("python-nose" ,python-nose)))
8542 `(("python-astor" ,python-astor)
8543 ("python-clint" ,python-clint)
8544 ("python-rply" ,python-rply)))
8545 (home-page "http://hylang.org/")
8546 (synopsis "Lisp frontend to Python")
8548 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8549 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8550 Python at your fingertips, in Lisp form.")
8551 (license license:expat)))
8553 (define-public python2-hy
8554 (package-with-python2 python-hy))
8556 (define-public python2-functools32
8558 (name "python2-functools32")
8563 (uri (pypi-uri "functools32" version))
8566 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8567 (build-system python-build-system)
8569 `(#:python ,python-2
8570 #:tests? #f)) ; no test target
8571 (home-page "https://github.com/MiCHiLU/python-functools32")
8573 "Backport of the functools module from Python 3.2.3")
8575 "This package is a backport of the @code{functools} module from Python
8576 3.2.3 for use with older versions of Python and PyPy.")
8577 (license license:expat)))
8579 (define-public python2-subprocess32
8581 (name "python2-subprocess32")
8585 (uri (pypi-uri "subprocess32" version))
8588 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8590 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8591 (build-system python-build-system)
8593 `(#:python ,python-2
8594 ;; The test suite fails with Python > 2.7.13:
8595 ;; import test.support
8596 ;; ImportError: No module named support
8599 (modify-phases %standard-phases
8600 (add-after 'unpack 'patch-/bin/sh
8602 (substitute* '("subprocess32.py"
8603 "test_subprocess32.py")
8604 (("/bin/sh") (which "sh")))
8606 (home-page "https://github.com/google/python-subprocess32")
8607 (synopsis "Backport of the subprocess module from Python 3.2")
8609 "This is a backport of the @code{subprocess} standard library module
8610 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8611 new features. On POSIX systems it is guaranteed to be reliable when used
8612 in threaded applications. It includes timeout support from Python 3.3 but
8613 otherwise matches 3.2’s API.")
8614 (license license:psfl)))
8616 (define-public python2-futures
8618 (name "python2-futures")
8623 (uri (pypi-uri "futures" version))
8626 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8627 (build-system python-build-system)
8629 `(#:python ,python-2
8631 (modify-phases %standard-phases
8634 (invoke "python" "test_futures.py")
8636 (home-page "https://github.com/agronholm/pythonfutures")
8638 "Backport of the concurrent.futures package from Python 3.2")
8640 "The concurrent.futures module provides a high-level interface for
8641 asynchronously executing callables. This package backports the
8642 concurrent.futures package from Python 3.2")
8643 (license license:bsd-3)))
8645 (define-public python-promise
8647 (name "python-promise")
8652 (uri (pypi-uri "promise" version))
8655 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8656 (build-system python-build-system)
8657 ;; Tests wants python-futures, which is a python2 only program, and
8658 ;; can't be found by python-promise at test time.
8659 (arguments `(#:tests? #f))
8660 (home-page "https://github.com/syrusakbary/promise")
8661 (synopsis "Promises/A+ implementation for Python")
8663 "Promises/A+ implementation for Python")
8664 (properties `((python2-variant . ,(delay python2-promise))))
8665 (license license:expat)))
8667 (define-public python2-promise
8668 (let ((promise (package-with-python2
8669 (strip-python2-variant python-promise))))
8670 (package (inherit promise)
8671 (arguments (substitute-keyword-arguments (package-arguments promise)
8674 `(("python2-futures" ,python2-futures)
8675 ("python2-pytest" ,python2-pytest)
8676 ,@(package-native-inputs promise))))))
8678 (define-public python-progressbar33
8680 (name "python-progressbar33")
8685 (uri (pypi-uri "progressbar33" version))
8688 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8689 (build-system python-build-system)
8690 (home-page "http://github.com/germangh/python-progressbar")
8691 (synopsis "Text progress bar library for Python")
8693 "This package provides a text progress bar library for Python. This
8694 version only differs from the original @code{progressbar} package in that it
8695 uses relative package imports instead of absolute imports, which is necessary
8696 for the module to work under Python 3.3.")
8697 ;; Either or both of these licenses may be selected.
8698 (license (list license:lgpl2.1+ license:bsd-3))))
8700 (define-public python-colorama
8702 (name "python-colorama")
8707 (uri (pypi-uri "colorama" version))
8710 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8711 (build-system python-build-system)
8712 (synopsis "Colored terminal text rendering for Python")
8713 (description "Colorama is a Python library for rendering colored terminal
8715 (home-page "https://pypi.python.org/pypi/colorama")
8716 (license license:bsd-3)))
8718 (define-public python2-colorama
8719 (package-with-python2 python-colorama))
8721 (define-public python-rsa
8728 (uri (pypi-uri "rsa" version))
8731 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8732 (build-system python-build-system)
8734 `(("python-pyasn1" ,python-pyasn1)))
8735 (synopsis "Pure-Python RSA implementation")
8736 (description "Python-RSA is a pure-Python RSA implementation. It supports
8737 encryption and decryption, signing and verifying signatures, and key
8738 generation according to PKCS#1 version 1.5. It can be used as a Python
8739 library as well as on the command line.")
8740 (home-page "https://stuvel.eu/rsa")
8741 (license license:asl2.0)))
8743 (define-public python2-rsa
8744 (package-with-python2 python-rsa))
8746 (define-public python-pluggy
8748 (name "python-pluggy")
8753 (uri (pypi-uri "pluggy" version))
8756 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8757 (build-system python-build-system)
8759 `(("python-setuptools-scm" ,python-setuptools-scm)))
8760 (synopsis "Plugin and hook calling mechanism for Python")
8761 (description "Pluggy is an extraction of the plugin manager as used by
8762 Pytest but stripped of Pytest specific details.")
8763 (home-page "https://pypi.python.org/pypi/pluggy")
8764 (license license:expat)))
8766 (define-public python2-pluggy
8767 (package-with-python2 python-pluggy))
8769 (define-public python-tox
8776 (uri (pypi-uri "tox" version))
8779 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8780 (build-system python-build-system)
8782 ;; FIXME: Tests require pytest-timeout, which itself requires
8783 ;; pytest>=2.8.0 for installation.
8786 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8787 ("python-py" ,python-py)
8788 ("python-virtualenv" ,python-virtualenv)))
8790 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8791 ("python-pytest" ,python-pytest) ; >= 2.3.5
8792 ("python-setuptools-scm" ,python-setuptools-scm)))
8793 (home-page "http://tox.testrun.org/")
8794 (synopsis "Virtualenv-based automation of test activities")
8795 (description "Tox is a generic virtualenv management and test command line
8796 tool. It can be used to check that a package installs correctly with
8797 different Python versions and interpreters, or run tests in each type of
8798 supported environment, or act as a frontend to continuous integration
8800 (license license:expat)))
8802 (define-public python2-tox
8803 (package-with-python2 python-tox))
8805 (define-public python-jmespath
8807 (name "python-jmespath")
8812 (uri (pypi-uri "jmespath" version))
8815 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8816 (build-system python-build-system)
8818 `(("python-nose" ,python-nose)))
8819 (synopsis "JSON Matching Expressions")
8820 (description "JMESPath (pronounced “james path”) is a Python library that
8821 allows one to declaratively specify how to extract elements from a JSON
8823 (home-page "https://github.com/jmespath/jmespath.py")
8824 (license license:expat)))
8826 (define-public python2-jmespath
8827 (package-with-python2 python-jmespath))
8829 (define-public python-botocore
8831 (name "python-botocore")
8832 (version "1.12.149")
8836 (uri (pypi-uri "botocore" version))
8839 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8840 (build-system python-build-system)
8842 ;; FIXME: Many tests are failing.
8845 `(("python-dateutil" ,python-dateutil)
8846 ("python-docutils" ,python-docutils)
8847 ("python-jmespath" ,python-jmespath)))
8849 `(("python-mock" ,python-mock)
8850 ("python-nose" ,python-nose)
8852 ("python-tox" ,python-tox)
8853 ("python-urllib3" ,python-urllib3)
8854 ("python-wheel" ,python-wheel)))
8855 (home-page "https://github.com/boto/botocore")
8856 (synopsis "Low-level interface to AWS")
8857 (description "Botocore is a Python library that provides a low-level
8858 interface to the Amazon Web Services (AWS) API.")
8859 (license license:asl2.0)))
8861 (define-public python2-botocore
8862 (package-with-python2 python-botocore))
8864 (define-public python-xdo
8871 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8872 "python-xdo_" version ".orig.tar.gz"))
8875 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8876 (build-system python-build-system)
8879 (modify-phases %standard-phases
8880 (add-before 'install 'patch-libxdo-path
8881 ;; Hardcode the path of dynamically loaded libxdo library.
8882 (lambda* (#:key inputs #:allow-other-keys)
8883 (let ((libxdo (string-append
8884 (assoc-ref inputs "xdotool")
8886 (substitute* "xdo/_xdo.py"
8887 (("find_library\\(\"xdo\"\\)")
8888 (simple-format #f "\"~a\"" libxdo)))
8890 #:tests? #f)) ; no tests provided
8892 `(("python-six" ,python-six)))
8894 `(("xdotool" ,xdotool)
8895 ("libX11" ,libx11)))
8896 (home-page "https://tracker.debian.org/pkg/python-xdo")
8897 (synopsis "Python library for simulating X11 keyboard/mouse input")
8898 (description "Provides bindings to libxdo for manipulating X11 via simulated
8899 input. (Note that this is mostly a legacy library; you may wish to look at
8900 python-xdo for newer bindings.)")
8901 (license license:bsd-3)))
8903 (define-public python2-xdo
8904 (package-with-python2 python-xdo))
8906 (define-public python-mako
8908 (name "python-mako")
8913 (uri (pypi-uri "Mako" version))
8916 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8917 (build-system python-build-system)
8919 `(#:phases (modify-phases %standard-phases
8922 (invoke "pytest" "-vv"))))))
8924 `(("python-markupsafe" ,python-markupsafe)))
8926 `(("python-mock" ,python-mock)
8927 ("python-pytest" ,python-pytest)))
8928 (home-page "https://www.makotemplates.org/")
8929 (synopsis "Templating language for Python")
8930 (description "Mako is a templating language for Python that compiles
8931 templates into Python modules.")
8932 (license license:expat)))
8934 (define-public python2-mako
8935 (package-with-python2 python-mako))
8937 (define-public python-waitress
8939 (name "python-waitress")
8944 (uri (pypi-uri "waitress" version))
8945 (patches (search-patches "python-waitress-fix-tests.patch"))
8948 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8949 (build-system python-build-system)
8950 (home-page "https://github.com/Pylons/waitress")
8951 (synopsis "Waitress WSGI server")
8952 (description "Waitress is meant to be a production-quality pure-Python WSGI
8953 server with very acceptable performance.")
8954 (license license:zpl2.1)))
8956 (define-public python2-waitress
8957 (package-with-python2 python-waitress))
8959 (define-public python-pyquery
8961 (name "python-pyquery")
8966 (uri (pypi-uri "pyquery" version))
8969 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8970 (build-system python-build-system)
8972 `(("python-webob" ,python-webob)
8973 ("python-webtest" ,python-webtest)))
8975 `(("python-lxml" ,python-lxml)
8976 ("python-cssselect" ,python-cssselect)))
8977 (home-page "https://github.com/gawel/pyquery")
8978 (synopsis "Make jQuery-like queries on xml documents")
8979 (description "pyquery allows you to make jQuery queries on xml documents.
8980 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8981 fast xml and html manipulation.")
8982 (license license:bsd-3)))
8984 (define-public python-anyjson
8986 (name "python-anyjson")
8991 (uri (pypi-uri "anyjson" version))
8994 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8995 (build-system python-build-system)
8997 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8998 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8999 ;; whatever) so this transformation needs to be done before the tests
9000 ;; can be run. Maybe we could add a build step to transform beforehand
9001 ;; but it could be annoying/difficult.
9002 ;; We can enable tests for the Python 2 version, though, and do below.
9004 (home-page "https://bitbucket.org/runeh/anyjson/")
9006 "Wraps best available JSON implementation in a common interface")
9008 "Anyjson loads whichever is the fastest JSON module installed
9009 and provides a uniform API regardless of which JSON implementation is used.")
9010 (license license:bsd-3)
9011 (properties `((python2-variant . ,(delay python2-anyjson))))))
9013 (define-public python2-anyjson
9014 (let ((anyjson (package-with-python2
9015 (strip-python2-variant python-anyjson))))
9018 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9020 ,@(package-arguments anyjson)))
9021 (native-inputs `(("python2-nose" ,python2-nose))))))
9023 (define-public python-amqp
9025 (name "python-amqp")
9030 (uri (pypi-uri "amqp" version))
9033 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9034 (build-system python-build-system)
9036 `(("python-case" ,python-case)
9037 ("python-pytest-sugar" ,python-pytest-sugar)
9038 ("python-mock" ,python-mock)))
9040 `(("python-vine" ,python-vine)))
9041 (home-page "https://github.com/celery/py-amqp")
9043 "Low-level AMQP client for Python (fork of amqplib)")
9045 "This is a fork of amqplib which was originally written by Barry Pederson.
9046 It is maintained by the Celery project, and used by kombu as a pure python
9047 alternative when librabbitmq is not available.")
9048 (license license:lgpl2.1+)
9049 (properties `((python2-variant . ,(delay python2-amqp))))))
9051 (define-public python2-amqp
9052 (let ((amqp (package-with-python2
9053 (strip-python2-variant python-amqp))))
9056 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9057 ;; unmaintained. Weirdly, does not do this on the python 3
9060 ,@(package-arguments amqp))))))
9062 (define-public python-txamqp
9064 (name "python-txamqp")
9069 (uri (pypi-uri "txAMQP" version))
9072 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9073 (build-system python-build-system)
9075 `(("python-six" ,python-six)
9076 ("python-twisted" ,python-twisted)))
9077 (home-page "https://github.com/txamqp/txamqp")
9078 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9080 "This package provides a Python library for communicating with AMQP peers
9081 and brokers using the asynchronous networking framework Twisted. It contains
9082 all the necessary code to connect, send and receive messages to/from an
9083 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9084 also includes support for using Thrift RPC over AMQP in Twisted
9086 (license license:asl2.0)))
9088 (define-public python2-txamqp
9089 (package-with-python2 python-txamqp))
9091 (define-public python-kombu
9093 (name "python-kombu")
9098 (uri (pypi-uri "kombu" version))
9101 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9102 (build-system python-build-system)
9104 `(("python-mock" ,python-mock)
9105 ("python-case" ,python-case)
9106 ("python-pyro4" ,python-pyro4)
9107 ("python-pytest-sugar" ,python-pytest-sugar)
9108 ("python-pytz" ,python-pytz)))
9110 `(("python-anyjson" ,python-anyjson)
9111 ("python-amqp" ,python-amqp)
9112 ("python-redis" ,python-redis)))
9113 (home-page "https://kombu.readthedocs.io")
9114 (synopsis "Message passing library for Python")
9115 (description "The aim of Kombu is to make messaging in Python as easy as
9116 possible by providing an idiomatic high-level interface for the AMQ protocol,
9117 and also provide proven and tested solutions to common messaging problems.
9118 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9119 message orientation, queuing, routing, reliability and security, for which the
9120 RabbitMQ messaging server is the most popular implementation.")
9121 (license license:bsd-3)
9122 (properties `((python2-variant . ,(delay python2-kombu))))))
9124 (define-public python2-kombu
9125 (let ((kombu (package-with-python2
9126 (strip-python2-variant python-kombu))))
9129 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9130 ;; It works fine on the python3 variant.
9132 ,@(package-arguments kombu)))
9133 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9134 ,@(package-native-inputs kombu))))))
9136 (define-public python-billiard
9138 (name "python-billiard")
9143 (uri (pypi-uri "billiard" version))
9146 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9147 (build-system python-build-system)
9149 `(("python-case" ,python-case)
9150 ("python-pytest" ,python-pytest)))
9151 (home-page "https://github.com/celery/billiard")
9153 "Python multiprocessing fork with improvements and bugfixes")
9155 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9156 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9157 pyprocessing package. This standalone variant is intended to be compatible with
9158 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9159 (license license:bsd-3)
9160 (properties `((python2-variant . ,(delay python2-billiard))))))
9162 (define-public python2-billiard
9163 (let ((billiard (package-with-python2
9164 (strip-python2-variant python-billiard))))
9167 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9168 ("python2-mock" ,python2-mock)
9169 ,@(package-native-inputs billiard))))))
9171 (define-public python-celery
9173 (name "python-celery")
9178 (uri (pypi-uri "celery" version))
9181 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9182 (build-system python-build-system)
9184 '(;; TODO The tests fail with Python 3.7
9185 ;; https://github.com/celery/celery/issues/4849
9188 (modify-phases %standard-phases
9189 (add-after 'unpack 'patch-requirements
9191 (substitute* "requirements/test.txt"
9192 (("pytest>=3\\.0,<3\\.3")
9196 `(("python-case" ,python-case)
9197 ("python-pytest" ,python-pytest)))
9199 `(("python-pytz" ,python-pytz)
9200 ("python-billiard" ,python-billiard)
9201 ("python-kombu" ,python-kombu)))
9202 (home-page "https://celeryproject.org")
9203 (synopsis "Distributed Task Queue")
9204 (description "Celery is an asynchronous task queue/job queue based on
9205 distributed message passing. It is focused on real-time operation, but
9206 supports scheduling as well. The execution units, called tasks, are executed
9207 concurrently on a single or more worker servers using multiprocessing,
9208 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9209 synchronously (wait until ready).")
9210 (license license:bsd-3)
9211 (properties `((python2-variant . ,(delay python2-celery))))))
9213 (define-public python2-celery
9214 (let ((celery (package-with-python2
9215 (strip-python2-variant python-celery))))
9218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9219 ("python2-mock" ,python2-mock)
9220 ,@(package-native-inputs celery))))))
9222 (define-public python-translitcodec
9224 (name "python-translitcodec")
9229 (uri (pypi-uri "translitcodec" version))
9232 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9233 (build-system python-build-system)
9235 `(#:tests? #f)) ; no tests provided
9237 "https://github.com/claudep/translitcodec")
9239 "Unicode to 8-bit charset transliteration codec")
9241 "This package contains codecs for transliterating ISO 10646 texts into
9242 best-effort representations using smaller coded character sets (ASCII,
9244 (license license:expat)))
9246 (define-public python2-translitcodec
9247 (package-with-python2 python-translitcodec))
9249 (define-public python-editor
9251 (name "python-editor")
9256 (uri (pypi-uri "python-editor" version))
9259 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9260 (build-system python-build-system)
9262 "https://github.com/fmoo/python-editor")
9264 "Programmatically open an editor, capture the result")
9266 "python-editor is a library that provides the editor module for
9267 programmatically interfacing with your system's $EDITOR.")
9268 (license license:asl2.0)))
9270 (define-public python2-editor
9271 (package-with-python2 python-editor))
9273 (define-public python-vobject
9275 (name "python-vobject")
9279 (uri (pypi-uri "vobject" version))
9282 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9283 (build-system python-build-system)
9285 '(;; The test suite relies on some non-portable Windows interfaces.
9288 `(("python-dateutil" ,python-dateutil)
9289 ("python-pyicu" ,python-pyicu)))
9290 (synopsis "Parse and generate vCard and vCalendar files")
9291 (description "Vobject is intended to be a full featured Python package for
9292 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9293 are supported and well tested. vCard 3.0 files are supported, and all data
9294 should be imported, but only a few components are understood in a sophisticated
9296 (home-page "http://eventable.github.io/vobject/")
9297 (license license:asl2.0)))
9299 (define-public python2-vobject
9300 (package-with-python2 python-vobject))
9302 (define-public python-munkres
9304 (name "python-munkres")
9308 (uri (pypi-uri "munkres" version))
9311 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9312 (build-system python-build-system)
9314 '(#:tests? #f)) ; no test suite
9315 (home-page "http://software.clapper.org/munkres/")
9316 (synopsis "Implementation of the Munkres algorithm")
9317 (description "The Munkres module provides an implementation of the Munkres
9318 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9319 useful for solving the Assignment Problem.")
9320 (license license:bsd-3)))
9322 (define-public python2-munkres
9323 (package-with-python2 python-munkres))
9325 (define-public python-whoosh
9327 (name "python-whoosh")
9332 (uri (pypi-uri "Whoosh" version))
9335 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9336 (build-system python-build-system)
9338 `(("python-pytest" ,python-pytest)))
9339 (home-page "https://bitbucket.org/mchaput/whoosh")
9340 (synopsis "Full text indexing, search, and spell checking library")
9342 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9344 (license license:bsd-2)))
9346 (define-public python2-whoosh
9347 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9348 (package (inherit whoosh)
9350 `(("python2-backport-ssl-match-hostname"
9351 ,python2-backport-ssl-match-hostname)
9352 ,@(package-propagated-inputs whoosh))))))
9354 (define-public python-pathlib
9356 (name "python-pathlib")
9360 (uri (pypi-uri "pathlib" version))
9363 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9364 (build-system python-build-system)
9365 ;; The tests depend on the internal "test" module, which does not provide
9366 ;; a stable interface.
9367 (arguments `(#:tests? #f))
9368 (home-page "https://pathlib.readthedocs.org/")
9369 (synopsis "Object-oriented file system paths")
9370 (description "Pathlib offers a set of classes to handle file system paths.
9371 It offers the following advantages over using string objects:
9374 @item No more cumbersome use of os and os.path functions. Everything can
9375 be done easily through operators, attribute accesses, and method calls.
9376 @item Embodies the semantics of different path types. For example,
9377 comparing Windows paths ignores casing.
9378 @item Well-defined semantics, eliminating any inconsistencies or
9379 ambiguities (forward vs. backward slashes, etc.).
9382 Note: In Python 3.4, pathlib is now part of the standard library. For other
9383 Python versions please consider python-pathlib2 instead, which tracks the
9384 standard library module. This module (python-pathlib) isn't maintained
9386 (license license:expat)))
9388 (define-public python2-pathlib
9389 (package-with-python2 python-pathlib))
9391 (define-public python2-pathlib2
9393 (name "python2-pathlib2")
9397 (uri (pypi-uri "pathlib2" version))
9400 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9401 (build-system python-build-system)
9402 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9403 ;; version is 3.4 which already includes this package as part of the
9404 ;; standard library.
9406 `(#:python ,python-2))
9408 `(("python2-scandir" ,python2-scandir)
9409 ("python2-six" ,python2-six)))
9410 (home-page "https://pypi.python.org/pypi/pathlib2/")
9411 (synopsis "Object-oriented file system paths - backport of standard
9413 (description "The goal of pathlib2 is to provide a backport of standard
9414 pathlib module which tracks the standard library module, so all the newest
9415 features of the standard pathlib can be used also on older Python versions.
9417 Pathlib offers a set of classes to handle file system paths. It offers the
9418 following advantages over using string objects:
9421 @item No more cumbersome use of os and os.path functions. Everything can
9422 be done easily through operators, attribute accesses, and method calls.
9423 @item Embodies the semantics of different path types. For example,
9424 comparing Windows paths ignores casing.
9425 @item Well-defined semantics, eliminating any inconsistencies or
9426 ambiguities (forward vs. backward slashes, etc.).
9428 (license license:expat)))
9430 (define-public python2-pathlib2-bootstrap
9433 (inherit python2-pathlib2)
9434 (name "python2-pathlib2-bootstrap")
9436 `(("python2-scandir" ,python2-scandir)
9437 ("python2-six" ,python2-six-bootstrap))))))
9439 (define-public python-jellyfish
9441 (name "python-jellyfish")
9445 (uri (pypi-uri "jellyfish" version))
9448 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9449 (build-system python-build-system)
9451 `(("python-pytest" ,python-pytest)))
9452 (home-page "https://github.com/jamesturk/jellyfish")
9453 (synopsis "Approximate and phonetic matching of strings")
9454 (description "Jellyfish uses a variety of string comparison and phonetic
9455 encoding algorithms to do fuzzy string matching.")
9456 (license license:bsd-2)
9457 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9459 (define-public python2-jellyfish
9460 (let ((jellyfish (package-with-python2
9461 (strip-python2-variant python-jellyfish))))
9462 (package (inherit jellyfish)
9463 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9464 ,@(package-native-inputs jellyfish))))))
9466 (define-public python2-unicodecsv
9468 (name "python2-unicodecsv")
9472 ;; The test suite is not included in the PyPi release.
9473 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9474 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9475 "archive/" version ".tar.gz"))
9476 (file-name (string-append name "-" version ".tar.gz"))
9479 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9480 (build-system python-build-system)
9482 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9483 #:python ,python-2))
9485 `(("python2-unittest2" ,python2-unittest2)))
9486 (home-page "https://github.com/jdunck/python-unicodecsv")
9487 (synopsis "Unicode CSV module for Python 2")
9488 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9489 module, adding support for Unicode strings.")
9490 (license license:bsd-2)))
9492 (define-public python-rarfile
9494 (name "python-rarfile")
9498 (uri (pypi-uri "rarfile" version))
9501 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9502 (build-system python-build-system)
9505 (modify-phases %standard-phases
9507 ;; Many tests fail, but the installation proceeds.
9508 (lambda _ (invoke "make" "-C" "test" "test"))))))
9510 `(("which" ,which))) ; required for tests
9512 `(("libarchive" ,libarchive)))
9513 (home-page "https://github.com/markokr/rarfile")
9514 (synopsis "RAR archive reader for Python")
9515 (description "This is Python module for RAR archive reading. The interface
9516 is made as zipfile like as possible.")
9517 (license license:isc)))
9519 (define-public python2-rarfile
9520 (package-with-python2 python-rarfile))
9522 (define-public python-magic
9524 (name "python-magic")
9529 (uri (pypi-uri "python-magic" version))
9532 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9533 (file-name (string-append name "-" version "-checkout"))))
9534 (build-system python-build-system)
9536 ;; The tests are unreliable, so don't run them. The tests fail
9537 ;; under Python3 because they were written for Python2 and
9538 ;; contain import statements that do not work in Python3. One of
9539 ;; the tests fails under Python2 because its assertions are
9540 ;; overly stringent; it relies on comparing output strings which
9541 ;; are brittle and can change depending on the version of
9542 ;; libmagic being used and the system on which the test is
9543 ;; running. In my case, under GuixSD 0.10.0, only one test
9544 ;; failed, and it seems to have failed only because the version
9545 ;; of libmagic that is packaged in Guix outputs a slightly
9546 ;; different (but not wrong) string than the one that the test
9549 #:phases (modify-phases %standard-phases
9550 ;; Replace a specific method call with a hard-coded
9551 ;; path to the necessary libmagic.so file in the
9552 ;; store. If we don't do this, then the method call
9553 ;; will fail to find the libmagic.so file, which in
9554 ;; turn will cause any application using
9555 ;; python-magic to fail.
9556 (add-before 'build 'hard-code-path-to-libmagic
9557 (lambda* (#:key inputs #:allow-other-keys)
9558 (let ((file (assoc-ref inputs "file")))
9559 (substitute* "magic.py"
9560 (("ctypes.util.find_library\\('magic'\\)")
9561 (string-append "'" file "/lib/libmagic.so'")))
9563 (add-before 'install 'disable-egg-compression
9565 (let ((port (open-file "setup.cfg" "a")))
9566 (display "\n[easy_install]\nzip_ok = 0\n"
9571 ;; python-magic needs to be able to find libmagic.so.
9574 "https://github.com/ahupp/python-magic")
9576 "File type identification using libmagic")
9578 "This module uses ctypes to access the libmagic file type
9579 identification library. It makes use of the local magic database and
9580 supports both textual and MIME-type output. Note that this module and
9581 the python-file module both provide a \"magic.py\" file; these two
9582 modules, which are different and were developed separately, both serve
9583 the same purpose: to provide Python bindings for libmagic.")
9584 (license license:expat)))
9586 (define-public python2-magic
9587 (package-with-python2 python-magic))
9589 (define-public python2-s3cmd
9591 (name "python2-s3cmd")
9596 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9597 "s3cmd-" version ".tar.gz"))
9600 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9601 (build-system python-build-system)
9603 ;; s3cmd is written for python2 only and contains no tests.
9604 `(#:python ,python-2
9607 `(("python2-dateutil" ,python2-dateutil)
9608 ;; The python-file package also provides a magic.py module.
9609 ;; This is an unfortunate state of affairs; however, s3cmd
9610 ;; fails to install if it cannot find specifically the
9611 ;; python-magic package. Thus we include it, instead of using
9612 ;; python-file. Ironically, s3cmd sometimes works better
9613 ;; without libmagic bindings at all:
9614 ;; https://github.com/s3tools/s3cmd/issues/198
9615 ("python2-magic" ,python2-magic)))
9616 (home-page "http://s3tools.org/s3cmd")
9617 (synopsis "Command line tool for S3-compatible storage services")
9619 "S3cmd is a command line tool for uploading, retrieving and managing data
9620 in storage services that are compatible with the Amazon Simple Storage
9621 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9622 GnuPG encryption, and more. It also supports management of Amazon's
9623 CloudFront content delivery network.")
9624 (license license:gpl2+)))
9626 (define-public python-pkgconfig
9628 (name "python-pkgconfig")
9633 (uri (pypi-uri "pkgconfig" version))
9636 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9637 (build-system python-build-system)
9639 `(("python-nose" ,python-nose)))
9641 `(("pkg-config" ,pkg-config)))
9644 (modify-phases %standard-phases
9645 (add-before 'build 'patch
9646 ;; Hard-code the path to pkg-config.
9648 (substitute* "pkgconfig/pkgconfig.py"
9649 (("cmd = 'pkg-config")
9650 (string-append "cmd = '" (which "pkg-config"))))
9654 (invoke "nosetests" "test.py"))))))
9655 (home-page "https://github.com/matze/pkgconfig")
9656 (synopsis "Python interface for pkg-config")
9657 (description "This module provides a Python interface to pkg-config. It
9658 can be used to find all pkg-config packages, check if a package exists,
9659 check if a package meets certain version requirements, query CFLAGS and
9660 LDFLAGS and parse the output to build extensions with setup.py.")
9661 (license license:expat)))
9663 (define-public python2-pkgconfig
9664 (package-with-python2 python-pkgconfig))
9666 (define-public python-bz2file
9668 (name "python-bz2file")
9673 (uri (pypi-uri "bz2file" version))
9676 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9677 (build-system python-build-system)
9679 `(#:tests? #f)) ; Tests use deprecated python modules.
9680 (home-page "https://github.com/nvawda/bz2file")
9681 (synopsis "Read and write bzip2-compressed files")
9683 "Bz2file is a Python library for reading and writing bzip2-compressed
9684 files. It contains a drop-in replacement for the I/O interface in the
9685 standard library's @code{bz2} module, including features from the latest
9686 development version of CPython that are not available in older releases.")
9687 (license license:asl2.0)))
9689 (define-public python2-bz2file
9690 (package-with-python2 python-bz2file))
9692 (define-public python-future
9694 (name "python-future")
9699 (uri (pypi-uri "future" version))
9702 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9703 (build-system python-build-system)
9704 ;; Many tests connect to the network or are otherwise flawed.
9705 ;; https://github.com/PythonCharmers/python-future/issues/210
9708 (home-page "http://python-future.org")
9709 (synopsis "Single-source support for Python 3 and 2")
9711 "@code{python-future} is the missing compatibility layer between Python 2 and
9712 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9713 to support both Python 2 and Python 3 with minimal overhead.")
9714 (license license:expat)))
9716 (define-public python2-future
9717 (package-with-python2 python-future))
9719 (define-public python-cysignals
9721 (name "python-cysignals")
9726 (uri (pypi-uri "cysignals" version))
9729 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9730 (build-system python-build-system)
9732 `(("python-cython" ,python-cython)
9733 ("python-sphinx" ,python-sphinx)))
9735 `(("pari-gp" ,pari-gp)))
9737 `(#:modules ((guix build python-build-system)
9738 ((guix build gnu-build-system) #:prefix gnu:)
9740 ;; FIXME: Tests are executed after installation and currently fail
9741 ;; when not installing into standard locations; the author is working
9745 (modify-phases %standard-phases
9748 (assoc-ref gnu:%standard-phases 'configure)))))
9750 "https://github.com/sagemath/cysignals")
9752 "Handling of interrupts and signals for Cython")
9754 "The cysignals package provides mechanisms to handle interrupts (and
9755 other signals and errors) in Cython code, using two related approaches,
9756 for mixed Cython/Python code or external C libraries and pure Cython code,
9758 (license license:lgpl3+)))
9760 (define-public python2-cysignals
9761 (package-with-python2 python-cysignals))
9763 (define-public python2-shedskin
9765 (name "python2-shedskin")
9770 (uri (string-append "https://github.com/shedskin/shedskin/"
9771 "releases/download/v" version
9772 "/shedskin-" version ".tgz"))
9775 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9776 (build-system python-build-system)
9778 `(#:python ,python-2
9779 #:phases (modify-phases %standard-phases
9780 (add-after 'unpack 'fix-resulting-include-libs
9781 (lambda* (#:key inputs #:allow-other-keys)
9782 (let ((libgc (assoc-ref inputs "libgc"))
9783 (pcre (assoc-ref inputs "pcre")))
9784 (substitute* "shedskin/makefile.py"
9785 (("variable == 'CCFLAGS':[ ]*")
9786 (string-append "variable == 'CCFLAGS':\n"
9787 " line += ' -I " pcre "/include"
9788 " -I " libgc "/include'"))
9789 (("variable == 'LFLAGS':[ ]*")
9790 (string-append "variable == 'LFLAGS':\n"
9791 " line += ' -L" pcre "/lib"
9792 " -L " libgc "/lib'")))
9794 (inputs `(("pcre" ,pcre)
9796 (home-page "https://shedskin.github.io/")
9797 (synopsis "Experimental Python-2 to C++ Compiler")
9798 (description (string-append "This is an experimental compiler for a subset of
9799 Python. It generates C++ code and a Makefile."))
9800 (license (list license:gpl3 license:bsd-3 license:expat))))
9802 (define-public python2-rope
9804 (name "python2-rope")
9809 (uri (pypi-uri "rope" version))
9812 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9814 ;; Rope has only partial python3 support, see `python-rope'
9815 `(#:python ,python-2))
9816 (build-system python-build-system)
9818 `(("python2-unittest2" ,python2-unittest2)))
9819 (home-page "https://github.com/python-rope/rope")
9820 (synopsis "Refactoring library for Python")
9821 (description "Rope is a refactoring library for Python. It facilitates
9822 the renaming, moving and extracting of attributes, functions, modules, fields
9823 and parameters in Python 2 source code. These refactorings can also be applied
9824 to occurrences in strings and comments.")
9825 (license license:gpl2)))
9827 (define-public python-rope
9829 (inherit python2-rope)
9830 (name "python-rope")
9831 (arguments `(#:python ,python-wrapper
9832 ;; XXX: Only partial python3 support, results in some failing
9833 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9835 (properties `((python2-variant . ,(delay python2-rope))))))
9837 (define-public python-py3status
9839 (name "python-py3status")
9844 (uri (pypi-uri "py3status" version))
9847 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9848 (build-system python-build-system)
9853 (modify-phases %standard-phases
9854 ;; 'file' is used for detection of configuration file encoding
9855 ;; let's make link the dependency to particular input
9856 (add-before 'build 'patch-file-path
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((file-path (assoc-ref inputs "file")))
9859 (substitute* "py3status/parse_config.py"
9860 (("\\['file', '-b'")
9861 (string-append "['" file-path "/bin/file', '-b'")))
9863 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9864 (home-page "https://github.com/ultrabug/py3status")
9865 (synopsis "Extensible i3status wrapper written in Python")
9866 (description "py3status is an i3status wrapper which extends i3status
9867 functionality in a modular way, allowing you to extend your panel with your
9868 own code, responding to click events and updating clock every second.")
9869 (license license:bsd-3)))
9871 (define-public python-tblib
9873 (name "python-tblib")
9877 (uri (pypi-uri "tblib" version))
9879 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9880 (build-system python-build-system)
9883 (modify-phases %standard-phases
9884 (add-before 'check 'adjust-tests
9886 (when (which "python3")
9887 ;; Adjust the example output to match that of Python 3.7:
9888 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9889 (substitute* "README.rst"
9890 (("Exception\\('fail',") "Exception('fail'"))
9894 ;; Upstream runs tests after installation and the package itself
9895 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9897 (setenv "PYTHONPATH"
9898 (string-append (getcwd) "/build/lib:"
9899 (getenv "PYTHONPATH")))
9900 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9902 `(("python-pytest" ,python-pytest)
9903 ("python-six" ,python-six)))
9904 (home-page "https://github.com/ionelmc/python-tblib")
9905 (synopsis "Traceback serialization library")
9907 "Traceback serialization allows you to:
9910 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9911 different processes. This allows better error handling when running code over
9912 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9914 @item Parse traceback strings and raise with the parsed tracebacks.
9916 (license license:bsd-3)))
9918 (define-public python2-tblib
9919 (package-with-python2 python-tblib))
9921 (define-public python-greenlet
9923 (name "python-greenlet")
9927 (uri (pypi-uri "greenlet" version))
9930 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9931 (build-system python-build-system)
9932 (home-page "https://greenlet.readthedocs.io/")
9933 (synopsis "Lightweight in-process concurrent programming")
9935 "Greenlet package is a spin-off of Stackless, a version of CPython
9936 that supports micro-threads called \"tasklets\". Tasklets run
9937 pseudo-concurrently (typically in a single or a few OS-level threads) and
9938 are synchronized with data exchanges on \"channels\".")
9939 (license (list license:psfl license:expat))))
9941 (define-public python2-greenlet
9942 (package-with-python2 python-greenlet))
9944 (define-public python-objgraph
9946 (name "python-objgraph")
9951 (uri (pypi-uri "objgraph" version))
9954 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9955 (build-system python-build-system)
9957 `(("python-graphviz" ,python-graphviz)))
9959 `(("python-mock" ,python-mock)
9960 ("graphviz" ,graphviz)))
9961 (home-page "https://mg.pov.lt/objgraph/")
9962 (synopsis "Draw Python object reference graphs with graphviz")
9964 "This package provides tools to draw Python object reference graphs with
9966 (license license:expat)))
9968 (define-public python-gevent
9970 (name "python-gevent")
9974 (uri (pypi-uri "gevent" version))
9977 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9978 (modules '((guix build utils)))
9981 ;; unbunding libev and c-ares
9982 (delete-file-recursively "deps")
9984 (build-system python-build-system)
9986 `(#:modules ((ice-9 ftw)
9990 (guix build python-build-system))
9991 #:phases (modify-phases %standard-phases
9992 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9994 (substitute* "src/gevent/subprocess.py"
9995 (("/bin/sh") (which "sh")))
9996 (for-each (lambda (file)
9998 (("/bin/sh") (which "sh"))
9999 (("/bin/true") (which "true"))))
10000 (find-files "src/greentest" "\\.py$"))
10002 (add-before 'build 'do-not-use-bundled-sources
10003 (lambda* (#:key inputs #:allow-other-keys)
10004 (setenv "CONFIG_SHELL" (which "bash"))
10005 (setenv "LIBEV_EMBED" "false")
10006 (setenv "CARES_EMBED" "false")
10007 (setenv "EMBED" "false")
10009 ;; Prevent building bundled libev.
10010 (substitute* "setup.py"
10011 (("run_make=_BUILDING")
10014 (let ((greenlet (string-append
10015 (assoc-ref inputs "python-greenlet")
10017 (match (scandir greenlet
10019 (string-prefix? "python" item)))
10021 (setenv "C_INCLUDE_PATH"
10022 (string-append greenlet "/" python)))))
10024 (add-before 'check 'skip-timer-test
10026 ;; XXX: Skip 'TestTimerResolution', which appears to be
10028 (substitute* "src/greentest/test__core_timer.py"
10029 (("not greentest.RUNNING_ON_CI") "False"))
10033 ;; Make sure the build directory is on PYTHONPATH.
10034 (setenv "PYTHONPATH"
10036 (getenv "PYTHONPATH") ":"
10038 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10039 (with-directory-excursion "src/greentest"
10040 ;; XXX: Many tests require network access. Instead we only
10041 ;; run known-good tests. Unfortunately we cannot use
10042 ;; recursion here since this directory also contains
10043 ;; Python-version-specific subfolders.
10044 (apply invoke "python" "testrunner.py" "--config"
10045 "known_failures.py"
10046 (scandir "." (cut regexp-exec
10047 (make-regexp "test_+(subprocess|core)")
10050 `(("python-greenlet" ,python-greenlet)
10051 ("python-objgraph" ,python-objgraph)))
10053 `(("python-six" ,python-six)))
10055 `(("c-ares" ,c-ares)
10057 (home-page "http://www.gevent.org/")
10058 (synopsis "Coroutine-based network library")
10060 "gevent is a coroutine-based Python networking library that uses greenlet
10061 to provide a high-level synchronous API on top of the libev event loop.")
10062 (license license:expat)
10063 (properties `((python2-variant . ,(delay python2-gevent))))))
10065 (define-public python2-gevent
10066 (let ((base (package-with-python2
10067 (strip-python2-variant python-gevent))))
10070 (native-inputs `(,@(package-native-inputs python-gevent)
10071 ("python-mock" ,python2-mock))))))
10073 (define-public python-fastimport
10075 (name "python-fastimport")
10080 (uri (pypi-uri "fastimport" version))
10082 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10083 (build-system python-build-system)
10084 (home-page "https://github.com/jelmer/python-fastimport")
10085 (synopsis "VCS fastimport parser and generator in Python")
10086 (description "This package provides a parser for and generator of the Git
10087 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10089 (license license:gpl2+)))
10091 (define-public python2-fastimport
10092 (package-with-python2 python-fastimport))
10094 (define-public python-twisted
10096 (name "python-twisted")
10100 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10103 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10104 (build-system python-build-system)
10106 '(#:tests? #f)) ; FIXME: some tests fail
10108 `(("python-zope-interface" ,python-zope-interface)
10109 ("python-pyhamcrest" ,python-pyhamcrest)
10110 ("python-incremental" ,python-incremental)
10111 ("python-hyperlink" ,python-hyperlink)
10112 ("python-constantly" ,python-constantly)
10113 ("python-automat" ,python-automat)))
10114 (home-page "https://twistedmatrix.com/")
10115 (synopsis "Asynchronous networking framework written in Python")
10117 "Twisted is an extensible framework for Python programming, with special
10118 focus on event-based network programming and multiprotocol integration.")
10119 (license license:expat)))
10121 (define-public python2-twisted
10122 (package-with-python2 python-twisted))
10124 (define-public python-pika
10126 (name "python-pika")
10131 (uri (pypi-uri "pika" version))
10134 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10135 (build-system python-build-system)
10137 `(("python-pyev" ,python-pyev)
10138 ("python-tornado" ,python-tornado)
10139 ("python-twisted" ,python-twisted)))
10140 (home-page "https://pika.readthedocs.org")
10141 (synopsis "Pure Python AMQP Client Library")
10143 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10144 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10145 network support library.")
10146 (license license:bsd-3)))
10148 (define-public python2-pika
10149 (package-with-python2 python-pika))
10151 (define-public python-ply
10153 (name "python-ply")
10158 (uri (pypi-uri "ply" version))
10161 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10162 (build-system python-build-system)
10163 (home-page "http://www.dabeaz.com/ply/")
10164 (synopsis "Python Lex & Yacc")
10165 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10166 It uses LR parsing and does extensive error checking.")
10167 (license license:bsd-3)))
10169 (define-public python2-ply
10170 (package-with-python2 python-ply))
10172 (define-public python-tabulate
10174 (name "python-tabulate")
10178 (uri (pypi-uri "tabulate" version))
10181 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10182 (build-system python-build-system)
10184 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10185 ;; and the latest release is not tagged in the upstream repository.
10187 (home-page "https://bitbucket.org/astanin/python-tabulate")
10188 (synopsis "Pretty-print tabular data")
10190 "Tabulate is a library and command-line utility to pretty-print tabular
10192 (license license:expat)))
10194 (define-public python2-tabulate
10195 (package-with-python2 python-tabulate))
10197 (define-public python-kazoo
10199 (name "python-kazoo")
10204 (uri (pypi-uri "kazoo" version))
10207 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10208 (build-system python-build-system)
10209 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10211 `(("python-six" ,python-six)))
10212 (home-page "https://kazoo.readthedocs.org")
10213 (synopsis "High-level Zookeeper client library")
10215 "Kazoo is a Python client library for the Apache Zookeeper distributed
10216 application service. It is designed to be easy to use and to avoid common
10217 programming errors.")
10218 (license license:asl2.0)))
10220 (define-public python2-kazoo
10221 (package-with-python2 python-kazoo))
10223 (define-public python-pykafka
10225 (name "python-pykafka")
10229 (uri (pypi-uri "pykafka" version))
10232 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10233 (build-system python-build-system)
10234 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10236 `(("python-gevent" ,python-gevent)
10237 ("python-kazoo" ,python-kazoo)
10238 ("python-tabulate" ,python-tabulate)))
10240 `(("librdkafka" ,librdkafka)))
10241 (home-page "https://pykafka.readthedocs.io/")
10242 (synopsis "Apache Kafka client for Python")
10244 "PyKafka is a client for the Apache Kafka distributed messaging system.
10245 It includes Python implementations of Kafka producers and consumers, which
10246 are optionally backed by a C extension built on librdkafka.")
10247 (license license:asl2.0)))
10249 (define-public python2-pykafka
10250 (package-with-python2 python-pykafka))
10252 (define-public python-wcwidth
10254 (name "python-wcwidth")
10259 (uri (pypi-uri "wcwidth" version))
10262 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10263 (build-system python-build-system)
10264 (home-page "https://github.com/jquast/wcwidth")
10265 (synopsis "Measure number of terminal column cells of wide-character codes")
10266 (description "Wcwidth measures the number of terminal column cells of
10267 wide-character codes. It is useful for those implementing a terminal emulator,
10268 or programs that carefully produce output to be interpreted by one. It is a
10269 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10270 specified in POSIX.1-2001 and POSIX.1-2008.")
10271 (license license:expat)))
10273 (define-public python2-wcwidth
10274 (package-with-python2 python-wcwidth))
10276 (define-public python2-jsonrpclib
10278 (name "python2-jsonrpclib")
10282 (uri (pypi-uri "jsonrpclib" version))
10285 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10286 (build-system python-build-system)
10289 #:python ,python-2))
10290 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10291 (synopsis "Implementation of JSON-RPC specification for Python")
10293 "This library is an implementation of the JSON-RPC specification.
10294 It supports both the original 1.0 specification, as well as the
10295 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10297 (license license:asl2.0)))
10299 (define-public python-chai
10301 (name "python-chai")
10305 (uri (pypi-uri "chai" version))
10308 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10309 (build-system python-build-system)
10310 (home-page "https://github.com/agoragames/chai")
10311 (synopsis "Mocking framework for Python")
10313 "Chai provides an api for mocking, stubbing and spying your python
10314 objects, patterned after the Mocha library for Ruby.")
10315 (license license:bsd-3)))
10317 (define-public python2-chai
10318 (package-with-python2 python-chai))
10320 (define-public python-inflection
10322 (name "python-inflection")
10325 (origin (method url-fetch)
10326 (uri (pypi-uri "inflection" version))
10329 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10330 (build-system python-build-system)
10332 `(("python-pytest" ,python-pytest)))
10333 (home-page "https://github.com/jpvanhal/inflection")
10334 (synopsis "Python string transformation library")
10336 "Inflection is a string transformation library. It singularizes
10337 and pluralizes English words, and transforms strings from CamelCase to
10338 underscored string.")
10339 (license license:expat)))
10341 (define-public python2-inflection
10342 (package-with-python2 python-inflection))
10344 (define-public python-pylev
10346 (name "python-pylev")
10350 (uri (pypi-uri "pylev" version))
10353 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10354 (build-system python-build-system)
10355 (home-page "https://github.com/toastdriven/pylev")
10356 (synopsis "Levenshtein distance implementation in Python")
10357 (description "Pure Python Levenshtein implementation, based off the
10358 Wikipedia code samples at
10359 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10360 (license license:bsd-3)))
10362 (define-public python2-pylev
10363 (package-with-python2 python-pylev))
10365 (define-public python-cleo
10367 (name "python-cleo")
10371 (uri (pypi-uri "cleo" version))
10374 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10375 (build-system python-build-system)
10378 ("python-mock" ,python-mock)
10379 ("python-pytest-mock" ,python-pytest-mock)
10380 ("python-pytest" ,python-pytest)))
10382 `(("python-backpack" ,python-backpack)
10383 ("python-pastel" ,python-pastel)
10384 ("python-pylev" ,python-pylev)))
10385 (home-page "https://github.com/sdispater/cleo")
10386 (synopsis "Command-line arguments library for Python")
10388 "Cleo allows you to create command-line commands with signature in
10389 docstring and colored output.")
10390 (license license:expat)))
10392 (define-public python2-cleo
10393 (package-with-python2 python-cleo))
10395 (define-public python-lazy-object-proxy
10397 (name "python-lazy-object-proxy")
10401 (uri (pypi-uri "lazy-object-proxy" version))
10404 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10405 (build-system python-build-system)
10406 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10407 (synopsis "Lazy object proxy for python")
10409 "Lazy object proxy is an object that wraps a callable but defers the call
10410 until the object is actually required, and caches the result of said call.")
10411 (license license:bsd-2)))
10413 (define-public python2-lazy-object-proxy
10414 (package-with-python2 python-lazy-object-proxy))
10416 (define-public python-dnspython
10418 (name "python-dnspython")
10422 (uri (string-append "http://www.dnspython.org/kits/"
10423 version "/dnspython-" version ".tar.gz"))
10426 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10427 (build-system python-build-system)
10428 (arguments '(#:tests? #f)) ; XXX: requires internet access
10429 (home-page "http://www.dnspython.org")
10430 (synopsis "DNS toolkit for Python")
10432 "dnspython is a DNS toolkit for Python. It supports almost all record
10433 types. It can be used for queries, zone transfers, and dynamic updates.
10434 It supports TSIG authenticated messages and EDNS0.")
10435 (license license:expat)))
10437 (define-public python2-dnspython
10438 (package-with-python2 python-dnspython))
10440 (define-public python-email-validator
10442 (name "python-email-validator")
10445 (origin (method url-fetch)
10446 (uri (pypi-uri "email_validator" version))
10449 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10450 (build-system python-build-system)
10453 (modify-phases %standard-phases
10454 (add-before 'build 'use-dnspython
10456 (substitute* "setup.py"
10457 (("dnspython3") "dnspython"))
10460 `(("python-dnspython" ,python-dnspython)
10461 ("python-idna" ,python-idna)))
10462 (home-page "https://github.com/JoshData/python-email-validator")
10463 (synopsis "Email address validation library for Python")
10465 "This library validates email address syntax and deliverability.")
10466 (license license:cc0)))
10468 (define-public python2-email-validator
10469 (package-with-python2 python-email-validator))
10471 (define-public python-ukpostcodeparser
10473 (name "python-ukpostcodeparser")
10477 (uri (pypi-uri "UkPostcodeParser" version))
10480 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10481 (build-system python-build-system)
10482 (home-page "https://github.com/hamstah/ukpostcodeparser")
10483 (synopsis "UK Postcode parser for Python")
10485 "This library provides the @code{parse_uk_postcode} function for
10486 parsing UK postcodes.")
10487 (license license:expat)))
10489 (define-public python2-ukpostcodeparser
10490 (package-with-python2 python-ukpostcodeparser))
10492 (define-public python-faker
10494 (name "python-faker")
10498 (uri (pypi-uri "Faker" version))
10501 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10503 (search-patches "python-faker-fix-build-32bit.patch"))
10504 (modules '((guix build utils)))
10507 (for-each delete-file (find-files "." "\\.pyc$"))
10509 (build-system python-build-system)
10512 (modify-phases %standard-phases
10514 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10517 ("python-email-validator" ,python-email-validator)
10518 ("python-mock" ,python-mock)
10519 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10521 `(("python-dateutil" ,python-dateutil)
10522 ("python-six" ,python-six)))
10523 (home-page "https://github.com/joke2k/faker")
10524 (synopsis "Python package that generates fake data")
10526 "Faker is a Python package that generates fake data such as names,
10527 addresses, and phone numbers.")
10528 (license license:expat)
10529 (properties `((python2-variant . ,(delay python2-faker))))))
10531 (define-public python2-faker
10532 (let ((base (package-with-python2 (strip-python2-variant
10537 `(("python2-ipaddress" ,python2-ipaddress)
10538 ,@(package-propagated-inputs base))))))
10540 (define-public python-pyaml
10542 (name "python-pyaml")
10543 (version "18.11.0")
10546 (uri (pypi-uri "pyaml" version))
10549 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10550 (build-system python-build-system)
10552 `(("python-unidecode" ,python-unidecode)))
10554 `(("python-pyyaml" ,python-pyyaml)))
10555 (home-page "https://github.com/mk-fg/pretty-yaml")
10556 (synopsis "YAML pretty-print library for Python")
10558 "pyaml is a PyYAML based python module to produce pretty and readable
10559 YAML-serialized data.")
10560 (license license:wtfpl2)))
10562 (define-public python2-pyaml
10563 (package-with-python2 python-pyaml))
10565 (define-public python-backpack
10567 (name "python-backpack")
10572 (uri (pypi-uri "backpack" version))
10575 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10576 (build-system python-build-system)
10578 `(("python-pytest" ,python-pytest)
10579 ("python-nose" ,python-nose)))
10581 `(("python-simplejson" ,python-simplejson)))
10582 (home-page "https://github.com/sdispater/backpack")
10583 (synopsis "Utilities for working with Python collections")
10584 (description "Backpack provides some useful utilities for working with
10585 collections of data.")
10586 (license license:expat)))
10588 (define-public python2-backpack
10589 (package-with-python2 python-backpack))
10591 (define-public python-prompt-toolkit
10593 (name "python-prompt-toolkit")
10598 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10601 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10602 (build-system python-build-system)
10605 (modify-phases %standard-phases
10607 (add-after 'install 'post-install-check
10608 (lambda* (#:key inputs outputs #:allow-other-keys)
10609 ;; HOME is needed for the test
10610 ;; "test_pathcompleter_can_expanduser".
10611 (setenv "HOME" "/tmp")
10612 (add-installed-pythonpath inputs outputs)
10613 (invoke "py.test"))))))
10615 `(("python-wcwidth" ,python-wcwidth)
10616 ("python-six" ,python-six)
10617 ("python-pygments" ,python-pygments)))
10619 `(("python-pytest" ,python-pytest)))
10620 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10621 (synopsis "Library for building command line interfaces in Python")
10623 "Prompt-Toolkit is a library for building interactive command line
10624 interfaces in Python. It's like GNU Readline but it also features syntax
10625 highlighting while typing, out-of-the-box multi-line input editing, advanced
10626 code completion, incremental search, support for Chinese double-width
10627 characters, mouse support, and auto suggestions.")
10628 (license license:bsd-3)))
10630 (define-public python2-prompt-toolkit
10631 (package-with-python2 python-prompt-toolkit))
10633 (define-public python-prompt-toolkit-1
10634 (package (inherit python-prompt-toolkit)
10639 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10642 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10644 (define-public python2-prompt-toolkit-1
10645 (package-with-python2 python-prompt-toolkit-1))
10647 (define-public python-jedi
10649 (name "python-jedi")
10654 (uri (pypi-uri "jedi" version))
10657 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10658 (build-system python-build-system)
10661 (modify-phases %standard-phases
10662 (add-after 'unpack 'disable-file-completion-test
10663 ;; A single parameterized test currently fail (see:
10664 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10666 (substitute* "test/test_api/test_completion.py"
10667 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10671 (setenv "HOME" "/tmp")
10672 (invoke "python" "-m" "pytest"))))))
10674 `(("python-pytest" ,python-pytest)
10675 ("python-docopt" ,python-docopt)))
10677 `(("python-parso" ,python-parso)))
10678 (home-page "https://github.com/davidhalter/jedi")
10679 (synopsis "Autocompletion and static analysis library for Python")
10681 "Jedi is a static analysis tool for Python that can be used in Integrated
10682 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10683 on a deeper level than many other static analysis frameworks for Python.
10685 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10687 (license license:expat)))
10689 (define-public python2-jedi
10690 (package-with-python2 python-jedi))
10692 (define-public ptpython
10698 (uri (pypi-uri "ptpython" version))
10701 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10702 (build-system python-build-system)
10704 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10706 `(("python-docopt" ,python-docopt)
10707 ("python-jedi" ,python-jedi)
10708 ("python-prompt-toolkit" ,python-prompt-toolkit)
10709 ("python-pygments" ,python-pygments)))
10710 (home-page "https://github.com/jonathanslenders/ptpython")
10711 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10713 "ptpython is a Python read-eval-print loop with IDE-like features.
10714 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10715 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10717 (license license:bsd-3)
10718 (properties `((python2-variant . ,(delay ptpython-2))))))
10720 (define-public ptpython-2
10721 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10724 (name "ptpython2"))))
10726 (define-public python-stem
10728 (name "python-stem")
10733 (uri (pypi-uri "stem" version))
10736 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10737 (build-system python-build-system)
10740 (modify-phases %standard-phases
10743 (invoke "./run_tests.py" "--unit")
10746 `(("python-mock" ,python-mock)
10747 ("python-pycodestyle" ,python-pycodestyle)
10748 ("python-pyflakes" ,python-pyflakes)))
10749 (home-page "https://stem.torproject.org/")
10751 "Python controller library that allows applications to interact with Tor")
10753 "Stem is a Python controller library for Tor. With it you can use Tor's
10754 control protocol to script against the Tor process and read descriptor data
10755 relays publish about themselves.")
10756 (license license:lgpl3)))
10758 (define-public python2-stem
10759 (package-with-python2 python-stem))
10761 (define-public python-pyserial
10763 (name "python-pyserial")
10768 (uri (pypi-uri "pyserial" version))
10771 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10772 (build-system python-build-system)
10774 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10776 ;; (modify-phases %standard-phases
10779 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10781 "https://github.com/pyserial/pyserial")
10782 (synopsis "Python Serial Port Bindings")
10783 (description "@code{pyserial} provide serial port bindings for Python. It
10784 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10785 and/or Xon/Xoff. The port is accessed in RAW mode.")
10786 (license license:bsd-3)))
10788 (define-public python2-pyserial
10789 (package-with-python2 python-pyserial))
10791 (define-public python-kivy
10793 (name "python-kivy")
10798 (uri (pypi-uri "Kivy" version))
10799 (file-name (string-append name "-" version ".tar.gz"))
10802 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10803 (build-system python-build-system)
10805 `(#:tests? #f ; Tests require many optional packages
10807 (modify-phases %standard-phases
10808 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10809 (lambda* (#:key inputs #:allow-other-keys)
10810 (setenv "KIVY_SDL2_PATH"
10811 (string-append (assoc-ref inputs "sdl-union")
10816 ("pkg-config" ,pkg-config)
10817 ("python-cython" ,python-cython)))
10819 `(("gstreamer" ,gstreamer)
10822 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10823 (home-page "http://kivy.org")
10825 "Multitouch application framework")
10827 "A software library for rapid development of
10828 hardware-accelerated multitouch applications.")
10829 (license license:expat)))
10831 (define-public python2-kivy
10832 (package-with-python2 python-kivy))
10834 (define-public python-kivy-next
10835 (deprecated-package "python-kivy-next" python-kivy))
10837 (define-public python2-kivy-next
10838 (deprecated-package "python2-kivy-next" python2-kivy))
10840 (define-public python-binaryornot
10842 (name "python-binaryornot")
10846 (uri (pypi-uri "binaryornot" version))
10849 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10850 (build-system python-build-system)
10852 `(("python-chardet" ,python-chardet)
10853 ("python-hypothesis" ,python-hypothesis)))
10854 (home-page "https://github.com/audreyr/binaryornot")
10855 (synopsis "Package to check if a file is binary or text")
10856 (description "Ultra-lightweight pure Python package to check if a file is
10858 (license license:bsd-3)
10859 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10861 (define-public python2-binaryornot
10862 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10863 (package (inherit base)
10865 `(("python2-enum34" ,python2-enum34)
10866 ,@(package-propagated-inputs base))))))
10868 (define-public python-nltk
10870 (name "python-nltk")
10874 (uri (pypi-uri "nltk" version))
10877 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10878 (build-system python-build-system)
10880 '(;; The tests require some extra resources to be downloaded.
10881 ;; TODO Try packaging these resources.
10883 (home-page "http://nltk.org/")
10884 (synopsis "Natural Language Toolkit")
10885 (description "It provides interfaces to over 50 corpora and lexical
10886 resources such as WordNet, along with a suite of text processing libraries
10887 for classification, tokenization, stemming, tagging, parsing, and semantic
10888 reasoning, wrappers for natural language processing libraries.")
10889 (license license:asl2.0)))
10891 (define-public python2-nltk
10892 (package-with-python2 python-nltk))
10894 (define-public python-pymongo
10896 (name "python-pymongo")
10900 (uri (pypi-uri "pymongo" version))
10903 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10904 (build-system python-build-system)
10906 `(("python-certifi" ,python-certifi)))
10907 (home-page "https://github.com/mongodb/mongo-python-driver")
10908 (synopsis "Python driver for MongoDB")
10909 (description "Python driver for MongoDB.")
10910 (license license:asl2.0)))
10912 (define-public python2-pymongo
10913 (package-with-python2 python-pymongo))
10915 (define-public python-consul
10917 (name "python-consul")
10922 (uri (pypi-uri "python-consul" version))
10925 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10926 (build-system python-build-system)
10928 '(#:tests? #f)) ; The tests are not distributed
10930 `(("python-requests" ,python-requests)
10931 ("python-six" ,python-six)))
10932 (home-page "https://github.com/cablehead/python-consul")
10933 (synopsis "Python client for Consul")
10935 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10936 discovery, monitoring and configuration.")
10937 (license license:expat)))
10939 (define-public python2-consul
10940 (package-with-python2 python-consul))
10942 (define-public python-schematics
10944 (name "python-schematics")
10949 (uri (git-reference
10950 (url "https://github.com/schematics/schematics.git")
10951 (commit (string-append "v" version))))
10952 (file-name (git-file-name name version))
10954 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10955 (build-system python-build-system)
10957 `(("python-six" ,python-six)))
10959 ;; The tests require a bunch of not very nice packages with fixed
10960 ;; version requirements (e.g. python-coveralls).
10962 (home-page "https://github.com/schematics/schematics")
10963 (synopsis "Python Data Structures for Humans")
10964 (description "Python Data Structures for Humans.")
10965 (license license:bsd-3)))
10967 (define-public python2-schematics
10968 (package-with-python2 python-schematics))
10970 (define-public python-odfpy
10972 (name "python-odfpy")
10976 (uri (pypi-uri "odfpy" version))
10979 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10981 `(#:modules ((srfi srfi-1)
10982 (guix build python-build-system)
10983 (guix build utils))
10985 (modify-phases %standard-phases
10987 ;; The test runner invokes python2 and python3 for test*.py.
10988 ;; To avoid having both in inputs, we replicate it here.
10990 (for-each (lambda (test-file) (invoke "python" test-file))
10991 (find-files "tests" "^test.*\\.py$"))
10993 (build-system python-build-system)
10994 (home-page "https://github.com/eea/odfpy")
10995 (synopsis "Python API and tools to manipulate OpenDocument files")
10996 (description "Collection of libraries and utility programs written in
10997 Python to manipulate OpenDocument 1.2 files.")
10999 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11000 ;; number of files with other licenses.
11001 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11003 (define-public python2-odfpy
11004 (package-with-python2 python-odfpy))
11006 (define-public python-natsort
11008 (name "python-natsort")
11012 (uri (pypi-uri "natsort" version))
11015 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11016 (build-system python-build-system)
11018 `(#:modules ((guix build utils)
11019 (guix build python-build-system)
11024 (modify-phases %standard-phases
11025 (add-before 'check 'set-cachedir
11026 ;; Tests require write access to $HOME by default
11027 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11030 (let ((cwd (getcwd)))
11031 (setenv "PYTHONPATH"
11034 (find (cut string-prefix? "lib" <>)
11035 (scandir (string-append cwd "/build")))
11037 (getenv "PYTHONPATH")))
11038 (invoke "pytest" "-v")))))))
11040 `(("python-hypothesis" ,python-hypothesis)
11041 ("python-pytest-cov" ,python-pytest-cov)
11042 ("python-pytest-mock" ,python-pytest-mock)
11043 ("python-pytest" ,python-pytest)))
11044 (propagated-inputs ; TODO: Add python-fastnumbers.
11045 `(("python-pyicu" ,python-pyicu)))
11046 (home-page "https://github.com/SethMMorton/natsort")
11047 (synopsis "Natural sorting for python and shell")
11049 "Natsort lets you apply natural sorting on lists instead of
11050 lexicographical. If you use the built-in @code{sorted} method in python
11051 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11052 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11053 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11054 identifies numbers and sorts them separately from strings. It can also sort
11055 version numbers, real numbers, mixed types and more, and comes with a shell
11056 command @command{natsort} that exposes this functionality in the command line.")
11057 (license license:expat)
11058 (properties `((python2-variant . ,(delay python2-natsort))))))
11060 (define-public python2-natsort
11061 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11062 (package (inherit base)
11064 `(("python2-pathlib" ,python2-pathlib)
11065 ,@(package-native-inputs base))))))
11067 (define-public python-glances
11069 (name "python-glances")
11074 (uri (pypi-uri "Glances" version))
11077 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11078 (modules '((guix build utils)))
11081 ;; Glances phones PyPI for weekly update checks by default.
11082 ;; Disable these. The user can re-enable them if desired.
11083 (substitute* "glances/outdated.py"
11084 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11085 (string-append indentation
11086 "self.args.disable_check_update = True\n"
11089 (build-system python-build-system)
11091 `(("python-future" ,python-future)
11092 ("python-psutil" ,python-psutil)))
11094 "https://github.com/nicolargo/glances")
11095 (synopsis "Cross-platform curses-based monitoring tool")
11097 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11098 Glances uses the PsUtil library to get information from your system. It
11099 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11100 (license license:lgpl3+)))
11102 (define-public python2-glances
11103 (package-with-python2 python-glances))
11105 (define-public python-graphql-core
11107 (name "python-graphql-core")
11112 (uri (pypi-uri "graphql-core" version))
11115 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11116 (build-system python-build-system)
11118 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11120 (modify-phases %standard-phases
11121 (add-after 'unpack 'patch-hardcoded-version
11122 (lambda _ (substitute*
11124 (("'gevent==1.1rc1'") "'gevent'"))
11127 `(("python-gevent" ,python-gevent)
11128 ("python-mock" ,python-mock)
11129 ("python-pytest-mock" ,python-pytest-mock)))
11131 `(("python-promise" ,python-promise)
11132 ("python-six" ,python-six)))
11133 (home-page "https://github.com/graphql-python/graphql-core")
11134 (synopsis "GraphQL implementation for Python")
11136 "GraphQL implementation for Python. GraphQL is a data query language and
11137 runtime designed and used to request and deliver data to mobile and web apps.
11138 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11140 (license license:expat)))
11142 (define-public python2-graphql-core
11143 (package-with-python2 python-graphql-core))
11145 (define-public python-graphql-relay
11147 (name "python-graphql-relay")
11152 (uri (pypi-uri "graphql-relay" version))
11155 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11156 (build-system python-build-system)
11158 '(#:tests? #f)) ; The tests are not distributed
11160 `(("python-graphql-core" ,python-graphql-core)
11161 ("python-promise" ,python-promise)
11162 ("python-six" ,python-six)))
11163 (home-page "https://github.com/graphql-python/graphql-relay-py")
11164 (synopsis "Relay implementation for Python")
11166 "This is a library to allow the easy creation of Relay-compliant servers
11167 using the GraphQL Python reference implementation of a GraphQL server. It
11168 should be noted that the code is a exact port of the original
11169 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11171 (license license:expat)))
11173 (define-public python2-graphql-relay
11174 (package-with-python2 python-graphql-relay))
11176 (define-public python-graphene
11178 (name "python-graphene")
11183 (uri (pypi-uri "graphene" version))
11186 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11187 (build-system python-build-system)
11189 `(("python-graphql-core" ,python-graphql-core)
11190 ("python-graphql-relay" ,python-graphql-relay)
11191 ("python-iso8601" ,python-iso8601)
11192 ("python-promise" ,python-promise)
11193 ("python-six" ,python-six)))
11195 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11196 (home-page "http://graphene-python.org/")
11197 (synopsis "GraphQL Framework for Python")
11199 "Graphene is a Python library for building GraphQL schemas/types.
11200 A GraphQL schema describes your data model, and provides a GraphQL server
11201 with an associated set of resolve methods that know how to fetch data.")
11202 (properties `((python2-variant . ,(delay python2-graphene))))
11203 (license license:expat)))
11205 (define-public python2-graphene
11206 (let ((base (package-with-python2
11207 (strip-python2-variant python-graphene))))
11208 (package (inherit base)
11210 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11211 ,@(package-native-inputs base))))))
11213 (define-public python-nautilus
11215 (name "python-nautilus")
11220 (uri (pypi-uri "nautilus" version))
11223 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11224 (build-system python-build-system)
11225 (arguments `(#:tests? #f)) ; fails to import test modules
11227 `(("python-bcrypt" ,python-bcrypt)
11228 ("python-click" ,python-click)
11229 ("python-consul" ,python-consul)
11230 ("python-graphene" ,python-graphene)
11231 ("python-jinja2" ,python-jinja2)
11232 ("python-peewee" ,python-peewee)
11233 ("python-pika" ,python-pika)
11234 ("python-tornado" ,python-tornado)
11235 ("python-wtforms" ,python-wtforms)))
11237 `(("python-nose2" ,python-nose2)))
11238 (home-page "https://github.com/AlecAivazis/nautilus")
11239 (synopsis "Library for creating microservice applications")
11241 "Nautilus is a framework for flux based microservices that looks to
11242 provide extendible implementations of common aspects of a cloud so that you can
11243 focus on building massively scalable web applications.")
11244 (license license:expat)))
11246 (define-public python-snowballstemmer
11248 (name "python-snowballstemmer")
11252 (uri (pypi-uri "snowballstemmer" version))
11255 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11256 (build-system python-build-system)
11258 `(;; No tests exist
11260 (home-page "https://github.com/shibukawa/snowball_py")
11261 (synopsis "Snowball stemming library collection for Python")
11262 (description "This package provides 16 word stemmer algorithms generated
11263 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11265 (license license:bsd-3)))
11267 (define-public python2-snowballstemmer
11268 (package-with-python2 python-snowballstemmer))
11270 (define-public python-setproctitle
11272 (name "python-setproctitle")
11277 (uri (pypi-uri "setproctitle" version))
11280 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11281 (build-system python-build-system)
11284 (modify-phases %standard-phases
11285 (add-before 'check 'patch-Makefile
11286 ;; Stricly this is only required for the python2 variant.
11287 ;; But adding a phase in an inherited package seems to be
11288 ;; cumbersum. So we patch even for python3.
11290 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11292 (substitute* "Makefile"
11293 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11294 (string-append nose "/bin/nosetests "))))
11298 (setenv "PYTHON" (or (which "python3") (which "python")))
11299 (setenv "PYCONFIG" (or (which "python3-config")
11300 (which "python-config")))
11301 (setenv "CC" "gcc")
11302 ;; No need to extend PYTHONPATH to find the built package, since
11303 ;; the Makefile will build anyway
11304 (invoke "make" "check"))))))
11306 `(("procps" ,procps))) ; required for tests
11308 "https://github.com/dvarrazzo/py-setproctitle")
11310 "Setproctitle implementation for Python to customize the process title")
11311 (description "The library allows a process to change its title (as displayed
11312 by system tools such as ps and top).
11314 Changing the title is mostly useful in multi-process systems, for
11315 example when a master process is forked: changing the children's title
11316 allows to identify the task each process is busy with. The technique
11317 is used by PostgreSQL and the OpenSSH Server for example.")
11318 (license license:bsd-3)
11319 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11321 (define-public python2-setproctitle
11322 (let ((base (package-with-python2
11323 (strip-python2-variant python-setproctitle))))
11326 (native-inputs `(("python2-nose" ,python2-nose)
11327 ,@(package-native-inputs base))))))
11329 (define-public python-validictory
11331 (name "python-validictory")
11336 (uri (pypi-uri "validictory" version))
11339 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11340 (build-system python-build-system)
11343 (modify-phases %standard-phases
11344 (add-after 'unpack 'bootstrap
11345 ;; Move the tests out of the package directory to avoid
11348 (rename-file "validictory/tests" "tests")
11349 (delete-file "tests/__init__.py")))
11352 ;; Extend PYTHONPATH so the built package will be found.
11353 (setenv "PYTHONPATH"
11354 (string-append (getcwd) "/build/lib:"
11355 (getenv "PYTHONPATH")))
11356 (invoke "py.test" "-vv" ))))))
11358 `(("python-pytest" ,python-pytest)))
11360 "https://github.com/jamesturk/validictory")
11361 (synopsis "General purpose Python data validator")
11362 (description "It allows validation of arbitrary Python data structures.
11364 The schema format is based on the JSON Schema
11365 proposal (http://json-schema.org), so combined with json the library is also
11366 useful as a validator for JSON data.")
11367 (license license:expat)))
11369 (define-public python2-validictory
11370 (package-with-python2 python-validictory))
11372 (define-public python-pyelftools
11374 (name "python-pyelftools")
11379 (uri (pypi-uri "pyelftools" version))
11382 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11383 (build-system python-build-system)
11386 (modify-phases %standard-phases
11387 (add-before 'check 'set-pythonpath
11389 (setenv "PYTHONPATH"
11392 ":" (getenv "PYTHONPATH")))
11395 "https://github.com/eliben/pyelftools")
11397 "Analyze binary and library file information")
11398 (description "This Python library provides interfaces for parsing and
11399 analyzing two binary and library file formats; the Executable and Linking
11400 Format (ELF), and debugging information in the Debugging With Attributed
11401 Record Format (DWARF).")
11402 (license license:public-domain)))
11404 (define-public python-pyev
11406 (name "python-pyev")
11411 (uri (pypi-uri "pyev" version))
11414 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11415 (build-system python-build-system)
11417 `(#:tests? #f ; no test suite
11419 (modify-phases %standard-phases
11420 (add-after 'unpack 'patch
11421 (lambda* (#:key inputs #:allow-other-keys)
11422 (let ((libev (string-append (assoc-ref inputs "libev")
11423 "/lib/libev.so.4")))
11424 (substitute* "setup.py"
11425 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11426 (string-append "libev_dll_name = \"" libev "\"")))))))))
11428 `(("libev" ,libev)))
11429 (home-page "http://pythonhosted.org/pyev/")
11430 (synopsis "Python libev interface")
11431 (description "Pyev provides a Python interface to libev.")
11432 (license license:gpl3)))
11434 (define-public python2-pyev
11435 (package-with-python2 python-pyev))
11437 (define-public python-imagesize
11439 (name "python-imagesize")
11444 (uri (pypi-uri "imagesize" version))
11447 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11448 (build-system python-build-system)
11449 (home-page "https://github.com/shibukawa/imagesize_py")
11450 (synopsis "Gets image size of files in various formats in Python")
11452 "This package allows determination of image size from
11453 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11454 (license license:expat)))
11456 (define-public python2-imagesize
11457 (package-with-python2 python-imagesize))
11459 (define-public python-termstyle
11461 (name "python-termstyle")
11466 (uri (pypi-uri "termstyle" version))
11469 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11470 (build-system python-build-system)
11473 (modify-phases %standard-phases
11476 (invoke "python" "test3.py"))))))
11477 (home-page "https://github.com/gfxmonk/termstyle")
11478 (synopsis "Console text coloring for Python")
11479 (description "This package provides console text coloring for Python.")
11480 (license license:bsd-3)))
11482 (define-public python-argcomplete
11484 (name "python-argcomplete")
11489 (uri (pypi-uri "argcomplete" version))
11492 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11493 (build-system python-build-system)
11495 `(("python-pexpect" ,python-pexpect)
11497 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11498 (home-page "https://github.com/kislyuk/argcomplete")
11499 (synopsis "Shell tab completion for Python argparse")
11500 (description "argcomplete provides extensible command line tab completion
11501 of arguments and options for Python scripts using @code{argparse}. It's
11502 particularly useful for programs with many options or sub-parsers that can
11503 dynamically suggest completions; for example, when browsing resources over the
11505 (license license:asl2.0)))
11507 (define-public python2-argcomplete
11508 (package-with-python2 python-argcomplete))
11510 (define-public python-xopen
11512 (name "python-xopen")
11517 (uri (pypi-uri "xopen" version))
11520 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11521 (build-system python-build-system)
11523 `(("python-setuptools-scm" ,python-setuptools-scm)))
11524 (home-page "https://github.com/marcelm/xopen/")
11525 (synopsis "Open compressed files transparently")
11526 (description "This module provides an @code{xopen} function that works like
11527 Python's built-in @code{open} function, but can also deal with compressed files.
11528 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11529 recognized by their file extensions. The focus is on being as efficient as
11530 possible on all supported Python versions.")
11531 (license license:expat)))
11533 (define-public python2-xopen
11534 (let ((base (package-with-python2
11535 (strip-python2-variant python-xopen))))
11538 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11539 ,@(package-propagated-inputs base))))))
11541 (define-public python-cheetah
11543 (name "python-cheetah")
11548 (uri (pypi-uri "Cheetah3" version))
11551 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11552 (build-system python-build-system)
11554 `(#:modules ((guix build utils)
11555 (guix build python-build-system)
11559 #:phases (modify-phases %standard-phases
11560 (add-after 'unpack 'use-absolute-python
11562 (substitute* "Cheetah/CheetahWrapper.py"
11563 (("#!/usr/bin/env python")
11564 (string-append "#!" (which "python"))))
11568 (let ((cwd (getcwd)))
11569 (setenv "PYTHONPATH"
11572 (find (cut string-prefix? "lib" <>)
11573 (scandir (string-append cwd "/build")))
11574 ":" (getenv "PYTHONPATH")))
11576 (string-append (getenv "PATH")
11578 (setenv "TMPDIR" "/tmp")
11580 (substitute* "Cheetah/Tests/Test.py"
11581 (("unittest.TextTestRunner\\(\\)")
11582 "unittest.TextTestRunner(verbosity=2)"))
11584 (invoke "python" "Cheetah/Tests/Test.py")))))))
11586 `(("python-markdown" ,python-markdown))) ;optional
11587 (home-page "http://cheetahtemplate.org/")
11588 (synopsis "Template engine")
11589 (description "Cheetah is a text-based template engine and Python code
11592 Cheetah can be used as a standalone templating utility or referenced as
11593 a library from other Python applications. It has many potential uses,
11594 but web developers looking for a viable alternative to ASP, JSP, PHP and
11595 PSP are expected to be its principle user group.
11599 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11601 @item Cleanly separates content, graphic design, and program code.
11602 @item Blends the power and flexibility of Python with a simple template language
11603 that non-programmers can understand.
11604 @item Gives template writers full access to any Python data structure, module,
11605 function, object, or method in their templates.
11606 @item Makes code reuse easy by providing an object-orientated interface to
11607 templates that is accessible from Python code or other Cheetah templates.
11608 One template can subclass another and selectively reimplement sections of it.
11609 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11610 improve the performance of a dynamic website.
11611 @item Compiles templates into optimized, yet readable, Python code.
11613 (license (license:x11-style "file://LICENSE"))))
11615 (define-public python2-cheetah
11616 (package-with-python2 python-cheetah))
11618 (define-public python-dulwich
11620 (name "python-dulwich")
11625 (uri (list (string-append "https://www.dulwich.io/releases/"
11626 "dulwich-" version ".tar.gz")
11627 (pypi-uri "dulwich" version)))
11630 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11631 (build-system python-build-system)
11634 (modify-phases %standard-phases
11635 (add-before 'check 'fix-tests
11636 (lambda* (#:key inputs #:allow-other-keys)
11637 ;; The tests use Popen with a custom environment which doesn't
11639 (substitute* "dulwich/tests/compat/utils.py"
11640 (("'git'") (string-append "'"
11643 (substitute* '("dulwich/tests/test_repository.py"
11644 "dulwich/tests/test_hooks.py")
11645 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11646 (setenv "TEST_RUNNER" "unittest")
11647 (setenv "PYTHONHASHSEED" "random")
11650 `(("python-fastimport" ,python-fastimport)))
11652 `(("python-mock" ,python-mock)
11653 ("python-geventhttpclient" ,python-geventhttpclient)
11655 (home-page "https://www.dulwich.io/")
11656 (synopsis "Git implementation in Python")
11657 (description "Dulwich is an implementation of the Git file formats and
11658 protocols written in pure Python.")
11659 ;; Can be used with either license.
11660 (license (list license:asl2.0 license:gpl2+))))
11662 (define-public python2-dulwich
11663 (package-with-python2 python-dulwich))
11665 (define-public python-pbkdf2
11667 (name "python-pbkdf2")
11672 (uri (pypi-uri "pbkdf2" version))
11675 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11676 (build-system python-build-system)
11679 (modify-phases %standard-phases
11682 (setenv "PYTHONPATH"
11683 (string-append (getcwd) "/build/lib:"
11684 (getenv "PYTHONPATH")))
11685 (invoke "python" "test/test_pbkdf2.py"))))))
11687 `(("python-pycrypto" ,python-pycrypto))) ; optional
11688 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11689 (synopsis "Password-based key derivation")
11690 (description "This module implements the password-based key derivation
11691 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11693 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11694 is part of the RSA Public Key Cryptography Standards series. The provided
11695 implementation takes a password or a passphrase and a salt value (and
11696 optionally a iteration count, a digest module, and a MAC module) and provides
11697 a file-like object from which an arbitrarly-sized key can be read.")
11698 (license license:expat)))
11700 (define-public python2-pbkdf2
11701 (package-with-python2 python-pbkdf2))
11703 (define-public python-qrcode
11705 (name "python-qrcode")
11710 (uri (pypi-uri "qrcode" version))
11712 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11713 (build-system python-build-system)
11715 ;; FIXME: Tests require packaging 'pymaging'.
11718 `(("python-lxml" ,python-lxml) ; for SVG output
11719 ("python-pillow" ,python-pillow) ; for PNG output
11720 ("python-six" ,python-six)))
11721 (home-page "https://github.com/lincolnloop/python-qrcode")
11722 (synopsis "QR Code image generator")
11723 (description "This package provides a pure Python QR Code generator
11724 module. It uses the Python Imaging Library (PIL) to allow for the generation
11727 In addition this package provides a command line tool to generate QR codes and
11728 either write these QR codes to a file or do the output as ascii art at the
11730 (license license:bsd-3)))
11732 (define-public python2-qrcode
11733 (package-with-python2 python-qrcode))
11735 (define-public python-rst2ansi
11737 (name "python-rst2ansi")
11742 (uri (pypi-uri "rst2ansi" version))
11745 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11746 (build-system python-build-system)
11748 `(("python-docutils" ,python-docutils)))
11749 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11750 (synopsis "Convert RST to ANSI-decorated console output")
11752 "Python module dedicated to rendering RST (reStructuredText) documents
11753 to ansi-escaped strings suitable for display in a terminal.")
11754 (license license:expat)))
11756 (define-public python-ansi2html
11758 (name "python-ansi2html")
11763 (uri (pypi-uri "ansi2html" version))
11766 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11767 (build-system python-build-system)
11769 `(("python-mock" ,python-mock)
11770 ("python-nose" ,python-nose)))
11772 `(("python-six" ,python-six)))
11773 (home-page "https://github.com/ralphbean/ansi2html")
11774 (synopsis "Convert ANSI-decorated console output to HTML")
11776 "@command{ansi2html} is a Python library and command line utility for
11777 convering text with ANSI color codes to HTML or LaTeX.")
11778 (license license:gpl3+)))
11780 (define-public python2-ansi2html
11781 (package-with-python2 python-ansi2html))
11783 (define-public python-ddt
11785 (name "python-ddt")
11790 (uri (pypi-uri "ddt" version))
11793 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11794 (build-system python-build-system)
11796 `(("python-mock" ,python-mock)
11797 ("python-nose" ,python-nose)))
11799 `(("python-six" ,python-six)
11800 ("python-pyyaml" ,python-pyyaml)))
11801 (home-page "https://github.com/txels/ddt")
11802 (synopsis "Data-Driven Tests")
11804 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11805 running it with different test data, and make it appear as multiple test
11807 (license license:expat)))
11809 (define-public python2-ddt
11810 (package-with-python2 python-ddt))
11812 (define-public python-pycountry
11814 (name "python-pycountry")
11815 (version "18.5.26")
11819 (uri (pypi-uri "pycountry" version))
11822 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11823 (build-system python-build-system)
11824 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11825 (synopsis "ISO databases for languages, countries, currencies, etc.")
11827 "@code{pycountry} provides the ISO databases for the standards:
11829 @item 639-3 (Languages)
11830 @item 3166 (Countries)
11831 @item 3166-3 (Deleted Countries)
11832 @item 3166-2 (Subdivisions of countries)
11833 @item 4217 (Currencies)
11834 @item 15924 (Scripts)
11836 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11837 through a Python API.")
11838 (license license:lgpl2.1+)))
11840 (define-public python2-pycountry
11841 (package-with-python2 python-pycountry))
11843 (define-public python-pycosat
11845 (name "python-pycosat")
11850 (uri (pypi-uri "pycosat" version))
11853 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11854 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11855 (build-system python-build-system)
11856 (home-page "https://github.com/ContinuumIO/pycosat")
11857 (synopsis "Bindings to picosat (a SAT solver)")
11859 "This package provides efficient Python bindings to @code{picosat} on
11860 the C level. When importing pycosat, the @code{picosat} solver becomes part
11861 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11862 Problem} (SAT) solver.")
11863 (license license:expat)))
11865 (define-public python2-pycosat
11866 (package-with-python2 python-pycosat))
11868 (define-public python2-ruamel.ordereddict
11870 (name "python2-ruamel.ordereddict")
11875 (uri (pypi-uri "ruamel.ordereddict" version))
11878 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11879 (build-system python-build-system)
11881 `(#:python ,python-2
11883 (modify-phases %standard-phases
11885 (add-after 'install 'check
11886 (lambda* (#:key inputs outputs #:allow-other-keys)
11887 (add-installed-pythonpath inputs outputs)
11888 (invoke "python" "test/testordereddict.py"))))))
11889 (home-page "https://bitbucket.org/ruamel/ordereddict")
11890 (synopsis "Version of dict that keeps keys in insertion order")
11892 "This is an implementation of an ordered dictionary with @dfn{Key
11893 Insertion Order} (KIO: updates of values do not affect the position of the
11894 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11895 removed and put at the back). The standard library module @code{OrderedDict},
11896 implemented later, implements a subset of @code{ordereddict} functionality.
11897 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11898 Order} (KSO, no sorting function can be specified, but a transform can be
11899 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11900 (license license:expat)))
11902 (define-public python-pypeg2
11904 (name "python-pypeg2")
11909 (uri (pypi-uri "pyPEG2" version))
11912 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11913 (build-system python-build-system)
11914 (propagated-inputs `(("python-lxml" ,python-lxml)))
11916 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11918 (home-page "https://fdik.org/pyPEG/")
11919 (synopsis "Parsering Expression Grammars in Python")
11920 (description "PyPEG is an intrinsic parser interpreter framework for
11921 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11922 parse many formal languages.")
11923 (license license:gpl2)))
11925 (define-public python-incremental
11927 (name "python-incremental")
11932 (uri (pypi-uri "incremental" version))
11935 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11936 (build-system python-build-system)
11937 (home-page "https://github.com/hawkowl/incremental")
11938 (synopsis "Library for versioning Python projects")
11939 (description "Incremental is a small library that versions your Python
11941 (license license:expat)))
11943 (define-public python2-incremental
11944 (package-with-python2 python-incremental))
11946 (define-public python-invoke
11948 (name "python-invoke")
11949 (home-page "http://www.pyinvoke.org/")
11953 (uri (pypi-uri "invoke" version))
11956 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11957 (build-system python-build-system)
11959 ;; XXX: Requires many dependencies that are not yet in Guix.
11961 (synopsis "Pythonic task execution")
11963 "Invoke is a Python task execution tool and library, drawing inspiration
11964 from various sources to arrive at a powerful and clean feature set. It is
11965 evolved from the Fabric project, but focuses on local and abstract concerns
11966 instead of servers and network commands.")
11967 (license license:bsd-3)))
11969 (define-public python2-invoke
11970 (package-with-python2 python-invoke))
11972 (define-public python-automat
11974 (name "python-automat")
11978 (uri (pypi-uri "Automat" version))
11981 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11982 (build-system python-build-system)
11983 ;; We disable the tests because they require python-twisted, while
11984 ;; python-twisted depends on python-automat. Twisted is optional, but the
11985 ;; tests fail if it is not available. Also see
11986 ;; <https://github.com/glyph/automat/issues/71>.
11987 (arguments '(#:tests? #f))
11989 `(("python-m2r" ,python-m2r)
11990 ("python-setuptools-scm" ,python-setuptools-scm)
11991 ("python-graphviz" ,python-graphviz)))
11993 `(("python-six" ,python-six)
11994 ("python-attrs" ,python-attrs)))
11995 (home-page "https://github.com/glyph/Automat")
11996 (synopsis "Self-service finite-state machines")
11997 (description "Automat is a library for concise, idiomatic Python
11998 expression of finite-state automata (particularly deterministic finite-state
12000 (license license:expat)))
12002 (define-public python2-automat
12003 (package-with-python2 python-automat))
12005 (define-public python-m2r
12007 (name "python-m2r")
12011 (uri (pypi-uri "m2r" version))
12014 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12015 (build-system python-build-system)
12017 `(("python-docutils" ,python-docutils)
12018 ("python-mistune" ,python-mistune)))
12020 `(("python-pygments" ,python-pygments)
12021 ("python-mock" ,python-mock)))
12022 (home-page "https://github.com/miyakogi/m2r")
12023 (synopsis "Markdown to reStructuredText converter")
12024 (description "M2R converts a markdown file including reST markups to valid
12026 (license license:expat)))
12028 (define-public python2-m2r
12029 (package-with-python2 python-m2r))
12031 (define-public python-constantly
12033 (name "python-constantly")
12037 (uri (pypi-uri "constantly" version))
12040 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12041 (build-system python-build-system)
12042 (home-page "https://github.com/twisted/constantly")
12043 (synopsis "Symbolic constants in Python")
12044 (description "Constantly is a Python library that provides symbolic
12045 constant support. It includes collections and constants with text, numeric,
12046 and bit flag values.")
12047 (license license:expat)))
12049 (define-public python2-constantly
12050 (package-with-python2 python-constantly))
12052 (define-public python-attrs
12054 (name "python-attrs")
12058 (uri (pypi-uri "attrs" version))
12061 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12062 (build-system python-build-system)
12064 `(#:modules ((guix build utils)
12065 (guix build python-build-system)
12069 #:phases (modify-phases %standard-phases
12072 (let ((cwd (getcwd)))
12073 (setenv "PYTHONPATH"
12076 (find (cut string-prefix? "lib" <>)
12077 (scandir (string-append cwd "/build")))
12079 (getenv "PYTHONPATH")))
12080 (invoke "python" "-m" "pytest")))))))
12082 `(("python-coverage" ,python-coverage)
12083 ("python-hypothesis" ,python-hypothesis)
12084 ("python-pympler" ,python-pympler)
12085 ("python-pytest" ,python-pytest)
12086 ("python-six" ,python-six)
12087 ("python-sphinx" ,python-sphinx)
12088 ("python-zope-interface" ,python-zope-interface)))
12089 (home-page "https://github.com/python-attrs/attrs/")
12090 (synopsis "Attributes without boilerplate")
12091 (description "@code{attrs} is a Python package with class decorators that
12092 ease the chores of implementing the most common attribute-related object
12094 (license license:expat)))
12096 (define-public python2-attrs
12097 (package-with-python2 python-attrs))
12099 (define-public python-attrs-bootstrap
12101 (inherit python-attrs)
12102 (name "python-attrs-bootstrap")
12103 (native-inputs `())
12104 (arguments `(#:tests? #f))))
12106 (define-public python2-attrs-bootstrap
12107 (package-with-python2 python-attrs-bootstrap))
12109 (define-public python2-cliapp
12111 (name "python2-cliapp")
12112 (version "1.20180812.1")
12116 (uri (string-append
12117 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12118 version ".tar.gz"))
12121 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12122 (build-system python-build-system)
12124 `(#:python ,python-2
12126 (modify-phases %standard-phases
12127 ;; check phase needs to be run before the build phase. If not,
12128 ;; coverage-test-runner looks for tests for the built source files,
12131 (add-before 'build 'check
12133 ;; Disable python3 tests
12134 (substitute* "check"
12135 (("python3") "# python3"))
12136 (invoke "./check"))))))
12138 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12139 ("python2-pep8" ,python2-pep8)))
12141 `(("python2-pyaml" ,python2-pyaml)))
12142 (home-page "https://liw.fi/cliapp/")
12143 (synopsis "Python framework for command line programs")
12144 (description "@code{python2-cliapp} is a python framework for
12145 command line programs. It contains the typical stuff such programs
12146 need to do, such as parsing the command line for options, and
12147 iterating over input files.")
12148 (license license:gpl2+)))
12150 (define-public python2-ttystatus
12152 (name "python2-ttystatus")
12157 (uri (string-append
12158 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12159 version ".tar.gz"))
12162 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12163 (build-system python-build-system)
12165 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12166 ("python2-pep8" ,python2-pep8)))
12168 `(#:python ,python-2
12170 (modify-phases %standard-phases
12171 ;; check phase needs to be run before the build phase. If not,
12172 ;; coverage-test-runner looks for tests for the built source files,
12175 (add-before 'build 'check
12176 (lambda _ (invoke "make" "check"))))))
12177 (home-page "https://liw.fi/ttystatus/")
12178 (synopsis "Python library for showing progress reporting and
12179 status updates on terminals")
12180 (description "@code{python2-ttystatus} is a python library for
12181 showing progress reporting and status updates on terminals, for
12182 command line programs. Output is automatically adapted to the width
12183 of the terminal: truncated if it does not fit, and resized if the
12184 terminal size changes.")
12185 (license license:gpl3+)))
12187 (define-public python2-tracing
12189 (name "python2-tracing")
12194 (uri (string-append
12195 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12196 version ".tar.gz"))
12199 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12200 (build-system python-build-system)
12202 `(#:python ,python-2))
12203 (home-page "https://liw.fi/tracing/")
12204 (synopsis "Python debug logging helper")
12205 (description "@code{python2-tracing} is a python library for
12206 logging debug messages. It provides a way to turn debugging messages
12207 on and off, based on the filename they occur in. It is much faster
12208 than using @code{logging.Filter} to accomplish the same thing, which
12209 matters when code is run in production mode. The actual logging still
12210 happens using the @code{logging} library.")
12211 (license license:gpl3+)))
12213 (define-public python2-larch
12215 (name "python2-larch")
12216 (version "1.20151025")
12220 (uri (string-append
12221 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12222 version ".tar.gz"))
12223 (patches (search-patches
12224 "python2-larch-coverage-4.0a6-compatibility.patch"))
12227 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12228 (build-system python-build-system)
12230 `(#:python ,python-2
12232 (modify-phases %standard-phases
12233 ;; check phase needs to be run before the build phase. If not,
12234 ;; coverage-test-runner looks for tests for the built source files,
12237 (add-before 'build 'check
12238 (lambda _ (invoke "make" "check"))))))
12240 `(("cmdtest" ,cmdtest)
12241 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12243 `(("python2-tracing" ,python2-tracing)))
12244 (home-page "https://liw.fi/larch/")
12245 (synopsis "Python copy-on-write B-tree library")
12246 (description "@code{python2-larch} is an implementation of
12247 particular kind of B-tree, based on research by Ohad Rodeh. See
12248 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12249 on the data structure.
12251 The distinctive feature of this B-tree is that a node is never
12252 (conceptually) modified. Instead, all updates are done by
12253 copy-on-write. This makes it easy to clone a tree, and modify only the
12254 clone, while other processes access the original tree.")
12255 (license license:gpl3+)))
12257 (define-public python-astroid
12259 (name "python-astroid")
12264 (uri (pypi-uri "astroid" version))
12267 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12268 (build-system python-build-system)
12270 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12271 ("python-six" ,python-six)
12272 ("python-wrapt" ,python-wrapt)))
12274 `(("python-dateutil" ,python-dateutil)
12275 ("python-nose" ,python-nose)
12276 ("python-pytest" ,python-pytest)
12277 ("python-pytest-runner" ,python-pytest-runner)))
12280 (modify-phases %standard-phases
12281 (add-after 'unpack 'remove-spurious-test
12283 ;; This can be removed after upgrading from python-3.7
12284 ;; https://github.com/PyCQA/astroid/issues/593
12285 ;; https://bugs.python.org/issue34056
12286 (delete-file "astroid/tests/unittest_modutils.py")
12290 (invoke "pytest" "astroid"))))))
12291 (home-page "https://github.com/PyCQA/astroid")
12292 (synopsis "Common base representation of python source code for pylint and
12294 (description "@code{python-astroid} provides a common base representation
12295 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12297 It provides a compatible representation which comes from the _ast module. It
12298 rebuilds the tree generated by the builtin _ast module by recursively walking
12299 down the AST and building an extended ast. The new node classes have
12300 additional methods and attributes for different usages. They include some
12301 support for static inference and local name scopes. Furthermore, astroid
12302 builds partial trees by inspecting living objects.")
12303 (license license:lgpl2.1+)
12304 (properties `((python2-variant . ,(delay python2-astroid))))))
12306 (define-public python2-astroid
12307 (let ((base (package-with-python2
12308 (strip-python2-variant python-astroid))))
12309 (package (inherit base)
12310 ;; Version 2.x removes python2 support.
12315 (uri (pypi-uri "astroid" version))
12318 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12320 (substitute-keyword-arguments (package-arguments base)
12322 `(modify-phases ,phases
12323 (add-after 'unpack 'remove-spurious-test
12325 ;; https://github.com/PyCQA/astroid/issues/276
12326 (delete-file "astroid/tests/unittest_brain.py")
12330 (invoke"python" "-m" "unittest" "discover"
12331 "-p" "unittest*.py")))))))
12332 (native-inputs `())
12334 `(("python2-backports-functools-lru-cache"
12335 ,python2-backports-functools-lru-cache)
12336 ("python2-enum34" ,python2-enum34)
12337 ("python2-singledispatch" ,python2-singledispatch)
12338 ,@(package-propagated-inputs base))))))
12340 (define-public python-isort
12342 (name "python-isort")
12347 (uri (git-reference
12348 ;; Tests pass only from the Github sources
12349 (url "https://github.com/timothycrosley/isort")
12351 (file-name (git-file-name name version))
12354 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12355 (build-system python-build-system)
12357 `(("python-mock" ,python-mock)
12358 ("python-pytest" ,python-pytest)))
12359 (home-page "https://github.com/timothycrosley/isort")
12360 (synopsis "Python utility/library to sort python imports")
12361 (description "@code{python-isort} is a python utility/library to sort
12362 imports alphabetically, and automatically separated into sections. It
12363 provides a command line utility, a python library and plugins for various
12365 (license license:expat)
12366 (properties `((python2-variant . ,(delay python2-isort))))))
12368 (define-public python2-isort
12369 (let ((base (package-with-python2
12370 (strip-python2-variant python-isort))))
12371 (package (inherit base)
12373 `(("python2-futures" ,python2-futures)
12374 ,@(package-native-inputs base))))))
12376 (define-public python2-backports-functools-lru-cache
12378 (name "python2-backports-functools-lru-cache")
12383 ;; only the pypi tarballs contain the necessary metadata
12384 (uri (pypi-uri "backports.functools_lru_cache" version))
12387 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12388 (build-system python-build-system)
12390 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12392 `(#:python ,python-2))
12393 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12394 (synopsis "Backport of functools.lru_cache from Python 3.3")
12395 (description "@code{python2-backports-functools-lru-cache} is a backport
12396 of @code{functools.lru_cache} from python 3.3.")
12397 (license license:expat)))
12399 (define-public python-configparser
12401 (name "python-configparser")
12406 (uri (pypi-uri "configparser" version))
12409 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12410 (build-system python-build-system)
12411 (home-page "https://github.com/jaraco/configparser/")
12412 (synopsis "Backport of configparser from python 3.5")
12413 (description "@code{python-configparser} is a backport of
12414 @code{configparser} from Python 3.5 so that it can be used directly
12415 in other versions.")
12416 (license license:expat)))
12418 (define-public python2-configparser
12419 (package-with-python2 python-configparser))
12421 (define-public python-mando
12423 (name "python-mando")
12427 (uri (pypi-uri "mando" version))
12430 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12431 (build-system python-build-system)
12433 `(("python-rst2ansi" ,python-rst2ansi)
12434 ("python-six" ,python-six)))
12436 `(("python-pytest" ,python-pytest)))
12437 (home-page "https://mando.readthedocs.org/")
12439 "Wrapper around argparse, allowing creation of complete CLI applications")
12441 "This package is a wrapper around argparse, allowing you to write complete CLI
12442 applications in seconds while maintaining all the flexibility.")
12443 (license license:expat)))
12445 (define-public python2-mando
12446 (package-with-python2 python-mando))
12448 (define-public python2-argparse
12450 (name "python2-argparse")
12455 (uri (pypi-uri "argparse" version))
12458 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12459 (build-system python-build-system)
12461 `(#:python ,python-2))
12462 (home-page "https://github.com/ThomasWaldmann/argparse/")
12463 (synopsis "Python command-line parsing library")
12465 "This package is mostly for people who want to have @code{argparse} on
12466 older Pythons because it was not part of the standard library back then.")
12467 (license license:psfl)))
12469 (define-public python-fudge
12471 (name "python-fudge")
12472 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12473 ;; package, which is currently the only use of this package.
12478 (uri (pypi-uri "fudge" version))
12481 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12482 (build-system python-build-system)
12484 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12485 (home-page "https://github.com/fudge-py/fudge")
12486 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12488 "Fudge is a Python module for using fake objects (mocks and stubs) to
12491 In readable Python code, you declare the methods available on your fake object
12492 and how they should be called. Then you inject that into your application and
12493 start testing. This declarative approach means you don’t have to record and
12494 playback actions and you don’t have to inspect your fakes after running code.
12495 If the fake object was used incorrectly then you’ll see an informative
12496 exception message with a traceback that points to the culprit.")
12497 (license license:expat)))
12499 (define-public python2-fudge
12500 (package-with-python2 python-fudge))
12502 (define-public python-mwclient
12504 (name "python-mwclient")
12509 ;; The PyPI version wouldn't contain tests.
12510 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12511 "v" version ".tar.gz"))
12512 (file-name (string-append name "-" version ".tar.gz"))
12515 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12516 (build-system python-build-system)
12518 `(("python-requests" ,python-requests)
12519 ("python-requests-oauthlib"
12520 ,python-requests-oauthlib)
12521 ("python-six" ,python-six)))
12523 `(("python-mock" ,python-mock)
12524 ("python-pytest" ,python-pytest)
12525 ("python-pytest-pep8" ,python-pytest-pep8)
12526 ("python-pytest-cache" ,python-pytest-cache)
12527 ("python-pytest-cov" ,python-pytest-cov)
12528 ("python-responses" ,python-responses)))
12529 (home-page "https://github.com/btongminh/mwclient")
12530 (synopsis "MediaWiki API client")
12531 (description "This package provides a MediaWiki API client.")
12532 (license license:expat)))
12534 (define-public python2-mwclient
12535 (package-with-python2 python-mwclient))
12537 (define-public python-utils
12539 (name "python-utils")
12543 (uri (pypi-uri "python-utils" version))
12546 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12547 (build-system python-build-system)
12549 `(("pytest-runner" ,python-pytest-runner)
12550 ("pytest" ,python-pytest)
12551 ("six" ,python-six)))
12552 (home-page "https://github.com/WoLpH/python-utils")
12553 (synopsis "Convenient utilities not included with the standard Python install")
12555 "Python Utils is a collection of small Python functions and classes which
12556 make common patterns shorter and easier.")
12557 (license license:bsd-2)))
12559 (define-public python2-utils
12560 (package-with-python2 python-utils))
12562 (define-public python-diff-match-patch
12564 (name "python-diff-match-patch")
12565 (version "20121119")
12569 (uri (pypi-uri "diff-match-patch" version))
12572 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12573 (build-system python-build-system)
12574 (home-page "https://code.google.com/p/google-diff-match-patch")
12575 (synopsis "Synchronize plain text")
12576 (description "Diff Match and Patch libraries offer robust algorithms to
12577 perform the operations required for synchronizing plain text.")
12578 (license license:asl2.0)))
12580 (define-public python2-diff-match-patch
12581 (package-with-python2 python-diff-match-patch))
12583 (define-public python-dirsync
12585 (name "python-dirsync")
12590 (uri (pypi-uri "dirsync" version))
12593 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12594 (build-system python-build-system)
12596 `(("six" ,python-six)))
12597 (home-page "https://bitbucket.org/tkhyn/dirsync")
12598 (synopsis "Advanced directory tree synchronisation tool")
12599 (description "Advanced directory tree synchronisation tool.")
12600 (license license:expat)))
12602 (define-public python2-dirsync
12603 (package-with-python2 python-dirsync))
12605 (define-public python-levenshtein
12607 (name "python-levenshtein")
12612 (uri (pypi-uri "python-Levenshtein" version))
12615 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12616 (build-system python-build-system)
12617 (home-page "https://github.com/ztane/python-Levenshtein")
12618 (synopsis "Fast computation of Levenshtein distance and string similarity")
12620 "The Levenshtein Python C extension module contains functions for fast computation of
12622 @item Levenshtein (edit) distance, and edit operations
12623 @item string similarity
12624 @item approximate median strings, and generally string averaging
12625 @item string sequence and set similarity
12627 It supports both normal and Unicode strings.")
12628 (license license:gpl2+)))
12630 (define-public python2-levenshtein
12631 (package-with-python2 python-levenshtein))
12633 (define-public python-scandir
12635 (name "python-scandir")
12640 (uri (pypi-uri "scandir" version))
12642 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12643 (build-system python-build-system)
12645 `(#:phases (modify-phases %standard-phases
12648 (invoke "python" "test/run_tests.py"))))))
12649 (home-page "https://github.com/benhoyt/scandir")
12650 (synopsis "Directory iteration function")
12652 "Directory iteration function like os.listdir(), except that instead of
12653 returning a list of bare filenames, it yields DirEntry objects that include
12654 file type and stat information along with the name. Using scandir() increases
12655 the speed of os.walk() by 2-20 times (depending on the platform and file
12656 system) by avoiding unnecessary calls to os.stat() in most cases.
12658 This package is part of the Python standard library since version 3.5.")
12659 (license license:bsd-3)))
12661 (define-public python2-scandir
12662 (package-with-python2 python-scandir))
12664 (define-public python2-stemming
12666 (name "python2-stemming")
12671 (uri (pypi-uri "stemming" version))
12673 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12674 (build-system python-build-system)
12676 `(#:python ,python-2))
12677 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12678 (synopsis "Python implementations of various stemming algorithms")
12680 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12681 stemming algorithms for English. These implementations are straightforward and
12682 efficient, unlike some Python versions of the same algorithms available on the
12683 Web. This package is an extraction of the stemming code included in the Whoosh
12685 (license license:public-domain)))
12687 (define-public python-factory-boy
12689 (name "python-factory-boy")
12694 (uri (pypi-uri "factory_boy" version))
12696 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12697 (build-system python-build-system)
12699 ;; Tests are not included in the tarball.
12702 `(("faker" ,python-faker)))
12703 (home-page "https://github.com/benhoyt/scandir")
12704 (synopsis "Versatile test fixtures replacement")
12706 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12708 As a fixtures replacement tool, it aims to replace static, hard to maintain
12709 fixtures with easy-to-use factories for complex object.
12711 Instead of building an exhaustive test setup with every possible combination
12712 of corner cases, factory_boy allows you to use objects customized for the
12713 current test, while only declaring the test-specific fields")
12714 (license license:expat)))
12716 (define-public python2-factory-boy
12717 (package-with-python2 python-factory-boy))
12719 (define-public python-translate-toolkit
12721 (name "python-translate-toolkit")
12726 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12728 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12729 (build-system python-build-system)
12731 `(("python-pytest" ,python-pytest)
12732 ("python-sphinx" ,python-sphinx)))
12734 `(("python-babel" ,python-babel)
12735 ("python-beautifulsoup4" ,python-beautifulsoup4)
12736 ("python-chardet" ,python-chardet)
12737 ("python-diff-match-patch" ,python-diff-match-patch)
12738 ("python-levenshtein" ,python-levenshtein)
12739 ("python-lxml" ,python-lxml)
12740 ("python-six" ,python-six)
12741 ("python-vobject" ,python-vobject)
12742 ("python-pyyaml" ,python-pyyaml)))
12744 ;; TODO: tests are not run, because they end with
12745 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12747 ;; during test setup.
12749 (home-page "https://toolkit.translatehouse.org")
12750 (synopsis "Tools and API for translation and localization engineering")
12752 "Tools and API for translation and localization engineering. It contains
12753 several utilities, as well as an API for building localization tools.")
12754 (license license:gpl2+)))
12756 (define-public python2-translate-toolkit
12757 (package-with-python2 python-translate-toolkit))
12759 (define-public python-packaging
12761 (name "python-packaging")
12766 (uri (pypi-uri "packaging" version))
12769 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12770 (build-system python-build-system)
12772 `(#:phases (modify-phases %standard-phases
12774 (lambda _ (invoke "py.test" "-vv"))))))
12776 `(("python-pretend" ,python-pretend)
12777 ("python-pytest" ,python-pytest)))
12779 `(("python-pyparsing" ,python-pyparsing)
12780 ("python-six" ,python-six)))
12781 (home-page "https://github.com/pypa/packaging")
12782 (synopsis "Core utilities for Python packages")
12783 (description "Packaging is a Python module for dealing with Python packages.
12784 It offers an interface for working with package versions, names, and dependency
12786 ;; From 'LICENSE': This software is made available under the terms of
12787 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12788 ;; Contributions to this software is made under the terms of *both* these
12790 (license (list license:asl2.0 license:bsd-2))))
12792 (define-public python2-packaging
12793 (package-with-python2 python-packaging))
12795 (define-public python-relatorio
12797 (name "python-relatorio")
12802 (uri (pypi-uri "relatorio" version))
12805 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12806 (build-system python-build-system)
12808 `(("python-lxml" ,python-lxml)
12809 ("python-genshi" ,python-genshi)))
12811 `(("python-magic" ,python-magic)))
12812 (home-page "https://relatorio.tryton.org/")
12813 (synopsis "Templating library able to output ODT and PDF files")
12814 (description "Relatorio is a templating library which provides a way to
12815 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12816 for more filetypes can be easily added by creating plugins for them.")
12817 (license license:gpl3+)))
12819 (define-public python2-relatorio
12820 (package-with-python2 python-relatorio))
12822 (define-public python-radon
12824 (name "python-radon")
12829 (uri (pypi-uri "radon" version))
12832 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12833 (build-system python-build-system)
12835 `(#:phases (modify-phases %standard-phases
12838 (invoke "python" "radon/tests/run.py"))))))
12840 `(("python-colorama" ,python-colorama)
12841 ("python-flake8-polyfill" ,python-flake8-polyfill)
12842 ("python-mando" ,python-mando)))
12844 `(("python-pytest" ,python-pytest)
12845 ("python-pytest-mock" ,python-pytest-mock)))
12846 (home-page "https://radon.readthedocs.org/")
12847 (synopsis "Code Metrics in Python")
12848 (description "Radon is a Python tool which computes various code metrics.
12849 Supported metrics are:
12851 @item raw metrics: SLOC, comment lines, blank lines, &c.
12852 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12853 @item Halstead metrics (all of them)
12854 @item the Maintainability Index (a Visual Studio metric)
12856 (license license:expat)))
12858 (define-public python2-radon
12859 (package-with-python2 python-radon))
12861 (define-public python-sure
12863 (name "python-sure")
12868 (uri (pypi-uri "sure" version))
12871 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12872 (build-system python-build-system)
12874 `(("python-mock" ,python-mock)
12875 ("python-six" ,python-six)))
12877 `(("python-nose" ,python-nose)))
12878 (home-page "https://github.com/gabrielfalcao/sure")
12879 (synopsis "Automated testing library in python for python")
12881 "Sure is a python library that leverages a DSL for writing assertions.
12882 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12883 (license license:gpl3+)))
12885 (define-public python2-sure
12886 (package-with-python2 python-sure))
12888 (define-public python2-couleur
12889 ;; This package does not seem to support python3 at all, hence,
12890 ;; only the python2 variant definition is provided.
12892 (name "python2-couleur")
12897 (uri (pypi-uri "couleur" version))
12900 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12901 (build-system python-build-system)
12903 `(#:python ,python-2))
12904 (home-page "https://github.com/gabrielfalcao/couleur")
12906 "ANSI terminal tool for python, colored shell and other handy fancy features")
12908 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12909 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12910 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12911 ;; https://github.com/gabrielfalcao/couleur/issues/11
12912 (license license:lgpl3+)))
12914 (define-public python-misaka
12916 (name "python-misaka")
12921 (uri (pypi-uri "misaka" version))
12924 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12925 (build-system python-build-system)
12927 `(;; Line 37 of setup.py calls self.run_command('develop')
12928 ;; in the 'check' phase. This command seems to be trying
12930 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12931 ;; for which it does not have the permission to write.
12934 `(("python-cffi" ,python-cffi)))
12935 (home-page "https://github.com/FSX/misaka")
12936 (synopsis "Python binding for Hoedown")
12938 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12939 library written in C. It features a fast HTML renderer and functionality to make custom
12940 renderers (e.g. man pages or LaTeX).")
12941 (license license:expat)))
12943 (define-public python2-misaka
12944 (package-with-python2 python-misaka))
12946 (define-public python2-steadymark
12947 ;; This is forced into being a python2 only variant
12948 ;; due to its dependence on couleur that has no support
12951 (name "python2-steadymark")
12956 (uri (pypi-uri "steadymark" version))
12959 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12960 (build-system python-build-system)
12962 `(("python-couleur" ,python2-couleur)
12963 ("python-sure" ,python2-sure)
12964 ("python-misaka" ,python2-misaka)))
12966 `(#:python ,python-2
12968 (modify-phases %standard-phases
12969 (add-before 'build 'patch-setup-py
12971 ;; Update requirements from dependency==version
12972 ;; to dependency>=version
12973 (substitute* "setup.py"
12976 (home-page "https://github.com/gabrielfalcao/steadymark")
12977 (synopsis "Markdown-based test runner for python")
12979 "@code{Steadymark} allows documentation to be written in github-flavoured
12980 markdown. The documentation may contain snippets of code surrounded by python
12981 code blocks and @code{Steadymark} will find these snippets and run them, making
12982 sure that there are no old malfunctional examples in the documentation examples.")
12983 (license license:expat)))
12985 (define-public python-jsonpointer
12987 (name "python-jsonpointer")
12992 (uri (pypi-uri "jsonpointer" version))
12995 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12996 (build-system python-build-system)
12997 (home-page "https://github.com/stefankoegl/python-json-pointer")
12998 (synopsis "Identify specific nodes in a JSON document")
12999 (description "@code{jsonpointer} allows you to access specific nodes
13000 by path in a JSON document (see RFC 6901).")
13001 (license license:bsd-3)))
13003 (define-public python2-jsonpointer
13004 (package-with-python2 python-jsonpointer))
13006 (define-public python-jsonpatch
13008 (name "python-jsonpatch")
13013 ;; pypi version lacks tests.js
13014 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13015 "archive/v" version ".tar.gz"))
13016 (file-name (string-append name "-" version ".tar.gz"))
13019 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13020 (build-system python-build-system)
13022 `(("python-jsonpointer" ,python-jsonpointer)))
13023 (home-page "https://github.com/stefankoegl/python-json-patch")
13024 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13025 (description "@code{jsonpatch} is a library and program that allows
13026 applying JSON Patches according to RFC 6902.")
13027 (license license:bsd-3)))
13029 (define-public python2-jsonpatch
13030 (package-with-python2 python-jsonpatch))
13032 (define-public python-jsonpatch-0.4
13033 (package (inherit python-jsonpatch)
13034 (name "python-jsonpatch")
13039 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13040 "archive/v" version ".tar.gz"))
13041 (file-name (string-append name "-" version ".tar.gz"))
13044 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13046 (define-public python2-jsonpatch-0.4
13047 (package-with-python2 python-jsonpatch-0.4))
13049 (define-public python-rfc3986
13051 (name "python-rfc3986")
13055 (uri (pypi-uri "rfc3986" version))
13058 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13059 (build-system python-build-system)
13061 `(#:modules ((guix build utils)
13062 (guix build python-build-system)
13067 (modify-phases %standard-phases
13070 (let ((cwd (getcwd)))
13071 (setenv "PYTHONPATH"
13072 (string-append cwd "/build/"
13073 (find (cut string-prefix? "lib" <>)
13074 (scandir (string-append cwd "/build")))
13076 (getenv "PYTHONPATH")))
13077 (invoke "pytest" "-v")))))))
13079 `(("python-pytest" ,python-pytest)))
13080 (home-page "https://rfc3986.readthedocs.io/")
13081 (synopsis "Parse and validate URI references")
13083 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13084 validation and authority parsing. This module also supports RFC@tie{}6874
13085 which adds support for zone identifiers to IPv6 addresses.")
13086 (license license:asl2.0)))
13088 (define-public python2-rfc3986
13089 (package-with-python2 python-rfc3986))
13091 (define-public python-rfc3987
13093 (name "python-rfc3987")
13098 (uri (pypi-uri "rfc3987" version))
13101 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13102 (build-system python-build-system)
13103 (home-page "https://pypi.python.org/pypi/rfc3987")
13104 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13105 (description "@code{rfc3987} provides routines for parsing and
13106 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13107 (license license:gpl3+)))
13109 (define-public python2-rfc3987
13110 (package-with-python2 python-rfc3987))
13112 (define-public python-validate-email
13114 (name "python-validate-email")
13119 (uri (pypi-uri "validate_email" version))
13122 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13123 (build-system python-build-system)
13124 (home-page "https://github.com/syrusakbary/validate_email")
13125 (synopsis "Verifies if an email address is valid and really exists")
13126 (description "@code{validate_email} can be used to verify if an email
13127 address is valid and really exists.")
13128 (license license:lgpl3+)))
13130 (define-public python2-validate-email
13131 (package-with-python2 python-validate-email))
13133 (define-public python-flex
13135 (name "python-flex")
13140 (uri (pypi-uri "flex" version))
13143 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13144 (build-system python-build-system)
13146 `(("python-click" ,python-click)
13147 ("python-iso8601" ,python-iso8601)
13148 ("python-jsonpointer" ,python-jsonpointer)
13149 ("python-pyyaml" ,python-pyyaml)
13150 ("python-requests" ,python-requests)
13151 ("python-rfc3987" ,python-rfc3987)
13152 ("python-six" ,python-six)
13153 ("python-validate-email" ,python-validate-email)))
13154 (home-page "https://github.com/pipermerriam/flex")
13155 (synopsis "Validates Swagger schemata")
13156 (description "@code{flex} can be used to validate Swagger schemata.")
13157 (license license:bsd-3)))
13159 (define-public python2-flex
13160 (package-with-python2 python-flex))
13162 (define-public python-marshmallow
13164 (name "python-marshmallow")
13165 (version "3.0.0b14")
13169 (uri (pypi-uri "marshmallow" version))
13172 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13173 (build-system python-build-system)
13175 `(("python-dateutil" ,python-dateutil)
13176 ("python-simplejson" ,python-simplejson)))
13178 `(("python-pytest" ,python-pytest)
13179 ("python-pytz" ,python-pytz)))
13180 (home-page "https://github.com/marshmallow-code/marshmallow")
13181 (synopsis "Convert complex datatypes to and from native
13182 Python datatypes.")
13183 (description "@code{marshmallow} provides a library for converting
13184 complex datatypes to and from native Python datatypes.")
13185 (license license:expat)))
13187 (define-public python2-marshmallow
13188 (package-with-python2 python-marshmallow))
13190 (define-public python-apispec
13192 (name "python-apispec")
13197 (uri (pypi-uri "apispec" version))
13200 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13201 (build-system python-build-system)
13203 `(("python-pyyaml" ,python-pyyaml)))
13205 `(("python-pytest" ,python-pytest)
13206 ("python-flask" ,python-flask)
13207 ("python-marshmallow" ,python-marshmallow)
13208 ("python-tornado" ,python-tornado)
13209 ("python-bottle" ,python-bottle)
13210 ("python-mock" ,python-mock)))
13211 (home-page "https://github.com/marshmallow-code/apispec")
13212 (synopsis "Swagger 2.0 API specification generator")
13213 (description "@code{python-apispec} is a pluggable API specification
13214 generator. Currently supports the OpenAPI specification (f.k.a.
13216 (license license:expat)))
13218 (define-public python2-apispec
13219 (package-with-python2 python-apispec))
13221 (define-public python-flasgger
13223 (name "python-flasgger")
13228 (uri (git-reference
13229 (url "https://github.com/rochacbruno/flasgger.git")
13231 (file-name (git-file-name name version))
13233 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13234 (build-system python-build-system)
13237 (modify-phases %standard-phases
13239 (lambda* (#:key inputs outputs #:allow-other-keys)
13240 (substitute* "Makefile"
13241 (("flake8 flasgger --ignore=F403")
13242 "flake8 flasgger --ignore=E731,F403"))
13243 (setenv "PYTHONPATH" (string-append (getcwd)
13245 (getenv "PYTHONPATH")))
13246 (invoke "py.test"))))))
13248 `(("python-flask" ,python-flask)
13249 ("python-pyyaml" ,python-pyyaml)
13250 ("python-jsonschema" ,python-jsonschema)
13251 ("python-mistune" ,python-mistune)
13252 ("python-six" ,python-six)))
13254 `(("python-decorator" ,python-decorator)
13255 ("python-flake8" ,python-flake8)
13256 ("python-flask-restful" ,python-flask-restful)
13257 ("python-flex" ,python-flex)
13258 ("python-pytest" ,python-pytest)
13259 ("python-pytest-cov" ,python-pytest-cov)
13260 ("python-marshmallow" ,python-marshmallow)
13261 ("python-apispec" ,python-apispec)))
13262 (home-page "https://github.com/rochacbruno/flasgger/")
13263 (synopsis "Extract Swagger specs from your Flask project")
13264 (description "@code{python-flasgger} allows extracting Swagger specs
13265 from your Flask project. It is a fork of Flask-Swagger.")
13266 (license license:expat)))
13268 (define-public python2-flasgger
13269 (package-with-python2 python-flasgger))
13271 (define-public python-swagger-spec-validator
13273 (name "python-swagger-spec-validator")
13278 (uri (pypi-uri "swagger-spec-validator" version))
13281 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13282 (build-system python-build-system)
13284 `(("python-jsonschema" ,python-jsonschema)
13285 ("python-pyyaml" ,python-pyyaml)
13286 ("python-six" ,python-six)))
13288 "https://github.com/Yelp/swagger_spec_validator")
13289 (synopsis "Validation of Swagger specifications")
13290 (description "@code{swagger_spec_validator} provides a library for
13291 validating Swagger API specifications.")
13292 (license license:asl2.0)))
13294 (define-public python2-swagger-spec-validator
13295 (package-with-python2 python-swagger-spec-validator))
13297 (define-public python-apache-libcloud
13299 (name "python-apache-libcloud")
13304 (uri (pypi-uri "apache-libcloud" version))
13307 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13308 (build-system python-build-system)
13311 (modify-phases %standard-phases
13312 (add-after 'unpack 'patch-ssh
13313 (lambda* (#:key inputs #:allow-other-keys)
13314 (substitute* "libcloud/compute/ssh.py"
13315 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13318 (add-after 'unpack 'patch-tests
13320 (substitute* "./libcloud/test/test_file_fixtures.py"
13321 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13322 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13323 return (httplib.OK,
13325 {\"test\": \"value\"},
13326 httplib.responses[httplib.OK])
13328 (substitute* "libcloud/test/compute/test_ssh_client.py"
13329 (("class ShellOutSSHClientTests")
13330 "@unittest.skip(\"Guix container doesn't have ssh service\")
13331 class ShellOutSSHClientTests")
13332 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13333 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13334 (("'.xF0', '.x90', '.x8D', '.x88'")
13335 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13337 (add-before 'check 'copy-secret
13339 (copy-file "libcloud/test/secrets.py-dist"
13340 "libcloud/test/secrets.py")
13343 `(("openssh" ,openssh)))
13345 `(("python-paramiko" ,python-paramiko)
13346 ("python-requests" ,python-requests)))
13348 `(("python-lockfile" ,python-lockfile)
13349 ("python-mock" ,python-mock)
13350 ("python-pytest" ,python-pytest)
13351 ("python-pytest-runner" ,python-pytest-runner)
13352 ("python-requests-mock" ,python-requests-mock)))
13353 (home-page "https://libcloud.apache.org/")
13354 (synopsis "Unified Cloud API")
13355 (description "@code{libcloud} is a Python library for interacting with
13356 many of the popular cloud service providers using a unified API.")
13357 (license license:asl2.0)))
13359 (define-public python2-apache-libcloud
13360 (package-with-python2 python-apache-libcloud))
13362 (define-public python-smmap2
13364 (name "python-smmap2")
13369 (uri (pypi-uri "smmap2" version))
13372 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13373 (build-system python-build-system)
13375 `(("python-nosexcover" ,python-nosexcover)))
13376 (home-page "https://github.com/Byron/smmap")
13377 (synopsis "Python sliding window memory map manager")
13378 (description "@code{smmap2} is a pure Python implementation of a sliding
13379 window memory map manager.")
13380 (license license:bsd-3)))
13382 (define-public python2-smmap2
13383 (package-with-python2 python-smmap2))
13385 (define-public python-regex
13387 (name "python-regex")
13388 (version "2019.04.14")
13391 (uri (pypi-uri "regex" version))
13394 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13395 ;; TODO: Fix and enable regex_test.py tests that complain about the
13396 ;; test.support module not existing.
13397 (build-system python-build-system)
13398 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13399 (synopsis "Alternative regular expression module")
13400 (description "This regular expression implementation is backwards-
13401 compatible with the standard @code{re} module, but offers additional
13402 functionality like full case-folding for case-insensitive matches in Unicode.")
13403 (license license:psfl)))
13405 (define-public python2-regex
13406 (package-with-python2 python-regex))
13408 (define-public python2-pyopengl
13410 (name "python2-pyopengl")
13415 (uri (pypi-uri "PyOpenGL" version))
13418 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13420 `(#:python ,python-2))
13421 (build-system python-build-system)
13422 (home-page "http://pyopengl.sourceforge.net")
13423 (synopsis "Standard OpenGL bindings for Python")
13425 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13426 related APIs. The binding is created using the standard @code{ctypes}
13428 (license license:bsd-3)))
13430 (define-public python2-pyopengl-accelerate
13432 (inherit python2-pyopengl)
13433 (name "python2-pyopengl-accelerate")
13438 (uri (pypi-uri "PyOpenGL-accelerate" version))
13441 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13442 (synopsis "Acceleration code for PyOpenGL")
13444 "This is the Cython-coded accelerator module for PyOpenGL.")))
13446 (define-public python-rencode
13448 (name "python-rencode")
13453 (uri (pypi-uri "rencode" version))
13456 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13457 (build-system python-build-system)
13460 (modify-phases %standard-phases
13461 (add-before 'check 'delete-bogus-test
13462 ;; This test requires /home/aresch/Downloads, which is not provided by
13463 ;; the build environment.
13465 (delete-file "rencode/t.py")
13467 (native-inputs `(("pkg-config" ,pkg-config)
13468 ("python-cython" ,python-cython)))
13469 (home-page "https://github.com/aresch/rencode")
13470 (synopsis "Serialization of heterogeneous data structures")
13472 "The @code{rencode} module is a data structure serialization library,
13473 similar to @code{bencode} from the BitTorrent project. For complex,
13474 heterogeneous data structures with many small elements, r-encoding stake up
13475 significantly less space than b-encodings. This version of rencode is a
13476 complete rewrite in Cython to attempt to increase the performance over the
13477 pure Python module.")
13478 (license license:bsd-3)))
13480 (define-public python2-rencode
13481 (package-with-python2 python-rencode))
13483 (define-public python-xenon
13485 (name "python-xenon")
13490 (uri (pypi-uri "xenon" version))
13493 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13494 (build-system python-build-system)
13496 `(("python-pyyaml" ,python-pyyaml)
13497 ("python-radon" ,python-radon)
13498 ("python-requests" ,python-requests)
13499 ("python-flake8" ,python-flake8)
13500 ("python-tox" ,python-tox)))
13503 (modify-phases %standard-phases
13504 (add-before 'build 'patch-test-requirements
13506 ;; Remove httpretty dependency for tests.
13507 (substitute* "setup.py"
13508 (("httpretty") ""))
13510 (home-page "https://xenon.readthedocs.org/")
13511 (synopsis "Monitor code metrics for Python on your CI server")
13513 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13514 Ideally, @code{xenon} is run every time code is committed. Through command
13515 line options, various thresholds can be set for the complexity of code. It
13516 will fail (i.e. it will exit with a non-zero exit code) when any of these
13517 requirements is not met.")
13518 (license license:expat)))
13520 (define-public python2-xenon
13521 (package-with-python2 python-xenon))
13523 (define-public python-pysocks
13525 (name "python-pysocks")
13530 (uri (pypi-uri "PySocks" version))
13533 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13534 (build-system python-build-system)
13535 (arguments `(#:tests? #f))
13536 (home-page "https://github.com/Anorov/PySocks")
13537 (synopsis "SOCKS client module")
13538 (description "@code{pysocks} is an updated and semi-actively maintained
13539 version of @code{SocksiPy} with bug fixes and extra features.")
13540 (license license:bsd-3)))
13542 (define-public python2-pysocks
13543 (package-with-python2 python-pysocks))
13545 (define-public python-pydiff
13547 (name "python-pydiff")
13552 (uri (pypi-uri "pydiff" version))
13555 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13556 (build-system python-build-system)
13557 (home-page "https://github.com/myint/pydiff")
13558 (synopsis "Library to diff two Python files at the bytecode level")
13560 "@code{pydiff} makes it easy to look for actual code changes while
13561 ignoring formatting changes.")
13562 (license license:expat)))
13564 (define-public python2-pydiff
13565 (package-with-python2 python-pydiff))
13567 (define-public python-tqdm
13569 (name "python-tqdm")
13574 (uri (pypi-uri "tqdm" version))
13577 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13578 (build-system python-build-system)
13580 `(("python-flake8" ,python-flake8)
13581 ("python-nose" ,python-nose)
13582 ("python-coverage" ,python-coverage)))
13583 (home-page "https://github.com/tqdm/tqdm")
13584 (synopsis "Fast, extensible progress meter")
13586 "Make loops show a progress bar on the console by just wrapping any
13587 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13588 design and layout.")
13589 (license (list license:mpl2.0 license:expat))))
13591 (define-public python2-tqdm
13592 (package-with-python2 python-tqdm))
13594 (define-public python-pkginfo
13596 (name "python-pkginfo")
13601 (uri (pypi-uri "pkginfo" version))
13604 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13605 (build-system python-build-system)
13607 ;; The tests are broken upstream.
13610 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13612 "Query metadatdata from sdists, bdists, and installed packages")
13614 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13615 source distriubtion (an sdist) or a binary distribution (e.g., created by
13616 running bdist_egg). It can also query the EGG-INFO directory of an installed
13617 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13618 created by running @code{python setup.py develop}).")
13619 (license license:expat)))
13621 (define-public python2-pkginfo
13622 (package-with-python2 python-pkginfo))
13624 (define-public python-twine
13626 (name "python-twine")
13631 (uri (pypi-uri "twine" version))
13634 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13635 (build-system python-build-system)
13637 `(("python-tqdm" ,python-tqdm)
13638 ("python-pkginfo" ,python-pkginfo)
13639 ("python-requests" ,python-requests)
13640 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13641 (home-page "https://github.com/pypa/twine")
13642 (synopsis "Collection of utilities for interacting with PyPI")
13644 "@code{twine} currently supports registering projects and uploading
13645 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13646 their files and supports any packaging format (including wheels).")
13647 (license license:asl2.0)))
13649 (define-public python2-twine
13650 (package-with-python2 python-twine))
13652 (define-public python-linecache2
13654 (name "python-linecache2")
13659 (uri (pypi-uri "linecache2" version))
13662 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13663 (build-system python-build-system)
13665 `(;; The tests depend on unittest2, and our version is a bit too old.
13668 `(("python-pbr" ,python-pbr-minimal)))
13670 "https://github.com/testing-cabal/linecache2")
13671 (synopsis "Backports of the linecache module")
13673 "The linecache module allows one to get any line from any file, while
13674 attempting to optimize internally, using a cache, the common case where many
13675 lines are read from a single file.")
13676 (license license:psfl)))
13678 (define-public python2-linecache2
13679 (package-with-python2 python-linecache2))
13681 (define-public python-traceback2
13683 (name "python-traceback2")
13688 (uri (pypi-uri "traceback2" version))
13691 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13692 (build-system python-build-system)
13694 `(;; python-traceback2 and python-unittest2 depend on one another.
13697 `(("python-pbr" ,python-pbr-minimal)))
13699 `(("python-linecache2" ,python-linecache2)))
13701 "https://github.com/testing-cabal/traceback2")
13702 (synopsis "Backports of the traceback module")
13704 "This module provides a standard interface to extract, format and print
13705 stack traces of Python programs. It exactly mimics the behavior of the Python
13706 interpreter when it prints a stack trace.")
13707 (license license:psfl)))
13709 (define-public python2-traceback2
13710 (package-with-python2 python-traceback2))
13712 (define-public python-ratelimiter
13714 (name "python-ratelimiter")
13719 (uri (pypi-uri "ratelimiter" version))
13722 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13723 (build-system python-build-system)
13725 '(#:tests? #f)) ; There are no tests in the pypi archive.
13726 (home-page "https://github.com/RazerM/ratelimiter")
13727 (synopsis "Simple rate limiting object")
13729 "The @code{ratelimiter} module ensures that an operation will not be
13730 executed more than a given number of times during a given period.")
13731 (license license:asl2.0)))
13733 (define-public python2-ratelimiter
13734 (package-with-python2 python-ratelimiter))
13736 (define-public python-dukpy
13738 (name "python-dukpy")
13743 (uri (git-reference
13744 (url "https://github.com/kovidgoyal/dukpy.git")
13745 (commit (string-append "v" version))))
13746 (file-name (git-file-name name version))
13748 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13749 (build-system python-build-system)
13750 (home-page "https://github.com/kovidgoyal/dukpy")
13751 (synopsis "Run JavaScript in python")
13753 "dukpy is a JavaScript runtime environment for Python using the duktape
13754 embeddable JavaScript engine.")
13755 ;; Dukpy is licensed under MIT like the embedded duktape library,
13756 ;; with 'errors.c' as GPL3.
13757 (license (list license:expat license:gpl3))))
13759 (define-public python2-dukpy
13760 (package-with-python2 python-dukpy))
13762 (define-public python-jsonrpclib-pelix
13764 (name "python-jsonrpclib-pelix")
13769 (uri (pypi-uri "jsonrpclib-pelix" version))
13772 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13773 (build-system python-build-system)
13775 `(#:tests? #f)) ; no tests in PyPI tarball
13776 (home-page "https://github.com/tcalmant/jsonrpclib/")
13777 (synopsis "JSON-RPC 2.0 client library for Python")
13779 "This library implements the JSON-RPC v2.0
13780 specification (backwards-compatible) as a client library for Python. This
13781 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13783 (license license:asl2.0)))
13785 (define-public python2-jsonrpclib-pelix
13786 (package-with-python2 python-jsonrpclib-pelix))
13788 (define-public python-setuptools-scm-git-archive
13790 (name "python-setuptools-scm-git-archive")
13795 (uri (pypi-uri "setuptools_scm_git_archive" version))
13798 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13799 (build-system python-build-system)
13801 `(("python-pytest" ,python-pytest)))
13803 `(("python-setuptools-scm" ,python-setuptools-scm)))
13804 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13805 (synopsis "Setuptools_scm plugin for git archives")
13807 "The setuptools_scm_git_archive package is a plugin to
13808 setuptools_scm, which supports obtaining versions from git archives that
13809 belong to tagged versions.")
13810 (license license:expat)))
13812 (define-public python2-setuptools-scm-git-archive
13813 (package-with-python2 python-setuptools-scm-git-archive))
13815 (define-public python-setuptools-git
13817 (name "python-setuptools-git")
13822 (uri (pypi-uri "setuptools-git" version))
13825 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13826 (build-system python-build-system)
13829 (modify-phases %standard-phases
13830 ;; This is needed for tests.
13831 (add-after 'unpack 'configure-git
13833 (setenv "HOME" "/tmp")
13834 (invoke "git" "config" "--global" "user.email" "guix")
13835 (invoke "git" "config" "--global" "user.name" "guix")
13838 `(("git" ,git-minimal)))
13839 (home-page "https://github.com/msabramo/setuptools-git")
13840 (synopsis "Setuptools revision control system plugin for Git")
13842 "This package provides a plugin for Setuptools for revision control with
13844 (license license:bsd-3)))
13846 (define-public python-pyclipper
13848 (name "python-pyclipper")
13849 (version "1.1.0.post1")
13853 (uri (pypi-uri "pyclipper" version ".zip"))
13856 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13857 (modules '((guix build utils)))
13860 ;; This file is generated by Cython.
13861 (delete-file "pyclipper/pyclipper.cpp") #t))))
13862 (build-system python-build-system)
13865 (modify-phases %standard-phases
13866 (add-before 'build 'cythonize-sources
13868 (with-directory-excursion "pyclipper"
13869 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13871 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13873 `(("python-cython" ,python-cython)
13874 ("python-pytest" ,python-pytest)
13875 ("python-pytest-runner" ,python-pytest-runner)
13876 ("python-unittest2" ,python-unittest2)
13878 (home-page "https://github.com/greginvm/pyclipper")
13879 (synopsis "Wrapper for Angus Johnson's Clipper library")
13881 "Pyclipper is a Cython wrapper for the C++ translation of the
13882 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13883 (license license:expat)))
13885 (define-public python2-pyclipper
13886 (package-with-python2 python-pyclipper))
13888 (define-public python2-booleanoperations
13890 (name "python2-booleanoperations")
13895 (uri (pypi-uri "booleanOperations" version ".zip"))
13898 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13899 (build-system python-build-system)
13901 `(#:python ,python-2))
13904 ("python2-pytest" ,python2-pytest)
13905 ("python2-pytest-runner" ,python2-pytest-runner)))
13907 `(("python-fonttools" ,python2-fonttools)
13908 ("python-pyclipper" ,python2-pyclipper)
13909 ("python-ufolib" ,python2-ufolib)))
13910 (home-page "https://github.com/typemytype/booleanOperations")
13911 (synopsis "Boolean operations on paths")
13913 "BooleanOperations provides a Python library that enables
13914 boolean operations on paths.")
13915 (license license:expat)))
13917 (define-public python-tempdir
13919 (name "python-tempdir")
13924 (uri (pypi-uri "tempdir" version))
13927 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13928 (build-system python-build-system)
13929 (home-page "https://pypi.org/project/tempdir/")
13931 ;; the package has no tests
13933 (synopsis "Python library for managing temporary directories")
13935 "This library manages temporary directories that are automatically
13936 deleted with all their contents when they are no longer needed. It is
13937 particularly convenient for use in tests.")
13938 (license license:expat)))
13940 (define-public python2-tempdir
13941 (package-with-python2 python-tempdir))
13943 (define-public python-activepapers
13945 (name "python-activepapers")
13950 (uri (pypi-uri "ActivePapers.Py" version))
13953 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13954 (build-system python-build-system)
13956 `(#:modules ((ice-9 ftw)
13959 (guix build python-build-system))
13962 (modify-phases %standard-phases
13963 (add-after 'unpack 'delete-python2-code
13965 (for-each delete-file
13966 '("lib/activepapers/builtins2.py"
13967 "lib/activepapers/standardlib2.py"
13968 "lib/activepapers/utility2.py"))))
13971 ;; Deactivate the test cases that download files
13972 (setenv "NO_NETWORK_ACCESS" "1")
13973 ;; For some strange reason, some tests fail if nosetests runs all
13974 ;; test modules in a single execution. They pass if each test
13975 ;; module is run individually.
13976 (for-each (lambda (filename)
13977 (invoke "nosetests"
13978 (string-append "tests/" filename)))
13981 (string-suffix? ".py" filename)))))))))
13983 `(("python-tempdir" ,python-tempdir)
13984 ("python-nose" ,python-nose)))
13986 `(("python-h5py" ,python-h5py)))
13987 (home-page "http://www.activepapers.org/")
13988 (synopsis "Executable papers for scientific computing")
13990 "ActivePapers is a tool for working with executable papers, which
13991 combine data, code, and documentation in single-file packages,
13992 suitable for publication as supplementary material or on repositories
13993 such as figshare or Zenodo.")
13994 (properties `((python2-variant . ,(delay python2-activepapers))))
13995 (license license:bsd-3)))
13997 (define-public python2-activepapers
13998 (let ((base (package-with-python2
13999 (strip-python2-variant python-activepapers))))
14003 (substitute-keyword-arguments (package-arguments base)
14005 `(modify-phases ,phases
14006 (delete 'delete-python2-code)
14007 (add-after 'unpack 'delete-python3-code
14009 (for-each delete-file
14010 '("lib/activepapers/builtins3.py"
14011 "lib/activepapers/standardlib3.py"
14012 "lib/activepapers/utility3.py")))))))))))
14014 (define-public python-semver
14016 (name "python-semver")
14021 (uri (pypi-uri "semver" version))
14024 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14025 (build-system python-build-system)
14028 (modify-phases %standard-phases
14029 (add-after 'unpack 'patch-test-requirements
14031 (substitute* "setup.py"
14032 ;; Our Python is new enough.
14033 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14036 `(("python-tox" ,python-tox)
14037 ("python-virtualenv" ,python-virtualenv)))
14038 (home-page "https://github.com/k-bx/python-semver")
14039 (synopsis "Python helper for Semantic Versioning")
14040 (description "This package provides a Python library for
14041 @url{Semantic Versioning, http://semver.org/}.")
14042 (license license:bsd-3)))
14044 (define-public python2-semver
14045 (package-with-python2 python-semver))
14047 (define-public python-pyro4
14049 (name "python-pyro4")
14054 (uri (pypi-uri "Pyro4" version))
14056 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14057 (build-system python-build-system)
14059 `(("python-serpent" ,python-serpent)))
14060 (home-page "https://pyro4.readthedocs.io")
14061 (synopsis "Distributed object middleware for Python")
14063 "Pyro enables you to build applications in which objects can talk to each
14064 other over the network. You can just use normal Python method calls to call
14065 objects on other machines, also known as remote procedure calls (RPC).")
14066 (license license:expat)))
14068 (define-public python2-pyro
14070 (name "python2-pyro")
14075 (uri (pypi-uri "Pyro" version))
14076 (file-name (string-append "Pyro-" version ".tar.gz"))
14079 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14080 (build-system python-build-system)
14082 ;; Pyro is not compatible with Python 3
14083 `(#:python ,python-2
14084 ;; Pyro has no test cases for automatic execution
14086 (home-page "http://pythonhosted.org/Pyro/")
14087 (synopsis "Distributed object manager for Python")
14088 (description "Pyro is a Distributed Object Technology system
14089 written in Python that is designed to be easy to use. It resembles
14090 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14091 which is a system and language independent Distributed Object Technology
14092 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14093 longer maintained. New projects should use Pyro4 instead, which
14094 is the new Pyro version that is actively developed.")
14095 (license license:expat)))
14097 (define-public python2-scientific
14099 (name "python2-scientific")
14104 (uri (string-append "https://bitbucket.org/khinsen/"
14105 "scientificpython/downloads/ScientificPython-"
14106 version ".tar.gz"))
14107 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14110 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14111 (build-system python-build-system)
14113 `(("netcdf" ,netcdf)))
14115 `(("python-numpy" ,python2-numpy-1.8)
14116 ("python-pyro" ,python2-pyro)))
14118 ;; ScientificPython is not compatible with Python 3
14119 `(#:python ,python-2
14120 #:tests? #f ; No test suite
14122 (modify-phases %standard-phases
14124 (lambda* (#:key inputs #:allow-other-keys)
14125 (invoke "python" "setup.py" "build"
14126 (string-append "--netcdf_prefix="
14127 (assoc-ref inputs "netcdf"))))))))
14128 (home-page "https://bitbucket.org/khinsen/scientificpython")
14129 (synopsis "Python modules for scientific computing")
14130 (description "ScientificPython is a collection of Python modules that are
14131 useful for scientific computing. Most modules are rather general (Geometry,
14132 physical units, automatic derivatives, ...) whereas others are more
14133 domain-specific (e.g. netCDF and PDB support). The library is currently
14134 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14135 (license license:cecill-c)))
14137 (define-public python2-mmtk
14139 (name "python2-mmtk")
14144 (uri (string-append "https://bitbucket.org/khinsen/"
14145 "mmtk/downloads/MMTK-" version ".tar.gz"))
14146 (file-name (string-append "MMTK-" version ".tar.gz"))
14149 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14150 (build-system python-build-system)
14152 `(("netcdf" ,netcdf)))
14154 `(("python-scientific" ,python2-scientific)
14155 ("python-tkinter" ,python-2 "tk")))
14157 `(#:python ,python-2
14160 (modify-phases %standard-phases
14161 (add-before 'build 'includes-from-scientific
14162 (lambda* (#:key inputs #:allow-other-keys)
14163 (mkdir-p "Include/Scientific")
14166 (assoc-ref inputs "python-scientific")
14167 "/include/python2.7/Scientific")
14168 "Include/Scientific"))))))
14169 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14170 (synopsis "Python library for molecular simulation")
14171 (description "MMTK is a library for molecular simulations with an emphasis
14172 on biomolecules. It provides widely used methods such as Molecular Dynamics
14173 and normal mode analysis, but also basic routines for implementing new methods
14174 for simulation and analysis. The library is currently not actively maintained
14175 and works only with Python 2 and NumPy < 1.9.")
14176 (license license:cecill-c)))
14178 (define-public python-phonenumbers
14180 (name "python-phonenumbers")
14185 (uri (pypi-uri "phonenumbers" version))
14188 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14189 (build-system python-build-system)
14191 "https://github.com/daviddrysdale/python-phonenumbers")
14193 "Python library for dealing with international phone numbers")
14195 "This package provides a Python port of Google's libphonenumber library.")
14196 (license license:asl2.0)))
14198 (define-public python2-phonenumbers
14199 (package-with-python2 python-phonenumbers))
14201 (define-public python-send2trash
14203 (name "python-send2trash")
14206 (origin (method git-fetch)
14207 ;; Source tarball on PyPI doesn't include tests.
14208 (uri (git-reference
14209 (url "https://github.com/hsoft/send2trash.git")
14211 (file-name (git-file-name name version))
14214 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14215 (build-system python-build-system)
14218 (modify-phases %standard-phases
14219 (add-before 'check 'pre-check
14221 (mkdir-p "/tmp/foo")
14222 (setenv "HOME" "/tmp/foo")
14224 (home-page "https://github.com/hsoft/send2trash")
14225 (synopsis "Send files to the user's @file{~/Trash} directory")
14226 (description "This package provides a Python library to send files to the
14227 user's @file{~/Trash} directory.")
14228 (properties `((python2-variant . ,(delay python2-send2trash))))
14229 (license license:bsd-3)))
14231 (define-public python2-send2trash
14233 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14235 (substitute-keyword-arguments (package-arguments python-send2trash)
14237 `(modify-phases ,phases
14238 (add-before 'check 'setenv
14240 (setenv "PYTHONPATH"
14241 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14244 (define-public python-yapf
14246 (name "python-yapf")
14251 (uri (pypi-uri "yapf" version))
14254 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14255 (build-system python-build-system)
14256 (home-page "https://github.com/google/yapf")
14257 (synopsis "Formatter for Python code")
14258 (description "YAPF is a formatter for Python code. It's based off of
14259 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14260 takes the code and reformats it to the best formatting that conforms to the
14261 style guide, even if the original code didn't violate the style guide.")
14262 (license license:asl2.0)))
14264 (define-public python2-yapf
14265 (package-with-python2 python-yapf))
14267 (define-public python-gyp
14268 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14271 (name "python-gyp")
14272 ;; Google does not release versions,
14273 ;; based on second most recent commit date.
14274 (version (git-version "0.0.0" revision commit))
14277 ;; Google does not release tarballs,
14278 ;; git checkout is needed.
14280 (uri (git-reference
14281 (url "https://chromium.googlesource.com/external/gyp")
14283 (file-name (git-file-name name version))
14286 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14287 (build-system python-build-system)
14288 (home-page "https://gyp.gsrc.io/")
14289 (synopsis "GYP is a Meta-Build system")
14291 "GYP builds build systems for large, cross platform applications.
14292 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14293 files, and Makefiles.")
14294 (license license:bsd-3))))
14296 (define-public python2-gyp
14297 (package-with-python2 python-gyp))
14299 (define-public python-whatever
14301 (name "python-whatever")
14306 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14310 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14311 (file-name (string-append name "-" version ".tar.gz"))))
14312 (build-system python-build-system)
14315 (modify-phases %standard-phases
14318 (invoke "py.test"))))))
14320 `(("python-pytest" ,python-pytest)))
14321 (home-page "http://github.com/Suor/whatever")
14322 (synopsis "Make anonymous functions by partial application of operators")
14323 (description "@code{whatever} provides an easy way to make anonymous
14324 functions by partial application of operators.")
14325 (license license:bsd-3)))
14327 (define-public python2-whatever
14328 (package-with-python2 python-whatever))
14330 (define-public python-funcy
14332 (name "python-funcy")
14337 (uri (git-reference
14338 (url "https://github.com/Suor/funcy.git")
14341 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14342 (file-name (git-file-name name version))))
14343 (build-system python-build-system)
14346 (modify-phases %standard-phases
14349 (invoke "py.test"))))))
14351 `(("python-pytest" ,python-pytest)
14352 ("python-whatever" ,python-whatever)))
14353 (home-page "http://github.com/Suor/funcy")
14354 (synopsis "Functional tools")
14355 (description "@code{funcy} is a library that provides functional tools.
14358 @item merge - Merges collections of the same type
14359 @item walk - Type-preserving map
14360 @item select - Selects a part of a collection
14361 @item take - Takes the first n items of a collection
14362 @item first - Takes the first item of a collection
14363 @item remove - Predicated-removes items of a collection
14364 @item concat - Concatenates two collections
14365 @item flatten - Flattens a collection with subcollections
14366 @item distinct - Returns only distinct items
14367 @item split - Predicated-splits a collection
14368 @item split_at - Splits a collection at a given item
14369 @item group_by - Groups items by group
14370 @item pairwise - Pairs off adjacent items
14371 @item partial - Partially-applies a function
14372 @item curry - Curries a function
14373 @item compose - Composes functions
14374 @item complement - Complements a predicate
14375 @item all_fn - \"all\" with predicate
14377 (license license:bsd-3)))
14379 (define-public python2-funcy
14380 (package-with-python2 python-funcy))
14382 (define-public python-isoweek
14384 (name "python-isoweek")
14389 (uri (pypi-uri "isoweek" version))
14392 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14393 (build-system python-build-system)
14394 (home-page "https://github.com/gisle/isoweek")
14395 (synopsis "Objects representing a week")
14396 (description "The @code{isoweek} module provide the class Week that
14397 implements the week definition of ISO 8601. This standard also defines
14398 a notation for identifying weeks; yyyyWww (where the W is a literal).
14399 Week instances stringify to this form.")
14400 (license license:bsd-3)))
14402 (define-public python2-isoweek
14403 (package-with-python2 python-isoweek))
14405 (define-public python-tokenize-rt
14407 (name "python-tokenize-rt")
14412 (uri (pypi-uri "tokenize-rt" version))
14415 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14416 (build-system python-build-system)
14417 (home-page "https://github.com/asottile/tokenize-rt")
14418 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14420 "This Python library is a wrapper around @code{tokenize} from the Python
14421 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14422 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14423 and @code{tokens_to_src} to roundtrip.")
14424 (license license:expat)))
14426 (define-public python-future-fstrings
14428 (name "python-future-fstrings")
14433 (uri (pypi-uri "future_fstrings" version))
14436 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14437 (build-system python-build-system)
14439 `(("python-tokenize-rt" ,python-tokenize-rt)))
14440 (home-page "https://github.com/asottile/future-fstrings")
14441 (synopsis "Backport of fstrings to Python < 3.6")
14443 "This package provides a UTF-8 compatible encoding
14444 @code{future_fstrings}, which performs source manipulation. It decodes the
14445 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14446 @code{f} strings.")
14447 (license license:expat)))
14449 (define-public python-typed-ast
14451 (name "python-typed-ast")
14456 (uri (pypi-uri "typed-ast" version))
14459 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14460 (build-system python-build-system)
14462 `(#:modules ((guix build utils)
14463 (guix build python-build-system)
14468 (modify-phases %standard-phases
14471 (let ((cwd (getcwd)))
14472 (setenv "PYTHONPATH"
14473 (string-append cwd "/build/"
14474 (find (cut string-prefix? "lib" <>)
14475 (scandir (string-append cwd "/build")))
14477 (getenv "PYTHONPATH"))))
14480 (native-inputs `(("python-pytest" ,python-pytest)))
14481 (home-page "https://github.com/python/typed_ast")
14482 (synopsis "Fork of Python @code{ast} modules with type comment support")
14483 (description "This package provides a parser similar to the standard
14484 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14485 include PEP 484 type comments and are independent of the version of Python
14486 under which they are run. The @code{typed_ast} parsers produce the standard
14487 Python AST (plus type comments), and are both fast and correct, as they are
14488 based on the CPython 2.7 and 3.7 parsers.")
14489 ;; See the file "LICENSE" for the details.
14490 (license (list license:psfl
14492 license:expat)))) ;ast27/Parser/spark.py
14494 (define-public python-typing
14496 (name "python-typing")
14501 (uri (pypi-uri "typing" version))
14504 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14505 (build-system python-build-system)
14506 (home-page "https://docs.python.org/3/library/typing.html")
14507 (synopsis "Type hints for Python")
14508 (description "This is a backport of the standard library @code{typing}
14509 module to Python versions older than 3.5. Typing defines a standard notation
14510 for Python function and variable type annotations. The notation can be used
14511 for documenting code in a concise, standard format, and it has been designed
14512 to also be used by static and runtime type checkers, static analyzers, IDEs
14514 (license license:psfl)))
14516 (define-public python2-typing
14517 (package-with-python2 python-typing))
14519 (define-public python-typing-extensions
14521 (name "python-typing-extensions")
14526 (uri (pypi-uri "typing_extensions" version))
14529 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14530 (build-system python-build-system)
14532 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14533 (synopsis "Experimental type hints for Python")
14535 "The typing_extensions module contains additional @code{typing} hints not
14536 yet present in the of the @code{typing} standard library.
14537 Included are implementations of:
14540 @item ContextManager
14551 @item TYPE_CHECKING
14552 @item AsyncGenerator
14554 (license license:psfl)))
14556 (define-public bpython
14563 (uri (pypi-uri "bpython" version))
14566 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14567 (build-system python-build-system)
14570 (modify-phases %standard-phases
14571 (add-after 'unpack 'remove-failing-test
14573 ;; Remove failing test. FIXME: make it pass
14574 (delete-file "bpython/test/test_args.py")
14576 (add-after 'wrap 'add-aliases
14577 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14578 (lambda* (#:key outputs #:allow-other-keys)
14579 (let ((out (assoc-ref outputs "out")))
14582 (symlink old (string-append out "/bin/" new)))
14583 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14584 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14587 `(("python-pygments" ,python-pygments)
14588 ("python-requests" ,python-requests)
14589 ("python-babel" ,python-babel) ; optional, for internationalization
14590 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14591 ("python-greenlet" ,python-greenlet)
14592 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14593 ("python-six" ,python-six)))
14595 `(("python-sphinx" ,python-sphinx)
14596 ("python-mock" ,python-mock)))
14597 (home-page "https://bpython-interpreter.org/")
14598 (synopsis "Fancy interface to the Python interpreter")
14599 (description "Bpython is a fancy interface to the Python
14600 interpreter. bpython's main features are
14603 @item in-line syntax highlighting,
14604 @item readline-like autocomplete with suggestions displayed as you type,
14605 @item expected parameter list for any Python function,
14606 @item \"rewind\" function to pop the last line of code from memory and
14608 @item send the code you've entered off to a pastebin,
14609 @item save the code you've entered to a file, and
14610 @item auto-indentation.
14612 (license license:expat)))
14614 (define-public bpython2
14615 (let ((base (package-with-python2
14616 (strip-python2-variant bpython))))
14617 (package (inherit base)
14620 `(#:python ,python-2
14622 (modify-phases %standard-phases
14623 (add-after 'unpack 'remove-failing-test
14625 ;; Remove failing test. FIXME: make it pass
14626 (delete-file "bpython/test/test_args.py")
14627 ;; Disable failing test-cases (renaming inhibits they are
14629 (substitute* "bpython/test/test_curtsies_repl.py"
14630 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14631 (string-append a "xxx_off_" b))
14632 (("^(\\s*def )(test_complex\\W)" _ a b)
14633 (string-append a "xxx_off_" b)))
14635 (add-before 'build 'rename-scripts
14636 ;; rename the scripts to bypthon2, bpdb2, etc.
14638 (substitute* "setup.py"
14639 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14640 (string-append name "2" rest "\n"))
14641 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14642 (string-append name "2" (or sub "") rest "\n")))
14645 (define-public python-pyinotify
14647 (name "python-pyinotify")
14651 (uri (pypi-uri "pyinotify" version))
14654 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14655 (build-system python-build-system)
14656 (arguments `(#:tests? #f)) ;no tests
14657 (home-page "https://github.com/seb-m/pyinotify")
14658 (synopsis "Python library for monitoring inotify events")
14660 "@code{pyinotify} provides a Python interface for monitoring
14661 file system events on Linux.")
14662 (license license:expat)))
14664 (define-public python2-pyinotify
14665 (package-with-python2 python-pyinotify))
14667 ;; Ada parser uses this version.
14668 (define-public python2-quex-0.67.3
14670 (name "python2-quex")
14675 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14676 (version-major+minor version)
14677 "/quex-" version ".zip"))
14680 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14681 (build-system python-build-system)
14683 `(("unzip" ,unzip)))
14685 `(#:python ,python-2
14688 (modify-phases %standard-phases
14689 (delete 'configure)
14692 (lambda* (#:key outputs #:allow-other-keys)
14693 (let* ((out (assoc-ref outputs "out"))
14694 (share/quex (string-append out "/share/quex"))
14695 (bin (string-append out "/bin")))
14696 (copy-recursively "." share/quex)
14698 (symlink (string-append share/quex "/quex-exe.py")
14699 (string-append bin "/quex"))
14701 (native-search-paths
14702 (list (search-path-specification
14703 (variable "QUEX_PATH")
14704 (files '("share/quex")))))
14705 (home-page "http://quex.sourceforge.net/")
14706 (synopsis "Lexical analyzer generator in Python")
14707 (description "@code{quex} is a lexical analyzer generator in Python.")
14708 (license license:lgpl2.1+))) ; Non-military
14710 (define-public python2-quex
14711 (package (inherit python2-quex-0.67.3)
14712 (name "python2-quex")
14717 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14720 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14721 (file-name (string-append name "-" version ".tar.gz"))))))
14723 (define-public python-more-itertools
14725 (name "python-more-itertools")
14730 (uri (pypi-uri "more-itertools" version))
14733 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14734 (build-system python-build-system)
14735 (home-page "https://github.com/erikrose/more-itertools")
14736 (synopsis "More routines for operating on iterables, beyond itertools")
14737 (description "Python's built-in @code{itertools} module implements a
14738 number of iterator building blocks inspired by constructs from APL, Haskell,
14739 and SML. @code{more-itertools} includes additional building blocks for
14740 working with iterables.")
14741 (properties `((python2-variant . ,(delay python2-more-itertools))))
14742 (license license:expat)))
14744 ;; The 5.x series are the last versions supporting Python 2.7.
14745 (define-public python2-more-itertools
14747 (inherit python-more-itertools)
14748 (name "python2-more-itertools")
14752 (uri (pypi-uri "more-itertools" version))
14755 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14757 `(#:python ,python2-minimal))
14759 `(("python2-six" ,python2-six-bootstrap)))))
14761 (define-public python-latexcodec
14763 (name "python-latexcodec")
14768 (uri (pypi-uri "latexcodec" version))
14770 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14771 (build-system python-build-system)
14773 `(("python-six" ,python-six)))
14774 (home-page "https://readthedocs.org/projects/latexcodec/")
14775 (synopsis "Work with LaTeX code in Python")
14776 (description "Lexer and codec to work with LaTeX code in Python.")
14777 (license license:expat)))
14779 (define-public python-pybtex
14781 (name "python-pybtex")
14786 (uri (pypi-uri "pybtex" version))
14788 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14789 (build-system python-build-system)
14791 `(("python-nose" ,python-nose)))
14793 `(("python-latexcodec" ,python-latexcodec)
14794 ("python-pyyaml" ,python-pyyaml)
14795 ("python-six" ,python-six)))
14797 `(#:test-target "nosetests"))
14798 (home-page "https://pybtex.org/")
14799 (synopsis "BibTeX-compatible bibliography processor")
14800 (description "Pybtex is a BibTeX-compatible bibliography processor written
14801 in Python. You can simply type pybtex instead of bibtex.")
14802 (license license:expat)))
14804 (define-public python-onetimepass
14806 (name "python-onetimepass")
14811 (uri (pypi-uri "onetimepass" version))
14813 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14814 (build-system python-build-system)
14815 (propagated-inputs `(("python-six" ,python-six)))
14816 (home-page "https://github.com/tadeck/onetimepass/")
14817 (synopsis "One-time password library")
14818 (description "Python one-time password library for HMAC-based (HOTP) and
14819 time-based (TOTP) passwords.")
14820 (license license:expat)))
14822 (define-public python-parso
14824 (name "python-parso")
14829 (uri (pypi-uri "parso" version))
14832 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14834 `(("python-pytest" ,python-pytest)))
14835 (build-system python-build-system)
14837 `(#:phases (modify-phases %standard-phases
14839 (lambda _ (invoke "pytest" "-vv"))))))
14840 (home-page "https://github.com/davidhalter/parso")
14841 (synopsis "Python Parser")
14842 (description "Parso is a Python parser that supports error recovery and
14843 round-trip parsing for different Python versions (in multiple Python versions).
14844 Parso is also able to list multiple syntax errors in your Python file.")
14845 (license license:expat)))
14847 (define-public python2-parso
14848 (package-with-python2 python-parso))
14850 (define-public python-async-generator
14852 (name "python-async-generator")
14857 (uri (pypi-uri "async_generator" version))
14860 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14861 (build-system python-build-system)
14863 `(("python-pytest" ,python-pytest)))
14864 (home-page "https://github.com/python-trio/async_generator")
14865 (synopsis "Async generators and context managers for Python 3.5+")
14866 (description "@code{async_generator} back-ports Python 3.6's native async
14867 generators and Python 3.7's context managers into Python 3.5.")
14869 (license (list license:expat license:asl2.0))))
14871 (define-public python-async-timeout
14873 (name "python-async-timeout")
14878 (uri (pypi-uri "async-timeout" version))
14881 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14882 (build-system python-build-system)
14883 (home-page "https://github.com/aio-libs/async_timeout/")
14884 (synopsis "Timeout context manager for asyncio programs")
14885 (description "@code{async-timeout} provides a timeout timeout context
14886 manager compatible with @code{asyncio}.")
14887 (license license:asl2.0)))
14889 (define-public python-glob2
14891 (name "python-glob2")
14896 (uri (git-reference
14897 (url "https://github.com/miracle2k/python-glob2.git")
14899 (file-name (git-file-name name version))
14901 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14902 (build-system python-build-system)
14903 (home-page "https://github.com/miracle2k/python-glob2/")
14904 (synopsis "Extended Version of the python buildin glob module")
14905 (description "This is an extended version of the Python
14906 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14910 @item The ability to capture the text matched by glob patterns, and return
14911 those matches alongside the file names.
14912 @item A recursive @code{**} globbing syntax, akin for example to the
14913 @code{globstar} option of Bash.
14914 @item The ability to replace the file system functions used, in order to glob
14915 on virtual file systems.
14916 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14919 Glob2 currently based on the glob code from Python 3.3.1.")
14920 (license license:bsd-2)))
14922 (define-public python2-glob2
14923 (package-with-python2 python-glob2))
14925 (define-public python-gipc
14927 (name "python-gipc")
14932 (uri (pypi-uri "gipc" version ".zip"))
14935 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14936 (build-system python-build-system)
14938 `(("unzip" ,unzip)))
14940 `(("python-gevent" ,python-gevent)))
14941 (home-page "http://gehrcke.de/gipc")
14942 (synopsis "Child process management in the context of gevent")
14943 (description "Usage of Python's multiprocessing package in a
14944 gevent-powered application may raise problems. With @code{gipc},
14945 process-based child processes can safely be created anywhere within a
14946 gevent-powered application.")
14947 (license license:expat)))
14949 (define-public python2-gipc
14950 (package-with-python2 python-gipc))
14952 (define-public python-fusepy
14954 (name "python-fusepy")
14959 (uri (pypi-uri "fusepy" version))
14962 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14963 (build-system python-build-system)
14966 (modify-phases %standard-phases
14967 (add-before 'build 'set-library-file-name
14968 (lambda* (#:key inputs #:allow-other-keys)
14969 (let ((fuse (assoc-ref inputs "fuse")))
14970 (substitute* "fuse.py"
14971 (("find_library\\('fuse'\\)")
14972 (string-append "'" fuse "/lib/libfuse.so'")))
14976 (home-page "https://github.com/fusepy/fusepy")
14977 (synopsis "Simple ctypes bindings for FUSE")
14978 (description "Python module that provides a simple interface to FUSE and
14979 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14980 (license license:isc)))
14982 (define-public python2-fusepy
14983 (package-with-python2 python-fusepy))
14985 (define-public python2-gdrivefs
14987 (name "python2-gdrivefs")
14992 (uri (pypi-uri "gdrivefs" version))
14995 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14996 (build-system python-build-system)
14998 `(#:python ,python-2
15000 (modify-phases %standard-phases
15001 (add-before 'build 'patch-setup-py
15003 ;; Update requirements from dependency==version
15004 ;; to dependency>=version
15005 (substitute* "gdrivefs/resources/requirements.txt"
15009 `(("python2-gipc" ,python2-gipc)
15010 ("python2-gevent" ,python2-gevent)
15011 ("python2-greenlet" ,python2-greenlet)
15012 ("python2-httplib2" ,python2-httplib2)
15013 ("python2-uritemplate" ,python2-uritemplate)
15014 ("python2-oauth2client" ,python2-oauth2client)
15015 ("python2-six" ,python2-six)))
15017 `(("python2-dateutil" ,python2-dateutil)
15018 ("python2-fusepy" ,python2-fusepy)
15019 ("python2-google-api-client" ,python2-google-api-client)))
15020 (home-page "https://github.com/dsoprea/GDriveFS")
15021 (synopsis "Mount Google Drive as a local file system")
15022 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15023 under Python 2.7.")
15024 (license license:gpl2)))
15026 (define-public pybind11
15032 (uri (git-reference
15033 (url "https://github.com/pybind/pybind11.git")
15034 (commit (string-append "v" version))))
15037 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15038 (file-name (git-file-name name version))))
15039 (build-system cmake-build-system)
15041 `(("python" ,python)
15042 ("python-pytest" ,python-pytest)))
15044 `(#:test-target "check"))
15045 (home-page "https://github.com/pybind/pybind11/")
15046 (synopsis "Seamless operability between C++11 and Python")
15047 (description "pybind11 is a lightweight header-only library that exposes
15048 C++ types in Python and vice versa, mainly to create Python bindings of
15049 existing C++ code. Its goals and syntax are similar to the excellent
15050 Boost.Python library by David Abrahams: to minimize boilerplate code in
15051 traditional extension modules by inferring type information using compile-time
15053 (license license:expat)))
15055 (define-public python-fasteners
15057 (name "python-fasteners")
15062 (uri (pypi-uri "fasteners" version))
15065 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15066 (build-system python-build-system)
15068 `(("python-monotonic" ,python-monotonic)
15069 ("python-six" ,python-six)
15070 ("python-testtools" ,python-testtools)))
15071 (home-page "https://github.com/harlowja/fasteners")
15072 (synopsis "Python package that provides useful locks")
15074 "This package provides a Python program that provides following locks:
15077 @item Locking decorator
15078 @item Reader-writer locks
15079 @item Inter-process locks
15080 @item Generic helpers
15082 (properties `((python2-variant . ,(delay python2-fasteners))))
15083 (license license:asl2.0)))
15085 (define-public python2-fasteners
15086 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15090 `(("python2-futures" ,python2-futures)
15091 ,@(package-propagated-inputs base))))))
15093 (define-public python-requests-file
15095 (name "python-requests-file")
15100 (uri (pypi-uri "requests-file" version))
15103 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15104 (build-system python-build-system)
15106 `(("python-requests" ,python-requests)
15107 ("python-six" ,python-six)))
15109 "https://github.com/dashea/requests-file")
15110 (synopsis "File transport adapter for Requests")
15112 "Requests-File is a transport adapter for use with the Requests Python
15113 library to allow local file system access via @code{file://} URLs.")
15114 (license license:asl2.0)))
15116 (define-public python2-requests-file
15117 (package-with-python2 python-requests-file))
15119 (define-public python-tldextract
15121 (name "python-tldextract")
15126 (uri (pypi-uri "tldextract" version))
15129 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15130 (build-system python-build-system)
15132 `(("python-pytest" ,python-pytest)
15133 ("python-responses" ,python-responses)))
15135 `(("python-idna" ,python-idna)
15136 ("python-requests" ,python-requests)
15137 ("python-requests-file" ,python-requests-file)))
15139 "https://github.com/john-kurkowski/tldextract")
15141 "Separate the TLD from the registered domain and subdomains of a URL")
15143 "TLDExtract accurately separates the TLD from the registered domain and
15144 subdomains of a URL, using the Public Suffix List. By default, this includes
15145 the public ICANN TLDs and their exceptions. It can optionally support the
15146 Public Suffix List's private domains as well.")
15147 (license license:bsd-3)))
15149 (define-public python2-tldextract
15150 (package-with-python2 python-tldextract))
15152 (define-public python-pynamecheap
15154 (name "python-pynamecheap")
15159 (uri (pypi-uri "PyNamecheap" version))
15162 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15163 (build-system python-build-system)
15165 `(("python-requests" ,python-requests)))
15167 "https://github.com/Bemmu/PyNamecheap")
15169 "Namecheap API client in Python")
15171 "PyNamecheap is a Namecheap API client in Python.")
15172 (license license:expat)))
15174 (define-public python2-pynamecheap
15175 (package-with-python2 python-pynamecheap))
15177 (define-public python-dns-lexicon
15179 (name "python-dns-lexicon")
15184 (uri (pypi-uri "dns-lexicon" version))
15187 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15188 (build-system python-build-system)
15190 `(#:tests? #f)) ;requires internet access
15192 `(("python-future" ,python-future)
15193 ("python-pynamecheap" ,python-pynamecheap)
15194 ("python-requests" ,python-requests)
15195 ("python-tldextract" ,python-tldextract)
15196 ("python-urllib3" ,python-urllib3)))
15197 (home-page "https://github.com/AnalogJ/lexicon")
15199 "Manipulate DNS records on various DNS providers")
15201 "Lexicon provides a way to manipulate DNS records on multiple DNS
15202 providers in a standardized way. It has a CLI but it can also be used as a
15203 Python library. It was designed to be used in automation, specifically with
15205 (license license:expat)))
15207 (define-public python2-dns-lexicon
15208 (package-with-python2 python-dns-lexicon))
15210 (define-public python-commandlines
15212 (name "python-commandlines")
15217 (uri (pypi-uri "commandlines" version))
15220 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15221 (build-system python-build-system)
15222 (home-page "https://github.com/chrissimpkins/commandlines")
15223 (synopsis "Command line argument to object parsing library")
15225 "@code{Commandlines} is a Python library for command line application
15226 development that supports command line argument parsing, command string
15227 validation testing and application logic.")
15228 (license license:expat)))
15230 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15231 ;; python-numba. They have a very unflexible relationship.
15232 (define-public python-numba
15234 (name "python-numba")
15239 (uri (pypi-uri "numba" version))
15242 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15243 (build-system python-build-system)
15245 `(#:modules ((guix build utils)
15246 (guix build python-build-system)
15251 (modify-phases %standard-phases
15252 (add-after 'unpack 'disable-proprietary-features
15254 (setenv "NUMBA_DISABLE_HSA" "1")
15255 (setenv "NUMBA_DISABLE_CUDA" "1")
15257 (add-after 'unpack 'remove-failing-tests
15259 ;; FIXME: these tests fail for unknown reasons:
15260 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15261 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15262 (substitute* "numba/tests/test_dispatcher.py"
15263 (("def test(_non_writable_pycache)" _ m)
15264 (string-append "def guix_skip" m))
15265 (("def test(_non_creatable_pycache)" _ m)
15266 (string-append "def guix_skip" m))
15267 (("def test(_frozen)" _ m)
15268 (string-append "def guix_skip" m)))
15270 ;; These tests fail because we don't run the tests from the build
15271 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15272 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15273 (substitute* "numba/tests/test_pycc.py"
15274 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15275 (string-append "def guix_skip" m)))
15279 (let ((cwd (getcwd)))
15280 (setenv "PYTHONPATH"
15281 (string-append cwd "/build/"
15282 (find (cut string-prefix? "lib" <>)
15283 (scandir (string-append cwd "/build")))
15285 (getenv "PYTHONPATH")))
15286 ;; Something is wrong with the PYTHONPATH when running the
15287 ;; tests from the build directory, as it complains about not being
15288 ;; able to import certain modules.
15289 (with-directory-excursion "/tmp"
15290 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15293 `(("python-llvmlite" ,python-llvmlite)
15294 ("python-numpy" ,python-numpy)
15295 ("python-singledispatch" ,python-singledispatch)))
15296 ;; Needed for tests.
15298 `(("python-jinja2" ,python-jinja2)
15299 ("python-pygments" ,python-pygments)))
15300 (home-page "https://numba.pydata.org")
15301 (synopsis "Compile Python code using LLVM")
15302 (description "Numba gives you the power to speed up your applications with
15303 high performance functions written directly in Python. With a few
15304 annotations, array-oriented and math-heavy Python code can be just-in-time
15305 compiled to native machine instructions, similar in performance to C, C++ and
15306 Fortran, without having to switch languages or Python interpreters.
15308 Numba works by generating optimized machine code using the LLVM compiler
15309 infrastructure at import time, runtime, or statically (using the included pycc
15311 (license license:bsd-3)))
15313 (define-public python-anndata
15315 (name "python-anndata")
15320 (uri (pypi-uri "anndata" version))
15323 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15324 (build-system python-build-system)
15326 `(("python-h5py" ,python-h5py)
15327 ("python-natsort" ,python-natsort)
15328 ("python-pandas" ,python-pandas)
15329 ("python-scipy" ,python-scipy)))
15330 (home-page "https://github.com/theislab/anndata")
15331 (synopsis "Annotated data for data analysis pipelines")
15332 (description "Anndata is a package for simple (functional) high-level APIs
15333 for data analysis pipelines. In this context, it provides an efficient,
15334 scalable way of keeping track of data together with learned annotations and
15335 reduces the code overhead typically encountered when using a mostly
15336 object-oriented library such as @code{scikit-learn}.")
15337 (license license:bsd-3)))
15339 (define-public python-dill
15341 (name "python-dill")
15346 (uri (pypi-uri "dill" version))
15348 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15349 (build-system python-build-system)
15350 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15351 (arguments '(#:tests? #f))
15352 (home-page "https://pypi.org/project/dill")
15353 (synopsis "Serialize all of Python")
15354 (description "Dill extends Python's @code{pickle} module for serializing
15355 and de-serializing Python objects to the majority of the built-in Python
15356 types. Dill provides the user the same interface as the @code{pickle} module,
15357 and also includes some additional features. In addition to pickling Python
15358 objects, @code{dill} provides the ability to save the state of an interpreter
15359 session in a single command. Hence, it would be feasible to save a
15360 interpreter session, close the interpreter, ship the pickled file to another
15361 computer, open a new interpreter, unpickle the session and thus continue from
15362 the saved state of the original interpreter session.")
15363 (license license:bsd-3)))
15365 (define-public python-multiprocess
15367 (name "python-multiprocess")
15368 (version "0.70.6.1")
15372 (uri (pypi-uri "multiprocess" version))
15375 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15376 (build-system python-build-system)
15378 `(("python-dill" ,python-dill)))
15379 (home-page "https://pypi.org/project/multiprocess")
15380 (synopsis "Multiprocessing and multithreading in Python")
15382 "This package is a fork of the multiprocessing Python package, a package
15383 which supports the spawning of processes using the API of the standard
15384 library's @code{threading} module.")
15385 (license license:bsd-3)))
15387 (define-public python-toolz
15389 (name "python-toolz")
15394 (uri (pypi-uri "toolz" version))
15397 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15398 (build-system python-build-system)
15399 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15400 ;; unregistered loader type"
15401 (arguments '(#:tests? #f))
15402 (home-page "https://github.com/pytoolz/toolz/")
15403 (synopsis "List processing tools and functional utilities")
15405 "This package provides a set of utility functions for iterators,
15406 functions, and dictionaries.")
15407 (license license:bsd-3)))
15409 (define-public python2-toolz
15410 (package-with-python2 python-toolz))
15412 (define-public python-cytoolz
15414 (name "python-cytoolz")
15415 (version "0.9.0.1")
15419 (uri (pypi-uri "cytoolz" version))
15422 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15423 (build-system python-build-system)
15424 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15426 (arguments '(#:tests? #f))
15428 `(("python-toolz" ,python-toolz)))
15430 `(("python-cython" ,python-cython)))
15431 (home-page "https://github.com/pytoolz/cytoolz")
15432 (synopsis "High performance functional utilities")
15434 "The cytoolz package implements the same API as provided by toolz. The
15435 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15436 that is accessible to other projects developed in Cython.")
15437 (license license:bsd-3)))
15439 (define-public python-sortedcontainers
15441 (name "python-sortedcontainers")
15446 (uri (pypi-uri "sortedcontainers" version))
15449 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15450 (build-system python-build-system)
15452 `(("python-tox" ,python-tox)))
15453 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15454 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15456 "This package provides a sorted collections library, written in
15458 (license license:asl2.0)))
15460 (define-public python-cloudpickle
15462 (name "python-cloudpickle")
15467 (uri (pypi-uri "cloudpickle" version))
15470 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15471 (build-system python-build-system)
15472 ;; FIXME: there are 5 errors in 122 tests:
15473 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15474 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15475 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15476 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15477 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15478 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15479 (arguments '(#:tests? #f))
15481 `(("python-pytest" ,python-pytest)
15482 ("python-mock" ,python-mock)
15483 ("python-tornado" ,python-tornado)))
15484 (home-page "https://github.com/cloudpipe/cloudpickle")
15485 (synopsis "Extended pickling support for Python objects")
15487 "Cloudpickle makes it possible to serialize Python constructs not
15488 supported by the default pickle module from the Python standard library. It
15489 is especially useful for cluster computing where Python expressions are
15490 shipped over the network to execute on remote hosts, possibly close to the
15492 (license license:bsd-3)))
15494 (define-public python2-cloudpickle
15495 (package-with-python2 python-cloudpickle))
15497 (define-public python-locket
15499 (name "python-locket")
15504 (uri (pypi-uri "locket" version))
15507 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15508 (build-system python-build-system)
15509 (home-page "https://github.com/mwilliamson/locket.py")
15510 (synopsis "File-based locks for Python")
15512 "Locket implements a lock that can be used by multiple processes provided
15513 they use the same path.")
15514 (license license:bsd-2)))
15516 (define-public python2-locket
15517 (package-with-python2 python-locket))
15519 (define-public python-blosc
15521 (name "python-blosc")
15526 (uri (pypi-uri "blosc" version))
15529 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15530 (build-system python-build-system)
15531 ;; FIXME: all tests pass, but then this error is printed:
15532 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15533 (arguments '(#:tests? #f))
15535 `(("python-numpy" ,python-numpy)))
15536 (home-page "https://github.com/blosc/python-blosc")
15537 (synopsis "Python wrapper for the Blosc data compressor library")
15538 (description "Blosc is a high performance compressor optimized for binary
15539 data. It has been designed to transmit data to the processor cache faster
15540 than the traditional, non-compressed, direct memory fetch approach via a
15541 @code{memcpy()} system call.
15543 Blosc works well for compressing numerical arrays that contains data with
15544 relatively low entropy, like sparse data, time series, grids with
15545 regular-spaced values, etc.
15547 This Python package wraps the Blosc library.")
15548 (license license:bsd-3)))
15550 (define-public python2-blosc
15551 (package-with-python2 python-blosc))
15553 (define-public python-partd
15555 (name "python-partd")
15560 (uri (pypi-uri "partd" version))
15563 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15564 (build-system python-build-system)
15566 `(("python-blosc" ,python-blosc)
15567 ("python-locket" ,python-locket)
15568 ("python-numpy" ,python-numpy)
15569 ("python-pandas" ,python-pandas)
15570 ("python-pyzmq" ,python-pyzmq)
15571 ("python-toolz" ,python-toolz)))
15572 (home-page "https://github.com/dask/partd/")
15573 (synopsis "Appendable key-value storage")
15574 (description "Partd stores key-value pairs. Values are raw bytes. We
15575 append on old values. Partd excels at shuffling operations.")
15576 (license license:bsd-3)))
15578 (define-public python2-partd
15579 (package-with-python2 python-partd))
15581 (define-public python-dask
15583 (name "python-dask")
15588 (uri (pypi-uri "dask" version))
15590 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15591 (build-system python-build-system)
15592 ;; A single test out of 5000+ fails. This test is marked as xfail when
15593 ;; pytest-xdist is used.
15596 (modify-phases %standard-phases
15597 (add-after 'unpack 'disable-broken-test
15599 (substitute* "dask/tests/test_threaded.py"
15600 (("def test_interrupt\\(\\)" m)
15601 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15603 (when (which "python2")
15604 ;; This test fails with recent Pandas:
15605 ;; <https://github.com/dask/dask/issues/3794>.
15606 (substitute* "dask/dataframe/tests/test_dataframe.py"
15607 (("def test_info\\(\\)" m)
15608 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15612 (lambda _ (invoke "pytest" "-vv"))))))
15614 `(("python-cloudpickle" ,python-cloudpickle)
15615 ("python-numpy" ,python-numpy)
15616 ("python-pandas" ,python-pandas)
15617 ("python-partd" ,python-partd)
15618 ("python-toolz" ,python-toolz)
15619 ("python-pyyaml" ,python-pyyaml)))
15621 `(("python-pytest" ,python-pytest)
15622 ("python-pytest-runner" ,python-pytest-runner)))
15623 (home-page "https://github.com/dask/dask/")
15624 (synopsis "Parallel computing with task scheduling")
15626 "Dask is a flexible parallel computing library for analytics. It
15627 consists of two components: dynamic task scheduling optimized for computation,
15628 and large data collections like parallel arrays, dataframes, and lists that
15629 extend common interfaces like NumPy, Pandas, or Python iterators to
15630 larger-than-memory or distributed environments. These parallel collections
15631 run on top of the dynamic task schedulers. ")
15632 (license license:bsd-3)))
15634 (define-public python2-dask
15635 (package-with-python2 python-dask))
15637 (define-public python-ilinkedlist
15639 (name "python-ilinkedlist")
15644 (uri (pypi-uri "ilinkedlist" version))
15647 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15648 (build-system python-build-system)
15649 (native-inputs `(("python-pytest" ,python-pytest)))
15650 (inputs `(("python" ,python)))
15651 (home-page "https://github.com/luther9/ilinkedlist-py")
15652 (synopsis "Immutable linked list library")
15654 "This is a implementation of immutable linked lists for Python. It
15655 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15656 Since a linked list is treated as immutable, it is hashable, and its length
15657 can be retrieved in constant time. Some of the terminology is inspired by
15658 LISP. It is possible to create an improper list by creating a @code{Pair}
15659 with a non-list @code{cdr}.")
15660 (license license:gpl3+)))
15662 (define-public python-readlike
15664 (name "python-readlike")
15669 (uri (pypi-uri "readlike" version))
15671 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15672 (build-system python-build-system)
15673 (home-page "https://github.com/jangler/readlike")
15674 (synopsis "GNU Readline-like line editing module")
15676 "This Python module provides line editing functions similar to the default
15677 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15678 @code{readline} package, this one allows access to those capabilties in settings
15679 outside of a standard command-line interface. It is especially well-suited to
15680 interfacing with Urwid, due to a shared syntax for describing key inputs.
15682 Currently, all stateless Readline commands are implemented. Yanking and history
15683 are not supported.")
15684 (license license:expat)))
15686 (define-public python2-readlike
15687 (package-with-python2 python-readlike))
15689 (define-public python-reparser
15691 (name "python-reparser")
15696 (uri (pypi-uri "ReParser" version))
15698 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15699 (build-system python-build-system)
15700 (home-page "https://github.com/xmikos/reparser")
15701 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15703 "This Python library provides a simple lexer/parser for inline markup based
15704 on regular expressions.")
15705 (license license:expat)))
15707 (define-public python2-reparser
15708 (let ((reparser (package-with-python2
15709 (strip-python2-variant python-reparser))))
15710 (package (inherit reparser)
15712 `(("python2-enum34" ,python2-enum34)
15713 ,@(package-propagated-inputs reparser))))))
15715 (define-public python-precis-i18n
15717 (name "python-precis-i18n")
15722 (uri (pypi-uri "precis_i18n" version))
15725 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15726 (build-system python-build-system)
15727 (home-page "https://github.com/byllyfish/precis_i18n")
15728 (synopsis "Implementation of the PRECIS framework")
15730 "This module implements the PRECIS Framework as described in RFC 8264,
15731 RFC 8265 and RFC 8266.")
15732 (license license:expat)))
15734 (define-public python-absl-py
15736 (name "python-absl-py")
15741 (uri (pypi-uri "absl-py" version))
15744 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15745 (build-system python-build-system)
15747 `(("python-six" ,python-six)))
15748 (home-page "https://github.com/abseil/abseil-py")
15749 (synopsis "Abseil Python common libraries")
15751 "This package provides the Abseil Python Common Libraries, a collection
15752 of Python libraries for building Python applications.")
15753 (license license:asl2.0)))
15755 (define-public python-astor
15757 (name "python-astor")
15762 (uri (pypi-uri "astor" version))
15765 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15766 (build-system python-build-system)
15767 ;; FIXME: There are two errors and two test failures.
15768 (arguments `(#:tests? #f))
15769 (home-page "https://github.com/berkerpeksag/astor")
15770 (synopsis "Read and write Python ASTs")
15771 (description "Astor is designed to allow easy manipulation of Python
15772 source via the Abstract Syntax Tree.")
15773 (license license:bsd-3)))
15775 (define-public python2-astor
15776 (package-with-python2 python-astor))
15778 (define-public python-grpcio
15780 (name "python-grpcio")
15785 (uri (pypi-uri "grpcio" version))
15788 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15789 (build-system python-build-system)
15791 `(("python-six" ,python-six)))
15792 (home-page "https://grpc.io")
15793 (synopsis "HTTP/2-based RPC framework")
15794 (description "This package provides a Python library for communicating
15795 with the HTTP/2-based RPC framework gRPC.")
15796 (license license:asl2.0)))
15798 (define-public python-astunparse
15800 (name "python-astunparse")
15805 (uri (pypi-uri "astunparse" version))
15807 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15808 (build-system python-build-system)
15809 (arguments '(#:tests? #f)) ; there are none
15811 `(("python-six" ,python-six)
15812 ("python-wheel" ,python-wheel)))
15813 (home-page "https://github.com/simonpercivall/astunparse")
15814 (synopsis "AST unparser for Python")
15815 (description "This package provides an AST unparser for Python. It is a
15816 factored out version of @code{unparse} found in the Python source
15818 (license license:bsd-3)))
15820 (define-public python-gast
15822 (name "python-gast")
15827 (uri (pypi-uri "gast" version))
15829 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15830 (build-system python-build-system)
15832 `(("python-astunparse" ,python-astunparse)))
15833 (home-page "https://pypi.org/project/gast/")
15834 (synopsis "Generic Python AST that abstracts the underlying Python version")
15836 "GAST provides a compatibility layer between the AST of various Python
15837 versions, as produced by @code{ast.parse} from the standard @code{ast}
15839 (license license:bsd-3)))
15841 (define-public python-wikidata
15843 (name "python-wikidata")
15848 (uri (pypi-uri "Wikidata" version))
15851 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15852 (build-system python-build-system)
15854 `(("python-babel" ,python-babel)))
15855 (home-page "https://github.com/dahlia/wikidata")
15856 (synopsis "Wikidata client library")
15858 "This package provides a Python interface to
15859 @url{https://www.wikidata.org/, Wikidata}.")
15860 (properties '((upstream-name . "Wikidata")))
15861 (license license:gpl3+)))
15863 (define-public python-doctest-ignore-unicode
15865 (name "python-doctest-ignore-unicode")
15870 (uri (pypi-uri "doctest-ignore-unicode" version))
15873 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15874 (build-system python-build-system)
15876 `(("python-nose" ,python-nose)))
15877 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15878 (synopsis "Ignore Unicode literal prefixes in doctests")
15880 "This package adds support for a flag to ignore Unicode literal prefixes
15882 (license license:asl2.0)))
15884 (define-public python-attr
15886 (name "python-attr")
15891 (uri (pypi-uri "attr" version))
15894 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15895 (build-system python-build-system)
15896 (home-page "https://github.com/denis-ryzhkov/attr")
15897 (synopsis "Decorator for attributes of target function or class")
15898 (description "Simple decorator to set attributes of target function or
15899 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15900 (license license:expat)))
15902 (define-public python-construct
15904 (name "python-construct")
15909 (uri (pypi-uri "construct" version))
15912 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15913 (build-system python-build-system)
15915 `(#:tests? #f)) ; No tests exist.
15917 `(("python-extras" ,python-extras)
15918 ("python-arrow" ,python-arrow)
15919 ("python-numpy" ,python-numpy)
15920 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15921 (home-page "http://construct.readthedocs.io")
15922 (synopsis "Declarative and symmetrical parser and builder for binary data")
15924 "This package provides both simple, atomic constructs (such as
15925 integers of various sizes), as well as composite ones which allow you
15926 form hierarchical and sequential structures of increasing complexity.
15927 It features bit and byte granularity, easy debugging and testing, an
15928 easy-to-extend subclass system, and lots of primitive constructs to
15929 make your work easier.")
15930 (license license:expat)))
15932 (define-public python-humanize
15934 (name "python-humanize")
15939 (uri (pypi-uri "humanize" version))
15942 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15944 '(#:tests? #f)) ; tests not in pypi archive
15945 (build-system python-build-system)
15946 (home-page "https://github.com/jmoiron/humanize")
15947 (synopsis "Print numerical information in a human-readable form")
15948 (description "This package provides a Python module that displays numbers
15949 and dates in \"human readable\" forms. For example, it would display
15950 \"12345591313\" as \"12.3 billion\".")
15951 (license license:expat)))
15953 (define-public python-txaio
15955 (name "python-txaio")
15960 (uri (pypi-uri "txaio" version))
15963 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15964 (build-system python-build-system)
15966 `(("python-twisted" ,python-twisted)
15967 ("python-six" ,python-six)))
15968 (home-page "https://github.com/crossbario/txaio")
15969 (synopsis "Compatibility layer between Python asyncio and Twisted")
15970 (description "Txaio provides a compatibility layer between the Python
15971 @code{asyncio} module and @code{Twisted}.")
15972 (license license:expat)))
15974 (define-public python-toolshed
15976 (name "python-toolshed")
15981 (uri (pypi-uri "toolshed" version))
15984 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15985 (build-system python-build-system)
15987 `(("python-nose" ,python-nose)))
15988 (home-page "https://github.com/brentp/toolshed/")
15989 (synopsis "Collection of modules and functions for working with data")
15990 (description "This is a collection of well-tested, simple modules and
15991 functions that aim to reduce boilerplate when working with data.")
15992 (license license:bsd-2)))
15994 (define-public python-annoy
15996 (name "python-annoy")
16001 (uri (pypi-uri "annoy" version))
16004 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16005 (build-system python-build-system)
16007 `(("python-nose" ,python-nose)))
16008 (home-page "https://github.com/spotify/annoy/")
16009 (synopsis "Approximate nearest neighbors library")
16011 "Annoy is a C++ library with Python bindings to search for points in
16012 space that are close to a given query point. It also creates large read-only
16013 file-based data structures that are @code{mmap}ped into memory so that many
16014 processes may share the same data.")
16015 (license license:asl2.0)))
16017 (define-public python-pylzma
16019 (name "python-pylzma")
16024 (uri (pypi-uri "pylzma" version))
16027 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16028 (build-system python-build-system)
16029 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16030 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16031 (description "This package provides Python bindings for the LZMA library
16033 (license license:lgpl2.1+)))
16035 (define-public python2-pylzma
16036 (package-with-python2 python-pylzma))
16038 (define-public python2-zeroconf
16040 (name "python2-zeroconf")
16042 ;; This is the last version that supports Python 2.x.
16047 (uri (pypi-uri "zeroconf" version))
16050 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16051 (build-system python-build-system)
16053 `(#:python ,python-2
16055 (modify-phases %standard-phases
16056 (add-after 'unpack 'patch-requires
16057 (lambda* (#:key inputs #:allow-other-keys)
16058 (substitute* "setup.py"
16063 `(("python2-six" ,python2-six)
16064 ("python2-enum32" ,python2-enum34)
16065 ("python2-netifaces" ,python2-netifaces)
16066 ("python2-typing" ,python2-typing)))
16067 (home-page "https://github.com/jstasiak/python-zeroconf")
16068 (synopsis "Pure Python mDNS service discovery")
16070 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16072 (license license:lgpl2.1+)))
16074 (define-public python-bsddb3
16076 (name "python-bsddb3")
16081 (uri (pypi-uri "bsddb3" version))
16084 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16085 (build-system python-build-system)
16090 (modify-phases %standard-phases
16091 (add-after 'unpack 'configure-locations
16092 (lambda* (#:key inputs #:allow-other-keys)
16093 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16094 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16098 (invoke "python3" "test3.py" "-v"))))))
16099 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16100 (synopsis "Python bindings for Oracle Berkeley DB")
16102 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16103 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16104 Transaction objects, and each of these is exposed as a Python type in the
16105 bsddb3.db module. The database objects can use various access methods: btree,
16106 hash, recno, and queue. Complete support of Berkeley DB distributed
16107 transactions. Complete support for Berkeley DB Replication Manager.
16108 Complete support for Berkeley DB Base Replication. Support for RPC.")
16109 (license license:bsd-3)))
16111 (define-public python-dbfread
16113 (name "python-dbfread")
16117 (uri (pypi-uri "dbfread" version))
16120 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16121 (build-system python-build-system)
16123 `(("python-pytest" ,python-pytest)))
16124 (home-page "https://dbfread.readthedocs.io")
16125 (synopsis "Read DBF Files with Python")
16127 "This library reads DBF files and returns the data as native Python data
16128 types for further processing. It is primarily intended for batch jobs and
16130 (license license:expat)))
16132 (define-public python-cached-property
16134 (name "python-cached-property")
16139 (uri (pypi-uri "cached-property" version))
16142 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16143 (build-system python-build-system)
16146 (modify-phases %standard-phases
16147 ;; https://github.com/pydanny/cached-property/issues/131
16148 ;; recent versions of freezegun break one test
16149 (add-after 'unpack 'disable-broken-test
16151 (substitute* "tests/test_cached_property.py"
16152 (("def test_threads_ttl_expiry\\(self\\)" m)
16153 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16157 `(("python-freezegun" ,python-freezegun)))
16159 "https://github.com/pydanny/cached-property")
16161 "Decorator for caching properties in classes")
16163 "This package provides a decorator which makes caching
16164 time-or-computationally-expensive properties quick and easy and works in Python
16166 (license license:bsd-3)))
16168 (define-public python-folium
16170 (name "python-folium")
16175 (uri (pypi-uri "folium" version))
16178 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16179 (build-system python-build-system)
16181 `(("python-branca" ,python-branca)
16182 ("python-jinja2" ,python-jinja2)
16183 ("python-numpy" ,python-numpy)
16184 ("python-requests" ,python-requests)))
16186 `(("python-pytest" ,python-pytest)))
16187 (home-page "https://github.com/python-visualization/folium")
16188 (synopsis "Make beautiful maps with Leaflet.js & Python")
16189 (description "@code{folium} makes it easy to visualize data that’s been
16190 manipulated in Python on an interactive leaflet map. It enables both the
16191 binding of data to a map for @code{choropleth} visualizations as well as
16192 passing rich vector/raster/HTML visualizations as markers on the map.
16194 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16195 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16196 supports Image, Video, GeoJSON and TopoJSON overlays.")
16197 (license license:expat)))
16199 (define-public jube
16201 ;; This is a command-line tool, so no "python-" prefix.
16206 (uri (string-append
16207 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16211 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16212 (file-name (string-append "jube-" version ".tar.gz"))))
16213 (build-system python-build-system)
16214 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16215 (synopsis "Benchmarking environment")
16217 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16218 benchmarked application, benchmark data is stored in a format that allows JUBE
16219 to deduct the desired information. This data can be parsed by automatic pre-
16220 and post-processing scripts that draw information and store it more densely
16221 for manual interpretation.")
16222 (license license:gpl3+)))
16224 (define-public python-pyroutelib3
16226 (name "python-pyroutelib3")
16227 (version "1.3.post1")
16231 (uri (pypi-uri "pyroutelib3" version))
16234 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16235 (build-system python-build-system)
16237 `(("python-dateutil" ,python-dateutil)))
16238 (home-page "https://github.com/MKuranowski/pyroutelib3")
16239 (synopsis "Library for simple routing on OSM data")
16240 (description "Library for simple routing on OSM data")
16241 (license license:gpl3+)))
16243 (define-public python-elementpath
16245 (name "python-elementpath")
16250 (uri (pypi-uri "elementpath" version))
16253 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16254 (build-system python-build-system)
16256 "https://github.com/sissaschool/elementpath")
16258 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16260 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16261 for Python's ElementTree XML data structures, both for the standard
16262 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16264 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16265 because lxml.etree already has it's own implementation of XPath 1.0.")
16266 (license license:expat)))