1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
70 ;;; This file is part of GNU Guix.
72 ;;; GNU Guix is free software; you can redistribute it and/or modify it
73 ;;; under the terms of the GNU General Public License as published by
74 ;;; the Free Software Foundation; either version 3 of the License, or (at
75 ;;; your option) any later version.
77 ;;; GNU Guix is distributed in the hope that it will be useful, but
78 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
79 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 ;;; GNU General Public License for more details.
82 ;;; You should have received a copy of the GNU General Public License
83 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85 (define-module (gnu packages python-xyz)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (gnu packages)
88 #:use-module (gnu packages algebra)
89 #:use-module (gnu packages adns)
90 #:use-module (gnu packages attr)
91 #:use-module (gnu packages backup)
92 #:use-module (gnu packages bash)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages databases)
97 #:use-module (gnu packages dbm)
98 #:use-module (gnu packages file)
99 #:use-module (gnu packages fontutils)
100 #:use-module (gnu packages gcc)
101 #:use-module (gnu packages geo)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages graphviz)
106 #:use-module (gnu packages graphics)
107 #:use-module (gnu packages gstreamer)
108 #:use-module (gnu packages gtk)
109 #:use-module (gnu packages icu4c)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages libevent)
113 #:use-module (gnu packages libffi)
114 #:use-module (gnu packages linux)
115 #:use-module (gnu packages llvm)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages maths)
118 #:use-module (gnu packages monitoring)
119 #:use-module (gnu packages multiprecision)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages openstack)
123 #:use-module (gnu packages pcre)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages readline)
133 #:use-module (gnu packages sdl)
134 #:use-module (gnu packages search)
135 #:use-module (gnu packages shells)
136 #:use-module (gnu packages sphinx)
137 #:use-module (gnu packages ssh)
138 #:use-module (gnu packages terminals)
139 #:use-module (gnu packages tex)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages video)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages base)
147 #:use-module (gnu packages xml)
148 #:use-module (gnu packages xorg)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages tcl)
151 #:use-module (gnu packages bdw-gc)
152 #:use-module (gnu packages serialization)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix hg-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system gnu)
159 #:use-module (guix build-system cmake)
160 #:use-module (guix build-system python)
161 #:use-module (guix build-system trivial)
162 #:use-module (srfi srfi-1)
163 #:use-module (srfi srfi-26))
165 (define-public python-psutil
167 (name "python-psutil")
172 (uri (pypi-uri "psutil" version))
175 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
176 (build-system python-build-system)
178 ;; FIXME: some tests does not return and times out.
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
201 (define-public python-shapely
203 (name "python-shapely")
204 (version "1.6.4.post2")
208 (uri (pypi-uri "Shapely" version))
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
221 `(("python-numpy" ,python-numpy)))
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
244 (define-public python-shortuuid
246 (name "python-shortuuid")
251 (uri (pypi-uri "shortuuid" version))
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
266 (define-public python-logwrap
268 (name "python-logwrap")
273 (uri (pypi-uri "logwrap" version ".zip"))
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
296 (define-public python-clyent
298 (name "python-clyent")
303 (uri (pypi-uri "clyent" version))
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
319 (define-public python-babel
321 (name "python-babel")
326 (uri (pypi-uri "Babel" version))
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
335 `(("python-pytz" ,python-pytz)))
337 `(#:phases (modify-phases %standard-phases
340 (invoke "pytest" "-vv" "-k"
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
349 "Tools for internationalizing Python applications")
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
356 (license license:bsd-3)))
358 (define-public python2-babel
359 (package-with-python2 python-babel))
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
364 (inherit python2-babel)
368 (uri (pypi-uri "Babel" version))
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373 (define-public python2-backport-ssl-match-hostname
375 (name "python2-backport-ssl-match-hostname")
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
397 (define-public python-hdf4
404 (uri (pypi-uri name version))
407 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
408 (build-system python-build-system)
409 (native-inputs `(("nose" ,python-nose)))
410 (propagated-inputs `(("numpy" ,python-numpy)))
417 (modify-phases %standard-phases
420 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
421 ;; on to import numpy. Somehow this works on their CI system.
422 ;; Let's just manage PYTHONPATH here instead.
423 (substitute* "runexamples.sh"
424 (("export PYTHONPATH=.*") ""))
426 (string-append (getcwd) ":"
427 (getenv "PYTHONPATH")))
428 (invoke "./runexamples.sh")
429 (invoke "nosetests" "-v"))))))
430 (home-page "https://github.com/fhs/python-hdf4")
431 (synopsis "Python interface to the NCSA HDF4 library")
433 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
434 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
435 NetCDF files can also be read and modified. Python-HDF4 is a fork of
436 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
437 (license license:expat)))
439 (define-public python2-hdf4
440 (package-with-python2 python-hdf4))
442 (define-public python-h5py
449 (uri (pypi-uri "h5py" version))
452 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
453 (build-system python-build-system)
455 `(#:tests? #f ; no test target
457 (modify-phases %standard-phases
458 (add-after 'unpack 'fix-hdf5-paths
459 (lambda* (#:key inputs #:allow-other-keys)
460 (let ((prefix (assoc-ref inputs "hdf5")))
461 (substitute* "setup_build.py"
462 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
463 (string-append "['" prefix "/lib" "']"))
464 (("'/opt/local/include', '/usr/local/include'")
465 (string-append "'" prefix "/include" "'")))
466 (substitute* "setup_configure.py"
467 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
468 (string-append "['" prefix "/lib" "']")))
471 `(("python-six" ,python-six)
472 ("python-numpy" ,python-numpy)))
476 `(("python-cython" ,python-cython)
477 ("python-pkgconfig" ,python-pkgconfig)))
478 (home-page "http://www.h5py.org/")
479 (synopsis "Read and write HDF5 files from Python")
481 "The h5py package provides both a high- and low-level interface to the
482 HDF5 library from Python. The low-level interface is intended to be a
483 complete wrapping of the HDF5 API, while the high-level component supports
484 access to HDF5 files, datasets and groups using established Python and NumPy
486 (license license:bsd-3)))
488 (define-public python2-h5py
489 (package-with-python2 python-h5py))
491 (define-public python-sh
498 (uri (pypi-uri "sh" version))
501 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
502 (build-system python-build-system)
505 (modify-phases %standard-phases
508 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
509 (setenv "HOME" "/tmp")
510 (invoke "python" "sh.py" "test"))))))
512 `(("python-coverage" ,python-coverage)))
513 (home-page "https://github.com/amoffat/sh")
514 (synopsis "Python subprocess replacement")
515 (description "This package provides a replacement for Python's
516 @code{subprocess} feature.")
517 (license license:expat)))
519 (define-public python2-sh
520 (package-with-python2 python-sh))
522 (define-public python-cftime
524 (name "python-cftime")
529 (uri (pypi-uri "cftime" version))
532 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
533 (build-system python-build-system)
535 `(("python-numpy" ,python-numpy)))
537 `(("python-coveralls" ,python-coveralls)
538 ("python-cython" ,python-cython)
539 ("python-pytest-cov" ,python-pytest-cov)))
540 (home-page "https://github.com/Unidata/cftime")
541 (synopsis "Library for time handling")
543 "This package provides time-handling functionality that used to be part
544 of the netcdf4 package before.")
545 ;; This package claims to include code under the GPLv3 but is released
547 (license (list license:isc license:gpl3+))))
549 (define-public python-netcdf4
551 (name "python-netcdf4")
556 (uri (pypi-uri "netCDF4" version))
559 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
560 (build-system python-build-system)
563 (modify-phases %standard-phases
564 (add-after 'unpack 'configure-locations
565 (lambda* (#:key inputs #:allow-other-keys)
566 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
569 `(("python-cython" ,python-cython)))
571 `(("python-numpy" ,python-numpy)
572 ("python-cftime" ,python-cftime)))
577 (home-page "https://github.com/Unidata/netcdf4-python")
578 (synopsis "Python/numpy interface to the netCDF library")
579 (description "Netcdf4-python is a Python interface to the netCDF C
580 library. netCDF version 4 has many features not found in earlier
581 versions of the library and is implemented on top of HDF5. This module
582 can read and write files in both the new netCDF 4 and the old netCDF 3
583 format, and can create files that are readable by HDF5 clients. The
584 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
585 to users of that module.")
586 ;; The software is mainly ISC, but includes some files covered
587 ;; by the Expat license.
588 (license (list license:isc license:expat))))
590 (define-public python2-netcdf4
591 (package-with-python2 python-netcdf4))
593 (define-public python-lockfile
595 (name "python-lockfile")
600 (uri (pypi-uri "lockfile" version))
603 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
604 (build-system python-build-system)
605 (arguments '(#:test-target "check"))
607 `(("python-pbr" ,python-pbr)))
608 (home-page "https://launchpad.net/pylockfile")
609 (synopsis "Platform-independent file locking module")
611 "The lockfile package exports a LockFile class which provides a simple
612 API for locking files.")
613 (license license:expat)))
615 (define-public python2-lockfile
616 (package-with-python2 python-lockfile))
618 (define-public python-semantic-version
620 (name "python-semantic-version")
625 (uri (pypi-uri "semantic_version" version))
628 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
629 (build-system python-build-system)
631 `(#:tests? #f)) ; PyPI tarball lacks tests
632 (home-page "https://github.com/rbarrois/python-semanticversion")
633 (synopsis "Semantic versioning module for Python")
635 "The @code{semantic_version} class is a small library for handling
636 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
638 It can compare versions, generate a new version that represents a bump in one of
639 the version levels, and check whether any given string is a proper semantic
640 version identifier.")
641 (license license:bsd-3)))
643 (define-public python2-semantic-version
644 (package-with-python2 python-semantic-version))
646 (define-public python-serpent
648 (name "python-serpent")
653 (uri (pypi-uri "serpent" version))
655 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
656 (build-system python-build-system)
658 `(("python-attrs" ,python-attrs)
659 ("python-pytz" ,python-pytz)))
660 (home-page "https://github.com/irmen/Serpent")
661 (synopsis "Serializer for literal Python expressions")
663 "Serpent provides @code{ast.literal_eval()}-compatible object tree
664 serialization. It serializes an object tree into bytes (an utf-8 encoded
665 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
666 to rebuild the original object tree.
668 Because only safe literals are encoded, it is safe to send serpent data to
669 other machines, such as over the network.")
670 (license license:expat)))
672 (define-public python-setuptools
674 (name "python-setuptools")
679 (uri (pypi-uri "setuptools" version ".zip"))
682 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
683 (modules '((guix build utils)))
686 ;; Remove included binaries which are used to build self-extracting
687 ;; installers for Windows.
688 ;; TODO: Find some way to build them ourself so we can include them.
689 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
691 (build-system python-build-system)
692 ;; FIXME: Tests require pytest, which itself relies on setuptools.
693 ;; One could bootstrap with an internal untested setuptools.
696 (home-page "https://pypi.python.org/pypi/setuptools")
698 "Library designed to facilitate packaging Python projects")
700 "Setuptools is a fully-featured, stable library designed to facilitate
701 packaging Python projects, where packaging includes:
702 Python package and module definitions,
703 distribution package metadata,
705 project installation,
706 platform-specific details,
708 ;; TODO: setuptools now bundles the following libraries:
709 ;; packaging, pyparsing, six and appdirs. How to unbundle?
710 (license (list license:psfl ; setuptools itself
711 license:expat ; six, appdirs, pyparsing
712 license:asl2.0 ; packaging is dual ASL2/BSD-2
715 (define-public python2-setuptools
716 (package-with-python2 python-setuptools))
718 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
719 (define-public python-setuptools-for-tensorflow
722 (inherit python-setuptools)
725 (inherit (package-source python-setuptools))
726 (uri (pypi-uri "setuptools" version ".zip"))
729 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
731 (define-public python-uniseg
733 (name "python-uniseg")
738 (uri (pypi-uri "uniseg" version ".zip"))
741 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
742 (build-system python-build-system)
744 '(#:tests? #f)) ; The test suite requires network access.
748 "https://bitbucket.org/emptypage/uniseg-python")
750 "Python library to determine Unicode text segmentations")
752 "Uniseg is a Python package used to determine Unicode text segmentations.
753 Supported segmentations include:
755 @item @dfn{Code point} (any value in the Unicode codespace)
756 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
757 multiple Unicode code points, e.g. \"G\" + acute-accent)
762 (license license:expat)))
764 (define-public python2-uniseg
765 (package-with-python2 python-uniseg))
767 (define-public python-humanfriendly
769 (name "python-humanfriendly")
774 (uri (pypi-uri "humanfriendly" version))
777 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
778 (build-system python-build-system)
780 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
783 `(("python-monotonic" ,python-monotonic)))
784 (home-page "https://humanfriendly.readthedocs.io")
785 (synopsis "Human-friendly input and output in Python")
787 "The functions and classes in @code{humanfriendly} can be used to make
788 text interfaces more user-friendly. It includes tools to parse and format
789 numbers, file sizes, and timespans, timers for long-running operations, menus
790 to allow the user to choose from a list of options, and terminal interaction
792 (license license:expat)))
794 (define-public python2-humanfriendly
795 (package-with-python2 python-humanfriendly))
797 (define-public python-capturer
799 (name "python-capturer")
804 (uri (pypi-uri "capturer" version))
807 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
808 (build-system python-build-system)
812 `(("python-humanfriendly" ,python-humanfriendly)))
813 (home-page "https://capturer.readthedocs.io")
814 (synopsis "Capture stdout and stderr streams of the current process")
816 "The capturer package makes it easy to capture the stdout and stderr
817 streams of the current process and subprocesses. Output can be relayed
818 to the terminal in real time but is also available to the Python program
819 for additional processing.")
820 (license license:expat)))
822 (define-public python2-capturer
823 (package-with-python2 python-capturer))
825 (define-public python-case
832 (uri (pypi-uri "case" version))
835 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
836 (build-system python-build-system)
838 `(("python-mock" ,python-mock)
839 ("python-nose" ,python-nose)
840 ("python-six" ,python-six)
841 ("python-unittest2" ,python-unittest2)))
843 `(("python-coverage" ,python-coverage)))
844 (home-page "https://github.com/celery/case")
845 (synopsis "Unittest utilities and convenience methods")
847 "The @code{case} package provides utilities on top of unittest, including
848 some helpful Python 2 compatibility convenience methods.")
849 (license license:bsd-3)))
851 (define-public python-verboselogs
853 (name "python-verboselogs")
858 (uri (pypi-uri "verboselogs" version))
861 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
862 (build-system python-build-system)
864 `(("python-mock" ,python-mock)
865 ("python-astroid" ,python-astroid)
866 ("python-pylint" ,python-pylint)))
867 (home-page "https://verboselogs.readthedocs.io")
868 (synopsis "Verbose logging level for Python's logging module")
870 "The @code{verboselogs} package extends Python's @code{logging} module to
871 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
872 (license license:expat)))
874 (define-public python2-verboselogs
875 (package-with-python2 python-verboselogs))
877 (define-public python-coloredlogs
879 (name "python-coloredlogs")
884 (uri (pypi-uri "coloredlogs" version))
887 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
888 (build-system python-build-system)
890 `(;Tests require some updated modules
893 `(("python-capturer" ,python-capturer)))
894 (home-page "https://coloredlogs.readthedocs.io")
895 (synopsis "Colored stream handler for Python's logging module")
897 "The @code{coloredlogs} package enables colored terminal output for
898 Python's logging module. The @code{ColoredFormatter} class inherits from
899 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
901 (license license:expat)))
903 (define-public python2-coloredlogs
904 (package-with-python2 python-coloredlogs))
906 (define-public python-editorconfig
908 (name "python-editorconfig")
913 (uri (pypi-uri "EditorConfig" version))
916 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
917 (build-system python-build-system)
918 (home-page "https://editorconfig.org/")
919 (synopsis "EditorConfig bindings for python")
920 (description "The EditorConfig project consists of a file format for
921 defining coding styles and a collection of text editor plugins that enable
922 editors to read the file format and adhere to defined styles. EditorConfig
923 files are easily readable and they work nicely with version control systems.")
924 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
925 (license (list license:bsd-2 license:psfl))))
927 (define-public python-et-xmlfile
929 (name "python-et-xmlfile")
934 (uri (pypi-uri "et_xmlfile" version))
937 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
938 (build-system python-build-system)
940 `(#:phases (modify-phases %standard-phases
943 (invoke "pytest"))))))
945 `(("python-pytest" ,python-pytest)
946 ("python-lxml" ,python-lxml))) ;used for the tests
947 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
948 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
949 (description "This Python library is based upon the @code{xmlfile} module
950 from @code{lxml}. It aims to provide a low memory, compatible implementation
952 (license license:expat)))
954 (define-public python2-et-xmlfile
955 (package-with-python2 python-et-xmlfile))
957 (define-public python-openpyxl
959 (name "python-openpyxl")
963 ;; We use the upstream repository, as the tests are not included in the
967 (url "https://bitbucket.org/openpyxl/openpyxl")
968 (changeset version)))
969 (file-name (string-append name "-" version "-checkout"))
971 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
972 (build-system python-build-system)
974 `(#:phases (modify-phases %standard-phases
977 (invoke "pytest"))))))
979 ;; For the test suite.
980 `(("python-lxml" ,python-lxml)
981 ("python-pillow" ,python-pillow)
982 ("python-pytest" ,python-pytest)))
984 `(("python-et-xmlfile" ,python-et-xmlfile)
985 ("python-jdcal" ,python-jdcal)))
986 (home-page "https://openpyxl.readthedocs.io")
987 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
988 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
989 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
991 (license license:expat)))
993 (define-public python-eventlet
995 (name "python-eventlet")
1000 (uri (pypi-uri "eventlet" version))
1003 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1004 (build-system python-build-system)
1006 `(("python-greenlet" ,python-greenlet)))
1008 ;; TODO: Requires unpackaged 'enum-compat'.
1010 (home-page "http://eventlet.net")
1011 (synopsis "Concurrent networking library for Python")
1013 "Eventlet is a concurrent networking library for Python that
1014 allows you to change how you run your code, not how you write it.
1015 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1016 Coroutines ensure that the developer uses a blocking style of programming
1017 that is similar to threading, but provide the benefits of non-blocking I/O.
1018 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1019 from the Python interpreter, or as a small part of a larger application.")
1020 (license license:expat)))
1022 (define-public python2-eventlet
1023 (let ((base (package-with-python2
1024 (strip-python2-variant python-eventlet))))
1025 (package (inherit base)
1027 `(("python2-enum34" ,python2-enum34)
1028 ,@(package-propagated-inputs base))))))
1030 (define-public python-six
1037 (uri (pypi-uri "six" version))
1040 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1041 (build-system python-build-system)
1044 (modify-phases %standard-phases
1047 (invoke "py.test" "-v"))))))
1049 `(("python-py" ,python-py)
1050 ("python-pytest" ,python-pytest-bootstrap)))
1051 (home-page "https://pypi.python.org/pypi/six/")
1052 (synopsis "Python 2 and 3 compatibility utilities")
1054 "Six is a Python 2 and 3 compatibility library. It provides utility
1055 functions for smoothing over the differences between the Python versions with
1056 the goal of writing Python code that is compatible on both Python versions.
1057 Six supports every Python version since 2.5. It is contained in only one
1058 Python file, so it can be easily copied into your project.")
1059 (license license:x11)))
1061 (define-public python2-six
1062 (package-with-python2 python-six))
1064 (define-public python-six-bootstrap
1066 (inherit python-six)
1067 (name "python-six-bootstrap")
1069 (arguments `(#:tests? #f))))
1071 (define-public python2-six-bootstrap
1072 (package-with-python2 python-six-bootstrap))
1074 (define-public python-schedule
1076 (name "python-schedule")
1081 (uri (pypi-uri "schedule" version))
1084 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1085 (build-system python-build-system)
1087 `(("python-pytest" ,python-pytest)
1088 ("python-mock" ,python-mock)))
1089 (home-page "https://github.com/dbader/schedule")
1090 (synopsis "Schedule periodic function calls in Python")
1092 "Schedule is an in-process scheduler for periodic jobs that uses the
1093 builder pattern for configuration. Schedule lets you run Python functions (or
1094 any other callable) periodically at pre-determined intervals using a simple,
1095 human-friendly syntax.")
1096 (license license:expat)))
1098 (define-public python2-schedule
1099 (package-with-python2 python-schedule))
1101 (define-public python-pandas
1103 (name "python-pandas")
1108 (uri (pypi-uri "pandas" version))
1110 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1111 (build-system python-build-system)
1113 `(#:modules ((guix build utils)
1114 (guix build python-build-system)
1117 #:phases (modify-phases %standard-phases
1118 (add-after 'unpack 'patch-which
1119 (lambda* (#:key inputs #:allow-other-keys)
1120 (let ((which (assoc-ref inputs "which")))
1121 (substitute* "pandas/io/clipboard/__init__.py"
1122 (("^CHECK_CMD = .*")
1123 (string-append "CHECK_CMD = \"" which "\"\n"))))
1127 (let ((build-directory
1130 (car (scandir "build"
1131 (cut string-prefix? "lib." <>))))))
1132 ;; Disable the "strict data files" option which causes
1133 ;; the build to error out if required data files are
1134 ;; not available (as is the case with PyPI archives).
1135 (substitute* "setup.cfg"
1136 (("addopts = --strict-data-files") "addopts = "))
1137 (with-directory-excursion build-directory
1138 ;; Delete tests that require "moto" which is not yet
1140 (for-each delete-file
1141 '("pandas/tests/io/conftest.py"
1142 "pandas/tests/io/json/test_compression.py"
1143 "pandas/tests/io/parser/test_network.py"
1144 "pandas/tests/io/test_parquet.py"))
1145 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1146 "--skip-network" "-k"
1147 ;; XXX: Due to the deleted tests above.
1148 "not test_read_s3_jsonl"))))))))
1150 `(("python-numpy" ,python-numpy)
1151 ("python-openpyxl" ,python-openpyxl)
1152 ("python-pytz" ,python-pytz)
1153 ("python-dateutil" ,python-dateutil)
1154 ("python-xlrd" ,python-xlrd)))
1156 `(("which" ,which)))
1158 `(("python-cython" ,python-cython)
1159 ("python-beautifulsoup4" ,python-beautifulsoup4)
1160 ("python-lxml" ,python-lxml)
1161 ("python-html5lib" ,python-html5lib)
1162 ("python-nose" ,python-nose)
1163 ("python-pytest" ,python-pytest)
1164 ("python-pytest-mock" ,python-pytest-mock)))
1165 (home-page "https://pandas.pydata.org")
1166 (synopsis "Data structures for data analysis, time series, and statistics")
1168 "Pandas is a Python package providing fast, flexible, and expressive data
1169 structures designed to make working with structured (tabular,
1170 multidimensional, potentially heterogeneous) and time series data both easy
1171 and intuitive. It aims to be the fundamental high-level building block for
1172 doing practical, real world data analysis in Python.")
1173 (license license:bsd-3)))
1175 (define-public python2-pandas
1176 (package-with-python2 python-pandas))
1178 (define-public python2-mechanize
1180 (name "python2-mechanize")
1185 (uri (pypi-uri "mechanize" version))
1188 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1189 (build-system python-build-system)
1191 `(#:python ,python-2 ; apparently incompatible with Python 3
1193 ;; test fails with message
1194 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1195 ;; (python-3.3.2) or
1196 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1198 ;; The source code is from March 2011 and probably not up-to-date
1199 ;; with respect to python unit tests.
1200 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1202 "Stateful programmatic web browsing in Python")
1204 "Mechanize implements stateful programmatic web browsing in Python,
1205 after Andy Lester’s Perl module WWW::Mechanize.")
1206 (license (license:non-copyleft
1208 "See COPYING in the distribution."))))
1211 (define-public python-simplejson
1213 (name "python-simplejson")
1218 (uri (pypi-uri "simplejson" version))
1221 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1222 (build-system python-build-system)
1223 (home-page "http://simplejson.readthedocs.org/en/latest/")
1225 "Json library for Python")
1227 "JSON (JavaScript Object Notation) is a subset of JavaScript
1228 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1231 Simplejson exposes an API familiar to users of the standard library marshal
1232 and pickle modules. It is the externally maintained version of the json
1233 library contained in Python 2.6, but maintains compatibility with Python 2.5
1234 and (currently) has significant performance advantages, even without using
1235 the optional C extension for speedups. Simplejson is also supported on
1237 (license license:x11)))
1239 (define-public python2-simplejson
1240 (package-with-python2 python-simplejson))
1243 (define-public python-pyicu
1245 (name "python-pyicu")
1250 (uri (pypi-uri "PyICU" version))
1253 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1254 (build-system python-build-system)
1256 `(("icu4c" ,icu4c)))
1258 `(("python-pytest" ,python-pytest)
1259 ("python-six" ,python-six)))
1260 (home-page "https://github.com/ovalhub/pyicu")
1261 (synopsis "Python extension wrapping the ICU C++ API")
1263 "PyICU is a python extension wrapping the ICU C++ API.")
1264 (properties `((python2-variant . ,(delay python2-pyicu))))
1265 (license license:x11)))
1267 (define-public python2-pyicu
1268 (let ((base (package-with-python2
1269 (strip-python2-variant python-pyicu))))
1273 `(,@(package-arguments base)
1275 (modify-phases %standard-phases
1276 (add-before 'check 'delete-failing-test
1278 ;; XXX: This fails due to Unicode issues unique to Python 2,
1279 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1280 (delete-file "test/test_Script.py")
1283 (define-public python2-dogtail
1284 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1285 ;; spaces in indentation" with Python 3.
1287 (name "python2-dogtail")
1291 (uri (pypi-uri "dogtail" version))
1294 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1295 (build-system python-build-system)
1296 (arguments `(#:python ,python-2
1297 #:tests? #f)) ; invalid command "test"
1298 ;; Currently no offical homepage.
1299 (home-page "https://pypi.python.org/pypi/dogtail/")
1300 (synopsis "GUI test tool and automation framework written in Python")
1302 "Dogtail is a GUI test tool and automation framework written in Python.
1303 It uses Accessibility (a11y) technologies to communicate with desktop
1304 applications. dogtail scripts are written in Python and executed like any
1305 other Python program.")
1306 (license license:gpl2+)))
1308 (define-public python-empy
1310 (name "python-empy")
1314 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1318 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1319 (build-system python-build-system)
1321 `(#:tests? #f)) ; python2 only
1322 (home-page "http://www.alcyone.com/software/empy/")
1323 (synopsis "Templating system for Python")
1325 "EmPy is a system for embedding Python expressions and statements in
1326 template text; it takes an EmPy source file, processes it, and produces
1327 output. This is accomplished via expansions, which are special signals to the
1328 EmPy system and are set off by a special prefix (by default the at sign, @@).
1329 EmPy can expand arbitrary Python expressions and statements in this way, as
1330 well as a variety of special forms. Textual data not explicitly delimited in
1331 this way is sent unaffected to the output, allowing Python to be used in
1332 effect as a markup language. Also supported are callbacks via hooks,
1333 recording and playback via diversions, and dynamic, chainable filters. The
1334 system is highly configurable via command line options and embedded
1336 (license license:lgpl2.1+)))
1338 (define-public python2-empy
1339 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1342 (arguments `(,@(package-arguments base)
1345 (define-public python2-element-tree
1347 (name "python2-element-tree")
1352 "http://effbot.org/media/downloads/elementtree-"
1353 version "-20050316.tar.gz"))
1356 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1357 (build-system python-build-system)
1359 `(#:python ,python-2 ; seems to be part of Python 3
1360 #:tests? #f)) ; no 'test' sub-command
1361 (synopsis "Toolkit for XML processing in Python")
1363 "ElementTree is a Python library supporting lightweight XML processing.")
1364 (home-page "http://effbot.org/zone/element-index.htm")
1365 (license (license:x11-style
1366 "http://docs.python.org/2/license.html"
1367 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1369 (define-public python2-pybugz
1371 (name "python2-pybugz")
1376 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1380 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1381 (patches (search-patches "pybugz-stty.patch"
1382 "pybugz-encode-error.patch"))))
1383 (build-system python-build-system)
1385 `(#:python ,python-2 ; SyntaxError with Python 3
1386 #:tests? #f)) ; no 'test' sub-command
1388 `(("element-tree" ,python2-element-tree)))
1389 (synopsis "Python and command-line interface to Bugzilla")
1391 "PyBugz is a Python library and command-line tool to query the Bugzilla
1392 bug tracking system. It is meant as an aid to speed up interaction with the
1394 (home-page "http://www.liquidx.net/pybugz/")
1395 (license license:gpl2)))
1397 (define-public python2-enum
1399 (name "python2-enum")
1403 (uri (pypi-uri "enum" version))
1406 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1407 (build-system python-build-system)
1409 `(#:python ,python-2))
1410 (home-page "http://pypi.python.org/pypi/enum/")
1411 (synopsis "Robust enumerated type support in Python")
1413 "This provides a module for robust enumerations in Python. It has
1414 been superseded by the Python standard library and is provided only for
1416 ;; Choice of either license.
1417 (license (list license:gpl3+ license:psfl))))
1419 (define-public python-enum34
1421 (name "python-enum34")
1426 (uri (pypi-uri "enum34" version))
1429 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1430 (build-system python-build-system)
1431 (home-page "https://pypi.python.org/pypi/enum34")
1432 (synopsis "Backported Python 3.4 Enum")
1434 "Enum34 is the new Python stdlib enum module available in Python 3.4
1435 backported for previous versions of Python from 2.4 to 3.3.")
1436 (license license:bsd-3)))
1438 (define-public python2-enum34
1439 (package-with-python2 python-enum34))
1441 (define-public python-parse-type
1443 (name "python-parse-type")
1448 (uri (pypi-uri "parse_type" version))
1451 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1452 (build-system python-build-system)
1454 `(("python-six" ,python-six)
1455 ("python-parse" ,python-parse)))
1457 `(("python-pytest" ,python-pytest)
1458 ("python-pytest-runner" ,python-pytest-runner)))
1459 (home-page "https://github.com/jenisys/parse_type")
1460 (synopsis "Extended parse module")
1462 "Parse_type extends the python parse module.")
1464 `((python2-variant . ,(delay python2-parse-type))))
1465 (license license:bsd-3)))
1467 (define-public python2-parse-type
1468 (let ((base (package-with-python2
1469 (strip-python2-variant python-parse-type))))
1470 (package (inherit base)
1472 `(("python2-enum34" ,python2-enum34)
1473 ,@(package-propagated-inputs base))))))
1475 (define-public python-parse
1477 (name "python-parse")
1482 (uri (pypi-uri "parse" version))
1485 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1486 (build-system python-build-system)
1489 (modify-phases %standard-phases
1491 (lambda _ (invoke "python" "test_parse.py"))))))
1492 (home-page "https://github.com/r1chardj0n3s/parse")
1493 (synopsis "Parse strings")
1495 "Parse strings using a specification based on the Python @code{format()}
1497 (license license:x11)))
1499 (define-public python-polib
1501 (name "python-polib")
1505 (uri (pypi-uri "polib" version))
1508 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1509 (build-system python-build-system)
1510 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1511 (synopsis "Manipulate, create and modify gettext files")
1512 (description "Polib can manipulate any gettext format (po, pot and mo)
1513 files. It can be used to create po files from scratch or to modify
1515 (license license:expat)))
1517 (define-public python2-polib
1518 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1521 (arguments `(,@(package-arguments base)
1522 ;; Tests don't work with python2.
1525 (define-public scons
1532 (url "https://github.com/SCons/scons.git")
1534 (file-name (git-file-name name version))
1537 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1538 (build-system python-build-system)
1540 `(#:use-setuptools? #f ; still relies on distutils
1541 #:tests? #f ; no 'python setup.py test' command
1543 (modify-phases %standard-phases
1544 (add-before 'build 'bootstrap
1546 (substitute* "src/engine/SCons/compat/__init__.py"
1547 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1548 "sys.modules[new] = __import__(old)"))
1549 (substitute* "src/engine/SCons/Platform/__init__.py"
1550 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1551 "mod = __import__(full_name)"))
1552 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1553 (chdir "build/scons")
1555 (home-page "http://scons.org/")
1556 (synopsis "Software construction tool written in Python")
1558 "SCons is a software construction tool. Think of SCons as an improved,
1559 cross-platform substitute for the classic Make utility with integrated
1560 functionality similar to autoconf/automake and compiler caches such as ccache.
1561 In short, SCons is an easier, more reliable and faster way to build
1563 (license license:x11)))
1565 (define-public scons-python2
1567 (inherit (package-with-python2 scons))
1568 (name "scons-python2")))
1570 (define-public python-extras
1572 (name "python-extras")
1577 (uri (pypi-uri "extras" version))
1580 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1581 (build-system python-build-system)
1583 ;; FIXME: Circular dependency on testtools.
1585 (home-page "https://github.com/testing-cabal/extras")
1586 (synopsis "Useful extensions to the Python standard library")
1588 "Extras is a set of extensions to the Python standard library.")
1589 (license license:expat)))
1591 (define-public python2-extras
1592 (package-with-python2 python-extras))
1594 (define-public python-mimeparse
1596 (name "python-mimeparse")
1601 (uri (pypi-uri "python-mimeparse" version))
1604 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1605 (build-system python-build-system)
1608 (modify-phases %standard-phases
1611 (invoke "./mimeparse_test.py"))))))
1613 "https://github.com/dbtsai/python-mimeparse")
1614 (synopsis "Python library for parsing MIME types")
1616 "Mimeparse provides basic functions for parsing MIME type names and
1617 matching them against a list of media-ranges.")
1618 (license license:expat)))
1620 (define-public python2-mimeparse
1621 (package-with-python2 python-mimeparse))
1623 (define-public python-miniboa
1625 (name "python-miniboa")
1630 (uri (pypi-uri "miniboa" version))
1633 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1634 (build-system python-build-system)
1635 (home-page "https://github.com/shmup/miniboa")
1636 (synopsis "Simple, single-threaded Telnet server")
1638 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1640 (license license:asl2.0)))
1642 (define-public python2-miniboa
1643 (package-with-python2 python-miniboa))
1645 (define-public python-pafy
1647 (name "python-pafy")
1652 (uri (pypi-uri "pafy" version))
1655 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1656 (build-system python-build-system)
1658 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1660 ;; Youtube-dl is a python package which is imported in the file
1661 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1662 `(("youtube-dl" ,youtube-dl)))
1663 (home-page "https://np1.github.io/pafy/")
1664 (synopsis "Retrieve YouTube content and metadata")
1666 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1667 (license license:lgpl3+)))
1669 (define-public python2-funcsigs
1671 (name "python2-funcsigs")
1675 (uri (pypi-uri "funcsigs" version))
1678 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1679 (build-system python-build-system)
1681 `(#:python ,python-2))
1683 `(("python2-unittest2" ,python2-unittest2)))
1684 (home-page "http://funcsigs.readthedocs.org")
1685 (synopsis "Python function signatures from PEP362")
1687 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1688 (license license:asl2.0)))
1690 (define-public python2-funcsigs-bootstrap
1692 (inherit python2-funcsigs)
1693 (name "python2-funcsigs-bootstrap")
1697 ,@(package-arguments python2-funcsigs)))))
1699 (define-public python-py
1706 (uri (pypi-uri "py" version))
1709 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1710 (build-system python-build-system)
1712 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1713 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1714 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1715 ;; Is this module globally installed?"
1718 `(("python-setuptools-scm" ,python-setuptools-scm)))
1719 (home-page "https://github.com/pytest-dev/py")
1720 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1722 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1723 code introspection, and logging.")
1724 (license license:expat)))
1726 (define-public python2-py
1727 (package-with-python2 python-py))
1729 ;; Recent versions of python-fixtures and python-testrepository need
1730 ;; python-pbr for packaging, which itself needs these two packages for
1732 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1733 ;; same source, just without any test dependencies and with tests disabled.
1734 ;; python-pbr-minmal is then used to package python-fixtures and
1735 ;; python-testrepository.
1736 ;; Strictly speaking we currently could remove the test-requirements from the
1737 ;; normal python-pbr package (and save this package) since test are disabled
1738 ;; there anyway. But this may change in future.
1739 (define-public python-pbr-minimal
1741 (name "python-pbr-minimal")
1746 (uri (pypi-uri "pbr" version))
1749 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1750 (build-system python-build-system)
1753 (home-page "http://docs.openstack.org/developer/pbr/")
1754 (synopsis "Minimal build of python-pbr used for bootstrapping")
1756 "Used only for bootstrapping python2-pbr, you should not need this.")
1757 (license license:asl2.0)))
1759 (define-public python2-pbr-minimal
1760 (package-with-python2 python-pbr-minimal))
1762 (define-public python-pbr
1764 (inherit python-pbr-minimal)
1767 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1769 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1771 `(("python-fixtures" ,python-fixtures-bootstrap)
1772 ;; discover, coverage, hacking, subunit
1773 ("python-mock" ,python-mock)
1774 ("python-six" ,python-six)
1775 ("python-sphinx" ,python-sphinx)
1776 ("python-testrepository" ,python-testrepository-bootstrap)
1777 ("python-testresources" ,python-testresources-bootstrap)
1778 ("python-testscenarios" ,python-testscenarios-bootstrap)
1779 ("python-testtools" ,python-testtools-bootstrap)
1780 ("python-virtualenv" ,python-virtualenv)))
1781 (synopsis "Enhance the default behavior of Python’s setuptools")
1783 "Python Build Reasonableness (PBR) is a library that injects some useful
1784 and sensible default behaviors into your setuptools run. It will set
1785 versions, process requirements files and generate AUTHORS and ChangeLog file
1786 from git information.
1789 (define-public python2-pbr
1790 (package-with-python2 python-pbr))
1792 (define-public python-pyrsistent
1794 (name "python-pyrsistent")
1796 (home-page "https://github.com/tobgu/pyrsistent")
1799 (uri (pypi-uri "pyrsistent" version))
1802 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1803 (build-system python-build-system)
1805 `(("python-hypothesis" ,python-hypothesis)
1806 ("python-pytest" ,python-pytest)
1807 ("python-pytest-runner" ,python-pytest-runner)))
1809 `(("python-six" ,python-six)))
1810 (synopsis "Persistent data structures for Python")
1812 "Pyrsistent is a number of persistent collections (by some referred to as
1813 functional data structures). Persistent in the sense that they are immutable.
1815 All methods on a data structure that would normally mutate it instead return a
1816 new copy of the structure containing the requested updates. The original
1817 structure is left untouched.")
1818 (license license:expat)))
1820 (define-public python2-pyrsistent
1821 (package-with-python2 python-pyrsistent))
1823 (define-public python-exif-read
1825 (name "python-exif-read")
1829 (uri (pypi-uri "ExifRead" version))
1832 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1833 (build-system python-build-system)
1834 (arguments `(#:tests? #f)) ; no tests
1835 (home-page "https://github.com/ianare/exif-py")
1836 (synopsis "Python library to extract EXIF data from image files")
1838 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1840 (license license:bsd-3)))
1842 (define-public python2-exif-read
1843 (package-with-python2 python-exif-read))
1845 (define-public python-pyld
1847 (name "python-pyld")
1851 (uri (pypi-uri "PyLD" version))
1854 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1855 (build-system python-build-system)
1856 (home-page "https://github.com/digitalbazaar/pyld")
1857 (synopsis "Python implementation of the JSON-LD specification")
1859 "PyLD is an implementation of the JSON-LD specification.")
1860 (license license:bsd-3)))
1862 (define-public python2-pyld
1863 (package-with-python2 python-pyld))
1865 (define-public python-click
1867 (name "python-click")
1872 (uri (pypi-uri "click" version))
1875 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1876 (build-system python-build-system)
1879 (modify-phases %standard-phases
1880 (add-after 'unpack 'fix-paths
1881 (lambda* (#:key inputs #:allow-other-keys)
1882 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1883 "cross-libc" "libc"))))
1884 (substitute* "click/_unicodefun.py"
1886 (string-append "'" glibc "/bin/locale'"))))
1890 (invoke "python" "-m" "pytest"))))))
1892 `(("python-pytest" ,python-pytest)))
1893 (home-page "https://palletsprojects.com/p/click/")
1894 (synopsis "Command line library for Python")
1896 "Click is a Python package for creating command line interfaces in a
1897 composable way with as little code as necessary. Its name stands for
1898 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1899 with sensible defaults out of the box.")
1900 (license license:bsd-3)))
1902 (define-public python2-click
1903 (package-with-python2 python-click))
1905 (define-public python-wheel
1907 (name "python-wheel")
1912 (uri (pypi-uri "wheel" version))
1915 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1916 (build-system python-build-system)
1918 `(("python-jsonschema" ,python-jsonschema)
1919 ("python-pytest-cov" ,python-pytest-cov)))
1920 (home-page "https://bitbucket.org/pypa/wheel/")
1921 (synopsis "Format for built Python packages")
1923 "A wheel is a ZIP-format archive with a specially formatted filename and
1924 the @code{.whl} extension. It is designed to contain all the files for a PEP
1925 376 compatible install in a way that is very close to the on-disk format. Many
1926 packages will be properly installed with only the @code{Unpack} step and the
1927 unpacked archive preserves enough information to @code{Spread} (copy data and
1928 scripts to their final locations) at any later time. Wheel files can be
1929 installed with a newer @code{pip} or with wheel's own command line utility.")
1930 (license license:expat)
1931 (properties `((python2-variant . ,(delay python2-wheel))))))
1933 (define-public python2-wheel
1934 (let ((wheel (package-with-python2
1935 (strip-python2-variant python-wheel))))
1936 (package (inherit wheel)
1937 (native-inputs `(("python2-functools32" ,python2-functools32)
1938 ,@(package-native-inputs wheel))))))
1940 (define-public python-vcversioner
1942 (name "python-vcversioner")
1943 (version "2.16.0.0")
1947 (uri (pypi-uri "vcversioner" version))
1950 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1951 (build-system python-build-system)
1952 (synopsis "Python library for version number discovery")
1953 (description "Vcversioner is a Python library that inspects tagging
1954 information in a variety of version control systems in order to discover
1956 (home-page "https://github.com/habnabit/vcversioner")
1957 (license license:isc)))
1959 (define-public python2-vcversioner
1960 (package-with-python2 python-vcversioner))
1962 (define-public python-jdcal
1964 (name "python-jdcal")
1969 (uri (pypi-uri "jdcal" version))
1972 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1973 (build-system python-build-system)
1975 `(#:phases (modify-phases %standard-phases
1978 (invoke "pytest"))))))
1980 `(("python-pytest" ,python-pytest)))
1981 (home-page "https://github.com/phn/jdcal")
1982 (synopsis "Functions to convert between Julian dates Gregorian dates")
1983 (description "This Python library provides functions for converting
1984 between Julian dates and Gregorian dates.")
1985 (license license:bsd-2)))
1987 (define-public python2-jdcal
1988 (package-with-python2 python-jdcal))
1990 (define-public python-jsonschema
1992 (name "python-jsonschema")
1996 (uri (pypi-uri "jsonschema" version))
1999 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2000 (build-system python-build-system)
2003 (modify-phases %standard-phases
2006 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2007 (invoke "trial" "jsonschema"))))))
2009 `(("python-setuptools_scm" ,python-setuptools-scm)
2010 ("python-twisted" ,python-twisted)))
2012 `(("python-attrs" ,python-attrs)
2013 ("python-pyrsistent" ,python-pyrsistent)
2014 ("python-six" ,python-six)))
2015 (home-page "https://github.com/Julian/jsonschema")
2016 (synopsis "Implementation of JSON Schema for Python")
2018 "Jsonschema is an implementation of JSON Schema for Python.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2022 (define-public python2-jsonschema
2023 (let ((jsonschema (package-with-python2
2024 (strip-python2-variant python-jsonschema))))
2025 (package (inherit jsonschema)
2027 `(("python2-functools32" ,python2-functools32)
2028 ,@(package-propagated-inputs jsonschema))))))
2030 ;; This old version is still required by docker-compose as of 1.24.0.
2031 (define-public python-jsonschema-2.6
2033 (name "python-jsonschema")
2037 (uri (pypi-uri "jsonschema" version))
2040 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2041 (build-system python-build-system)
2044 (modify-phases %standard-phases
2045 (replace 'check (lambda _ (invoke "nosetests"))))))
2047 `(("python-nose" ,python-nose)
2048 ("python-vcversioner" ,python-vcversioner)))
2049 (home-page "https://github.com/Julian/jsonschema")
2050 (synopsis "Implementation of JSON Schema for Python")
2052 "Jsonschema is an implementation of JSON Schema for Python.")
2053 (license license:expat)
2054 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2056 (define-public python-schema
2058 (name "python-schema")
2063 (uri (pypi-uri "schema" version))
2066 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2067 (build-system python-build-system)
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/keleshev/schema")
2071 (synopsis "Simple data validation library")
2073 "@code{python-schema} is a library for validating Python data
2074 structures, such as those obtained from config-files, forms, external
2075 services or command-line parsing, converted from JSON/YAML (or
2076 something else) to Python data-types.")
2077 (license license:psfl)))
2079 (define-public python2-schema
2080 (package-with-python2 python-schema))
2082 (define-public python-schema-0.5
2083 (package (inherit python-schema)
2088 (uri (pypi-uri "schema" version))
2091 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2093 (define-public python2-schema-0.5
2094 (package-with-python2 python-schema-0.5))
2096 (define-public python-kitchen
2098 (name "python-kitchen")
2103 (uri (pypi-uri "kitchen" version))
2106 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2107 (build-system python-build-system)
2109 `(("python-chardet" ,python-chardet)))
2110 (home-page "https://github.com/fedora-infra/kitchen")
2111 (synopsis "Python API for snippets")
2112 (description "@code{kitchen} module provides a python API for all sorts of
2113 little useful snippets of code that everybody ends up writing for their projects
2114 but never seem big enough to build an independent release. Use kitchen and stop
2115 cutting and pasting that code over and over.")
2116 (license (list license:lgpl2.1+
2117 ;; subprocess.py, test_subprocess.py,
2118 ;; kitchen/pycompat25/defaultdict.py:
2121 (define-public python2-kitchen
2122 (package-with-python2 python-kitchen))
2124 (define-public python-unidecode
2126 (name "python-unidecode")
2130 (uri (pypi-uri "Unidecode" version))
2133 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2134 (build-system python-build-system)
2135 (home-page "https://pypi.python.org/pypi/Unidecode")
2136 (synopsis "ASCII transliterations of Unicode text")
2138 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2139 useful when integrating with legacy code that doesn't support Unicode, or for
2140 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2141 machine identifiers from human-readable Unicode strings that should still be
2142 somewhat intelligible.")
2143 (license license:gpl2+)))
2145 (define-public python2-unidecode
2146 (package-with-python2 python-unidecode))
2148 (define-public python-pyjwt
2150 (name "python-pyjwt")
2155 (uri (pypi-uri "PyJWT" version))
2158 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2159 (modules '((guix build utils)))
2162 (for-each delete-file-recursively
2163 (find-files "." "\\.pyc$"))
2165 (build-system python-build-system)
2167 `(("python-pytest" ,python-pytest)
2168 ("python-pytest-cov" ,python-pytest-cov)
2169 ("python-pytest-runner" ,python-pytest-runner)))
2170 (home-page "https://github.com/progrium/pyjwt")
2171 (synopsis "JSON Web Token implementation in Python")
2173 "PyJWT is a JSON Web Token implementation written in Python.")
2174 (license license:expat)))
2176 (define-public python2-pyjwt
2177 (package-with-python2 python-pyjwt))
2179 (define-public python-pykka
2181 (name "python-pykka")
2186 (uri (pypi-uri "Pykka" version))
2189 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2190 (build-system python-build-system)
2192 `(("python-mock" ,python-mock)
2193 ("python-nose" ,python-nose)
2194 ("python-gevent" ,python-gevent)
2195 ("python-eventlet" ,python-eventlet)))
2196 (home-page "https://www.pykka.org/")
2197 (synopsis "Pykka is a Python implementation of the actor model")
2199 "Pykka is a Python implementation of the actor model.
2200 The actor model introduces some simple rules to control the sharing
2201 of state and cooperation between execution units, which makes it
2202 easier to build concurrent applications.")
2203 (license license:asl2.0)))
2205 (define-public python2-pykka
2206 (package-with-python2 python-pykka))
2208 (define-public python-pymsgbox
2210 (name "python-pymsgbox")
2216 ;; LICENSE.txt is not present on pypi
2217 (url "https://github.com/asweigart/PyMsgBox")
2218 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2219 (file-name (git-file-name name version))
2222 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2224 ;; Circular dependency to run tests:
2225 ;; Tests need pyautogui, which depends on pymsgbox.
2227 (build-system python-build-system)
2228 (home-page "https://github.com/asweigart/PyMsgBox")
2229 (synopsis "Python module for JavaScript-like message boxes")
2231 "PyMsgBox is a simple, cross-platform, pure Python module for
2232 JavaScript-like message boxes. Types of dialog boxes include:
2240 (license license:bsd-3)))
2242 (define-public python-pympler
2244 (name "python-pympler")
2245 (home-page "https://pythonhosted.org/Pympler/")
2249 (uri (pypi-uri "Pympler" version))
2252 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2253 (build-system python-build-system)
2255 `(#:phases (modify-phases %standard-phases
2257 (add-after 'install 'check
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (add-installed-pythonpath inputs outputs)
2260 (invoke "python" "setup.py" "test"))))))
2261 (synopsis "Measure, monitor and analyze memory behavior")
2263 "Pympler is a development tool to measure, monitor and analyze
2264 the memory behavior of Python objects in a running Python application.
2266 By pympling a Python application, detailed insight in the size and the
2267 lifetime of Python objects can be obtained. Undesirable or unexpected
2268 runtime behavior like memory bloat and other @samp{pymples} can easily
2271 A web profiling frontend exposes process statistics, garbage
2272 visualisation and class tracker statistics.")
2273 (license license:asl2.0)))
2275 (define-public python2-pympler
2276 (package-with-python2 python-pympler))
2278 (define-public python-itsdangerous
2280 (name "python-itsdangerous")
2285 (uri (pypi-uri "itsdangerous" version))
2288 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2289 (build-system python-build-system)
2290 (home-page "https://palletsprojects.com/p/itsdangerous/")
2291 (synopsis "Python library for passing data to/from untrusted environments")
2293 "Itsdangerous provides various helpers to pass trusted data to untrusted
2294 environments and back.")
2295 (license license:bsd-3)))
2297 (define-public python2-itsdangerous
2298 (package-with-python2 python-itsdangerous))
2300 (define-public python-pyyaml
2302 (name "python-pyyaml")
2307 (uri (pypi-uri "PyYAML" version))
2310 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2311 (build-system python-build-system)
2313 `(("libyaml" ,libyaml)))
2314 (home-page "http://pyyaml.org/wiki/PyYAML")
2315 (synopsis "YAML parser and emitter for Python")
2317 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2318 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2319 API, and sensible error messages. PyYAML supports standard YAML tags and
2320 provides Python-specific tags that allow to represent an arbitrary Python
2322 (license license:expat)))
2324 (define-public python2-pyyaml
2325 (package-with-python2 python-pyyaml))
2327 (define-public python-vine
2329 (name "python-vine")
2334 (uri (pypi-uri "vine" version))
2337 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2338 (build-system python-build-system)
2340 `(("python-pytest" ,python-pytest)
2341 ("python-case" ,python-case)))
2342 (home-page "https://github.com/celery/vine")
2343 (synopsis "Promises for Python")
2345 "@code{vine} provides a special implementation of promises in that it can
2346 be used both for \"promise of a value\" and lazy evaluation. The biggest
2347 upside for this is that everything in a promise can also be a promise,
2348 e.g. filters, callbacks and errbacks can all be promises.")
2349 (license license:bsd-3)))
2351 (define-public python-virtualenv
2353 (name "python-virtualenv")
2358 (uri (pypi-uri "virtualenv" version))
2361 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2362 (build-system python-build-system)
2365 (modify-phases %standard-phases
2366 (add-before 'check 'disable-failing-test
2368 ;; Disable failing test. See upstream bug report
2369 ;; https://github.com/pypa/virtualenv/issues/957
2370 (substitute* "tests/test_virtualenv.py"
2371 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2374 `(("python-mock" ,python-mock)
2375 ("python-pytest" ,python-pytest)))
2376 (home-page "https://virtualenv.pypa.io/")
2377 (synopsis "Virtual Python environment builder")
2379 "Virtualenv is a tool to create isolated Python environments.")
2380 (license license:expat)))
2382 (define-public python2-virtualenv
2383 (package-with-python2 python-virtualenv))
2385 (define-public python-markupsafe
2387 (name "python-markupsafe")
2392 (uri (pypi-uri "MarkupSafe" version))
2395 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2396 (build-system python-build-system)
2398 `(#:modules ((ice-9 ftw)
2402 (guix build python-build-system))
2403 #:phases (modify-phases %standard-phases
2406 (let ((cwd (getcwd))
2407 (libdir (find (cut string-prefix? "lib." <>)
2408 (scandir "build"))))
2409 (setenv "PYTHONPATH"
2410 (string-append cwd "/build/" libdir ":"
2411 (getenv "PYTHONPATH")))
2412 (invoke "pytest" "-vv")))))))
2414 `(("python-pytest" ,python-pytest)))
2415 (home-page "https://github.com/mitsuhiko/markupsafe")
2416 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2418 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2420 (license license:bsd-3)))
2422 (define-public python2-markupsafe
2423 (package-with-python2 python-markupsafe))
2425 (define-public python-jinja2
2427 (name "python-jinja2")
2432 (uri (pypi-uri "Jinja2" version))
2435 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2436 (build-system python-build-system)
2438 `(("python-markupsafe" ,python-markupsafe)))
2439 (home-page "http://jinja.pocoo.org/")
2440 (synopsis "Python template engine")
2442 "Jinja2 is a small but fast and easy to use stand-alone template engine
2443 written in pure Python.")
2444 (license license:bsd-3)))
2446 (define-public python2-jinja2
2447 (package-with-python2 python-jinja2))
2449 (define-public python-pystache
2451 (name "python-pystache")
2455 (uri (pypi-uri "pystache" version))
2458 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2459 (build-system python-build-system)
2461 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2462 (home-page "http://defunkt.io/pystache/")
2463 (synopsis "Python logic-less template engine")
2465 "Pystache is a Python implementation of the framework agnostic,
2466 logic-free templating system Mustache.")
2467 (license license:expat)
2468 (properties `((python2-variant . ,(delay python2-pystache))))))
2470 (define-public python2-pystache
2471 (package (inherit (package-with-python2
2472 (strip-python2-variant python-pystache)))
2474 `(#:python ,python-2
2476 (modify-phases %standard-phases
2479 (invoke "python" "test_pystache.py"))))))))
2481 (define-public python-joblib
2483 (name "python-joblib")
2487 (uri (pypi-uri "joblib" version))
2490 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2491 (build-system python-build-system)
2494 (modify-phases %standard-phases
2496 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2498 `(("python-pytest" ,python-pytest)))
2499 (home-page "https://joblib.readthedocs.io/")
2500 (synopsis "Using Python functions as pipeline jobs")
2502 "Joblib is a set of tools to provide lightweight pipelining in Python.
2503 In particular, joblib offers: transparent disk-caching of the output values
2504 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2505 logging and tracing of the execution.")
2506 (license license:bsd-3)))
2508 (define-public python2-joblib
2509 (package-with-python2 python-joblib))
2511 (define-public python-daemon
2513 (name "python-daemon")
2518 (uri (pypi-uri "python-daemon" version))
2521 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2522 (build-system python-build-system)
2525 (modify-phases %standard-phases
2526 (add-before 'check 'disable-tests
2528 ;; FIXME: Determine why test fails
2529 (substitute* "test/test_daemon.py"
2530 (("test_detaches_process_context")
2531 "skip_test_detaches_process_context"))
2534 `(("python-lockfile" ,python-lockfile)))
2536 `(("python-unittest2" ,python-unittest2)
2537 ("python-testtools" ,python-testtools)
2538 ("python-testscenarios" ,python-testscenarios)
2539 ("python-mock" ,python-mock)
2540 ("python-docutils" ,python-docutils)))
2541 (home-page "https://pagure.io/python-daemon/")
2542 (synopsis "Python library for making a Unix daemon process")
2543 (description "Python-daemon is a library that assists a Python program to
2544 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2546 This library provides a @code{DaemonContext} class that manages the following
2547 important tasks for becoming a daemon process:
2549 @item Detach the process into its own process group.
2550 @item Set process environment appropriate for running inside a chroot.
2551 @item Renounce suid and sgid privileges.
2552 @item Close all open file descriptors.
2553 @item Change the working directory, uid, gid, and umask.
2554 @item Set appropriate signal handlers.
2555 @item Open new file descriptors for stdin, stdout, and stderr.
2556 @item Manage a specified PID lock file.
2557 @item Register cleanup functions for at-exit processing.
2559 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2560 (license (list license:asl2.0 license:gpl3+))))
2562 (define-public python-docutils
2564 (name "python-docutils")
2569 (uri (pypi-uri "docutils" version))
2572 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2573 (build-system python-build-system)
2575 '(#:tests? #f)) ; no setup.py test command
2576 (home-page "http://docutils.sourceforge.net/")
2577 (synopsis "Python Documentation Utilities")
2579 "Docutils is a modular system for processing documentation into useful
2580 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2582 ;; Most of the source code is public domain, but some source files are
2583 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2584 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2586 (define-public python2-docutils
2587 (package-with-python2 python-docutils))
2589 (define-public python-pygments
2591 (name "python-pygments")
2596 (uri (pypi-uri "Pygments" version))
2599 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2600 (build-system python-build-system)
2602 ;; FIXME: Tests require sphinx, which depends on this.
2604 (home-page "http://pygments.org/")
2605 (synopsis "Syntax highlighting")
2607 "Pygments is a syntax highlighting package written in Python.")
2608 (license license:bsd-2)))
2610 (define-public python2-pygments
2611 (package-with-python2 python-pygments))
2613 (define-public python-bumpversion
2615 (name "python-bumpversion")
2620 (uri (pypi-uri "bumpversion" version))
2623 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2624 (build-system python-build-system)
2625 (home-page "https://github.com/peritus/bumpversion")
2626 (synopsis "Tool to bump software version")
2627 (description "This tool provides a command-line interface (CLI) to bump a
2628 software version simply.")
2629 (license license:expat)))
2631 (define-public python-deprecated
2633 (name "python-deprecated")
2639 (url "https://github.com/tantale/deprecated.git")
2640 (commit (string-append "v" version))))
2641 (file-name (git-file-name name version))
2644 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2645 (build-system python-build-system)
2647 `(#:phases (modify-phases %standard-phases
2650 (invoke "pytest"))))))
2652 `(("python-wrapt" ,python-wrapt)))
2654 `(("python-bumpversion" ,python-bumpversion)
2655 ("python-pytest" ,python-pytest)
2656 ("python-pytest-cov" ,python-pytest-cov)
2657 ("python-sphinx" ,python-sphinx)
2658 ("python-tox" ,python-tox)))
2659 (home-page "https://github.com/tantale/deprecated")
2660 (synopsis "Python decorator to deprecate classes, functions or methods")
2661 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2662 to deprecate classes, functions or methods.")
2663 (license license:expat)))
2665 (define-public python-pygithub
2667 (name "python-pygithub")
2670 ;; We fetch from the Git repo because there are no tests in the PyPI
2675 (url "https://github.com/PyGithub/PyGithub.git")
2676 (commit (string-append "v" version))))
2677 (file-name (git-file-name name version))
2680 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2681 (build-system python-build-system)
2683 `(#:phases (modify-phases %standard-phases
2684 ;; Some tests rely on the network.
2685 (add-after 'unpack 'disable-failing-tests
2687 (substitute* "tests/Issue142.py"
2688 (("testDecodeJson") "disabled_testDecodeJson"))
2690 (add-before 'check 'prepare-for-tests
2692 (for-each (lambda (f)
2694 (find-files "./tests"))
2695 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2696 (setenv "PYTHONPATH"
2697 (string-append "./tests:" (getenv "PYTHONPATH")))
2700 `(("python-deprecated" ,python-deprecated)
2701 ("python-pyjwt" ,python-pyjwt)
2702 ("python-requests" ,python-requests)))
2703 (native-inputs `(("python-httpretty" ,python-httpretty)))
2704 (home-page "https://pygithub.readthedocs.io/en/latest/")
2705 (synopsis "Python library for the GitHub API")
2706 (description "This library allows managing GitHub resources such as
2707 repositories, user profiles, and organizations in your Python applications,
2708 using version 3 of the GitHub application programming interface (API).")
2709 (license license:lgpl3+)))
2711 (define-public python-rellu
2713 (name "python-rellu")
2718 (uri (pypi-uri "rellu" version))
2721 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2722 (build-system python-build-system)
2724 `(("python-invoke" ,python-invoke)
2725 ("python-pygithub" ,python-pygithub)))
2726 (home-page "https://github.com/robotframework/rellu")
2727 (synopsis "Utilities to create PyPI releases")
2728 (description "This collection of utilities contains tooling and templates
2729 to assist in creating releases on GitHub and publishing them on PyPI. It is
2730 designed to be used by Robot Framework and tools and libraries in its
2731 ecosystem, but can naturally be used also by other projects.")
2732 (license license:asl2.0)))
2734 (define-public python-robotframework
2736 (name "python-robotframework")
2738 ;; There are no tests in the PyPI archive.
2743 (url "https://github.com/robotframework/robotframework.git")
2744 (commit (string-append "v" version))))
2745 (file-name (git-file-name name version))
2747 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2748 (patches (search-patches
2749 "python-robotframework-honor-source-date-epoch.patch"))))
2750 (build-system python-build-system)
2752 `(#:phases (modify-phases %standard-phases
2753 (add-before 'build 'build-and-install-doc
2754 (lambda* (#:key outputs #:allow-other-keys)
2755 (let* ((doc-output (assoc-ref outputs "doc"))
2756 (doc (string-append doc-output "/share/"
2757 ,name "-" ,version "/")))
2758 (invoke "invoke" "library-docs" "all")
2760 (copy-recursively "doc/libraries"
2761 (string-append doc "/libraries"))
2765 (invoke "python" "utest/run.py"))))))
2767 `(("python-invoke" ,python-invoke)
2768 ("python-rellu" ,python-rellu)
2769 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2770 (outputs '("out" "doc"))
2771 (home-page "https://robotframework.org")
2772 (synopsis "Generic automation framework")
2773 (description "Robot Framework is a generic automation framework for
2774 acceptance testing, acceptance test driven development (ATDD), and robotic
2775 process automation (RPA).")
2776 (license license:asl2.0)))
2778 (define-public python-robotframework-lint
2779 ;; There is no properly tagged release; the commit below seems to correspond
2780 ;; to the 0.9 stable release available from PyPI. The tests are not
2781 ;; included in the PyPI archive, so we fetch the sources from the upstream
2783 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2786 (name "python-robotframework-lint")
2787 (version (git-version "0.9.0" revision commit))
2792 (url "https://github.com/boakley/robotframework-lint.git")
2794 (file-name (git-file-name name version))
2797 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2798 (build-system python-build-system)
2801 (modify-phases %standard-phases
2804 (invoke "python" "-m" "robot" "-A"
2805 "tests/conf/default.args" "tests"))))))
2807 `(("python-robotframework" ,python-robotframework)))
2808 (home-page "https://github.com/boakley/robotframework-lint/")
2809 (synopsis "Static analysis tool (linter) for Robot Framework")
2810 (description "This package provides the @code{rflint} command-line
2811 utility, a static analysis tool (linter) for Robot Framework source files.")
2812 (license license:asl2.0))))
2814 (define-public python-robotframework-sshlibrary
2816 (name "python-robotframework-sshlibrary")
2818 ;; There are no tests in the PyPI archive.
2823 (url "https://github.com/robotframework/SSHLibrary.git")
2824 (commit (string-append "v" version))))
2825 (file-name (git-file-name name version))
2828 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2829 (build-system python-build-system)
2832 (modify-phases %standard-phases
2833 (add-before 'build 'build-and-install-doc
2834 (lambda* (#:key outputs #:allow-other-keys)
2835 (let* ((doc-output (assoc-ref outputs "doc"))
2836 (doc (string-append doc-output "/share/"
2837 ,name "-" ,version "/")))
2838 (invoke "chmod" "-R" "+w" "docs")
2839 (invoke "invoke" "kw-docs" "project-docs")
2841 (for-each delete-file (find-files "docs" "\\.rst"))
2842 (copy-recursively "docs" doc)
2846 ;; Some tests require an SSH server; we remove them.
2847 (delete-file "utest/test_client_api.py")
2848 (delete-file "utest/test_scp.py")
2849 (invoke "python" "utest/run.py"))))))
2851 `(("python-robotframework" ,python-robotframework)
2852 ("python-paramiko" ,python-paramiko)
2853 ("python-scp" ,python-scp)))
2855 `(("openssh" ,openssh)
2857 ;; To generate the documentation
2858 ("python-docutils" ,python-docutils)
2859 ("python-invoke" ,python-invoke)
2860 ("python-pygments" ,python-pygments)
2861 ("python-rellu" ,python-rellu)))
2862 (outputs '("out" "doc"))
2863 (home-page "https://github.com/robotframework/SSHLibrary")
2864 (synopsis "Robot Framework library for SSH and SFTP")
2865 (description "SSHLibrary is a Robot Framework library providing support
2866 for SSH and SFTP. It has the following main usages:
2868 @item Executing commands on the remote machine, either blocking or non-blocking.
2869 @item Writing and reading in an interactive shell.
2870 @item Transferring files and directories over SFTP.
2871 @item Ensuring that files and directories exist on the remote machine.
2873 (license license:asl2.0)))
2875 (define-public python-scp
2882 (uri (pypi-uri "scp" version))
2885 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2886 (build-system python-build-system)
2888 '(#:tests? #f)) ;tests require an SSH server
2890 `(("python-paramiko" ,python-paramiko)))
2891 (home-page "https://github.com/jbardin/scp.py")
2892 (synopsis "SCP protocol module for Python and Paramiko")
2893 (description "The scp module extends the Paramiko library to send and
2894 receive files via the SCP1 protocol, as implemented by the OpenSSH
2895 @command{scp} program.")
2896 (license license:gpl2+)))
2898 (define-public python-rst.linker
2900 (name "python-rst.linker")
2905 (uri (pypi-uri "rst.linker" version))
2908 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2909 (build-system python-build-system)
2911 `(("python-dateutil" ,python-dateutil)
2912 ("python-six" ,python-six)))
2914 `(("python-setuptools-scm" ,python-setuptools-scm)))
2915 ;; Test would require path.py, which would introduce a cyclic dependence.
2916 (arguments `(#:tests? #f))
2917 ;; Note: As of version 1.7 the documentation is not worth building.
2918 (home-page "https://github.com/jaraco/rst.linker")
2919 (synopsis "Sphinx plugin to add links and timestamps")
2920 (description "rst.linker allows to automatically replace text by a
2921 reStructuredText external reference or timestamps. It's primary purpose is to
2922 augment the changelog, but it can be used for other documents, too.")
2923 (license license:expat)))
2925 (define-public python2-rst.linker
2926 (package-with-python2 python-rst.linker))
2928 (define-public python-feedgenerator
2930 (name "python-feedgenerator")
2935 (uri (pypi-uri "feedgenerator" version))
2938 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2939 (modules '((guix build utils)))
2942 ;; Remove pre-compiled .pyc files from source.
2943 (for-each delete-file-recursively
2944 (find-files "." "__pycache__" #:directories? #t))
2945 (for-each delete-file (find-files "." "\\.pyc$"))
2947 (build-system python-build-system)
2949 `(("python-pytz" ,python-pytz)
2950 ("python-six" ,python-six)))
2951 (home-page "https://github.com/getpelican/feedgenerator")
2953 "Standalone version of Django's Atom/RSS feed generator")
2955 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2956 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2957 (license license:bsd-3)))
2959 (define-public python2-feedgenerator
2960 (package-with-python2 python-feedgenerator))
2962 (define-public python-toml
2964 (name "python-toml")
2969 (uri (pypi-uri "toml" version))
2972 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2973 (build-system python-build-system)
2975 `(#:tests? #f)) ;no tests suite in release
2976 (home-page "https://github.com/uiri/toml")
2977 (synopsis "Library for TOML")
2979 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2980 Language (TOML) configuration files.")
2981 (license license:expat)))
2983 (define-public python-jsonrpc-server
2985 (name "python-jsonrpc-server")
2990 (uri (pypi-uri "python-jsonrpc-server" version))
2993 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2994 (build-system python-build-system)
2996 `(("python-future" ,python-future)
2997 ("python-mock" ,python-mock)
2998 ("python-pytest" ,python-pytest)))
3000 "https://github.com/palantir/python-jsonrpc-server")
3001 (synopsis "JSON RPC 2.0 server library")
3003 "This package provides a JSON RPC 2.0 server library for Python.")
3004 (license license:expat)))
3006 (define-public python-pydocstyle
3008 (name "python-pydocstyle")
3013 (uri (pypi-uri "pydocstyle" version))
3016 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3017 (build-system python-build-system)
3019 `(("python-six" ,python-six)
3020 ("python-snowballstemmer" ,python-snowballstemmer)))
3022 "https://github.com/PyCQA/pydocstyle/")
3023 (synopsis "Python docstring style checker")
3025 "This package provides a style checker for the Python Language
3027 (license license:expat)))
3029 ;; XXX: We must use a non-release version since the latest release version
3030 ;; requires python-jedi version < 0.15.
3031 (define-public python-language-server
3032 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3035 (name "python-language-server")
3036 (version (git-version "0.28.3" revision commit))
3041 (url "https://github.com/palantir/python-language-server.git")
3045 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3046 (build-system python-build-system)
3048 `(("python-pluggy" ,python-pluggy)
3049 ("python-jsonrpc-server" ,python-jsonrpc-server)
3050 ("python-jedi" ,python-jedi)
3051 ("python-yapf" ,python-yapf)
3052 ("python-pyflakes" ,python-pyflakes)
3053 ("python-pydocstyle" ,python-pydocstyle)
3054 ("python-pycodestyle" ,python-pycodestyle)
3055 ("python-mccabe" ,python-mccabe)
3056 ("python-rope" ,python-rope)
3057 ("python-autopep8" ,python-autopep8)
3058 ("python-pylint" ,python-pylint)))
3059 (home-page "https://github.com/palantir/python-language-server")
3060 (synopsis "Python implementation of the Language Server Protocol")
3062 "The Python Language Server (pyls) is an implementation of the Python 3
3063 language specification for the Language Server Protocol (LSP). This tool is
3064 used in text editing environments to provide a complete and integrated
3065 feature-set for programming Python effectively.")
3066 (license license:expat))))
3068 (define-public python-black
3070 (name "python-black")
3075 (uri (pypi-uri "black" version))
3078 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3079 (build-system python-build-system)
3082 (modify-phases %standard-phases
3083 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3085 (let ((python3 (which "python3")))
3086 (substitute* '("tests/data/fmtonoff.py"
3087 "tests/data/string_prefixes.py"
3088 "tests/data/function.py")
3089 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3090 (string-append "#!" python3 (if (string? minor-version)
3094 `(("python-click" ,python-click)
3095 ("python-attrs" ,python-attrs)
3096 ("python-appdirs" ,python-appdirs)
3097 ("python-toml" ,python-toml)))
3098 (home-page "https://github.com/ambv/black")
3099 (synopsis "The uncompromising code formatter")
3100 (description "Black is the uncompromising Python code formatter.")
3101 (license license:expat)))
3103 (define-public python-blinker
3105 (name "python-blinker")
3110 (uri (pypi-uri "blinker" version))
3113 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3114 (build-system python-build-system)
3115 (home-page "http://pythonhosted.org/blinker/")
3116 (synopsis "Fast, simple object-to-object and broadcast signaling")
3118 "Blinker provides a fast dispatching system that allows any number of
3119 interested parties to subscribe to events, or \"signals\".")
3120 (license license:expat)))
3122 (define-public python2-blinker
3123 (package-with-python2 python-blinker))
3125 (define-public pelican
3132 (uri (pypi-uri "pelican" version))
3135 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3136 (build-system python-build-system)
3138 `(("python-feedgenerator" ,python-feedgenerator)
3139 ("python-jinja2" ,python-jinja2)
3140 ("python-pygments" ,python-pygments)
3141 ("python-docutils" ,python-docutils)
3142 ("python-pytz" ,python-pytz)
3143 ("python-blinker" ,python-blinker)
3144 ("python-unidecode" ,python-unidecode)
3145 ("python-six" ,python-six)
3146 ("python-dateutil" ,python-dateutil)
3147 ("python-markdown" ,python-markdown)))
3148 (home-page "https://getpelican.com/")
3150 `(;; XXX Requires a lot more packages to do unit tests :P
3152 #:phases (modify-phases %standard-phases
3154 'install 'adjust-requires
3155 ;; Since feedgenerator is installed from git, it doesn't
3156 ;; conform to the version requirements.
3158 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3159 ;; version requirement so setuptools doesn't get confused.
3161 (substitute* "setup.py"
3162 (("['\"]feedgenerator.*?['\"]")
3163 "'feedgenerator'")))))))
3164 (synopsis "Python-based static site publishing system")
3166 "Pelican is a tool to generate a static blog from reStructuredText,
3167 Markdown input files, and more. Pelican uses Jinja2 for templating
3168 and is very extensible.")
3169 (license license:agpl3+)))
3171 (define-public mallard-ducktype
3173 (name "mallard-ducktype")
3178 ;; git-reference because tests are not included in pypi source tarball
3179 ;; https://issues.guix.gnu.org/issue/36755#2
3181 (url "https://github.com/projectmallard/mallard-ducktype.git")
3183 (file-name (git-file-name name version))
3186 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3187 (build-system python-build-system)
3190 (modify-phases %standard-phases
3193 (with-directory-excursion "tests"
3194 (invoke "sh" "runtests")))))))
3195 (home-page "http://projectmallard.org")
3196 (synopsis "Convert Ducktype to Mallard documentation markup")
3198 "Ducktype is a lightweight syntax that can represent all the semantics
3199 of the Mallard XML documentation system. Ducktype files can be converted to
3200 Mallard using the @command{ducktype} tool. The yelp-tools package
3201 provides additional functionality on the produced Mallard documents.")
3202 (license license:expat)))
3204 (define-public python-scikit-image
3206 (name "python-scikit-image")
3211 (uri (pypi-uri "scikit-image" version))
3213 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3214 (build-system python-build-system)
3216 ;; TODO: Some tests require running X11 server. Disable them?
3218 ;; See DEPENDS.txt for the list of build and run time requiremnts
3220 `(("python-cloudpickle" ,python-cloudpickle)
3221 ("python-dask" ,python-dask)
3222 ("python-matplotlib" ,python-matplotlib)
3223 ("python-networkx" ,python-networkx)
3224 ("python-numpy" ,python-numpy)
3225 ("python-pillow" ,python-pillow)
3226 ("python-pywavelets" ,python-pywavelets)
3227 ("python-scipy" ,python-scipy)
3228 ("python-six" ,python-six)))
3230 `(("python-cython" ,python-cython)))
3231 (home-page "http://scikit-image.org/")
3232 (synopsis "Image processing in Python")
3234 "Scikit-image is a collection of algorithms for image processing.")
3235 (license license:bsd-3)))
3237 (define-public python2-scikit-image
3238 (package-with-python2 python-scikit-image))
3240 (define-public python-cython
3242 (name "python-cython")
3247 (uri (pypi-uri "Cython" version))
3250 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3251 (build-system python-build-system)
3252 ;; we need the full python package and not just the python-wrapper
3253 ;; because we need libpython3.3m.so
3255 `(("python" ,python)))
3258 (modify-phases %standard-phases
3259 (add-before 'check 'set-HOME
3260 ;; some tests require access to "$HOME/.cython"
3261 (lambda _ (setenv "HOME" "/tmp") #t))
3263 ;; FIXME: These tests started failing on armhf after the 0.28 update
3264 ;; (commit c69d11c5930), both with an error such as this:
3265 ;; compiling (cpp) and running dictcomp ...
3266 ;; === C/C++ compiler error output: ===
3268 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3269 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3270 ,@(if (target-arm32?)
3271 `((add-before 'check 'disable-failing-tests
3273 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3274 (for-each (lambda (test)
3275 (format disabled-tests "~a\n" test))
3276 '("memslice" "dictcomp"))
3277 (close-port disabled-tests)))))
3282 ;; Disable compiler optimizations to greatly reduce the running
3283 ;; time of the test suite.
3284 (setenv "CFLAGS" "-O0")
3286 (invoke "python" "runtests.py" "-vv"
3287 "-j" (number->string (parallel-job-count))))))))
3288 (home-page "https://cython.org/")
3289 (synopsis "C extensions for Python")
3290 (description "Cython is an optimising static compiler for both the Python
3291 programming language and the extended Cython programming language. It makes
3292 writing C extensions for Python as easy as Python itself.")
3293 (license license:asl2.0)
3294 (properties `((python2-variant . ,(delay python2-cython))))))
3296 (define-public python2-cython
3297 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3300 (name "python2-cython")
3302 `(("python-2" ,python-2))) ;this is not automatically changed
3304 (substitute-keyword-arguments (package-arguments base)
3306 `(modify-phases ,phases
3307 (add-before 'check 'adjust-test_embed
3309 (substitute* "runtests.py"
3310 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3311 ;; so it can give the right -L flag to GCC when embedding static
3312 ;; builds of Python. It is unaware that the Python "config"
3313 ;; directory (where the static library lives) was renamed in
3314 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3315 ;; which works fine, because that is where the shared library is.
3317 ;; It also appears to be unaware that the Makefile in Demos/embed
3318 ;; already unconditionally pass the static library location to GCC,
3319 ;; after checking sysconfig.get_config_var('LIBPL).
3321 ;; The effect is that the linker is unable to resolve libexpat
3322 ;; symbols when building for Python 2, because neither the Python 2
3323 ;; shared library nor Expat is available. To fix it, we can either
3324 ;; add Expat as an input and make it visible to the linker, or just
3325 ;; prevent it from overriding the Python shared library location.
3326 ;; The end result is identical, so we take the easy route.
3327 ((" or libname not in os\\.listdir\\(libdir\\)")
3331 ;; The RPython toolchain currently does not support Python 3.
3332 (define-public python2-rpython
3334 (name "python2-rpython")
3339 (uri (pypi-uri "rpython" version))
3342 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3343 (build-system python-build-system)
3344 (arguments `(#:python ,python-2))
3346 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3347 (home-page "https://rpython.readthedocs.org")
3348 (synopsis "Framework for implementing interpreters and virtual machines")
3349 (description "RPython is a translation and support framework for
3350 producing implementations of dynamic languages, emphasizing a clean separation
3351 between language specification and implementation aspects.")
3352 (license license:expat)))
3354 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3355 ;; python-scipy still build, as these three packages are often used together.
3356 (define-public python-numpy
3358 (name "python-numpy")
3364 "https://github.com/numpy/numpy/releases/download/v"
3365 version "/numpy-" version ".tar.gz"))
3368 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3369 (build-system python-build-system)
3371 `(("openblas" ,openblas)
3372 ("lapack" ,lapack)))
3374 `(("python-cython" ,python-cython)
3375 ("python-pytest" ,python-pytest)
3376 ("gfortran" ,gfortran)))
3379 (modify-phases %standard-phases
3380 (add-before 'build 'configure-blas-lapack
3381 (lambda* (#:key inputs #:allow-other-keys)
3382 (call-with-output-file "site.cfg"
3386 libraries = openblas
3387 library_dirs = ~a/lib
3388 include_dirs = ~a/include
3390 # backslash-n to make emacs happy
3392 lapack_libs = lapack
3393 library_dirs = ~a/lib
3394 include_dirs = ~a/include
3396 (assoc-ref inputs "openblas")
3397 (assoc-ref inputs "openblas")
3398 (assoc-ref inputs "lapack")
3399 (assoc-ref inputs "lapack"))))
3401 (add-before 'build 'fix-executable-paths
3402 (lambda* (#:key inputs #:allow-other-keys)
3403 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3404 ;; instead of /bin/sh.
3405 (substitute* "numpy/distutils/exec_command.py"
3406 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3407 (string-append match-start (assoc-ref inputs "bash") match-end)))
3408 ;; Use "gcc" executable, not "cc".
3409 (substitute* "numpy/distutils/system_info.py"
3410 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3411 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3413 ;; Tests can only be run after the library has been installed and not
3414 ;; within the source directory.
3416 (add-after 'install 'check
3417 (lambda* (#:key outputs inputs #:allow-other-keys)
3418 ;; Make installed package available for running the tests
3419 (add-installed-pythonpath inputs outputs)
3420 ;; Make sure "f2py" etc is found.
3421 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3422 ":" (getenv "PATH")))
3423 (with-directory-excursion "/tmp"
3424 (invoke "python" "-c"
3425 "import numpy; numpy.test(verbose=2)")))))))
3426 (home-page "http://www.numpy.org/")
3427 (synopsis "Fundamental package for scientific computing with Python")
3428 (description "NumPy is the fundamental package for scientific computing
3429 with Python. It contains among other things: a powerful N-dimensional array
3430 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3431 and Fortran code, useful linear algebra, Fourier transform, and random number
3433 (license license:bsd-3)))
3435 (define-public python2-numpy
3436 (package-with-python2 python-numpy))
3438 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3439 ;; interest only for legacy code going back to NumPy's predecessor
3441 (define-public python2-numpy-1.8
3442 (package (inherit python2-numpy)
3448 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3449 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3452 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3454 (substitute-keyword-arguments (package-arguments python2-numpy)
3456 `(modify-phases ,phases
3457 (replace 'configure-blas-lapack
3458 (lambda* (#:key inputs #:allow-other-keys)
3459 (call-with-output-file "site.cfg"
3463 libraries = openblas,lapack
3464 library_dirs = ~a/lib:~a/lib
3465 include_dirs = ~a/include:~a/include
3467 (assoc-ref inputs "openblas")
3468 (assoc-ref inputs "lapack")
3469 (assoc-ref inputs "openblas")
3470 (assoc-ref inputs "lapack"))))
3473 `(("python2-nose" ,python2-nose)))
3474 (description "NumPy is the fundamental package for scientific computing
3475 with Python. It contains among other things: a powerful N-dimensional array
3476 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3477 and Fortran code, useful linear algebra, Fourier transform, and random number
3478 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3479 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3481 (license license:bsd-3)))
3483 (define-public python-munch
3485 (name "python-munch")
3490 (uri (pypi-uri "munch" version))
3493 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3494 (build-system python-build-system)
3495 (home-page "https://github.com/Infinidat/munch")
3496 (synopsis "Dot-accessible dictionary")
3497 (description "Munch is a dot-accessible dictionary similar to JavaScript
3499 (license license:expat)))
3501 (define-public python2-munch
3502 (package-with-python2 python-munch))
3504 (define-public python-colormath
3506 (name "python-colormath")
3511 (uri (pypi-uri "colormath" version))
3514 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3515 (build-system python-build-system)
3517 `(("python-networkx" ,python-networkx)
3518 ("python-numpy" ,python-numpy)))
3519 (home-page "https://github.com/gtaylor/python-colormath")
3520 (synopsis "Color math and conversion library")
3522 "This is a Python library for color math and conversions.")
3523 (license license:bsd-3)))
3525 (define-public python2-colormath
3526 (package-with-python2 python-colormath))
3528 (define-public python-spectra
3530 (name "python-spectra")
3535 (uri (pypi-uri "spectra" version))
3538 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3539 (build-system python-build-system)
3542 (modify-phases %standard-phases
3544 (lambda _ (invoke "nosetests" "-v"))))))
3546 `(("python-colormath" ,python-colormath)))
3548 `(("python-nose" ,python-nose)))
3549 (home-page "https://github.com/jsvine/spectra")
3550 (synopsis "Color scales and color conversion")
3552 "This package provides a Python library intended to make color math,
3553 color scales, and color space conversion easy. It has support for:
3558 @item Color blending
3559 @item Brightening/darkening colors
3560 @item Saturating/desaturating colors
3561 @item Conversion to/from multiple color spaces.
3563 (license license:expat)))
3565 (define-public python2-spectra
3566 (package-with-python2 python-spectra))
3568 (define-public python-numpy-documentation
3570 (name "python-numpy-documentation")
3571 (version (package-version python-numpy))
3572 (source (package-source python-numpy))
3573 (build-system python-build-system)
3575 `(("python-matplotlib" ,python-matplotlib)
3576 ("python-numpy" ,python-numpy)
3577 ("pkg-config" ,pkg-config)
3578 ("python-sphinx" ,python-sphinx)
3579 ("python-numpydoc" ,python-numpydoc)
3580 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3582 texlive-generic-ifxetex
3583 texlive-generic-pdftex
3585 texlive-latex-capt-of
3587 texlive-latex-environ
3588 texlive-latex-eqparbox
3589 texlive-latex-etoolbox
3590 texlive-latex-expdlist
3591 texlive-latex-fancyhdr
3592 texlive-latex-fancyvrb
3593 texlive-latex-fncychap
3595 texlive-latex-framed
3596 texlive-latex-geometry
3597 texlive-latex-graphics
3598 texlive-latex-hyperref
3599 texlive-latex-mdwtools
3600 texlive-latex-multirow
3601 texlive-latex-needspace
3602 texlive-latex-oberdiek
3603 texlive-latex-parskip
3604 texlive-latex-preview
3605 texlive-latex-tabulary
3606 texlive-latex-threeparttable
3607 texlive-latex-titlesec
3608 texlive-latex-trimspaces
3610 texlive-latex-upquote
3612 texlive-latex-varwidth
3613 texlive-latex-wrapfig)))
3614 ("texinfo" ,texinfo)
3616 ("scipy-sphinx-theme"
3617 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3620 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3621 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3624 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3625 ,@(package-native-inputs python-numpy)))
3627 `(#:tests? #f ; we're only generating the documentation
3629 (modify-phases %standard-phases
3632 (lambda* (#:key inputs outputs #:allow-other-keys)
3633 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3635 data "/doc/" ,name "-"
3636 ,(package-version python-numpy)))
3637 (info-reader (string-append data "/info"))
3638 (html (string-append doc "/html"))
3639 (scipy-sphinx-theme "scipy-sphinx-theme")
3640 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3641 (pyver ,(string-append "PYVER=")))
3643 ;; FIXME: this is needed to for texlive-union to generate
3644 ;; fonts, which are not found.
3645 (setenv "HOME" "/tmp")
3647 (with-directory-excursion "doc"
3648 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3650 (invoke "make" "html" pyver)
3651 (invoke "make" "latex" "PAPER=a4" pyver)
3652 (invoke "make" "-C" "build/latex"
3653 "all-pdf" "PAPER=a4" pyver)
3654 ;; FIXME: Generation of the info file fails.
3655 ;; (invoke "make" "info" pyver)
3657 ;; (copy-file "build/texinfo/numpy.info"
3658 ;; (string-append info "/numpy.info"))
3659 (for-each (lambda (file)
3660 (copy-file (string-append "build/latex" file)
3661 (string-append doc file)))
3662 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3663 (with-directory-excursion "build/html"
3664 (for-each (lambda (file)
3665 (let* ((dir (dirname file))
3666 (tgt-dir (string-append html "/" dir)))
3667 (unless (equal? "." dir)
3669 (install-file file html)))
3670 (find-files "." ".*")))))
3672 (home-page (package-home-page python-numpy))
3673 (synopsis "Documentation for the python-numpy package")
3674 (description (package-description python-numpy))
3675 (license (package-license python-numpy))))
3677 (define-public python2-numpy-documentation
3678 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3680 (inherit numpy-documentation)
3681 (native-inputs `(("python2-functools32" ,python2-functools32)
3682 ,@(package-native-inputs numpy-documentation))))))
3684 (define-public python-pygit2
3686 (name "python-pygit2")
3691 (uri (pypi-uri "pygit2" version))
3693 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3694 (build-system python-build-system)
3696 '(#:tests? #f)) ; tests don't run correctly in our environment
3698 `(("python-six" ,python-six)
3699 ("python-cffi" ,python-cffi)
3700 ("libgit2" ,libgit2)
3701 ("python-tox" ,python-tox)))
3703 `(("python-pytest" ,python-pytest)))
3704 (home-page "https://github.com/libgit2/pygit2")
3705 (synopsis "Python bindings for libgit2")
3706 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3707 library, libgit2 implements Git plumbing.")
3708 ;; GPL2.0 only, with linking exception.
3709 (license license:gpl2)))
3711 (define-public python2-pygit2
3712 (package-with-python2 python-pygit2))
3714 (define-public python-pyparsing
3716 (name "python-pyparsing")
3721 (uri (pypi-uri "pyparsing" version))
3723 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3724 (build-system python-build-system)
3725 (outputs '("out" "doc"))
3727 `(#:tests? #f ; no test target
3729 (modify-phases %standard-phases
3730 (add-after 'install 'install-doc
3731 (lambda* (#:key outputs #:allow-other-keys)
3732 (let* ((doc (string-append (assoc-ref outputs "doc")
3733 "/share/doc/" ,name "-" ,version))
3734 (html-doc (string-append doc "/html"))
3735 (examples (string-append doc "/examples")))
3741 (install-file file tgt))
3742 (find-files dir ".*")))
3743 (list "docs" "htmldoc" "examples")
3744 (list doc html-doc examples))
3746 (home-page "https://github.com/pyparsing/pyparsing")
3747 (synopsis "Python parsing class library")
3749 "The pyparsing module is an alternative approach to creating and
3750 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3751 of regular expressions. The pyparsing module provides a library of classes
3752 that client code uses to construct the grammar directly in Python code.")
3753 (license license:expat)))
3755 (define-public python2-pyparsing
3756 (package-with-python2 python-pyparsing))
3758 (define-public python-numpydoc
3760 (name "python-numpydoc")
3765 (uri (pypi-uri "numpydoc" version))
3768 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3769 (build-system python-build-system)
3771 `(("python-sphinx" ,python-sphinx)))
3773 `(("python-nose" ,python-nose)))
3774 (home-page "https://pypi.python.org/pypi/numpydoc")
3776 "Numpy's Sphinx extensions")
3778 "Sphinx extension to support docstrings in Numpy format.")
3779 (license license:bsd-2)))
3781 (define-public python2-numpydoc
3782 (package-with-python2 python-numpydoc))
3784 (define-public python-numexpr
3786 (name "python-numexpr")
3791 (uri (pypi-uri "numexpr" version))
3794 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3795 (build-system python-build-system)
3796 (arguments `(#:tests? #f)) ; no tests included
3798 `(("python-numpy" ,python-numpy)))
3799 (home-page "https://github.com/pydata/numexpr")
3800 (synopsis "Fast numerical expression evaluator for NumPy")
3802 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3803 expressions that operate on arrays are accelerated and use less memory than
3804 doing the same calculation in Python. In addition, its multi-threaded
3805 capabilities can make use of all your cores, which may accelerate
3806 computations, most specially if they are not memory-bounded (e.g. those using
3807 transcendental functions).")
3808 (license license:expat)))
3810 (define-public python2-numexpr
3811 (package-with-python2 python-numexpr))
3813 (define-public python-cycler
3815 (name "python-cycler")
3819 (uri (pypi-uri "cycler" version))
3822 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3823 (build-system python-build-system)
3825 ;; XXX: The current version requires 'coveralls' which we don't have.
3826 ;; Enable this for the next release which uses 'python-pytest'.
3829 `(("python-six" ,python-six)))
3830 (home-page "http://matplotlib.org/cycler/")
3831 (synopsis "Composable keyword argument iterator")
3833 "When using @code{matplotlib} and plotting more than one line, it is
3834 common to want to be able to want to be able to cycle over one or more artist
3835 styles; but the plotting logic can quickly become involved.
3836 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3837 @code{Cycler} class was developed.")
3838 (license license:bsd-3)))
3840 (define-public python2-cycler
3841 (package-with-python2 python-cycler))
3843 (define-public python-colorspacious
3845 (name "python-colorspacious")
3851 (url "https://github.com/njsmith/colorspacious.git")
3852 (commit (string-append "v" version))))
3853 (file-name (git-file-name name version))
3855 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3856 (build-system python-build-system)
3858 `(("python-numpy" ,python-numpy)))
3860 `(("python-nose" ,python-nose)))
3863 (modify-phases %standard-phases
3866 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3867 (home-page "https://github.com/njsmith/colorspacious")
3868 (synopsis "Python library for colorspace conversions")
3869 (description "@code{colorspacious} is a Python library that lets you
3870 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3871 (license license:expat)))
3873 (define-public python2-colorspacious
3874 (package-with-python2 python-colorspacious))
3876 (define-public python-matplotlib
3878 (name "python-matplotlib")
3883 (uri (pypi-uri "matplotlib" version))
3886 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3887 (build-system python-build-system)
3888 (propagated-inputs ; the following packages are all needed at run time
3889 `(("python-cycler" ,python-cycler)
3890 ("python-kiwisolver" ,python-kiwisolver)
3891 ("python-pyparsing" ,python-pyparsing)
3892 ("python-pygobject" ,python-pygobject)
3893 ("gobject-introspection" ,gobject-introspection)
3894 ("python-tkinter" ,python "tk")
3895 ("python-dateutil" ,python-dateutil)
3896 ("python-numpy" ,python-numpy)
3897 ("python-pillow" ,python-pillow)
3898 ("python-pytz" ,python-pytz)
3899 ("python-six" ,python-six)
3900 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3901 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3902 ;; object. For this reason we need to import both libraries.
3903 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3904 ("python-pycairo" ,python-pycairo)
3905 ("python-cairocffi" ,python-cairocffi)))
3907 `(("libpng" ,libpng)
3908 ("imagemagick" ,imagemagick)
3909 ("freetype" ,freetype)
3912 ;; FIXME: Add backends when available.
3913 ;("python-wxpython" ,python-wxpython)
3917 `(("pkg-config" ,pkg-config)
3918 ("python-pytest" ,python-pytest)
3919 ("python-mock" ,python-mock)
3924 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3927 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3930 (modify-phases %standard-phases
3931 ;; XXX We disable all image comparison tests because we're using a
3932 ;; newer version of FreeType than matplotlib expects. This leads to
3933 ;; minor differences throughout the tests.
3934 (add-after 'unpack 'fix-and-disable-failing-tests
3936 (substitute* (append (find-files "lib/matplotlib/tests/"
3938 (find-files "lib/mpl_toolkits/tests"
3940 (("^from matplotlib" match)
3941 (string-append "import pytest\n" match))
3942 (("( *)@image_comparison" match indent)
3943 (string-append indent
3944 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3946 (substitute* "lib/matplotlib/tests/test_animation.py"
3947 (("/bin/sh") (which "sh")))
3948 (for-each delete-file
3949 ;; test_normal_axes, test_get_tightbbox_polar
3950 '("lib/matplotlib/tests/test_axes.py"
3951 ;; test_outward_ticks
3952 "lib/matplotlib/tests/test_tightlayout.py"
3953 ;; Fontconfig returns no fonts.
3954 "lib/matplotlib/tests/test_font_manager.py"))
3956 (add-before 'install 'install-jquery-ui
3957 (lambda* (#:key outputs inputs #:allow-other-keys)
3958 (let ((dir (string-append (assoc-ref outputs "out")
3959 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3962 (assoc-ref inputs "jquery-ui")
3966 (add-after 'install 'check
3967 (lambda* (#:key outputs inputs #:allow-other-keys)
3968 (add-installed-pythonpath inputs outputs)
3969 (invoke "python" "tests.py" "-v"
3970 "-m" "not network")))
3971 (add-before 'build 'configure-environment
3972 (lambda* (#:key outputs inputs #:allow-other-keys)
3973 (let ((cairo (assoc-ref inputs "cairo")))
3974 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3976 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3977 (setenv "HOME" (getcwd))
3978 (call-with-output-file "setup.cfg"
3980 (format port "[directories]~%
3981 basedirlist = ~a,~a~%
3984 (assoc-ref inputs "tcl")
3985 (assoc-ref inputs "tk")))))
3987 (home-page "https://matplotlib.org/")
3988 (synopsis "2D plotting library for Python")
3990 "Matplotlib is a Python 2D plotting library which produces publication
3991 quality figures in a variety of hardcopy formats and interactive environments
3992 across platforms. Matplotlib can be used in Python scripts, the python and
3993 ipython shell, web application servers, and six graphical user interface
3995 (license license:psfl)
3996 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3998 (define-public python2-matplotlib
3999 (let ((matplotlib (package-with-python2
4000 (strip-python2-variant python-matplotlib))))
4001 (package (inherit matplotlib)
4006 (uri (pypi-uri "matplotlib" version))
4009 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4011 (substitute-keyword-arguments (package-arguments matplotlib)
4013 `(modify-phases ,phases
4014 (replace 'install-jquery-ui
4015 (lambda* (#:key outputs inputs #:allow-other-keys)
4016 (let ((dir (string-append (assoc-ref outputs "out")
4017 "/lib/python2.7/site-packages/"
4018 "matplotlib/backends/web_backend/")))
4021 (assoc-ref inputs "jquery-ui")
4024 (delete 'check))))) ; These tests weren't run the the past.
4025 ;; Make sure to use special packages for Python 2 instead
4026 ;; of those automatically rewritten by package-with-python2.
4028 `(("python2-pycairo" ,python2-pycairo)
4029 ("python2-backports-functools-lru-cache"
4030 ,python2-backports-functools-lru-cache)
4031 ("python2-functools32" ,python2-functools32)
4032 ("python2-pygobject-2" ,python2-pygobject-2)
4033 ("python2-subprocess32" ,python2-subprocess32)
4034 ("python2-tkinter" ,python-2 "tk")
4035 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4036 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4038 (define-public python-matplotlib-documentation
4040 (name "python-matplotlib-documentation")
4041 (version (package-version python-matplotlib))
4042 (source (package-source python-matplotlib))
4043 (build-system python-build-system)
4045 `(("python-matplotlib" ,python-matplotlib)
4046 ("python-colorspacious" ,python-colorspacious)
4047 ("python-sphinx" ,python-sphinx)
4048 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4049 ("python-sphinx-gallery" ,python-sphinx-gallery)
4050 ("python-numpydoc" ,python-numpydoc)
4051 ("python-ipython" ,python-ipython)
4052 ("python-ipykernel" ,python-ipykernel)
4053 ("python-mock" ,python-mock)
4054 ("graphviz" ,graphviz)
4055 ("texlive" ,(texlive-union (list texlive-amsfonts
4056 texlive-latex-amsmath
4057 texlive-latex-enumitem
4058 texlive-latex-expdlist
4059 texlive-latex-geometry
4060 texlive-latex-preview
4061 texlive-latex-type1cm
4064 texlive-generic-pdftex
4067 texlive-fonts-adobe-times
4068 texlive-fonts-txfonts)))
4069 ("texinfo" ,texinfo)
4070 ,@(package-native-inputs python-matplotlib)))
4072 `(#:tests? #f ; we're only generating documentation
4074 (modify-phases %standard-phases
4075 ;; The tests in python-matplotlib are run after the install phase, so
4076 ;; we need to delete the extra phase here.
4081 (setenv "PYTHONPATH"
4082 (string-append (getenv "PYTHONPATH")
4083 ":" (getcwd) "/../examples/units"))
4084 (substitute* "conf.py"
4086 (("^SHA = check_output.*")
4087 (string-append "SHA = \"" ,version "\"\n"))
4088 ;; Don't fetch intersphinx files from the Internet
4089 (("^explicit_order_folders" m)
4090 (string-append "intersphinx_mapping = {}\n" m))
4091 (("'sphinx.ext.intersphinx',") "")
4092 ;; Disable URL embedding which requires internet access.
4093 (("'https://docs.scipy.org/doc/numpy'") "None")
4094 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4096 "SPHINXBUILD=sphinx-build"
4097 "SPHINXOPTS=" ; don't abort on warnings
4100 (lambda* (#:key inputs outputs #:allow-other-keys)
4101 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4102 (doc (string-append data "/doc/python-matplotlib-" ,version))
4103 (info (string-append data "/info"))
4104 (html (string-append doc "/html")))
4107 (copy-recursively "build/html" html)
4108 (symlink (string-append html "/_images")
4109 (string-append info "/matplotlib-figures"))
4110 (with-directory-excursion "build/texinfo"
4111 (substitute* "matplotlib.texi"
4112 (("@image\\{([^,]*)" all file)
4113 (string-append "@image{matplotlib-figures/" file)))
4114 (symlink (string-append html "/_images")
4115 "./matplotlib-figures")
4116 (invoke "makeinfo" "--no-split"
4117 "-o" "matplotlib.info" "matplotlib.texi"))
4118 (install-file "build/texinfo/matplotlib.info" info))
4120 (home-page (package-home-page python-matplotlib))
4121 (synopsis "Documentation for the python-matplotlib package")
4122 (description (package-description python-matplotlib))
4123 (license (package-license python-matplotlib))))
4125 (define-public python2-matplotlib-documentation
4126 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4130 (alist-delete "python-sphinx-copybutton"
4131 (package-native-inputs parent))))))
4133 (define-public python-matplotlib-venn
4135 (name "python-matplotlib-venn")
4140 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4143 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4144 (build-system python-build-system)
4145 (arguments '(#:tests? #f)) ; tests are not included
4147 `(("python-matplotlib" ,python-matplotlib)
4148 ("python-numpy" ,python-numpy)
4149 ("python-scipy" ,python-scipy)))
4151 `(("unzip" ,unzip)))
4152 (home-page "https://github.com/konstantint/matplotlib-venn")
4153 (synopsis "Plot area-proportional Venn diagrams")
4155 "This package provides tools for plotting area-proportional two- and
4156 three-way Venn diagrams in @code{matplotlib}.")
4157 (license license:expat)))
4159 (define-public python2-pysnptools
4161 (name "python2-pysnptools")
4166 (uri (pypi-uri "pysnptools" version))
4169 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4170 (build-system python-build-system)
4172 `(#:python ,python-2 ; only Python 2.7 is supported
4173 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4175 `(("python2-numpy" ,python2-numpy)
4176 ("python2-scipy" ,python2-scipy)
4177 ("python2-pandas" ,python2-pandas)))
4179 `(("python2-cython" ,python2-cython)))
4180 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4181 (synopsis "Library for reading and manipulating genetic data")
4183 "PySnpTools is a library for reading and manipulating genetic data. It
4184 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4185 those files. It can also efficiently manipulate ranges of integers using set
4186 operators such as union, intersection, and difference.")
4187 (license license:asl2.0)))
4189 (define-public python-scipy
4191 (name "python-scipy")
4196 (uri (pypi-uri "scipy" version))
4199 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4200 (build-system python-build-system)
4202 `(("python-numpy" ,python-numpy)
4203 ("python-matplotlib" ,python-matplotlib)
4204 ("python-pyparsing" ,python-pyparsing)))
4206 `(("lapack" ,lapack)
4207 ("openblas" ,openblas)))
4209 `(("python-cython" ,python-cython)
4210 ("python-pytest" ,python-pytest)
4211 ("python-sphinx" ,python-sphinx)
4212 ("python-numpydoc" ,python-numpydoc)
4213 ("gfortran" ,gfortran)
4216 (outputs '("out" "doc"))
4219 (modify-phases %standard-phases
4220 (add-after 'unpack 'disable-broken-tests
4222 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4223 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4224 (string-append indent
4225 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4227 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4228 (("^def test_parallel_threads\\(\\):" m)
4229 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4232 (add-before 'build 'configure-openblas
4233 (lambda* (#:key inputs #:allow-other-keys)
4234 (call-with-output-file "site.cfg"
4238 libraries = openblas
4239 library_dirs = ~a/lib
4240 include_dirs = ~a/include
4242 # backslash-n to make emacs happy
4244 library_dirs = ~a/lib
4245 atlas_libs = openblas
4247 (assoc-ref inputs "openblas")
4248 (assoc-ref inputs "openblas")
4249 (assoc-ref inputs "openblas"))))
4251 (add-after 'install 'install-doc
4252 (lambda* (#:key inputs outputs #:allow-other-keys)
4253 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4254 (doc (string-append data "/doc/" ,name "-" ,version))
4255 (html (string-append doc "/html"))
4256 (pyver ,(string-append "PYVER=" (version-major+minor
4257 (package-version python))))
4258 ;; By default it tries to run sphinx-build through the Python
4259 ;; interpreter which won't work with our shell wrapper.
4260 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4261 ;; Make installed package available for building the
4263 (add-installed-pythonpath inputs outputs)
4264 (with-directory-excursion "doc"
4265 ;; Fix generation of images for mathematical expressions.
4266 (substitute* (find-files "source" "conf\\.py")
4267 (("pngmath_use_preview = True")
4268 "pngmath_use_preview = False"))
4270 (invoke "make" "html" pyver sphinxbuild)
4271 (with-directory-excursion "build/html"
4272 (for-each (lambda (file)
4273 (let* ((dir (dirname file))
4274 (tgt-dir (string-append html "/" dir)))
4275 (install-file file html)))
4276 (find-files "." ".*")))))
4278 ;; Tests can only be run after the library has been installed and not
4279 ;; within the source directory.
4281 (add-after 'install 'check
4282 (lambda* (#:key inputs outputs #:allow-other-keys)
4283 (add-installed-pythonpath inputs outputs)
4284 (with-directory-excursion "/tmp"
4285 (invoke "python" "-c"
4286 "import scipy; scipy.test(verbose=2)")))))))
4287 (home-page "https://www.scipy.org/")
4288 (synopsis "The Scipy library provides efficient numerical routines")
4289 (description "The SciPy library is one of the core packages that make up
4290 the SciPy stack. It provides many user-friendly and efficient numerical
4291 routines such as routines for numerical integration and optimization.")
4292 (properties `((python2-variant . ,(delay python2-scipy))))
4293 (license license:bsd-3)))
4295 ;; Version 1.2.2 is the last version to support Python 2
4296 (define-public python2-scipy
4298 (inherit (package-with-python2
4299 (strip-python2-variant python-scipy)))
4304 (uri (pypi-uri "scipy" version))
4307 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4309 (define-public python-socksipy-branch
4311 (name "python-socksipy-branch")
4316 (uri (pypi-uri "SocksiPy-branch" version))
4319 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4320 (build-system python-build-system)
4322 `(#:tests? #f)) ; There are no tests
4323 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4324 (synopsis "Python SOCKS module")
4326 "SocksiPy - A Python SOCKS client module. It provides a
4327 socket-like interface that supports connections to any TCP
4328 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4329 The original version was developed by Dan Haim, this is a
4330 branch created by Mario Vilas to address some open issues,
4331 as the original project seems to have been abandoned circa 2007.")
4332 (license license:bsd-3)))
4334 (define-public python2-socksipy-branch
4335 (package-with-python2 python-socksipy-branch))
4337 (define-public python-pycodestyle
4339 (name "python-pycodestyle")
4344 (uri (pypi-uri "pycodestyle" version))
4347 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4348 (build-system python-build-system)
4349 (home-page "https://pycodestyle.readthedocs.io/")
4350 (synopsis "Python style guide checker")
4351 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4352 Python code against some of the style conventions in
4353 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4354 (license license:expat)))
4356 (define-public python2-pycodestyle
4357 (package-with-python2 python-pycodestyle))
4359 (define-public python-multidict
4361 (name "python-multidict")
4366 (uri (pypi-uri "multidict" version))
4369 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4370 (build-system python-build-system)
4372 `(("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "https://github.com/aio-libs/multidict/")
4375 (synopsis "Multidict implementation")
4376 (description "Multidict is dict-like collection of key-value pairs
4377 where key might be occurred more than once in the container.")
4378 (license license:asl2.0)))
4380 (define-public python-orderedmultidict
4382 (name "python-orderedmultidict")
4387 (uri (pypi-uri "orderedmultidict" version))
4390 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4391 (build-system python-build-system)
4394 (modify-phases %standard-phases
4395 (add-after 'unpack 'fix-tests
4397 ;; The package uses nosetest for running the tests.
4398 ;; Adding this initfile allows to run the test suite
4399 ;; without requiring nosetest.
4400 (with-output-to-file "tests/__init__.py" newline)
4403 `(("python-six" ,python-six)))
4405 `(("python-pycodestyle" ,python-pycodestyle)))
4406 (home-page "https://github.com/gruns/orderedmultidict")
4407 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4408 (description "This package contains a library for ordered multivalue
4409 dictionaries. A multivalue dictionary is a dictionary that can store
4410 multiple values for the same key. An ordered multivalue dictionary is a
4411 multivalue dictionary that retains the order of insertions and deletions.")
4412 (license license:unlicense)))
4414 (define-public python2-orderedmultidict
4415 (package-with-python2 python-orderedmultidict))
4417 (define-public python-autopep8
4419 (name "python-autopep8")
4424 (uri (pypi-uri "autopep8" version))
4427 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4428 (build-system python-build-system)
4430 `(("python-pycodestyle" ,python-pycodestyle)))
4431 (home-page "https://github.com/hhatto/autopep8")
4432 (synopsis "Format Python code according to the PEP 8 style guide")
4434 "@code{autopep8} automatically formats Python code to conform to
4435 the PEP 8 style guide. It uses the pycodestyle utility to determine
4436 what parts of the code needs to be formatted. @code{autopep8} is
4437 capable of fixing most of the formatting issues that can be reported
4439 (license (license:non-copyleft
4440 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4442 (define-public python2-autopep8
4443 (package-with-python2 python-autopep8))
4445 (define-public python-distutils-extra
4447 (name "python-distutils-extra")
4452 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4453 version "/+download/python-distutils-extra-"
4457 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4458 (build-system python-build-system)
4459 (home-page "https://launchpad.net/python-distutils-extra/")
4460 (synopsis "Enhancements to Python's distutils")
4462 "The python-distutils-extra module enables you to easily integrate
4463 gettext support, themed icons, and scrollkeeper-based documentation into
4464 Python's distutils.")
4465 (license license:gpl2)))
4467 (define-public python2-distutils-extra
4468 (package-with-python2 python-distutils-extra))
4470 (define-public python2-elib.intl
4472 (name "python2-elib.intl")
4476 ;; This project doesn't tag releases or publish tarballs, so we take
4477 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4480 (url "https://github.com/dieterv/elib.intl.git")
4481 (commit "d09997cfef")))
4482 (file-name (string-append name "-" version "-checkout"))
4485 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4486 (build-system python-build-system)
4488 ;; incompatible with Python 3 (exception syntax)
4489 `(#:python ,python-2
4491 (home-page "https://github.com/dieterv/elib.intl")
4492 (synopsis "Enhanced internationalization for Python")
4494 "The elib.intl module provides enhanced internationalization (I18N)
4495 services for your Python modules and applications.")
4496 (license license:lgpl3+)))
4498 (define-public python-olefile
4500 (name "python-olefile")
4505 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4506 "download/v" version "/olefile-" version ".tar.gz"))
4507 (file-name (string-append name "-" version ".tar.gz"))
4510 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4511 (build-system python-build-system)
4512 (home-page "https://www.decalage.info/python/olefileio")
4513 (synopsis "Read and write Microsoft OLE2 files.")
4515 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4516 Storage or Compound Document, Microsoft Office). It is an improved version of
4517 the OleFileIO module from PIL, the Python Image Library.")
4518 (license license:bsd-3)))
4520 (define-public python2-olefile
4521 (package-with-python2 python-olefile))
4523 (define-public python-pillow
4525 (name "python-pillow")
4530 (uri (pypi-uri "Pillow" version))
4533 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4534 (build-system python-build-system)
4536 `(("python-pytest" ,python-pytest)))
4538 `(("freetype" ,freetype)
4541 ("libjpeg" ,libjpeg)
4542 ("openjpeg" ,openjpeg)
4543 ("libtiff" ,libtiff)
4544 ("libwebp" ,libwebp)))
4546 `(("python-olefile" ,python-olefile)))
4549 (modify-phases %standard-phases
4550 (add-after 'unpack 'patch-ldconfig
4552 (substitute* "setup.py"
4553 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4554 (delete 'check) ; We must run checks after python-pillow is installed.
4555 (add-after 'install 'check-installed
4556 (lambda* (#:key outputs inputs #:allow-other-keys)
4558 (setenv "HOME" (getcwd))
4559 ;; Make installed package available for running the tests.
4560 (add-installed-pythonpath inputs outputs)
4561 (invoke "python" "selftest.py" "--installed")
4562 (invoke "python" "-m" "pytest" "-vv")))))))
4563 (home-page "https://python-pillow.org")
4564 (synopsis "Fork of the Python Imaging Library")
4566 "The Python Imaging Library adds image processing capabilities to your
4567 Python interpreter. This library provides extensive file format support, an
4568 efficient internal representation, and fairly powerful image processing
4569 capabilities. The core image library is designed for fast access to data
4570 stored in a few basic pixel formats. It should provide a solid foundation for
4571 a general image processing tool.")
4572 (license (license:x11-style
4573 "http://www.pythonware.com/products/pil/license.htm"
4574 "The PIL Software License"))))
4576 (define-public python2-pillow
4577 (package-with-python2 python-pillow))
4579 (define-public python-pycparser
4581 (name "python-pycparser")
4586 (uri (pypi-uri "pycparser" version))
4589 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4590 (outputs '("out" "doc"))
4591 (build-system python-build-system)
4593 `(("pkg-config" ,pkg-config)))
4596 (modify-phases %standard-phases
4599 (with-directory-excursion "tests"
4600 (invoke "python" "all_tests.py"))
4602 (add-after 'install 'install-doc
4603 (lambda* (#:key outputs #:allow-other-keys)
4604 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4605 (doc (string-append data "/doc/" ,name "-" ,version))
4606 (examples (string-append doc "/examples")))
4608 (for-each (lambda (file)
4609 (copy-file (string-append "." file)
4610 (string-append doc file)))
4611 '("/README.rst" "/CHANGES" "/LICENSE"))
4612 (copy-recursively "examples" examples)
4614 (home-page "https://github.com/eliben/pycparser")
4615 (synopsis "C parser in Python")
4617 "Pycparser is a complete parser of the C language, written in pure Python
4618 using the PLY parsing library. It parses C code into an AST and can serve as
4619 a front-end for C compilers or analysis tools.")
4620 (license license:bsd-3)))
4622 (define-public python2-pycparser
4623 (package-with-python2 python-pycparser))
4625 (define-public python-pywavelets
4627 (name "python-pywavelets")
4629 (home-page "https://github.com/PyWavelets/pywt")
4632 (uri (pypi-uri "PyWavelets" version))
4635 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4636 (build-system python-build-system)
4638 '(#:modules ((ice-9 ftw)
4642 (guix build python-build-system))
4643 #:phases (modify-phases %standard-phases
4646 (let ((cwd (getcwd))
4647 (libdir (find (cut string-prefix? "lib." <>)
4648 (scandir "build"))))
4649 (with-directory-excursion (string-append cwd "/build/" libdir)
4650 (invoke "nosetests" "-v" "."))))))))
4652 `(("python-matplotlib" ,python-matplotlib) ;for tests
4653 ("python-nose" ,python-nose)))
4655 `(("python-numpy" ,python-numpy)))
4656 (synopsis "Wavelet transforms in Python")
4658 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4659 mathematical basis functions that are localized in both time and frequency.
4660 Wavelet transforms are time-frequency transforms employing wavelets. They are
4661 similar to Fourier transforms, the difference being that Fourier transforms are
4662 localized only in frequency instead of in time and frequency.")
4663 (license license:expat)))
4665 (define-public python2-pywavelets
4666 (package-with-python2 python-pywavelets))
4668 (define-public python-xcffib
4670 (name "python-xcffib")
4675 (uri (pypi-uri "xcffib" version))
4678 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4679 (build-system python-build-system)
4681 `(("libxcb" ,libxcb)))
4683 `(("python-cffi" ,python-cffi) ; used at run time
4684 ("python-six" ,python-six)))
4686 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4689 (modify-phases %standard-phases
4690 (add-after 'unpack 'fix-libxcb-path
4691 (lambda* (#:key inputs #:allow-other-keys)
4692 (let ((libxcb (assoc-ref inputs "libxcb")))
4693 (substitute* '("xcffib/__init__.py")
4694 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key outputs #:allow-other-keys)
4698 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4699 "/doc/" ,name "-" ,version)))
4701 (copy-file "README.md"
4702 (string-append doc "/README.md"))
4704 (home-page "https://github.com/tych0/xcffib")
4705 (synopsis "XCB Python bindings")
4707 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4708 support for Python 3 and PyPy. It is based on cffi.")
4709 (license license:expat)))
4711 (define-public python2-xcffib
4712 (package-with-python2 python-xcffib))
4714 (define-public python-cairocffi
4716 (name "python-cairocffi")
4721 (uri (pypi-uri "cairocffi" version))
4724 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4725 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4726 (build-system python-build-system)
4727 (outputs '("out" "doc"))
4731 ("gdk-pixbuf" ,gdk-pixbuf)
4735 `(("pkg-config" ,pkg-config)
4736 ("python-pytest" ,python-pytest)
4737 ("python-pytest-cov" ,python-pytest-cov)
4738 ("python-pytest-runner" ,python-pytest-runner)
4739 ("python-sphinx" ,python-sphinx)
4740 ("python-docutils" ,python-docutils)))
4742 `(("python-xcffib" ,python-xcffib))) ; used at run time
4745 (modify-phases %standard-phases
4746 (add-after 'unpack 'patch-paths
4747 (lambda* (#:key inputs outputs #:allow-other-keys)
4748 (substitute* (find-files "." "\\.py$")
4749 (("dlopen\\(ffi, 'cairo'")
4750 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4751 "/lib/libcairo.so.2'"))
4752 (("dlopen\\(ffi, 'gdk-3'")
4753 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4754 "/lib/libgtk-3.so.0'"))
4755 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4756 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4757 "/lib/libgdk_pixbuf-2.0.so.0'"))
4758 (("dlopen\\(ffi, 'glib-2.0'")
4759 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4760 "/lib/libglib-2.0.so.0'"))
4761 (("dlopen\\(ffi, 'gobject-2.0'")
4762 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4763 "/lib/libgobject-2.0.so.0'"))
4764 (("dlopen\\(ffi, 'pangocairo-1.0'")
4765 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4766 "/lib/libpangocairo-1.0.so.0'"))
4767 (("dlopen\\(ffi, 'pango-1.0'")
4768 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4769 "/lib/libpango-1.0.so.0'")))
4771 (add-after 'install 'install-doc
4772 (lambda* (#:key inputs outputs #:allow-other-keys)
4773 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4774 (doc (string-append data "/doc/" ,name "-" ,version))
4775 (html (string-append doc "/html")))
4776 (setenv "LD_LIBRARY_PATH"
4777 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4778 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4779 (setenv "LANG" "en_US.UTF-8")
4781 (for-each (lambda (file)
4782 (copy-file (string-append "." file)
4783 (string-append doc file)))
4784 '("/README.rst" "/CHANGES" "/LICENSE"))
4785 (system* "python" "setup.py" "build_sphinx")
4786 (copy-recursively "docs/_build/html" html)
4788 (home-page "https://github.com/Kozea/cairocffi")
4789 (synopsis "Python bindings and object-oriented API for Cairo")
4791 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4792 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4793 graphics library with support for multiple backends including image buffers,
4794 PNG, PostScript, PDF, and SVG file output.")
4795 (license license:bsd-3)))
4797 (define-public python2-cairocffi
4798 (package-with-python2 python-cairocffi))
4800 (define-public python-decorator
4802 (name "python-decorator")
4807 (uri (pypi-uri "decorator" version))
4809 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4810 (build-system python-build-system)
4811 (home-page "https://pypi.python.org/pypi/decorator/")
4812 (synopsis "Python module to simplify usage of decorators")
4814 "The aim of the decorator module is to simplify the usage of decorators
4815 for the average programmer, and to popularize decorators usage giving examples
4816 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4817 etc. The core of this module is a decorator factory.")
4818 (license license:expat)))
4820 (define-public python2-decorator
4821 (package-with-python2 python-decorator))
4823 (define-public python-drmaa
4825 (name "python-drmaa")
4830 (uri (pypi-uri "drmaa" version))
4832 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4833 (build-system python-build-system)
4834 ;; The test suite requires libdrmaa which is provided by the cluster
4835 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4836 ;; should be set to the path of the libdrmaa library.
4837 (arguments '(#:tests? #f))
4839 `(("python-nose" ,python-nose)))
4840 (home-page "https://pypi.python.org/pypi/drmaa")
4841 (synopsis "Python bindings for the DRMAA library")
4843 "A Python package for Distributed Resource Management (DRM) job
4844 submission and control. This package is an implementation of the DRMAA 1.0
4845 Python language binding specification.")
4846 (license license:bsd-3)))
4848 (define-public python2-drmaa
4849 (package-with-python2 python-drmaa))
4851 (define-public python-grako
4853 (name "python-grako")
4859 (pypi-uri "grako" version ".zip"))
4862 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4863 (build-system python-build-system)
4864 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4867 ("python-pytest" ,python-pytest)
4868 ("python-pytest-runner" ,python-pytest-runner)))
4869 (home-page "https://bitbucket.org/neogeny/grako")
4870 (synopsis "EBNF parser generator")
4872 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4873 memoizing PEG/Packrat parser in Python.")
4874 (license license:bsd-3)))
4876 (define-public python2-grako
4877 (package-with-python2 python-grako))
4879 (define-public python-gridmap
4881 (name "python-gridmap")
4887 (url "https://github.com/pygridtools/gridmap.git")
4888 (commit (string-append "v" version))))
4889 (file-name (git-file-name name version))
4891 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4892 (build-system python-build-system)
4894 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4896 `(("python-psutil" ,python-psutil)
4897 ("python-drmaa" ,python-drmaa)
4898 ("python-pyzmq" ,python-pyzmq)))
4899 (home-page "https://github.com/pygridtools/gridmap")
4900 (synopsis "Create jobs on a cluster directly from Python")
4902 "Gridmap is a Python package to allow you to easily create jobs on the
4903 cluster directly from Python. You can directly map Python functions onto the
4904 cluster without needing to write any wrapper code yourself.")
4905 (license license:gpl3+)))
4907 (define-public python2-gridmap
4908 (package-with-python2 python-gridmap))
4910 (define-public python-honcho
4912 (name "python-honcho")
4918 (url "https://github.com/nickstenning/honcho.git")
4919 (commit (string-append "v" version))))
4920 (file-name (git-file-name name version))
4922 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4923 (build-system python-build-system)
4925 `(("python-pytest" ,python-pytest)
4926 ("python-mock" ,python-mock)
4927 ("python-tox" ,python-tox)
4928 ("which" ,which))) ;for tests
4930 `(("python-jinja2" ,python-jinja2)))
4933 (modify-phases %standard-phases
4935 (add-after 'install 'check
4936 (lambda* (#:key outputs inputs #:allow-other-keys)
4937 ;; fix honcho path in testsuite
4938 (substitute* "tests/conftest.py"
4939 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4940 "/bin/honcho" "'")))
4941 ;; It's easier to run tests after install.
4942 ;; Make installed package available for running the tests
4943 (add-installed-pythonpath inputs outputs)
4944 (invoke "py.test" "-v"))))))
4945 (home-page "https://github.com/nickstenning/honcho")
4946 (synopsis "Manage Procfile-based applications")
4948 "A Procfile is a file which describes how to run an application
4949 consisting of several processes. honcho starts all listed processes.
4950 The output of all running processes is collected by honcho and
4952 (license license:expat)))
4954 (define-public python2-honcho
4955 (package-with-python2 python-honcho))
4957 (define-public python-pexpect
4959 (name "python-pexpect")
4964 (uri (pypi-uri "pexpect" version))
4966 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4967 (build-system python-build-system)
4970 (modify-phases %standard-phases
4971 (add-before 'check 'prepare-tests
4973 (substitute* (find-files "tests")
4974 (("/bin/ls") (which "ls"))
4975 (("/bin/echo") (which "echo"))
4976 (("/bin/which") (which "which"))
4977 ;; Many tests try to use the /bin directory which
4978 ;; is not present in the build environment.
4979 ;; Use one that's non-empty and unlikely to change.
4980 (("/bin'") "/dev'"))
4981 ;; XXX: Socket connection test gets "Connection reset by peer".
4982 ;; Why does it not work? Delete for now.
4983 (delete-file "tests/test_socket.py")
4985 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4987 `(("python-nose" ,python-nose)
4988 ("python-pytest" ,python-pytest)
4991 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4993 `(("python-ptyprocess" ,python-ptyprocess)))
4994 (home-page "http://pexpect.readthedocs.org/")
4995 (synopsis "Controlling interactive console applications")
4997 "Pexpect is a pure Python module for spawning child applications;
4998 controlling them; and responding to expected patterns in their output.
4999 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5000 child application and control it as if a human were typing commands.")
5001 (license license:isc)))
5003 (define-public python2-pexpect
5004 (package-with-python2 python-pexpect))
5006 (define-public python-setuptools-scm
5008 (name "python-setuptools-scm")
5012 (uri (pypi-uri "setuptools_scm" version))
5015 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5016 (build-system python-build-system)
5017 (home-page "https://github.com/pypa/setuptools_scm/")
5018 (synopsis "Manage Python package versions in SCM metadata")
5020 "Setuptools_scm handles managing your Python package versions in
5021 @dfn{software configuration management} (SCM) metadata instead of declaring
5022 them as the version argument or in a SCM managed file.")
5023 (license license:expat)))
5025 (define-public python2-setuptools-scm
5026 (package-with-python2 python-setuptools-scm))
5028 (define-public python-pathlib2
5030 (name "python-pathlib2")
5035 (uri (pypi-uri "pathlib2" version))
5038 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5039 (build-system python-build-system)
5041 `(("python-scandir" ,python-scandir)
5042 ("python-six" ,python-six)))
5043 (home-page "https://pypi.python.org/pypi/pathlib2/")
5044 (synopsis "Object-oriented file system paths")
5045 (description "The goal of pathlib2 is to provide a backport of the
5046 standard @code{pathlib} module which tracks the standard library module, so
5047 all the newest features of the standard @code{pathlib} can be used also on
5048 older Python versions.")
5049 (license license:expat)))
5051 (define-public python-importlib-metadata
5053 (name "python-importlib-metadata")
5058 (uri (pypi-uri "importlib_metadata" version))
5061 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
5062 (build-system python-build-system)
5064 `(("python-configparser" ,python-configparser)
5065 ("python-contextlib2" ,python-contextlib2)
5066 ("python-docutils" ,python-docutils)
5067 ("python-pathlib2" ,python-pathlib2)
5068 ("python-rst.linker" ,python-rst.linker)
5069 ("python-zipp" ,python-zipp)))
5071 `(("python-setuptools-scm" ,python-setuptools-scm)
5072 ("python-sphinx" ,python-sphinx)))
5073 (home-page "https://importlib-metadata.readthedocs.io/")
5074 (synopsis "Read metadata from Python packages")
5076 "@code{importlib_metadata} is a library which provides an API for
5077 accessing an installed Python package's metadata, such as its entry points or
5078 its top-level name. This functionality intends to replace most uses of
5079 @code{pkg_resources} entry point API and metadata API. Along with
5080 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5081 need to use the older and less efficient @code{pkg_resources} package.")
5082 (license license:asl2.0)))
5084 (define-public python-jaraco-packaging
5086 (name "python-jaraco-packaging")
5091 (uri (pypi-uri "jaraco.packaging" version))
5094 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5095 (build-system python-build-system)
5097 `(("python-pytest" ,python-pytest)
5098 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5099 ("python-pytest-flake8" ,python-pytest-flake8)
5100 ("python-rst.linker" ,python-rst.linker)
5101 ("python-setuptools" ,python-setuptools)
5102 ("python-setuptools-scm" ,python-setuptools-scm)
5103 ("python-six" ,python-six)
5104 ("python-sphinx" ,python-sphinx)))
5105 (home-page "https://github.com/jaraco/jaraco.packaging")
5106 (synopsis "Tools to supplement packaging Python releases")
5108 "This package provides various tools to supplement packaging Python
5110 (license license:expat)))
5112 (define-public python-pathpy
5114 (name "python-pathpy")
5119 (uri (pypi-uri "path.py" version))
5121 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5122 (outputs '("out" "doc"))
5123 (build-system python-build-system)
5125 `(("python-appdirs" ,python-appdirs)
5126 ("python-importlib-metadata" ,python-importlib-metadata)))
5128 `(("python-setuptools-scm" ,python-setuptools-scm)
5129 ("python-sphinx" ,python-sphinx)
5130 ("python-rst.linker" ,python-rst.linker)
5131 ("python-pytest" ,python-pytest)
5132 ("python-pytest-runner" ,python-pytest-runner)
5133 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5136 (modify-phases %standard-phases
5137 (add-after 'build 'build-doc
5139 (setenv "LANG" "en_US.UTF-8")
5140 (invoke "python" "setup.py" "build_sphinx")))
5141 (add-after 'install 'install-doc
5142 (lambda* (#:key outputs #:allow-other-keys)
5143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5144 (doc (string-append data "/doc/" ,name "-" ,version))
5145 (html (string-append doc "/html")))
5147 (for-each (lambda (file)
5148 (copy-file file (string-append doc "/" file)))
5149 '("README.rst" "CHANGES.rst"))
5150 (copy-recursively "build/sphinx/html" html)
5154 ;; The import time test aborts if an import takes longer than
5155 ;; 100ms. It may very well take a little longer than that.
5156 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5157 (home-page "https://github.com/jaraco/path.py")
5158 (synopsis "Python module wrapper for built-in os.path")
5160 "@code{path.py} implements path objects as first-class entities, allowing
5161 common operations on files to be invoked on those path objects directly.")
5162 (license license:expat)))
5164 (define-public python2-pathpy
5165 (package-with-python2 python-pathpy))
5167 (define-public python-simplegeneric
5169 (name "python-simplegeneric")
5174 (uri (pypi-uri "simplegeneric" version ".zip"))
5176 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5177 (build-system python-build-system)
5179 `(("unzip" ,unzip)))
5180 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5181 (synopsis "Python module for simple generic functions")
5183 "The simplegeneric module lets you define simple single-dispatch generic
5184 functions, akin to Python’s built-in generic functions like @code{len()},
5185 @code{iter()} and so on. However, instead of using specially-named methods,
5186 these generic functions use simple lookup tables, akin to those used by
5187 e.g. @code{pickle.dump()} and other generic functions found in the Python
5189 (license license:zpl2.1)))
5191 (define-public python2-simplegeneric
5192 (package-with-python2 python-simplegeneric))
5194 (define-public python-ipython-genutils
5195 ;; TODO: This package is retired, check if can be removed, see description.
5197 (name "python-ipython-genutils")
5202 (uri (pypi-uri "ipython_genutils" version))
5204 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5205 (build-system python-build-system)
5206 (arguments `(#:tests? #f)) ; no tests
5207 (home-page "https://ipython.org")
5208 (synopsis "Vestigial utilities from IPython")
5210 "This package provides retired utilities from IPython. No packages
5211 outside IPython/Jupyter should depend on it.
5213 This package shouldn't exist. It contains some common utilities shared by
5214 Jupyter and IPython projects during The Big Split. As soon as possible, those
5215 packages will remove their dependency on this, and this package will go
5217 (license license:bsd-3)))
5219 (define-public python2-ipython-genutils
5220 (package-with-python2 python-ipython-genutils))
5222 (define-public python-traitlets
5224 (name "python-traitlets")
5229 (uri (pypi-uri "traitlets" version))
5232 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5233 (build-system python-build-system)
5236 (modify-phases %standard-phases
5237 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5239 `(("python-ipython-genutils" ,python-ipython-genutils)
5240 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5242 `(("python-pytest" ,python-pytest)))
5243 (properties `((python2-variant . ,(delay python2-traitlets))))
5244 (home-page "https://ipython.org")
5245 (synopsis "Configuration system for Python applications")
5247 "Traitlets is a framework that lets Python classes have attributes with
5248 type checking, dynamically calculated default values, and ‘on change’
5249 callbacks. The package also includes a mechanism to use traitlets for
5250 configuration, loading values from files or from command line arguments. This
5251 is a distinct layer on top of traitlets, so you can use traitlets in your code
5252 without using the configuration machinery.")
5253 (license license:bsd-3)))
5255 (define-public python2-traitlets
5256 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5260 `(("python2-enum34" ,python2-enum34)
5261 ,@(package-propagated-inputs traitlets))))))
5263 (define-public python-jupyter-core
5265 (name "python-jupyter-core")
5270 (uri (string-append (pypi-uri "jupyter_core" version)))
5273 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5274 (build-system python-build-system)
5275 ;; FIXME: not sure how to run the tests
5276 (arguments `(#:tests? #f))
5278 `(("python-traitlets" ,python-traitlets)))
5279 (home-page "http://jupyter.org/")
5280 (synopsis "Jupyter base package")
5282 "Jupyter core is the base package on which Jupyter projects rely.")
5283 (license license:bsd-3)))
5285 (define-public python2-jupyter-core
5286 (package-with-python2 python-jupyter-core))
5288 (define-public python-jupyter-client
5290 (name "python-jupyter-client")
5295 (uri (pypi-uri "jupyter_client" version))
5298 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5299 (build-system python-build-system)
5300 ;; Tests fail because of missing native python kernel which I assume is
5301 ;; provided by the ipython package, which we cannot use because it would
5302 ;; cause a dependency cycle.
5306 #:phases (modify-phases %standard-phases
5307 (add-after 'unpack 'set-tool-file-names
5308 (lambda* (#:key inputs #:allow-other-keys)
5309 (let ((iproute (assoc-ref inputs "iproute")))
5310 (substitute* "jupyter_client/localinterfaces.py"
5312 (string-append "'" iproute "/sbin/ip'")))
5315 `(("iproute" ,iproute)))
5317 `(("python-pyzmq" ,python-pyzmq)
5318 ("python-traitlets" ,python-traitlets)
5319 ("python-jupyter-core" ,python-jupyter-core)))
5320 (home-page "http://jupyter.org/")
5321 (synopsis "Jupyter protocol implementation and client libraries")
5323 "The @code{jupyter_client} package contains the reference implementation
5324 of the Jupyter protocol. It also provides client and kernel management APIs
5325 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5326 installing @code{kernelspec}s for use with Jupyter frontends.")
5327 (license license:bsd-3)))
5329 (define-public python2-jupyter-client
5330 (package-with-python2 python-jupyter-client))
5332 (define-public python-ipykernel
5334 (name "python-ipykernel")
5339 (uri (pypi-uri "ipykernel" version))
5341 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5342 (build-system python-build-system)
5345 (modify-phases %standard-phases
5348 (setenv "HOME" "/tmp")
5349 (invoke "pytest" "-v")
5351 (add-after 'install 'set-python-file-name
5352 (lambda* (#:key outputs #:allow-other-keys)
5353 ;; Record the absolute file name of the 'python' executable in
5355 (let ((out (assoc-ref outputs "out")))
5356 (substitute* (string-append out "/share/jupyter"
5357 "/kernels/python3/kernel.json")
5359 (string-append "\"" (which "python") "\"")))
5362 `(("python-ipython" ,python-ipython)
5363 ;; imported at runtime during connect
5364 ("python-jupyter-client" ,python-jupyter-client)))
5366 `(("python-pytest" ,python-pytest)
5367 ("python-nose" ,python-nose)))
5368 (home-page "https://ipython.org")
5369 (synopsis "IPython Kernel for Jupyter")
5371 "This package provides the IPython kernel for Jupyter.")
5372 (license license:bsd-3)))
5374 ;; Version 5.1.1 and above no longer support Python 2.
5375 (define-public python2-ipykernel
5377 (name "python2-ipykernel")
5382 (uri (pypi-uri "ipykernel" version))
5384 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5385 (build-system python-build-system)
5387 `(#:python ,python-2
5389 (modify-phases %standard-phases
5392 (setenv "HOME" "/tmp")
5393 (invoke "pytest" "-v")
5396 `(("python2-ipython" ,python2-ipython)
5397 ;; imported at runtime during connect
5398 ("python2-jupyter-client" ,python2-jupyter-client)))
5400 `(("python2-pytest" ,python2-pytest)
5401 ("python2-nose" ,python2-nose)))
5402 (home-page "https://ipython.org")
5403 (synopsis "IPython Kernel for Jupyter")
5405 "This package provides the IPython kernel for Jupyter.")
5406 (license license:bsd-3)))
5408 (define-public python-pari-jupyter
5410 (name "python-pari-jupyter")
5415 (uri (pypi-uri "pari_jupyter" version))
5418 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5419 (build-system python-build-system)
5421 `(("python-ipykernel" ,python-ipykernel)))
5423 `(("pari-gp" ,pari-gp)
5424 ("readline" ,readline)))
5426 `(#:tests? #f)) ; no test suite
5428 "https://github.com/jdemeyer/pari_jupyter")
5429 (synopsis "A Jupyter kernel for PARI/GP")
5430 (description "The package provides a PARI/GP kernel for Jupyter.")
5431 (license license:gpl3+)))
5433 (define-public python-backcall
5435 (name "python-backcall")
5440 (uri (pypi-uri "backcall" version))
5443 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5444 (build-system python-build-system)
5445 (home-page "https://github.com/takluyver/backcall/")
5446 (synopsis "Specifications for callback functions passed in to an API")
5448 "If your code lets other people supply callback functions, it's important
5449 to specify the function signature you expect, and check that functions support
5450 that. Adding extra parameters later would break other peoples code unless
5451 you're careful. The @code{backcall} package provides a way of specifying the
5452 callback signature using a prototype function.")
5453 (license license:bsd-3)))
5455 ;; This is the latest release of the LTS version of ipython with support for
5456 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5457 ;; dropped support for Python 2.7.
5458 (define-public python2-ipython
5460 (name "python2-ipython")
5465 (uri (pypi-uri "ipython" version ".tar.gz"))
5467 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5468 (build-system python-build-system)
5470 `(("python2-backports-shutil-get-terminal-size"
5471 ,python2-backports-shutil-get-terminal-size)
5472 ("python2-pathlib2" ,python2-pathlib2)
5473 ("python2-pyzmq" ,python2-pyzmq)
5474 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5475 ("python2-terminado" ,python2-terminado)
5476 ("python2-matplotlib" ,python2-matplotlib)
5477 ("python2-numpy" ,python2-numpy)
5478 ("python2-numpydoc" ,python2-numpydoc)
5479 ("python2-jinja2" ,python2-jinja2)
5480 ("python2-mistune" ,python2-mistune)
5481 ("python2-pexpect" ,python2-pexpect)
5482 ("python2-pickleshare" ,python2-pickleshare)
5483 ("python2-simplegeneric" ,python2-simplegeneric)
5484 ("python2-jsonschema" ,python2-jsonschema)
5485 ("python2-traitlets" ,python2-traitlets)
5486 ("python2-nbformat" ,python2-nbformat)
5487 ("python2-pygments" ,python2-pygments)))
5489 `(("readline" ,readline)
5492 `(("graphviz" ,graphviz)
5493 ("pkg-config" ,pkg-config)
5494 ("python2-requests" ,python2-requests) ;; for tests
5495 ("python2-testpath" ,python2-testpath)
5496 ("python2-mock" ,python2-mock)
5497 ("python2-nose" ,python2-nose)))
5499 `(#:python ,python-2
5501 (modify-phases %standard-phases
5502 (add-before 'check 'delete-broken-tests
5503 (lambda* (#:key inputs #:allow-other-keys)
5504 ;; These tests throw errors for unknown reasons.
5505 (delete-file "IPython/core/tests/test_profile.py")
5506 (delete-file "IPython/core/tests/test_interactiveshell.py")
5507 (delete-file "IPython/core/tests/test_magic.py")
5509 (home-page "https://ipython.org")
5510 (synopsis "IPython is a tool for interactive computing in Python")
5512 "IPython provides a rich architecture for interactive computing with:
5513 Powerful interactive shells, a browser-based notebook, support for interactive
5514 data visualization, embeddable interpreters and tools for parallel
5516 (license license:bsd-3)))
5518 (define-public python-ipython
5520 (name "python-ipython")
5525 (uri (pypi-uri "ipython" version ".tar.gz"))
5527 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5528 (build-system python-build-system)
5530 `(("python-backcall" ,python-backcall)
5531 ("python-pyzmq" ,python-pyzmq)
5532 ("python-prompt-toolkit" ,python-prompt-toolkit)
5533 ("python-terminado" ,python-terminado)
5534 ("python-matplotlib" ,python-matplotlib)
5535 ("python-numpy" ,python-numpy)
5536 ("python-numpydoc" ,python-numpydoc)
5537 ("python-jedi" ,python-jedi)
5538 ("python-jinja2" ,python-jinja2)
5539 ("python-mistune" ,python-mistune)
5540 ("python-pexpect" ,python-pexpect)
5541 ("python-pickleshare" ,python-pickleshare)
5542 ("python-simplegeneric" ,python-simplegeneric)
5543 ("python-jsonschema" ,python-jsonschema)
5544 ("python-traitlets" ,python-traitlets)
5545 ("python-nbformat" ,python-nbformat)
5546 ("python-pygments" ,python-pygments)))
5548 `(("readline" ,readline)
5551 `(("graphviz" ,graphviz)
5552 ("pkg-config" ,pkg-config)
5553 ("python-requests" ,python-requests) ;; for tests
5554 ("python-testpath" ,python-testpath)
5555 ("python-nose" ,python-nose)))
5558 (modify-phases %standard-phases
5559 (add-after 'unpack 'make-docs-reproducible
5561 (substitute* "IPython/sphinxext/ipython_directive.py"
5562 ((".*import datetime") "")
5563 ((".*datetime.datetime.now\\(\\)") "")
5564 (("%timeit") "# %timeit"))
5566 ;; Tests can only be run after the library has been installed and not
5567 ;; within the source directory.
5569 (add-after 'install 'check
5570 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5573 ;; Make installed package available for running the tests
5574 (add-installed-pythonpath inputs outputs)
5575 (setenv "HOME" "/tmp/") ;; required by a test
5576 ;; We only test the core because one of the other tests
5577 ;; tries to import ipykernel.
5578 (invoke "python" "IPython/testing/iptest.py"
5579 "-v" "IPython/core/tests"))
5581 (add-before 'check 'fix-tests
5582 (lambda* (#:key inputs #:allow-other-keys)
5583 (substitute* "./IPython/utils/_process_posix.py"
5584 (("/usr/bin/env', 'which") (which "which")))
5585 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5586 (("#!/usr/bin/env python")
5587 (string-append "#!" (which "python"))))
5588 ;; This test introduces a circular dependency on ipykernel
5589 ;; (which depends on ipython).
5590 (delete-file "IPython/core/tests/test_display.py")
5591 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5592 (delete-file "IPython/core/tests/test_interactiveshell.py")
5594 (home-page "https://ipython.org")
5595 (synopsis "IPython is a tool for interactive computing in Python")
5597 "IPython provides a rich architecture for interactive computing with:
5598 Powerful interactive shells, a browser-based notebook, support for interactive
5599 data visualization, embeddable interpreters and tools for parallel
5601 (license license:bsd-3)))
5603 (define-public python-ipython-documentation
5605 (inherit python-ipython)
5606 (name "python-ipython-documentation")
5607 (version (package-version python-ipython))
5610 (modify-phases %standard-phases
5614 (lambda* (#:key outputs #:allow-other-keys)
5615 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5616 (doc (string-append data "/doc/" ,name "-" ,version))
5617 (html (string-append doc "/html"))
5618 (man1 (string-append data "/man/man1"))
5619 (info (string-append data "/info"))
5620 (examples (string-append doc "/examples"))
5621 (python-arg (string-append "PYTHON=" (which "python"))))
5622 (setenv "LANG" "en_US.utf8")
5623 (with-directory-excursion "docs"
5624 ;; FIXME: pdf fails to build
5625 ;;(system* "make" "pdf" "PAPER=a4")
5626 (system* "make" python-arg "html")
5627 ;; FIXME: the generated texi file contains ^@^@, which trips
5629 ;; (system* "make" python-arg "info")
5631 (copy-recursively "docs/man" man1)
5632 (copy-recursively "examples" examples)
5633 (copy-recursively "docs/build/html" html)
5634 ;; (copy-file "docs/build/latex/ipython.pdf"
5635 ;; (string-append doc "/ipython.pdf"))
5637 ;; (copy-file "docs/build/texinfo/ipython.info"
5638 ;; (string-append info "/ipython.info"))
5639 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5642 `(("python-ipython" ,python-ipython)
5643 ("python-ipykernel" ,python-ipykernel)))
5645 `(("python-sphinx" ,python-sphinx)
5646 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5647 ;; FIXME: It's possible that a smaller union would work just as well.
5648 ("texlive" ,(texlive-union (list texlive-amsfonts
5650 texlive-generic-ifxetex
5651 texlive-generic-pdftex
5652 texlive-latex-capt-of
5654 texlive-latex-environ
5655 texlive-latex-eqparbox
5656 texlive-latex-etoolbox
5657 texlive-latex-expdlist
5658 texlive-latex-fancyhdr
5659 texlive-latex-fancyvrb
5660 texlive-latex-fncychap
5662 texlive-latex-framed
5663 texlive-latex-geometry
5664 texlive-latex-graphics
5665 texlive-latex-hyperref
5666 texlive-latex-mdwtools
5667 texlive-latex-multirow
5668 texlive-latex-needspace
5669 texlive-latex-oberdiek
5670 texlive-latex-parskip
5671 texlive-latex-preview
5672 texlive-latex-tabulary
5673 texlive-latex-threeparttable
5674 texlive-latex-titlesec
5675 texlive-latex-trimspaces
5677 texlive-latex-upquote
5679 texlive-latex-varwidth
5680 texlive-latex-wrapfig)))
5681 ("texinfo" ,texinfo)))))
5683 (define-public python-urwid
5685 (name "python-urwid")
5690 (uri (pypi-uri "urwid" version))
5693 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5694 (build-system python-build-system)
5695 (home-page "http://urwid.org")
5696 (synopsis "Console user interface library for Python")
5698 "Urwid is a curses-based UI/widget library for Python. It includes many
5699 features useful for text console applications.")
5700 (license license:lgpl2.1+)))
5702 (define-public python2-urwid
5703 (package-with-python2 python-urwid))
5705 (define-public python-urwidtrees
5707 (name "python-urwidtrees")
5712 ;; package author intends on distributing via github rather than pypi:
5713 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5714 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5716 (file-name (string-append name "-" version ".tar.gz"))
5719 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5720 (build-system python-build-system)
5722 '(#:tests? #f)) ; no tests
5723 (propagated-inputs `(("python-urwid" ,python-urwid)))
5724 (home-page "https://github.com/pazz/urwidtrees")
5725 (synopsis "Tree widgets for urwid")
5726 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5727 toolkit. Use it to build trees of widgets.")
5728 (license license:gpl3+)))
5730 (define-public python2-urwidtrees
5731 (package-with-python2 python-urwidtrees))
5733 (define-public python-ua-parser
5735 (name "python-ua-parser")
5740 (uri (pypi-uri "ua-parser" version))
5743 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5744 (build-system python-build-system)
5746 `(#:tests? #f)) ;no test suite in release
5748 `(("python-pyyaml" ,python-pyyaml)))
5749 (home-page "https://github.com/ua-parser/uap-python")
5750 (synopsis "User agent parser")
5752 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5753 (license license:asl2.0)))
5755 (define-public python2-ua-parser
5756 (package-with-python2 python-ua-parser))
5758 (define-public python-user-agents
5760 (name "python-user-agents")
5765 (uri (pypi-uri "user-agents" version))
5768 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5769 (build-system python-build-system)
5771 `(#:tests? #f)) ;missing devices.json test file in release
5773 `(("python-ua-parser" ,python-ua-parser)))
5774 (home-page "https://github.com/selwin/python-user-agents")
5775 (synopsis "User Agent strings parsing library")
5777 "A library to identify devices (phones, tablets) and their capabilities by
5778 parsing (browser/HTTP) user agent strings.")
5779 (license license:expat)))
5781 (define-public python2-user-agents
5782 (package-with-python2 python-user-agents))
5784 (define-public python-dbus
5786 (name "python-dbus")
5791 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5792 "dbus-python-" version ".tar.gz"))
5795 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5796 (build-system gnu-build-system)
5799 (modify-phases %standard-phases
5803 ;; XXX: For the missing '/etc/machine-id'.
5804 (substitute* "test/run-test.sh"
5805 (("DBUS_FATAL_WARNINGS=1")
5806 "DBUS_FATAL_WARNINGS=0"))
5809 `(("pkg-config" ,pkg-config)))
5811 `(("python" ,python-wrapper)
5812 ("dbus-glib" ,dbus-glib)))
5813 (synopsis "Python bindings for D-bus")
5814 (description "python-dbus provides bindings for libdbus, the reference
5815 implementation of D-Bus.")
5816 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5817 (license license:expat)))
5819 (define-public python2-dbus
5820 (package (inherit python-dbus)
5821 (name "python2-dbus")
5822 (inputs `(("python" ,python-2)
5823 ,@(alist-delete "python"
5824 (package-inputs python-dbus)
5826 ;; FIXME: on Python 2, the test_utf8 fails with:
5827 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5828 (arguments `(#:tests? #f))))
5830 (define-public python-notify2
5832 (name "python-notify2")
5837 (uri (pypi-uri "notify2" version))
5840 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5841 (build-system python-build-system)
5842 (arguments `(#:tests? #f)) ; tests depend on system state
5844 `(("python-dbus" ,python-dbus)))
5845 (home-page "https://bitbucket.org/takluyver/pynotify2")
5846 (synopsis "Python interface to D-Bus notifications")
5848 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5849 It is a reimplementation of pynotify in pure Python, and an alternative to
5850 the GObject Introspection bindings to libnotify for non-GTK applications.")
5851 (license (list license:bsd-2
5852 license:lgpl2.1+))))
5854 (define-public python2-notify2
5855 (package-with-python2 python-notify2))
5857 (define-public python-lxml
5859 (name "python-lxml")
5864 (uri (pypi-uri "lxml" version))
5867 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5868 (build-system python-build-system)
5870 `(("libxml2" ,libxml2)
5871 ("libxslt" ,libxslt)))
5872 (home-page "http://lxml.de/")
5874 "Python XML processing library")
5876 "The lxml XML toolkit is a Pythonic binding for the C libraries
5877 libxml2 and libxslt.")
5878 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5880 (define-public python2-lxml
5881 (package-with-python2 python-lxml))
5883 ;; beautifulsoup4 has a totally different namespace than 3.x,
5884 ;; and pypi seems to put it under its own name, so I guess we should too
5885 (define-public python-beautifulsoup4
5887 (name "python-beautifulsoup4")
5892 (uri (pypi-uri "beautifulsoup4" version))
5895 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5896 (build-system python-build-system)
5899 (modify-phases %standard-phases
5900 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5901 ;; must use this conversion script when building with Python 3. The
5902 ;; conversion script also runs the tests.
5903 ;; For more information, see the file 'convert-py3k' in the source
5906 (lambda _ (invoke "./convert-py3k"))))))
5908 `(("python-soupsieve" ,python-soupsieve)))
5910 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5912 "Python screen-scraping library")
5914 "Beautiful Soup is a Python library designed for rapidly setting up
5915 screen-scraping projects. It offers Pythonic idioms for navigating,
5916 searching, and modifying a parse tree, providing a toolkit for
5917 dissecting a document and extracting what you need. It automatically
5918 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5919 (license license:expat)
5920 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5922 (define-public python2-beautifulsoup4
5924 (inherit (package-with-python2
5925 (strip-python2-variant python-beautifulsoup4)))
5926 (arguments `(#:python ,python-2))))
5928 (define-public python-soupsieve
5930 (name "python-soupsieve")
5935 (uri (pypi-uri "soupsieve" version))
5938 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5939 (build-system python-build-system)
5940 (arguments `(#:tests? #f))
5941 ;;XXX: 2 tests fail currently despite claming they were to be
5942 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5943 ;;don't want to create a circular dependency.
5944 (home-page "https://github.com/facelessuser/soupsieve")
5945 (synopsis "CSS selector library")
5947 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5948 Soup 4. It aims to provide selecting, matching, and filtering using modern
5949 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5950 specifications up through the latest CSS level 4 drafts and beyond (though
5951 some are not yet implemented).")
5952 (properties `((python2-variant . ,(delay python2-soupsieve))))
5953 (license license:expat)))
5955 (define-public python2-soupsieve
5956 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5960 `(("python2-backports-functools-lru-cache"
5961 ,python2-backports-functools-lru-cache)
5962 ,@(package-propagated-inputs base))))))
5964 (define-public python-netifaces
5966 (name "python-netifaces")
5971 (uri (pypi-uri "netifaces" version))
5974 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5975 (build-system python-build-system)
5976 (home-page "https://github.com/al45tair/netifaces")
5978 "Python module for portable network interface information")
5980 "Netifaces is a Python module providing information on network
5981 interfaces in an easy and portable manner.")
5982 (license license:expat)))
5984 (define-public python2-netifaces
5985 (package-with-python2 python-netifaces))
5987 (define-public python-networkx
5989 (name "python-networkx")
5994 (uri (pypi-uri "networkx" version ".zip"))
5996 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5997 (build-system python-build-system)
5998 ;; python-decorator is needed at runtime.
6000 `(("python-decorator" ,python-decorator)))
6002 `(("python-nose" ,python-nose)
6004 (home-page "https://networkx.github.io/")
6005 (synopsis "Python module for creating and manipulating graphs and networks")
6007 "NetworkX is a Python package for the creation, manipulation, and study
6008 of the structure, dynamics, and functions of complex networks.")
6009 (license license:bsd-3)))
6011 (define-public python2-networkx
6012 (package-with-python2 python-networkx))
6014 (define-public python-datrie
6016 (name "python-datrie")
6021 (uri (pypi-uri "datrie" version))
6024 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6025 (build-system python-build-system)
6027 `(("python-cython" ,python-cython)
6028 ("python-hypothesis" ,python-hypothesis)
6029 ("python-pytest" ,python-pytest)
6030 ("python-pytest-runner" ,python-pytest-runner)))
6031 (home-page "https://github.com/kmike/datrie")
6032 (synopsis "Fast, efficiently stored trie for Python")
6034 "This package provides a fast, efficiently stored trie implementation for
6036 (license license:lgpl2.1+)))
6038 (define-public snakemake
6045 (uri (pypi-uri "snakemake" version))
6047 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6048 (build-system python-build-system)
6050 ;; TODO: Package missing test dependencies.
6053 (modify-phases %standard-phases
6054 ;; For cluster execution Snakemake will call Python. Since there is
6055 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6056 ;; this by calling the snakemake wrapper instead.
6057 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6058 (lambda* (#:key outputs #:allow-other-keys)
6059 (substitute* "snakemake/executors.py"
6060 (("\\{sys.executable\\} -m snakemake")
6061 (string-append (assoc-ref outputs "out")
6065 `(("python-gitpython" ,python-gitpython)
6066 ("python-wrapt" ,python-wrapt)
6067 ("python-requests" ,python-requests)
6068 ("python-appdirs" ,python-appdirs)
6069 ("python-configargparse" ,python-configargparse)
6070 ("python-datrie" ,python-datrie)
6071 ("python-docutils" ,python-docutils)
6072 ("python-jinja2" ,python-jinja2)
6073 ("python-jsonschema" ,python-jsonschema)
6074 ("python-networkx" ,python-networkx)
6075 ("python-pyyaml" ,python-pyyaml)
6076 ("python-ratelimiter" ,python-ratelimiter)))
6077 (home-page "https://snakemake.readthedocs.io")
6078 (synopsis "Python-based execution environment for make-like workflows")
6080 "Snakemake aims to reduce the complexity of creating workflows by
6081 providing a clean and modern domain specific specification language (DSL) in
6082 Python style, together with a fast and comfortable execution environment.")
6083 (license license:expat)))
6085 ;; This is currently needed for the pigx-* packages.
6086 (define-public snakemake-4
6087 (package (inherit snakemake)
6092 (uri (pypi-uri "snakemake" version))
6094 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6096 `(("python-wrapt" ,python-wrapt)
6097 ("python-requests" ,python-requests)
6098 ("python-appdirs" ,python-appdirs)
6099 ("python-configargparse" ,python-configargparse)
6100 ("python-pyyaml" ,python-pyyaml)
6101 ("python-ratelimiter" ,python-ratelimiter)))))
6103 (define-public python-pyqrcode
6105 (name "python-pyqrcode")
6110 (uri (pypi-uri "PyQRCode" version))
6113 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6114 (build-system python-build-system)
6116 "https://github.com/mnooner256/pyqrcode")
6117 (synopsis "QR code generator")
6119 "Pyqrcode is a QR code generator written purely in Python with
6120 SVG, EPS, PNG and terminal output.")
6121 (license license:bsd-3)))
6123 (define-public python-seaborn
6125 (name "python-seaborn")
6130 (uri (pypi-uri "seaborn" version))
6132 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6133 (build-system python-build-system)
6136 (modify-phases %standard-phases
6137 (add-before 'check 'start-xserver
6138 (lambda* (#:key inputs #:allow-other-keys)
6139 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6140 ;; There must be a running X server and make check doesn't
6141 ;; start one. Therefore we must do it.
6142 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6143 (setenv "DISPLAY" ":1")
6145 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6147 `(("python-pandas" ,python-pandas)
6148 ("python-matplotlib" ,python-matplotlib)
6149 ("python-numpy" ,python-numpy)
6150 ("python-scipy" ,python-scipy)))
6152 `(("python-pytest" ,python-pytest)
6153 ("xorg-server" ,xorg-server)))
6154 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6155 (synopsis "Statistical data visualization")
6157 "Seaborn is a library for making attractive and informative statistical
6158 graphics in Python. It is built on top of matplotlib and tightly integrated
6159 with the PyData stack, including support for numpy and pandas data structures
6160 and statistical routines from scipy and statsmodels.")
6161 (license license:bsd-3)))
6163 (define-public python2-seaborn
6164 (package-with-python2 python-seaborn))
6166 (define-public python-mpmath
6168 (name "python-mpmath")
6172 (uri (string-append "http://mpmath.org/files/mpmath-"
6176 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6177 (build-system python-build-system)
6180 (modify-phases %standard-phases
6183 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6184 (home-page "http://mpmath.org")
6185 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6187 "@code{mpmath} can be used as an arbitrary-precision substitute for
6188 Python's float/complex types and math/cmath modules, but also does much
6189 more advanced mathematics.")
6190 (license license:bsd-3)))
6192 (define-public python2-mpmath
6193 (package-with-python2 python-mpmath))
6195 (define-public python-bigfloat
6197 (name "python-bigfloat")
6202 (uri (pypi-uri "bigfloat" version))
6204 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6205 (build-system python-build-system)
6208 (home-page "https://github.com/mdickinson/bigfloat")
6209 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6211 "This package provides a Python interface to the MPFR library for
6212 multiprecision arithmetic.")
6213 (license license:lgpl3+)))
6215 (define-public python2-bigfloat
6216 (package-with-python2 python-bigfloat))
6218 (define-public python-sympy
6220 (name "python-sympy")
6226 "https://github.com/sympy/sympy/releases/download/sympy-"
6227 version "/sympy-" version ".tar.gz"))
6229 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6230 (build-system python-build-system)
6233 (modify-phases %standard-phases
6234 ;; Run the core tests after installation. By default it would run
6235 ;; *all* tests, which take a very long time to complete and are known
6238 (add-after 'install 'check
6239 (lambda* (#:key outputs #:allow-other-keys)
6240 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6243 `(("python-mpmath" ,python-mpmath)))
6244 (home-page "http://www.sympy.org/")
6245 (synopsis "Python library for symbolic mathematics")
6247 "SymPy is a Python library for symbolic mathematics. It aims to become a
6248 full-featured computer algebra system (CAS) while keeping the code as simple
6249 as possible in order to be comprehensible and easily extensible.")
6250 (license license:bsd-3)))
6252 (define-public python2-sympy
6254 (inherit (package-with-python2 python-sympy))
6257 (modify-phases %standard-phases
6258 ;; Run the core tests after installation. By default it would run
6259 ;; *all* tests, which take a very long time to complete and are known
6262 (add-after 'install 'check
6263 (lambda* (#:key outputs #:allow-other-keys)
6264 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6267 (define-public python-q
6274 (uri (pypi-uri "q" version))
6277 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/zestyping/q")
6280 (synopsis "Quick-and-dirty debugging output for tired programmers")
6282 "q is a Python module for \"print\" style of debugging Python code. It
6283 provides convenient short API for print out of values, tracebacks, and
6284 falling into the Python interpreter.")
6285 (license license:asl2.0)))
6287 (define-public python2-q
6288 (package-with-python2 python-q))
6290 (define-public python2-xlib
6292 (name "python2-xlib")
6296 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6298 "python-xlib-" version ".tar.gz"))
6301 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6302 (build-system python-build-system)
6304 `(#:python ,python-2 ;Python 2 only
6305 #:tests? #f)) ;no tests
6306 (home-page "http://python-xlib.sourceforge.net/")
6307 (synopsis "Python X11 client library")
6309 "The Python X Library is intended to be a fully functional X client
6310 library for Python programs. It is useful to implement low-level X clients.
6311 It is written entirely in Python.")
6312 (license license:gpl2+)))
6314 (define-public python-singledispatch
6316 (name "python-singledispatch")
6321 (uri (pypi-uri "singledispatch" version))
6324 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6325 (build-system python-build-system)
6327 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6329 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6330 (synopsis "Backport of singledispatch feature from Python 3.4")
6332 "This library brings functools.singledispatch from Python 3.4 to Python
6334 (license license:expat)))
6336 (define-public python2-singledispatch
6337 (package-with-python2 python-singledispatch))
6339 ;; the python- version can be removed with python-3.5
6340 (define-public python-backports-abc
6342 (name "python-backports-abc")
6347 (uri (pypi-uri "backports_abc" version))
6350 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6351 (build-system python-build-system)
6352 (home-page "https://github.com/cython/backports_abc")
6353 (synopsis "Backport of additions to the 'collections.abc' module")
6355 "Python-backports-abc provides a backport of additions to the
6356 @code{collections.abc} module in Python-3.5.")
6357 (license license:psfl)))
6359 (define-public python2-backports-abc
6360 (package-with-python2 python-backports-abc))
6362 (define-public python-backports-csv
6364 (name "python-backports-csv")
6369 (uri (pypi-uri "backports.csv" version))
6372 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6373 (build-system python-build-system)
6374 (home-page "https://github.com/ryanhiebert/backports.csv")
6375 (synopsis "Backport of Python 3's csv module for Python 2")
6377 "Provides a backport of Python 3's @code{csv} module for parsing
6378 comma separated values. The API of the @code{csv} module in Python 2
6379 is drastically different from the @code{csv} module in Python 3.
6380 This is due, for the most part, to the difference between str in
6381 Python 2 and Python 3.")
6382 (license license:psfl)))
6384 (define-public python2-backports-csv
6385 (package-with-python2 python-backports-csv))
6387 (define-public python2-backports-shutil-get-terminal-size
6389 (name "python2-backports-shutil-get-terminal-size")
6394 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6397 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6398 (build-system python-build-system)
6400 `(#:python ,python-2
6402 (modify-phases %standard-phases
6405 (invoke "py.test" "-v"))))))
6407 `(("python2-pytest" ,python2-pytest)))
6408 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6409 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6411 "This package provides a backport of the @code{get_terminal_size
6412 function} from Python 3.3's @code{shutil}.
6413 Unlike the original version it is written in pure Python rather than C,
6414 so it might be a tiny bit slower.")
6415 (license license:expat)))
6417 (define-public python-waf
6423 (uri (string-append "https://waf.io/"
6424 "waf-" version ".tar.bz2"))
6427 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6428 (build-system python-build-system)
6431 (modify-phases %standard-phases
6434 (invoke "python" "waf-light" "configure" "build")))
6437 (invoke "python" "waf" "--version")))
6439 (lambda* (#:key outputs #:allow-other-keys)
6440 (let ((out (assoc-ref outputs "out")))
6441 (install-file "waf" (string-append out "/bin")))
6443 ;; waf breaks when it is wrapped.
6445 (home-page "https://waf.io/")
6446 (synopsis "Python-based build system")
6448 "Waf is a Python-based framework for configuring, compiling and installing
6450 (license license:bsd-3)))
6452 (define-public python2-waf
6453 (package-with-python2 python-waf))
6455 (define-public python-pyzmq
6457 (name "python-pyzmq")
6462 (uri (pypi-uri "pyzmq" version))
6464 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6465 (build-system python-build-system)
6468 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6469 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6470 ;; --inplace' for 'python setup.py test' to work.
6473 `(("zeromq" ,zeromq)))
6475 `(("pkg-config" ,pkg-config)
6476 ("python-nose" ,python-nose)))
6477 (home-page "https://github.com/zeromq/pyzmq")
6478 (synopsis "Python bindings for 0MQ")
6480 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6481 (license license:bsd-4)))
6483 (define-public python2-pyzmq
6484 (package-with-python2 python-pyzmq))
6486 (define-public python-pep8
6487 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6488 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6489 ;; some dependents' test suites, and nothing more.
6491 (name "python-pep8")
6496 (uri (pypi-uri "pep8" version))
6499 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6500 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6501 (build-system python-build-system)
6502 (home-page "https://pep8.readthedocs.org/")
6503 (synopsis "Python style guide checker")
6505 "This tools checks Python code against some of the style conventions in
6507 (license license:expat)))
6509 (define-public python2-pep8
6510 (package-with-python2 python-pep8))
6512 (define-public python-pyflakes
6514 (name "python-pyflakes")
6519 (uri (pypi-uri "pyflakes" version))
6522 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6523 (build-system python-build-system)
6525 "https://github.com/pyflakes/pyflakes")
6526 (synopsis "Passive checker of Python programs")
6528 "Pyflakes statically checks Python source code for common errors.")
6529 (license license:expat)))
6531 (define-public python2-pyflakes
6532 (package-with-python2 python-pyflakes))
6534 (define-public python-mccabe
6536 (name "python-mccabe")
6541 (uri (pypi-uri "mccabe" version))
6544 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6545 (build-system python-build-system)
6547 `(("python-pytest" ,python-pytest-bootstrap)
6548 ("python-pytest-runner" ,python-pytest-runner)))
6549 (home-page "https://github.com/flintwork/mccabe")
6550 (synopsis "McCabe checker, plugin for flake8")
6552 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6553 complexity of Python source code.")
6554 (license license:expat)))
6556 (define-public python2-mccabe
6557 (package-with-python2 python-mccabe))
6559 (define-public python-mccabe-0.2.1
6560 (package (inherit python-mccabe)
6565 (uri (pypi-uri "mccabe" version))
6568 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6570 (define-public python2-mccabe-0.2.1
6571 (package-with-python2 python-mccabe-0.2.1))
6573 ;; Flake8 2.4.1 requires an older version of pep8.
6574 ;; This should be removed ASAP.
6575 (define-public python-pep8-1.5.7
6576 (package (inherit python-pep8)
6581 (uri (pypi-uri "pep8" version))
6584 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6586 ;; XXX Tests not compatible with Python 3.5.
6589 (define-public python2-pep8-1.5.7
6590 (package-with-python2 python-pep8-1.5.7))
6592 ;; Flake8 2.4.1 requires an older version of pyflakes.
6593 ;; This should be removed ASAP.
6594 (define-public python-pyflakes-0.8.1
6595 (package (inherit python-pyflakes)
6600 (uri (pypi-uri "pyflakes" version))
6603 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6605 ;; XXX Tests not compatible with Python 3.5.
6608 (define-public python2-pyflakes-0.8.1
6609 (package-with-python2 python-pyflakes-0.8.1))
6611 (define-public python-flake8
6613 (name "python-flake8")
6617 (uri (pypi-uri "flake8" version))
6620 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6621 (build-system python-build-system)
6624 (modify-phases %standard-phases
6626 (add-after 'install 'check
6627 (lambda* (#:key inputs outputs #:allow-other-keys)
6628 (add-installed-pythonpath inputs outputs)
6629 (invoke "pytest" "-v")
6632 `(("python-pycodestyle" ,python-pycodestyle)
6633 ("python-entrypoints" ,python-entrypoints)
6634 ("python-pyflakes" ,python-pyflakes)
6635 ("python-mccabe" ,python-mccabe)))
6637 `(("python-mock" ,python-mock)
6638 ("python-pytest" ,python-pytest-bootstrap)
6639 ("python-pytest-runner" ,python-pytest-runner)))
6640 (home-page "https://gitlab.com/pycqa/flake8")
6642 "The modular source code checker: pep8, pyflakes and co")
6644 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6645 (properties `((python2-variant . ,(delay python2-flake8))))
6646 (license license:expat)))
6648 (define-public python2-flake8
6649 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6650 (package (inherit base)
6652 `(("python2-configparser" ,python2-configparser)
6653 ("python2-enum34" ,python2-enum34)
6654 ("python2-typing" ,python2-typing)
6655 ,@(package-propagated-inputs base))))))
6657 ;; python-hacking requires flake8 <2.6.0.
6658 (define-public python-flake8-2.5
6660 (inherit python-flake8)
6664 (uri (pypi-uri "flake8" version))
6667 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6669 `(("python-pep8" ,python-pep8)
6670 ,@(package-propagated-inputs python-flake8)))
6671 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6673 (define-public python2-flake8-2.5
6675 (inherit python2-flake8)
6676 (version (package-version python-flake8-2.5))
6678 (inherit (package-source python-flake8-2.5))))
6680 `(("python2-pep8" ,python2-pep8)
6681 ,@(package-propagated-inputs python2-flake8)))))
6683 (define-public python-flake8-polyfill
6685 (name "python-flake8-polyfill")
6690 (uri (pypi-uri "flake8-polyfill" version))
6693 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6694 (build-system python-build-system)
6697 (modify-phases %standard-phases
6700 ;; Be compatible with Pytest 4:
6701 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6702 (substitute* "setup.cfg"
6706 (setenv "PYTHONPATH"
6707 (string-append (getcwd) "/build/lib:"
6708 (getenv "PYTHONPATH")))
6709 (invoke "py.test" "-v"))))))
6711 `(("python-flake8" ,python-flake8)
6712 ("python-mock" ,python-mock)
6713 ("python-pep8" ,python-pep8)
6714 ("python-pycodestyle" ,python-pycodestyle)
6715 ("python-pytest" ,python-pytest)))
6716 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6717 (synopsis "Polyfill package for Flake8 plugins")
6719 "This package that provides some compatibility helpers for Flake8
6720 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6721 (license license:expat)))
6723 (define-public python2-flake8-polyfill
6724 (package-with-python2 python-flake8-polyfill))
6726 (define-public python-mistune
6728 (name "python-mistune")
6733 (uri (pypi-uri "mistune" version))
6736 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6737 (build-system python-build-system)
6739 `(("python-nose" ,python-nose)
6740 ("python-cython" ,python-cython)))
6741 (home-page "https://github.com/lepture/mistune")
6742 (synopsis "Markdown parser in pure Python")
6743 (description "This package provides a fast markdown parser in pure
6745 (license license:bsd-3)))
6747 (define-public python2-mistune
6748 (package-with-python2 python-mistune))
6750 (define-public python-markdown
6752 (name "python-markdown")
6757 (uri (pypi-uri "Markdown" version))
6760 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6761 (build-system python-build-system)
6763 `(("python-nose" ,python-nose)
6764 ("python-pyyaml" ,python-pyyaml)))
6765 (home-page "https://python-markdown.github.io/")
6766 (synopsis "Python implementation of Markdown")
6768 "This package provides a Python implementation of John Gruber's
6769 Markdown. The library features international input, various Markdown
6770 extensions, and several HTML output formats. A command line wrapper
6771 markdown_py is also provided to convert Markdown files to HTML.")
6772 (license license:bsd-3)))
6774 (define-public python2-markdown
6775 (package-with-python2 python-markdown))
6777 (define-public python-ptyprocess
6779 (name "python-ptyprocess")
6784 (uri (pypi-uri "ptyprocess" version))
6787 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6788 (build-system python-build-system)
6790 `(("python-nose" ,python-nose)))
6793 (modify-phases %standard-phases
6795 (lambda _ (invoke "nosetests"))))))
6796 (home-page "https://github.com/pexpect/ptyprocess")
6797 (synopsis "Run a subprocess in a pseudo terminal")
6799 "This package provides a Python library used to launch a subprocess in a
6800 pseudo terminal (pty), and interact with both the process and its pty.")
6801 (license license:isc)))
6803 (define-public python2-ptyprocess
6804 (package-with-python2 python-ptyprocess))
6806 (define-public python-cram
6808 (name "python-cram")
6810 (home-page "https://bitheap.org/cram/")
6813 (uri (list (string-append home-page "cram-"
6815 (pypi-uri "cram" version)))
6818 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6821 (modify-phases %standard-phases
6822 (add-after 'unpack 'patch-source
6824 (substitute* (find-files "cram" ".*\\.py$")
6825 ;; Replace default shell path.
6826 (("/bin/sh") (which "sh")))
6827 (substitute* (find-files "tests" ".*\\.t$")
6829 (("/bin/bash") (which "bash"))
6830 (("/bin/sh") (which "sh")))
6831 (substitute* "cram/_test.py"
6832 ;; This hack works around a bug triggered by substituting
6833 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6834 ;; "cram -h", which breaks the output at 80 characters. This
6835 ;; causes the line showing the default shell to break into two
6836 ;; lines, but the test expects a single line...
6837 (("env\\['COLUMNS'\\] = '80'")
6838 "env['COLUMNS'] = '160'"))
6840 (substitute* "Makefile"
6841 ;; Recent versions of python-coverage have caused the test
6842 ;; coverage to decrease (as of version 0.7). Allow that.
6843 (("--fail-under=100")
6848 ;; The test phase uses the built library and executable.
6849 (lambda* (#:key inputs outputs #:allow-other-keys)
6850 (add-installed-pythonpath inputs outputs)
6851 (setenv "PATH" (string-append (getenv "PATH") ":"
6852 (assoc-ref outputs "out") "/bin"))
6853 (invoke "make" "test"))))))
6854 (build-system python-build-system)
6856 `(("python-coverage" ,python-coverage)
6858 (synopsis "Simple testing framework for command line applications")
6860 "Cram is a functional testing framework for command line applications.
6861 Cram tests look like snippets of interactive shell sessions. Cram runs each
6862 command and compares the command output in the test with the command’s actual
6864 (license license:gpl2+)))
6866 (define-public python2-cram
6867 (package-with-python2 python-cram))
6869 (define-public python-straight-plugin
6871 (name "python-straight-plugin")
6876 (uri (pypi-uri "straight.plugin" version))
6879 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6880 (build-system python-build-system)
6881 (home-page "https://github.com/ironfroggy/straight.plugin")
6882 (synopsis "Simple namespaced plugin facility")
6883 (description "Straight Plugin provides a type of plugin you can create from
6884 almost any existing Python modules, and an easy way for outside developers to
6885 add functionality and customization to your projects with their own plugins.")
6886 (license license:expat)))
6888 (define-public python2-straight-plugin
6889 (package-with-python2 python-straight-plugin))
6891 (define-public python-fonttools
6893 (name "python-fonttools")
6897 (uri (pypi-uri "fonttools" version ".zip"))
6900 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6901 (build-system python-build-system)
6904 ("python-pytest" ,python-pytest)
6905 ("python-pytest-runner" ,python-pytest-runner)))
6906 (home-page "https://github.com/behdad/fonttools")
6907 (synopsis "Tools to manipulate font files")
6909 "FontTools/TTX is a library to manipulate font files from Python. It
6910 supports reading and writing of TrueType/OpenType fonts, reading and writing
6911 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6912 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6913 from an XML-based format.")
6914 (license license:expat)))
6916 (define-public python2-fonttools
6917 (package-with-python2 python-fonttools))
6919 (define-public python-ly
6926 (uri (pypi-uri name version))
6929 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6930 (build-system python-build-system)
6932 ;; FIXME: Some tests need network access.
6934 (synopsis "Tool and library for manipulating LilyPond files")
6935 (description "This package provides a Python library to parse, manipulate
6936 or create documents in LilyPond format. A command line program ly is also
6937 provided that can be used to do various manipulations with LilyPond files.")
6938 (home-page "https://pypi.python.org/pypi/python-ly")
6939 (license license:gpl2+)))
6941 (define-public python-appdirs
6943 (name "python-appdirs")
6948 (uri (pypi-uri "appdirs" version))
6951 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6952 (build-system python-build-system)
6953 (home-page "https://github.com/ActiveState/appdirs")
6955 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6957 "This module provides a portable way of finding out where user data
6958 should be stored on various operating systems.")
6959 (license license:expat)))
6961 (define-public python2-appdirs
6962 (package-with-python2 python-appdirs))
6964 (define-public python-llfuse
6966 (name "python-llfuse")
6970 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6973 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6974 (build-system python-build-system)
6979 `(("pkg-config" ,pkg-config)))
6980 (synopsis "Python bindings for FUSE")
6982 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6983 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6984 (license license:lgpl2.0+)
6985 (properties `((python2-variant . ,(delay python2-llfuse))))))
6987 (define-public python2-llfuse
6988 (package (inherit (package-with-python2
6989 (strip-python2-variant python-llfuse)))
6990 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6993 (define-public python-llfuse-0.41
6994 (package (inherit python-llfuse)
6999 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7000 "llfuse-" version ".tar.bz2"))
7003 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7004 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7005 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7006 (license (list license:expat license:lgpl2.0+))))
7008 (define-public python-msgpack
7010 (name "python-msgpack")
7014 (uri (pypi-uri "msgpack" version))
7017 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7018 (build-system python-build-system)
7020 `(#:modules ((guix build utils)
7021 (guix build python-build-system)
7026 (modify-phases %standard-phases
7029 (let ((cwd (getcwd)))
7030 (setenv "PYTHONPATH"
7031 (string-append cwd "/build/"
7032 (find (cut string-prefix? "lib" <>)
7033 (scandir (string-append cwd "/build")))
7035 (getenv "PYTHONPATH")))
7036 (invoke "pytest" "-v" "test")))))))
7038 `(("python-pytest" ,python-pytest)))
7039 (synopsis "MessagePack (de)serializer")
7040 (description "MessagePack is a fast, compact binary serialization format,
7041 suitable for similar data to JSON. This package provides CPython bindings for
7042 reading and writing MessagePack data.")
7043 (home-page "https://pypi.python.org/pypi/msgpack/")
7044 (license license:asl2.0)))
7046 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7047 ;; release 0.5. Some packages like borg still call it by the old name for now.
7048 ;; <https://bugs.gnu.org/30662>
7049 (define-public python-msgpack-transitional
7051 (inherit python-msgpack)
7052 (name "python-msgpack-transitional")
7054 (substitute-keyword-arguments (package-arguments python-msgpack)
7056 `(modify-phases ,phases
7057 (add-after 'unpack 'configure-transitional
7059 ;; Keep using the old name.
7060 (substitute* "setup.py"
7061 (("TRANSITIONAL = False")
7062 "TRANSITIONAL = 1"))
7065 (define-public python2-msgpack
7066 (package-with-python2 python-msgpack))
7068 (define-public python-netaddr
7070 (name "python-netaddr")
7075 (uri (pypi-uri "netaddr" version))
7078 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7079 (build-system python-build-system)
7080 (arguments `(#:tests? #f)) ;; No tests.
7081 (home-page "https://github.com/drkjam/netaddr/")
7082 (synopsis "Pythonic manipulation of network addresses")
7084 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7085 and MAC network addresses.")
7086 (license license:bsd-3)))
7088 (define-public python2-netaddr
7089 (package-with-python2 python-netaddr))
7091 (define-public python2-pyroute2
7093 (name "python2-pyroute2")
7098 (uri (pypi-uri "pyroute2" version))
7101 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7102 (build-system python-build-system)
7104 `(#:python ,python-2)) ;Python 3.x is not supported
7105 (home-page "https://github.com/svinota/pyroute2")
7106 (synopsis "Python netlink library")
7108 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7109 Supported netlink families and protocols include:
7111 @item rtnl, network settings - addresses, routes, traffic controls
7112 @item nfnetlink - netfilter API: ipset, nftables, ...
7113 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7114 @item devlink - manage and monitor devlink-enabled hardware
7115 @item generic - generic netlink families
7117 @item nl80211 - wireless functions API (basic support)
7118 @item taskstats - extended process statistics
7119 @item acpi_events - ACPI events monitoring
7120 @item thermal_events - thermal events monitoring
7121 @item VFS_DQUOT - disk quota events monitoring
7124 (license license:gpl2+)))
7126 (define-public python-wrapt
7128 (name "python-wrapt")
7133 (uri (pypi-uri "wrapt" version))
7136 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7137 (build-system python-build-system)
7139 ;; Tests are not included in the tarball, they are only available in the
7142 (home-page "https://github.com/GrahamDumpleton/wrapt")
7143 (synopsis "Module for decorators, wrappers and monkey patching")
7145 "The aim of the wrapt module is to provide a transparent object proxy for
7146 Python, which can be used as the basis for the construction of function
7147 wrappers and decorator functions.")
7148 (license license:bsd-2)))
7150 (define-public python2-wrapt
7151 (package-with-python2 python-wrapt))
7153 (define-public python-xlrd
7155 (name "python-xlrd")
7159 (uri (pypi-uri "xlrd" version))
7162 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7163 (build-system python-build-system)
7166 (modify-phases %standard-phases
7167 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7168 ;; run tests instead for now.
7169 (replace 'check (lambda _ (invoke "nosetests"))))))
7170 (native-inputs `(("python-nose" ,python-nose)))
7171 (home-page "http://www.python-excel.org/")
7172 (synopsis "Library for extracting data from Excel files")
7173 (description "This package provides a library to extract data from
7174 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7175 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7176 Unicode-aware. It is not intended as an end-user tool.")
7177 (license license:bsd-3)))
7179 (define-public python2-xlrd
7180 (package-with-python2 python-xlrd))
7182 (define-public python-prettytable
7184 (name "python-prettytable")
7189 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7192 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7193 (build-system python-build-system)
7194 (home-page "http://code.google.com/p/prettytable/")
7195 (synopsis "Display tabular data in an ASCII table format")
7197 "A library designed to represent tabular data in visually appealing ASCII
7198 tables. PrettyTable allows for selection of which columns are to be printed,
7199 independent alignment of columns (left or right justified or centred) and
7200 printing of sub-tables by specifying a row range.")
7201 (license license:bsd-3)))
7203 (define-public python2-prettytable
7204 (package-with-python2 python-prettytable))
7206 (define-public python-tables
7208 (name "python-tables")
7213 (uri (pypi-uri "tables" version))
7216 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7217 (modules '((guix build utils)))
7220 ;; Remove pre-compiled .pyc files from source.
7221 (for-each delete-file-recursively
7222 (find-files "." "__pycache__" #:directories? #t))
7223 (for-each delete-file (find-files "." "\\.pyc$"))
7225 (build-system python-build-system)
7227 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7228 ;; or "check", so we must override the build and check phases.
7230 (modify-phases %standard-phases
7231 (add-after 'unpack 'use-gcc
7233 (substitute* "setup.py"
7234 (("compiler = new_compiler\\(\\)" line)
7236 "\ncompiler.set_executables(compiler='gcc',"
7237 "compiler_so='gcc',"
7239 "linker_so='gcc -shared')")))
7242 (lambda* (#:key inputs #:allow-other-keys)
7243 (invoke "python" "setup.py" "build"
7244 (string-append "--hdf5="
7245 (assoc-ref inputs "hdf5")))))
7247 (lambda* (#:key inputs #:allow-other-keys)
7248 (invoke "python" "setup.py" "check"
7249 (string-append "--hdf5="
7250 (assoc-ref inputs "hdf5"))))))))
7252 `(("python-numexpr" ,python-numexpr)
7253 ("python-numpy" ,python-numpy)))
7255 `(("python-cython" ,python-cython)
7256 ("pkg-config" ,pkg-config)))
7261 (home-page "http://www.pytables.org/")
7262 (synopsis "Hierarchical datasets for Python")
7263 (description "PyTables is a package for managing hierarchical datasets and
7264 designed to efficiently cope with extremely large amounts of data.")
7265 (license license:bsd-3)))
7267 (define-public python2-tables
7268 (package-with-python2 python-tables))
7270 (define-public python-pyasn1
7272 (name "python-pyasn1")
7277 (uri (pypi-uri "pyasn1" version))
7280 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7281 (build-system python-build-system)
7282 (home-page "http://pyasn1.sourceforge.net/")
7283 (synopsis "ASN.1 types and codecs")
7285 "This is an implementation of ASN.1 types and codecs in Python. It is
7286 suitable for a wide range of protocols based on the ASN.1 specification.")
7287 (license license:bsd-2)))
7289 (define-public python2-pyasn1
7290 (package-with-python2 python-pyasn1))
7292 (define-public python-pyasn1-modules
7294 (name "python-pyasn1-modules")
7299 (uri (pypi-uri "pyasn1-modules" version))
7302 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7303 (build-system python-build-system)
7305 `(("python-pyasn1" ,python-pyasn1)))
7306 (home-page "https://sourceforge.net/projects/pyasn1/")
7307 (synopsis "ASN.1 codec implementations")
7309 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7310 implementations of ASN.1-based codecs and protocols.")
7311 (license license:bsd-3)))
7313 (define-public python2-pyasn1-modules
7314 (package-with-python2 python-pyasn1-modules))
7316 (define-public python-ipaddress
7318 (name "python-ipaddress")
7322 (uri (pypi-uri "ipaddress" version))
7325 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7326 (build-system python-build-system)
7327 (home-page "https://github.com/phihag/ipaddress")
7328 (synopsis "IP address manipulation library")
7330 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7331 in Python. This library is used to create, poke at, and manipulate IPv4 and
7332 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7333 module to older versions of Python.")
7334 (license license:psfl)))
7336 (define-public python2-ipaddress
7337 (package-with-python2 python-ipaddress))
7339 (define-public python2-ipaddr
7341 (name "python2-ipaddr")
7346 (uri (pypi-uri "ipaddr" version))
7348 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7349 (build-system python-build-system)
7351 `(#:python ,python-2 ;version 2 only
7353 (modify-phases %standard-phases
7355 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7356 (home-page "https://github.com/google/ipaddr-py")
7357 (synopsis "IP address manipulation library")
7359 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7360 IPv6 addresses and networks.
7362 For new implementations you may prefer to use the standard module
7363 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7364 versions of Python.")
7365 (license license:asl2.0)))
7367 (define-public python-idna
7369 (name "python-idna")
7374 (uri (pypi-uri "idna" version))
7377 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7378 (build-system python-build-system)
7379 (home-page "https://github.com/kjd/idna")
7380 (synopsis "Internationalized domain names in applications")
7382 "This is a library to support the Internationalised Domain Names in
7383 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7384 protocol is often referred to as “IDNA2008” and can produce different results
7385 from the earlier standard from 2003. The library is also intended to act as a
7386 suitable drop-in replacement for the “encodings.idna” module that comes with
7387 the Python standard library but currently only supports the older 2003
7389 (license license:bsd-4)))
7391 (define-public python-idna-2.7
7392 (package (inherit python-idna)
7396 (uri (pypi-uri "idna" version))
7399 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7402 (define-public python2-idna
7403 (package-with-python2 python-idna))
7405 (define-public python-idna-ssl
7407 (name "python-idna-ssl")
7412 (uri (pypi-uri "idna-ssl" version))
7415 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7416 (build-system python-build-system)
7418 `(#:tests? #f)) ;circular dependency with python-aiohttp
7419 (home-page "https://github.com/aio-libs/idna-ssl")
7420 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7421 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7423 (license license:expat)))
7425 (define-public python-pretend
7427 (name "python-pretend")
7432 (uri (pypi-uri "pretend" version))
7435 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7436 (build-system python-build-system)
7437 (home-page "https://github.com/alex/pretend")
7438 (synopsis "Library for stubbing in Python")
7440 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7441 technique for writing tests. You may hear the term mixed up with mocks,
7442 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7443 responses, rather than doing any computation.")
7444 (license license:bsd-3)))
7446 (define-public python2-pretend
7447 (package-with-python2 python-pretend))
7449 (define-public python-pip
7456 (uri (pypi-uri "pip" version))
7459 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7460 (build-system python-build-system)
7462 '(#:tests? #f)) ; there are no tests in the pypi archive.
7463 (home-page "https://pip.pypa.io/")
7464 (synopsis "Package manager for Python software")
7466 "Pip is a package manager for Python software, that finds packages on the
7467 Python Package Index (PyPI).")
7468 (license license:expat)))
7470 (define-public python2-pip
7471 (package-with-python2 python-pip))
7473 (define-public python-tlsh
7475 (name "python-tlsh")
7477 (home-page "https://github.com/trendmicro/tlsh")
7482 (url "https://github.com/trendmicro/tlsh.git")
7483 (commit (string-append "v" version))))
7484 (file-name (git-file-name name version))
7486 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7487 (build-system cmake-build-system)
7489 '(#:out-of-source? #f
7490 #:phases (modify-phases %standard-phases
7493 (lambda* (#:key outputs #:allow-other-keys)
7494 ;; Build and install the Python bindings. The underlying
7495 ;; C++ library is apparently not meant to be installed.
7496 (let ((out (assoc-ref outputs "out")))
7497 (with-directory-excursion "py_ext"
7498 (and (system* "python" "setup.py" "build")
7499 (system* "python" "setup.py" "install"
7500 (string-append "--prefix=" out))))))))))
7501 (inputs `(("python" ,python-wrapper))) ;for the bindings
7502 (synopsis "Fuzzy matching library for Python")
7504 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7505 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7506 value which can be used for similarity comparisons. Similar objects have
7507 similar hash values, which allows for the detection of similar objects by
7508 comparing their hash values. The byte stream should have a sufficient amount
7509 of complexity; for example, a byte stream of identical bytes will not generate
7511 (license license:asl2.0)))
7513 (define-public python2-tlsh
7515 (inherit python-tlsh)
7516 (name "python2-tlsh")
7517 (inputs `(("python" ,python-2)))))
7519 (define-public python-termcolor
7521 (name "python-termcolor")
7526 (uri (pypi-uri "termcolor" version))
7529 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7530 (build-system python-build-system)
7532 ;; There are no tests.
7534 (home-page "https://pypi.python.org/pypi/termcolor")
7535 (synopsis "ANSII Color formatting for terminal output")
7537 "This package provides ANSII Color formatting for output in terminals.")
7538 (license license:expat)))
7540 (define-public python2-termcolor
7541 (package-with-python2 python-termcolor))
7543 (define-public python-libarchive-c
7545 (name "python-libarchive-c")
7549 (uri (pypi-uri "libarchive-c" version))
7552 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7553 (build-system python-build-system)
7555 '(#:phases (modify-phases %standard-phases
7557 'build 'reference-libarchive
7558 (lambda* (#:key inputs #:allow-other-keys)
7559 ;; Retain the absolute file name of libarchive.so.
7560 (let ((libarchive (assoc-ref inputs "libarchive")))
7561 (substitute* "libarchive/ffi.py"
7562 (("find_library\\('archive'\\)")
7563 (string-append "'" libarchive
7564 "/lib/libarchive.so'"))))))
7566 (lambda _ (invoke "pytest" "-vv"))))))
7568 `(("python-mock" ,python-mock)
7569 ("python-pytest" ,python-pytest)))
7571 `(("libarchive" ,libarchive)))
7572 (home-page "https://github.com/Changaco/python-libarchive-c")
7573 (synopsis "Python interface to libarchive")
7575 "This package provides Python bindings to libarchive, a C library to
7576 access possibly compressed archives in many different formats. It uses
7577 Python's @code{ctypes} foreign function interface (FFI).")
7578 (license license:lgpl2.0+)))
7580 (define-public python2-libarchive-c
7581 (package-with-python2 python-libarchive-c))
7583 (define-public python-file
7586 (name "python-file")
7587 (build-system python-build-system)
7589 '(#:tests? #f ;no tests
7590 #:configure-flags '("--single-version-externally-managed" "--root=/")
7591 #:phases (modify-phases %standard-phases
7592 (add-before 'build 'change-directory
7596 (add-before 'build 'set-library-file-name
7597 (lambda* (#:key inputs #:allow-other-keys)
7598 (let ((file (assoc-ref inputs "file")))
7599 (substitute* "magic.py"
7600 (("find_library\\('magic'\\)")
7601 (string-append "'" file "/lib/libmagic.so'")))
7603 (inputs `(("file" ,file)))
7604 (native-inputs (if (%current-target-system)
7605 `(("self" ,this-package))
7607 (synopsis "Python bindings to the libmagic file type guesser. Note that
7608 this module and the python-magic module both provide a \"magic.py\" file;
7609 these two modules, which are different and were developed separately, both
7610 serve the same purpose: provide Python bindings for libmagic.")))
7612 (define-public python2-file
7613 (package-with-python2 python-file))
7615 (define-public python-debian
7617 (name "python-debian")
7618 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7622 ;; Use git-fetch, as pypi doesn't include test suite.
7627 (file-name (git-file-name name version))
7630 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7631 (build-system python-build-system)
7633 `(#:phases (modify-phases %standard-phases
7634 (add-after 'unpack 'remove-debian-specific-tests
7635 ;; python-apt, apt and dpkg are not yet available in guix,
7636 ;; and these tests heavily depend on them.
7638 (delete-file "lib/debian/tests/test_deb822.py")
7639 (delete-file "lib/debian/tests/test_debfile.py")
7642 `(("python-six" ,python-six)
7643 ("python-chardet" ,python-chardet)))
7644 (synopsis "Debian package related modules")
7646 ;; XXX: Use @enumerate instead of @itemize to work around
7647 ;; <http://bugs.gnu.org/21772>.
7648 "This package provides Python modules that abstract many formats of
7649 Debian-related files, such as:
7652 @item Debtags information;
7653 @item @file{debian/changelog} files;
7654 @item packages files, pdiffs;
7655 @item control files of single or multiple RFC822-style paragraphs---e.g.
7656 @file{debian/control}, @file{.changes}, @file{.dsc};
7657 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7658 contained files and meta-information.
7661 ;; Modules are either GPLv2+ or GPLv3+.
7662 (license license:gpl3+)))
7664 (define-public python2-debian
7665 (package-with-python2 python-debian))
7667 (define-public python-nbformat
7669 (name "python-nbformat")
7674 (uri (pypi-uri "nbformat" version))
7677 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7678 (build-system python-build-system)
7679 (arguments `(#:tests? #f)) ; no test target
7681 `(("python-ipython-genutils" ,python-ipython-genutils)
7682 ("python-jsonschema" ,python-jsonschema)
7683 ("python-jupyter-core" ,python-jupyter-core)
7684 ("python-traitlets" ,python-traitlets)))
7685 (home-page "http://jupyter.org")
7686 (synopsis "Jupyter Notebook format")
7687 (description "This package provides the reference implementation of the
7688 Jupyter Notebook format and Python APIs for working with notebooks.")
7689 (license license:bsd-3)))
7691 (define-public python2-nbformat
7692 (package-with-python2 python-nbformat))
7694 (define-public python-bleach
7696 (name "python-bleach")
7701 (uri (pypi-uri "bleach" version))
7704 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7705 (build-system python-build-system)
7707 `(("python-html5lib" ,python-html5lib-0.9)
7708 ("python-six" ,python-six)))
7710 `(("python-nose" ,python-nose)))
7711 (home-page "https://github.com/jsocol/bleach")
7712 (synopsis "Whitelist-based HTML-sanitizing tool")
7713 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7714 (license license:asl2.0)))
7716 (define-public python2-bleach
7717 (package-with-python2 python-bleach))
7719 (define-public python-entrypoints
7721 (name "python-entrypoints")
7726 (uri (pypi-uri "entrypoints" version))
7729 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7730 (build-system python-build-system)
7731 ;; The package does not come with a setup.py file, so we have to generate
7736 (modify-phases %standard-phases
7737 (add-after 'unpack 'create-setup.py
7739 (call-with-output-file "setup.py"
7742 from setuptools import setup
7743 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7745 (home-page "https://github.com/takluyver/entrypoints")
7746 (synopsis "Discover and load entry points from installed Python packages")
7747 (description "Entry points are a way for Python packages to advertise
7748 objects with some common interface. The most common examples are
7749 @code{console_scripts} entry points, which define shell commands by
7750 identifying a Python function to run. The @code{entrypoints} module contains
7751 functions to find and load entry points.")
7752 (license license:expat)))
7754 (define-public python2-entrypoints
7755 (package-with-python2 python-entrypoints))
7757 (define-public python-nbconvert
7759 (name "python-nbconvert")
7764 (uri (pypi-uri "nbconvert" version))
7767 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7768 (build-system python-build-system)
7770 `(;; The "bdist_egg" target is disabled by default, causing the installation
7772 #:configure-flags (list "bdist_egg")
7773 ;; FIXME: 5 failures, 40 errors.
7776 ;; (modify-phases %standard-phases
7779 ;; (zero? (system* "py.test" "-v")))))
7781 `(("python-pytest" ,python-pytest)))
7783 `(("python-bleach" ,python-bleach)
7784 ("python-entrypoints" ,python-entrypoints)
7785 ("python-jinja2" ,python-jinja2)
7786 ("python-jupyter-core" ,python-jupyter-core)
7787 ("python-mistune" ,python-mistune)
7788 ("python-nbformat" ,python-nbformat)
7789 ("python-pygments" ,python-pygments)
7790 ("python-traitlets" ,python-traitlets)))
7791 (home-page "http://jupyter.org")
7792 (synopsis "Converting Jupyter Notebooks")
7793 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7794 notebooks to various other formats via Jinja templates. It allows you to
7795 convert an @code{.ipynb} notebook file into various static formats including:
7803 @item ReStructured Text (rst)
7804 @item executable script
7806 (license license:bsd-3)))
7808 (define-public python2-nbconvert
7809 (package-with-python2 python-nbconvert))
7811 (define-public python-notebook
7813 (name "python-notebook")
7817 (uri (pypi-uri "notebook" version))
7820 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7821 (build-system python-build-system)
7824 (modify-phases %standard-phases
7827 ;; These tests require a browser
7828 (delete-file-recursively "notebook/tests/selenium")
7829 ;; Some tests need HOME
7830 (setenv "HOME" "/tmp")
7831 ;; This file contains "warningfilters", which are not supported
7832 ;; by this version of nose.
7833 (delete-file "setup.cfg")
7834 (with-directory-excursion "/tmp"
7835 (invoke "nosetests" "-v"))
7838 `(("python-jupyter-core" ,python-jupyter-core)
7839 ("python-nbformat" ,python-nbformat)
7840 ("python-nbconvert" ,python-nbconvert)
7841 ("python-prometheus-client" ,python-prometheus-client)
7842 ("python-send2trash" ,python-send2trash)
7843 ("python-terminado" ,python-terminado)))
7845 `(("python-nose" ,python-nose)
7846 ("python-sphinx" ,python-sphinx)
7847 ("python-requests" ,python-requests)))
7848 (home-page "http://jupyter.org/")
7849 (synopsis "Web-based notebook environment for interactive computing")
7851 "The Jupyter HTML notebook is a web-based notebook environment for
7852 interactive computing.")
7853 (properties `((python2-variant . ,(delay python2-notebook))))
7854 (license license:bsd-3)))
7856 (define-public python2-notebook
7857 (let ((base (package-with-python2
7858 (strip-python2-variant python-notebook))))
7859 (package (inherit base)
7861 `(("python2-mock" ,python2-mock)
7862 ,@(package-native-inputs base)))
7864 (substitute-keyword-arguments (package-arguments base)
7866 `(modify-phases ,phases
7867 (add-before 'check 'disable-test-case
7868 ;; The test requires network access to localhost. Curiously it
7869 ;; fails with Python 2 only. Simply make the test-case return
7873 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7874 (("formats = self.nbconvert_api") "return #")))))))))))
7876 (define-public python-widgetsnbextension
7878 (name "python-widgetsnbextension")
7883 (uri (pypi-uri "widgetsnbextension" version))
7886 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7887 (build-system python-build-system)
7889 `(("python-ipykernel" ,python-ipykernel)
7890 ("python-notebook" ,python-notebook)))
7892 `(("python-certifi" ,python-certifi)
7893 ("python-nose" ,python-nose)))
7894 (home-page "https://ipython.org")
7895 (synopsis "IPython HTML widgets for Jupyter")
7896 (description "This package provides interactive HTML widgets for Jupyter
7898 (license license:bsd-3)))
7900 (define-public python2-widgetsnbextension
7901 (package-with-python2 python-widgetsnbextension))
7903 (define-public python-ipywidgets
7905 (name "python-ipywidgets")
7910 (uri (pypi-uri "ipywidgets" version))
7913 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7914 (build-system python-build-system)
7916 `(("python-ipython" ,python-ipython)
7917 ("python-traitlets" ,python-traitlets)
7918 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7920 `(("python-nose" ,python-nose)
7921 ("python-pytest" ,python-pytest)))
7922 (home-page "https://ipython.org")
7923 (synopsis "IPython HTML widgets for Jupyter")
7924 (description "Ipywidgets are interactive HTML widgets for Jupyter
7925 notebooks and the IPython kernel. Notebooks come alive when interactive
7926 widgets are used. Users gain control of their data and can visualize changes
7928 (license license:bsd-3)))
7930 (define-public python2-ipywidgets
7931 (package-with-python2 python-ipywidgets))
7933 (define-public python-jupyter-console
7935 (name "python-jupyter-console")
7940 (uri (pypi-uri "jupyter_console" version))
7943 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7944 (build-system python-build-system)
7946 `(("python-ipykernel" ,python-ipykernel)
7947 ("python-jupyter-client" ,python-jupyter-client)
7948 ("python-prompt-toolkit" ,python-prompt-toolkit)
7949 ("python-pygments" ,python-pygments)))
7951 `(("python-nose" ,python-nose)))
7952 (home-page "https://jupyter.org")
7953 (synopsis "Jupyter terminal console")
7954 (description "This package provides a terminal-based console frontend for
7955 Jupyter kernels. It also allows for console-based interaction with non-Python
7956 Jupyter kernels such as IJulia and IRKernel.")
7957 (license license:bsd-3)))
7959 (define-public python2-jupyter-console
7961 (name "python2-jupyter-console")
7966 (uri (pypi-uri "jupyter_console" version))
7969 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7970 (build-system python-build-system)
7971 ;; Tests only run in an TTY.
7972 (arguments `(#:tests? #f))
7974 `(("python2-ipykernel" ,python2-ipykernel)
7975 ("python2-jupyter-client" ,python2-jupyter-client)
7976 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7977 ("python2-pygments" ,python2-pygments)))
7979 `(("python2-nose" ,python2-nose)))
7980 (home-page "https://jupyter.org")
7981 (synopsis "Jupyter terminal console")
7982 (description "This package provides a terminal-based console frontend for
7983 Jupyter kernels. It also allows for console-based interaction with non-Python
7984 Jupyter kernels such as IJulia and IRKernel.")
7985 (license license:bsd-3)))
7987 ;; The python-ipython and python-jupyter-console require each other. To get
7988 ;; the functionality in both packages working, strip down the
7989 ;; python-jupyter-console package when using it as an input to python-ipython.
7990 (define python-jupyter-console-minimal
7992 (inherit python-jupyter-console)
7993 (name "python-jupyter-console-minimal")
7995 (substitute-keyword-arguments
7996 (package-arguments python-jupyter-console)
7998 `(modify-phases ,phases
7999 (add-after 'install 'delete-bin
8000 (lambda* (#:key outputs #:allow-other-keys)
8001 ;; Delete the bin files, to avoid conflicts in profiles
8002 ;; where python-ipython and python-jupyter-console are
8004 (delete-file-recursively
8006 (assoc-ref outputs "out") "/bin"))))))))
8007 ;; Remove the python-ipython propagated input, to avoid the cycle
8011 (package-propagated-inputs python-jupyter-console)))))
8013 (define-public python-qtconsole
8015 (name "python-qtconsole")
8020 (uri (pypi-uri "qtconsole" version))
8023 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8024 (build-system python-build-system)
8026 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8027 ;; but we only have the LTS version 5.x. This means that there might be
8028 ;; runtime errors, but since this is a dependency of the Jupyter package,
8029 ;; and Jupyter can be used without the qtconsole we can overlook this for
8033 (modify-phases %standard-phases
8034 (add-before 'check 'pre-check
8036 (setenv "QT_QPA_PLATFORM" "offscreen")
8039 `(("python-ipykernel" ,python-ipykernel)
8040 ("python-ipython" ,python-ipython)))
8042 `(("python-pytest" ,python-pytest)))
8043 (home-page "http://jupyter.org")
8044 (synopsis "Jupyter Qt console")
8045 (description "This package provides a Qt-based console for Jupyter with
8046 support for rich media output.")
8047 (license license:bsd-3)))
8049 (define-public python-jsbeautifier
8051 (name "python-jsbeautifier")
8053 (home-page "https://github.com/beautify-web/js-beautify")
8058 (commit (string-append "v" version))))
8059 (file-name (git-file-name name version))
8062 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8063 (build-system python-build-system)
8065 `(#:phases (modify-phases %standard-phases
8066 (add-after 'unpack 'chdir
8068 ;; The upstream Git repository contains all the code,
8069 ;; but this package only builds the python code.
8072 (add-after 'unpack 'patch-python-six-requirements
8074 (substitute* "python/setup.py"
8079 `(("python-editorconfig" ,python-editorconfig)
8080 ("python-six" ,python-six)))
8082 `(("python-pytest" ,python-pytest)))
8083 (synopsis "JavaScript unobfuscator and beautifier")
8084 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8085 popular online obfuscators.")
8086 (license license:expat)))
8088 (define-public jupyter
8095 (uri (pypi-uri "jupyter" version))
8098 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8099 (build-system python-build-system)
8100 (arguments '(#:tests? #f)) ; there are none.
8102 `(("python-ipykernel" ,python-ipykernel)
8103 ("python-ipywidgets" ,python-ipywidgets)
8104 ("python-jupyter-console" ,python-jupyter-console)
8105 ("python-nbconvert" ,python-nbconvert)
8106 ("python-notebook" ,python-notebook)
8107 ("python-qtconsole" ,python-qtconsole)))
8108 (native-search-paths
8109 (list (search-path-specification
8110 (variable "JUPYTER_PATH")
8111 (files '("share/jupyter")))))
8112 (home-page "https://jupyter.org")
8113 (synopsis "Web application for interactive documents")
8115 "The Jupyter Notebook is a web application that allows you to create and
8116 share documents that contain live code, equations, visualizations and
8117 explanatory text. Uses include: data cleaning and transformation, numerical
8118 simulation, statistical modeling, machine learning and much more.")
8119 (license license:bsd-3)))
8121 (define-public python-chardet
8123 (name "python-chardet")
8128 (uri (pypi-uri "chardet" version))
8131 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8133 `(("python-hypothesis" ,python-hypothesis)
8134 ("python-pytest" ,python-pytest)
8135 ("python-pytest-runner" ,python-pytest-runner)))
8136 (build-system python-build-system)
8137 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8138 (arguments `(#:tests? #f))
8139 (home-page "https://github.com/chardet/chardet")
8140 (synopsis "Universal encoding detector for Python 2 and 3")
8142 "This package provides @code{chardet}, a Python module that can
8143 automatically detect a wide range of file encodings.")
8144 (license license:lgpl2.1+)))
8146 (define-public python2-chardet
8147 (package-with-python2 python-chardet))
8149 (define-public python-docopt
8151 (name "python-docopt")
8156 ;; The release on PyPI does not include tests.
8158 "https://github.com/docopt/docopt/archive/"
8160 (file-name (string-append name "-" version ".tar.gz"))
8163 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8164 (build-system python-build-system)
8166 `(("python-pytest" ,python-pytest)))
8169 (modify-phases %standard-phases
8171 (lambda _ (invoke "py.test"))))))
8172 (home-page "http://docopt.org")
8173 (synopsis "Command-line interface description language for Python")
8174 (description "This library allows the user to define a command-line
8175 interface from a program's help message rather than specifying it
8176 programmatically with command-line parsers like @code{getopt} and
8178 (license license:expat)))
8180 (define-public python2-docopt
8181 (package-with-python2 python-docopt))
8183 (define-public python-pythondialog
8185 (name "python-pythondialog")
8190 (uri (pypi-uri "pythondialog" version))
8193 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8194 (build-system python-build-system)
8197 (modify-phases %standard-phases
8198 (add-after 'unpack 'patch-path
8199 (lambda* (#:key inputs #:allow-other-keys)
8200 (let* ((dialog (assoc-ref inputs "dialog")))
8201 ;; Since this library really wants to grovel the search path, we
8202 ;; must hardcode dialog's store path into it.
8203 (substitute* "dialog.py"
8204 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8205 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8207 #:tests? #f)) ; no test suite
8209 `(("dialog" ,dialog)))
8210 (home-page "http://pythondialog.sourceforge.net/")
8211 (synopsis "Python interface to the UNIX dialog utility")
8212 (description "A Python wrapper for the dialog utility. Its purpose is to
8213 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8214 This allows one to make simple text-mode user interfaces on Unix-like systems")
8215 (license license:lgpl2.1)
8216 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8218 (define-public python2-pythondialog
8219 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8222 (version (package-version python-pythondialog))
8225 (uri (pypi-uri "python2-pythondialog" version))
8228 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8230 (define-public python-configobj
8232 (name "python-configobj")
8236 (uri (pypi-uri "configobj" version))
8239 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8240 ;; Patch setup.py so it looks for python-setuptools, which is
8241 ;; required to parse the keyword 'install_requires' in setup.py.
8242 (patches (search-patches "python-configobj-setuptools.patch"))))
8243 (build-system python-build-system)
8245 `(("python-six" ,python-six)))
8246 (synopsis "Config file reading, writing and validation")
8247 (description "ConfigObj is a simple but powerful config file reader and
8248 writer: an ini file round tripper. Its main feature is that it is very easy to
8249 use, with a straightforward programmer’s interface and a simple syntax for
8251 (home-page "https://github.com/DiffSK/configobj")
8252 (license license:bsd-3)))
8254 (define-public python2-configobj
8255 (package-with-python2 python-configobj))
8257 (define-public python-configargparse
8259 (name "python-configargparse")
8263 (uri (pypi-uri "ConfigArgParse" version))
8266 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8267 (build-system python-build-system)
8269 `(("python-pyyaml" ,python-pyyaml)))
8272 (modify-phases %standard-phases
8275 ;; Bypass setuptools-shim because one test relies on "setup.py"
8276 ;; being the first argument passed to the python call.
8278 ;; NOTE: Many tests do not run because they rely on Python's
8279 ;; built-in test.test_argparse, but we remove the unit tests from
8280 ;; our Python installation.
8281 (invoke "python" "setup.py" "test"))))))
8282 (synopsis "Replacement for argparse")
8283 (description "A drop-in replacement for argparse that allows options to also
8284 be set via config files and/or environment variables.")
8285 (home-page "https://github.com/bw2/ConfigArgParse")
8286 (license license:expat)))
8288 (define-public python2-configargparse
8289 (package-with-python2 python-configargparse))
8291 (define-public python-argparse-manpage
8293 (name "python-argparse-manpage")
8298 (uri (pypi-uri "argparse-manpage" version))
8301 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8302 (build-system python-build-system)
8303 (home-page "https://github.com/praiskup/argparse-manpage")
8304 (synopsis "Build manual page from Python's ArgumentParser object")
8306 "This package provides tools to build manual pages from Python's
8307 @code{ArgumentParser} object.")
8308 (license license:asl2.0)))
8310 (define-public python-contextlib2
8312 (name "python-contextlib2")
8317 (uri (pypi-uri "contextlib2" version))
8320 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8321 (build-system python-build-system)
8322 (home-page "http://contextlib2.readthedocs.org/")
8323 (synopsis "Tools for decorators and context managers")
8324 (description "This module is primarily a backport of the Python
8325 3.2 contextlib to earlier Python versions. Like contextlib, it
8326 provides utilities for common tasks involving decorators and context
8327 managers. It also contains additional features that are not part of
8328 the standard library.")
8329 (license license:psfl)))
8331 (define-public python2-contextlib2
8333 (name "python2-contextlib2")
8338 (uri (pypi-uri "contextlib2" version))
8341 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8342 (build-system python-build-system)
8344 `(#:python ,python-2
8346 (modify-phases %standard-phases
8348 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8350 `(("python2-unittest2" ,python2-unittest2)))
8351 (home-page "http://contextlib2.readthedocs.org/")
8352 (synopsis "Tools for decorators and context managers")
8353 (description "This module is primarily a backport of the Python
8354 3.2 contextlib to earlier Python versions. Like contextlib, it
8355 provides utilities for common tasks involving decorators and context
8356 managers. It also contains additional features that are not part of
8357 the standard library.")
8358 (license license:psfl)))
8360 (define-public python-texttable
8362 (name "python-texttable")
8367 (uri (pypi-uri "texttable" version))
8370 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8371 (build-system python-build-system)
8372 (arguments '(#:tests? #f)) ; no tests
8373 (home-page "https://github.com/foutaise/texttable/")
8374 (synopsis "Python module for creating simple ASCII tables")
8375 (description "Texttable is a Python module for creating simple ASCII
8377 (license license:lgpl2.1+)))
8379 (define-public python2-texttable
8380 (package-with-python2 python-texttable))
8382 (define-public python-atomicwrites
8384 (name "python-atomicwrites")
8388 (uri (pypi-uri "atomicwrites" version))
8391 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8392 (build-system python-build-system)
8393 (synopsis "Atomic file writes in Python")
8394 (description "Library for atomic file writes using platform dependent tools
8395 for atomic file system operations.")
8396 (home-page "https://github.com/untitaker/python-atomicwrites")
8397 (license license:expat)))
8399 (define-public python2-atomicwrites
8400 (package-with-python2 python-atomicwrites))
8402 (define-public python-click-threading
8404 (name "python-click-threading")
8408 (uri (pypi-uri "click-threading" version))
8411 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8412 (build-system python-build-system)
8414 `(("python-click" ,python-click)))
8415 (synopsis "Utilities for multithreading in Click")
8416 (description "This package provides utilities for multithreading in Click
8418 (home-page "https://github.com/click-contrib/click-threading")
8419 (license license:expat)))
8421 (define-public python-click-log
8423 (name "python-click-log")
8427 (uri (pypi-uri "click-log" version))
8430 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8431 (build-system python-build-system)
8433 `(("python-click" ,python-click)))
8434 (synopsis "Logging for click applications")
8435 (description "This package provides a Python library for logging Click
8437 (home-page "https://github.com/click-contrib/click-log")
8438 (license license:expat)))
8440 (define-public python-apipkg
8442 (name "python-apipkg")
8446 (uri (pypi-uri "apipkg" version))
8449 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8450 (build-system python-build-system)
8452 `(("python-pytest" ,python-pytest)))
8453 (synopsis "Namespace control and lazy-import mechanism")
8454 (description "With apipkg you can control the exported namespace of a Python
8455 package and greatly reduce the number of imports for your users. It is a small
8456 pure Python module that works on virtually all Python versions.")
8457 (home-page "https://github.com/pytest-dev/apipkg")
8458 (license license:expat)))
8460 (define-public python2-apipkg
8461 (package-with-python2 python-apipkg))
8463 (define-public python-execnet
8465 (name "python-execnet")
8469 (uri (pypi-uri "execnet" version))
8472 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8473 (build-system python-build-system)
8475 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8476 ;; The two test failures are caused by the lack of an `ssh` executable.
8477 ;; The test suite can be run with pytest after the 'install' phase.
8480 `(("python-pytest" ,python-pytest)
8481 ("python-setuptools-scm" ,python-setuptools-scm)))
8483 `(("python-apipkg" ,python-apipkg)))
8484 (synopsis "Rapid multi-Python deployment")
8485 (description "Execnet provides a share-nothing model with
8486 channel-send/receive communication for distributing execution across many
8487 Python interpreters across version, platform and network barriers. It has a
8488 minimal and fast API targeting the following uses:
8490 @item distribute tasks to (many) local or remote CPUs
8491 @item write and deploy hybrid multi-process applications
8492 @item write scripts to administer multiple environments
8494 (home-page "http://codespeak.net/execnet/")
8495 (license license:expat)))
8497 (define-public python2-execnet
8498 (package-with-python2 python-execnet))
8500 (define-public python-icalendar
8502 (name "python-icalendar")
8506 (uri (pypi-uri "icalendar" version))
8509 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8510 (build-system python-build-system)
8512 `(("python-dateutil" ,python-dateutil)
8513 ("python-pytz" ,python-pytz)))
8514 (synopsis "Python library for parsing iCalendar files")
8515 (description "The icalendar package is a parser/generator of iCalendar
8516 files for use with Python.")
8517 (home-page "https://github.com/collective/icalendar")
8518 (license license:bsd-2)))
8520 (define-public python-args
8522 (name "python-args")
8526 (uri (pypi-uri "args" version))
8529 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8530 (build-system python-build-system)
8531 (home-page "https://github.com/kennethreitz/args")
8532 (synopsis "Command-line argument parser")
8534 "This library provides a Python module to parse command-line arguments.")
8535 (license license:bsd-3)))
8537 (define-public python2-args
8538 (package-with-python2 python-args))
8540 (define-public python-clint
8542 (name "python-clint")
8546 (uri (pypi-uri "clint" version))
8549 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8550 (build-system python-build-system)
8553 (modify-phases %standard-phases
8555 (lambda _ (invoke "py.test" "-v"))))))
8557 `(("python-pytest" ,python-pytest)))
8559 `(("python-args" ,python-args)))
8560 (home-page "https://github.com/kennethreitz/clint")
8561 (synopsis "Command-line interface tools")
8563 "Clint is a Python module filled with a set of tools for developing
8564 command-line applications, including tools for colored and indented
8565 output, progress bar display, and pipes.")
8566 (license license:isc)))
8568 (define-public python2-clint
8569 (package-with-python2 python-clint))
8571 (define-public python-rply
8573 (name "python-rply")
8577 (uri (pypi-uri "rply" version))
8580 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8581 (build-system python-build-system)
8583 `(("python-appdirs" ,python-appdirs)))
8584 (home-page "https://github.com/alex/rply")
8585 (synopsis "Parser generator for Python")
8587 "This package provides a pure Python based parser generator, that also
8588 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8589 with a new public API, and RPython support.")
8590 (license license:bsd-3)))
8592 (define-public python2-rply
8593 (package-with-python2 python-rply))
8595 (define-public python-hy
8601 (uri (pypi-uri "hy" version))
8604 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8605 (build-system python-build-system)
8608 (modify-phases %standard-phases
8611 ;; Tests require write access to HOME.
8612 (setenv "HOME" "/tmp")
8613 (invoke "nosetests"))))))
8615 `(("python-coverage" ,python-coverage)
8616 ("python-nose" ,python-nose)))
8618 `(("python-astor" ,python-astor)
8619 ("python-clint" ,python-clint)
8620 ("python-rply" ,python-rply)))
8621 (home-page "http://hylang.org/")
8622 (synopsis "Lisp frontend to Python")
8624 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8625 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8626 Python at your fingertips, in Lisp form.")
8627 (license license:expat)))
8629 (define-public python2-hy
8630 (package-with-python2 python-hy))
8632 (define-public python2-functools32
8634 (name "python2-functools32")
8639 (uri (pypi-uri "functools32" version))
8642 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8643 (build-system python-build-system)
8645 `(#:python ,python-2
8646 #:tests? #f)) ; no test target
8647 (home-page "https://github.com/MiCHiLU/python-functools32")
8649 "Backport of the functools module from Python 3.2.3")
8651 "This package is a backport of the @code{functools} module from Python
8652 3.2.3 for use with older versions of Python and PyPy.")
8653 (license license:expat)))
8655 (define-public python2-subprocess32
8657 (name "python2-subprocess32")
8661 (uri (pypi-uri "subprocess32" version))
8664 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8666 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8667 (build-system python-build-system)
8669 `(#:python ,python-2
8670 ;; The test suite fails with Python > 2.7.13:
8671 ;; import test.support
8672 ;; ImportError: No module named support
8675 (modify-phases %standard-phases
8676 (add-after 'unpack 'patch-/bin/sh
8678 (substitute* '("subprocess32.py"
8679 "test_subprocess32.py")
8680 (("/bin/sh") (which "sh")))
8682 (home-page "https://github.com/google/python-subprocess32")
8683 (synopsis "Backport of the subprocess module from Python 3.2")
8685 "This is a backport of the @code{subprocess} standard library module
8686 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8687 new features. On POSIX systems it is guaranteed to be reliable when used
8688 in threaded applications. It includes timeout support from Python 3.3 but
8689 otherwise matches 3.2’s API.")
8690 (license license:psfl)))
8692 (define-public python2-futures
8694 (name "python2-futures")
8699 (uri (pypi-uri "futures" version))
8702 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8703 (build-system python-build-system)
8705 `(#:python ,python-2
8707 (modify-phases %standard-phases
8710 (invoke "python" "test_futures.py")
8712 (home-page "https://github.com/agronholm/pythonfutures")
8714 "Backport of the concurrent.futures package from Python 3.2")
8716 "The concurrent.futures module provides a high-level interface for
8717 asynchronously executing callables. This package backports the
8718 concurrent.futures package from Python 3.2")
8719 (license license:bsd-3)))
8721 (define-public python-promise
8723 (name "python-promise")
8728 (uri (pypi-uri "promise" version))
8731 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8732 (build-system python-build-system)
8733 ;; Tests wants python-futures, which is a python2 only program, and
8734 ;; can't be found by python-promise at test time.
8735 (arguments `(#:tests? #f))
8736 (home-page "https://github.com/syrusakbary/promise")
8737 (synopsis "Promises/A+ implementation for Python")
8739 "Promises/A+ implementation for Python")
8740 (properties `((python2-variant . ,(delay python2-promise))))
8741 (license license:expat)))
8743 (define-public python2-promise
8744 (let ((promise (package-with-python2
8745 (strip-python2-variant python-promise))))
8746 (package (inherit promise)
8747 (arguments (substitute-keyword-arguments (package-arguments promise)
8750 `(("python2-futures" ,python2-futures)
8751 ("python2-pytest" ,python2-pytest)
8752 ,@(package-native-inputs promise))))))
8754 (define-public python-progressbar33
8756 (name "python-progressbar33")
8761 (uri (pypi-uri "progressbar33" version))
8764 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8765 (build-system python-build-system)
8766 (home-page "http://github.com/germangh/python-progressbar")
8767 (synopsis "Text progress bar library for Python")
8769 "This package provides a text progress bar library for Python. This
8770 version only differs from the original @code{progressbar} package in that it
8771 uses relative package imports instead of absolute imports, which is necessary
8772 for the module to work under Python 3.3.")
8773 ;; Either or both of these licenses may be selected.
8774 (license (list license:lgpl2.1+ license:bsd-3))))
8776 (define-public python-colorama
8778 (name "python-colorama")
8783 (uri (pypi-uri "colorama" version))
8786 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8787 (build-system python-build-system)
8788 (synopsis "Colored terminal text rendering for Python")
8789 (description "Colorama is a Python library for rendering colored terminal
8791 (home-page "https://pypi.python.org/pypi/colorama")
8792 (license license:bsd-3)))
8794 (define-public python2-colorama
8795 (package-with-python2 python-colorama))
8797 (define-public python-rsa
8804 (uri (pypi-uri "rsa" version))
8807 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8808 (build-system python-build-system)
8810 `(("python-pyasn1" ,python-pyasn1)))
8811 (synopsis "Pure-Python RSA implementation")
8812 (description "Python-RSA is a pure-Python RSA implementation. It supports
8813 encryption and decryption, signing and verifying signatures, and key
8814 generation according to PKCS#1 version 1.5. It can be used as a Python
8815 library as well as on the command line.")
8816 (home-page "https://stuvel.eu/rsa")
8817 (license license:asl2.0)))
8819 (define-public python2-rsa
8820 (package-with-python2 python-rsa))
8822 (define-public python-pluggy
8824 (name "python-pluggy")
8829 (uri (pypi-uri "pluggy" version))
8832 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8833 (build-system python-build-system)
8835 `(("python-setuptools-scm" ,python-setuptools-scm)))
8836 (synopsis "Plugin and hook calling mechanism for Python")
8837 (description "Pluggy is an extraction of the plugin manager as used by
8838 Pytest but stripped of Pytest specific details.")
8839 (home-page "https://pypi.python.org/pypi/pluggy")
8840 (license license:expat)))
8842 (define-public python2-pluggy
8843 (package-with-python2 python-pluggy))
8845 (define-public python-tox
8852 (uri (pypi-uri "tox" version))
8855 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8856 (build-system python-build-system)
8858 ;; FIXME: Tests require pytest-timeout, which itself requires
8859 ;; pytest>=2.8.0 for installation.
8862 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8863 ("python-py" ,python-py)
8864 ("python-virtualenv" ,python-virtualenv)))
8866 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8867 ("python-pytest" ,python-pytest) ; >= 2.3.5
8868 ("python-setuptools-scm" ,python-setuptools-scm)))
8869 (home-page "http://tox.testrun.org/")
8870 (synopsis "Virtualenv-based automation of test activities")
8871 (description "Tox is a generic virtualenv management and test command line
8872 tool. It can be used to check that a package installs correctly with
8873 different Python versions and interpreters, or run tests in each type of
8874 supported environment, or act as a frontend to continuous integration
8876 (license license:expat)))
8878 (define-public python2-tox
8879 (package-with-python2 python-tox))
8881 (define-public python-jmespath
8883 (name "python-jmespath")
8888 (uri (pypi-uri "jmespath" version))
8891 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8892 (build-system python-build-system)
8894 `(("python-nose" ,python-nose)))
8895 (synopsis "JSON Matching Expressions")
8896 (description "JMESPath (pronounced “james path”) is a Python library that
8897 allows one to declaratively specify how to extract elements from a JSON
8899 (home-page "https://github.com/jmespath/jmespath.py")
8900 (license license:expat)))
8902 (define-public python2-jmespath
8903 (package-with-python2 python-jmespath))
8905 (define-public python-botocore
8907 (name "python-botocore")
8908 (version "1.12.149")
8912 (uri (pypi-uri "botocore" version))
8915 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8916 (build-system python-build-system)
8918 ;; FIXME: Many tests are failing.
8921 `(("python-dateutil" ,python-dateutil)
8922 ("python-docutils" ,python-docutils)
8923 ("python-jmespath" ,python-jmespath)))
8925 `(("python-mock" ,python-mock)
8926 ("python-nose" ,python-nose)
8928 ("python-tox" ,python-tox)
8929 ("python-urllib3" ,python-urllib3)
8930 ("python-wheel" ,python-wheel)))
8931 (home-page "https://github.com/boto/botocore")
8932 (synopsis "Low-level interface to AWS")
8933 (description "Botocore is a Python library that provides a low-level
8934 interface to the Amazon Web Services (AWS) API.")
8935 (license license:asl2.0)))
8937 (define-public python2-botocore
8938 (package-with-python2 python-botocore))
8940 (define-public python-xdo
8947 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8948 "python-xdo_" version ".orig.tar.gz"))
8951 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8952 (build-system python-build-system)
8955 (modify-phases %standard-phases
8956 (add-before 'install 'patch-libxdo-path
8957 ;; Hardcode the path of dynamically loaded libxdo library.
8958 (lambda* (#:key inputs #:allow-other-keys)
8959 (let ((libxdo (string-append
8960 (assoc-ref inputs "xdotool")
8962 (substitute* "xdo/_xdo.py"
8963 (("find_library\\(\"xdo\"\\)")
8964 (simple-format #f "\"~a\"" libxdo)))
8966 #:tests? #f)) ; no tests provided
8968 `(("python-six" ,python-six)))
8970 `(("xdotool" ,xdotool)
8971 ("libX11" ,libx11)))
8972 (home-page "https://tracker.debian.org/pkg/python-xdo")
8973 (synopsis "Python library for simulating X11 keyboard/mouse input")
8974 (description "Provides bindings to libxdo for manipulating X11 via simulated
8975 input. (Note that this is mostly a legacy library; you may wish to look at
8976 python-xdo for newer bindings.)")
8977 (license license:bsd-3)))
8979 (define-public python2-xdo
8980 (package-with-python2 python-xdo))
8982 (define-public python-mako
8984 (name "python-mako")
8989 (uri (pypi-uri "Mako" version))
8992 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8993 (build-system python-build-system)
8995 `(#:phases (modify-phases %standard-phases
8998 (invoke "pytest" "-vv"))))))
9000 `(("python-markupsafe" ,python-markupsafe)))
9002 `(("python-mock" ,python-mock)
9003 ("python-pytest" ,python-pytest)))
9004 (home-page "https://www.makotemplates.org/")
9005 (synopsis "Templating language for Python")
9006 (description "Mako is a templating language for Python that compiles
9007 templates into Python modules.")
9008 (license license:expat)))
9010 (define-public python2-mako
9011 (package-with-python2 python-mako))
9013 (define-public python-waitress
9015 (name "python-waitress")
9020 (uri (pypi-uri "waitress" version))
9021 (patches (search-patches "python-waitress-fix-tests.patch"))
9024 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9025 (build-system python-build-system)
9026 (home-page "https://github.com/Pylons/waitress")
9027 (synopsis "Waitress WSGI server")
9028 (description "Waitress is meant to be a production-quality pure-Python WSGI
9029 server with very acceptable performance.")
9030 (license license:zpl2.1)))
9032 (define-public python2-waitress
9033 (package-with-python2 python-waitress))
9035 (define-public python-pyquery
9037 (name "python-pyquery")
9042 (uri (pypi-uri "pyquery" version))
9045 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9046 (build-system python-build-system)
9048 `(("python-webob" ,python-webob)
9049 ("python-webtest" ,python-webtest)))
9051 `(("python-lxml" ,python-lxml)
9052 ("python-cssselect" ,python-cssselect)))
9053 (home-page "https://github.com/gawel/pyquery")
9054 (synopsis "Make jQuery-like queries on xml documents")
9055 (description "pyquery allows you to make jQuery queries on xml documents.
9056 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9057 fast xml and html manipulation.")
9058 (license license:bsd-3)))
9060 (define-public python-anyjson
9062 (name "python-anyjson")
9067 (uri (pypi-uri "anyjson" version))
9070 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9071 (build-system python-build-system)
9073 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9074 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9075 ;; whatever) so this transformation needs to be done before the tests
9076 ;; can be run. Maybe we could add a build step to transform beforehand
9077 ;; but it could be annoying/difficult.
9078 ;; We can enable tests for the Python 2 version, though, and do below.
9080 (home-page "https://bitbucket.org/runeh/anyjson/")
9082 "Wraps best available JSON implementation in a common interface")
9084 "Anyjson loads whichever is the fastest JSON module installed
9085 and provides a uniform API regardless of which JSON implementation is used.")
9086 (license license:bsd-3)
9087 (properties `((python2-variant . ,(delay python2-anyjson))))))
9089 (define-public python2-anyjson
9090 (let ((anyjson (package-with-python2
9091 (strip-python2-variant python-anyjson))))
9094 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9096 ,@(package-arguments anyjson)))
9097 (native-inputs `(("python2-nose" ,python2-nose))))))
9099 (define-public python-amqp
9101 (name "python-amqp")
9106 (uri (pypi-uri "amqp" version))
9109 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9110 (build-system python-build-system)
9112 `(("python-case" ,python-case)
9113 ("python-pytest-sugar" ,python-pytest-sugar)
9114 ("python-mock" ,python-mock)))
9116 `(("python-vine" ,python-vine)))
9117 (home-page "https://github.com/celery/py-amqp")
9119 "Low-level AMQP client for Python (fork of amqplib)")
9121 "This is a fork of amqplib which was originally written by Barry Pederson.
9122 It is maintained by the Celery project, and used by kombu as a pure python
9123 alternative when librabbitmq is not available.")
9124 (license license:lgpl2.1+)
9125 (properties `((python2-variant . ,(delay python2-amqp))))))
9127 (define-public python2-amqp
9128 (let ((amqp (package-with-python2
9129 (strip-python2-variant python-amqp))))
9132 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9133 ;; unmaintained. Weirdly, does not do this on the python 3
9136 ,@(package-arguments amqp))))))
9138 (define-public python-txamqp
9140 (name "python-txamqp")
9145 (uri (pypi-uri "txAMQP" version))
9148 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9149 (build-system python-build-system)
9151 `(("python-six" ,python-six)
9152 ("python-twisted" ,python-twisted)))
9153 (home-page "https://github.com/txamqp/txamqp")
9154 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9156 "This package provides a Python library for communicating with AMQP peers
9157 and brokers using the asynchronous networking framework Twisted. It contains
9158 all the necessary code to connect, send and receive messages to/from an
9159 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9160 also includes support for using Thrift RPC over AMQP in Twisted
9162 (license license:asl2.0)))
9164 (define-public python2-txamqp
9165 (package-with-python2 python-txamqp))
9167 (define-public python-kombu
9169 (name "python-kombu")
9174 (uri (pypi-uri "kombu" version))
9177 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9178 (build-system python-build-system)
9180 `(("python-mock" ,python-mock)
9181 ("python-case" ,python-case)
9182 ("python-pyro4" ,python-pyro4)
9183 ("python-pytest-sugar" ,python-pytest-sugar)
9184 ("python-pytz" ,python-pytz)))
9186 `(("python-anyjson" ,python-anyjson)
9187 ("python-amqp" ,python-amqp)
9188 ("python-redis" ,python-redis)))
9189 (home-page "https://kombu.readthedocs.io")
9190 (synopsis "Message passing library for Python")
9191 (description "The aim of Kombu is to make messaging in Python as easy as
9192 possible by providing an idiomatic high-level interface for the AMQ protocol,
9193 and also provide proven and tested solutions to common messaging problems.
9194 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9195 message orientation, queuing, routing, reliability and security, for which the
9196 RabbitMQ messaging server is the most popular implementation.")
9197 (license license:bsd-3)
9198 (properties `((python2-variant . ,(delay python2-kombu))))))
9200 (define-public python2-kombu
9201 (let ((kombu (package-with-python2
9202 (strip-python2-variant python-kombu))))
9205 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9206 ;; It works fine on the python3 variant.
9208 ,@(package-arguments kombu)))
9209 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9210 ,@(package-native-inputs kombu))))))
9212 (define-public python-billiard
9214 (name "python-billiard")
9219 (uri (pypi-uri "billiard" version))
9222 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9223 (build-system python-build-system)
9225 `(("python-case" ,python-case)
9226 ("python-pytest" ,python-pytest)))
9227 (home-page "https://github.com/celery/billiard")
9229 "Python multiprocessing fork with improvements and bugfixes")
9231 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9232 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9233 pyprocessing package. This standalone variant is intended to be compatible with
9234 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9235 (license license:bsd-3)
9236 (properties `((python2-variant . ,(delay python2-billiard))))))
9238 (define-public python2-billiard
9239 (let ((billiard (package-with-python2
9240 (strip-python2-variant python-billiard))))
9243 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9244 ("python2-mock" ,python2-mock)
9245 ,@(package-native-inputs billiard))))))
9247 (define-public python-celery
9249 (name "python-celery")
9254 (uri (pypi-uri "celery" version))
9257 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9258 (build-system python-build-system)
9260 '(;; TODO The tests fail with Python 3.7
9261 ;; https://github.com/celery/celery/issues/4849
9264 (modify-phases %standard-phases
9265 (add-after 'unpack 'patch-requirements
9267 (substitute* "requirements/test.txt"
9268 (("pytest>=3\\.0,<3\\.3")
9272 `(("python-case" ,python-case)
9273 ("python-pytest" ,python-pytest)))
9275 `(("python-pytz" ,python-pytz)
9276 ("python-billiard" ,python-billiard)
9277 ("python-kombu" ,python-kombu)))
9278 (home-page "https://celeryproject.org")
9279 (synopsis "Distributed Task Queue")
9280 (description "Celery is an asynchronous task queue/job queue based on
9281 distributed message passing. It is focused on real-time operation, but
9282 supports scheduling as well. The execution units, called tasks, are executed
9283 concurrently on a single or more worker servers using multiprocessing,
9284 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9285 synchronously (wait until ready).")
9286 (license license:bsd-3)
9287 (properties `((python2-variant . ,(delay python2-celery))))))
9289 (define-public python2-celery
9290 (let ((celery (package-with-python2
9291 (strip-python2-variant python-celery))))
9294 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9295 ("python2-mock" ,python2-mock)
9296 ,@(package-native-inputs celery))))))
9298 (define-public python-translitcodec
9300 (name "python-translitcodec")
9305 (uri (pypi-uri "translitcodec" version))
9308 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9309 (build-system python-build-system)
9311 `(#:tests? #f)) ; no tests provided
9313 "https://github.com/claudep/translitcodec")
9315 "Unicode to 8-bit charset transliteration codec")
9317 "This package contains codecs for transliterating ISO 10646 texts into
9318 best-effort representations using smaller coded character sets (ASCII,
9320 (license license:expat)))
9322 (define-public python2-translitcodec
9323 (package-with-python2 python-translitcodec))
9325 (define-public python-editor
9327 (name "python-editor")
9332 (uri (pypi-uri "python-editor" version))
9335 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9336 (build-system python-build-system)
9338 "https://github.com/fmoo/python-editor")
9340 "Programmatically open an editor, capture the result")
9342 "python-editor is a library that provides the editor module for
9343 programmatically interfacing with your system's $EDITOR.")
9344 (license license:asl2.0)))
9346 (define-public python2-editor
9347 (package-with-python2 python-editor))
9349 (define-public python-vobject
9351 (name "python-vobject")
9355 (uri (pypi-uri "vobject" version))
9358 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9359 (build-system python-build-system)
9361 '(;; The test suite relies on some non-portable Windows interfaces.
9364 `(("python-dateutil" ,python-dateutil)
9365 ("python-pyicu" ,python-pyicu)))
9366 (synopsis "Parse and generate vCard and vCalendar files")
9367 (description "Vobject is intended to be a full featured Python package for
9368 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9369 are supported and well tested. vCard 3.0 files are supported, and all data
9370 should be imported, but only a few components are understood in a sophisticated
9372 (home-page "http://eventable.github.io/vobject/")
9373 (license license:asl2.0)))
9375 (define-public python2-vobject
9376 (package-with-python2 python-vobject))
9378 (define-public python-munkres
9380 (name "python-munkres")
9384 (uri (pypi-uri "munkres" version))
9387 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9388 (build-system python-build-system)
9390 '(#:tests? #f)) ; no test suite
9391 (home-page "http://software.clapper.org/munkres/")
9392 (synopsis "Implementation of the Munkres algorithm")
9393 (description "The Munkres module provides an implementation of the Munkres
9394 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9395 useful for solving the Assignment Problem.")
9396 (license license:bsd-3)))
9398 (define-public python2-munkres
9399 (package-with-python2 python-munkres))
9401 (define-public python-whoosh
9403 (name "python-whoosh")
9408 (uri (pypi-uri "Whoosh" version))
9411 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9412 (build-system python-build-system)
9414 `(("python-pytest" ,python-pytest)))
9415 (home-page "https://bitbucket.org/mchaput/whoosh")
9416 (synopsis "Full text indexing, search, and spell checking library")
9418 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9420 (license license:bsd-2)))
9422 (define-public python2-whoosh
9423 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9424 (package (inherit whoosh)
9426 `(("python2-backport-ssl-match-hostname"
9427 ,python2-backport-ssl-match-hostname)
9428 ,@(package-propagated-inputs whoosh))))))
9430 (define-public python-pathlib
9432 (name "python-pathlib")
9436 (uri (pypi-uri "pathlib" version))
9439 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9440 (build-system python-build-system)
9441 ;; The tests depend on the internal "test" module, which does not provide
9442 ;; a stable interface.
9443 (arguments `(#:tests? #f))
9444 (home-page "https://pathlib.readthedocs.org/")
9445 (synopsis "Object-oriented file system paths")
9446 (description "Pathlib offers a set of classes to handle file system paths.
9447 It offers the following advantages over using string objects:
9450 @item No more cumbersome use of os and os.path functions. Everything can
9451 be done easily through operators, attribute accesses, and method calls.
9452 @item Embodies the semantics of different path types. For example,
9453 comparing Windows paths ignores casing.
9454 @item Well-defined semantics, eliminating any inconsistencies or
9455 ambiguities (forward vs. backward slashes, etc.).
9458 Note: In Python 3.4, pathlib is now part of the standard library. For other
9459 Python versions please consider python-pathlib2 instead, which tracks the
9460 standard library module. This module (python-pathlib) isn't maintained
9462 (license license:expat)))
9464 (define-public python2-pathlib
9465 (package-with-python2 python-pathlib))
9467 (define-public python2-pathlib2
9469 (name "python2-pathlib2")
9473 (uri (pypi-uri "pathlib2" version))
9476 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9477 (build-system python-build-system)
9478 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9479 ;; version is 3.4 which already includes this package as part of the
9480 ;; standard library.
9482 `(#:python ,python-2))
9484 `(("python2-scandir" ,python2-scandir)
9485 ("python2-six" ,python2-six)))
9486 (home-page "https://pypi.python.org/pypi/pathlib2/")
9487 (synopsis "Object-oriented file system paths - backport of standard
9489 (description "The goal of pathlib2 is to provide a backport of standard
9490 pathlib module which tracks the standard library module, so all the newest
9491 features of the standard pathlib can be used also on older Python versions.
9493 Pathlib offers a set of classes to handle file system paths. It offers the
9494 following advantages over using string objects:
9497 @item No more cumbersome use of os and os.path functions. Everything can
9498 be done easily through operators, attribute accesses, and method calls.
9499 @item Embodies the semantics of different path types. For example,
9500 comparing Windows paths ignores casing.
9501 @item Well-defined semantics, eliminating any inconsistencies or
9502 ambiguities (forward vs. backward slashes, etc.).
9504 (license license:expat)))
9506 (define-public python2-pathlib2-bootstrap
9509 (inherit python2-pathlib2)
9510 (name "python2-pathlib2-bootstrap")
9512 `(("python2-scandir" ,python2-scandir)
9513 ("python2-six" ,python2-six-bootstrap))))))
9515 (define-public python-jellyfish
9517 (name "python-jellyfish")
9521 (uri (pypi-uri "jellyfish" version))
9524 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9525 (build-system python-build-system)
9527 `(("python-pytest" ,python-pytest)))
9528 (home-page "https://github.com/jamesturk/jellyfish")
9529 (synopsis "Approximate and phonetic matching of strings")
9530 (description "Jellyfish uses a variety of string comparison and phonetic
9531 encoding algorithms to do fuzzy string matching.")
9532 (license license:bsd-2)
9533 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9535 (define-public python2-jellyfish
9536 (let ((jellyfish (package-with-python2
9537 (strip-python2-variant python-jellyfish))))
9538 (package (inherit jellyfish)
9539 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9540 ,@(package-native-inputs jellyfish))))))
9542 (define-public python2-unicodecsv
9544 (name "python2-unicodecsv")
9548 ;; The test suite is not included in the PyPi release.
9549 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9550 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9551 "archive/" version ".tar.gz"))
9552 (file-name (string-append name "-" version ".tar.gz"))
9555 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9556 (build-system python-build-system)
9558 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9559 #:python ,python-2))
9561 `(("python2-unittest2" ,python2-unittest2)))
9562 (home-page "https://github.com/jdunck/python-unicodecsv")
9563 (synopsis "Unicode CSV module for Python 2")
9564 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9565 module, adding support for Unicode strings.")
9566 (license license:bsd-2)))
9568 (define-public python-rarfile
9570 (name "python-rarfile")
9574 (uri (pypi-uri "rarfile" version))
9577 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9578 (build-system python-build-system)
9581 (modify-phases %standard-phases
9583 ;; Many tests fail, but the installation proceeds.
9584 (lambda _ (invoke "make" "-C" "test" "test"))))))
9586 `(("which" ,which))) ; required for tests
9588 `(("libarchive" ,libarchive)))
9589 (home-page "https://github.com/markokr/rarfile")
9590 (synopsis "RAR archive reader for Python")
9591 (description "This is Python module for RAR archive reading. The interface
9592 is made as zipfile like as possible.")
9593 (license license:isc)))
9595 (define-public python2-rarfile
9596 (package-with-python2 python-rarfile))
9598 (define-public python-magic
9600 (name "python-magic")
9605 (uri (pypi-uri "python-magic" version))
9608 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9609 (file-name (string-append name "-" version "-checkout"))))
9610 (build-system python-build-system)
9612 ;; The tests are unreliable, so don't run them. The tests fail
9613 ;; under Python3 because they were written for Python2 and
9614 ;; contain import statements that do not work in Python3. One of
9615 ;; the tests fails under Python2 because its assertions are
9616 ;; overly stringent; it relies on comparing output strings which
9617 ;; are brittle and can change depending on the version of
9618 ;; libmagic being used and the system on which the test is
9619 ;; running. In my case, under GuixSD 0.10.0, only one test
9620 ;; failed, and it seems to have failed only because the version
9621 ;; of libmagic that is packaged in Guix outputs a slightly
9622 ;; different (but not wrong) string than the one that the test
9625 #:phases (modify-phases %standard-phases
9626 ;; Replace a specific method call with a hard-coded
9627 ;; path to the necessary libmagic.so file in the
9628 ;; store. If we don't do this, then the method call
9629 ;; will fail to find the libmagic.so file, which in
9630 ;; turn will cause any application using
9631 ;; python-magic to fail.
9632 (add-before 'build 'hard-code-path-to-libmagic
9633 (lambda* (#:key inputs #:allow-other-keys)
9634 (let ((file (assoc-ref inputs "file")))
9635 (substitute* "magic.py"
9636 (("ctypes.util.find_library\\('magic'\\)")
9637 (string-append "'" file "/lib/libmagic.so'")))
9639 (add-before 'install 'disable-egg-compression
9641 (let ((port (open-file "setup.cfg" "a")))
9642 (display "\n[easy_install]\nzip_ok = 0\n"
9647 ;; python-magic needs to be able to find libmagic.so.
9650 "https://github.com/ahupp/python-magic")
9652 "File type identification using libmagic")
9654 "This module uses ctypes to access the libmagic file type
9655 identification library. It makes use of the local magic database and
9656 supports both textual and MIME-type output. Note that this module and
9657 the python-file module both provide a \"magic.py\" file; these two
9658 modules, which are different and were developed separately, both serve
9659 the same purpose: to provide Python bindings for libmagic.")
9660 (license license:expat)))
9662 (define-public python2-magic
9663 (package-with-python2 python-magic))
9665 (define-public python2-s3cmd
9667 (name "python2-s3cmd")
9672 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9673 "s3cmd-" version ".tar.gz"))
9676 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9677 (build-system python-build-system)
9679 ;; s3cmd is written for python2 only and contains no tests.
9680 `(#:python ,python-2
9683 `(("python2-dateutil" ,python2-dateutil)
9684 ;; The python-file package also provides a magic.py module.
9685 ;; This is an unfortunate state of affairs; however, s3cmd
9686 ;; fails to install if it cannot find specifically the
9687 ;; python-magic package. Thus we include it, instead of using
9688 ;; python-file. Ironically, s3cmd sometimes works better
9689 ;; without libmagic bindings at all:
9690 ;; https://github.com/s3tools/s3cmd/issues/198
9691 ("python2-magic" ,python2-magic)))
9692 (home-page "http://s3tools.org/s3cmd")
9693 (synopsis "Command line tool for S3-compatible storage services")
9695 "S3cmd is a command line tool for uploading, retrieving and managing data
9696 in storage services that are compatible with the Amazon Simple Storage
9697 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9698 GnuPG encryption, and more. It also supports management of Amazon's
9699 CloudFront content delivery network.")
9700 (license license:gpl2+)))
9702 (define-public python-pkgconfig
9704 (name "python-pkgconfig")
9709 (uri (pypi-uri "pkgconfig" version))
9712 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9713 (build-system python-build-system)
9715 `(("python-nose" ,python-nose)))
9717 `(("pkg-config" ,pkg-config)))
9720 (modify-phases %standard-phases
9721 (add-before 'build 'patch
9722 ;; Hard-code the path to pkg-config.
9724 (substitute* "pkgconfig/pkgconfig.py"
9725 (("cmd = 'pkg-config")
9726 (string-append "cmd = '" (which "pkg-config"))))
9730 (invoke "nosetests" "test.py"))))))
9731 (home-page "https://github.com/matze/pkgconfig")
9732 (synopsis "Python interface for pkg-config")
9733 (description "This module provides a Python interface to pkg-config. It
9734 can be used to find all pkg-config packages, check if a package exists,
9735 check if a package meets certain version requirements, query CFLAGS and
9736 LDFLAGS and parse the output to build extensions with setup.py.")
9737 (license license:expat)))
9739 (define-public python2-pkgconfig
9740 (package-with-python2 python-pkgconfig))
9742 (define-public python-bz2file
9744 (name "python-bz2file")
9749 (uri (pypi-uri "bz2file" version))
9752 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9753 (build-system python-build-system)
9755 `(#:tests? #f)) ; Tests use deprecated python modules.
9756 (home-page "https://github.com/nvawda/bz2file")
9757 (synopsis "Read and write bzip2-compressed files")
9759 "Bz2file is a Python library for reading and writing bzip2-compressed
9760 files. It contains a drop-in replacement for the I/O interface in the
9761 standard library's @code{bz2} module, including features from the latest
9762 development version of CPython that are not available in older releases.")
9763 (license license:asl2.0)))
9765 (define-public python2-bz2file
9766 (package-with-python2 python-bz2file))
9768 (define-public python-future
9770 (name "python-future")
9775 (uri (pypi-uri "future" version))
9778 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9779 (build-system python-build-system)
9780 ;; Many tests connect to the network or are otherwise flawed.
9781 ;; https://github.com/PythonCharmers/python-future/issues/210
9784 (home-page "http://python-future.org")
9785 (synopsis "Single-source support for Python 3 and 2")
9787 "@code{python-future} is the missing compatibility layer between Python 2 and
9788 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9789 to support both Python 2 and Python 3 with minimal overhead.")
9790 (license license:expat)))
9792 (define-public python2-future
9793 (package-with-python2 python-future))
9795 (define-public python-cysignals
9797 (name "python-cysignals")
9802 (uri (pypi-uri "cysignals" version))
9805 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9806 (build-system python-build-system)
9808 `(("python-cython" ,python-cython)
9809 ("python-sphinx" ,python-sphinx)))
9811 `(("pari-gp" ,pari-gp)))
9813 `(#:modules ((guix build python-build-system)
9814 ((guix build gnu-build-system) #:prefix gnu:)
9816 ;; FIXME: Tests are executed after installation and currently fail
9817 ;; when not installing into standard locations; the author is working
9821 (modify-phases %standard-phases
9824 (assoc-ref gnu:%standard-phases 'configure)))))
9826 "https://github.com/sagemath/cysignals")
9828 "Handling of interrupts and signals for Cython")
9830 "The cysignals package provides mechanisms to handle interrupts (and
9831 other signals and errors) in Cython code, using two related approaches,
9832 for mixed Cython/Python code or external C libraries and pure Cython code,
9834 (license license:lgpl3+)))
9836 (define-public python2-cysignals
9837 (package-with-python2 python-cysignals))
9839 (define-public python2-shedskin
9841 (name "python2-shedskin")
9846 (uri (string-append "https://github.com/shedskin/shedskin/"
9847 "releases/download/v" version
9848 "/shedskin-" version ".tgz"))
9851 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9852 (build-system python-build-system)
9854 `(#:python ,python-2
9855 #:phases (modify-phases %standard-phases
9856 (add-after 'unpack 'fix-resulting-include-libs
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((libgc (assoc-ref inputs "libgc"))
9859 (pcre (assoc-ref inputs "pcre")))
9860 (substitute* "shedskin/makefile.py"
9861 (("variable == 'CCFLAGS':[ ]*")
9862 (string-append "variable == 'CCFLAGS':\n"
9863 " line += ' -I " pcre "/include"
9864 " -I " libgc "/include'"))
9865 (("variable == 'LFLAGS':[ ]*")
9866 (string-append "variable == 'LFLAGS':\n"
9867 " line += ' -L" pcre "/lib"
9868 " -L " libgc "/lib'")))
9870 (inputs `(("pcre" ,pcre)
9872 (home-page "https://shedskin.github.io/")
9873 (synopsis "Experimental Python-2 to C++ Compiler")
9874 (description (string-append "This is an experimental compiler for a subset of
9875 Python. It generates C++ code and a Makefile."))
9876 (license (list license:gpl3 license:bsd-3 license:expat))))
9878 (define-public python2-rope
9880 (name "python2-rope")
9885 (uri (pypi-uri "rope" version))
9888 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9890 ;; Rope has only partial python3 support, see `python-rope'
9891 `(#:python ,python-2))
9892 (build-system python-build-system)
9894 `(("python2-unittest2" ,python2-unittest2)))
9895 (home-page "https://github.com/python-rope/rope")
9896 (synopsis "Refactoring library for Python")
9897 (description "Rope is a refactoring library for Python. It facilitates
9898 the renaming, moving and extracting of attributes, functions, modules, fields
9899 and parameters in Python 2 source code. These refactorings can also be applied
9900 to occurrences in strings and comments.")
9901 (license license:gpl2)))
9903 (define-public python-rope
9905 (inherit python2-rope)
9906 (name "python-rope")
9907 (arguments `(#:python ,python-wrapper
9908 ;; XXX: Only partial python3 support, results in some failing
9909 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9911 (properties `((python2-variant . ,(delay python2-rope))))))
9913 (define-public python-py3status
9915 (name "python-py3status")
9920 (uri (pypi-uri "py3status" version))
9923 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9924 (build-system python-build-system)
9929 (modify-phases %standard-phases
9930 ;; 'file' is used for detection of configuration file encoding
9931 ;; let's make link the dependency to particular input
9932 (add-before 'build 'patch-file-path
9933 (lambda* (#:key inputs #:allow-other-keys)
9934 (let ((file-path (assoc-ref inputs "file")))
9935 (substitute* "py3status/parse_config.py"
9936 (("\\['file', '-b'")
9937 (string-append "['" file-path "/bin/file', '-b'")))
9939 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9940 (home-page "https://github.com/ultrabug/py3status")
9941 (synopsis "Extensible i3status wrapper written in Python")
9942 (description "py3status is an i3status wrapper which extends i3status
9943 functionality in a modular way, allowing you to extend your panel with your
9944 own code, responding to click events and updating clock every second.")
9945 (license license:bsd-3)))
9947 (define-public python-tblib
9949 (name "python-tblib")
9953 (uri (pypi-uri "tblib" version))
9955 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9956 (build-system python-build-system)
9959 (modify-phases %standard-phases
9960 (add-before 'check 'adjust-tests
9962 (when (which "python3")
9963 ;; Adjust the example output to match that of Python 3.7:
9964 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9965 (substitute* "README.rst"
9966 (("Exception\\('fail',") "Exception('fail'"))
9970 ;; Upstream runs tests after installation and the package itself
9971 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9973 (setenv "PYTHONPATH"
9974 (string-append (getcwd) "/build/lib:"
9975 (getenv "PYTHONPATH")))
9976 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9978 `(("python-pytest" ,python-pytest)
9979 ("python-six" ,python-six)))
9980 (home-page "https://github.com/ionelmc/python-tblib")
9981 (synopsis "Traceback serialization library")
9983 "Traceback serialization allows you to:
9986 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9987 different processes. This allows better error handling when running code over
9988 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9990 @item Parse traceback strings and raise with the parsed tracebacks.
9992 (license license:bsd-3)))
9994 (define-public python2-tblib
9995 (package-with-python2 python-tblib))
9997 (define-public python-greenlet
9999 (name "python-greenlet")
10003 (uri (pypi-uri "greenlet" version))
10006 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10007 (build-system python-build-system)
10008 (home-page "https://greenlet.readthedocs.io/")
10009 (synopsis "Lightweight in-process concurrent programming")
10011 "Greenlet package is a spin-off of Stackless, a version of CPython
10012 that supports micro-threads called \"tasklets\". Tasklets run
10013 pseudo-concurrently (typically in a single or a few OS-level threads) and
10014 are synchronized with data exchanges on \"channels\".")
10015 (license (list license:psfl license:expat))))
10017 (define-public python2-greenlet
10018 (package-with-python2 python-greenlet))
10020 (define-public python-objgraph
10022 (name "python-objgraph")
10027 (uri (pypi-uri "objgraph" version))
10030 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10031 (build-system python-build-system)
10033 `(("python-graphviz" ,python-graphviz)))
10035 `(("python-mock" ,python-mock)
10036 ("graphviz" ,graphviz)))
10037 (home-page "https://mg.pov.lt/objgraph/")
10038 (synopsis "Draw Python object reference graphs with graphviz")
10040 "This package provides tools to draw Python object reference graphs with
10042 (license license:expat)))
10044 (define-public python-gevent
10046 (name "python-gevent")
10050 (uri (pypi-uri "gevent" version))
10053 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10054 (modules '((guix build utils)))
10057 ;; unbunding libev and c-ares
10058 (delete-file-recursively "deps")
10060 (build-system python-build-system)
10062 `(#:modules ((ice-9 ftw)
10066 (guix build python-build-system))
10067 #:phases (modify-phases %standard-phases
10068 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10070 (substitute* "src/gevent/subprocess.py"
10071 (("/bin/sh") (which "sh")))
10072 (for-each (lambda (file)
10074 (("/bin/sh") (which "sh"))
10075 (("/bin/true") (which "true"))))
10076 (find-files "src/greentest" "\\.py$"))
10078 (add-before 'build 'do-not-use-bundled-sources
10079 (lambda* (#:key inputs #:allow-other-keys)
10080 (setenv "CONFIG_SHELL" (which "bash"))
10081 (setenv "LIBEV_EMBED" "false")
10082 (setenv "CARES_EMBED" "false")
10083 (setenv "EMBED" "false")
10085 ;; Prevent building bundled libev.
10086 (substitute* "setup.py"
10087 (("run_make=_BUILDING")
10090 (let ((greenlet (string-append
10091 (assoc-ref inputs "python-greenlet")
10093 (match (scandir greenlet
10095 (string-prefix? "python" item)))
10097 (setenv "C_INCLUDE_PATH"
10098 (string-append greenlet "/" python)))))
10100 (add-before 'check 'skip-timer-test
10102 ;; XXX: Skip 'TestTimerResolution', which appears to be
10104 (substitute* "src/greentest/test__core_timer.py"
10105 (("not greentest.RUNNING_ON_CI") "False"))
10109 ;; Make sure the build directory is on PYTHONPATH.
10110 (setenv "PYTHONPATH"
10112 (getenv "PYTHONPATH") ":"
10114 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10115 (with-directory-excursion "src/greentest"
10116 ;; XXX: Many tests require network access. Instead we only
10117 ;; run known-good tests. Unfortunately we cannot use
10118 ;; recursion here since this directory also contains
10119 ;; Python-version-specific subfolders.
10120 (apply invoke "python" "testrunner.py" "--config"
10121 "known_failures.py"
10122 (scandir "." (cut regexp-exec
10123 (make-regexp "test_+(subprocess|core)")
10126 `(("python-greenlet" ,python-greenlet)
10127 ("python-objgraph" ,python-objgraph)))
10129 `(("python-six" ,python-six)))
10131 `(("c-ares" ,c-ares)
10133 (home-page "http://www.gevent.org/")
10134 (synopsis "Coroutine-based network library")
10136 "gevent is a coroutine-based Python networking library that uses greenlet
10137 to provide a high-level synchronous API on top of the libev event loop.")
10138 (license license:expat)
10139 (properties `((python2-variant . ,(delay python2-gevent))))))
10141 (define-public python2-gevent
10142 (let ((base (package-with-python2
10143 (strip-python2-variant python-gevent))))
10146 (native-inputs `(,@(package-native-inputs python-gevent)
10147 ("python-mock" ,python2-mock))))))
10149 (define-public python-fastimport
10151 (name "python-fastimport")
10156 (uri (pypi-uri "fastimport" version))
10158 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10159 (build-system python-build-system)
10160 (home-page "https://github.com/jelmer/python-fastimport")
10161 (synopsis "VCS fastimport parser and generator in Python")
10162 (description "This package provides a parser for and generator of the Git
10163 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10165 (license license:gpl2+)))
10167 (define-public python2-fastimport
10168 (package-with-python2 python-fastimport))
10170 (define-public python-twisted
10172 (name "python-twisted")
10176 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10179 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10180 (build-system python-build-system)
10182 '(#:tests? #f)) ; FIXME: some tests fail
10184 `(("python-zope-interface" ,python-zope-interface)
10185 ("python-pyhamcrest" ,python-pyhamcrest)
10186 ("python-incremental" ,python-incremental)
10187 ("python-hyperlink" ,python-hyperlink)
10188 ("python-constantly" ,python-constantly)
10189 ("python-automat" ,python-automat)))
10190 (home-page "https://twistedmatrix.com/")
10191 (synopsis "Asynchronous networking framework written in Python")
10193 "Twisted is an extensible framework for Python programming, with special
10194 focus on event-based network programming and multiprotocol integration.")
10195 (license license:expat)))
10197 (define-public python2-twisted
10198 (package-with-python2 python-twisted))
10200 (define-public python-pika
10202 (name "python-pika")
10207 (uri (pypi-uri "pika" version))
10210 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10211 (build-system python-build-system)
10213 `(("python-pyev" ,python-pyev)
10214 ("python-tornado" ,python-tornado)
10215 ("python-twisted" ,python-twisted)))
10216 (home-page "https://pika.readthedocs.org")
10217 (synopsis "Pure Python AMQP Client Library")
10219 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10220 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10221 network support library.")
10222 (license license:bsd-3)))
10224 (define-public python2-pika
10225 (package-with-python2 python-pika))
10227 (define-public python-ply
10229 (name "python-ply")
10234 (uri (pypi-uri "ply" version))
10237 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10238 (build-system python-build-system)
10239 (home-page "http://www.dabeaz.com/ply/")
10240 (synopsis "Python Lex & Yacc")
10241 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10242 It uses LR parsing and does extensive error checking.")
10243 (license license:bsd-3)))
10245 (define-public python2-ply
10246 (package-with-python2 python-ply))
10248 (define-public python-tabulate
10250 (name "python-tabulate")
10254 (uri (pypi-uri "tabulate" version))
10257 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10258 (build-system python-build-system)
10260 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10261 ;; and the latest release is not tagged in the upstream repository.
10263 (home-page "https://bitbucket.org/astanin/python-tabulate")
10264 (synopsis "Pretty-print tabular data")
10266 "Tabulate is a library and command-line utility to pretty-print tabular
10268 (license license:expat)))
10270 (define-public python2-tabulate
10271 (package-with-python2 python-tabulate))
10273 (define-public python-kazoo
10275 (name "python-kazoo")
10280 (uri (pypi-uri "kazoo" version))
10283 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10284 (build-system python-build-system)
10285 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10287 `(("python-six" ,python-six)))
10288 (home-page "https://kazoo.readthedocs.org")
10289 (synopsis "High-level Zookeeper client library")
10291 "Kazoo is a Python client library for the Apache Zookeeper distributed
10292 application service. It is designed to be easy to use and to avoid common
10293 programming errors.")
10294 (license license:asl2.0)))
10296 (define-public python2-kazoo
10297 (package-with-python2 python-kazoo))
10299 (define-public python-pykafka
10301 (name "python-pykafka")
10305 (uri (pypi-uri "pykafka" version))
10308 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10309 (build-system python-build-system)
10310 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10312 `(("python-gevent" ,python-gevent)
10313 ("python-kazoo" ,python-kazoo)
10314 ("python-tabulate" ,python-tabulate)))
10316 `(("librdkafka" ,librdkafka)))
10317 (home-page "https://pykafka.readthedocs.io/")
10318 (synopsis "Apache Kafka client for Python")
10320 "PyKafka is a client for the Apache Kafka distributed messaging system.
10321 It includes Python implementations of Kafka producers and consumers, which
10322 are optionally backed by a C extension built on librdkafka.")
10323 (license license:asl2.0)))
10325 (define-public python2-pykafka
10326 (package-with-python2 python-pykafka))
10328 (define-public python-wcwidth
10330 (name "python-wcwidth")
10335 (uri (pypi-uri "wcwidth" version))
10338 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10339 (build-system python-build-system)
10340 (home-page "https://github.com/jquast/wcwidth")
10341 (synopsis "Measure number of terminal column cells of wide-character codes")
10342 (description "Wcwidth measures the number of terminal column cells of
10343 wide-character codes. It is useful for those implementing a terminal emulator,
10344 or programs that carefully produce output to be interpreted by one. It is a
10345 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10346 specified in POSIX.1-2001 and POSIX.1-2008.")
10347 (license license:expat)))
10349 (define-public python2-wcwidth
10350 (package-with-python2 python-wcwidth))
10352 (define-public python2-jsonrpclib
10354 (name "python2-jsonrpclib")
10358 (uri (pypi-uri "jsonrpclib" version))
10361 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10362 (build-system python-build-system)
10365 #:python ,python-2))
10366 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10367 (synopsis "Implementation of JSON-RPC specification for Python")
10369 "This library is an implementation of the JSON-RPC specification.
10370 It supports both the original 1.0 specification, as well as the
10371 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10373 (license license:asl2.0)))
10375 (define-public python-chai
10377 (name "python-chai")
10381 (uri (pypi-uri "chai" version))
10384 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10385 (build-system python-build-system)
10386 (home-page "https://github.com/agoragames/chai")
10387 (synopsis "Mocking framework for Python")
10389 "Chai provides an api for mocking, stubbing and spying your python
10390 objects, patterned after the Mocha library for Ruby.")
10391 (license license:bsd-3)))
10393 (define-public python2-chai
10394 (package-with-python2 python-chai))
10396 (define-public python-inflection
10398 (name "python-inflection")
10401 (origin (method url-fetch)
10402 (uri (pypi-uri "inflection" version))
10405 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10406 (build-system python-build-system)
10408 `(("python-pytest" ,python-pytest)))
10409 (home-page "https://github.com/jpvanhal/inflection")
10410 (synopsis "Python string transformation library")
10412 "Inflection is a string transformation library. It singularizes
10413 and pluralizes English words, and transforms strings from CamelCase to
10414 underscored string.")
10415 (license license:expat)))
10417 (define-public python2-inflection
10418 (package-with-python2 python-inflection))
10420 (define-public python-pylev
10422 (name "python-pylev")
10426 (uri (pypi-uri "pylev" version))
10429 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10430 (build-system python-build-system)
10431 (home-page "https://github.com/toastdriven/pylev")
10432 (synopsis "Levenshtein distance implementation in Python")
10433 (description "Pure Python Levenshtein implementation, based off the
10434 Wikipedia code samples at
10435 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10436 (license license:bsd-3)))
10438 (define-public python2-pylev
10439 (package-with-python2 python-pylev))
10441 (define-public python-cleo
10443 (name "python-cleo")
10447 (uri (pypi-uri "cleo" version))
10450 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10451 (build-system python-build-system)
10454 ("python-mock" ,python-mock)
10455 ("python-pytest-mock" ,python-pytest-mock)
10456 ("python-pytest" ,python-pytest)))
10458 `(("python-backpack" ,python-backpack)
10459 ("python-pastel" ,python-pastel)
10460 ("python-pylev" ,python-pylev)))
10461 (home-page "https://github.com/sdispater/cleo")
10462 (synopsis "Command-line arguments library for Python")
10464 "Cleo allows you to create command-line commands with signature in
10465 docstring and colored output.")
10466 (license license:expat)))
10468 (define-public python2-cleo
10469 (package-with-python2 python-cleo))
10471 (define-public python-lazy-object-proxy
10473 (name "python-lazy-object-proxy")
10477 (uri (pypi-uri "lazy-object-proxy" version))
10480 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10481 (build-system python-build-system)
10482 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10483 (synopsis "Lazy object proxy for python")
10485 "Lazy object proxy is an object that wraps a callable but defers the call
10486 until the object is actually required, and caches the result of said call.")
10487 (license license:bsd-2)))
10489 (define-public python2-lazy-object-proxy
10490 (package-with-python2 python-lazy-object-proxy))
10492 (define-public python-dnspython
10494 (name "python-dnspython")
10498 (uri (string-append "http://www.dnspython.org/kits/"
10499 version "/dnspython-" version ".tar.gz"))
10502 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10503 (build-system python-build-system)
10504 (arguments '(#:tests? #f)) ; XXX: requires internet access
10505 (home-page "http://www.dnspython.org")
10506 (synopsis "DNS toolkit for Python")
10508 "dnspython is a DNS toolkit for Python. It supports almost all record
10509 types. It can be used for queries, zone transfers, and dynamic updates.
10510 It supports TSIG authenticated messages and EDNS0.")
10511 (license license:expat)))
10513 (define-public python2-dnspython
10514 (package-with-python2 python-dnspython))
10516 (define-public python-email-validator
10518 (name "python-email-validator")
10521 (origin (method url-fetch)
10522 (uri (pypi-uri "email_validator" version))
10525 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10526 (build-system python-build-system)
10529 (modify-phases %standard-phases
10530 (add-before 'build 'use-dnspython
10532 (substitute* "setup.py"
10533 (("dnspython3") "dnspython"))
10536 `(("python-dnspython" ,python-dnspython)
10537 ("python-idna" ,python-idna)))
10538 (home-page "https://github.com/JoshData/python-email-validator")
10539 (synopsis "Email address validation library for Python")
10541 "This library validates email address syntax and deliverability.")
10542 (license license:cc0)))
10544 (define-public python2-email-validator
10545 (package-with-python2 python-email-validator))
10547 (define-public python-ukpostcodeparser
10549 (name "python-ukpostcodeparser")
10553 (uri (pypi-uri "UkPostcodeParser" version))
10556 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10557 (build-system python-build-system)
10558 (home-page "https://github.com/hamstah/ukpostcodeparser")
10559 (synopsis "UK Postcode parser for Python")
10561 "This library provides the @code{parse_uk_postcode} function for
10562 parsing UK postcodes.")
10563 (license license:expat)))
10565 (define-public python2-ukpostcodeparser
10566 (package-with-python2 python-ukpostcodeparser))
10568 (define-public python-faker
10570 (name "python-faker")
10574 (uri (pypi-uri "Faker" version))
10577 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10579 (search-patches "python-faker-fix-build-32bit.patch"))
10580 (modules '((guix build utils)))
10583 (for-each delete-file (find-files "." "\\.pyc$"))
10585 (build-system python-build-system)
10588 (modify-phases %standard-phases
10590 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10593 ("python-email-validator" ,python-email-validator)
10594 ("python-mock" ,python-mock)
10595 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10597 `(("python-dateutil" ,python-dateutil)
10598 ("python-six" ,python-six)))
10599 (home-page "https://github.com/joke2k/faker")
10600 (synopsis "Python package that generates fake data")
10602 "Faker is a Python package that generates fake data such as names,
10603 addresses, and phone numbers.")
10604 (license license:expat)
10605 (properties `((python2-variant . ,(delay python2-faker))))))
10607 (define-public python2-faker
10608 (let ((base (package-with-python2 (strip-python2-variant
10613 `(("python2-ipaddress" ,python2-ipaddress)
10614 ,@(package-propagated-inputs base))))))
10616 (define-public python-pyaml
10618 (name "python-pyaml")
10619 (version "18.11.0")
10622 (uri (pypi-uri "pyaml" version))
10625 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10626 (build-system python-build-system)
10628 `(("python-unidecode" ,python-unidecode)))
10630 `(("python-pyyaml" ,python-pyyaml)))
10631 (home-page "https://github.com/mk-fg/pretty-yaml")
10632 (synopsis "YAML pretty-print library for Python")
10634 "pyaml is a PyYAML based python module to produce pretty and readable
10635 YAML-serialized data.")
10636 (license license:wtfpl2)))
10638 (define-public python2-pyaml
10639 (package-with-python2 python-pyaml))
10641 (define-public python-backpack
10643 (name "python-backpack")
10648 (uri (pypi-uri "backpack" version))
10651 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10652 (build-system python-build-system)
10654 `(("python-pytest" ,python-pytest)
10655 ("python-nose" ,python-nose)))
10657 `(("python-simplejson" ,python-simplejson)))
10658 (home-page "https://github.com/sdispater/backpack")
10659 (synopsis "Utilities for working with Python collections")
10660 (description "Backpack provides some useful utilities for working with
10661 collections of data.")
10662 (license license:expat)))
10664 (define-public python2-backpack
10665 (package-with-python2 python-backpack))
10667 (define-public python-prompt-toolkit
10669 (name "python-prompt-toolkit")
10674 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10677 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10678 (build-system python-build-system)
10681 (modify-phases %standard-phases
10683 (add-after 'install 'post-install-check
10684 (lambda* (#:key inputs outputs #:allow-other-keys)
10685 ;; HOME is needed for the test
10686 ;; "test_pathcompleter_can_expanduser".
10687 (setenv "HOME" "/tmp")
10688 (add-installed-pythonpath inputs outputs)
10689 (invoke "py.test"))))))
10691 `(("python-wcwidth" ,python-wcwidth)
10692 ("python-six" ,python-six)
10693 ("python-pygments" ,python-pygments)))
10695 `(("python-pytest" ,python-pytest)))
10696 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10697 (synopsis "Library for building command line interfaces in Python")
10699 "Prompt-Toolkit is a library for building interactive command line
10700 interfaces in Python. It's like GNU Readline but it also features syntax
10701 highlighting while typing, out-of-the-box multi-line input editing, advanced
10702 code completion, incremental search, support for Chinese double-width
10703 characters, mouse support, and auto suggestions.")
10704 (license license:bsd-3)))
10706 (define-public python2-prompt-toolkit
10707 (package-with-python2 python-prompt-toolkit))
10709 (define-public python-prompt-toolkit-1
10710 (package (inherit python-prompt-toolkit)
10715 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10718 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10720 (define-public python2-prompt-toolkit-1
10721 (package-with-python2 python-prompt-toolkit-1))
10723 (define-public python-jedi
10725 (name "python-jedi")
10730 (uri (pypi-uri "jedi" version))
10733 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10734 (build-system python-build-system)
10737 (modify-phases %standard-phases
10738 (add-after 'unpack 'disable-file-completion-test
10739 ;; A single parameterized test currently fail (see:
10740 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10742 (substitute* "test/test_api/test_completion.py"
10743 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10747 (setenv "HOME" "/tmp")
10748 (invoke "python" "-m" "pytest"))))))
10750 `(("python-pytest" ,python-pytest)
10751 ("python-docopt" ,python-docopt)))
10753 `(("python-parso" ,python-parso)))
10754 (home-page "https://github.com/davidhalter/jedi")
10755 (synopsis "Autocompletion and static analysis library for Python")
10757 "Jedi is a static analysis tool for Python that can be used in Integrated
10758 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10759 on a deeper level than many other static analysis frameworks for Python.
10761 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10763 (license license:expat)))
10765 (define-public python2-jedi
10766 (package-with-python2 python-jedi))
10768 (define-public ptpython
10774 (uri (pypi-uri "ptpython" version))
10777 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10778 (build-system python-build-system)
10780 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10782 `(("python-docopt" ,python-docopt)
10783 ("python-jedi" ,python-jedi)
10784 ("python-prompt-toolkit" ,python-prompt-toolkit)
10785 ("python-pygments" ,python-pygments)))
10786 (home-page "https://github.com/jonathanslenders/ptpython")
10787 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10789 "ptpython is a Python read-eval-print loop with IDE-like features.
10790 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10791 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10793 (license license:bsd-3)
10794 (properties `((python2-variant . ,(delay ptpython-2))))))
10796 (define-public ptpython-2
10797 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10800 (name "ptpython2"))))
10802 (define-public python-stem
10804 (name "python-stem")
10809 (uri (pypi-uri "stem" version))
10812 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10813 (build-system python-build-system)
10816 (modify-phases %standard-phases
10819 (invoke "./run_tests.py" "--unit")
10822 `(("python-mock" ,python-mock)
10823 ("python-pycodestyle" ,python-pycodestyle)
10824 ("python-pyflakes" ,python-pyflakes)))
10825 (home-page "https://stem.torproject.org/")
10827 "Python controller library that allows applications to interact with Tor")
10829 "Stem is a Python controller library for Tor. With it you can use Tor's
10830 control protocol to script against the Tor process and read descriptor data
10831 relays publish about themselves.")
10832 (license license:lgpl3)))
10834 (define-public python2-stem
10835 (package-with-python2 python-stem))
10837 (define-public python-pyserial
10839 (name "python-pyserial")
10844 (uri (pypi-uri "pyserial" version))
10847 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10848 (build-system python-build-system)
10850 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10852 ;; (modify-phases %standard-phases
10855 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10857 "https://github.com/pyserial/pyserial")
10858 (synopsis "Python Serial Port Bindings")
10859 (description "@code{pyserial} provide serial port bindings for Python. It
10860 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10861 and/or Xon/Xoff. The port is accessed in RAW mode.")
10862 (license license:bsd-3)))
10864 (define-public python2-pyserial
10865 (package-with-python2 python-pyserial))
10867 (define-public python-kivy
10869 (name "python-kivy")
10874 (uri (pypi-uri "Kivy" version))
10875 (file-name (string-append name "-" version ".tar.gz"))
10878 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10879 (build-system python-build-system)
10881 `(#:tests? #f ; Tests require many optional packages
10883 (modify-phases %standard-phases
10884 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10885 (lambda* (#:key inputs #:allow-other-keys)
10886 (setenv "KIVY_SDL2_PATH"
10887 (string-append (assoc-ref inputs "sdl-union")
10892 ("pkg-config" ,pkg-config)
10893 ("python-cython" ,python-cython)))
10895 `(("gstreamer" ,gstreamer)
10898 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10899 (home-page "http://kivy.org")
10901 "Multitouch application framework")
10903 "A software library for rapid development of
10904 hardware-accelerated multitouch applications.")
10905 (license license:expat)))
10907 (define-public python2-kivy
10908 (package-with-python2 python-kivy))
10910 (define-public python-kivy-next
10911 (deprecated-package "python-kivy-next" python-kivy))
10913 (define-public python2-kivy-next
10914 (deprecated-package "python2-kivy-next" python2-kivy))
10916 (define-public python-binaryornot
10918 (name "python-binaryornot")
10922 (uri (pypi-uri "binaryornot" version))
10925 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10926 (build-system python-build-system)
10928 `(("python-chardet" ,python-chardet)
10929 ("python-hypothesis" ,python-hypothesis)))
10930 (home-page "https://github.com/audreyr/binaryornot")
10931 (synopsis "Package to check if a file is binary or text")
10932 (description "Ultra-lightweight pure Python package to check if a file is
10934 (license license:bsd-3)
10935 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10937 (define-public python2-binaryornot
10938 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10939 (package (inherit base)
10941 `(("python2-enum34" ,python2-enum34)
10942 ,@(package-propagated-inputs base))))))
10944 (define-public python-binwalk
10945 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
10948 (name "python-binwalk")
10949 (version (git-version "2.1.1" revision commit))
10953 (uri (git-reference
10954 (url "https://github.com/ReFirmLabs/binwalk")
10956 (file-name (git-file-name name version))
10959 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
10960 (build-system python-build-system)
10963 (modify-phases %standard-phases
10964 (add-before 'check 'set-pythonpath
10966 (setenv "PYTHONPATH"
10969 ":" (getenv "PYTHONPATH")))
10973 `(("python-coverage" ,python-coverage)
10974 ("python-nose" ,python-nose)))
10975 (home-page "https://github.com/ReFirmLabs/binwalk")
10976 (synopsis "Firmware analysis tool")
10977 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
10978 (license license:expat))))
10980 (define-public python-nltk
10982 (name "python-nltk")
10986 (uri (pypi-uri "nltk" version))
10989 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10990 (build-system python-build-system)
10992 '(;; The tests require some extra resources to be downloaded.
10993 ;; TODO Try packaging these resources.
10995 (home-page "http://nltk.org/")
10996 (synopsis "Natural Language Toolkit")
10997 (description "It provides interfaces to over 50 corpora and lexical
10998 resources such as WordNet, along with a suite of text processing libraries
10999 for classification, tokenization, stemming, tagging, parsing, and semantic
11000 reasoning, wrappers for natural language processing libraries.")
11001 (license license:asl2.0)))
11003 (define-public python2-nltk
11004 (package-with-python2 python-nltk))
11006 (define-public python-pymongo
11008 (name "python-pymongo")
11012 (uri (pypi-uri "pymongo" version))
11015 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11016 (build-system python-build-system)
11018 `(("python-certifi" ,python-certifi)))
11019 (home-page "https://github.com/mongodb/mongo-python-driver")
11020 (synopsis "Python driver for MongoDB")
11021 (description "Python driver for MongoDB.")
11022 (license license:asl2.0)))
11024 (define-public python2-pymongo
11025 (package-with-python2 python-pymongo))
11027 (define-public python-consul
11029 (name "python-consul")
11034 (uri (pypi-uri "python-consul" version))
11037 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11038 (build-system python-build-system)
11040 '(#:tests? #f)) ; The tests are not distributed
11042 `(("python-requests" ,python-requests)
11043 ("python-six" ,python-six)))
11044 (home-page "https://github.com/cablehead/python-consul")
11045 (synopsis "Python client for Consul")
11047 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11048 discovery, monitoring and configuration.")
11049 (license license:expat)))
11051 (define-public python2-consul
11052 (package-with-python2 python-consul))
11054 (define-public python-schematics
11056 (name "python-schematics")
11061 (uri (git-reference
11062 (url "https://github.com/schematics/schematics.git")
11063 (commit (string-append "v" version))))
11064 (file-name (git-file-name name version))
11066 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11067 (build-system python-build-system)
11069 `(("python-six" ,python-six)))
11071 ;; The tests require a bunch of not very nice packages with fixed
11072 ;; version requirements (e.g. python-coveralls).
11074 (home-page "https://github.com/schematics/schematics")
11075 (synopsis "Python Data Structures for Humans")
11076 (description "Python Data Structures for Humans.")
11077 (license license:bsd-3)))
11079 (define-public python2-schematics
11080 (package-with-python2 python-schematics))
11082 (define-public python-odfpy
11084 (name "python-odfpy")
11088 (uri (pypi-uri "odfpy" version))
11091 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11093 `(#:modules ((srfi srfi-1)
11094 (guix build python-build-system)
11095 (guix build utils))
11097 (modify-phases %standard-phases
11099 ;; The test runner invokes python2 and python3 for test*.py.
11100 ;; To avoid having both in inputs, we replicate it here.
11102 (for-each (lambda (test-file) (invoke "python" test-file))
11103 (find-files "tests" "^test.*\\.py$"))
11105 (build-system python-build-system)
11106 (home-page "https://github.com/eea/odfpy")
11107 (synopsis "Python API and tools to manipulate OpenDocument files")
11108 (description "Collection of libraries and utility programs written in
11109 Python to manipulate OpenDocument 1.2 files.")
11111 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11112 ;; number of files with other licenses.
11113 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11115 (define-public python2-odfpy
11116 (package-with-python2 python-odfpy))
11118 (define-public python-natsort
11120 (name "python-natsort")
11124 (uri (pypi-uri "natsort" version))
11127 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11128 (build-system python-build-system)
11130 `(#:modules ((guix build utils)
11131 (guix build python-build-system)
11136 (modify-phases %standard-phases
11137 (add-before 'check 'set-cachedir
11138 ;; Tests require write access to $HOME by default
11139 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11142 (let ((cwd (getcwd)))
11143 (setenv "PYTHONPATH"
11146 (find (cut string-prefix? "lib" <>)
11147 (scandir (string-append cwd "/build")))
11149 (getenv "PYTHONPATH")))
11150 (invoke "pytest" "-v")))))))
11152 `(("python-hypothesis" ,python-hypothesis)
11153 ("python-pytest-cov" ,python-pytest-cov)
11154 ("python-pytest-mock" ,python-pytest-mock)
11155 ("python-pytest" ,python-pytest)))
11156 (propagated-inputs ; TODO: Add python-fastnumbers.
11157 `(("python-pyicu" ,python-pyicu)))
11158 (home-page "https://github.com/SethMMorton/natsort")
11159 (synopsis "Natural sorting for python and shell")
11161 "Natsort lets you apply natural sorting on lists instead of
11162 lexicographical. If you use the built-in @code{sorted} method in python
11163 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11164 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11165 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11166 identifies numbers and sorts them separately from strings. It can also sort
11167 version numbers, real numbers, mixed types and more, and comes with a shell
11168 command @command{natsort} that exposes this functionality in the command line.")
11169 (license license:expat)
11170 (properties `((python2-variant . ,(delay python2-natsort))))))
11172 (define-public python2-natsort
11173 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11174 (package (inherit base)
11176 `(("python2-pathlib" ,python2-pathlib)
11177 ,@(package-native-inputs base))))))
11179 (define-public python-glances
11181 (name "python-glances")
11186 (uri (pypi-uri "Glances" version))
11189 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11190 (modules '((guix build utils)))
11193 ;; Glances phones PyPI for weekly update checks by default.
11194 ;; Disable these. The user can re-enable them if desired.
11195 (substitute* "glances/outdated.py"
11196 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11197 (string-append indentation
11198 "self.args.disable_check_update = True\n"
11201 (build-system python-build-system)
11203 `(("python-future" ,python-future)
11204 ("python-psutil" ,python-psutil)))
11206 "https://github.com/nicolargo/glances")
11207 (synopsis "Cross-platform curses-based monitoring tool")
11209 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11210 Glances uses the PsUtil library to get information from your system. It
11211 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11212 (license license:lgpl3+)))
11214 (define-public python2-glances
11215 (package-with-python2 python-glances))
11217 (define-public python-graphql-core
11219 (name "python-graphql-core")
11224 (uri (pypi-uri "graphql-core" version))
11227 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11228 (build-system python-build-system)
11230 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11232 (modify-phases %standard-phases
11233 (add-after 'unpack 'patch-hardcoded-version
11234 (lambda _ (substitute*
11236 (("'gevent==1.1rc1'") "'gevent'"))
11239 `(("python-gevent" ,python-gevent)
11240 ("python-mock" ,python-mock)
11241 ("python-pytest-mock" ,python-pytest-mock)))
11243 `(("python-promise" ,python-promise)
11244 ("python-six" ,python-six)))
11245 (home-page "https://github.com/graphql-python/graphql-core")
11246 (synopsis "GraphQL implementation for Python")
11248 "GraphQL implementation for Python. GraphQL is a data query language and
11249 runtime designed and used to request and deliver data to mobile and web apps.
11250 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11252 (license license:expat)))
11254 (define-public python2-graphql-core
11255 (package-with-python2 python-graphql-core))
11257 (define-public python-graphql-relay
11259 (name "python-graphql-relay")
11264 (uri (pypi-uri "graphql-relay" version))
11267 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11268 (build-system python-build-system)
11270 '(#:tests? #f)) ; The tests are not distributed
11272 `(("python-graphql-core" ,python-graphql-core)
11273 ("python-promise" ,python-promise)
11274 ("python-six" ,python-six)))
11275 (home-page "https://github.com/graphql-python/graphql-relay-py")
11276 (synopsis "Relay implementation for Python")
11278 "This is a library to allow the easy creation of Relay-compliant servers
11279 using the GraphQL Python reference implementation of a GraphQL server. It
11280 should be noted that the code is a exact port of the original
11281 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11283 (license license:expat)))
11285 (define-public python2-graphql-relay
11286 (package-with-python2 python-graphql-relay))
11288 (define-public python-graphene
11290 (name "python-graphene")
11295 (uri (pypi-uri "graphene" version))
11298 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11299 (build-system python-build-system)
11301 `(("python-graphql-core" ,python-graphql-core)
11302 ("python-graphql-relay" ,python-graphql-relay)
11303 ("python-iso8601" ,python-iso8601)
11304 ("python-promise" ,python-promise)
11305 ("python-six" ,python-six)))
11307 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11308 (home-page "http://graphene-python.org/")
11309 (synopsis "GraphQL Framework for Python")
11311 "Graphene is a Python library for building GraphQL schemas/types.
11312 A GraphQL schema describes your data model, and provides a GraphQL server
11313 with an associated set of resolve methods that know how to fetch data.")
11314 (properties `((python2-variant . ,(delay python2-graphene))))
11315 (license license:expat)))
11317 (define-public python2-graphene
11318 (let ((base (package-with-python2
11319 (strip-python2-variant python-graphene))))
11320 (package (inherit base)
11322 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11323 ,@(package-native-inputs base))))))
11325 (define-public python-nautilus
11327 (name "python-nautilus")
11332 (uri (pypi-uri "nautilus" version))
11335 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11336 (build-system python-build-system)
11337 (arguments `(#:tests? #f)) ; fails to import test modules
11339 `(("python-bcrypt" ,python-bcrypt)
11340 ("python-click" ,python-click)
11341 ("python-consul" ,python-consul)
11342 ("python-graphene" ,python-graphene)
11343 ("python-jinja2" ,python-jinja2)
11344 ("python-peewee" ,python-peewee)
11345 ("python-pika" ,python-pika)
11346 ("python-tornado" ,python-tornado)
11347 ("python-wtforms" ,python-wtforms)))
11349 `(("python-nose2" ,python-nose2)))
11350 (home-page "https://github.com/AlecAivazis/nautilus")
11351 (synopsis "Library for creating microservice applications")
11353 "Nautilus is a framework for flux based microservices that looks to
11354 provide extendible implementations of common aspects of a cloud so that you can
11355 focus on building massively scalable web applications.")
11356 (license license:expat)))
11358 (define-public python-snowballstemmer
11360 (name "python-snowballstemmer")
11364 (uri (pypi-uri "snowballstemmer" version))
11367 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11368 (build-system python-build-system)
11370 `(;; No tests exist
11372 (home-page "https://github.com/shibukawa/snowball_py")
11373 (synopsis "Snowball stemming library collection for Python")
11374 (description "This package provides 16 word stemmer algorithms generated
11375 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11377 (license license:bsd-3)))
11379 (define-public python2-snowballstemmer
11380 (package-with-python2 python-snowballstemmer))
11382 (define-public python-setproctitle
11384 (name "python-setproctitle")
11389 (uri (pypi-uri "setproctitle" version))
11392 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11393 (build-system python-build-system)
11396 (modify-phases %standard-phases
11397 (add-before 'check 'patch-Makefile
11398 ;; Stricly this is only required for the python2 variant.
11399 ;; But adding a phase in an inherited package seems to be
11400 ;; cumbersum. So we patch even for python3.
11402 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11404 (substitute* "Makefile"
11405 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11406 (string-append nose "/bin/nosetests "))))
11410 (setenv "PYTHON" (or (which "python3") (which "python")))
11411 (setenv "PYCONFIG" (or (which "python3-config")
11412 (which "python-config")))
11413 (setenv "CC" "gcc")
11414 ;; No need to extend PYTHONPATH to find the built package, since
11415 ;; the Makefile will build anyway
11416 (invoke "make" "check"))))))
11418 `(("procps" ,procps))) ; required for tests
11420 "https://github.com/dvarrazzo/py-setproctitle")
11422 "Setproctitle implementation for Python to customize the process title")
11423 (description "The library allows a process to change its title (as displayed
11424 by system tools such as ps and top).
11426 Changing the title is mostly useful in multi-process systems, for
11427 example when a master process is forked: changing the children's title
11428 allows to identify the task each process is busy with. The technique
11429 is used by PostgreSQL and the OpenSSH Server for example.")
11430 (license license:bsd-3)
11431 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11433 (define-public python2-setproctitle
11434 (let ((base (package-with-python2
11435 (strip-python2-variant python-setproctitle))))
11438 (native-inputs `(("python2-nose" ,python2-nose)
11439 ,@(package-native-inputs base))))))
11441 (define-public python-validictory
11443 (name "python-validictory")
11448 (uri (pypi-uri "validictory" version))
11451 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11452 (build-system python-build-system)
11455 (modify-phases %standard-phases
11456 (add-after 'unpack 'bootstrap
11457 ;; Move the tests out of the package directory to avoid
11460 (rename-file "validictory/tests" "tests")
11461 (delete-file "tests/__init__.py")))
11464 ;; Extend PYTHONPATH so the built package will be found.
11465 (setenv "PYTHONPATH"
11466 (string-append (getcwd) "/build/lib:"
11467 (getenv "PYTHONPATH")))
11468 (invoke "py.test" "-vv" ))))))
11470 `(("python-pytest" ,python-pytest)))
11472 "https://github.com/jamesturk/validictory")
11473 (synopsis "General purpose Python data validator")
11474 (description "It allows validation of arbitrary Python data structures.
11476 The schema format is based on the JSON Schema
11477 proposal (http://json-schema.org), so combined with json the library is also
11478 useful as a validator for JSON data.")
11479 (license license:expat)))
11481 (define-public python2-validictory
11482 (package-with-python2 python-validictory))
11484 (define-public python-pyelftools
11486 (name "python-pyelftools")
11491 (uri (pypi-uri "pyelftools" version))
11494 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11495 (build-system python-build-system)
11498 (modify-phases %standard-phases
11499 (add-before 'check 'set-pythonpath
11501 (setenv "PYTHONPATH"
11504 ":" (getenv "PYTHONPATH")))
11507 "https://github.com/eliben/pyelftools")
11509 "Analyze binary and library file information")
11510 (description "This Python library provides interfaces for parsing and
11511 analyzing two binary and library file formats; the Executable and Linking
11512 Format (ELF), and debugging information in the Debugging With Attributed
11513 Record Format (DWARF).")
11514 (license license:public-domain)))
11516 (define-public python-pyev
11518 (name "python-pyev")
11523 (uri (pypi-uri "pyev" version))
11526 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11527 (build-system python-build-system)
11529 `(#:tests? #f ; no test suite
11531 (modify-phases %standard-phases
11532 (add-after 'unpack 'patch
11533 (lambda* (#:key inputs #:allow-other-keys)
11534 (let ((libev (string-append (assoc-ref inputs "libev")
11535 "/lib/libev.so.4")))
11536 (substitute* "setup.py"
11537 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11538 (string-append "libev_dll_name = \"" libev "\"")))))))))
11540 `(("libev" ,libev)))
11541 (home-page "http://pythonhosted.org/pyev/")
11542 (synopsis "Python libev interface")
11543 (description "Pyev provides a Python interface to libev.")
11544 (license license:gpl3)))
11546 (define-public python2-pyev
11547 (package-with-python2 python-pyev))
11549 (define-public python-imagesize
11551 (name "python-imagesize")
11556 (uri (pypi-uri "imagesize" version))
11559 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11560 (build-system python-build-system)
11561 (home-page "https://github.com/shibukawa/imagesize_py")
11562 (synopsis "Gets image size of files in various formats in Python")
11564 "This package allows determination of image size from
11565 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11566 (license license:expat)))
11568 (define-public python2-imagesize
11569 (package-with-python2 python-imagesize))
11571 (define-public python-termstyle
11573 (name "python-termstyle")
11578 (uri (pypi-uri "termstyle" version))
11581 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11582 (build-system python-build-system)
11585 (modify-phases %standard-phases
11588 (invoke "python" "test3.py"))))))
11589 (home-page "https://github.com/gfxmonk/termstyle")
11590 (synopsis "Console text coloring for Python")
11591 (description "This package provides console text coloring for Python.")
11592 (license license:bsd-3)))
11594 (define-public python-argcomplete
11596 (name "python-argcomplete")
11601 (uri (pypi-uri "argcomplete" version))
11604 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11605 (build-system python-build-system)
11607 `(("python-pexpect" ,python-pexpect)
11609 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11610 (home-page "https://github.com/kislyuk/argcomplete")
11611 (synopsis "Shell tab completion for Python argparse")
11612 (description "argcomplete provides extensible command line tab completion
11613 of arguments and options for Python scripts using @code{argparse}. It's
11614 particularly useful for programs with many options or sub-parsers that can
11615 dynamically suggest completions; for example, when browsing resources over the
11617 (license license:asl2.0)))
11619 (define-public python2-argcomplete
11620 (package-with-python2 python-argcomplete))
11622 (define-public python-xopen
11624 (name "python-xopen")
11629 (uri (pypi-uri "xopen" version))
11632 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11633 (build-system python-build-system)
11635 `(("python-setuptools-scm" ,python-setuptools-scm)))
11636 (home-page "https://github.com/marcelm/xopen/")
11637 (synopsis "Open compressed files transparently")
11638 (description "This module provides an @code{xopen} function that works like
11639 Python's built-in @code{open} function, but can also deal with compressed files.
11640 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11641 recognized by their file extensions. The focus is on being as efficient as
11642 possible on all supported Python versions.")
11643 (license license:expat)))
11645 (define-public python2-xopen
11646 (let ((base (package-with-python2
11647 (strip-python2-variant python-xopen))))
11650 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11651 ,@(package-propagated-inputs base))))))
11653 (define-public python-cheetah
11655 (name "python-cheetah")
11660 (uri (pypi-uri "Cheetah3" version))
11663 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11664 (build-system python-build-system)
11666 `(#:modules ((guix build utils)
11667 (guix build python-build-system)
11671 #:phases (modify-phases %standard-phases
11672 (add-after 'unpack 'use-absolute-python
11674 (substitute* "Cheetah/CheetahWrapper.py"
11675 (("#!/usr/bin/env python")
11676 (string-append "#!" (which "python"))))
11680 (let ((cwd (getcwd)))
11681 (setenv "PYTHONPATH"
11684 (find (cut string-prefix? "lib" <>)
11685 (scandir (string-append cwd "/build")))
11686 ":" (getenv "PYTHONPATH")))
11688 (string-append (getenv "PATH")
11690 (setenv "TMPDIR" "/tmp")
11692 (substitute* "Cheetah/Tests/Test.py"
11693 (("unittest.TextTestRunner\\(\\)")
11694 "unittest.TextTestRunner(verbosity=2)"))
11696 (invoke "python" "Cheetah/Tests/Test.py")))))))
11698 `(("python-markdown" ,python-markdown))) ;optional
11699 (home-page "http://cheetahtemplate.org/")
11700 (synopsis "Template engine")
11701 (description "Cheetah is a text-based template engine and Python code
11704 Cheetah can be used as a standalone templating utility or referenced as
11705 a library from other Python applications. It has many potential uses,
11706 but web developers looking for a viable alternative to ASP, JSP, PHP and
11707 PSP are expected to be its principle user group.
11711 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11713 @item Cleanly separates content, graphic design, and program code.
11714 @item Blends the power and flexibility of Python with a simple template language
11715 that non-programmers can understand.
11716 @item Gives template writers full access to any Python data structure, module,
11717 function, object, or method in their templates.
11718 @item Makes code reuse easy by providing an object-orientated interface to
11719 templates that is accessible from Python code or other Cheetah templates.
11720 One template can subclass another and selectively reimplement sections of it.
11721 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11722 improve the performance of a dynamic website.
11723 @item Compiles templates into optimized, yet readable, Python code.
11725 (license (license:x11-style "file://LICENSE"))))
11727 (define-public python2-cheetah
11728 (package-with-python2 python-cheetah))
11730 (define-public python-dulwich
11732 (name "python-dulwich")
11737 (uri (list (string-append "https://www.dulwich.io/releases/"
11738 "dulwich-" version ".tar.gz")
11739 (pypi-uri "dulwich" version)))
11742 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11743 (build-system python-build-system)
11746 (modify-phases %standard-phases
11747 (add-before 'check 'fix-tests
11748 (lambda* (#:key inputs #:allow-other-keys)
11749 ;; The tests use Popen with a custom environment which doesn't
11751 (substitute* "dulwich/tests/compat/utils.py"
11752 (("'git'") (string-append "'"
11755 (substitute* '("dulwich/tests/test_repository.py"
11756 "dulwich/tests/test_hooks.py")
11757 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11758 (setenv "TEST_RUNNER" "unittest")
11759 (setenv "PYTHONHASHSEED" "random")
11762 `(("python-fastimport" ,python-fastimport)))
11764 `(("python-mock" ,python-mock)
11765 ("python-geventhttpclient" ,python-geventhttpclient)
11767 (home-page "https://www.dulwich.io/")
11768 (synopsis "Git implementation in Python")
11769 (description "Dulwich is an implementation of the Git file formats and
11770 protocols written in pure Python.")
11771 ;; Can be used with either license.
11772 (license (list license:asl2.0 license:gpl2+))))
11774 (define-public python2-dulwich
11775 (package-with-python2 python-dulwich))
11777 (define-public python-pbkdf2
11779 (name "python-pbkdf2")
11784 (uri (pypi-uri "pbkdf2" version))
11787 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11788 (build-system python-build-system)
11791 (modify-phases %standard-phases
11794 (setenv "PYTHONPATH"
11795 (string-append (getcwd) "/build/lib:"
11796 (getenv "PYTHONPATH")))
11797 (invoke "python" "test/test_pbkdf2.py"))))))
11799 `(("python-pycrypto" ,python-pycrypto))) ; optional
11800 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11801 (synopsis "Password-based key derivation")
11802 (description "This module implements the password-based key derivation
11803 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11805 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11806 is part of the RSA Public Key Cryptography Standards series. The provided
11807 implementation takes a password or a passphrase and a salt value (and
11808 optionally a iteration count, a digest module, and a MAC module) and provides
11809 a file-like object from which an arbitrarly-sized key can be read.")
11810 (license license:expat)))
11812 (define-public python2-pbkdf2
11813 (package-with-python2 python-pbkdf2))
11815 (define-public python-qrcode
11817 (name "python-qrcode")
11822 (uri (pypi-uri "qrcode" version))
11824 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11825 (build-system python-build-system)
11827 ;; FIXME: Tests require packaging 'pymaging'.
11830 `(("python-lxml" ,python-lxml) ; for SVG output
11831 ("python-pillow" ,python-pillow) ; for PNG output
11832 ("python-six" ,python-six)))
11833 (home-page "https://github.com/lincolnloop/python-qrcode")
11834 (synopsis "QR Code image generator")
11835 (description "This package provides a pure Python QR Code generator
11836 module. It uses the Python Imaging Library (PIL) to allow for the generation
11839 In addition this package provides a command line tool to generate QR codes and
11840 either write these QR codes to a file or do the output as ascii art at the
11842 (license license:bsd-3)))
11844 (define-public python2-qrcode
11845 (package-with-python2 python-qrcode))
11847 (define-public python-rst2ansi
11849 (name "python-rst2ansi")
11854 (uri (pypi-uri "rst2ansi" version))
11857 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11858 (build-system python-build-system)
11860 `(("python-docutils" ,python-docutils)))
11861 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11862 (synopsis "Convert RST to ANSI-decorated console output")
11864 "Python module dedicated to rendering RST (reStructuredText) documents
11865 to ansi-escaped strings suitable for display in a terminal.")
11866 (license license:expat)))
11868 (define-public python-ansi2html
11870 (name "python-ansi2html")
11875 (uri (pypi-uri "ansi2html" version))
11878 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11879 (build-system python-build-system)
11881 `(("python-mock" ,python-mock)
11882 ("python-nose" ,python-nose)))
11884 `(("python-six" ,python-six)))
11885 (home-page "https://github.com/ralphbean/ansi2html")
11886 (synopsis "Convert ANSI-decorated console output to HTML")
11888 "@command{ansi2html} is a Python library and command line utility for
11889 convering text with ANSI color codes to HTML or LaTeX.")
11890 (license license:gpl3+)))
11892 (define-public python2-ansi2html
11893 (package-with-python2 python-ansi2html))
11895 (define-public python-ddt
11897 (name "python-ddt")
11902 (uri (pypi-uri "ddt" version))
11905 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11906 (build-system python-build-system)
11908 `(("python-mock" ,python-mock)
11909 ("python-nose" ,python-nose)))
11911 `(("python-six" ,python-six)
11912 ("python-pyyaml" ,python-pyyaml)))
11913 (home-page "https://github.com/txels/ddt")
11914 (synopsis "Data-Driven Tests")
11916 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11917 running it with different test data, and make it appear as multiple test
11919 (license license:expat)))
11921 (define-public python2-ddt
11922 (package-with-python2 python-ddt))
11924 (define-public python-pycountry
11926 (name "python-pycountry")
11927 (version "18.5.26")
11931 (uri (pypi-uri "pycountry" version))
11934 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11935 (build-system python-build-system)
11936 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11937 (synopsis "ISO databases for languages, countries, currencies, etc.")
11939 "@code{pycountry} provides the ISO databases for the standards:
11941 @item 639-3 (Languages)
11942 @item 3166 (Countries)
11943 @item 3166-3 (Deleted Countries)
11944 @item 3166-2 (Subdivisions of countries)
11945 @item 4217 (Currencies)
11946 @item 15924 (Scripts)
11948 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11949 through a Python API.")
11950 (license license:lgpl2.1+)))
11952 (define-public python2-pycountry
11953 (package-with-python2 python-pycountry))
11955 (define-public python-pycosat
11957 (name "python-pycosat")
11962 (uri (pypi-uri "pycosat" version))
11965 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11966 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11967 (build-system python-build-system)
11968 (home-page "https://github.com/ContinuumIO/pycosat")
11969 (synopsis "Bindings to picosat (a SAT solver)")
11971 "This package provides efficient Python bindings to @code{picosat} on
11972 the C level. When importing pycosat, the @code{picosat} solver becomes part
11973 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11974 Problem} (SAT) solver.")
11975 (license license:expat)))
11977 (define-public python2-pycosat
11978 (package-with-python2 python-pycosat))
11980 (define-public python2-ruamel.ordereddict
11982 (name "python2-ruamel.ordereddict")
11987 (uri (pypi-uri "ruamel.ordereddict" version))
11990 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11991 (build-system python-build-system)
11993 `(#:python ,python-2
11995 (modify-phases %standard-phases
11997 (add-after 'install 'check
11998 (lambda* (#:key inputs outputs #:allow-other-keys)
11999 (add-installed-pythonpath inputs outputs)
12000 (invoke "python" "test/testordereddict.py"))))))
12001 (home-page "https://bitbucket.org/ruamel/ordereddict")
12002 (synopsis "Version of dict that keeps keys in insertion order")
12004 "This is an implementation of an ordered dictionary with @dfn{Key
12005 Insertion Order} (KIO: updates of values do not affect the position of the
12006 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12007 removed and put at the back). The standard library module @code{OrderedDict},
12008 implemented later, implements a subset of @code{ordereddict} functionality.
12009 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12010 Order} (KSO, no sorting function can be specified, but a transform can be
12011 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12012 (license license:expat)))
12014 (define-public python-pypeg2
12016 (name "python-pypeg2")
12021 (uri (pypi-uri "pyPEG2" version))
12024 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12025 (build-system python-build-system)
12026 (propagated-inputs `(("python-lxml" ,python-lxml)))
12028 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12030 (home-page "https://fdik.org/pyPEG/")
12031 (synopsis "Parsering Expression Grammars in Python")
12032 (description "PyPEG is an intrinsic parser interpreter framework for
12033 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12034 parse many formal languages.")
12035 (license license:gpl2)))
12037 (define-public python-incremental
12039 (name "python-incremental")
12044 (uri (pypi-uri "incremental" version))
12047 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12048 (build-system python-build-system)
12049 (home-page "https://github.com/hawkowl/incremental")
12050 (synopsis "Library for versioning Python projects")
12051 (description "Incremental is a small library that versions your Python
12053 (license license:expat)))
12055 (define-public python2-incremental
12056 (package-with-python2 python-incremental))
12058 (define-public python-invoke
12060 (name "python-invoke")
12061 (home-page "http://www.pyinvoke.org/")
12065 (uri (pypi-uri "invoke" version))
12068 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12069 (build-system python-build-system)
12071 ;; XXX: Requires many dependencies that are not yet in Guix.
12073 (synopsis "Pythonic task execution")
12075 "Invoke is a Python task execution tool and library, drawing inspiration
12076 from various sources to arrive at a powerful and clean feature set. It is
12077 evolved from the Fabric project, but focuses on local and abstract concerns
12078 instead of servers and network commands.")
12079 (license license:bsd-3)))
12081 (define-public python2-invoke
12082 (package-with-python2 python-invoke))
12084 (define-public python-automat
12086 (name "python-automat")
12090 (uri (pypi-uri "Automat" version))
12093 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12094 (build-system python-build-system)
12095 ;; We disable the tests because they require python-twisted, while
12096 ;; python-twisted depends on python-automat. Twisted is optional, but the
12097 ;; tests fail if it is not available. Also see
12098 ;; <https://github.com/glyph/automat/issues/71>.
12099 (arguments '(#:tests? #f))
12101 `(("python-m2r" ,python-m2r)
12102 ("python-setuptools-scm" ,python-setuptools-scm)
12103 ("python-graphviz" ,python-graphviz)))
12105 `(("python-six" ,python-six)
12106 ("python-attrs" ,python-attrs)))
12107 (home-page "https://github.com/glyph/Automat")
12108 (synopsis "Self-service finite-state machines")
12109 (description "Automat is a library for concise, idiomatic Python
12110 expression of finite-state automata (particularly deterministic finite-state
12112 (license license:expat)))
12114 (define-public python2-automat
12115 (package-with-python2 python-automat))
12117 (define-public python-m2r
12119 (name "python-m2r")
12123 (uri (pypi-uri "m2r" version))
12126 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12127 (build-system python-build-system)
12129 `(("python-docutils" ,python-docutils)
12130 ("python-mistune" ,python-mistune)))
12132 `(("python-pygments" ,python-pygments)
12133 ("python-mock" ,python-mock)))
12134 (home-page "https://github.com/miyakogi/m2r")
12135 (synopsis "Markdown to reStructuredText converter")
12136 (description "M2R converts a markdown file including reST markups to valid
12138 (license license:expat)))
12140 (define-public python2-m2r
12141 (package-with-python2 python-m2r))
12143 (define-public python-constantly
12145 (name "python-constantly")
12149 (uri (pypi-uri "constantly" version))
12152 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12153 (build-system python-build-system)
12154 (home-page "https://github.com/twisted/constantly")
12155 (synopsis "Symbolic constants in Python")
12156 (description "Constantly is a Python library that provides symbolic
12157 constant support. It includes collections and constants with text, numeric,
12158 and bit flag values.")
12159 (license license:expat)))
12161 (define-public python2-constantly
12162 (package-with-python2 python-constantly))
12164 (define-public python-attrs
12166 (name "python-attrs")
12170 (uri (pypi-uri "attrs" version))
12173 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12174 (build-system python-build-system)
12176 `(#:modules ((guix build utils)
12177 (guix build python-build-system)
12181 #:phases (modify-phases %standard-phases
12184 (let ((cwd (getcwd)))
12185 (setenv "PYTHONPATH"
12188 (find (cut string-prefix? "lib" <>)
12189 (scandir (string-append cwd "/build")))
12191 (getenv "PYTHONPATH")))
12192 (invoke "python" "-m" "pytest")))))))
12194 `(("python-coverage" ,python-coverage)
12195 ("python-hypothesis" ,python-hypothesis)
12196 ("python-pympler" ,python-pympler)
12197 ("python-pytest" ,python-pytest)
12198 ("python-six" ,python-six)
12199 ("python-sphinx" ,python-sphinx)
12200 ("python-zope-interface" ,python-zope-interface)))
12201 (home-page "https://github.com/python-attrs/attrs/")
12202 (synopsis "Attributes without boilerplate")
12203 (description "@code{attrs} is a Python package with class decorators that
12204 ease the chores of implementing the most common attribute-related object
12206 (license license:expat)))
12208 (define-public python2-attrs
12209 (package-with-python2 python-attrs))
12211 (define-public python-attrs-bootstrap
12213 (inherit python-attrs)
12214 (name "python-attrs-bootstrap")
12215 (native-inputs `())
12216 (arguments `(#:tests? #f))))
12218 (define-public python2-attrs-bootstrap
12219 (package-with-python2 python-attrs-bootstrap))
12221 (define-public python2-cliapp
12223 (name "python2-cliapp")
12224 (version "1.20180812.1")
12228 (uri (string-append
12229 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12230 version ".tar.gz"))
12233 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12234 (build-system python-build-system)
12236 `(#:python ,python-2
12238 (modify-phases %standard-phases
12239 ;; check phase needs to be run before the build phase. If not,
12240 ;; coverage-test-runner looks for tests for the built source files,
12243 (add-before 'build 'check
12245 ;; Disable python3 tests
12246 (substitute* "check"
12247 (("python3") "# python3"))
12248 (invoke "./check"))))))
12250 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12251 ("python2-pep8" ,python2-pep8)))
12253 `(("python2-pyaml" ,python2-pyaml)))
12254 (home-page "https://liw.fi/cliapp/")
12255 (synopsis "Python framework for command line programs")
12256 (description "@code{python2-cliapp} is a python framework for
12257 command line programs. It contains the typical stuff such programs
12258 need to do, such as parsing the command line for options, and
12259 iterating over input files.")
12260 (license license:gpl2+)))
12262 (define-public python2-ttystatus
12264 (name "python2-ttystatus")
12269 (uri (string-append
12270 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12271 version ".tar.gz"))
12274 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12275 (build-system python-build-system)
12277 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12278 ("python2-pep8" ,python2-pep8)))
12280 `(#:python ,python-2
12282 (modify-phases %standard-phases
12283 ;; check phase needs to be run before the build phase. If not,
12284 ;; coverage-test-runner looks for tests for the built source files,
12287 (add-before 'build 'check
12288 (lambda _ (invoke "make" "check"))))))
12289 (home-page "https://liw.fi/ttystatus/")
12290 (synopsis "Python library for showing progress reporting and
12291 status updates on terminals")
12292 (description "@code{python2-ttystatus} is a python library for
12293 showing progress reporting and status updates on terminals, for
12294 command line programs. Output is automatically adapted to the width
12295 of the terminal: truncated if it does not fit, and resized if the
12296 terminal size changes.")
12297 (license license:gpl3+)))
12299 (define-public python2-tracing
12301 (name "python2-tracing")
12306 (uri (string-append
12307 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12308 version ".tar.gz"))
12311 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12312 (build-system python-build-system)
12314 `(#:python ,python-2))
12315 (home-page "https://liw.fi/tracing/")
12316 (synopsis "Python debug logging helper")
12317 (description "@code{python2-tracing} is a python library for
12318 logging debug messages. It provides a way to turn debugging messages
12319 on and off, based on the filename they occur in. It is much faster
12320 than using @code{logging.Filter} to accomplish the same thing, which
12321 matters when code is run in production mode. The actual logging still
12322 happens using the @code{logging} library.")
12323 (license license:gpl3+)))
12325 (define-public python2-larch
12327 (name "python2-larch")
12328 (version "1.20151025")
12332 (uri (string-append
12333 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12334 version ".tar.gz"))
12335 (patches (search-patches
12336 "python2-larch-coverage-4.0a6-compatibility.patch"))
12339 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12340 (build-system python-build-system)
12342 `(#:python ,python-2
12344 (modify-phases %standard-phases
12345 ;; check phase needs to be run before the build phase. If not,
12346 ;; coverage-test-runner looks for tests for the built source files,
12349 (add-before 'build 'check
12350 (lambda _ (invoke "make" "check"))))))
12352 `(("cmdtest" ,cmdtest)
12353 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12355 `(("python2-tracing" ,python2-tracing)))
12356 (home-page "https://liw.fi/larch/")
12357 (synopsis "Python copy-on-write B-tree library")
12358 (description "@code{python2-larch} is an implementation of
12359 particular kind of B-tree, based on research by Ohad Rodeh. See
12360 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12361 on the data structure.
12363 The distinctive feature of this B-tree is that a node is never
12364 (conceptually) modified. Instead, all updates are done by
12365 copy-on-write. This makes it easy to clone a tree, and modify only the
12366 clone, while other processes access the original tree.")
12367 (license license:gpl3+)))
12369 (define-public python-astroid
12371 (name "python-astroid")
12376 (uri (pypi-uri "astroid" version))
12379 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12380 (build-system python-build-system)
12382 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12383 ("python-six" ,python-six)
12384 ("python-wrapt" ,python-wrapt)))
12386 `(("python-dateutil" ,python-dateutil)
12387 ("python-nose" ,python-nose)
12388 ("python-pytest" ,python-pytest)
12389 ("python-pytest-runner" ,python-pytest-runner)))
12392 (modify-phases %standard-phases
12393 (add-after 'unpack 'remove-spurious-test
12395 ;; This can be removed after upgrading from python-3.7
12396 ;; https://github.com/PyCQA/astroid/issues/593
12397 ;; https://bugs.python.org/issue34056
12398 (delete-file "astroid/tests/unittest_modutils.py")
12402 (invoke "pytest" "astroid"))))))
12403 (home-page "https://github.com/PyCQA/astroid")
12404 (synopsis "Common base representation of python source code for pylint and
12406 (description "@code{python-astroid} provides a common base representation
12407 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12409 It provides a compatible representation which comes from the _ast module. It
12410 rebuilds the tree generated by the builtin _ast module by recursively walking
12411 down the AST and building an extended ast. The new node classes have
12412 additional methods and attributes for different usages. They include some
12413 support for static inference and local name scopes. Furthermore, astroid
12414 builds partial trees by inspecting living objects.")
12415 (license license:lgpl2.1+)
12416 (properties `((python2-variant . ,(delay python2-astroid))))))
12418 (define-public python2-astroid
12419 (let ((base (package-with-python2
12420 (strip-python2-variant python-astroid))))
12421 (package (inherit base)
12422 ;; Version 2.x removes python2 support.
12427 (uri (pypi-uri "astroid" version))
12430 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12432 (substitute-keyword-arguments (package-arguments base)
12434 `(modify-phases ,phases
12435 (add-after 'unpack 'remove-spurious-test
12437 ;; https://github.com/PyCQA/astroid/issues/276
12438 (delete-file "astroid/tests/unittest_brain.py")
12442 (invoke"python" "-m" "unittest" "discover"
12443 "-p" "unittest*.py")))))))
12444 (native-inputs `())
12446 `(("python2-backports-functools-lru-cache"
12447 ,python2-backports-functools-lru-cache)
12448 ("python2-enum34" ,python2-enum34)
12449 ("python2-singledispatch" ,python2-singledispatch)
12450 ,@(package-propagated-inputs base))))))
12452 (define-public python-isort
12454 (name "python-isort")
12459 (uri (git-reference
12460 ;; Tests pass only from the Github sources
12461 (url "https://github.com/timothycrosley/isort")
12463 (file-name (git-file-name name version))
12466 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12467 (build-system python-build-system)
12469 `(("python-mock" ,python-mock)
12470 ("python-pytest" ,python-pytest)))
12471 (home-page "https://github.com/timothycrosley/isort")
12472 (synopsis "Python utility/library to sort python imports")
12473 (description "@code{python-isort} is a python utility/library to sort
12474 imports alphabetically, and automatically separated into sections. It
12475 provides a command line utility, a python library and plugins for various
12477 (license license:expat)
12478 (properties `((python2-variant . ,(delay python2-isort))))))
12480 (define-public python2-isort
12481 (let ((base (package-with-python2
12482 (strip-python2-variant python-isort))))
12483 (package (inherit base)
12485 `(("python2-futures" ,python2-futures)
12486 ,@(package-native-inputs base))))))
12488 (define-public python2-backports-functools-lru-cache
12490 (name "python2-backports-functools-lru-cache")
12495 ;; only the pypi tarballs contain the necessary metadata
12496 (uri (pypi-uri "backports.functools_lru_cache" version))
12499 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12500 (build-system python-build-system)
12502 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12504 `(#:python ,python-2))
12505 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12506 (synopsis "Backport of functools.lru_cache from Python 3.3")
12507 (description "@code{python2-backports-functools-lru-cache} is a backport
12508 of @code{functools.lru_cache} from python 3.3.")
12509 (license license:expat)))
12511 (define-public python-configparser
12513 (name "python-configparser")
12518 (uri (pypi-uri "configparser" version))
12521 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12522 (build-system python-build-system)
12523 (home-page "https://github.com/jaraco/configparser/")
12524 (synopsis "Backport of configparser from python 3.5")
12525 (description "@code{python-configparser} is a backport of
12526 @code{configparser} from Python 3.5 so that it can be used directly
12527 in other versions.")
12528 (license license:expat)))
12530 (define-public python2-configparser
12531 (package-with-python2 python-configparser))
12533 (define-public python-mando
12535 (name "python-mando")
12539 (uri (pypi-uri "mando" version))
12542 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12543 (build-system python-build-system)
12545 `(("python-rst2ansi" ,python-rst2ansi)
12546 ("python-six" ,python-six)))
12548 `(("python-pytest" ,python-pytest)))
12549 (home-page "https://mando.readthedocs.org/")
12551 "Wrapper around argparse, allowing creation of complete CLI applications")
12553 "This package is a wrapper around argparse, allowing you to write complete CLI
12554 applications in seconds while maintaining all the flexibility.")
12555 (license license:expat)))
12557 (define-public python2-mando
12558 (package-with-python2 python-mando))
12560 (define-public python2-argparse
12562 (name "python2-argparse")
12567 (uri (pypi-uri "argparse" version))
12570 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12571 (build-system python-build-system)
12573 `(#:python ,python-2))
12574 (home-page "https://github.com/ThomasWaldmann/argparse/")
12575 (synopsis "Python command-line parsing library")
12577 "This package is mostly for people who want to have @code{argparse} on
12578 older Pythons because it was not part of the standard library back then.")
12579 (license license:psfl)))
12581 (define-public python-fudge
12583 (name "python-fudge")
12584 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12585 ;; package, which is currently the only use of this package.
12590 (uri (pypi-uri "fudge" version))
12593 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12594 (build-system python-build-system)
12596 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12597 (home-page "https://github.com/fudge-py/fudge")
12598 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12600 "Fudge is a Python module for using fake objects (mocks and stubs) to
12603 In readable Python code, you declare the methods available on your fake object
12604 and how they should be called. Then you inject that into your application and
12605 start testing. This declarative approach means you don’t have to record and
12606 playback actions and you don’t have to inspect your fakes after running code.
12607 If the fake object was used incorrectly then you’ll see an informative
12608 exception message with a traceback that points to the culprit.")
12609 (license license:expat)))
12611 (define-public python2-fudge
12612 (package-with-python2 python-fudge))
12614 (define-public python-mwclient
12616 (name "python-mwclient")
12621 ;; The PyPI version wouldn't contain tests.
12622 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12623 "v" version ".tar.gz"))
12624 (file-name (string-append name "-" version ".tar.gz"))
12627 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12628 (build-system python-build-system)
12630 `(("python-requests" ,python-requests)
12631 ("python-requests-oauthlib"
12632 ,python-requests-oauthlib)
12633 ("python-six" ,python-six)))
12635 `(("python-mock" ,python-mock)
12636 ("python-pytest" ,python-pytest)
12637 ("python-pytest-pep8" ,python-pytest-pep8)
12638 ("python-pytest-cache" ,python-pytest-cache)
12639 ("python-pytest-cov" ,python-pytest-cov)
12640 ("python-responses" ,python-responses)))
12641 (home-page "https://github.com/btongminh/mwclient")
12642 (synopsis "MediaWiki API client")
12643 (description "This package provides a MediaWiki API client.")
12644 (license license:expat)))
12646 (define-public python2-mwclient
12647 (package-with-python2 python-mwclient))
12649 (define-public python-utils
12651 (name "python-utils")
12655 (uri (pypi-uri "python-utils" version))
12658 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12659 (build-system python-build-system)
12661 `(("pytest-runner" ,python-pytest-runner)
12662 ("pytest" ,python-pytest)
12663 ("six" ,python-six)))
12664 (home-page "https://github.com/WoLpH/python-utils")
12665 (synopsis "Convenient utilities not included with the standard Python install")
12667 "Python Utils is a collection of small Python functions and classes which
12668 make common patterns shorter and easier.")
12669 (license license:bsd-2)))
12671 (define-public python2-utils
12672 (package-with-python2 python-utils))
12674 (define-public python-diff-match-patch
12676 (name "python-diff-match-patch")
12677 (version "20121119")
12681 (uri (pypi-uri "diff-match-patch" version))
12684 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12685 (build-system python-build-system)
12686 (home-page "https://code.google.com/p/google-diff-match-patch")
12687 (synopsis "Synchronize plain text")
12688 (description "Diff Match and Patch libraries offer robust algorithms to
12689 perform the operations required for synchronizing plain text.")
12690 (license license:asl2.0)))
12692 (define-public python2-diff-match-patch
12693 (package-with-python2 python-diff-match-patch))
12695 (define-public python-dirsync
12697 (name "python-dirsync")
12702 (uri (pypi-uri "dirsync" version))
12705 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12706 (build-system python-build-system)
12708 `(("six" ,python-six)))
12709 (home-page "https://bitbucket.org/tkhyn/dirsync")
12710 (synopsis "Advanced directory tree synchronisation tool")
12711 (description "Advanced directory tree synchronisation tool.")
12712 (license license:expat)))
12714 (define-public python2-dirsync
12715 (package-with-python2 python-dirsync))
12717 (define-public python-levenshtein
12719 (name "python-levenshtein")
12724 (uri (pypi-uri "python-Levenshtein" version))
12727 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12728 (build-system python-build-system)
12729 (home-page "https://github.com/ztane/python-Levenshtein")
12730 (synopsis "Fast computation of Levenshtein distance and string similarity")
12732 "The Levenshtein Python C extension module contains functions for fast computation of
12734 @item Levenshtein (edit) distance, and edit operations
12735 @item string similarity
12736 @item approximate median strings, and generally string averaging
12737 @item string sequence and set similarity
12739 It supports both normal and Unicode strings.")
12740 (license license:gpl2+)))
12742 (define-public python2-levenshtein
12743 (package-with-python2 python-levenshtein))
12745 (define-public python-scandir
12747 (name "python-scandir")
12752 (uri (pypi-uri "scandir" version))
12754 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12755 (build-system python-build-system)
12757 `(#:phases (modify-phases %standard-phases
12760 (invoke "python" "test/run_tests.py"))))))
12761 (home-page "https://github.com/benhoyt/scandir")
12762 (synopsis "Directory iteration function")
12764 "Directory iteration function like os.listdir(), except that instead of
12765 returning a list of bare filenames, it yields DirEntry objects that include
12766 file type and stat information along with the name. Using scandir() increases
12767 the speed of os.walk() by 2-20 times (depending on the platform and file
12768 system) by avoiding unnecessary calls to os.stat() in most cases.
12770 This package is part of the Python standard library since version 3.5.")
12771 (license license:bsd-3)))
12773 (define-public python2-scandir
12774 (package-with-python2 python-scandir))
12776 (define-public python2-stemming
12778 (name "python2-stemming")
12783 (uri (pypi-uri "stemming" version))
12785 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12786 (build-system python-build-system)
12788 `(#:python ,python-2))
12789 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12790 (synopsis "Python implementations of various stemming algorithms")
12792 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12793 stemming algorithms for English. These implementations are straightforward and
12794 efficient, unlike some Python versions of the same algorithms available on the
12795 Web. This package is an extraction of the stemming code included in the Whoosh
12797 (license license:public-domain)))
12799 (define-public python-factory-boy
12801 (name "python-factory-boy")
12806 (uri (pypi-uri "factory_boy" version))
12808 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12809 (build-system python-build-system)
12811 ;; Tests are not included in the tarball.
12814 `(("faker" ,python-faker)))
12815 (home-page "https://github.com/benhoyt/scandir")
12816 (synopsis "Versatile test fixtures replacement")
12818 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12820 As a fixtures replacement tool, it aims to replace static, hard to maintain
12821 fixtures with easy-to-use factories for complex object.
12823 Instead of building an exhaustive test setup with every possible combination
12824 of corner cases, factory_boy allows you to use objects customized for the
12825 current test, while only declaring the test-specific fields")
12826 (license license:expat)))
12828 (define-public python2-factory-boy
12829 (package-with-python2 python-factory-boy))
12831 (define-public python-translate-toolkit
12833 (name "python-translate-toolkit")
12838 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12840 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12841 (build-system python-build-system)
12843 `(("python-pytest" ,python-pytest)
12844 ("python-sphinx" ,python-sphinx)))
12846 `(("python-babel" ,python-babel)
12847 ("python-beautifulsoup4" ,python-beautifulsoup4)
12848 ("python-chardet" ,python-chardet)
12849 ("python-diff-match-patch" ,python-diff-match-patch)
12850 ("python-levenshtein" ,python-levenshtein)
12851 ("python-lxml" ,python-lxml)
12852 ("python-six" ,python-six)
12853 ("python-vobject" ,python-vobject)
12854 ("python-pyyaml" ,python-pyyaml)))
12856 ;; TODO: tests are not run, because they end with
12857 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12859 ;; during test setup.
12861 (home-page "https://toolkit.translatehouse.org")
12862 (synopsis "Tools and API for translation and localization engineering")
12864 "Tools and API for translation and localization engineering. It contains
12865 several utilities, as well as an API for building localization tools.")
12866 (license license:gpl2+)))
12868 (define-public python2-translate-toolkit
12869 (package-with-python2 python-translate-toolkit))
12871 (define-public python-packaging
12873 (name "python-packaging")
12878 (uri (pypi-uri "packaging" version))
12881 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12882 (build-system python-build-system)
12884 `(#:phases (modify-phases %standard-phases
12886 (lambda _ (invoke "py.test" "-vv"))))))
12888 `(("python-pretend" ,python-pretend)
12889 ("python-pytest" ,python-pytest)))
12891 `(("python-pyparsing" ,python-pyparsing)
12892 ("python-six" ,python-six)))
12893 (home-page "https://github.com/pypa/packaging")
12894 (synopsis "Core utilities for Python packages")
12895 (description "Packaging is a Python module for dealing with Python packages.
12896 It offers an interface for working with package versions, names, and dependency
12898 ;; From 'LICENSE': This software is made available under the terms of
12899 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12900 ;; Contributions to this software is made under the terms of *both* these
12902 (license (list license:asl2.0 license:bsd-2))))
12904 (define-public python2-packaging
12905 (package-with-python2 python-packaging))
12907 (define-public python-relatorio
12909 (name "python-relatorio")
12914 (uri (pypi-uri "relatorio" version))
12917 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12918 (build-system python-build-system)
12920 `(("python-lxml" ,python-lxml)
12921 ("python-genshi" ,python-genshi)))
12923 `(("python-magic" ,python-magic)))
12924 (home-page "https://relatorio.tryton.org/")
12925 (synopsis "Templating library able to output ODT and PDF files")
12926 (description "Relatorio is a templating library which provides a way to
12927 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12928 for more filetypes can be easily added by creating plugins for them.")
12929 (license license:gpl3+)))
12931 (define-public python2-relatorio
12932 (package-with-python2 python-relatorio))
12934 (define-public python-radon
12936 (name "python-radon")
12941 (uri (pypi-uri "radon" version))
12944 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12945 (build-system python-build-system)
12947 `(#:phases (modify-phases %standard-phases
12950 (invoke "python" "radon/tests/run.py"))))))
12952 `(("python-colorama" ,python-colorama)
12953 ("python-flake8-polyfill" ,python-flake8-polyfill)
12954 ("python-mando" ,python-mando)))
12956 `(("python-pytest" ,python-pytest)
12957 ("python-pytest-mock" ,python-pytest-mock)))
12958 (home-page "https://radon.readthedocs.org/")
12959 (synopsis "Code Metrics in Python")
12960 (description "Radon is a Python tool which computes various code metrics.
12961 Supported metrics are:
12963 @item raw metrics: SLOC, comment lines, blank lines, &c.
12964 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12965 @item Halstead metrics (all of them)
12966 @item the Maintainability Index (a Visual Studio metric)
12968 (license license:expat)))
12970 (define-public python2-radon
12971 (package-with-python2 python-radon))
12973 (define-public python-sure
12975 (name "python-sure")
12980 (uri (pypi-uri "sure" version))
12983 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12984 (build-system python-build-system)
12986 `(("python-mock" ,python-mock)
12987 ("python-six" ,python-six)))
12989 `(("python-nose" ,python-nose)))
12990 (home-page "https://github.com/gabrielfalcao/sure")
12991 (synopsis "Automated testing library in python for python")
12993 "Sure is a python library that leverages a DSL for writing assertions.
12994 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12995 (license license:gpl3+)))
12997 (define-public python2-sure
12998 (package-with-python2 python-sure))
13000 (define-public python2-couleur
13001 ;; This package does not seem to support python3 at all, hence,
13002 ;; only the python2 variant definition is provided.
13004 (name "python2-couleur")
13009 (uri (pypi-uri "couleur" version))
13012 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13013 (build-system python-build-system)
13015 `(#:python ,python-2))
13016 (home-page "https://github.com/gabrielfalcao/couleur")
13018 "ANSI terminal tool for python, colored shell and other handy fancy features")
13020 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13021 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13022 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13023 ;; https://github.com/gabrielfalcao/couleur/issues/11
13024 (license license:lgpl3+)))
13026 (define-public python-misaka
13028 (name "python-misaka")
13033 (uri (pypi-uri "misaka" version))
13036 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13037 (build-system python-build-system)
13039 `(;; Line 37 of setup.py calls self.run_command('develop')
13040 ;; in the 'check' phase. This command seems to be trying
13042 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13043 ;; for which it does not have the permission to write.
13046 `(("python-cffi" ,python-cffi)))
13047 (home-page "https://github.com/FSX/misaka")
13048 (synopsis "Python binding for Hoedown")
13050 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13051 library written in C. It features a fast HTML renderer and functionality to make custom
13052 renderers (e.g. man pages or LaTeX).")
13053 (license license:expat)))
13055 (define-public python2-misaka
13056 (package-with-python2 python-misaka))
13058 (define-public python2-steadymark
13059 ;; This is forced into being a python2 only variant
13060 ;; due to its dependence on couleur that has no support
13063 (name "python2-steadymark")
13068 (uri (pypi-uri "steadymark" version))
13071 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13072 (build-system python-build-system)
13074 `(("python-couleur" ,python2-couleur)
13075 ("python-sure" ,python2-sure)
13076 ("python-misaka" ,python2-misaka)))
13078 `(#:python ,python-2
13080 (modify-phases %standard-phases
13081 (add-before 'build 'patch-setup-py
13083 ;; Update requirements from dependency==version
13084 ;; to dependency>=version
13085 (substitute* "setup.py"
13088 (home-page "https://github.com/gabrielfalcao/steadymark")
13089 (synopsis "Markdown-based test runner for python")
13091 "@code{Steadymark} allows documentation to be written in github-flavoured
13092 markdown. The documentation may contain snippets of code surrounded by python
13093 code blocks and @code{Steadymark} will find these snippets and run them, making
13094 sure that there are no old malfunctional examples in the documentation examples.")
13095 (license license:expat)))
13097 (define-public python-jsonpointer
13099 (name "python-jsonpointer")
13104 (uri (pypi-uri "jsonpointer" version))
13107 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13108 (build-system python-build-system)
13109 (home-page "https://github.com/stefankoegl/python-json-pointer")
13110 (synopsis "Identify specific nodes in a JSON document")
13111 (description "@code{jsonpointer} allows you to access specific nodes
13112 by path in a JSON document (see RFC 6901).")
13113 (license license:bsd-3)))
13115 (define-public python2-jsonpointer
13116 (package-with-python2 python-jsonpointer))
13118 (define-public python-jsonpatch
13120 (name "python-jsonpatch")
13125 ;; pypi version lacks tests.js
13126 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13127 "archive/v" version ".tar.gz"))
13128 (file-name (string-append name "-" version ".tar.gz"))
13131 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13132 (build-system python-build-system)
13134 `(("python-jsonpointer" ,python-jsonpointer)))
13135 (home-page "https://github.com/stefankoegl/python-json-patch")
13136 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13137 (description "@code{jsonpatch} is a library and program that allows
13138 applying JSON Patches according to RFC 6902.")
13139 (license license:bsd-3)))
13141 (define-public python2-jsonpatch
13142 (package-with-python2 python-jsonpatch))
13144 (define-public python-jsonpatch-0.4
13145 (package (inherit python-jsonpatch)
13146 (name "python-jsonpatch")
13151 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13152 "archive/v" version ".tar.gz"))
13153 (file-name (string-append name "-" version ".tar.gz"))
13156 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13158 (define-public python2-jsonpatch-0.4
13159 (package-with-python2 python-jsonpatch-0.4))
13161 (define-public python-rfc3986
13163 (name "python-rfc3986")
13167 (uri (pypi-uri "rfc3986" version))
13170 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13171 (build-system python-build-system)
13173 `(#:modules ((guix build utils)
13174 (guix build python-build-system)
13179 (modify-phases %standard-phases
13182 (let ((cwd (getcwd)))
13183 (setenv "PYTHONPATH"
13184 (string-append cwd "/build/"
13185 (find (cut string-prefix? "lib" <>)
13186 (scandir (string-append cwd "/build")))
13188 (getenv "PYTHONPATH")))
13189 (invoke "pytest" "-v")))))))
13191 `(("python-pytest" ,python-pytest)))
13192 (home-page "https://rfc3986.readthedocs.io/")
13193 (synopsis "Parse and validate URI references")
13195 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13196 validation and authority parsing. This module also supports RFC@tie{}6874
13197 which adds support for zone identifiers to IPv6 addresses.")
13198 (license license:asl2.0)))
13200 (define-public python2-rfc3986
13201 (package-with-python2 python-rfc3986))
13203 (define-public python-rfc3987
13205 (name "python-rfc3987")
13210 (uri (pypi-uri "rfc3987" version))
13213 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13214 (build-system python-build-system)
13215 (home-page "https://pypi.python.org/pypi/rfc3987")
13216 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13217 (description "@code{rfc3987} provides routines for parsing and
13218 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13219 (license license:gpl3+)))
13221 (define-public python2-rfc3987
13222 (package-with-python2 python-rfc3987))
13224 (define-public python-validate-email
13226 (name "python-validate-email")
13231 (uri (pypi-uri "validate_email" version))
13234 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13235 (build-system python-build-system)
13236 (home-page "https://github.com/syrusakbary/validate_email")
13237 (synopsis "Verifies if an email address is valid and really exists")
13238 (description "@code{validate_email} can be used to verify if an email
13239 address is valid and really exists.")
13240 (license license:lgpl3+)))
13242 (define-public python2-validate-email
13243 (package-with-python2 python-validate-email))
13245 (define-public python-flex
13247 (name "python-flex")
13252 (uri (pypi-uri "flex" version))
13255 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13256 (build-system python-build-system)
13258 `(("python-click" ,python-click)
13259 ("python-iso8601" ,python-iso8601)
13260 ("python-jsonpointer" ,python-jsonpointer)
13261 ("python-pyyaml" ,python-pyyaml)
13262 ("python-requests" ,python-requests)
13263 ("python-rfc3987" ,python-rfc3987)
13264 ("python-six" ,python-six)
13265 ("python-validate-email" ,python-validate-email)))
13266 (home-page "https://github.com/pipermerriam/flex")
13267 (synopsis "Validates Swagger schemata")
13268 (description "@code{flex} can be used to validate Swagger schemata.")
13269 (license license:bsd-3)))
13271 (define-public python2-flex
13272 (package-with-python2 python-flex))
13274 (define-public python-marshmallow
13276 (name "python-marshmallow")
13277 (version "3.0.0b14")
13281 (uri (pypi-uri "marshmallow" version))
13284 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13285 (build-system python-build-system)
13287 `(("python-dateutil" ,python-dateutil)
13288 ("python-simplejson" ,python-simplejson)))
13290 `(("python-pytest" ,python-pytest)
13291 ("python-pytz" ,python-pytz)))
13292 (home-page "https://github.com/marshmallow-code/marshmallow")
13293 (synopsis "Convert complex datatypes to and from native
13294 Python datatypes.")
13295 (description "@code{marshmallow} provides a library for converting
13296 complex datatypes to and from native Python datatypes.")
13297 (license license:expat)))
13299 (define-public python2-marshmallow
13300 (package-with-python2 python-marshmallow))
13302 (define-public python-apispec
13304 (name "python-apispec")
13309 (uri (pypi-uri "apispec" version))
13312 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13313 (build-system python-build-system)
13315 `(("python-pyyaml" ,python-pyyaml)))
13317 `(("python-pytest" ,python-pytest)
13318 ("python-flask" ,python-flask)
13319 ("python-marshmallow" ,python-marshmallow)
13320 ("python-tornado" ,python-tornado)
13321 ("python-bottle" ,python-bottle)
13322 ("python-mock" ,python-mock)))
13323 (home-page "https://github.com/marshmallow-code/apispec")
13324 (synopsis "Swagger 2.0 API specification generator")
13325 (description "@code{python-apispec} is a pluggable API specification
13326 generator. Currently supports the OpenAPI specification (f.k.a.
13328 (license license:expat)))
13330 (define-public python2-apispec
13331 (package-with-python2 python-apispec))
13333 (define-public python-flasgger
13335 (name "python-flasgger")
13340 (uri (git-reference
13341 (url "https://github.com/rochacbruno/flasgger.git")
13343 (file-name (git-file-name name version))
13345 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13346 (build-system python-build-system)
13349 (modify-phases %standard-phases
13351 (lambda* (#:key inputs outputs #:allow-other-keys)
13352 (substitute* "Makefile"
13353 (("flake8 flasgger --ignore=F403")
13354 "flake8 flasgger --ignore=E731,F403"))
13355 (setenv "PYTHONPATH" (string-append (getcwd)
13357 (getenv "PYTHONPATH")))
13358 (invoke "py.test"))))))
13360 `(("python-flask" ,python-flask)
13361 ("python-pyyaml" ,python-pyyaml)
13362 ("python-jsonschema" ,python-jsonschema)
13363 ("python-mistune" ,python-mistune)
13364 ("python-six" ,python-six)))
13366 `(("python-decorator" ,python-decorator)
13367 ("python-flake8" ,python-flake8)
13368 ("python-flask-restful" ,python-flask-restful)
13369 ("python-flex" ,python-flex)
13370 ("python-pytest" ,python-pytest)
13371 ("python-pytest-cov" ,python-pytest-cov)
13372 ("python-marshmallow" ,python-marshmallow)
13373 ("python-apispec" ,python-apispec)))
13374 (home-page "https://github.com/rochacbruno/flasgger/")
13375 (synopsis "Extract Swagger specs from your Flask project")
13376 (description "@code{python-flasgger} allows extracting Swagger specs
13377 from your Flask project. It is a fork of Flask-Swagger.")
13378 (license license:expat)))
13380 (define-public python2-flasgger
13381 (package-with-python2 python-flasgger))
13383 (define-public python-swagger-spec-validator
13385 (name "python-swagger-spec-validator")
13390 (uri (pypi-uri "swagger-spec-validator" version))
13393 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13394 (build-system python-build-system)
13396 `(("python-jsonschema" ,python-jsonschema)
13397 ("python-pyyaml" ,python-pyyaml)
13398 ("python-six" ,python-six)))
13400 "https://github.com/Yelp/swagger_spec_validator")
13401 (synopsis "Validation of Swagger specifications")
13402 (description "@code{swagger_spec_validator} provides a library for
13403 validating Swagger API specifications.")
13404 (license license:asl2.0)))
13406 (define-public python2-swagger-spec-validator
13407 (package-with-python2 python-swagger-spec-validator))
13409 (define-public python-apache-libcloud
13411 (name "python-apache-libcloud")
13416 (uri (pypi-uri "apache-libcloud" version))
13419 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13420 (build-system python-build-system)
13423 (modify-phases %standard-phases
13424 (add-after 'unpack 'patch-ssh
13425 (lambda* (#:key inputs #:allow-other-keys)
13426 (substitute* "libcloud/compute/ssh.py"
13427 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13430 (add-after 'unpack 'patch-tests
13432 (substitute* "./libcloud/test/test_file_fixtures.py"
13433 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13434 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13435 return (httplib.OK,
13437 {\"test\": \"value\"},
13438 httplib.responses[httplib.OK])
13440 (substitute* "libcloud/test/compute/test_ssh_client.py"
13441 (("class ShellOutSSHClientTests")
13442 "@unittest.skip(\"Guix container doesn't have ssh service\")
13443 class ShellOutSSHClientTests")
13444 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13445 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13446 (("'.xF0', '.x90', '.x8D', '.x88'")
13447 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13449 (add-before 'check 'copy-secret
13451 (copy-file "libcloud/test/secrets.py-dist"
13452 "libcloud/test/secrets.py")
13455 `(("openssh" ,openssh)))
13457 `(("python-paramiko" ,python-paramiko)
13458 ("python-requests" ,python-requests)))
13460 `(("python-lockfile" ,python-lockfile)
13461 ("python-mock" ,python-mock)
13462 ("python-pytest" ,python-pytest)
13463 ("python-pytest-runner" ,python-pytest-runner)
13464 ("python-requests-mock" ,python-requests-mock)))
13465 (home-page "https://libcloud.apache.org/")
13466 (synopsis "Unified Cloud API")
13467 (description "@code{libcloud} is a Python library for interacting with
13468 many of the popular cloud service providers using a unified API.")
13469 (license license:asl2.0)))
13471 (define-public python2-apache-libcloud
13472 (package-with-python2 python-apache-libcloud))
13474 (define-public python-smmap2
13476 (name "python-smmap2")
13481 (uri (pypi-uri "smmap2" version))
13484 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13485 (build-system python-build-system)
13487 `(("python-nosexcover" ,python-nosexcover)))
13488 (home-page "https://github.com/Byron/smmap")
13489 (synopsis "Python sliding window memory map manager")
13490 (description "@code{smmap2} is a pure Python implementation of a sliding
13491 window memory map manager.")
13492 (license license:bsd-3)))
13494 (define-public python2-smmap2
13495 (package-with-python2 python-smmap2))
13497 (define-public python-regex
13499 (name "python-regex")
13500 (version "2019.04.14")
13503 (uri (pypi-uri "regex" version))
13506 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13507 ;; TODO: Fix and enable regex_test.py tests that complain about the
13508 ;; test.support module not existing.
13509 (build-system python-build-system)
13510 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13511 (synopsis "Alternative regular expression module")
13512 (description "This regular expression implementation is backwards-
13513 compatible with the standard @code{re} module, but offers additional
13514 functionality like full case-folding for case-insensitive matches in Unicode.")
13515 (license license:psfl)))
13517 (define-public python2-regex
13518 (package-with-python2 python-regex))
13520 (define-public python2-pyopengl
13522 (name "python2-pyopengl")
13527 (uri (pypi-uri "PyOpenGL" version))
13530 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13532 `(#:python ,python-2))
13533 (build-system python-build-system)
13534 (home-page "http://pyopengl.sourceforge.net")
13535 (synopsis "Standard OpenGL bindings for Python")
13537 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13538 related APIs. The binding is created using the standard @code{ctypes}
13540 (license license:bsd-3)))
13542 (define-public python2-pyopengl-accelerate
13544 (inherit python2-pyopengl)
13545 (name "python2-pyopengl-accelerate")
13550 (uri (pypi-uri "PyOpenGL-accelerate" version))
13553 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13554 (synopsis "Acceleration code for PyOpenGL")
13556 "This is the Cython-coded accelerator module for PyOpenGL.")))
13558 (define-public python-rencode
13560 (name "python-rencode")
13565 (uri (pypi-uri "rencode" version))
13568 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13569 (build-system python-build-system)
13572 (modify-phases %standard-phases
13573 (add-before 'check 'delete-bogus-test
13574 ;; This test requires /home/aresch/Downloads, which is not provided by
13575 ;; the build environment.
13577 (delete-file "rencode/t.py")
13579 (native-inputs `(("pkg-config" ,pkg-config)
13580 ("python-cython" ,python-cython)))
13581 (home-page "https://github.com/aresch/rencode")
13582 (synopsis "Serialization of heterogeneous data structures")
13584 "The @code{rencode} module is a data structure serialization library,
13585 similar to @code{bencode} from the BitTorrent project. For complex,
13586 heterogeneous data structures with many small elements, r-encoding stake up
13587 significantly less space than b-encodings. This version of rencode is a
13588 complete rewrite in Cython to attempt to increase the performance over the
13589 pure Python module.")
13590 (license license:bsd-3)))
13592 (define-public python2-rencode
13593 (package-with-python2 python-rencode))
13595 (define-public python-xenon
13597 (name "python-xenon")
13602 (uri (pypi-uri "xenon" version))
13605 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13606 (build-system python-build-system)
13608 `(("python-pyyaml" ,python-pyyaml)
13609 ("python-radon" ,python-radon)
13610 ("python-requests" ,python-requests)
13611 ("python-flake8" ,python-flake8)
13612 ("python-tox" ,python-tox)))
13615 (modify-phases %standard-phases
13616 (add-before 'build 'patch-test-requirements
13618 ;; Remove httpretty dependency for tests.
13619 (substitute* "setup.py"
13620 (("httpretty") ""))
13622 (home-page "https://xenon.readthedocs.org/")
13623 (synopsis "Monitor code metrics for Python on your CI server")
13625 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13626 Ideally, @code{xenon} is run every time code is committed. Through command
13627 line options, various thresholds can be set for the complexity of code. It
13628 will fail (i.e. it will exit with a non-zero exit code) when any of these
13629 requirements is not met.")
13630 (license license:expat)))
13632 (define-public python2-xenon
13633 (package-with-python2 python-xenon))
13635 (define-public python-pysocks
13637 (name "python-pysocks")
13642 (uri (pypi-uri "PySocks" version))
13645 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13646 (build-system python-build-system)
13647 (arguments `(#:tests? #f))
13648 (home-page "https://github.com/Anorov/PySocks")
13649 (synopsis "SOCKS client module")
13650 (description "@code{pysocks} is an updated and semi-actively maintained
13651 version of @code{SocksiPy} with bug fixes and extra features.")
13652 (license license:bsd-3)))
13654 (define-public python2-pysocks
13655 (package-with-python2 python-pysocks))
13657 (define-public python-pydiff
13659 (name "python-pydiff")
13664 (uri (pypi-uri "pydiff" version))
13667 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13668 (build-system python-build-system)
13669 (home-page "https://github.com/myint/pydiff")
13670 (synopsis "Library to diff two Python files at the bytecode level")
13672 "@code{pydiff} makes it easy to look for actual code changes while
13673 ignoring formatting changes.")
13674 (license license:expat)))
13676 (define-public python2-pydiff
13677 (package-with-python2 python-pydiff))
13679 (define-public python-tqdm
13681 (name "python-tqdm")
13686 (uri (pypi-uri "tqdm" version))
13689 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13690 (build-system python-build-system)
13692 `(("python-flake8" ,python-flake8)
13693 ("python-nose" ,python-nose)
13694 ("python-coverage" ,python-coverage)))
13695 (home-page "https://github.com/tqdm/tqdm")
13696 (synopsis "Fast, extensible progress meter")
13698 "Make loops show a progress bar on the console by just wrapping any
13699 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13700 design and layout.")
13701 (license (list license:mpl2.0 license:expat))))
13703 (define-public python2-tqdm
13704 (package-with-python2 python-tqdm))
13706 (define-public python-pkginfo
13708 (name "python-pkginfo")
13713 (uri (pypi-uri "pkginfo" version))
13716 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13717 (build-system python-build-system)
13719 ;; The tests are broken upstream.
13722 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13724 "Query metadatdata from sdists, bdists, and installed packages")
13726 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13727 source distriubtion (an sdist) or a binary distribution (e.g., created by
13728 running bdist_egg). It can also query the EGG-INFO directory of an installed
13729 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13730 created by running @code{python setup.py develop}).")
13731 (license license:expat)))
13733 (define-public python2-pkginfo
13734 (package-with-python2 python-pkginfo))
13736 (define-public python-twine
13738 (name "python-twine")
13743 (uri (pypi-uri "twine" version))
13746 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13747 (build-system python-build-system)
13749 `(("python-tqdm" ,python-tqdm)
13750 ("python-pkginfo" ,python-pkginfo)
13751 ("python-requests" ,python-requests)
13752 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13753 (home-page "https://github.com/pypa/twine")
13754 (synopsis "Collection of utilities for interacting with PyPI")
13756 "@code{twine} currently supports registering projects and uploading
13757 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13758 their files and supports any packaging format (including wheels).")
13759 (license license:asl2.0)))
13761 (define-public python2-twine
13762 (package-with-python2 python-twine))
13764 (define-public python-linecache2
13766 (name "python-linecache2")
13771 (uri (pypi-uri "linecache2" version))
13774 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13775 (build-system python-build-system)
13777 `(;; The tests depend on unittest2, and our version is a bit too old.
13780 `(("python-pbr" ,python-pbr-minimal)))
13782 "https://github.com/testing-cabal/linecache2")
13783 (synopsis "Backports of the linecache module")
13785 "The linecache module allows one to get any line from any file, while
13786 attempting to optimize internally, using a cache, the common case where many
13787 lines are read from a single file.")
13788 (license license:psfl)))
13790 (define-public python2-linecache2
13791 (package-with-python2 python-linecache2))
13793 (define-public python-traceback2
13795 (name "python-traceback2")
13800 (uri (pypi-uri "traceback2" version))
13803 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13804 (build-system python-build-system)
13806 `(;; python-traceback2 and python-unittest2 depend on one another.
13809 `(("python-pbr" ,python-pbr-minimal)))
13811 `(("python-linecache2" ,python-linecache2)))
13813 "https://github.com/testing-cabal/traceback2")
13814 (synopsis "Backports of the traceback module")
13816 "This module provides a standard interface to extract, format and print
13817 stack traces of Python programs. It exactly mimics the behavior of the Python
13818 interpreter when it prints a stack trace.")
13819 (license license:psfl)))
13821 (define-public python2-traceback2
13822 (package-with-python2 python-traceback2))
13824 (define-public python-ratelimiter
13826 (name "python-ratelimiter")
13831 (uri (pypi-uri "ratelimiter" version))
13834 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13835 (build-system python-build-system)
13837 '(#:tests? #f)) ; There are no tests in the pypi archive.
13838 (home-page "https://github.com/RazerM/ratelimiter")
13839 (synopsis "Simple rate limiting object")
13841 "The @code{ratelimiter} module ensures that an operation will not be
13842 executed more than a given number of times during a given period.")
13843 (license license:asl2.0)))
13845 (define-public python2-ratelimiter
13846 (package-with-python2 python-ratelimiter))
13848 (define-public python-dukpy
13850 (name "python-dukpy")
13855 (uri (git-reference
13856 (url "https://github.com/kovidgoyal/dukpy.git")
13857 (commit (string-append "v" version))))
13858 (file-name (git-file-name name version))
13860 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13861 (build-system python-build-system)
13862 (home-page "https://github.com/kovidgoyal/dukpy")
13863 (synopsis "Run JavaScript in python")
13865 "dukpy is a JavaScript runtime environment for Python using the duktape
13866 embeddable JavaScript engine.")
13867 ;; Dukpy is licensed under MIT like the embedded duktape library,
13868 ;; with 'errors.c' as GPL3.
13869 (license (list license:expat license:gpl3))))
13871 (define-public python2-dukpy
13872 (package-with-python2 python-dukpy))
13874 (define-public python-jsonrpclib-pelix
13876 (name "python-jsonrpclib-pelix")
13881 (uri (pypi-uri "jsonrpclib-pelix" version))
13884 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13885 (build-system python-build-system)
13887 `(#:tests? #f)) ; no tests in PyPI tarball
13888 (home-page "https://github.com/tcalmant/jsonrpclib/")
13889 (synopsis "JSON-RPC 2.0 client library for Python")
13891 "This library implements the JSON-RPC v2.0
13892 specification (backwards-compatible) as a client library for Python. This
13893 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13895 (license license:asl2.0)))
13897 (define-public python2-jsonrpclib-pelix
13898 (package-with-python2 python-jsonrpclib-pelix))
13900 (define-public python-setuptools-scm-git-archive
13902 (name "python-setuptools-scm-git-archive")
13907 (uri (pypi-uri "setuptools_scm_git_archive" version))
13910 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13911 (build-system python-build-system)
13913 `(("python-pytest" ,python-pytest)))
13915 `(("python-setuptools-scm" ,python-setuptools-scm)))
13916 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13917 (synopsis "Setuptools_scm plugin for git archives")
13919 "The setuptools_scm_git_archive package is a plugin to
13920 setuptools_scm, which supports obtaining versions from git archives that
13921 belong to tagged versions.")
13922 (license license:expat)))
13924 (define-public python2-setuptools-scm-git-archive
13925 (package-with-python2 python-setuptools-scm-git-archive))
13927 (define-public python-setuptools-git
13929 (name "python-setuptools-git")
13934 (uri (pypi-uri "setuptools-git" version))
13937 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13938 (build-system python-build-system)
13941 (modify-phases %standard-phases
13942 ;; This is needed for tests.
13943 (add-after 'unpack 'configure-git
13945 (setenv "HOME" "/tmp")
13946 (invoke "git" "config" "--global" "user.email" "guix")
13947 (invoke "git" "config" "--global" "user.name" "guix")
13950 `(("git" ,git-minimal)))
13951 (home-page "https://github.com/msabramo/setuptools-git")
13952 (synopsis "Setuptools revision control system plugin for Git")
13954 "This package provides a plugin for Setuptools for revision control with
13956 (license license:bsd-3)))
13958 (define-public python-pyclipper
13960 (name "python-pyclipper")
13961 (version "1.1.0.post1")
13965 (uri (pypi-uri "pyclipper" version ".zip"))
13968 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13969 (modules '((guix build utils)))
13972 ;; This file is generated by Cython.
13973 (delete-file "pyclipper/pyclipper.cpp") #t))))
13974 (build-system python-build-system)
13977 (modify-phases %standard-phases
13978 (add-before 'build 'cythonize-sources
13980 (with-directory-excursion "pyclipper"
13981 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13983 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13985 `(("python-cython" ,python-cython)
13986 ("python-pytest" ,python-pytest)
13987 ("python-pytest-runner" ,python-pytest-runner)
13988 ("python-unittest2" ,python-unittest2)
13990 (home-page "https://github.com/greginvm/pyclipper")
13991 (synopsis "Wrapper for Angus Johnson's Clipper library")
13993 "Pyclipper is a Cython wrapper for the C++ translation of the
13994 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13995 (license license:expat)))
13997 (define-public python2-pyclipper
13998 (package-with-python2 python-pyclipper))
14000 (define-public python2-booleanoperations
14002 (name "python2-booleanoperations")
14007 (uri (pypi-uri "booleanOperations" version ".zip"))
14010 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14011 (build-system python-build-system)
14013 `(#:python ,python-2))
14016 ("python2-pytest" ,python2-pytest)
14017 ("python2-pytest-runner" ,python2-pytest-runner)))
14019 `(("python-fonttools" ,python2-fonttools)
14020 ("python-pyclipper" ,python2-pyclipper)
14021 ("python-ufolib" ,python2-ufolib)))
14022 (home-page "https://github.com/typemytype/booleanOperations")
14023 (synopsis "Boolean operations on paths")
14025 "BooleanOperations provides a Python library that enables
14026 boolean operations on paths.")
14027 (license license:expat)))
14029 (define-public python-tempdir
14031 (name "python-tempdir")
14036 (uri (pypi-uri "tempdir" version))
14039 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14040 (build-system python-build-system)
14041 (home-page "https://pypi.org/project/tempdir/")
14043 ;; the package has no tests
14045 (synopsis "Python library for managing temporary directories")
14047 "This library manages temporary directories that are automatically
14048 deleted with all their contents when they are no longer needed. It is
14049 particularly convenient for use in tests.")
14050 (license license:expat)))
14052 (define-public python2-tempdir
14053 (package-with-python2 python-tempdir))
14055 (define-public python-activepapers
14057 (name "python-activepapers")
14062 (uri (pypi-uri "ActivePapers.Py" version))
14065 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14066 (build-system python-build-system)
14068 `(#:modules ((ice-9 ftw)
14071 (guix build python-build-system))
14074 (modify-phases %standard-phases
14075 (add-after 'unpack 'delete-python2-code
14077 (for-each delete-file
14078 '("lib/activepapers/builtins2.py"
14079 "lib/activepapers/standardlib2.py"
14080 "lib/activepapers/utility2.py"))))
14083 ;; Deactivate the test cases that download files
14084 (setenv "NO_NETWORK_ACCESS" "1")
14085 ;; For some strange reason, some tests fail if nosetests runs all
14086 ;; test modules in a single execution. They pass if each test
14087 ;; module is run individually.
14088 (for-each (lambda (filename)
14089 (invoke "nosetests"
14090 (string-append "tests/" filename)))
14093 (string-suffix? ".py" filename)))))))))
14095 `(("python-tempdir" ,python-tempdir)
14096 ("python-nose" ,python-nose)))
14098 `(("python-h5py" ,python-h5py)))
14099 (home-page "http://www.activepapers.org/")
14100 (synopsis "Executable papers for scientific computing")
14102 "ActivePapers is a tool for working with executable papers, which
14103 combine data, code, and documentation in single-file packages,
14104 suitable for publication as supplementary material or on repositories
14105 such as figshare or Zenodo.")
14106 (properties `((python2-variant . ,(delay python2-activepapers))))
14107 (license license:bsd-3)))
14109 (define-public python2-activepapers
14110 (let ((base (package-with-python2
14111 (strip-python2-variant python-activepapers))))
14115 (substitute-keyword-arguments (package-arguments base)
14117 `(modify-phases ,phases
14118 (delete 'delete-python2-code)
14119 (add-after 'unpack 'delete-python3-code
14121 (for-each delete-file
14122 '("lib/activepapers/builtins3.py"
14123 "lib/activepapers/standardlib3.py"
14124 "lib/activepapers/utility3.py")))))))))))
14126 (define-public python-semver
14128 (name "python-semver")
14133 (uri (pypi-uri "semver" version))
14136 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14137 (build-system python-build-system)
14140 (modify-phases %standard-phases
14141 (add-after 'unpack 'patch-test-requirements
14143 (substitute* "setup.py"
14144 ;; Our Python is new enough.
14145 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14148 `(("python-tox" ,python-tox)
14149 ("python-virtualenv" ,python-virtualenv)))
14150 (home-page "https://github.com/k-bx/python-semver")
14151 (synopsis "Python helper for Semantic Versioning")
14152 (description "This package provides a Python library for
14153 @url{Semantic Versioning, http://semver.org/}.")
14154 (license license:bsd-3)))
14156 (define-public python2-semver
14157 (package-with-python2 python-semver))
14159 (define-public python-pyro4
14161 (name "python-pyro4")
14166 (uri (pypi-uri "Pyro4" version))
14168 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14169 (build-system python-build-system)
14171 `(("python-serpent" ,python-serpent)))
14172 (home-page "https://pyro4.readthedocs.io")
14173 (synopsis "Distributed object middleware for Python")
14175 "Pyro enables you to build applications in which objects can talk to each
14176 other over the network. You can just use normal Python method calls to call
14177 objects on other machines, also known as remote procedure calls (RPC).")
14178 (license license:expat)))
14180 (define-public python2-pyro
14182 (name "python2-pyro")
14187 (uri (pypi-uri "Pyro" version))
14188 (file-name (string-append "Pyro-" version ".tar.gz"))
14191 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14192 (build-system python-build-system)
14194 ;; Pyro is not compatible with Python 3
14195 `(#:python ,python-2
14196 ;; Pyro has no test cases for automatic execution
14198 (home-page "http://pythonhosted.org/Pyro/")
14199 (synopsis "Distributed object manager for Python")
14200 (description "Pyro is a Distributed Object Technology system
14201 written in Python that is designed to be easy to use. It resembles
14202 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14203 which is a system and language independent Distributed Object Technology
14204 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14205 longer maintained. New projects should use Pyro4 instead, which
14206 is the new Pyro version that is actively developed.")
14207 (license license:expat)))
14209 (define-public python2-scientific
14211 (name "python2-scientific")
14216 (uri (string-append "https://bitbucket.org/khinsen/"
14217 "scientificpython/downloads/ScientificPython-"
14218 version ".tar.gz"))
14219 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14222 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14223 (build-system python-build-system)
14225 `(("netcdf" ,netcdf)))
14227 `(("python-numpy" ,python2-numpy-1.8)
14228 ("python-pyro" ,python2-pyro)))
14230 ;; ScientificPython is not compatible with Python 3
14231 `(#:python ,python-2
14232 #:tests? #f ; No test suite
14234 (modify-phases %standard-phases
14236 (lambda* (#:key inputs #:allow-other-keys)
14237 (invoke "python" "setup.py" "build"
14238 (string-append "--netcdf_prefix="
14239 (assoc-ref inputs "netcdf"))))))))
14240 (home-page "https://bitbucket.org/khinsen/scientificpython")
14241 (synopsis "Python modules for scientific computing")
14242 (description "ScientificPython is a collection of Python modules that are
14243 useful for scientific computing. Most modules are rather general (Geometry,
14244 physical units, automatic derivatives, ...) whereas others are more
14245 domain-specific (e.g. netCDF and PDB support). The library is currently
14246 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14247 (license license:cecill-c)))
14249 (define-public python2-mmtk
14251 (name "python2-mmtk")
14256 (uri (string-append "https://bitbucket.org/khinsen/"
14257 "mmtk/downloads/MMTK-" version ".tar.gz"))
14258 (file-name (string-append "MMTK-" version ".tar.gz"))
14261 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14262 (build-system python-build-system)
14264 `(("netcdf" ,netcdf)))
14266 `(("python-scientific" ,python2-scientific)
14267 ("python-tkinter" ,python-2 "tk")))
14269 `(#:python ,python-2
14272 (modify-phases %standard-phases
14273 (add-before 'build 'includes-from-scientific
14274 (lambda* (#:key inputs #:allow-other-keys)
14275 (mkdir-p "Include/Scientific")
14278 (assoc-ref inputs "python-scientific")
14279 "/include/python2.7/Scientific")
14280 "Include/Scientific"))))))
14281 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14282 (synopsis "Python library for molecular simulation")
14283 (description "MMTK is a library for molecular simulations with an emphasis
14284 on biomolecules. It provides widely used methods such as Molecular Dynamics
14285 and normal mode analysis, but also basic routines for implementing new methods
14286 for simulation and analysis. The library is currently not actively maintained
14287 and works only with Python 2 and NumPy < 1.9.")
14288 (license license:cecill-c)))
14290 (define-public python-phonenumbers
14292 (name "python-phonenumbers")
14297 (uri (pypi-uri "phonenumbers" version))
14300 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14301 (build-system python-build-system)
14303 "https://github.com/daviddrysdale/python-phonenumbers")
14305 "Python library for dealing with international phone numbers")
14307 "This package provides a Python port of Google's libphonenumber library.")
14308 (license license:asl2.0)))
14310 (define-public python2-phonenumbers
14311 (package-with-python2 python-phonenumbers))
14313 (define-public python-send2trash
14315 (name "python-send2trash")
14318 (origin (method git-fetch)
14319 ;; Source tarball on PyPI doesn't include tests.
14320 (uri (git-reference
14321 (url "https://github.com/hsoft/send2trash.git")
14323 (file-name (git-file-name name version))
14326 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14327 (build-system python-build-system)
14330 (modify-phases %standard-phases
14331 (add-before 'check 'pre-check
14333 (mkdir-p "/tmp/foo")
14334 (setenv "HOME" "/tmp/foo")
14336 (home-page "https://github.com/hsoft/send2trash")
14337 (synopsis "Send files to the user's @file{~/Trash} directory")
14338 (description "This package provides a Python library to send files to the
14339 user's @file{~/Trash} directory.")
14340 (properties `((python2-variant . ,(delay python2-send2trash))))
14341 (license license:bsd-3)))
14343 (define-public python2-send2trash
14345 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14347 (substitute-keyword-arguments (package-arguments python-send2trash)
14349 `(modify-phases ,phases
14350 (add-before 'check 'setenv
14352 (setenv "PYTHONPATH"
14353 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14356 (define-public python-yapf
14358 (name "python-yapf")
14363 (uri (pypi-uri "yapf" version))
14366 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14367 (build-system python-build-system)
14368 (home-page "https://github.com/google/yapf")
14369 (synopsis "Formatter for Python code")
14370 (description "YAPF is a formatter for Python code. It's based off of
14371 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14372 takes the code and reformats it to the best formatting that conforms to the
14373 style guide, even if the original code didn't violate the style guide.")
14374 (license license:asl2.0)))
14376 (define-public python2-yapf
14377 (package-with-python2 python-yapf))
14379 (define-public python-gyp
14380 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14383 (name "python-gyp")
14384 ;; Google does not release versions,
14385 ;; based on second most recent commit date.
14386 (version (git-version "0.0.0" revision commit))
14389 ;; Google does not release tarballs,
14390 ;; git checkout is needed.
14392 (uri (git-reference
14393 (url "https://chromium.googlesource.com/external/gyp")
14395 (file-name (git-file-name name version))
14398 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14399 (build-system python-build-system)
14400 (home-page "https://gyp.gsrc.io/")
14401 (synopsis "GYP is a Meta-Build system")
14403 "GYP builds build systems for large, cross platform applications.
14404 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14405 files, and Makefiles.")
14406 (license license:bsd-3))))
14408 (define-public python2-gyp
14409 (package-with-python2 python-gyp))
14411 (define-public python-whatever
14413 (name "python-whatever")
14418 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14422 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14423 (file-name (string-append name "-" version ".tar.gz"))))
14424 (build-system python-build-system)
14427 (modify-phases %standard-phases
14430 (invoke "py.test"))))))
14432 `(("python-pytest" ,python-pytest)))
14433 (home-page "http://github.com/Suor/whatever")
14434 (synopsis "Make anonymous functions by partial application of operators")
14435 (description "@code{whatever} provides an easy way to make anonymous
14436 functions by partial application of operators.")
14437 (license license:bsd-3)))
14439 (define-public python2-whatever
14440 (package-with-python2 python-whatever))
14442 (define-public python-funcy
14444 (name "python-funcy")
14449 (uri (git-reference
14450 (url "https://github.com/Suor/funcy.git")
14453 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14454 (file-name (git-file-name name version))))
14455 (build-system python-build-system)
14458 (modify-phases %standard-phases
14461 (invoke "py.test"))))))
14463 `(("python-pytest" ,python-pytest)
14464 ("python-whatever" ,python-whatever)))
14465 (home-page "http://github.com/Suor/funcy")
14466 (synopsis "Functional tools")
14467 (description "@code{funcy} is a library that provides functional tools.
14470 @item merge - Merges collections of the same type
14471 @item walk - Type-preserving map
14472 @item select - Selects a part of a collection
14473 @item take - Takes the first n items of a collection
14474 @item first - Takes the first item of a collection
14475 @item remove - Predicated-removes items of a collection
14476 @item concat - Concatenates two collections
14477 @item flatten - Flattens a collection with subcollections
14478 @item distinct - Returns only distinct items
14479 @item split - Predicated-splits a collection
14480 @item split_at - Splits a collection at a given item
14481 @item group_by - Groups items by group
14482 @item pairwise - Pairs off adjacent items
14483 @item partial - Partially-applies a function
14484 @item curry - Curries a function
14485 @item compose - Composes functions
14486 @item complement - Complements a predicate
14487 @item all_fn - \"all\" with predicate
14489 (license license:bsd-3)))
14491 (define-public python2-funcy
14492 (package-with-python2 python-funcy))
14494 (define-public python-isoweek
14496 (name "python-isoweek")
14501 (uri (pypi-uri "isoweek" version))
14504 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14505 (build-system python-build-system)
14506 (home-page "https://github.com/gisle/isoweek")
14507 (synopsis "Objects representing a week")
14508 (description "The @code{isoweek} module provide the class Week that
14509 implements the week definition of ISO 8601. This standard also defines
14510 a notation for identifying weeks; yyyyWww (where the W is a literal).
14511 Week instances stringify to this form.")
14512 (license license:bsd-3)))
14514 (define-public python2-isoweek
14515 (package-with-python2 python-isoweek))
14517 (define-public python-tokenize-rt
14519 (name "python-tokenize-rt")
14524 (uri (pypi-uri "tokenize-rt" version))
14527 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14528 (build-system python-build-system)
14529 (home-page "https://github.com/asottile/tokenize-rt")
14530 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14532 "This Python library is a wrapper around @code{tokenize} from the Python
14533 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14534 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14535 and @code{tokens_to_src} to roundtrip.")
14536 (license license:expat)))
14538 (define-public python-future-fstrings
14540 (name "python-future-fstrings")
14545 (uri (pypi-uri "future_fstrings" version))
14548 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14549 (build-system python-build-system)
14551 `(("python-tokenize-rt" ,python-tokenize-rt)))
14552 (home-page "https://github.com/asottile/future-fstrings")
14553 (synopsis "Backport of fstrings to Python < 3.6")
14555 "This package provides a UTF-8 compatible encoding
14556 @code{future_fstrings}, which performs source manipulation. It decodes the
14557 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14558 @code{f} strings.")
14559 (license license:expat)))
14561 (define-public python-typed-ast
14563 (name "python-typed-ast")
14568 (uri (pypi-uri "typed-ast" version))
14571 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14572 (build-system python-build-system)
14574 `(#:modules ((guix build utils)
14575 (guix build python-build-system)
14580 (modify-phases %standard-phases
14583 (let ((cwd (getcwd)))
14584 (setenv "PYTHONPATH"
14585 (string-append cwd "/build/"
14586 (find (cut string-prefix? "lib" <>)
14587 (scandir (string-append cwd "/build")))
14589 (getenv "PYTHONPATH"))))
14592 (native-inputs `(("python-pytest" ,python-pytest)))
14593 (home-page "https://github.com/python/typed_ast")
14594 (synopsis "Fork of Python @code{ast} modules with type comment support")
14595 (description "This package provides a parser similar to the standard
14596 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14597 include PEP 484 type comments and are independent of the version of Python
14598 under which they are run. The @code{typed_ast} parsers produce the standard
14599 Python AST (plus type comments), and are both fast and correct, as they are
14600 based on the CPython 2.7 and 3.7 parsers.")
14601 ;; See the file "LICENSE" for the details.
14602 (license (list license:psfl
14604 license:expat)))) ;ast27/Parser/spark.py
14606 (define-public python-typing
14608 (name "python-typing")
14613 (uri (pypi-uri "typing" version))
14616 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14617 (build-system python-build-system)
14618 (home-page "https://docs.python.org/3/library/typing.html")
14619 (synopsis "Type hints for Python")
14620 (description "This is a backport of the standard library @code{typing}
14621 module to Python versions older than 3.5. Typing defines a standard notation
14622 for Python function and variable type annotations. The notation can be used
14623 for documenting code in a concise, standard format, and it has been designed
14624 to also be used by static and runtime type checkers, static analyzers, IDEs
14626 (license license:psfl)))
14628 (define-public python2-typing
14629 (package-with-python2 python-typing))
14631 (define-public python-typing-extensions
14633 (name "python-typing-extensions")
14638 (uri (pypi-uri "typing_extensions" version))
14641 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14642 (build-system python-build-system)
14644 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14645 (synopsis "Experimental type hints for Python")
14647 "The typing_extensions module contains additional @code{typing} hints not
14648 yet present in the of the @code{typing} standard library.
14649 Included are implementations of:
14652 @item ContextManager
14663 @item TYPE_CHECKING
14664 @item AsyncGenerator
14666 (license license:psfl)))
14668 (define-public bpython
14675 (uri (pypi-uri "bpython" version))
14678 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14679 (build-system python-build-system)
14682 (modify-phases %standard-phases
14683 (add-after 'unpack 'remove-failing-test
14685 ;; Remove failing test. FIXME: make it pass
14686 (delete-file "bpython/test/test_args.py")
14688 (add-after 'wrap 'add-aliases
14689 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14690 (lambda* (#:key outputs #:allow-other-keys)
14691 (let ((out (assoc-ref outputs "out")))
14694 (symlink old (string-append out "/bin/" new)))
14695 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14696 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14699 `(("python-pygments" ,python-pygments)
14700 ("python-requests" ,python-requests)
14701 ("python-babel" ,python-babel) ; optional, for internationalization
14702 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14703 ("python-greenlet" ,python-greenlet)
14704 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14705 ("python-six" ,python-six)))
14707 `(("python-sphinx" ,python-sphinx)
14708 ("python-mock" ,python-mock)))
14709 (home-page "https://bpython-interpreter.org/")
14710 (synopsis "Fancy interface to the Python interpreter")
14711 (description "Bpython is a fancy interface to the Python
14712 interpreter. bpython's main features are
14715 @item in-line syntax highlighting,
14716 @item readline-like autocomplete with suggestions displayed as you type,
14717 @item expected parameter list for any Python function,
14718 @item \"rewind\" function to pop the last line of code from memory and
14720 @item send the code you've entered off to a pastebin,
14721 @item save the code you've entered to a file, and
14722 @item auto-indentation.
14724 (license license:expat)))
14726 (define-public bpython2
14727 (let ((base (package-with-python2
14728 (strip-python2-variant bpython))))
14729 (package (inherit base)
14732 `(#:python ,python-2
14734 (modify-phases %standard-phases
14735 (add-after 'unpack 'remove-failing-test
14737 ;; Remove failing test. FIXME: make it pass
14738 (delete-file "bpython/test/test_args.py")
14739 ;; Disable failing test-cases (renaming inhibits they are
14741 (substitute* "bpython/test/test_curtsies_repl.py"
14742 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14743 (string-append a "xxx_off_" b))
14744 (("^(\\s*def )(test_complex\\W)" _ a b)
14745 (string-append a "xxx_off_" b)))
14747 (add-before 'build 'rename-scripts
14748 ;; rename the scripts to bypthon2, bpdb2, etc.
14750 (substitute* "setup.py"
14751 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14752 (string-append name "2" rest "\n"))
14753 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14754 (string-append name "2" (or sub "") rest "\n")))
14757 (define-public python-pyinotify
14759 (name "python-pyinotify")
14763 (uri (pypi-uri "pyinotify" version))
14766 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14767 (build-system python-build-system)
14768 (arguments `(#:tests? #f)) ;no tests
14769 (home-page "https://github.com/seb-m/pyinotify")
14770 (synopsis "Python library for monitoring inotify events")
14772 "@code{pyinotify} provides a Python interface for monitoring
14773 file system events on Linux.")
14774 (license license:expat)))
14776 (define-public python2-pyinotify
14777 (package-with-python2 python-pyinotify))
14779 ;; Ada parser uses this version.
14780 (define-public python2-quex-0.67.3
14782 (name "python2-quex")
14787 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14788 (version-major+minor version)
14789 "/quex-" version ".zip"))
14792 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14793 (build-system python-build-system)
14795 `(("unzip" ,unzip)))
14797 `(#:python ,python-2
14800 (modify-phases %standard-phases
14801 (delete 'configure)
14804 (lambda* (#:key outputs #:allow-other-keys)
14805 (let* ((out (assoc-ref outputs "out"))
14806 (share/quex (string-append out "/share/quex"))
14807 (bin (string-append out "/bin")))
14808 (copy-recursively "." share/quex)
14810 (symlink (string-append share/quex "/quex-exe.py")
14811 (string-append bin "/quex"))
14813 (native-search-paths
14814 (list (search-path-specification
14815 (variable "QUEX_PATH")
14816 (files '("share/quex")))))
14817 (home-page "http://quex.sourceforge.net/")
14818 (synopsis "Lexical analyzer generator in Python")
14819 (description "@code{quex} is a lexical analyzer generator in Python.")
14820 (license license:lgpl2.1+))) ; Non-military
14822 (define-public python2-quex
14823 (package (inherit python2-quex-0.67.3)
14824 (name "python2-quex")
14829 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14832 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14833 (file-name (string-append name "-" version ".tar.gz"))))))
14835 (define-public python-more-itertools
14837 (name "python-more-itertools")
14842 (uri (pypi-uri "more-itertools" version))
14845 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14846 (build-system python-build-system)
14847 (home-page "https://github.com/erikrose/more-itertools")
14848 (synopsis "More routines for operating on iterables, beyond itertools")
14849 (description "Python's built-in @code{itertools} module implements a
14850 number of iterator building blocks inspired by constructs from APL, Haskell,
14851 and SML. @code{more-itertools} includes additional building blocks for
14852 working with iterables.")
14853 (properties `((python2-variant . ,(delay python2-more-itertools))))
14854 (license license:expat)))
14856 ;; The 5.x series are the last versions supporting Python 2.7.
14857 (define-public python2-more-itertools
14859 (inherit python-more-itertools)
14860 (name "python2-more-itertools")
14864 (uri (pypi-uri "more-itertools" version))
14867 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14869 `(#:python ,python2-minimal))
14871 `(("python2-six" ,python2-six-bootstrap)))))
14873 (define-public python-latexcodec
14875 (name "python-latexcodec")
14880 (uri (pypi-uri "latexcodec" version))
14882 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14883 (build-system python-build-system)
14885 `(("python-six" ,python-six)))
14886 (home-page "https://readthedocs.org/projects/latexcodec/")
14887 (synopsis "Work with LaTeX code in Python")
14888 (description "Lexer and codec to work with LaTeX code in Python.")
14889 (license license:expat)))
14891 (define-public python-pybtex
14893 (name "python-pybtex")
14898 (uri (pypi-uri "pybtex" version))
14900 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14901 (build-system python-build-system)
14903 `(("python-nose" ,python-nose)))
14905 `(("python-latexcodec" ,python-latexcodec)
14906 ("python-pyyaml" ,python-pyyaml)
14907 ("python-six" ,python-six)))
14909 `(#:test-target "nosetests"))
14910 (home-page "https://pybtex.org/")
14911 (synopsis "BibTeX-compatible bibliography processor")
14912 (description "Pybtex is a BibTeX-compatible bibliography processor written
14913 in Python. You can simply type pybtex instead of bibtex.")
14914 (license license:expat)))
14916 (define-public python-onetimepass
14918 (name "python-onetimepass")
14923 (uri (pypi-uri "onetimepass" version))
14925 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14926 (build-system python-build-system)
14927 (propagated-inputs `(("python-six" ,python-six)))
14928 (home-page "https://github.com/tadeck/onetimepass/")
14929 (synopsis "One-time password library")
14930 (description "Python one-time password library for HMAC-based (HOTP) and
14931 time-based (TOTP) passwords.")
14932 (license license:expat)))
14934 (define-public python-parso
14936 (name "python-parso")
14941 (uri (pypi-uri "parso" version))
14944 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14946 `(("python-pytest" ,python-pytest)))
14947 (build-system python-build-system)
14949 `(#:phases (modify-phases %standard-phases
14951 (lambda _ (invoke "pytest" "-vv"))))))
14952 (home-page "https://github.com/davidhalter/parso")
14953 (synopsis "Python Parser")
14954 (description "Parso is a Python parser that supports error recovery and
14955 round-trip parsing for different Python versions (in multiple Python versions).
14956 Parso is also able to list multiple syntax errors in your Python file.")
14957 (license license:expat)))
14959 (define-public python2-parso
14960 (package-with-python2 python-parso))
14962 (define-public python-async-generator
14964 (name "python-async-generator")
14969 (uri (pypi-uri "async_generator" version))
14972 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14973 (build-system python-build-system)
14975 `(("python-pytest" ,python-pytest)))
14976 (home-page "https://github.com/python-trio/async_generator")
14977 (synopsis "Async generators and context managers for Python 3.5+")
14978 (description "@code{async_generator} back-ports Python 3.6's native async
14979 generators and Python 3.7's context managers into Python 3.5.")
14981 (license (list license:expat license:asl2.0))))
14983 (define-public python-async-timeout
14985 (name "python-async-timeout")
14990 (uri (pypi-uri "async-timeout" version))
14993 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14994 (build-system python-build-system)
14995 (home-page "https://github.com/aio-libs/async_timeout/")
14996 (synopsis "Timeout context manager for asyncio programs")
14997 (description "@code{async-timeout} provides a timeout timeout context
14998 manager compatible with @code{asyncio}.")
14999 (license license:asl2.0)))
15001 (define-public python-glob2
15003 (name "python-glob2")
15008 (uri (git-reference
15009 (url "https://github.com/miracle2k/python-glob2.git")
15011 (file-name (git-file-name name version))
15013 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15014 (build-system python-build-system)
15015 (home-page "https://github.com/miracle2k/python-glob2/")
15016 (synopsis "Extended Version of the python buildin glob module")
15017 (description "This is an extended version of the Python
15018 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15022 @item The ability to capture the text matched by glob patterns, and return
15023 those matches alongside the file names.
15024 @item A recursive @code{**} globbing syntax, akin for example to the
15025 @code{globstar} option of Bash.
15026 @item The ability to replace the file system functions used, in order to glob
15027 on virtual file systems.
15028 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15031 Glob2 currently based on the glob code from Python 3.3.1.")
15032 (license license:bsd-2)))
15034 (define-public python2-glob2
15035 (package-with-python2 python-glob2))
15037 (define-public python-gipc
15039 (name "python-gipc")
15044 (uri (pypi-uri "gipc" version ".zip"))
15047 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15048 (build-system python-build-system)
15050 `(("unzip" ,unzip)))
15052 `(("python-gevent" ,python-gevent)))
15053 (home-page "http://gehrcke.de/gipc")
15054 (synopsis "Child process management in the context of gevent")
15055 (description "Usage of Python's multiprocessing package in a
15056 gevent-powered application may raise problems. With @code{gipc},
15057 process-based child processes can safely be created anywhere within a
15058 gevent-powered application.")
15059 (license license:expat)))
15061 (define-public python2-gipc
15062 (package-with-python2 python-gipc))
15064 (define-public python-fusepy
15066 (name "python-fusepy")
15071 (uri (pypi-uri "fusepy" version))
15074 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15075 (build-system python-build-system)
15078 (modify-phases %standard-phases
15079 (add-before 'build 'set-library-file-name
15080 (lambda* (#:key inputs #:allow-other-keys)
15081 (let ((fuse (assoc-ref inputs "fuse")))
15082 (substitute* "fuse.py"
15083 (("find_library\\('fuse'\\)")
15084 (string-append "'" fuse "/lib/libfuse.so'")))
15088 (home-page "https://github.com/fusepy/fusepy")
15089 (synopsis "Simple ctypes bindings for FUSE")
15090 (description "Python module that provides a simple interface to FUSE and
15091 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15092 (license license:isc)))
15094 (define-public python2-fusepy
15095 (package-with-python2 python-fusepy))
15097 (define-public python2-gdrivefs
15099 (name "python2-gdrivefs")
15104 (uri (pypi-uri "gdrivefs" version))
15107 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15108 (build-system python-build-system)
15110 `(#:python ,python-2
15112 (modify-phases %standard-phases
15113 (add-before 'build 'patch-setup-py
15115 ;; Update requirements from dependency==version
15116 ;; to dependency>=version
15117 (substitute* "gdrivefs/resources/requirements.txt"
15121 `(("python2-gipc" ,python2-gipc)
15122 ("python2-gevent" ,python2-gevent)
15123 ("python2-greenlet" ,python2-greenlet)
15124 ("python2-httplib2" ,python2-httplib2)
15125 ("python2-uritemplate" ,python2-uritemplate)
15126 ("python2-oauth2client" ,python2-oauth2client)
15127 ("python2-six" ,python2-six)))
15129 `(("python2-dateutil" ,python2-dateutil)
15130 ("python2-fusepy" ,python2-fusepy)
15131 ("python2-google-api-client" ,python2-google-api-client)))
15132 (home-page "https://github.com/dsoprea/GDriveFS")
15133 (synopsis "Mount Google Drive as a local file system")
15134 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15135 under Python 2.7.")
15136 (license license:gpl2)))
15138 (define-public pybind11
15144 (uri (git-reference
15145 (url "https://github.com/pybind/pybind11.git")
15146 (commit (string-append "v" version))))
15149 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15150 (file-name (git-file-name name version))))
15151 (build-system cmake-build-system)
15153 `(("python" ,python)
15154 ("python-pytest" ,python-pytest)))
15156 `(#:test-target "check"))
15157 (home-page "https://github.com/pybind/pybind11/")
15158 (synopsis "Seamless operability between C++11 and Python")
15159 (description "pybind11 is a lightweight header-only library that exposes
15160 C++ types in Python and vice versa, mainly to create Python bindings of
15161 existing C++ code. Its goals and syntax are similar to the excellent
15162 Boost.Python library by David Abrahams: to minimize boilerplate code in
15163 traditional extension modules by inferring type information using compile-time
15165 (license license:expat)))
15167 (define-public python-fasteners
15169 (name "python-fasteners")
15174 (uri (pypi-uri "fasteners" version))
15177 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15178 (build-system python-build-system)
15180 `(("python-monotonic" ,python-monotonic)
15181 ("python-six" ,python-six)
15182 ("python-testtools" ,python-testtools)))
15183 (home-page "https://github.com/harlowja/fasteners")
15184 (synopsis "Python package that provides useful locks")
15186 "This package provides a Python program that provides following locks:
15189 @item Locking decorator
15190 @item Reader-writer locks
15191 @item Inter-process locks
15192 @item Generic helpers
15194 (properties `((python2-variant . ,(delay python2-fasteners))))
15195 (license license:asl2.0)))
15197 (define-public python2-fasteners
15198 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15202 `(("python2-futures" ,python2-futures)
15203 ,@(package-propagated-inputs base))))))
15205 (define-public python-requests-file
15207 (name "python-requests-file")
15212 (uri (pypi-uri "requests-file" version))
15215 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15216 (build-system python-build-system)
15218 `(("python-requests" ,python-requests)
15219 ("python-six" ,python-six)))
15221 "https://github.com/dashea/requests-file")
15222 (synopsis "File transport adapter for Requests")
15224 "Requests-File is a transport adapter for use with the Requests Python
15225 library to allow local file system access via @code{file://} URLs.")
15226 (license license:asl2.0)))
15228 (define-public python2-requests-file
15229 (package-with-python2 python-requests-file))
15231 (define-public python-tldextract
15233 (name "python-tldextract")
15238 (uri (pypi-uri "tldextract" version))
15241 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15242 (build-system python-build-system)
15244 `(("python-pytest" ,python-pytest)
15245 ("python-responses" ,python-responses)))
15247 `(("python-idna" ,python-idna)
15248 ("python-requests" ,python-requests)
15249 ("python-requests-file" ,python-requests-file)))
15251 "https://github.com/john-kurkowski/tldextract")
15253 "Separate the TLD from the registered domain and subdomains of a URL")
15255 "TLDExtract accurately separates the TLD from the registered domain and
15256 subdomains of a URL, using the Public Suffix List. By default, this includes
15257 the public ICANN TLDs and their exceptions. It can optionally support the
15258 Public Suffix List's private domains as well.")
15259 (license license:bsd-3)))
15261 (define-public python2-tldextract
15262 (package-with-python2 python-tldextract))
15264 (define-public python-pynamecheap
15266 (name "python-pynamecheap")
15271 (uri (pypi-uri "PyNamecheap" version))
15274 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15275 (build-system python-build-system)
15277 `(("python-requests" ,python-requests)))
15279 "https://github.com/Bemmu/PyNamecheap")
15281 "Namecheap API client in Python")
15283 "PyNamecheap is a Namecheap API client in Python.")
15284 (license license:expat)))
15286 (define-public python2-pynamecheap
15287 (package-with-python2 python-pynamecheap))
15289 (define-public python-dns-lexicon
15291 (name "python-dns-lexicon")
15296 (uri (pypi-uri "dns-lexicon" version))
15299 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15300 (build-system python-build-system)
15302 `(#:tests? #f)) ;requires internet access
15304 `(("python-future" ,python-future)
15305 ("python-pynamecheap" ,python-pynamecheap)
15306 ("python-requests" ,python-requests)
15307 ("python-tldextract" ,python-tldextract)
15308 ("python-urllib3" ,python-urllib3)))
15309 (home-page "https://github.com/AnalogJ/lexicon")
15311 "Manipulate DNS records on various DNS providers")
15313 "Lexicon provides a way to manipulate DNS records on multiple DNS
15314 providers in a standardized way. It has a CLI but it can also be used as a
15315 Python library. It was designed to be used in automation, specifically with
15317 (license license:expat)))
15319 (define-public python2-dns-lexicon
15320 (package-with-python2 python-dns-lexicon))
15322 (define-public python-commandlines
15324 (name "python-commandlines")
15329 (uri (pypi-uri "commandlines" version))
15332 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15333 (build-system python-build-system)
15334 (home-page "https://github.com/chrissimpkins/commandlines")
15335 (synopsis "Command line argument to object parsing library")
15337 "@code{Commandlines} is a Python library for command line application
15338 development that supports command line argument parsing, command string
15339 validation testing and application logic.")
15340 (license license:expat)))
15342 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15343 ;; python-numba. They have a very unflexible relationship.
15344 (define-public python-numba
15346 (name "python-numba")
15351 (uri (pypi-uri "numba" version))
15354 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15355 (build-system python-build-system)
15357 `(#:modules ((guix build utils)
15358 (guix build python-build-system)
15363 (modify-phases %standard-phases
15364 (add-after 'unpack 'disable-proprietary-features
15366 (setenv "NUMBA_DISABLE_HSA" "1")
15367 (setenv "NUMBA_DISABLE_CUDA" "1")
15369 (add-after 'unpack 'remove-failing-tests
15371 ;; FIXME: these tests fail for unknown reasons:
15372 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15373 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15374 (substitute* "numba/tests/test_dispatcher.py"
15375 (("def test(_non_writable_pycache)" _ m)
15376 (string-append "def guix_skip" m))
15377 (("def test(_non_creatable_pycache)" _ m)
15378 (string-append "def guix_skip" m))
15379 (("def test(_frozen)" _ m)
15380 (string-append "def guix_skip" m)))
15382 ;; These tests fail because we don't run the tests from the build
15383 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15384 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15385 (substitute* "numba/tests/test_pycc.py"
15386 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15387 (string-append "def guix_skip" m)))
15391 (let ((cwd (getcwd)))
15392 (setenv "PYTHONPATH"
15393 (string-append cwd "/build/"
15394 (find (cut string-prefix? "lib" <>)
15395 (scandir (string-append cwd "/build")))
15397 (getenv "PYTHONPATH")))
15398 ;; Something is wrong with the PYTHONPATH when running the
15399 ;; tests from the build directory, as it complains about not being
15400 ;; able to import certain modules.
15401 (with-directory-excursion "/tmp"
15402 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15405 `(("python-llvmlite" ,python-llvmlite)
15406 ("python-numpy" ,python-numpy)
15407 ("python-singledispatch" ,python-singledispatch)))
15408 ;; Needed for tests.
15410 `(("python-jinja2" ,python-jinja2)
15411 ("python-pygments" ,python-pygments)))
15412 (home-page "https://numba.pydata.org")
15413 (synopsis "Compile Python code using LLVM")
15414 (description "Numba gives you the power to speed up your applications with
15415 high performance functions written directly in Python. With a few
15416 annotations, array-oriented and math-heavy Python code can be just-in-time
15417 compiled to native machine instructions, similar in performance to C, C++ and
15418 Fortran, without having to switch languages or Python interpreters.
15420 Numba works by generating optimized machine code using the LLVM compiler
15421 infrastructure at import time, runtime, or statically (using the included pycc
15423 (license license:bsd-3)))
15425 (define-public python-anndata
15427 (name "python-anndata")
15432 (uri (pypi-uri "anndata" version))
15435 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15436 (build-system python-build-system)
15438 `(("python-h5py" ,python-h5py)
15439 ("python-natsort" ,python-natsort)
15440 ("python-pandas" ,python-pandas)
15441 ("python-scipy" ,python-scipy)))
15442 (home-page "https://github.com/theislab/anndata")
15443 (synopsis "Annotated data for data analysis pipelines")
15444 (description "Anndata is a package for simple (functional) high-level APIs
15445 for data analysis pipelines. In this context, it provides an efficient,
15446 scalable way of keeping track of data together with learned annotations and
15447 reduces the code overhead typically encountered when using a mostly
15448 object-oriented library such as @code{scikit-learn}.")
15449 (license license:bsd-3)))
15451 (define-public python-dill
15453 (name "python-dill")
15458 (uri (pypi-uri "dill" version))
15460 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15461 (build-system python-build-system)
15462 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15463 (arguments '(#:tests? #f))
15464 (home-page "https://pypi.org/project/dill")
15465 (synopsis "Serialize all of Python")
15466 (description "Dill extends Python's @code{pickle} module for serializing
15467 and de-serializing Python objects to the majority of the built-in Python
15468 types. Dill provides the user the same interface as the @code{pickle} module,
15469 and also includes some additional features. In addition to pickling Python
15470 objects, @code{dill} provides the ability to save the state of an interpreter
15471 session in a single command. Hence, it would be feasible to save a
15472 interpreter session, close the interpreter, ship the pickled file to another
15473 computer, open a new interpreter, unpickle the session and thus continue from
15474 the saved state of the original interpreter session.")
15475 (license license:bsd-3)))
15477 (define-public python-multiprocess
15479 (name "python-multiprocess")
15480 (version "0.70.6.1")
15484 (uri (pypi-uri "multiprocess" version))
15487 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15488 (build-system python-build-system)
15490 `(("python-dill" ,python-dill)))
15491 (home-page "https://pypi.org/project/multiprocess")
15492 (synopsis "Multiprocessing and multithreading in Python")
15494 "This package is a fork of the multiprocessing Python package, a package
15495 which supports the spawning of processes using the API of the standard
15496 library's @code{threading} module.")
15497 (license license:bsd-3)))
15499 (define-public python-toolz
15501 (name "python-toolz")
15506 (uri (pypi-uri "toolz" version))
15509 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15510 (build-system python-build-system)
15511 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15512 ;; unregistered loader type"
15513 (arguments '(#:tests? #f))
15514 (home-page "https://github.com/pytoolz/toolz/")
15515 (synopsis "List processing tools and functional utilities")
15517 "This package provides a set of utility functions for iterators,
15518 functions, and dictionaries.")
15519 (license license:bsd-3)))
15521 (define-public python2-toolz
15522 (package-with-python2 python-toolz))
15524 (define-public python-cytoolz
15526 (name "python-cytoolz")
15527 (version "0.9.0.1")
15531 (uri (pypi-uri "cytoolz" version))
15534 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15535 (build-system python-build-system)
15536 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15538 (arguments '(#:tests? #f))
15540 `(("python-toolz" ,python-toolz)))
15542 `(("python-cython" ,python-cython)))
15543 (home-page "https://github.com/pytoolz/cytoolz")
15544 (synopsis "High performance functional utilities")
15546 "The cytoolz package implements the same API as provided by toolz. The
15547 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15548 that is accessible to other projects developed in Cython.")
15549 (license license:bsd-3)))
15551 (define-public python-sortedcontainers
15553 (name "python-sortedcontainers")
15558 (uri (pypi-uri "sortedcontainers" version))
15561 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15562 (build-system python-build-system)
15564 `(("python-tox" ,python-tox)))
15565 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15566 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15568 "This package provides a sorted collections library, written in
15570 (license license:asl2.0)))
15572 (define-public python-cloudpickle
15574 (name "python-cloudpickle")
15579 (uri (pypi-uri "cloudpickle" version))
15582 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15583 (build-system python-build-system)
15584 ;; FIXME: there are 5 errors in 122 tests:
15585 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15586 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15587 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15588 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15589 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15590 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15591 (arguments '(#:tests? #f))
15593 `(("python-pytest" ,python-pytest)
15594 ("python-mock" ,python-mock)
15595 ("python-tornado" ,python-tornado)))
15596 (home-page "https://github.com/cloudpipe/cloudpickle")
15597 (synopsis "Extended pickling support for Python objects")
15599 "Cloudpickle makes it possible to serialize Python constructs not
15600 supported by the default pickle module from the Python standard library. It
15601 is especially useful for cluster computing where Python expressions are
15602 shipped over the network to execute on remote hosts, possibly close to the
15604 (license license:bsd-3)))
15606 (define-public python2-cloudpickle
15607 (package-with-python2 python-cloudpickle))
15609 (define-public python-locket
15611 (name "python-locket")
15616 (uri (pypi-uri "locket" version))
15619 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/mwilliamson/locket.py")
15622 (synopsis "File-based locks for Python")
15624 "Locket implements a lock that can be used by multiple processes provided
15625 they use the same path.")
15626 (license license:bsd-2)))
15628 (define-public python2-locket
15629 (package-with-python2 python-locket))
15631 (define-public python-blosc
15633 (name "python-blosc")
15638 (uri (pypi-uri "blosc" version))
15641 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15642 (build-system python-build-system)
15643 ;; FIXME: all tests pass, but then this error is printed:
15644 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15645 (arguments '(#:tests? #f))
15647 `(("python-numpy" ,python-numpy)))
15648 (home-page "https://github.com/blosc/python-blosc")
15649 (synopsis "Python wrapper for the Blosc data compressor library")
15650 (description "Blosc is a high performance compressor optimized for binary
15651 data. It has been designed to transmit data to the processor cache faster
15652 than the traditional, non-compressed, direct memory fetch approach via a
15653 @code{memcpy()} system call.
15655 Blosc works well for compressing numerical arrays that contains data with
15656 relatively low entropy, like sparse data, time series, grids with
15657 regular-spaced values, etc.
15659 This Python package wraps the Blosc library.")
15660 (license license:bsd-3)))
15662 (define-public python2-blosc
15663 (package-with-python2 python-blosc))
15665 (define-public python-partd
15667 (name "python-partd")
15672 (uri (pypi-uri "partd" version))
15675 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15676 (build-system python-build-system)
15678 `(("python-blosc" ,python-blosc)
15679 ("python-locket" ,python-locket)
15680 ("python-numpy" ,python-numpy)
15681 ("python-pandas" ,python-pandas)
15682 ("python-pyzmq" ,python-pyzmq)
15683 ("python-toolz" ,python-toolz)))
15684 (home-page "https://github.com/dask/partd/")
15685 (synopsis "Appendable key-value storage")
15686 (description "Partd stores key-value pairs. Values are raw bytes. We
15687 append on old values. Partd excels at shuffling operations.")
15688 (license license:bsd-3)))
15690 (define-public python2-partd
15691 (package-with-python2 python-partd))
15693 (define-public python-dask
15695 (name "python-dask")
15700 (uri (pypi-uri "dask" version))
15702 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15703 (build-system python-build-system)
15704 ;; A single test out of 5000+ fails. This test is marked as xfail when
15705 ;; pytest-xdist is used.
15708 (modify-phases %standard-phases
15709 (add-after 'unpack 'disable-broken-test
15711 (substitute* "dask/tests/test_threaded.py"
15712 (("def test_interrupt\\(\\)" m)
15713 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15715 (when (which "python2")
15716 ;; This test fails with recent Pandas:
15717 ;; <https://github.com/dask/dask/issues/3794>.
15718 (substitute* "dask/dataframe/tests/test_dataframe.py"
15719 (("def test_info\\(\\)" m)
15720 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15724 (lambda _ (invoke "pytest" "-vv"))))))
15726 `(("python-cloudpickle" ,python-cloudpickle)
15727 ("python-numpy" ,python-numpy)
15728 ("python-pandas" ,python-pandas)
15729 ("python-partd" ,python-partd)
15730 ("python-toolz" ,python-toolz)
15731 ("python-pyyaml" ,python-pyyaml)))
15733 `(("python-pytest" ,python-pytest)
15734 ("python-pytest-runner" ,python-pytest-runner)))
15735 (home-page "https://github.com/dask/dask/")
15736 (synopsis "Parallel computing with task scheduling")
15738 "Dask is a flexible parallel computing library for analytics. It
15739 consists of two components: dynamic task scheduling optimized for computation,
15740 and large data collections like parallel arrays, dataframes, and lists that
15741 extend common interfaces like NumPy, Pandas, or Python iterators to
15742 larger-than-memory or distributed environments. These parallel collections
15743 run on top of the dynamic task schedulers. ")
15744 (license license:bsd-3)))
15746 (define-public python2-dask
15747 (package-with-python2 python-dask))
15749 (define-public python-ilinkedlist
15751 (name "python-ilinkedlist")
15756 (uri (pypi-uri "ilinkedlist" version))
15759 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15760 (build-system python-build-system)
15761 (native-inputs `(("python-pytest" ,python-pytest)))
15762 (inputs `(("python" ,python)))
15763 (home-page "https://github.com/luther9/ilinkedlist-py")
15764 (synopsis "Immutable linked list library")
15766 "This is a implementation of immutable linked lists for Python. It
15767 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15768 Since a linked list is treated as immutable, it is hashable, and its length
15769 can be retrieved in constant time. Some of the terminology is inspired by
15770 LISP. It is possible to create an improper list by creating a @code{Pair}
15771 with a non-list @code{cdr}.")
15772 (license license:gpl3+)))
15774 (define-public python-readlike
15776 (name "python-readlike")
15781 (uri (pypi-uri "readlike" version))
15783 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15784 (build-system python-build-system)
15785 (home-page "https://github.com/jangler/readlike")
15786 (synopsis "GNU Readline-like line editing module")
15788 "This Python module provides line editing functions similar to the default
15789 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15790 @code{readline} package, this one allows access to those capabilties in settings
15791 outside of a standard command-line interface. It is especially well-suited to
15792 interfacing with Urwid, due to a shared syntax for describing key inputs.
15794 Currently, all stateless Readline commands are implemented. Yanking and history
15795 are not supported.")
15796 (license license:expat)))
15798 (define-public python2-readlike
15799 (package-with-python2 python-readlike))
15801 (define-public python-reparser
15803 (name "python-reparser")
15808 (uri (pypi-uri "ReParser" version))
15810 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15811 (build-system python-build-system)
15812 (home-page "https://github.com/xmikos/reparser")
15813 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15815 "This Python library provides a simple lexer/parser for inline markup based
15816 on regular expressions.")
15817 (license license:expat)))
15819 (define-public python2-reparser
15820 (let ((reparser (package-with-python2
15821 (strip-python2-variant python-reparser))))
15822 (package (inherit reparser)
15824 `(("python2-enum34" ,python2-enum34)
15825 ,@(package-propagated-inputs reparser))))))
15827 (define-public python-precis-i18n
15829 (name "python-precis-i18n")
15834 (uri (pypi-uri "precis_i18n" version))
15837 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15838 (build-system python-build-system)
15839 (home-page "https://github.com/byllyfish/precis_i18n")
15840 (synopsis "Implementation of the PRECIS framework")
15842 "This module implements the PRECIS Framework as described in RFC 8264,
15843 RFC 8265 and RFC 8266.")
15844 (license license:expat)))
15846 (define-public python-absl-py
15848 (name "python-absl-py")
15853 (uri (pypi-uri "absl-py" version))
15856 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15857 (build-system python-build-system)
15859 `(("python-six" ,python-six)))
15860 (home-page "https://github.com/abseil/abseil-py")
15861 (synopsis "Abseil Python common libraries")
15863 "This package provides the Abseil Python Common Libraries, a collection
15864 of Python libraries for building Python applications.")
15865 (license license:asl2.0)))
15867 (define-public python-astor
15869 (name "python-astor")
15874 (uri (pypi-uri "astor" version))
15877 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15878 (build-system python-build-system)
15879 ;; FIXME: There are two errors and two test failures.
15880 (arguments `(#:tests? #f))
15881 (home-page "https://github.com/berkerpeksag/astor")
15882 (synopsis "Read and write Python ASTs")
15883 (description "Astor is designed to allow easy manipulation of Python
15884 source via the Abstract Syntax Tree.")
15885 (license license:bsd-3)))
15887 (define-public python2-astor
15888 (package-with-python2 python-astor))
15890 (define-public python-grpcio
15892 (name "python-grpcio")
15897 (uri (pypi-uri "grpcio" version))
15900 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15901 (build-system python-build-system)
15903 `(("python-six" ,python-six)))
15904 (home-page "https://grpc.io")
15905 (synopsis "HTTP/2-based RPC framework")
15906 (description "This package provides a Python library for communicating
15907 with the HTTP/2-based RPC framework gRPC.")
15908 (license license:asl2.0)))
15910 (define-public python-astunparse
15912 (name "python-astunparse")
15917 (uri (pypi-uri "astunparse" version))
15919 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15920 (build-system python-build-system)
15921 (arguments '(#:tests? #f)) ; there are none
15923 `(("python-six" ,python-six)
15924 ("python-wheel" ,python-wheel)))
15925 (home-page "https://github.com/simonpercivall/astunparse")
15926 (synopsis "AST unparser for Python")
15927 (description "This package provides an AST unparser for Python. It is a
15928 factored out version of @code{unparse} found in the Python source
15930 (license license:bsd-3)))
15932 (define-public python-gast
15934 (name "python-gast")
15939 (uri (pypi-uri "gast" version))
15941 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15942 (build-system python-build-system)
15944 `(("python-astunparse" ,python-astunparse)))
15945 (home-page "https://pypi.org/project/gast/")
15946 (synopsis "Generic Python AST that abstracts the underlying Python version")
15948 "GAST provides a compatibility layer between the AST of various Python
15949 versions, as produced by @code{ast.parse} from the standard @code{ast}
15951 (license license:bsd-3)))
15953 (define-public python-wikidata
15955 (name "python-wikidata")
15960 (uri (pypi-uri "Wikidata" version))
15963 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15964 (build-system python-build-system)
15966 `(("python-babel" ,python-babel)))
15967 (home-page "https://github.com/dahlia/wikidata")
15968 (synopsis "Wikidata client library")
15970 "This package provides a Python interface to
15971 @url{https://www.wikidata.org/, Wikidata}.")
15972 (properties '((upstream-name . "Wikidata")))
15973 (license license:gpl3+)))
15975 (define-public python-doctest-ignore-unicode
15977 (name "python-doctest-ignore-unicode")
15982 (uri (pypi-uri "doctest-ignore-unicode" version))
15985 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15986 (build-system python-build-system)
15988 `(("python-nose" ,python-nose)))
15989 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15990 (synopsis "Ignore Unicode literal prefixes in doctests")
15992 "This package adds support for a flag to ignore Unicode literal prefixes
15994 (license license:asl2.0)))
15996 (define-public python-attr
15998 (name "python-attr")
16003 (uri (pypi-uri "attr" version))
16006 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16007 (build-system python-build-system)
16008 (home-page "https://github.com/denis-ryzhkov/attr")
16009 (synopsis "Decorator for attributes of target function or class")
16010 (description "Simple decorator to set attributes of target function or
16011 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16012 (license license:expat)))
16014 (define-public python-construct
16016 (name "python-construct")
16021 (uri (pypi-uri "construct" version))
16024 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16025 (build-system python-build-system)
16027 `(#:tests? #f)) ; No tests exist.
16029 `(("python-extras" ,python-extras)
16030 ("python-arrow" ,python-arrow)
16031 ("python-numpy" ,python-numpy)
16032 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16033 (home-page "http://construct.readthedocs.io")
16034 (synopsis "Declarative and symmetrical parser and builder for binary data")
16036 "This package provides both simple, atomic constructs (such as
16037 integers of various sizes), as well as composite ones which allow you
16038 form hierarchical and sequential structures of increasing complexity.
16039 It features bit and byte granularity, easy debugging and testing, an
16040 easy-to-extend subclass system, and lots of primitive constructs to
16041 make your work easier.")
16042 (license license:expat)))
16044 (define-public python-humanize
16046 (name "python-humanize")
16051 (uri (pypi-uri "humanize" version))
16054 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16056 '(#:tests? #f)) ; tests not in pypi archive
16057 (build-system python-build-system)
16058 (home-page "https://github.com/jmoiron/humanize")
16059 (synopsis "Print numerical information in a human-readable form")
16060 (description "This package provides a Python module that displays numbers
16061 and dates in \"human readable\" forms. For example, it would display
16062 \"12345591313\" as \"12.3 billion\".")
16063 (license license:expat)))
16065 (define-public python-txaio
16067 (name "python-txaio")
16072 (uri (pypi-uri "txaio" version))
16075 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16076 (build-system python-build-system)
16078 `(("python-twisted" ,python-twisted)
16079 ("python-six" ,python-six)))
16080 (home-page "https://github.com/crossbario/txaio")
16081 (synopsis "Compatibility layer between Python asyncio and Twisted")
16082 (description "Txaio provides a compatibility layer between the Python
16083 @code{asyncio} module and @code{Twisted}.")
16084 (license license:expat)))
16086 (define-public python-toolshed
16088 (name "python-toolshed")
16093 (uri (pypi-uri "toolshed" version))
16096 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16097 (build-system python-build-system)
16099 `(("python-nose" ,python-nose)))
16100 (home-page "https://github.com/brentp/toolshed/")
16101 (synopsis "Collection of modules and functions for working with data")
16102 (description "This is a collection of well-tested, simple modules and
16103 functions that aim to reduce boilerplate when working with data.")
16104 (license license:bsd-2)))
16106 (define-public python-annoy
16108 (name "python-annoy")
16113 (uri (pypi-uri "annoy" version))
16116 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16117 (build-system python-build-system)
16119 `(("python-nose" ,python-nose)))
16120 (home-page "https://github.com/spotify/annoy/")
16121 (synopsis "Approximate nearest neighbors library")
16123 "Annoy is a C++ library with Python bindings to search for points in
16124 space that are close to a given query point. It also creates large read-only
16125 file-based data structures that are @code{mmap}ped into memory so that many
16126 processes may share the same data.")
16127 (license license:asl2.0)))
16129 (define-public python-pylzma
16131 (name "python-pylzma")
16136 (uri (pypi-uri "pylzma" version))
16139 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16140 (build-system python-build-system)
16141 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16142 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16143 (description "This package provides Python bindings for the LZMA library
16145 (license license:lgpl2.1+)))
16147 (define-public python2-pylzma
16148 (package-with-python2 python-pylzma))
16150 (define-public python2-zeroconf
16152 (name "python2-zeroconf")
16154 ;; This is the last version that supports Python 2.x.
16159 (uri (pypi-uri "zeroconf" version))
16162 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16163 (build-system python-build-system)
16165 `(#:python ,python-2
16167 (modify-phases %standard-phases
16168 (add-after 'unpack 'patch-requires
16169 (lambda* (#:key inputs #:allow-other-keys)
16170 (substitute* "setup.py"
16175 `(("python2-six" ,python2-six)
16176 ("python2-enum32" ,python2-enum34)
16177 ("python2-netifaces" ,python2-netifaces)
16178 ("python2-typing" ,python2-typing)))
16179 (home-page "https://github.com/jstasiak/python-zeroconf")
16180 (synopsis "Pure Python mDNS service discovery")
16182 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16184 (license license:lgpl2.1+)))
16186 (define-public python-bsddb3
16188 (name "python-bsddb3")
16193 (uri (pypi-uri "bsddb3" version))
16196 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16197 (build-system python-build-system)
16202 (modify-phases %standard-phases
16203 (add-after 'unpack 'configure-locations
16204 (lambda* (#:key inputs #:allow-other-keys)
16205 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16206 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16210 (invoke "python3" "test3.py" "-v"))))))
16211 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16212 (synopsis "Python bindings for Oracle Berkeley DB")
16214 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16215 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16216 Transaction objects, and each of these is exposed as a Python type in the
16217 bsddb3.db module. The database objects can use various access methods: btree,
16218 hash, recno, and queue. Complete support of Berkeley DB distributed
16219 transactions. Complete support for Berkeley DB Replication Manager.
16220 Complete support for Berkeley DB Base Replication. Support for RPC.")
16221 (license license:bsd-3)))
16223 (define-public python-dbfread
16225 (name "python-dbfread")
16229 (uri (pypi-uri "dbfread" version))
16232 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16233 (build-system python-build-system)
16235 `(("python-pytest" ,python-pytest)))
16236 (home-page "https://dbfread.readthedocs.io")
16237 (synopsis "Read DBF Files with Python")
16239 "This library reads DBF files and returns the data as native Python data
16240 types for further processing. It is primarily intended for batch jobs and
16242 (license license:expat)))
16244 (define-public python-cached-property
16246 (name "python-cached-property")
16251 (uri (pypi-uri "cached-property" version))
16254 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16255 (build-system python-build-system)
16258 (modify-phases %standard-phases
16259 ;; https://github.com/pydanny/cached-property/issues/131
16260 ;; recent versions of freezegun break one test
16261 (add-after 'unpack 'disable-broken-test
16263 (substitute* "tests/test_cached_property.py"
16264 (("def test_threads_ttl_expiry\\(self\\)" m)
16265 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16269 `(("python-freezegun" ,python-freezegun)))
16271 "https://github.com/pydanny/cached-property")
16273 "Decorator for caching properties in classes")
16275 "This package provides a decorator which makes caching
16276 time-or-computationally-expensive properties quick and easy and works in Python
16278 (license license:bsd-3)))
16280 (define-public python-folium
16282 (name "python-folium")
16287 (uri (pypi-uri "folium" version))
16290 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16291 (build-system python-build-system)
16293 `(("python-branca" ,python-branca)
16294 ("python-jinja2" ,python-jinja2)
16295 ("python-numpy" ,python-numpy)
16296 ("python-requests" ,python-requests)))
16298 `(("python-pytest" ,python-pytest)))
16299 (home-page "https://github.com/python-visualization/folium")
16300 (synopsis "Make beautiful maps with Leaflet.js & Python")
16301 (description "@code{folium} makes it easy to visualize data that’s been
16302 manipulated in Python on an interactive leaflet map. It enables both the
16303 binding of data to a map for @code{choropleth} visualizations as well as
16304 passing rich vector/raster/HTML visualizations as markers on the map.
16306 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16307 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16308 supports Image, Video, GeoJSON and TopoJSON overlays.")
16309 (license license:expat)))
16311 (define-public jube
16313 ;; This is a command-line tool, so no "python-" prefix.
16318 (uri (string-append
16319 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16323 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16324 (file-name (string-append "jube-" version ".tar.gz"))))
16325 (build-system python-build-system)
16326 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16327 (synopsis "Benchmarking environment")
16329 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16330 benchmarked application, benchmark data is stored in a format that allows JUBE
16331 to deduct the desired information. This data can be parsed by automatic pre-
16332 and post-processing scripts that draw information and store it more densely
16333 for manual interpretation.")
16334 (license license:gpl3+)))
16336 (define-public python-pyroutelib3
16338 (name "python-pyroutelib3")
16339 (version "1.3.post1")
16343 (uri (pypi-uri "pyroutelib3" version))
16346 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16347 (build-system python-build-system)
16349 `(("python-dateutil" ,python-dateutil)))
16350 (home-page "https://github.com/MKuranowski/pyroutelib3")
16351 (synopsis "Library for simple routing on OSM data")
16352 (description "Library for simple routing on OSM data")
16353 (license license:gpl3+)))
16355 (define-public python-elementpath
16357 (name "python-elementpath")
16362 (uri (pypi-uri "elementpath" version))
16365 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16366 (build-system python-build-system)
16368 "https://github.com/sissaschool/elementpath")
16370 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16372 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16373 for Python's ElementTree XML data structures, both for the standard
16374 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16376 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16377 because lxml.etree already has it's own implementation of XPath 1.0.")
16378 (license license:expat)))
16380 (define-public python-bibtexparser
16382 (name "python-bibtexparser")
16387 (uri (pypi-uri "bibtexparser" version))
16390 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16391 (build-system python-build-system)
16393 `(("python-pyparsing" ,python-pyparsing)))
16395 `(("python-future" ,python-future)))
16396 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16397 (synopsis "Python library to parse BibTeX files")
16398 (description "BibtexParser is a Python library to parse BibTeX files.")
16399 (license (list license:bsd-3 license:lgpl3))))
16401 (define-public python-distro
16403 (name "python-distro")
16408 (uri (pypi-uri "distro" version))
16411 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16412 (build-system python-build-system)
16414 `(("python-pytest" ,python-pytest)))
16415 (home-page "https://github.com/nir0s/distro")
16417 "OS platform information API")
16419 "@code{distro} provides information about the OS distribution it runs on,
16420 such as a reliable machine-readable ID, or version information.
16422 It is the recommended replacement for Python's original
16423 `platform.linux_distribution` function (which will be removed in Python 3.8).
16424 @code{distro} also provides a command-line interface to output the platform
16425 information in various formats.")
16426 (license license:asl2.0)))