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, 2020 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, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
73 ;;; This file is part of GNU Guix.
75 ;;; GNU Guix is free software; you can redistribute it and/or modify it
76 ;;; under the terms of the GNU General Public License as published by
77 ;;; the Free Software Foundation; either version 3 of the License, or (at
78 ;;; your option) any later version.
80 ;;; GNU Guix is distributed in the hope that it will be useful, but
81 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83 ;;; GNU General Public License for more details.
85 ;;; You should have received a copy of the GNU General Public License
86 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88 (define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
100 #:use-module (gnu packages dbm)
101 #:use-module (gnu packages file)
102 #:use-module (gnu packages fontutils)
103 #:use-module (gnu packages gcc)
104 #:use-module (gnu packages geo)
105 #:use-module (gnu packages ghostscript)
106 #:use-module (gnu packages gl)
107 #:use-module (gnu packages glib)
108 #:use-module (gnu packages gnome)
109 #:use-module (gnu packages graphviz)
110 #:use-module (gnu packages graphics)
111 #:use-module (gnu packages gstreamer)
112 #:use-module (gnu packages gtk)
113 #:use-module (gnu packages icu4c)
114 #:use-module (gnu packages image)
115 #:use-module (gnu packages imagemagick)
116 #:use-module (gnu packages libevent)
117 #:use-module (gnu packages libffi)
118 #:use-module (gnu packages linux)
119 #:use-module (gnu packages llvm)
120 #:use-module (gnu packages man)
121 #:use-module (gnu packages maths)
122 #:use-module (gnu packages monitoring)
123 #:use-module (gnu packages multiprecision)
124 #:use-module (gnu packages networking)
125 #:use-module (gnu packages ncurses)
126 #:use-module (gnu packages openstack)
127 #:use-module (gnu packages pcre)
128 #:use-module (gnu packages perl)
129 #:use-module (gnu packages pkg-config)
130 #:use-module (gnu packages python)
131 #:use-module (gnu packages python-check)
132 #:use-module (gnu packages python-compression)
133 #:use-module (gnu packages python-crypto)
134 #:use-module (gnu packages python-science)
135 #:use-module (gnu packages python-web)
136 #:use-module (gnu packages qt)
137 #:use-module (gnu packages readline)
138 #:use-module (gnu packages sdl)
139 #:use-module (gnu packages search)
140 #:use-module (gnu packages shells)
141 #:use-module (gnu packages sphinx)
142 #:use-module (gnu packages ssh)
143 #:use-module (gnu packages terminals)
144 #:use-module (gnu packages tex)
145 #:use-module (gnu packages texinfo)
146 #:use-module (gnu packages time)
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages version-control)
149 #:use-module (gnu packages video)
150 #:use-module (gnu packages web)
151 #:use-module (gnu packages base)
152 #:use-module (gnu packages xml)
153 #:use-module (gnu packages xorg)
154 #:use-module (gnu packages xdisorg)
155 #:use-module (gnu packages tcl)
156 #:use-module (gnu packages bdw-gc)
157 #:use-module (gnu packages serialization)
158 #:use-module (guix packages)
159 #:use-module (guix download)
160 #:use-module (guix git-download)
161 #:use-module (guix hg-download)
162 #:use-module (guix utils)
163 #:use-module (guix build-system gnu)
164 #:use-module (guix build-system cmake)
165 #:use-module (guix build-system python)
166 #:use-module (guix build-system trivial)
167 #:use-module (srfi srfi-1)
168 #:use-module (srfi srfi-26))
170 (define-public python-psutil
172 (name "python-psutil")
177 (uri (pypi-uri "psutil" version))
179 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
180 (build-system python-build-system)
182 ;; FIXME: some tests does not return and times out.
184 (home-page "https://www.github.com/giampaolo/psutil")
185 (synopsis "Library for retrieving information on running processes")
187 "psutil (Python system and process utilities) is a library for retrieving
188 information on running processes and system utilization (CPU, memory, disks,
189 network) in Python. It is useful mainly for system monitoring, profiling and
190 limiting process resources and management of running processes. It implements
191 many functionalities offered by command line tools such as: ps, top, lsof,
192 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
193 pidof, tty, taskset, pmap.")
194 (properties `((python2-variant . ,(delay python2-psutil))))
195 (license license:bsd-3)))
197 (define-public python2-psutil
198 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 `(("python2-enum34" ,python2-enum34) ;optional
203 ,@(package-propagated-inputs base))))))
205 (define-public python-shapely
207 (name "python-shapely")
208 (version "1.6.4.post2")
212 (uri (pypi-uri "Shapely" version))
215 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
216 (build-system python-build-system)
218 `(("python-cython" ,python-cython)
219 ("python-matplotlib" ,python-matplotlib)
220 ("python-pytest" ,python-pytest)
221 ("python-pytest-cov" ,python-pytest-cov)))
225 `(("python-numpy" ,python-numpy)))
228 (modify-phases %standard-phases
229 (add-after 'unpack 'patch-geos-path
230 (lambda* (#:key inputs #:allow-other-keys)
231 (let ((geos (assoc-ref inputs "geos"))
232 (glibc (assoc-ref inputs ,(if (%current-target-system)
233 "cross-libc" "libc"))))
234 (substitute* "shapely/geos.py"
235 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
236 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
237 geos "/lib/libgeos_c.so'])"))
238 (("free = load_dll\\('c'\\)\\.free")
239 (string-append "free = load_dll('c', fallbacks=['"
240 glibc "/lib/libc.so.6']).free"))))
242 (home-page "https://github.com/Toblerity/Shapely")
243 (synopsis "Library for the manipulation and analysis of geometric objects")
244 (description "Shapely is a Python package for manipulation and analysis of
245 planar geometric objects. It is based on the @code{GEOS} library.")
246 (license license:bsd-3)))
248 (define-public python-shortuuid
250 (name "python-shortuuid")
255 (uri (pypi-uri "shortuuid" version))
258 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
259 (build-system python-build-system)
261 `(("python-pep8" ,python-pep8)))
262 (home-page "https://github.com/skorokithakis/shortuuid")
263 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
265 "@code{shortuuid} is a Python library for generating concise, unambiguous
266 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
267 module and then similar looking characters are removed.")
268 (license license:bsd-3)))
270 (define-public python-logwrap
272 (name "python-logwrap")
277 (uri (pypi-uri "logwrap" version ".zip"))
280 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
281 (build-system python-build-system)
283 `(("python-six" ,python-six)
284 ("python-typing" ,python-typing)))
287 ("python-cython" ,python-cython)
288 ("python-pytest" ,python-pytest)
289 ("python-pytest-cov" ,python-pytest-cov)
290 ("python-pytest-runner" ,python-pytest-runner)))
291 (home-page "https://github.com/penguinolog/logwrap")
292 (synopsis "Decorator for logging function arguments")
293 (description "This package provides a decorator to log function arguments
294 and function call return values in a human-readable way.")
295 (license license:asl2.0)))
297 (define-public python2-shapely
298 (package-with-python2 python-shapely))
300 (define-public python-clyent
302 (name "python-clyent")
307 (uri (pypi-uri "clyent" version))
310 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
311 (build-system python-build-system)
313 `(("python-mock" ,python-mock)))
314 (home-page "https://github.com/binstar/clyent")
315 (synopsis "Command line client library")
316 (description "Clyent is a Python command line utiliy library. It is used
317 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
318 (license license:bsd-3)))
320 (define-public python2-clyent
321 (package-with-python2 python-clyent))
323 (define-public python-babel
325 (name "python-babel")
330 (uri (pypi-uri "Babel" version))
333 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
334 (build-system python-build-system)
336 `(("python-freezegun" ,python-freezegun)
337 ("python-pytest" ,python-pytest)))
339 `(("python-pytz" ,python-pytz)))
341 `(#:phases (modify-phases %standard-phases
344 (invoke "pytest" "-vv" "-k"
346 ;; XXX: These tests fail when using Pytest 4.x and
347 ;; Babel 2.6.0. Try removing this for later versions.
348 "not test_no_inherit_metazone_marker_never_in_output"
349 " and not test_smoke_dates"
350 " and not test_smoke_numbers")))))))
351 (home-page "http://babel.pocoo.org/")
353 "Tools for internationalizing Python applications")
355 "Babel is composed of two major parts:
356 - tools to build and work with gettext message catalogs
357 - a Python interface to the CLDR (Common Locale Data Repository), providing
358 access to various locale display names, localized number and date formatting,
360 (license license:bsd-3)))
362 (define-public python2-babel
363 (package-with-python2 python-babel))
365 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
366 (define-public python2-babel-2.6
368 (inherit python2-babel)
372 (uri (pypi-uri "Babel" version))
375 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
377 (define-public python2-backport-ssl-match-hostname
379 (name "python2-backport-ssl-match-hostname")
384 (uri (pypi-uri "backports.ssl_match_hostname" version))
387 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
388 (build-system python-build-system)
391 #:tests? #f)) ; no test target
392 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
393 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
395 "This backport brings the ssl.match_hostname() function to users of
396 earlier versions of Python. The function checks the hostname in the
397 certificate returned by the server to which a connection has been established,
398 and verifies that it matches the intended target hostname.")
399 (license license:psfl)))
401 (define-public python-boolean.py
403 (name "python-boolean.py")
407 ;; There's no source tarball on PyPI.
410 (url "https://github.com/bastikr/boolean.py")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
414 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
415 (build-system python-build-system)
416 (home-page "https://github.com/bastikr/boolean.py")
417 (synopsis "Boolean algebra in one Python module")
419 "This is a small Python library that implements boolean algebra.
420 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
421 @code{Symbol} class that can take on one of these two values. Calculations
422 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
423 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
424 Expressions are constructed from parsed strings or directly in Python.")
425 (license license:bsd-2)))
427 (define-public python-hdf4
434 (uri (pypi-uri name version))
437 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
438 (build-system python-build-system)
439 (native-inputs `(("nose" ,python-nose)))
440 (propagated-inputs `(("numpy" ,python-numpy)))
447 (modify-phases %standard-phases
450 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
451 ;; on to import numpy. Somehow this works on their CI system.
452 ;; Let's just manage PYTHONPATH here instead.
453 (substitute* "runexamples.sh"
454 (("export PYTHONPATH=.*") ""))
456 (string-append (getcwd) ":"
457 (getenv "PYTHONPATH")))
458 (invoke "./runexamples.sh")
459 (invoke "nosetests" "-v"))))))
460 (home-page "https://github.com/fhs/python-hdf4")
461 (synopsis "Python interface to the NCSA HDF4 library")
463 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
464 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
465 NetCDF files can also be read and modified. Python-HDF4 is a fork of
466 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
467 (license license:expat)))
469 (define-public python2-hdf4
470 (package-with-python2 python-hdf4))
472 (define-public python-h5py
479 (uri (pypi-uri "h5py" version))
482 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
483 (build-system python-build-system)
485 `(#:tests? #f ; no test target
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-hdf5-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (let ((prefix (assoc-ref inputs "hdf5")))
491 (substitute* "setup_build.py"
492 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
493 (string-append "['" prefix "/lib" "']"))
494 (("'/opt/local/include', '/usr/local/include'")
495 (string-append "'" prefix "/include" "'")))
496 (substitute* "setup_configure.py"
497 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
498 (string-append "['" prefix "/lib" "']")))
501 `(("python-six" ,python-six)
502 ("python-numpy" ,python-numpy)))
506 `(("python-cython" ,python-cython)
507 ("python-pkgconfig" ,python-pkgconfig)))
508 (home-page "http://www.h5py.org/")
509 (synopsis "Read and write HDF5 files from Python")
511 "The h5py package provides both a high- and low-level interface to the
512 HDF5 library from Python. The low-level interface is intended to be a
513 complete wrapping of the HDF5 API, while the high-level component supports
514 access to HDF5 files, datasets and groups using established Python and NumPy
516 (license license:bsd-3)))
518 (define-public python2-h5py
519 (package-with-python2 python-h5py))
521 (define-public python-sh
528 (uri (pypi-uri "sh" version))
531 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
532 (build-system python-build-system)
535 (modify-phases %standard-phases
538 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
539 (setenv "HOME" "/tmp")
540 (invoke "python" "sh.py" "test"))))))
542 `(("python-coverage" ,python-coverage)))
543 (home-page "https://github.com/amoffat/sh")
544 (synopsis "Python subprocess replacement")
545 (description "This package provides a replacement for Python's
546 @code{subprocess} feature.")
547 (license license:expat)))
549 (define-public python2-sh
550 (package-with-python2 python-sh))
552 (define-public python-cftime
554 (name "python-cftime")
559 (uri (pypi-uri "cftime" version))
561 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
562 (build-system python-build-system)
564 `(("python-numpy" ,python-numpy)))
566 `(("python-coveralls" ,python-coveralls)
567 ("python-cython" ,python-cython)
568 ("python-pytest-cov" ,python-pytest-cov)))
569 (home-page "https://github.com/Unidata/cftime")
570 (synopsis "Library for time handling")
572 "This package provides time-handling functionality that used to be part
573 of the netcdf4 package before.")
574 ;; This package claims to include code under the GPLv3 but is released
576 (license (list license:isc license:gpl3+))))
578 (define-public python-netcdf4
580 (name "python-netcdf4")
585 (uri (pypi-uri "netCDF4" version))
588 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
589 (build-system python-build-system)
592 (modify-phases %standard-phases
593 (add-after 'unpack 'configure-locations
594 (lambda* (#:key inputs #:allow-other-keys)
595 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
598 `(("python-cython" ,python-cython)))
600 `(("python-numpy" ,python-numpy)
601 ("python-cftime" ,python-cftime)))
606 (home-page "https://github.com/Unidata/netcdf4-python")
607 (synopsis "Python/numpy interface to the netCDF library")
608 (description "Netcdf4-python is a Python interface to the netCDF C
609 library. netCDF version 4 has many features not found in earlier
610 versions of the library and is implemented on top of HDF5. This module
611 can read and write files in both the new netCDF 4 and the old netCDF 3
612 format, and can create files that are readable by HDF5 clients. The
613 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
614 to users of that module.")
615 ;; The software is mainly ISC, but includes some files covered
616 ;; by the Expat license.
617 (license (list license:isc license:expat))))
619 (define-public python2-netcdf4
620 (package-with-python2 python-netcdf4))
622 (define-public python-license-expression
624 (name "python-license-expression")
629 (uri (pypi-uri "license-expression" version))
631 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
632 (build-system python-build-system)
634 `(("python-boolean.py" ,python-boolean.py)))
635 (home-page "https://github.com/nexB/license-expression")
636 (synopsis "Apply boolean logic to license expressions")
638 "This Python module defines a tiny language to evaluate and compare
639 license expressions using boolean logic. Logical combinations of licenses can
640 be tested for equality, containment, and equivalence. They can be normalised
641 and simplified. It supports SPDX license expressions as well as other naming
642 conventions and aliases in the same expression.")
643 (license license:gpl2+)))
645 (define-public python-lockfile
647 (name "python-lockfile")
652 (uri (pypi-uri "lockfile" version))
655 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
656 (build-system python-build-system)
657 (arguments '(#:test-target "check"))
659 `(("python-pbr" ,python-pbr)))
660 (home-page "https://launchpad.net/pylockfile")
661 (synopsis "Platform-independent file locking module")
663 "The lockfile package exports a LockFile class which provides a simple
664 API for locking files.")
665 (license license:expat)))
667 (define-public python2-lockfile
668 (package-with-python2 python-lockfile))
670 (define-public python-semantic-version
672 (name "python-semantic-version")
677 (uri (pypi-uri "semantic_version" version))
680 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
681 (build-system python-build-system)
683 `(#:tests? #f)) ; PyPI tarball lacks tests
684 (home-page "https://github.com/rbarrois/python-semanticversion")
685 (synopsis "Semantic versioning module for Python")
687 "The @code{semantic_version} class is a small library for handling
688 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
690 It can compare versions, generate a new version that represents a bump in one of
691 the version levels, and check whether any given string is a proper semantic
692 version identifier.")
693 (license license:bsd-3)))
695 (define-public python2-semantic-version
696 (package-with-python2 python-semantic-version))
698 (define-public python-serpent
700 (name "python-serpent")
705 (uri (pypi-uri "serpent" version))
707 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
708 (build-system python-build-system)
710 `(("python-attrs" ,python-attrs)
711 ("python-pytz" ,python-pytz)))
712 (home-page "https://github.com/irmen/Serpent")
713 (synopsis "Serializer for literal Python expressions")
715 "Serpent provides @code{ast.literal_eval()}-compatible object tree
716 serialization. It serializes an object tree into bytes (an utf-8 encoded
717 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
718 to rebuild the original object tree.
720 Because only safe literals are encoded, it is safe to send serpent data to
721 other machines, such as over the network.")
722 (license license:expat)))
724 (define-public python-setuptools
726 (name "python-setuptools")
731 (uri (pypi-uri "setuptools" version ".zip"))
734 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
735 (modules '((guix build utils)))
738 ;; Remove included binaries which are used to build self-extracting
739 ;; installers for Windows.
740 ;; TODO: Find some way to build them ourself so we can include them.
741 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
743 (build-system python-build-system)
744 ;; FIXME: Tests require pytest, which itself relies on setuptools.
745 ;; One could bootstrap with an internal untested setuptools.
748 (home-page "https://pypi.python.org/pypi/setuptools")
750 "Library designed to facilitate packaging Python projects")
752 "Setuptools is a fully-featured, stable library designed to facilitate
753 packaging Python projects, where packaging includes:
754 Python package and module definitions,
755 distribution package metadata,
757 project installation,
758 platform-specific details,
760 ;; TODO: setuptools now bundles the following libraries:
761 ;; packaging, pyparsing, six and appdirs. How to unbundle?
762 (license (list license:psfl ; setuptools itself
763 license:expat ; six, appdirs, pyparsing
764 license:asl2.0 ; packaging is dual ASL2/BSD-2
767 (define-public python2-setuptools
768 (package-with-python2 python-setuptools))
770 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
771 (define-public python-setuptools-for-tensorflow
774 (inherit python-setuptools)
777 (inherit (package-source python-setuptools))
778 (uri (pypi-uri "setuptools" version ".zip"))
781 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
783 (define-public python-uniseg
785 (name "python-uniseg")
790 (uri (pypi-uri "uniseg" version ".zip"))
793 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
794 (build-system python-build-system)
796 '(#:tests? #f)) ; The test suite requires network access.
800 "https://bitbucket.org/emptypage/uniseg-python")
802 "Python library to determine Unicode text segmentations")
804 "Uniseg is a Python package used to determine Unicode text segmentations.
805 Supported segmentations include:
807 @item @dfn{Code point} (any value in the Unicode codespace)
808 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
809 multiple Unicode code points, e.g. \"G\" + acute-accent)
814 (license license:expat)))
816 (define-public python2-uniseg
817 (package-with-python2 python-uniseg))
819 (define-public python-humanfriendly
821 (name "python-humanfriendly")
826 (uri (pypi-uri "humanfriendly" version))
829 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
830 (build-system python-build-system)
832 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
835 `(("python-monotonic" ,python-monotonic)))
836 (home-page "https://humanfriendly.readthedocs.io")
837 (synopsis "Human-friendly input and output in Python")
839 "The functions and classes in @code{humanfriendly} can be used to make
840 text interfaces more user-friendly. It includes tools to parse and format
841 numbers, file sizes, and timespans, timers for long-running operations, menus
842 to allow the user to choose from a list of options, and terminal interaction
844 (license license:expat)))
846 (define-public python2-humanfriendly
847 (package-with-python2 python-humanfriendly))
849 (define-public python-capturer
851 (name "python-capturer")
856 (uri (pypi-uri "capturer" version))
859 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
860 (build-system python-build-system)
864 `(("python-humanfriendly" ,python-humanfriendly)))
865 (home-page "https://capturer.readthedocs.io")
866 (synopsis "Capture stdout and stderr streams of the current process")
868 "The capturer package makes it easy to capture the stdout and stderr
869 streams of the current process and subprocesses. Output can be relayed
870 to the terminal in real time but is also available to the Python program
871 for additional processing.")
872 (license license:expat)))
874 (define-public python2-capturer
875 (package-with-python2 python-capturer))
877 (define-public python-case
884 (uri (pypi-uri "case" version))
887 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
888 (build-system python-build-system)
890 `(("python-mock" ,python-mock)
891 ("python-nose" ,python-nose)
892 ("python-six" ,python-six)
893 ("python-unittest2" ,python-unittest2)))
895 `(("python-coverage" ,python-coverage)))
896 (home-page "https://github.com/celery/case")
897 (synopsis "Unittest utilities and convenience methods")
899 "The @code{case} package provides utilities on top of unittest, including
900 some helpful Python 2 compatibility convenience methods.")
901 (license license:bsd-3)))
903 (define-public python-verboselogs
905 (name "python-verboselogs")
910 (uri (pypi-uri "verboselogs" version))
913 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
914 (build-system python-build-system)
917 (modify-phases %standard-phases
920 ;; Do not run pylint plugin test, as astroid is an old
921 ;; unsupported version.
922 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
923 "verboselogs/tests.py"))))))
925 `(("python-mock" ,python-mock)
926 ("python-pytest" ,python-pytest)))
927 (home-page "https://verboselogs.readthedocs.io")
928 (synopsis "Verbose logging level for Python's logging module")
930 "The @code{verboselogs} package extends Python's @code{logging} module to
931 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
932 (license license:expat)))
934 (define-public python2-verboselogs
935 (package-with-python2 python-verboselogs))
937 (define-public python-coloredlogs
939 (name "python-coloredlogs")
944 (uri (pypi-uri "coloredlogs" version))
947 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
948 (build-system python-build-system)
950 `(;Tests require some updated modules
953 `(("python-capturer" ,python-capturer)))
954 (home-page "https://coloredlogs.readthedocs.io")
955 (synopsis "Colored stream handler for Python's logging module")
957 "The @code{coloredlogs} package enables colored terminal output for
958 Python's logging module. The @code{ColoredFormatter} class inherits from
959 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
961 (license license:expat)))
963 (define-public python2-coloredlogs
964 (package-with-python2 python-coloredlogs))
966 (define-public python-editorconfig
968 (name "python-editorconfig")
973 (uri (pypi-uri "EditorConfig" version))
976 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
977 (build-system python-build-system)
978 (home-page "https://editorconfig.org/")
979 (synopsis "EditorConfig bindings for python")
980 (description "The EditorConfig project consists of a file format for
981 defining coding styles and a collection of text editor plugins that enable
982 editors to read the file format and adhere to defined styles. EditorConfig
983 files are easily readable and they work nicely with version control systems.")
984 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
985 (license (list license:bsd-2 license:psfl))))
987 (define-public python-et-xmlfile
989 (name "python-et-xmlfile")
994 (uri (pypi-uri "et_xmlfile" version))
997 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
998 (build-system python-build-system)
1000 `(#:phases (modify-phases %standard-phases
1003 (invoke "pytest"))))))
1005 `(("python-pytest" ,python-pytest)
1006 ("python-lxml" ,python-lxml))) ;used for the tests
1007 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1008 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1009 (description "This Python library is based upon the @code{xmlfile} module
1010 from @code{lxml}. It aims to provide a low memory, compatible implementation
1011 of @code{xmlfile}.")
1012 (license license:expat)))
1014 (define-public python2-et-xmlfile
1015 (package-with-python2 python-et-xmlfile))
1017 (define-public python-openpyxl
1019 (name "python-openpyxl")
1023 ;; We use the upstream repository, as the tests are not included in the
1027 (url "https://bitbucket.org/openpyxl/openpyxl")
1028 (changeset version)))
1029 (file-name (string-append name "-" version "-checkout"))
1031 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1032 (build-system python-build-system)
1034 `(#:phases (modify-phases %standard-phases
1037 (invoke "pytest"))))))
1039 ;; For the test suite.
1040 `(("python-lxml" ,python-lxml)
1041 ("python-pillow" ,python-pillow)
1042 ("python-pytest" ,python-pytest)))
1044 `(("python-et-xmlfile" ,python-et-xmlfile)
1045 ("python-jdcal" ,python-jdcal)))
1046 (home-page "https://openpyxl.readthedocs.io")
1047 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1048 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1049 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1051 (license license:expat)))
1053 (define-public python-eventlet
1055 (name "python-eventlet")
1060 (uri (pypi-uri "eventlet" version))
1063 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1064 (build-system python-build-system)
1066 `(("python-greenlet" ,python-greenlet)))
1068 ;; TODO: Requires unpackaged 'enum-compat'.
1070 (home-page "https://eventlet.net")
1071 (synopsis "Concurrent networking library for Python")
1073 "Eventlet is a concurrent networking library for Python that
1074 allows you to change how you run your code, not how you write it.
1075 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1076 Coroutines ensure that the developer uses a blocking style of programming
1077 that is similar to threading, but provide the benefits of non-blocking I/O.
1078 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1079 from the Python interpreter, or as a small part of a larger application.")
1080 (license license:expat)))
1082 (define-public python2-eventlet
1083 (let ((base (package-with-python2
1084 (strip-python2-variant python-eventlet))))
1085 (package (inherit base)
1087 `(("python2-enum34" ,python2-enum34)
1088 ,@(package-propagated-inputs base))))))
1090 (define-public python-six
1097 (uri (pypi-uri "six" version))
1100 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1101 (build-system python-build-system)
1104 (modify-phases %standard-phases
1107 (invoke "py.test" "-v"))))))
1109 `(("python-py" ,python-py)
1110 ("python-pytest" ,python-pytest-bootstrap)))
1111 (home-page "https://pypi.python.org/pypi/six/")
1112 (synopsis "Python 2 and 3 compatibility utilities")
1114 "Six is a Python 2 and 3 compatibility library. It provides utility
1115 functions for smoothing over the differences between the Python versions with
1116 the goal of writing Python code that is compatible on both Python versions.
1117 Six supports every Python version since 2.5. It is contained in only one
1118 Python file, so it can be easily copied into your project.")
1119 (license license:x11)))
1121 (define-public python2-six
1122 (package-with-python2 python-six))
1124 (define-public python-six-bootstrap
1126 (inherit python-six)
1127 (name "python-six-bootstrap")
1129 (arguments `(#:tests? #f))))
1131 (define-public python2-six-bootstrap
1132 (package-with-python2 python-six-bootstrap))
1134 (define-public python-schedule
1136 (name "python-schedule")
1141 (uri (pypi-uri "schedule" version))
1144 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1145 (build-system python-build-system)
1147 `(("python-pytest" ,python-pytest)
1148 ("python-mock" ,python-mock)))
1149 (home-page "https://github.com/dbader/schedule")
1150 (synopsis "Schedule periodic function calls in Python")
1152 "Schedule is an in-process scheduler for periodic jobs that uses the
1153 builder pattern for configuration. Schedule lets you run Python functions (or
1154 any other callable) periodically at pre-determined intervals using a simple,
1155 human-friendly syntax.")
1156 (license license:expat)))
1158 (define-public python2-schedule
1159 (package-with-python2 python-schedule))
1161 (define-public python2-mechanize
1163 (name "python2-mechanize")
1168 (uri (pypi-uri "mechanize" version))
1171 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1172 (build-system python-build-system)
1174 `(#:python ,python-2 ; apparently incompatible with Python 3
1176 ;; test fails with message
1177 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1178 ;; (python-3.3.2) or
1179 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1181 ;; The source code is from March 2011 and probably not up-to-date
1182 ;; with respect to python unit tests.
1183 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1185 "Stateful programmatic web browsing in Python")
1187 "Mechanize implements stateful programmatic web browsing in Python,
1188 after Andy Lester’s Perl module WWW::Mechanize.")
1189 (license (license:non-copyleft
1191 "See COPYING in the distribution."))))
1194 (define-public python-simplejson
1196 (name "python-simplejson")
1201 (uri (pypi-uri "simplejson" version))
1204 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1205 (build-system python-build-system)
1206 (home-page "http://simplejson.readthedocs.org/en/latest/")
1208 "Json library for Python")
1210 "JSON (JavaScript Object Notation) is a subset of JavaScript
1211 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1214 Simplejson exposes an API familiar to users of the standard library marshal
1215 and pickle modules. It is the externally maintained version of the json
1216 library contained in Python 2.6, but maintains compatibility with Python 2.5
1217 and (currently) has significant performance advantages, even without using
1218 the optional C extension for speedups. Simplejson is also supported on
1220 (license license:x11)))
1222 (define-public python2-simplejson
1223 (package-with-python2 python-simplejson))
1226 (define-public python-pyicu
1228 (name "python-pyicu")
1233 (uri (pypi-uri "PyICU" version))
1236 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1237 (build-system python-build-system)
1239 `(("icu4c" ,icu4c)))
1241 `(("python-pytest" ,python-pytest)
1242 ("python-six" ,python-six)))
1243 (home-page "https://github.com/ovalhub/pyicu")
1244 (synopsis "Python extension wrapping the ICU C++ API")
1246 "PyICU is a python extension wrapping the ICU C++ API.")
1247 (properties `((python2-variant . ,(delay python2-pyicu))))
1248 (license license:x11)))
1250 (define-public python2-pyicu
1251 (let ((base (package-with-python2
1252 (strip-python2-variant python-pyicu))))
1256 `(,@(package-arguments base)
1258 (modify-phases %standard-phases
1259 (add-before 'check 'delete-failing-test
1261 ;; XXX: This fails due to Unicode issues unique to Python 2,
1262 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1263 (delete-file "test/test_Script.py")
1266 (define-public python2-dogtail
1267 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1268 ;; spaces in indentation" with Python 3.
1270 (name "python2-dogtail")
1274 (uri (pypi-uri "dogtail" version))
1277 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1278 (build-system python-build-system)
1279 (arguments `(#:python ,python-2
1280 #:tests? #f)) ; invalid command "test"
1281 ;; Currently no offical homepage.
1282 (home-page "https://pypi.python.org/pypi/dogtail/")
1283 (synopsis "GUI test tool and automation framework written in Python")
1285 "Dogtail is a GUI test tool and automation framework written in Python.
1286 It uses Accessibility (a11y) technologies to communicate with desktop
1287 applications. dogtail scripts are written in Python and executed like any
1288 other Python program.")
1289 (license license:gpl2+)))
1291 (define-public python-empy
1293 (name "python-empy")
1297 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1301 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1302 (build-system python-build-system)
1304 `(#:tests? #f)) ; python2 only
1305 (home-page "http://www.alcyone.com/software/empy/")
1306 (synopsis "Templating system for Python")
1308 "EmPy is a system for embedding Python expressions and statements in
1309 template text; it takes an EmPy source file, processes it, and produces
1310 output. This is accomplished via expansions, which are special signals to the
1311 EmPy system and are set off by a special prefix (by default the at sign, @@).
1312 EmPy can expand arbitrary Python expressions and statements in this way, as
1313 well as a variety of special forms. Textual data not explicitly delimited in
1314 this way is sent unaffected to the output, allowing Python to be used in
1315 effect as a markup language. Also supported are callbacks via hooks,
1316 recording and playback via diversions, and dynamic, chainable filters. The
1317 system is highly configurable via command line options and embedded
1319 (license license:lgpl2.1+)))
1321 (define-public python2-empy
1322 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1325 (arguments `(,@(package-arguments base)
1328 (define-public python2-element-tree
1330 (name "python2-element-tree")
1335 "http://effbot.org/media/downloads/elementtree-"
1336 version "-20050316.tar.gz"))
1339 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1340 (build-system python-build-system)
1342 `(#:python ,python-2 ; seems to be part of Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (synopsis "Toolkit for XML processing in Python")
1346 "ElementTree is a Python library supporting lightweight XML processing.")
1347 (home-page "http://effbot.org/zone/element-index.htm")
1348 (license (license:x11-style
1349 "http://docs.python.org/2/license.html"
1350 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1352 (define-public python2-pybugz
1354 (name "python2-pybugz")
1359 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1363 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1364 (patches (search-patches "pybugz-stty.patch"
1365 "pybugz-encode-error.patch"))))
1366 (build-system python-build-system)
1368 `(#:python ,python-2 ; SyntaxError with Python 3
1369 #:tests? #f)) ; no 'test' sub-command
1371 `(("element-tree" ,python2-element-tree)))
1372 (synopsis "Python and command-line interface to Bugzilla")
1374 "PyBugz is a Python library and command-line tool to query the Bugzilla
1375 bug tracking system. It is meant as an aid to speed up interaction with the
1377 (home-page "http://www.liquidx.net/pybugz/")
1378 (license license:gpl2)))
1380 (define-public python2-enum
1382 (name "python2-enum")
1386 (uri (pypi-uri "enum" version))
1389 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1390 (build-system python-build-system)
1392 `(#:python ,python-2))
1393 (home-page "http://pypi.python.org/pypi/enum/")
1394 (synopsis "Robust enumerated type support in Python")
1396 "This provides a module for robust enumerations in Python. It has
1397 been superseded by the Python standard library and is provided only for
1399 ;; Choice of either license.
1400 (license (list license:gpl3+ license:psfl))))
1402 (define-public python-enum34
1404 (name "python-enum34")
1409 (uri (pypi-uri "enum34" version))
1412 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1413 (build-system python-build-system)
1414 (home-page "https://pypi.python.org/pypi/enum34")
1415 (synopsis "Backported Python 3.4 Enum")
1417 "Enum34 is the new Python stdlib enum module available in Python 3.4
1418 backported for previous versions of Python from 2.4 to 3.3.")
1419 (license license:bsd-3)))
1421 (define-public python2-enum34
1422 (package-with-python2 python-enum34))
1424 (define-public python-parse-type
1426 (name "python-parse-type")
1431 (uri (pypi-uri "parse_type" version))
1434 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1435 (build-system python-build-system)
1437 `(("python-six" ,python-six)
1438 ("python-parse" ,python-parse)))
1440 `(("python-pytest" ,python-pytest)
1441 ("python-pytest-runner" ,python-pytest-runner)))
1442 (home-page "https://github.com/jenisys/parse_type")
1443 (synopsis "Extended parse module")
1445 "Parse_type extends the python parse module.")
1447 `((python2-variant . ,(delay python2-parse-type))))
1448 (license license:bsd-3)))
1450 (define-public python2-parse-type
1451 (let ((base (package-with-python2
1452 (strip-python2-variant python-parse-type))))
1453 (package (inherit base)
1455 `(("python2-enum34" ,python2-enum34)
1456 ,@(package-propagated-inputs base))))))
1458 (define-public python-parse
1460 (name "python-parse")
1465 (uri (pypi-uri "parse" version))
1468 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1469 (build-system python-build-system)
1472 (modify-phases %standard-phases
1474 (lambda _ (invoke "python" "test_parse.py"))))))
1475 (home-page "https://github.com/r1chardj0n3s/parse")
1476 (synopsis "Parse strings")
1478 "Parse strings using a specification based on the Python @code{format()}
1480 (license license:x11)))
1482 (define-public python-polib
1484 (name "python-polib")
1488 (uri (pypi-uri "polib" version))
1491 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1492 (build-system python-build-system)
1493 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1494 (synopsis "Manipulate, create and modify gettext files")
1495 (description "Polib can manipulate any gettext format (po, pot and mo)
1496 files. It can be used to create po files from scratch or to modify
1498 (license license:expat)))
1500 (define-public python2-polib
1501 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1504 (arguments `(,@(package-arguments base)
1505 ;; Tests don't work with python2.
1508 (define-public python-poyo
1510 (name "python-poyo")
1515 (uri (pypi-uri "poyo" version))
1518 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1519 (build-system python-build-system)
1520 (home-page "https://github.com/hackebrot/poyo")
1521 (synopsis "Lightweight YAML Parser for Python")
1523 "This package provides a lightweight YAML Parser for Python. It supports
1524 only a chosen subset of the YAML format that is required to parse cookiecutter
1525 user configuration files. It does not have support for serializing into YAML
1526 and is not compatible with JSON.")
1527 (license license:expat)))
1529 (define-public scons
1536 (url "https://github.com/SCons/scons.git")
1538 (file-name (git-file-name name version))
1541 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1542 (build-system python-build-system)
1544 `(#:use-setuptools? #f ; still relies on distutils
1545 #:tests? #f ; no 'python setup.py test' command
1547 (modify-phases %standard-phases
1548 (add-before 'build 'bootstrap
1550 (substitute* "src/engine/SCons/compat/__init__.py"
1551 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1552 "sys.modules[new] = __import__(old)"))
1553 (substitute* "src/engine/SCons/Platform/__init__.py"
1554 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1555 "mod = __import__(full_name)"))
1556 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1557 (chdir "build/scons")
1559 (home-page "http://scons.org/")
1560 (synopsis "Software construction tool written in Python")
1562 "SCons is a software construction tool. Think of SCons as an improved,
1563 cross-platform substitute for the classic Make utility with integrated
1564 functionality similar to autoconf/automake and compiler caches such as ccache.
1565 In short, SCons is an easier, more reliable and faster way to build
1567 (license license:x11)))
1569 (define-public scons-python2
1571 (inherit (package-with-python2 scons))
1572 (name "scons-python2")))
1574 (define-public python-extras
1576 (name "python-extras")
1581 (uri (pypi-uri "extras" version))
1584 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1585 (build-system python-build-system)
1587 ;; FIXME: Circular dependency on testtools.
1589 (home-page "https://github.com/testing-cabal/extras")
1590 (synopsis "Useful extensions to the Python standard library")
1592 "Extras is a set of extensions to the Python standard library.")
1593 (license license:expat)))
1595 (define-public python2-extras
1596 (package-with-python2 python-extras))
1598 (define-public python-mimeparse
1600 (name "python-mimeparse")
1605 (uri (pypi-uri "python-mimeparse" version))
1608 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1609 (build-system python-build-system)
1612 (modify-phases %standard-phases
1615 (invoke "./mimeparse_test.py"))))))
1617 "https://github.com/dbtsai/python-mimeparse")
1618 (synopsis "Python library for parsing MIME types")
1620 "Mimeparse provides basic functions for parsing MIME type names and
1621 matching them against a list of media-ranges.")
1622 (license license:expat)))
1624 (define-public python2-mimeparse
1625 (package-with-python2 python-mimeparse))
1627 (define-public python-miniboa
1629 (name "python-miniboa")
1634 (uri (pypi-uri "miniboa" version))
1637 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1638 (build-system python-build-system)
1639 (home-page "https://github.com/shmup/miniboa")
1640 (synopsis "Simple, single-threaded Telnet server")
1642 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1644 (license license:asl2.0)))
1646 (define-public python2-miniboa
1647 (package-with-python2 python-miniboa))
1649 (define-public python-pafy
1651 (name "python-pafy")
1656 (uri (pypi-uri "pafy" version))
1659 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1660 (build-system python-build-system)
1662 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1664 ;; Youtube-dl is a python package which is imported in the file
1665 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1666 `(("youtube-dl" ,youtube-dl)))
1667 (home-page "https://np1.github.io/pafy/")
1668 (synopsis "Retrieve YouTube content and metadata")
1670 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1671 (license license:lgpl3+)))
1673 (define-public python2-funcsigs
1675 (name "python2-funcsigs")
1679 (uri (pypi-uri "funcsigs" version))
1682 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1683 (build-system python-build-system)
1685 `(#:python ,python-2))
1687 `(("python2-unittest2" ,python2-unittest2)))
1688 (home-page "http://funcsigs.readthedocs.org")
1689 (synopsis "Python function signatures from PEP362")
1691 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1692 (license license:asl2.0)))
1694 (define-public python2-funcsigs-bootstrap
1696 (inherit python2-funcsigs)
1697 (name "python2-funcsigs-bootstrap")
1701 ,@(package-arguments python2-funcsigs)))))
1703 (define-public python-py
1710 (uri (pypi-uri "py" version))
1713 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1714 (build-system python-build-system)
1716 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1717 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1718 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1719 ;; Is this module globally installed?"
1722 `(("python-setuptools-scm" ,python-setuptools-scm)))
1723 (home-page "https://github.com/pytest-dev/py")
1724 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1726 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1727 code introspection, and logging.")
1728 (license license:expat)))
1730 (define-public python2-py
1731 (package-with-python2 python-py))
1733 ;; Recent versions of python-fixtures and python-testrepository need
1734 ;; python-pbr for packaging, which itself needs these two packages for
1736 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1737 ;; same source, just without any test dependencies and with tests disabled.
1738 ;; python-pbr-minmal is then used to package python-fixtures and
1739 ;; python-testrepository.
1740 ;; Strictly speaking we currently could remove the test-requirements from the
1741 ;; normal python-pbr package (and save this package) since test are disabled
1742 ;; there anyway. But this may change in future.
1743 (define-public python-pbr-minimal
1745 (name "python-pbr-minimal")
1750 (uri (pypi-uri "pbr" version))
1753 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1754 (build-system python-build-system)
1757 (home-page "http://docs.openstack.org/developer/pbr/")
1758 (synopsis "Minimal build of python-pbr used for bootstrapping")
1760 "Used only for bootstrapping python2-pbr, you should not need this.")
1761 (license license:asl2.0)))
1763 (define-public python2-pbr-minimal
1764 (package-with-python2 python-pbr-minimal))
1766 (define-public python-pbr
1768 (inherit python-pbr-minimal)
1771 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1773 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1775 `(("python-fixtures" ,python-fixtures-bootstrap)
1776 ;; discover, coverage, hacking, subunit
1777 ("python-mock" ,python-mock)
1778 ("python-six" ,python-six)
1779 ("python-sphinx" ,python-sphinx)
1780 ("python-testrepository" ,python-testrepository-bootstrap)
1781 ("python-testresources" ,python-testresources-bootstrap)
1782 ("python-testscenarios" ,python-testscenarios-bootstrap)
1783 ("python-testtools" ,python-testtools-bootstrap)
1784 ("python-virtualenv" ,python-virtualenv)))
1785 (synopsis "Enhance the default behavior of Python’s setuptools")
1787 "Python Build Reasonableness (PBR) is a library that injects some useful
1788 and sensible default behaviors into your setuptools run. It will set
1789 versions, process requirements files and generate AUTHORS and ChangeLog file
1790 from git information.
1793 (define-public python2-pbr
1794 (package-with-python2 python-pbr))
1796 (define-public python-pyrsistent
1798 (name "python-pyrsistent")
1800 (home-page "https://github.com/tobgu/pyrsistent")
1803 (uri (pypi-uri "pyrsistent" version))
1806 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1807 (build-system python-build-system)
1809 `(("python-hypothesis" ,python-hypothesis)
1810 ("python-pytest" ,python-pytest)
1811 ("python-pytest-runner" ,python-pytest-runner)))
1813 `(("python-six" ,python-six)))
1814 (synopsis "Persistent data structures for Python")
1816 "Pyrsistent is a number of persistent collections (by some referred to as
1817 functional data structures). Persistent in the sense that they are immutable.
1819 All methods on a data structure that would normally mutate it instead return a
1820 new copy of the structure containing the requested updates. The original
1821 structure is left untouched.")
1822 (license license:expat)))
1824 (define-public python2-pyrsistent
1825 (package-with-python2 python-pyrsistent))
1827 (define-public python-exif-read
1829 (name "python-exif-read")
1833 (uri (pypi-uri "ExifRead" version))
1836 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1837 (build-system python-build-system)
1838 (arguments `(#:tests? #f)) ; no tests
1839 (home-page "https://github.com/ianare/exif-py")
1840 (synopsis "Python library to extract EXIF data from image files")
1842 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1844 (license license:bsd-3)))
1846 (define-public python2-exif-read
1847 (package-with-python2 python-exif-read))
1849 (define-public python-pyld
1851 (name "python-pyld")
1855 (uri (pypi-uri "PyLD" version))
1858 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1859 (build-system python-build-system)
1860 (home-page "https://github.com/digitalbazaar/pyld")
1861 (synopsis "Python implementation of the JSON-LD specification")
1863 "PyLD is an implementation of the JSON-LD specification.")
1864 (license license:bsd-3)))
1866 (define-public python2-pyld
1867 (package-with-python2 python-pyld))
1869 (define-public python-click
1871 (name "python-click")
1876 (uri (pypi-uri "click" version))
1879 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1880 (build-system python-build-system)
1883 (modify-phases %standard-phases
1884 (add-after 'unpack 'fix-paths
1885 (lambda* (#:key inputs #:allow-other-keys)
1886 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1887 "cross-libc" "libc"))))
1888 (substitute* "click/_unicodefun.py"
1890 (string-append "'" glibc "/bin/locale'"))))
1894 (invoke "python" "-m" "pytest"))))))
1896 `(("python-pytest" ,python-pytest)))
1897 (home-page "https://palletsprojects.com/p/click/")
1898 (synopsis "Command line library for Python")
1900 "Click is a Python package for creating command line interfaces in a
1901 composable way with as little code as necessary. Its name stands for
1902 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1903 with sensible defaults out of the box.")
1904 (license license:bsd-3)))
1906 (define-public python2-click
1907 (package-with-python2 python-click))
1909 (define-public python-wheel
1911 (name "python-wheel")
1916 (uri (pypi-uri "wheel" version))
1919 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1920 (build-system python-build-system)
1922 `(("python-jsonschema" ,python-jsonschema)
1923 ("python-pytest-cov" ,python-pytest-cov)))
1924 (home-page "https://bitbucket.org/pypa/wheel/")
1925 (synopsis "Format for built Python packages")
1927 "A wheel is a ZIP-format archive with a specially formatted filename and
1928 the @code{.whl} extension. It is designed to contain all the files for a PEP
1929 376 compatible install in a way that is very close to the on-disk format. Many
1930 packages will be properly installed with only the @code{Unpack} step and the
1931 unpacked archive preserves enough information to @code{Spread} (copy data and
1932 scripts to their final locations) at any later time. Wheel files can be
1933 installed with a newer @code{pip} or with wheel's own command line utility.")
1934 (license license:expat)
1935 (properties `((python2-variant . ,(delay python2-wheel))))))
1937 (define-public python2-wheel
1938 (let ((wheel (package-with-python2
1939 (strip-python2-variant python-wheel))))
1940 (package (inherit wheel)
1941 (native-inputs `(("python2-functools32" ,python2-functools32)
1942 ,@(package-native-inputs wheel))))))
1944 (define-public python-vcversioner
1946 (name "python-vcversioner")
1947 (version "2.16.0.0")
1951 (uri (pypi-uri "vcversioner" version))
1954 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1955 (build-system python-build-system)
1956 (synopsis "Python library for version number discovery")
1957 (description "Vcversioner is a Python library that inspects tagging
1958 information in a variety of version control systems in order to discover
1960 (home-page "https://github.com/habnabit/vcversioner")
1961 (license license:isc)))
1963 (define-public python2-vcversioner
1964 (package-with-python2 python-vcversioner))
1966 (define-public python-jdcal
1968 (name "python-jdcal")
1973 (uri (pypi-uri "jdcal" version))
1976 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1977 (build-system python-build-system)
1979 `(#:phases (modify-phases %standard-phases
1982 (invoke "pytest"))))))
1984 `(("python-pytest" ,python-pytest)))
1985 (home-page "https://github.com/phn/jdcal")
1986 (synopsis "Functions to convert between Julian dates Gregorian dates")
1987 (description "This Python library provides functions for converting
1988 between Julian dates and Gregorian dates.")
1989 (license license:bsd-2)))
1991 (define-public python2-jdcal
1992 (package-with-python2 python-jdcal))
1994 (define-public python-jsonschema
1996 (name "python-jsonschema")
2000 (uri (pypi-uri "jsonschema" version))
2003 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2004 (build-system python-build-system)
2007 (modify-phases %standard-phases
2010 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2011 (invoke "trial" "jsonschema"))))))
2013 `(("python-setuptools_scm" ,python-setuptools-scm)
2014 ("python-twisted" ,python-twisted)))
2016 `(("python-attrs" ,python-attrs)
2017 ("python-pyrsistent" ,python-pyrsistent)
2018 ("python-six" ,python-six)))
2019 (home-page "https://github.com/Julian/jsonschema")
2020 (synopsis "Implementation of JSON Schema for Python")
2022 "Jsonschema is an implementation of JSON Schema for Python.")
2023 (license license:expat)
2024 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2026 (define-public python2-jsonschema
2027 (let ((jsonschema (package-with-python2
2028 (strip-python2-variant python-jsonschema))))
2029 (package (inherit jsonschema)
2031 `(("python2-functools32" ,python2-functools32)
2032 ,@(package-propagated-inputs jsonschema))))))
2034 ;; This old version is still required by docker-compose as of 1.24.0.
2035 (define-public python-jsonschema-2.6
2037 (name "python-jsonschema")
2041 (uri (pypi-uri "jsonschema" version))
2044 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2045 (build-system python-build-system)
2048 (modify-phases %standard-phases
2049 (replace 'check (lambda _ (invoke "nosetests"))))))
2051 `(("python-nose" ,python-nose)
2052 ("python-vcversioner" ,python-vcversioner)))
2053 (home-page "https://github.com/Julian/jsonschema")
2054 (synopsis "Implementation of JSON Schema for Python")
2056 "Jsonschema is an implementation of JSON Schema for Python.")
2057 (license license:expat)
2058 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2060 (define-public python-schema
2062 (name "python-schema")
2067 (uri (pypi-uri "schema" version))
2070 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2071 (build-system python-build-system)
2073 `(("python-pytest" ,python-pytest)))
2074 (home-page "https://github.com/keleshev/schema")
2075 (synopsis "Simple data validation library")
2077 "@code{python-schema} is a library for validating Python data
2078 structures, such as those obtained from config-files, forms, external
2079 services or command-line parsing, converted from JSON/YAML (or
2080 something else) to Python data-types.")
2081 (license license:psfl)))
2083 (define-public python2-schema
2084 (package-with-python2 python-schema))
2086 (define-public python-schema-0.5
2087 (package (inherit python-schema)
2092 (uri (pypi-uri "schema" version))
2095 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2097 (define-public python2-schema-0.5
2098 (package-with-python2 python-schema-0.5))
2100 (define-public python-kitchen
2102 (name "python-kitchen")
2107 (uri (pypi-uri "kitchen" version))
2110 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2111 (build-system python-build-system)
2113 `(("python-chardet" ,python-chardet)))
2114 (home-page "https://github.com/fedora-infra/kitchen")
2115 (synopsis "Python API for snippets")
2116 (description "@code{kitchen} module provides a python API for all sorts of
2117 little useful snippets of code that everybody ends up writing for their projects
2118 but never seem big enough to build an independent release. Use kitchen and stop
2119 cutting and pasting that code over and over.")
2120 (license (list license:lgpl2.1+
2121 ;; subprocess.py, test_subprocess.py,
2122 ;; kitchen/pycompat25/defaultdict.py:
2125 (define-public python2-kitchen
2126 (package-with-python2 python-kitchen))
2128 (define-public python-unidecode
2130 (name "python-unidecode")
2134 (uri (pypi-uri "Unidecode" version))
2137 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2138 (build-system python-build-system)
2139 (home-page "https://pypi.python.org/pypi/Unidecode")
2140 (synopsis "ASCII transliterations of Unicode text")
2142 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2143 useful when integrating with legacy code that doesn't support Unicode, or for
2144 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2145 machine identifiers from human-readable Unicode strings that should still be
2146 somewhat intelligible.")
2147 (license license:gpl2+)))
2149 (define-public python2-unidecode
2150 (package-with-python2 python-unidecode))
2152 (define-public python-pyjwt
2154 (name "python-pyjwt")
2159 (uri (pypi-uri "PyJWT" version))
2162 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2163 (modules '((guix build utils)))
2166 (for-each delete-file-recursively
2167 (find-files "." "\\.pyc$"))
2169 (build-system python-build-system)
2171 `(("python-pytest" ,python-pytest)
2172 ("python-pytest-cov" ,python-pytest-cov)
2173 ("python-pytest-runner" ,python-pytest-runner)))
2174 (home-page "https://github.com/progrium/pyjwt")
2175 (synopsis "JSON Web Token implementation in Python")
2177 "PyJWT is a JSON Web Token implementation written in Python.")
2178 (license license:expat)))
2180 (define-public python2-pyjwt
2181 (package-with-python2 python-pyjwt))
2183 (define-public python-pykka
2185 (name "python-pykka")
2190 (uri (pypi-uri "Pykka" version))
2193 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2194 (build-system python-build-system)
2196 `(("python-mock" ,python-mock)
2197 ("python-nose" ,python-nose)
2198 ("python-gevent" ,python-gevent)
2199 ("python-eventlet" ,python-eventlet)))
2200 (home-page "https://www.pykka.org/")
2201 (synopsis "Pykka is a Python implementation of the actor model")
2203 "Pykka is a Python implementation of the actor model.
2204 The actor model introduces some simple rules to control the sharing
2205 of state and cooperation between execution units, which makes it
2206 easier to build concurrent applications.")
2207 (license license:asl2.0)))
2209 (define-public python2-pykka
2210 (package-with-python2 python-pykka))
2212 (define-public python-pymsgbox
2214 (name "python-pymsgbox")
2220 ;; LICENSE.txt is not present on pypi
2221 (url "https://github.com/asweigart/PyMsgBox")
2222 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2223 (file-name (git-file-name name version))
2226 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2228 ;; Circular dependency to run tests:
2229 ;; Tests need pyautogui, which depends on pymsgbox.
2231 (build-system python-build-system)
2232 (home-page "https://github.com/asweigart/PyMsgBox")
2233 (synopsis "Python module for JavaScript-like message boxes")
2235 "PyMsgBox is a simple, cross-platform, pure Python module for
2236 JavaScript-like message boxes. Types of dialog boxes include:
2244 (license license:bsd-3)))
2246 (define-public python-pympler
2248 (name "python-pympler")
2249 (home-page "https://pythonhosted.org/Pympler/")
2253 (uri (pypi-uri "Pympler" version))
2256 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2257 (build-system python-build-system)
2259 `(#:phases (modify-phases %standard-phases
2261 (add-after 'install 'check
2262 (lambda* (#:key inputs outputs #:allow-other-keys)
2263 (add-installed-pythonpath inputs outputs)
2264 (invoke "python" "setup.py" "test"))))))
2265 (synopsis "Measure, monitor and analyze memory behavior")
2267 "Pympler is a development tool to measure, monitor and analyze
2268 the memory behavior of Python objects in a running Python application.
2270 By pympling a Python application, detailed insight in the size and the
2271 lifetime of Python objects can be obtained. Undesirable or unexpected
2272 runtime behavior like memory bloat and other @samp{pymples} can easily
2275 A web profiling frontend exposes process statistics, garbage
2276 visualisation and class tracker statistics.")
2277 (license license:asl2.0)))
2279 (define-public python2-pympler
2280 (package-with-python2 python-pympler))
2282 (define-public python-itsdangerous
2284 (name "python-itsdangerous")
2289 (uri (pypi-uri "itsdangerous" version))
2292 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2293 (build-system python-build-system)
2294 (home-page "https://palletsprojects.com/p/itsdangerous/")
2295 (synopsis "Python library for passing data to/from untrusted environments")
2297 "Itsdangerous provides various helpers to pass trusted data to untrusted
2298 environments and back.")
2299 (license license:bsd-3)))
2301 (define-public python2-itsdangerous
2302 (package-with-python2 python-itsdangerous))
2304 (define-public python-pyyaml
2306 (name "python-pyyaml")
2311 (uri (pypi-uri "PyYAML" version))
2314 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2315 (build-system python-build-system)
2317 `(("libyaml" ,libyaml)))
2318 (home-page "http://pyyaml.org/wiki/PyYAML")
2319 (synopsis "YAML parser and emitter for Python")
2321 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2322 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2323 API, and sensible error messages. PyYAML supports standard YAML tags and
2324 provides Python-specific tags that allow to represent an arbitrary Python
2326 (license license:expat)))
2328 (define-public python2-pyyaml
2329 (package-with-python2 python-pyyaml))
2331 (define-public python-vine
2333 (name "python-vine")
2338 (uri (pypi-uri "vine" version))
2341 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2342 (build-system python-build-system)
2344 `(("python-pytest" ,python-pytest)
2345 ("python-case" ,python-case)))
2346 (home-page "https://github.com/celery/vine")
2347 (synopsis "Promises for Python")
2349 "@code{vine} provides a special implementation of promises in that it can
2350 be used both for \"promise of a value\" and lazy evaluation. The biggest
2351 upside for this is that everything in a promise can also be a promise,
2352 e.g. filters, callbacks and errbacks can all be promises.")
2353 (license license:bsd-3)))
2355 (define-public python-virtualenv
2357 (name "python-virtualenv")
2362 (uri (pypi-uri "virtualenv" version))
2365 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2366 (build-system python-build-system)
2369 (modify-phases %standard-phases
2370 (add-before 'check 'disable-failing-test
2372 ;; Disable failing test. See upstream bug report
2373 ;; https://github.com/pypa/virtualenv/issues/957
2374 (substitute* "tests/test_virtualenv.py"
2375 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2378 `(("python-mock" ,python-mock)
2379 ("python-pytest" ,python-pytest)))
2380 (home-page "https://virtualenv.pypa.io/")
2381 (synopsis "Virtual Python environment builder")
2383 "Virtualenv is a tool to create isolated Python environments.")
2384 (license license:expat)))
2386 (define-public python2-virtualenv
2387 (package-with-python2 python-virtualenv))
2389 (define-public python-markupsafe
2391 (name "python-markupsafe")
2396 (uri (pypi-uri "MarkupSafe" version))
2399 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2400 (build-system python-build-system)
2402 `(#:modules ((ice-9 ftw)
2406 (guix build python-build-system))
2407 #:phases (modify-phases %standard-phases
2410 (let ((cwd (getcwd))
2411 (libdir (find (cut string-prefix? "lib." <>)
2412 (scandir "build"))))
2413 (setenv "PYTHONPATH"
2414 (string-append cwd "/build/" libdir ":"
2415 (getenv "PYTHONPATH")))
2416 (invoke "pytest" "-vv")))))))
2418 `(("python-pytest" ,python-pytest)))
2419 (home-page "https://github.com/mitsuhiko/markupsafe")
2420 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2422 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2424 (license license:bsd-3)))
2426 (define-public python2-markupsafe
2427 (package-with-python2 python-markupsafe))
2429 (define-public python-jinja2
2431 (name "python-jinja2")
2436 (uri (pypi-uri "Jinja2" version))
2439 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2440 (build-system python-build-system)
2442 `(("python-markupsafe" ,python-markupsafe)))
2443 (home-page "http://jinja.pocoo.org/")
2444 (synopsis "Python template engine")
2446 "Jinja2 is a small but fast and easy to use stand-alone template engine
2447 written in pure Python.")
2448 (license license:bsd-3)))
2450 (define-public python2-jinja2
2451 (package-with-python2 python-jinja2))
2453 (define-public python-jinja2-time
2455 (name "python-jinja2-time")
2460 (uri (pypi-uri "jinja2-time" version))
2463 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2464 (build-system python-build-system)
2466 `(("python-arrow" ,python-arrow)
2467 ("python-jinja2" ,python-jinja2)))
2469 "https://github.com/hackebrot/jinja2-time")
2470 (synopsis "Jinja2 Extension for Dates and Times")
2472 "This package provides an extension for the template engine Jinja2. It
2473 adds a 'now' tag providing a convenient access to the arrow.now() API from
2474 templates. A format string can be provided to control the output.")
2475 (license license:expat)))
2477 (define-public python-pystache
2479 (name "python-pystache")
2483 (uri (pypi-uri "pystache" version))
2486 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2487 (build-system python-build-system)
2489 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2490 (home-page "http://defunkt.io/pystache/")
2491 (synopsis "Python logic-less template engine")
2493 "Pystache is a Python implementation of the framework agnostic,
2494 logic-free templating system Mustache.")
2495 (license license:expat)
2496 (properties `((python2-variant . ,(delay python2-pystache))))))
2498 (define-public python2-pystache
2499 (package (inherit (package-with-python2
2500 (strip-python2-variant python-pystache)))
2502 `(#:python ,python-2
2504 (modify-phases %standard-phases
2507 (invoke "python" "test_pystache.py"))))))))
2509 (define-public python-joblib
2511 (name "python-joblib")
2515 (uri (pypi-uri "joblib" version))
2518 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2519 (build-system python-build-system)
2522 (modify-phases %standard-phases
2524 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2526 `(("python-pytest" ,python-pytest)))
2527 (home-page "https://joblib.readthedocs.io/")
2528 (synopsis "Using Python functions as pipeline jobs")
2530 "Joblib is a set of tools to provide lightweight pipelining in Python.
2531 In particular, joblib offers: transparent disk-caching of the output values
2532 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2533 logging and tracing of the execution.")
2534 (license license:bsd-3)))
2536 (define-public python2-joblib
2537 (package-with-python2 python-joblib))
2539 (define-public python-daemon
2541 (name "python-daemon")
2546 (uri (pypi-uri "python-daemon" version))
2549 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2550 (build-system python-build-system)
2553 (modify-phases %standard-phases
2554 (add-before 'check 'disable-tests
2556 ;; FIXME: Determine why test fails
2557 (substitute* "test/test_daemon.py"
2558 (("test_detaches_process_context")
2559 "skip_test_detaches_process_context"))
2562 `(("python-lockfile" ,python-lockfile)))
2564 `(("python-unittest2" ,python-unittest2)
2565 ("python-testtools" ,python-testtools)
2566 ("python-testscenarios" ,python-testscenarios)
2567 ("python-mock" ,python-mock)
2568 ("python-docutils" ,python-docutils)))
2569 (home-page "https://pagure.io/python-daemon/")
2570 (synopsis "Python library for making a Unix daemon process")
2571 (description "Python-daemon is a library that assists a Python program to
2572 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2574 This library provides a @code{DaemonContext} class that manages the following
2575 important tasks for becoming a daemon process:
2577 @item Detach the process into its own process group.
2578 @item Set process environment appropriate for running inside a chroot.
2579 @item Renounce suid and sgid privileges.
2580 @item Close all open file descriptors.
2581 @item Change the working directory, uid, gid, and umask.
2582 @item Set appropriate signal handlers.
2583 @item Open new file descriptors for stdin, stdout, and stderr.
2584 @item Manage a specified PID lock file.
2585 @item Register cleanup functions for at-exit processing.
2587 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2588 (license (list license:asl2.0 license:gpl3+))))
2590 (define-public python-docutils
2592 (name "python-docutils")
2597 (uri (pypi-uri "docutils" version))
2600 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2601 (build-system python-build-system)
2603 '(#:tests? #f)) ; no setup.py test command
2604 (home-page "http://docutils.sourceforge.net/")
2605 (synopsis "Python Documentation Utilities")
2607 "Docutils is a modular system for processing documentation into useful
2608 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2610 ;; Most of the source code is public domain, but some source files are
2611 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2612 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2614 (define-public python2-docutils
2615 (package-with-python2 python-docutils))
2617 (define-public python-pygments
2619 (name "python-pygments")
2624 (uri (pypi-uri "Pygments" version))
2627 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2628 (build-system python-build-system)
2630 ;; FIXME: Tests require sphinx, which depends on this.
2632 (home-page "http://pygments.org/")
2633 (synopsis "Syntax highlighting")
2635 "Pygments is a syntax highlighting package written in Python.")
2636 (license license:bsd-2)))
2638 (define-public python2-pygments
2639 (package-with-python2 python-pygments))
2641 (define-public python-bumpversion
2643 (name "python-bumpversion")
2648 (uri (pypi-uri "bumpversion" version))
2651 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2652 (build-system python-build-system)
2653 (home-page "https://github.com/peritus/bumpversion")
2654 (synopsis "Tool to bump software version")
2655 (description "This tool provides a command-line interface (CLI) to bump a
2656 software version simply.")
2657 (license license:expat)))
2659 (define-public python-deprecated
2661 (name "python-deprecated")
2667 (url "https://github.com/tantale/deprecated.git")
2668 (commit (string-append "v" version))))
2669 (file-name (git-file-name name version))
2672 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2673 (build-system python-build-system)
2675 `(#:phases (modify-phases %standard-phases
2678 (invoke "pytest"))))))
2680 `(("python-wrapt" ,python-wrapt)))
2682 `(("python-bumpversion" ,python-bumpversion)
2683 ("python-pytest" ,python-pytest)
2684 ("python-pytest-cov" ,python-pytest-cov)
2685 ("python-sphinx" ,python-sphinx)
2686 ("python-tox" ,python-tox)))
2687 (home-page "https://github.com/tantale/deprecated")
2688 (synopsis "Python decorator to deprecate classes, functions or methods")
2689 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2690 to deprecate classes, functions or methods.")
2691 (license license:expat)))
2693 (define-public python-pygithub
2695 (name "python-pygithub")
2698 ;; We fetch from the Git repo because there are no tests in the PyPI
2703 (url "https://github.com/PyGithub/PyGithub.git")
2704 (commit (string-append "v" version))))
2705 (file-name (git-file-name name version))
2707 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2708 (build-system python-build-system)
2710 `(#:phases (modify-phases %standard-phases
2711 ;; Some tests rely on the network.
2712 (add-after 'unpack 'disable-failing-tests
2714 (substitute* "tests/Issue142.py"
2715 (("testDecodeJson") "disabled_testDecodeJson"))
2717 (add-before 'check 'prepare-for-tests
2719 (for-each (lambda (f)
2721 (find-files "./tests"))
2722 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2723 (setenv "PYTHONPATH"
2724 (string-append "./tests:" (getenv "PYTHONPATH")))
2727 `(("python-deprecated" ,python-deprecated)
2728 ("python-pyjwt" ,python-pyjwt)
2729 ("python-requests" ,python-requests)))
2730 (native-inputs `(("python-httpretty" ,python-httpretty)))
2731 (home-page "https://pygithub.readthedocs.io/en/latest/")
2732 (synopsis "Python library for the GitHub API")
2733 (description "This library allows managing GitHub resources such as
2734 repositories, user profiles, and organizations in your Python applications,
2735 using version 3 of the GitHub application programming interface (API).")
2736 (license license:lgpl3+)))
2738 (define-public python-rellu
2740 (name "python-rellu")
2745 (uri (pypi-uri "rellu" version))
2748 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2749 (build-system python-build-system)
2751 `(("python-invoke" ,python-invoke)
2752 ("python-pygithub" ,python-pygithub)))
2753 (home-page "https://github.com/robotframework/rellu")
2754 (synopsis "Utilities to create PyPI releases")
2755 (description "This collection of utilities contains tooling and templates
2756 to assist in creating releases on GitHub and publishing them on PyPI. It is
2757 designed to be used by Robot Framework and tools and libraries in its
2758 ecosystem, but can naturally be used also by other projects.")
2759 (license license:asl2.0)))
2761 (define-public python-robotframework
2763 (name "python-robotframework")
2765 ;; There are no tests in the PyPI archive.
2770 (url "https://github.com/robotframework/robotframework.git")
2771 (commit (string-append "v" version))))
2772 (file-name (git-file-name name version))
2774 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2775 (patches (search-patches
2776 "python-robotframework-honor-source-date-epoch.patch"))))
2777 (build-system python-build-system)
2779 `(#:phases (modify-phases %standard-phases
2780 (add-before 'build 'build-and-install-doc
2781 (lambda* (#:key outputs #:allow-other-keys)
2782 (let* ((doc-output (assoc-ref outputs "doc"))
2783 (doc (string-append doc-output "/share/"
2784 ,name "-" ,version "/")))
2785 (invoke "invoke" "library-docs" "all")
2787 (copy-recursively "doc/libraries"
2788 (string-append doc "/libraries"))
2792 (invoke "python" "utest/run.py"))))))
2794 `(("python-invoke" ,python-invoke)
2795 ("python-rellu" ,python-rellu)
2796 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2797 (outputs '("out" "doc"))
2798 (home-page "https://robotframework.org")
2799 (synopsis "Generic automation framework")
2800 (description "Robot Framework is a generic automation framework for
2801 acceptance testing, acceptance test driven development (ATDD), and robotic
2802 process automation (RPA).")
2803 (license license:asl2.0)))
2805 (define-public python-robotframework-lint
2806 ;; There is no properly tagged release; the commit below seems to correspond
2807 ;; to the 0.9 stable release available from PyPI. The tests are not
2808 ;; included in the PyPI archive, so we fetch the sources from the upstream
2810 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2813 (name "python-robotframework-lint")
2814 (version (git-version "0.9.0" revision commit))
2819 (url "https://github.com/boakley/robotframework-lint.git")
2821 (file-name (git-file-name name version))
2824 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2825 (build-system python-build-system)
2828 (modify-phases %standard-phases
2831 (invoke "python" "-m" "robot" "-A"
2832 "tests/conf/default.args" "tests"))))))
2834 `(("python-robotframework" ,python-robotframework)))
2835 (home-page "https://github.com/boakley/robotframework-lint/")
2836 (synopsis "Static analysis tool (linter) for Robot Framework")
2837 (description "This package provides the @code{rflint} command-line
2838 utility, a static analysis tool (linter) for Robot Framework source files.")
2839 (license license:asl2.0))))
2841 (define-public python-robotframework-sshlibrary
2843 (name "python-robotframework-sshlibrary")
2845 ;; There are no tests in the PyPI archive.
2850 (url "https://github.com/robotframework/SSHLibrary.git")
2851 (commit (string-append "v" version))))
2852 (file-name (git-file-name name version))
2855 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2856 (build-system python-build-system)
2859 (modify-phases %standard-phases
2860 (add-before 'build 'build-and-install-doc
2861 (lambda* (#:key outputs #:allow-other-keys)
2862 (let* ((doc-output (assoc-ref outputs "doc"))
2863 (doc (string-append doc-output "/share/"
2864 ,name "-" ,version "/")))
2865 (invoke "chmod" "-R" "+w" "docs")
2866 (invoke "invoke" "kw-docs" "project-docs")
2868 (for-each delete-file (find-files "docs" "\\.rst"))
2869 (copy-recursively "docs" doc)
2873 ;; Some tests require an SSH server; we remove them.
2874 (delete-file "utest/test_client_api.py")
2875 (delete-file "utest/test_scp.py")
2876 (invoke "python" "utest/run.py"))))))
2878 `(("python-robotframework" ,python-robotframework)
2879 ("python-paramiko" ,python-paramiko)
2880 ("python-scp" ,python-scp)))
2882 `(("openssh" ,openssh)
2884 ;; To generate the documentation
2885 ("python-docutils" ,python-docutils)
2886 ("python-invoke" ,python-invoke)
2887 ("python-pygments" ,python-pygments)
2888 ("python-rellu" ,python-rellu)))
2889 (outputs '("out" "doc"))
2890 (home-page "https://github.com/robotframework/SSHLibrary")
2891 (synopsis "Robot Framework library for SSH and SFTP")
2892 (description "SSHLibrary is a Robot Framework library providing support
2893 for SSH and SFTP. It has the following main usages:
2895 @item Executing commands on the remote machine, either blocking or non-blocking.
2896 @item Writing and reading in an interactive shell.
2897 @item Transferring files and directories over SFTP.
2898 @item Ensuring that files and directories exist on the remote machine.
2900 (license license:asl2.0)))
2902 (define-public python-scp
2909 (uri (pypi-uri "scp" version))
2912 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2913 (build-system python-build-system)
2915 '(#:tests? #f)) ;tests require an SSH server
2917 `(("python-paramiko" ,python-paramiko)))
2918 (home-page "https://github.com/jbardin/scp.py")
2919 (synopsis "SCP protocol module for Python and Paramiko")
2920 (description "The scp module extends the Paramiko library to send and
2921 receive files via the SCP1 protocol, as implemented by the OpenSSH
2922 @command{scp} program.")
2923 (license license:gpl2+)))
2925 (define-public python-rst.linker
2927 (name "python-rst.linker")
2932 (uri (pypi-uri "rst.linker" version))
2934 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2935 (build-system python-build-system)
2937 `(("python-dateutil" ,python-dateutil)
2938 ("python-six" ,python-six)))
2940 `(("python-setuptools-scm" ,python-setuptools-scm)))
2941 ;; Test would require path.py, which would introduce a cyclic dependence.
2942 (arguments `(#:tests? #f))
2943 ;; Note: As of version 1.7 the documentation is not worth building.
2944 (home-page "https://github.com/jaraco/rst.linker")
2945 (synopsis "Sphinx plugin to add links and timestamps")
2946 (description "rst.linker allows to automatically replace text by a
2947 reStructuredText external reference or timestamps. It's primary purpose is to
2948 augment the changelog, but it can be used for other documents, too.")
2949 (license license:expat)))
2951 (define-public python2-rst.linker
2952 (package-with-python2 python-rst.linker))
2954 (define-public python-feedgenerator
2956 (name "python-feedgenerator")
2961 (uri (pypi-uri "feedgenerator" version))
2964 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2965 (modules '((guix build utils)))
2968 ;; Remove pre-compiled .pyc files from source.
2969 (for-each delete-file-recursively
2970 (find-files "." "__pycache__" #:directories? #t))
2971 (for-each delete-file (find-files "." "\\.pyc$"))
2973 (build-system python-build-system)
2975 `(("python-pytz" ,python-pytz)
2976 ("python-six" ,python-six)))
2977 (home-page "https://github.com/getpelican/feedgenerator")
2979 "Standalone version of Django's Atom/RSS feed generator")
2981 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2982 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2983 (license license:bsd-3)))
2985 (define-public python2-feedgenerator
2986 (package-with-python2 python-feedgenerator))
2988 (define-public python-toml
2990 (name "python-toml")
2995 (uri (pypi-uri "toml" version))
2998 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2999 (build-system python-build-system)
3001 `(#:tests? #f)) ;no tests suite in release
3002 (home-page "https://github.com/uiri/toml")
3003 (synopsis "Library for TOML")
3005 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3006 Language (TOML) configuration files.")
3007 (license license:expat)))
3009 (define-public python-jsonrpc-server
3011 (name "python-jsonrpc-server")
3016 (uri (pypi-uri "python-jsonrpc-server" version))
3019 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3020 (build-system python-build-system)
3022 `(("python-future" ,python-future)
3023 ("python-mock" ,python-mock)
3024 ("python-pytest" ,python-pytest)
3025 ("python-ujson" ,python-ujson)))
3027 "https://github.com/palantir/python-jsonrpc-server")
3028 (synopsis "JSON RPC 2.0 server library")
3030 "This package provides a JSON RPC 2.0 server library for Python.")
3031 (license license:expat)))
3033 (define-public python-pydocstyle
3035 (name "python-pydocstyle")
3040 (uri (pypi-uri "pydocstyle" version))
3043 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3044 (build-system python-build-system)
3046 `(("python-six" ,python-six)
3047 ("python-snowballstemmer" ,python-snowballstemmer)))
3049 "https://github.com/PyCQA/pydocstyle/")
3050 (synopsis "Python docstring style checker")
3052 "This package provides a style checker for the Python Language
3054 (license license:expat)))
3056 (define-public python-language-server
3058 (name "python-language-server")
3063 (uri (pypi-uri "python-language-server" version))
3066 "1nrs56jpx7dvghaas0kc5k9lxas5vr3awj3k87p4akki43nsblb8"))))
3067 (build-system python-build-system)
3069 `(("python-pluggy" ,python-pluggy)
3070 ("python-jsonrpc-server" ,python-jsonrpc-server)
3071 ("python-jedi" ,python-jedi)
3072 ("python-yapf" ,python-yapf)
3073 ("python-pyflakes" ,python-pyflakes)
3074 ("python-pydocstyle" ,python-pydocstyle)
3075 ("python-pycodestyle" ,python-pycodestyle)
3076 ("python-mccabe" ,python-mccabe)
3077 ("python-rope" ,python-rope)
3078 ("python-autopep8" ,python-autopep8)
3079 ("python-flake8" ,python-flake8)
3080 ("python-pylint" ,python-pylint)))
3081 (home-page "https://github.com/palantir/python-language-server")
3082 (synopsis "Python implementation of the Language Server Protocol")
3084 "The Python Language Server (pyls) is an implementation of the Python 3
3085 language specification for the Language Server Protocol (LSP). This tool is
3086 used in text editing environments to provide a complete and integrated
3087 feature-set for programming Python effectively.")
3088 (license license:expat)))
3090 (define-public python-black
3092 (name "python-black")
3097 (uri (pypi-uri "black" version))
3100 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3101 (build-system python-build-system)
3104 (modify-phases %standard-phases
3105 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3107 (let ((python3 (which "python3")))
3108 (substitute* '("tests/data/fmtonoff.py"
3109 "tests/data/string_prefixes.py"
3110 "tests/data/function.py")
3111 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3112 (string-append "#!" python3 (if (string? minor-version)
3116 `(("python-click" ,python-click)
3117 ("python-attrs" ,python-attrs)
3118 ("python-appdirs" ,python-appdirs)
3119 ("python-toml" ,python-toml)))
3120 (home-page "https://github.com/ambv/black")
3121 (synopsis "The uncompromising code formatter")
3122 (description "Black is the uncompromising Python code formatter.")
3123 (license license:expat)))
3125 (define-public python-blinker
3127 (name "python-blinker")
3132 (uri (pypi-uri "blinker" version))
3135 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3136 (build-system python-build-system)
3137 (home-page "http://pythonhosted.org/blinker/")
3138 (synopsis "Fast, simple object-to-object and broadcast signaling")
3140 "Blinker provides a fast dispatching system that allows any number of
3141 interested parties to subscribe to events, or \"signals\".")
3142 (license license:expat)))
3144 (define-public python2-blinker
3145 (package-with-python2 python-blinker))
3147 (define-public pelican
3154 (uri (pypi-uri "pelican" version))
3157 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3158 (build-system python-build-system)
3160 `(("python-blinker" ,python-blinker)
3161 ("python-dateutil" ,python-dateutil)
3162 ("python-docutils" ,python-docutils)
3163 ("python-feedgenerator" ,python-feedgenerator)
3164 ("python-jinja2" ,python-jinja2)
3165 ("python-markdown" ,python-markdown)
3166 ("python-pygments" ,python-pygments)
3167 ("python-pytz" ,python-pytz)
3168 ("python-six" ,python-six)
3169 ("python-unidecode" ,python-unidecode)))
3170 (home-page "https://getpelican.com/")
3172 `(;; XXX Requires a lot more packages to do unit tests :P
3174 (synopsis "Python-based static site publishing system")
3176 "Pelican is a tool to generate a static blog from reStructuredText,
3177 Markdown input files, and more. Pelican uses Jinja2 for templating
3178 and is very extensible.")
3179 (license license:agpl3+)))
3181 (define-public mallard-ducktype
3183 (name "mallard-ducktype")
3188 ;; git-reference because tests are not included in pypi source tarball
3189 ;; https://issues.guix.gnu.org/issue/36755#2
3191 (url "https://github.com/projectmallard/mallard-ducktype.git")
3193 (file-name (git-file-name name version))
3196 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3197 (build-system python-build-system)
3200 (modify-phases %standard-phases
3203 (with-directory-excursion "tests"
3204 (invoke "sh" "runtests")))))))
3205 (home-page "http://projectmallard.org")
3206 (synopsis "Convert Ducktype to Mallard documentation markup")
3208 "Ducktype is a lightweight syntax that can represent all the semantics
3209 of the Mallard XML documentation system. Ducktype files can be converted to
3210 Mallard using the @command{ducktype} tool. The yelp-tools package
3211 provides additional functionality on the produced Mallard documents.")
3212 (license license:expat)))
3214 (define-public python-cython
3216 (name "python-cython")
3221 (uri (pypi-uri "Cython" version))
3224 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3225 (build-system python-build-system)
3226 ;; we need the full python package and not just the python-wrapper
3227 ;; because we need libpython3.3m.so
3229 `(("python" ,python)))
3232 (modify-phases %standard-phases
3233 (add-before 'check 'set-HOME
3234 ;; some tests require access to "$HOME/.cython"
3235 (lambda _ (setenv "HOME" "/tmp") #t))
3237 ;; FIXME: These tests started failing on armhf after the 0.28 update
3238 ;; (commit c69d11c5930), both with an error such as this:
3239 ;; compiling (cpp) and running dictcomp ...
3240 ;; === C/C++ compiler error output: ===
3242 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3243 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3244 ,@(if (target-arm32?)
3245 `((add-before 'check 'disable-failing-tests
3247 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3248 (for-each (lambda (test)
3249 (format disabled-tests "~a\n" test))
3250 '("memslice" "dictcomp"))
3251 (close-port disabled-tests)))))
3256 ;; Disable compiler optimizations to greatly reduce the running
3257 ;; time of the test suite.
3258 (setenv "CFLAGS" "-O0")
3260 (invoke "python" "runtests.py" "-vv"
3261 "-j" (number->string (parallel-job-count))))))))
3262 (home-page "https://cython.org/")
3263 (synopsis "C extensions for Python")
3264 (description "Cython is an optimising static compiler for both the Python
3265 programming language and the extended Cython programming language. It makes
3266 writing C extensions for Python as easy as Python itself.")
3267 (license license:asl2.0)
3268 (properties `((python2-variant . ,(delay python2-cython))))))
3270 (define-public python2-cython
3271 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3274 (name "python2-cython")
3276 `(("python-2" ,python-2))) ;this is not automatically changed
3278 (substitute-keyword-arguments (package-arguments base)
3280 `(modify-phases ,phases
3281 (add-before 'check 'adjust-test_embed
3283 (substitute* "runtests.py"
3284 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3285 ;; so it can give the right -L flag to GCC when embedding static
3286 ;; builds of Python. It is unaware that the Python "config"
3287 ;; directory (where the static library lives) was renamed in
3288 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3289 ;; which works fine, because that is where the shared library is.
3291 ;; It also appears to be unaware that the Makefile in Demos/embed
3292 ;; already unconditionally pass the static library location to GCC,
3293 ;; after checking sysconfig.get_config_var('LIBPL).
3295 ;; The effect is that the linker is unable to resolve libexpat
3296 ;; symbols when building for Python 2, because neither the Python 2
3297 ;; shared library nor Expat is available. To fix it, we can either
3298 ;; add Expat as an input and make it visible to the linker, or just
3299 ;; prevent it from overriding the Python shared library location.
3300 ;; The end result is identical, so we take the easy route.
3301 ((" or libname not in os\\.listdir\\(libdir\\)")
3305 ;; The RPython toolchain currently does not support Python 3.
3306 (define-public python2-rpython
3308 (name "python2-rpython")
3313 (uri (pypi-uri "rpython" version))
3316 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3317 (build-system python-build-system)
3318 (arguments `(#:python ,python-2))
3320 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3321 (home-page "https://rpython.readthedocs.org")
3322 (synopsis "Framework for implementing interpreters and virtual machines")
3323 (description "RPython is a translation and support framework for
3324 producing implementations of dynamic languages, emphasizing a clean separation
3325 between language specification and implementation aspects.")
3326 (license license:expat)))
3328 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3329 ;; python-scipy still build, as these three packages are often used together.
3330 (define-public python-numpy
3332 (name "python-numpy")
3338 "https://github.com/numpy/numpy/releases/download/v"
3339 version "/numpy-" version ".tar.gz"))
3342 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3343 (build-system python-build-system)
3345 `(("openblas" ,openblas)
3346 ("lapack" ,lapack)))
3348 `(("python-cython" ,python-cython)
3349 ("python-pytest" ,python-pytest)
3350 ("gfortran" ,gfortran)))
3353 (modify-phases %standard-phases
3354 (add-before 'build 'configure-blas-lapack
3355 (lambda* (#:key inputs #:allow-other-keys)
3356 (call-with-output-file "site.cfg"
3360 libraries = openblas
3361 library_dirs = ~a/lib
3362 include_dirs = ~a/include
3364 # backslash-n to make emacs happy
3366 lapack_libs = lapack
3367 library_dirs = ~a/lib
3368 include_dirs = ~a/include
3370 (assoc-ref inputs "openblas")
3371 (assoc-ref inputs "openblas")
3372 (assoc-ref inputs "lapack")
3373 (assoc-ref inputs "lapack"))))
3375 (add-before 'build 'fix-executable-paths
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3378 ;; instead of /bin/sh.
3379 (substitute* "numpy/distutils/exec_command.py"
3380 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3381 (string-append match-start (assoc-ref inputs "bash") match-end)))
3382 ;; Use "gcc" executable, not "cc".
3383 (substitute* "numpy/distutils/system_info.py"
3384 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3385 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3387 ;; Tests can only be run after the library has been installed and not
3388 ;; within the source directory.
3390 (add-after 'install 'check
3391 (lambda* (#:key outputs inputs #:allow-other-keys)
3392 ;; Make installed package available for running the tests
3393 (add-installed-pythonpath inputs outputs)
3394 ;; Make sure "f2py" etc is found.
3395 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3396 ":" (getenv "PATH")))
3397 (with-directory-excursion "/tmp"
3398 (invoke "python" "-c"
3399 "import numpy; numpy.test(verbose=2)")))))))
3400 (home-page "http://www.numpy.org/")
3401 (synopsis "Fundamental package for scientific computing with Python")
3402 (description "NumPy is the fundamental package for scientific computing
3403 with Python. It contains among other things: a powerful N-dimensional array
3404 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3405 and Fortran code, useful linear algebra, Fourier transform, and random number
3407 (properties `((python2-variant . ,(delay python2-numpy))))
3408 (license license:bsd-3)))
3410 ;; Numpy 1.16.x are the last versions that support Python 2.
3411 (define-public python2-numpy
3412 (let ((numpy (package-with-python2
3413 (strip-python2-variant python-numpy))))
3420 "https://github.com/numpy/numpy/releases/download/v"
3421 version "/numpy-" version ".tar.gz"))
3424 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3426 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3427 ;; interest only for legacy code going back to NumPy's predecessor
3429 (define-public python2-numpy-1.8
3430 (package (inherit python2-numpy)
3436 (url "https://github.com/numpy/numpy")
3437 (commit (string-append "v" version))))
3438 (file-name (git-file-name "numpy" version))
3441 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3443 (substitute-keyword-arguments (package-arguments python2-numpy)
3445 `(modify-phases ,phases
3446 (replace 'configure-blas-lapack
3447 (lambda* (#:key inputs #:allow-other-keys)
3448 (call-with-output-file "site.cfg"
3452 libraries = openblas,lapack
3453 library_dirs = ~a/lib:~a/lib
3454 include_dirs = ~a/include:~a/include
3456 (assoc-ref inputs "openblas")
3457 (assoc-ref inputs "lapack")
3458 (assoc-ref inputs "openblas")
3459 (assoc-ref inputs "lapack"))))
3462 `(("python2-nose" ,python2-nose)))
3463 (description "NumPy is the fundamental package for scientific computing
3464 with Python. It contains among other things: a powerful N-dimensional array
3465 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3466 and Fortran code, useful linear algebra, Fourier transform, and random number
3467 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3468 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3470 (license license:bsd-3)))
3472 (define-public python-munch
3474 (name "python-munch")
3479 (uri (pypi-uri "munch" version))
3482 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3483 (build-system python-build-system)
3484 (home-page "https://github.com/Infinidat/munch")
3485 (synopsis "Dot-accessible dictionary")
3486 (description "Munch is a dot-accessible dictionary similar to JavaScript
3488 (license license:expat)))
3490 (define-public python2-munch
3491 (package-with-python2 python-munch))
3493 (define-public python-colormath
3495 (name "python-colormath")
3500 (uri (pypi-uri "colormath" version))
3503 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3504 (build-system python-build-system)
3506 `(("python-networkx" ,python-networkx)
3507 ("python-numpy" ,python-numpy)))
3508 (home-page "https://github.com/gtaylor/python-colormath")
3509 (synopsis "Color math and conversion library")
3511 "This is a Python library for color math and conversions.")
3512 (license license:bsd-3)))
3514 (define-public python2-colormath
3515 (package-with-python2 python-colormath))
3517 (define-public python-spectra
3519 (name "python-spectra")
3524 (uri (pypi-uri "spectra" version))
3527 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3528 (build-system python-build-system)
3531 (modify-phases %standard-phases
3533 (lambda _ (invoke "nosetests" "-v"))))))
3535 `(("python-colormath" ,python-colormath)))
3537 `(("python-nose" ,python-nose)))
3538 (home-page "https://github.com/jsvine/spectra")
3539 (synopsis "Color scales and color conversion")
3541 "This package provides a Python library intended to make color math,
3542 color scales, and color space conversion easy. It has support for:
3547 @item Color blending
3548 @item Brightening/darkening colors
3549 @item Saturating/desaturating colors
3550 @item Conversion to/from multiple color spaces.
3552 (license license:expat)))
3554 (define-public python2-spectra
3555 (package-with-python2 python-spectra))
3557 (define-public python-numpy-documentation
3559 (name "python-numpy-documentation")
3560 (version (package-version python-numpy))
3561 (source (package-source python-numpy))
3562 (build-system python-build-system)
3564 `(("python-matplotlib" ,python-matplotlib)
3565 ("python-numpy" ,python-numpy)
3566 ("pkg-config" ,pkg-config)
3567 ("python-sphinx" ,python-sphinx)
3568 ("python-numpydoc" ,python-numpydoc)
3569 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3571 texlive-generic-ifxetex
3572 texlive-generic-pdftex
3574 texlive-latex-capt-of
3576 texlive-latex-environ
3577 texlive-latex-eqparbox
3578 texlive-latex-etoolbox
3579 texlive-latex-expdlist
3580 texlive-latex-fancyhdr
3581 texlive-latex-fancyvrb
3582 texlive-latex-fncychap
3584 texlive-latex-framed
3585 texlive-latex-geometry
3586 texlive-latex-graphics
3587 texlive-latex-hyperref
3588 texlive-latex-mdwtools
3589 texlive-latex-multirow
3590 texlive-latex-needspace
3591 texlive-latex-oberdiek
3592 texlive-latex-parskip
3593 texlive-latex-preview
3594 texlive-latex-tabulary
3595 texlive-latex-threeparttable
3596 texlive-latex-titlesec
3597 texlive-latex-trimspaces
3599 texlive-latex-upquote
3601 texlive-latex-varwidth
3602 texlive-latex-wrapfig)))
3603 ("texinfo" ,texinfo)
3605 ("scipy-sphinx-theme"
3606 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3609 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3610 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3613 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3614 ,@(package-native-inputs python-numpy)))
3616 `(#:tests? #f ; we're only generating the documentation
3618 (modify-phases %standard-phases
3621 (lambda* (#:key inputs outputs #:allow-other-keys)
3622 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3624 data "/doc/" ,name "-"
3625 ,(package-version python-numpy)))
3626 (info-reader (string-append data "/info"))
3627 (html (string-append doc "/html"))
3628 (scipy-sphinx-theme "scipy-sphinx-theme")
3629 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3630 (pyver ,(string-append "PYVER=")))
3632 ;; FIXME: this is needed to for texlive-union to generate
3633 ;; fonts, which are not found.
3634 (setenv "HOME" "/tmp")
3636 (with-directory-excursion "doc"
3637 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3639 (invoke "make" "html" pyver)
3640 (invoke "make" "latex" "PAPER=a4" pyver)
3641 (invoke "make" "-C" "build/latex"
3642 "all-pdf" "PAPER=a4" pyver)
3643 ;; FIXME: Generation of the info file fails.
3644 ;; (invoke "make" "info" pyver)
3646 ;; (copy-file "build/texinfo/numpy.info"
3647 ;; (string-append info "/numpy.info"))
3648 (for-each (lambda (file)
3649 (copy-file (string-append "build/latex" file)
3650 (string-append doc file)))
3651 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3652 (with-directory-excursion "build/html"
3653 (for-each (lambda (file)
3654 (let* ((dir (dirname file))
3655 (tgt-dir (string-append html "/" dir)))
3656 (unless (equal? "." dir)
3658 (install-file file html)))
3659 (find-files "." ".*")))))
3661 (home-page (package-home-page python-numpy))
3662 (synopsis "Documentation for the python-numpy package")
3663 (description (package-description python-numpy))
3664 (license (package-license python-numpy))))
3666 (define-public python2-numpy-documentation
3667 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3669 (inherit numpy-documentation)
3670 (native-inputs `(("python2-functools32" ,python2-functools32)
3671 ,@(package-native-inputs numpy-documentation))))))
3673 (define-public python-pygit2
3675 (name "python-pygit2")
3680 (uri (pypi-uri "pygit2" version))
3682 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3683 (build-system python-build-system)
3685 '(#:tests? #f)) ; tests don't run correctly in our environment
3687 `(("python-six" ,python-six)
3688 ("python-cffi" ,python-cffi)
3689 ("libgit2" ,libgit2)
3690 ("python-tox" ,python-tox)))
3692 `(("python-pytest" ,python-pytest)))
3693 (home-page "https://github.com/libgit2/pygit2")
3694 (synopsis "Python bindings for libgit2")
3695 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3696 library, libgit2 implements Git plumbing.")
3697 ;; GPL2.0 only, with linking exception.
3698 (license license:gpl2)))
3700 (define-public python2-pygit2
3701 (package-with-python2 python-pygit2))
3703 (define-public python-pyparsing
3705 (name "python-pyparsing")
3710 (uri (pypi-uri "pyparsing" version))
3712 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3713 (build-system python-build-system)
3714 (outputs '("out" "doc"))
3716 `(#:tests? #f ; no test target
3718 (modify-phases %standard-phases
3719 (add-after 'install 'install-doc
3720 (lambda* (#:key outputs #:allow-other-keys)
3721 (let* ((doc (string-append (assoc-ref outputs "doc")
3722 "/share/doc/" ,name "-" ,version))
3723 (html-doc (string-append doc "/html"))
3724 (examples (string-append doc "/examples")))
3730 (install-file file tgt))
3731 (find-files dir ".*")))
3732 (list "docs" "htmldoc" "examples")
3733 (list doc html-doc examples))
3735 (home-page "https://github.com/pyparsing/pyparsing")
3736 (synopsis "Python parsing class library")
3738 "The pyparsing module is an alternative approach to creating and
3739 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3740 of regular expressions. The pyparsing module provides a library of classes
3741 that client code uses to construct the grammar directly in Python code.")
3742 (license license:expat)))
3744 (define-public python2-pyparsing
3745 (package-with-python2 python-pyparsing))
3747 (define-public python-numpydoc
3749 (name "python-numpydoc")
3754 (uri (pypi-uri "numpydoc" version))
3757 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3758 (build-system python-build-system)
3760 `(("python-sphinx" ,python-sphinx)))
3762 `(("python-nose" ,python-nose)))
3763 (home-page "https://pypi.python.org/pypi/numpydoc")
3765 "Numpy's Sphinx extensions")
3767 "Sphinx extension to support docstrings in Numpy format.")
3768 (license license:bsd-2)))
3770 (define-public python2-numpydoc
3771 (package-with-python2 python-numpydoc))
3773 (define-public python-numexpr
3775 (name "python-numexpr")
3780 (uri (pypi-uri "numexpr" version))
3783 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3784 (build-system python-build-system)
3785 (arguments `(#:tests? #f)) ; no tests included
3787 `(("python-numpy" ,python-numpy)))
3788 (home-page "https://github.com/pydata/numexpr")
3789 (synopsis "Fast numerical expression evaluator for NumPy")
3791 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3792 expressions that operate on arrays are accelerated and use less memory than
3793 doing the same calculation in Python. In addition, its multi-threaded
3794 capabilities can make use of all your cores, which may accelerate
3795 computations, most specially if they are not memory-bounded (e.g. those using
3796 transcendental functions).")
3797 (license license:expat)))
3799 (define-public python2-numexpr
3800 (package-with-python2 python-numexpr))
3802 (define-public python-cycler
3804 (name "python-cycler")
3808 (uri (pypi-uri "cycler" version))
3811 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3812 (build-system python-build-system)
3814 ;; XXX: The current version requires 'coveralls' which we don't have.
3815 ;; Enable this for the next release which uses 'python-pytest'.
3818 `(("python-six" ,python-six)))
3819 (home-page "http://matplotlib.org/cycler/")
3820 (synopsis "Composable keyword argument iterator")
3822 "When using @code{matplotlib} and plotting more than one line, it is
3823 common to want to be able to want to be able to cycle over one or more artist
3824 styles; but the plotting logic can quickly become involved.
3825 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3826 @code{Cycler} class was developed.")
3827 (license license:bsd-3)))
3829 (define-public python2-cycler
3830 (package-with-python2 python-cycler))
3832 (define-public python-colorspacious
3834 (name "python-colorspacious")
3840 (url "https://github.com/njsmith/colorspacious.git")
3841 (commit (string-append "v" version))))
3842 (file-name (git-file-name name version))
3844 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3845 (build-system python-build-system)
3847 `(("python-numpy" ,python-numpy)))
3849 `(("python-nose" ,python-nose)))
3852 (modify-phases %standard-phases
3855 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3856 (home-page "https://github.com/njsmith/colorspacious")
3857 (synopsis "Python library for colorspace conversions")
3858 (description "@code{colorspacious} is a Python library that lets you
3859 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3860 (license license:expat)))
3862 (define-public python2-colorspacious
3863 (package-with-python2 python-colorspacious))
3865 (define-public python-matplotlib
3867 (name "python-matplotlib")
3872 (uri (pypi-uri "matplotlib" version))
3875 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3876 (build-system python-build-system)
3877 (propagated-inputs ; the following packages are all needed at run time
3878 `(("python-cycler" ,python-cycler)
3879 ("python-kiwisolver" ,python-kiwisolver)
3880 ("python-pyparsing" ,python-pyparsing)
3881 ("python-pygobject" ,python-pygobject)
3882 ("gobject-introspection" ,gobject-introspection)
3883 ("python-tkinter" ,python "tk")
3884 ("python-dateutil" ,python-dateutil)
3885 ("python-numpy" ,python-numpy)
3886 ("python-pillow" ,python-pillow)
3887 ("python-pytz" ,python-pytz)
3888 ("python-six" ,python-six)
3889 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3890 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3891 ;; object. For this reason we need to import both libraries.
3892 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3893 ("python-pycairo" ,python-pycairo)
3894 ("python-cairocffi" ,python-cairocffi)))
3896 `(("libpng" ,libpng)
3897 ("imagemagick" ,imagemagick)
3898 ("freetype" ,freetype)
3901 ;; FIXME: Add backends when available.
3902 ;("python-wxpython" ,python-wxpython)
3906 `(("pkg-config" ,pkg-config)
3907 ("python-pytest" ,python-pytest)
3908 ("python-mock" ,python-mock)
3913 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3916 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3919 (modify-phases %standard-phases
3920 ;; XXX We disable all image comparison tests because we're using a
3921 ;; newer version of FreeType than matplotlib expects. This leads to
3922 ;; minor differences throughout the tests.
3923 (add-after 'unpack 'fix-and-disable-failing-tests
3925 (substitute* (append (find-files "lib/matplotlib/tests/"
3927 (find-files "lib/mpl_toolkits/tests"
3929 (("^from matplotlib" match)
3930 (string-append "import pytest\n" match))
3931 (("( *)@image_comparison" match indent)
3932 (string-append indent
3933 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3935 (substitute* "lib/matplotlib/tests/test_animation.py"
3936 (("/bin/sh") (which "sh")))
3937 (for-each delete-file
3938 ;; test_normal_axes, test_get_tightbbox_polar
3939 '("lib/matplotlib/tests/test_axes.py"
3940 ;; We don't use the webagg backend and this test forces it.
3941 "lib/matplotlib/tests/test_backend_webagg.py"
3942 ;; test_outward_ticks
3943 "lib/matplotlib/tests/test_tightlayout.py"
3944 ;; test_hidden_axes fails with minor extent
3945 ;; differences, possibly due to the use of a
3946 ;; different version of FreeType.
3947 "lib/matplotlib/tests/test_constrainedlayout.py"
3948 ;; Fontconfig returns no fonts.
3949 "lib/matplotlib/tests/test_font_manager.py"))
3951 (add-before 'install 'install-jquery-ui
3952 (lambda* (#:key outputs inputs #:allow-other-keys)
3953 (let ((dir (string-append (assoc-ref outputs "out")
3954 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3957 (assoc-ref inputs "jquery-ui")
3961 (lambda* (#:key outputs inputs #:allow-other-keys)
3962 (add-installed-pythonpath inputs outputs)
3963 (invoke "python" "tests.py" "-v"
3964 "-m" "not network and not webagg")))
3965 (add-before 'build 'configure-environment
3966 (lambda* (#:key outputs inputs #:allow-other-keys)
3967 (let ((cairo (assoc-ref inputs "cairo")))
3968 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3970 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3971 (setenv "HOME" (getcwd))
3972 (call-with-output-file "setup.cfg"
3974 (format port "[directories]~%
3975 basedirlist = ~a,~a~%
3978 (assoc-ref inputs "tcl")
3979 (assoc-ref inputs "tk")))))
3981 (home-page "https://matplotlib.org/")
3982 (synopsis "2D plotting library for Python")
3984 "Matplotlib is a Python 2D plotting library which produces publication
3985 quality figures in a variety of hardcopy formats and interactive environments
3986 across platforms. Matplotlib can be used in Python scripts, the python and
3987 ipython shell, web application servers, and six graphical user interface
3989 (license license:psfl)
3990 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3992 (define-public python2-matplotlib
3993 (let ((matplotlib (package-with-python2
3994 (strip-python2-variant python-matplotlib))))
3995 (package (inherit matplotlib)
4000 (uri (pypi-uri "matplotlib" version))
4003 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4005 (substitute-keyword-arguments (package-arguments matplotlib)
4007 `(modify-phases ,phases
4008 (replace 'install-jquery-ui
4009 (lambda* (#:key outputs inputs #:allow-other-keys)
4010 (let ((dir (string-append (assoc-ref outputs "out")
4011 "/lib/python2.7/site-packages/"
4012 "matplotlib/backends/web_backend/")))
4015 (assoc-ref inputs "jquery-ui")
4018 (delete 'fix-and-disable-failing-tests)
4019 (delete 'check))))) ; These tests weren't run the the past.
4020 ;; Make sure to use special packages for Python 2 instead
4021 ;; of those automatically rewritten by package-with-python2.
4023 `(("python2-pycairo" ,python2-pycairo)
4024 ("python2-backports-functools-lru-cache"
4025 ,python2-backports-functools-lru-cache)
4026 ("python2-functools32" ,python2-functools32)
4027 ("python2-pygobject-2" ,python2-pygobject-2)
4028 ("python2-subprocess32" ,python2-subprocess32)
4029 ("python2-tkinter" ,python-2 "tk")
4030 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4031 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4033 (define-public python-matplotlib-documentation
4035 (name "python-matplotlib-documentation")
4036 (version (package-version python-matplotlib))
4037 (source (package-source python-matplotlib))
4038 (build-system python-build-system)
4040 `(("python-matplotlib" ,python-matplotlib)
4041 ("python-colorspacious" ,python-colorspacious)
4042 ("python-sphinx" ,python-sphinx)
4043 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4044 ("python-sphinx-gallery" ,python-sphinx-gallery)
4045 ("python-numpydoc" ,python-numpydoc)
4046 ("python-ipython" ,python-ipython)
4047 ("python-ipykernel" ,python-ipykernel)
4048 ("python-mock" ,python-mock)
4049 ("graphviz" ,graphviz)
4050 ("texlive" ,(texlive-union (list texlive-amsfonts
4051 texlive-latex-amsmath
4052 texlive-latex-enumitem
4053 texlive-latex-expdlist
4054 texlive-latex-geometry
4055 texlive-latex-preview
4056 texlive-latex-type1cm
4059 texlive-generic-pdftex
4062 texlive-fonts-adobe-times
4063 texlive-fonts-txfonts)))
4064 ("texinfo" ,texinfo)
4065 ,@(package-native-inputs python-matplotlib)))
4067 `(#:tests? #f ; we're only generating documentation
4069 (modify-phases %standard-phases
4070 ;; The tests in python-matplotlib are run after the install phase, so
4071 ;; we need to delete the extra phase here.
4076 (setenv "PYTHONPATH"
4077 (string-append (getenv "PYTHONPATH")
4078 ":" (getcwd) "/../examples/units"))
4079 (substitute* "conf.py"
4081 (("^SHA = check_output.*")
4082 (string-append "SHA = \"" ,version "\"\n"))
4083 ;; Don't fetch intersphinx files from the Internet
4084 (("^explicit_order_folders" m)
4085 (string-append "intersphinx_mapping = {}\n" m))
4086 (("'sphinx.ext.intersphinx',") "")
4087 ;; Disable URL embedding which requires internet access.
4088 (("'https://docs.scipy.org/doc/numpy'") "None")
4089 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4091 "SPHINXBUILD=sphinx-build"
4092 "SPHINXOPTS=" ; don't abort on warnings
4095 (lambda* (#:key inputs outputs #:allow-other-keys)
4096 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4097 (doc (string-append data "/doc/python-matplotlib-" ,version))
4098 (info (string-append data "/info"))
4099 (html (string-append doc "/html")))
4102 (copy-recursively "build/html" html)
4103 (symlink (string-append html "/_images")
4104 (string-append info "/matplotlib-figures"))
4105 (with-directory-excursion "build/texinfo"
4106 (substitute* "matplotlib.texi"
4107 (("@image\\{([^,]*)" all file)
4108 (string-append "@image{matplotlib-figures/" file)))
4109 (symlink (string-append html "/_images")
4110 "./matplotlib-figures")
4111 (invoke "makeinfo" "--no-split"
4112 "-o" "matplotlib.info" "matplotlib.texi"))
4113 (install-file "build/texinfo/matplotlib.info" info))
4115 (home-page (package-home-page python-matplotlib))
4116 (synopsis "Documentation for the python-matplotlib package")
4117 (description (package-description python-matplotlib))
4118 (license (package-license python-matplotlib))))
4120 (define-public python2-matplotlib-documentation
4121 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4125 (alist-delete "python-sphinx-copybutton"
4126 (package-native-inputs parent))))))
4128 (define-public python-matplotlib-venn
4130 (name "python-matplotlib-venn")
4135 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4138 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4139 (build-system python-build-system)
4140 (arguments '(#:tests? #f)) ; tests are not included
4142 `(("python-matplotlib" ,python-matplotlib)
4143 ("python-numpy" ,python-numpy)
4144 ("python-scipy" ,python-scipy)))
4146 `(("unzip" ,unzip)))
4147 (home-page "https://github.com/konstantint/matplotlib-venn")
4148 (synopsis "Plot area-proportional Venn diagrams")
4150 "This package provides tools for plotting area-proportional two- and
4151 three-way Venn diagrams in @code{matplotlib}.")
4152 (license license:expat)))
4154 (define-public python2-pysnptools
4156 (name "python2-pysnptools")
4161 (uri (pypi-uri "pysnptools" version))
4164 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4165 (build-system python-build-system)
4167 `(#:python ,python-2 ; only Python 2.7 is supported
4168 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4170 `(("python2-numpy" ,python2-numpy)
4171 ("python2-scipy" ,python2-scipy)
4172 ("python2-pandas" ,python2-pandas)))
4174 `(("python2-cython" ,python2-cython)))
4175 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4176 (synopsis "Library for reading and manipulating genetic data")
4178 "PySnpTools is a library for reading and manipulating genetic data. It
4179 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4180 those files. It can also efficiently manipulate ranges of integers using set
4181 operators such as union, intersection, and difference.")
4182 (license license:asl2.0)))
4184 (define-public python-socksipy-branch
4186 (name "python-socksipy-branch")
4191 (uri (pypi-uri "SocksiPy-branch" version))
4194 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4195 (build-system python-build-system)
4197 `(#:tests? #f)) ; There are no tests
4198 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4199 (synopsis "Python SOCKS module")
4201 "SocksiPy - A Python SOCKS client module. It provides a
4202 socket-like interface that supports connections to any TCP
4203 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4204 The original version was developed by Dan Haim, this is a
4205 branch created by Mario Vilas to address some open issues,
4206 as the original project seems to have been abandoned circa 2007.")
4207 (license license:bsd-3)))
4209 (define-public python2-socksipy-branch
4210 (package-with-python2 python-socksipy-branch))
4212 (define-public python-socksipychain
4214 (name "python-socksipychain")
4220 (url "https://github.com/pagekite/PySocksipyChain.git")
4221 (commit (string-append "v" version))))
4222 (file-name (git-file-name name version))
4225 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4226 (build-system python-build-system)
4228 `(#:tests? #f)) ; Tests try to access the network.
4229 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4230 (synopsis "Python SOCKS module with chained proxies support")
4232 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4233 adds support for arbitrary chaining of proxy servers and various modes of
4234 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4235 a simple netcat replacement with chaining support.")
4236 (license license:bsd-3)))
4238 (define-public python-pycodestyle
4240 (name "python-pycodestyle")
4245 (uri (pypi-uri "pycodestyle" version))
4248 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4249 (build-system python-build-system)
4250 (home-page "https://pycodestyle.readthedocs.io/")
4251 (synopsis "Python style guide checker")
4252 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4253 Python code against some of the style conventions in
4254 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4255 (license license:expat)))
4257 (define-public python2-pycodestyle
4258 (package-with-python2 python-pycodestyle))
4260 (define-public python-multidict
4262 (name "python-multidict")
4267 (uri (pypi-uri "multidict" version))
4270 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4271 (build-system python-build-system)
4273 `(("python-pytest" ,python-pytest)
4274 ("python-pytest-runner" ,python-pytest-runner)))
4275 (home-page "https://github.com/aio-libs/multidict/")
4276 (synopsis "Multidict implementation")
4277 (description "Multidict is dict-like collection of key-value pairs
4278 where key might be occurred more than once in the container.")
4279 (license license:asl2.0)))
4281 (define-public python-orderedmultidict
4283 (name "python-orderedmultidict")
4288 (uri (pypi-uri "orderedmultidict" version))
4291 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4292 (build-system python-build-system)
4295 (modify-phases %standard-phases
4296 (add-after 'unpack 'fix-tests
4298 ;; The package uses nosetest for running the tests.
4299 ;; Adding this initfile allows to run the test suite
4300 ;; without requiring nosetest.
4301 (with-output-to-file "tests/__init__.py" newline)
4304 `(("python-six" ,python-six)))
4306 `(("python-pycodestyle" ,python-pycodestyle)))
4307 (home-page "https://github.com/gruns/orderedmultidict")
4308 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4309 (description "This package contains a library for ordered multivalue
4310 dictionaries. A multivalue dictionary is a dictionary that can store
4311 multiple values for the same key. An ordered multivalue dictionary is a
4312 multivalue dictionary that retains the order of insertions and deletions.")
4313 (license license:unlicense)))
4315 (define-public python2-orderedmultidict
4316 (package-with-python2 python-orderedmultidict))
4318 (define-public python-autopep8
4320 (name "python-autopep8")
4325 (uri (pypi-uri "autopep8" version))
4328 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4329 (build-system python-build-system)
4331 `(("python-pycodestyle" ,python-pycodestyle)))
4332 (home-page "https://github.com/hhatto/autopep8")
4333 (synopsis "Format Python code according to the PEP 8 style guide")
4335 "@code{autopep8} automatically formats Python code to conform to
4336 the PEP 8 style guide. It uses the pycodestyle utility to determine
4337 what parts of the code needs to be formatted. @code{autopep8} is
4338 capable of fixing most of the formatting issues that can be reported
4340 (license (license:non-copyleft
4341 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4343 (define-public python2-autopep8
4344 (package-with-python2 python-autopep8))
4346 (define-public python-distutils-extra
4348 (name "python-distutils-extra")
4353 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4354 version "/+download/python-distutils-extra-"
4358 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4359 (build-system python-build-system)
4360 (home-page "https://launchpad.net/python-distutils-extra/")
4361 (synopsis "Enhancements to Python's distutils")
4363 "The python-distutils-extra module enables you to easily integrate
4364 gettext support, themed icons, and scrollkeeper-based documentation into
4365 Python's distutils.")
4366 (license license:gpl2)))
4368 (define-public python2-distutils-extra
4369 (package-with-python2 python-distutils-extra))
4371 (define-public python2-elib.intl
4373 (name "python2-elib.intl")
4377 ;; This project doesn't tag releases or publish tarballs, so we take
4378 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4381 (url "https://github.com/dieterv/elib.intl.git")
4382 (commit "d09997cfef")))
4383 (file-name (string-append name "-" version "-checkout"))
4386 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4387 (build-system python-build-system)
4389 ;; incompatible with Python 3 (exception syntax)
4390 `(#:python ,python-2
4392 (home-page "https://github.com/dieterv/elib.intl")
4393 (synopsis "Enhanced internationalization for Python")
4395 "The elib.intl module provides enhanced internationalization (I18N)
4396 services for your Python modules and applications.")
4397 (license license:lgpl3+)))
4399 (define-public python-olefile
4401 (name "python-olefile")
4406 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4407 "download/v" version "/olefile-" version ".tar.gz"))
4408 (file-name (string-append name "-" version ".tar.gz"))
4411 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4412 (build-system python-build-system)
4413 (home-page "https://www.decalage.info/python/olefileio")
4414 (synopsis "Read and write Microsoft OLE2 files.")
4416 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4417 Storage or Compound Document, Microsoft Office). It is an improved version of
4418 the OleFileIO module from PIL, the Python Image Library.")
4419 (license license:bsd-3)))
4421 (define-public python2-olefile
4422 (package-with-python2 python-olefile))
4424 (define-public python-pillow
4426 (name "python-pillow")
4431 (uri (pypi-uri "Pillow" version))
4434 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4435 (build-system python-build-system)
4437 `(("python-pytest" ,python-pytest)))
4439 `(("freetype" ,freetype)
4441 ("libjpeg" ,libjpeg)
4442 ("libtiff" ,libtiff)
4443 ("libwebp" ,libwebp)
4444 ("openjpeg" ,openjpeg)
4447 `(("python-olefile" ,python-olefile)))
4450 (modify-phases %standard-phases
4451 (add-after 'unpack 'patch-ldconfig
4453 (substitute* "setup.py"
4454 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4456 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4459 (setenv "HOME" (getcwd))
4460 ;; Make installed package available for running the tests.
4461 (add-installed-pythonpath inputs outputs)
4462 (invoke "python" "selftest.py" "--installed")
4463 (invoke "python" "-m" "pytest" "-vv"))
4465 (home-page "https://python-pillow.org")
4466 (synopsis "Fork of the Python Imaging Library")
4468 "The Python Imaging Library adds image processing capabilities to your
4469 Python interpreter. This library provides extensive file format support, an
4470 efficient internal representation, and fairly powerful image processing
4471 capabilities. The core image library is designed for fast access to data
4472 stored in a few basic pixel formats. It should provide a solid foundation for
4473 a general image processing tool.")
4474 (license (license:x11-style
4475 "http://www.pythonware.com/products/pil/license.htm"
4476 "The PIL Software License"))))
4478 (define-public python2-pillow
4479 (package-with-python2 python-pillow))
4481 (define-public python-pycparser
4483 (name "python-pycparser")
4488 (uri (pypi-uri "pycparser" version))
4491 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4492 (outputs '("out" "doc"))
4493 (build-system python-build-system)
4495 `(("pkg-config" ,pkg-config)))
4498 (modify-phases %standard-phases
4501 (with-directory-excursion "tests"
4502 (invoke "python" "all_tests.py"))
4504 (add-after 'install 'install-doc
4505 (lambda* (#:key outputs #:allow-other-keys)
4506 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4507 (doc (string-append data "/doc/" ,name "-" ,version))
4508 (examples (string-append doc "/examples")))
4510 (for-each (lambda (file)
4511 (copy-file (string-append "." file)
4512 (string-append doc file)))
4513 '("/README.rst" "/CHANGES" "/LICENSE"))
4514 (copy-recursively "examples" examples)
4516 (home-page "https://github.com/eliben/pycparser")
4517 (synopsis "C parser in Python")
4519 "Pycparser is a complete parser of the C language, written in pure Python
4520 using the PLY parsing library. It parses C code into an AST and can serve as
4521 a front-end for C compilers or analysis tools.")
4522 (license license:bsd-3)))
4524 (define-public python2-pycparser
4525 (package-with-python2 python-pycparser))
4527 (define-public python-pywavelets
4529 (name "python-pywavelets")
4531 (home-page "https://github.com/PyWavelets/pywt")
4534 (uri (pypi-uri "PyWavelets" version))
4537 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4538 (build-system python-build-system)
4540 '(#:modules ((ice-9 ftw)
4544 (guix build python-build-system))
4545 #:phases (modify-phases %standard-phases
4548 (let ((cwd (getcwd))
4549 (libdir (find (cut string-prefix? "lib." <>)
4550 (scandir "build"))))
4551 (with-directory-excursion (string-append cwd "/build/" libdir)
4552 (invoke "nosetests" "-v" "."))))))))
4554 `(("python-matplotlib" ,python-matplotlib) ;for tests
4555 ("python-nose" ,python-nose)))
4557 `(("python-numpy" ,python-numpy)))
4558 (synopsis "Wavelet transforms in Python")
4560 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4561 mathematical basis functions that are localized in both time and frequency.
4562 Wavelet transforms are time-frequency transforms employing wavelets. They are
4563 similar to Fourier transforms, the difference being that Fourier transforms are
4564 localized only in frequency instead of in time and frequency.")
4565 (license license:expat)))
4567 (define-public python2-pywavelets
4568 (package-with-python2 python-pywavelets))
4570 (define-public python-xcffib
4572 (name "python-xcffib")
4577 (uri (pypi-uri "xcffib" version))
4580 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4581 (build-system python-build-system)
4583 `(("libxcb" ,libxcb)))
4585 `(("python-cffi" ,python-cffi) ; used at run time
4586 ("python-six" ,python-six)))
4588 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4591 (modify-phases %standard-phases
4592 (add-after 'unpack 'fix-libxcb-path
4593 (lambda* (#:key inputs #:allow-other-keys)
4594 (let ((libxcb (assoc-ref inputs "libxcb")))
4595 (substitute* '("xcffib/__init__.py")
4596 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4598 (add-after 'install 'install-doc
4599 (lambda* (#:key outputs #:allow-other-keys)
4600 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4601 "/doc/" ,name "-" ,version)))
4603 (copy-file "README.md"
4604 (string-append doc "/README.md"))
4606 (home-page "https://github.com/tych0/xcffib")
4607 (synopsis "XCB Python bindings")
4609 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4610 support for Python 3 and PyPy. It is based on cffi.")
4611 (license license:expat)))
4613 (define-public python2-xcffib
4614 (package-with-python2 python-xcffib))
4616 (define-public python-cairocffi
4618 (name "python-cairocffi")
4623 (uri (pypi-uri "cairocffi" version))
4626 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4627 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4628 (build-system python-build-system)
4629 (outputs '("out" "doc"))
4633 ("gdk-pixbuf" ,gdk-pixbuf)
4637 `(("pkg-config" ,pkg-config)
4638 ("python-pytest" ,python-pytest)
4639 ("python-pytest-cov" ,python-pytest-cov)
4640 ("python-pytest-runner" ,python-pytest-runner)
4641 ("python-sphinx" ,python-sphinx)
4642 ("python-docutils" ,python-docutils)))
4644 `(("python-xcffib" ,python-xcffib))) ; used at run time
4647 (modify-phases %standard-phases
4648 (add-after 'unpack 'patch-paths
4649 (lambda* (#:key inputs outputs #:allow-other-keys)
4650 (substitute* (find-files "." "\\.py$")
4651 (("dlopen\\(ffi, 'cairo'")
4652 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4653 "/lib/libcairo.so.2'"))
4654 (("dlopen\\(ffi, 'gdk-3'")
4655 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4656 "/lib/libgtk-3.so.0'"))
4657 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4658 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4659 "/lib/libgdk_pixbuf-2.0.so.0'"))
4660 (("dlopen\\(ffi, 'glib-2.0'")
4661 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4662 "/lib/libglib-2.0.so.0'"))
4663 (("dlopen\\(ffi, 'gobject-2.0'")
4664 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4665 "/lib/libgobject-2.0.so.0'"))
4666 (("dlopen\\(ffi, 'pangocairo-1.0'")
4667 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4668 "/lib/libpangocairo-1.0.so.0'"))
4669 (("dlopen\\(ffi, 'pango-1.0'")
4670 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4671 "/lib/libpango-1.0.so.0'")))
4673 (add-after 'install 'install-doc
4674 (lambda* (#:key inputs outputs #:allow-other-keys)
4675 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4676 (doc (string-append data "/doc/" ,name "-" ,version))
4677 (html (string-append doc "/html")))
4678 (setenv "LD_LIBRARY_PATH"
4679 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4680 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4681 (setenv "LANG" "en_US.UTF-8")
4683 (for-each (lambda (file)
4684 (copy-file (string-append "." file)
4685 (string-append doc file)))
4686 '("/README.rst" "/CHANGES" "/LICENSE"))
4687 (system* "python" "setup.py" "build_sphinx")
4688 (copy-recursively "docs/_build/html" html)
4690 (home-page "https://github.com/Kozea/cairocffi")
4691 (synopsis "Python bindings and object-oriented API for Cairo")
4693 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4694 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4695 graphics library with support for multiple backends including image buffers,
4696 PNG, PostScript, PDF, and SVG file output.")
4697 (license license:bsd-3)))
4699 (define-public python2-cairocffi
4700 (package-with-python2 python-cairocffi))
4702 (define-public python-decorator
4704 (name "python-decorator")
4709 (uri (pypi-uri "decorator" version))
4711 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4712 (build-system python-build-system)
4713 (home-page "https://pypi.python.org/pypi/decorator/")
4714 (synopsis "Python module to simplify usage of decorators")
4716 "The aim of the decorator module is to simplify the usage of decorators
4717 for the average programmer, and to popularize decorators usage giving examples
4718 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4719 etc. The core of this module is a decorator factory.")
4720 (license license:expat)))
4722 (define-public python2-decorator
4723 (package-with-python2 python-decorator))
4725 (define-public python-drmaa
4727 (name "python-drmaa")
4732 (uri (pypi-uri "drmaa" version))
4734 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4735 (build-system python-build-system)
4736 ;; The test suite requires libdrmaa which is provided by the cluster
4737 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4738 ;; should be set to the path of the libdrmaa library.
4739 (arguments '(#:tests? #f))
4741 `(("python-nose" ,python-nose)))
4742 (home-page "https://pypi.python.org/pypi/drmaa")
4743 (synopsis "Python bindings for the DRMAA library")
4745 "A Python package for Distributed Resource Management (DRM) job
4746 submission and control. This package is an implementation of the DRMAA 1.0
4747 Python language binding specification.")
4748 (license license:bsd-3)))
4750 (define-public python2-drmaa
4751 (package-with-python2 python-drmaa))
4753 (define-public python-grako
4755 (name "python-grako")
4761 (pypi-uri "grako" version ".zip"))
4764 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4765 (build-system python-build-system)
4766 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4769 ("python-pytest" ,python-pytest)
4770 ("python-pytest-runner" ,python-pytest-runner)))
4771 (home-page "https://bitbucket.org/neogeny/grako")
4772 (synopsis "EBNF parser generator")
4774 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4775 memoizing PEG/Packrat parser in Python.")
4776 (license license:bsd-3)))
4778 (define-public python2-grako
4779 (package-with-python2 python-grako))
4781 (define-public python-gridmap
4783 (name "python-gridmap")
4789 (url "https://github.com/pygridtools/gridmap.git")
4790 (commit (string-append "v" version))))
4791 (file-name (git-file-name name version))
4793 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4794 (build-system python-build-system)
4796 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4798 `(("python-psutil" ,python-psutil)
4799 ("python-drmaa" ,python-drmaa)
4800 ("python-pyzmq" ,python-pyzmq)))
4801 (home-page "https://github.com/pygridtools/gridmap")
4802 (synopsis "Create jobs on a cluster directly from Python")
4804 "Gridmap is a Python package to allow you to easily create jobs on the
4805 cluster directly from Python. You can directly map Python functions onto the
4806 cluster without needing to write any wrapper code yourself.")
4807 (license license:gpl3+)))
4809 (define-public python2-gridmap
4810 (package-with-python2 python-gridmap))
4812 (define-public python-honcho
4814 (name "python-honcho")
4820 (url "https://github.com/nickstenning/honcho.git")
4821 (commit (string-append "v" version))))
4822 (file-name (git-file-name name version))
4824 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4825 (build-system python-build-system)
4827 `(("python-pytest" ,python-pytest)
4828 ("python-mock" ,python-mock)
4829 ("python-tox" ,python-tox)
4830 ("which" ,which))) ;for tests
4832 `(("python-jinja2" ,python-jinja2)))
4835 (modify-phases %standard-phases
4837 (add-after 'install 'check
4838 (lambda* (#:key outputs inputs #:allow-other-keys)
4839 ;; fix honcho path in testsuite
4840 (substitute* "tests/conftest.py"
4841 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4842 "/bin/honcho" "'")))
4843 ;; It's easier to run tests after install.
4844 ;; Make installed package available for running the tests
4845 (add-installed-pythonpath inputs outputs)
4846 (invoke "py.test" "-v"))))))
4847 (home-page "https://github.com/nickstenning/honcho")
4848 (synopsis "Manage Procfile-based applications")
4850 "A Procfile is a file which describes how to run an application
4851 consisting of several processes. honcho starts all listed processes.
4852 The output of all running processes is collected by honcho and
4854 (license license:expat)))
4856 (define-public python2-honcho
4857 (package-with-python2 python-honcho))
4859 (define-public python-pexpect
4861 (name "python-pexpect")
4866 (uri (pypi-uri "pexpect" version))
4868 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4869 (build-system python-build-system)
4872 (modify-phases %standard-phases
4873 (add-before 'check 'prepare-tests
4875 (substitute* (find-files "tests")
4876 (("/bin/ls") (which "ls"))
4877 (("/bin/echo") (which "echo"))
4878 (("/bin/which") (which "which"))
4879 ;; Many tests try to use the /bin directory which
4880 ;; is not present in the build environment.
4881 ;; Use one that's non-empty and unlikely to change.
4882 (("/bin'") "/dev'"))
4883 ;; XXX: Socket connection test gets "Connection reset by peer".
4884 ;; Why does it not work? Delete for now.
4885 (delete-file "tests/test_socket.py")
4887 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4889 `(("python-nose" ,python-nose)
4890 ("python-pytest" ,python-pytest)
4893 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4895 `(("python-ptyprocess" ,python-ptyprocess)))
4896 (home-page "http://pexpect.readthedocs.org/")
4897 (synopsis "Controlling interactive console applications")
4899 "Pexpect is a pure Python module for spawning child applications;
4900 controlling them; and responding to expected patterns in their output.
4901 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4902 child application and control it as if a human were typing commands.")
4903 (license license:isc)))
4905 (define-public python2-pexpect
4906 (package-with-python2 python-pexpect))
4908 (define-public python-setuptools-scm
4910 (name "python-setuptools-scm")
4914 (uri (pypi-uri "setuptools_scm" version))
4917 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4918 (build-system python-build-system)
4919 (home-page "https://github.com/pypa/setuptools_scm/")
4920 (synopsis "Manage Python package versions in SCM metadata")
4922 "Setuptools_scm handles managing your Python package versions in
4923 @dfn{software configuration management} (SCM) metadata instead of declaring
4924 them as the version argument or in a SCM managed file.")
4925 (license license:expat)))
4927 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4928 (define-public python-setuptools-scm-3.3
4930 (inherit python-setuptools-scm)
4934 (uri (pypi-uri "setuptools_scm" version))
4937 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4939 (define-public python2-setuptools-scm
4940 (package-with-python2 python-setuptools-scm))
4942 (define-public python-pathlib2
4944 (name "python-pathlib2")
4949 (uri (pypi-uri "pathlib2" version))
4952 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4953 (build-system python-build-system)
4955 `(("python-scandir" ,python-scandir)
4956 ("python-six" ,python-six)))
4957 (home-page "https://pypi.python.org/pypi/pathlib2/")
4958 (synopsis "Object-oriented file system paths")
4959 (description "The goal of pathlib2 is to provide a backport of the
4960 standard @code{pathlib} module which tracks the standard library module, so
4961 all the newest features of the standard @code{pathlib} can be used also on
4962 older Python versions.")
4963 (license license:expat)))
4965 (define-public python-importlib-metadata
4967 (name "python-importlib-metadata")
4972 (uri (pypi-uri "importlib_metadata" version))
4974 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4975 (build-system python-build-system)
4977 `(("python-configparser" ,python-configparser)
4978 ("python-contextlib2" ,python-contextlib2)
4979 ("python-docutils" ,python-docutils)
4980 ("python-pathlib2" ,python-pathlib2)
4981 ("python-rst.linker" ,python-rst.linker)
4982 ("python-zipp" ,python-zipp)))
4984 `(("python-setuptools-scm" ,python-setuptools-scm)
4985 ("python-sphinx" ,python-sphinx)))
4986 (home-page "https://importlib-metadata.readthedocs.io/")
4987 (synopsis "Read metadata from Python packages")
4989 "@code{importlib_metadata} is a library which provides an API for
4990 accessing an installed Python package's metadata, such as its entry points or
4991 its top-level name. This functionality intends to replace most uses of
4992 @code{pkg_resources} entry point API and metadata API. Along with
4993 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4994 need to use the older and less efficient @code{pkg_resources} package.")
4995 (license license:asl2.0)))
4997 (define-public python-jaraco-packaging
4999 (name "python-jaraco-packaging")
5004 (uri (pypi-uri "jaraco.packaging" version))
5007 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5008 (build-system python-build-system)
5010 `(("python-pytest" ,python-pytest)
5011 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5012 ("python-pytest-flake8" ,python-pytest-flake8)
5013 ("python-rst.linker" ,python-rst.linker)
5014 ("python-setuptools" ,python-setuptools)
5015 ("python-setuptools-scm" ,python-setuptools-scm)
5016 ("python-six" ,python-six)
5017 ("python-sphinx" ,python-sphinx)))
5018 (home-page "https://github.com/jaraco/jaraco.packaging")
5019 (synopsis "Tools to supplement packaging Python releases")
5021 "This package provides various tools to supplement packaging Python
5023 (license license:expat)))
5025 (define-public python-pathpy
5027 (name "python-pathpy")
5032 (uri (pypi-uri "path.py" version))
5034 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5035 (outputs '("out" "doc"))
5036 (build-system python-build-system)
5038 `(("python-appdirs" ,python-appdirs)
5039 ("python-importlib-metadata" ,python-importlib-metadata)))
5041 `(("python-setuptools-scm" ,python-setuptools-scm)
5042 ("python-sphinx" ,python-sphinx)
5043 ("python-rst.linker" ,python-rst.linker)
5044 ("python-pytest" ,python-pytest)
5045 ("python-pytest-runner" ,python-pytest-runner)
5046 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5049 (modify-phases %standard-phases
5050 (add-after 'build 'build-doc
5052 (setenv "LANG" "en_US.UTF-8")
5053 (invoke "python" "setup.py" "build_sphinx")))
5054 (add-after 'install 'install-doc
5055 (lambda* (#:key outputs #:allow-other-keys)
5056 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5057 (doc (string-append data "/doc/" ,name "-" ,version))
5058 (html (string-append doc "/html")))
5060 (for-each (lambda (file)
5061 (copy-file file (string-append doc "/" file)))
5062 '("README.rst" "CHANGES.rst"))
5063 (copy-recursively "build/sphinx/html" html)
5067 ;; The import time test aborts if an import takes longer than
5068 ;; 100ms. It may very well take a little longer than that.
5069 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5070 (home-page "https://github.com/jaraco/path.py")
5071 (synopsis "Python module wrapper for built-in os.path")
5073 "@code{path.py} implements path objects as first-class entities, allowing
5074 common operations on files to be invoked on those path objects directly.")
5075 (license license:expat)))
5077 (define-public python2-pathpy
5078 (package-with-python2 python-pathpy))
5080 (define-public python-simplegeneric
5082 (name "python-simplegeneric")
5087 (uri (pypi-uri "simplegeneric" version ".zip"))
5089 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5090 (build-system python-build-system)
5092 `(("unzip" ,unzip)))
5093 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5094 (synopsis "Python module for simple generic functions")
5096 "The simplegeneric module lets you define simple single-dispatch generic
5097 functions, akin to Python’s built-in generic functions like @code{len()},
5098 @code{iter()} and so on. However, instead of using specially-named methods,
5099 these generic functions use simple lookup tables, akin to those used by
5100 e.g. @code{pickle.dump()} and other generic functions found in the Python
5102 (license license:zpl2.1)))
5104 (define-public python2-simplegeneric
5105 (package-with-python2 python-simplegeneric))
5107 (define-public python-ipython-genutils
5108 ;; TODO: This package is retired, check if can be removed, see description.
5110 (name "python-ipython-genutils")
5115 (uri (pypi-uri "ipython_genutils" version))
5117 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5118 (build-system python-build-system)
5119 (arguments `(#:tests? #f)) ; no tests
5120 (home-page "https://ipython.org")
5121 (synopsis "Vestigial utilities from IPython")
5123 "This package provides retired utilities from IPython. No packages
5124 outside IPython/Jupyter should depend on it.
5126 This package shouldn't exist. It contains some common utilities shared by
5127 Jupyter and IPython projects during The Big Split. As soon as possible, those
5128 packages will remove their dependency on this, and this package will go
5130 (license license:bsd-3)))
5132 (define-public python2-ipython-genutils
5133 (package-with-python2 python-ipython-genutils))
5135 (define-public python-traitlets
5137 (name "python-traitlets")
5142 (uri (pypi-uri "traitlets" version))
5145 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5146 (build-system python-build-system)
5149 (modify-phases %standard-phases
5150 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5152 `(("python-ipython-genutils" ,python-ipython-genutils)
5153 ("python-decorator" ,python-decorator)))
5155 `(("python-pytest" ,python-pytest)))
5156 (properties `((python2-variant . ,(delay python2-traitlets))))
5157 (home-page "https://ipython.org")
5158 (synopsis "Configuration system for Python applications")
5160 "Traitlets is a framework that lets Python classes have attributes with
5161 type checking, dynamically calculated default values, and ‘on change’
5162 callbacks. The package also includes a mechanism to use traitlets for
5163 configuration, loading values from files or from command line arguments. This
5164 is a distinct layer on top of traitlets, so you can use traitlets in your code
5165 without using the configuration machinery.")
5166 (license license:bsd-3)))
5168 (define-public python2-traitlets
5169 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5173 `(("python2-enum34" ,python2-enum34)
5174 ,@(package-propagated-inputs traitlets))))))
5176 (define-public python-jupyter-core
5178 (name "python-jupyter-core")
5183 (uri (string-append (pypi-uri "jupyter_core" version)))
5186 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5187 (build-system python-build-system)
5188 ;; FIXME: not sure how to run the tests
5189 (arguments `(#:tests? #f))
5191 `(("python-traitlets" ,python-traitlets)))
5192 (home-page "http://jupyter.org/")
5193 (synopsis "Jupyter base package")
5195 "Jupyter core is the base package on which Jupyter projects rely.")
5196 (license license:bsd-3)))
5198 (define-public python2-jupyter-core
5199 (package-with-python2 python-jupyter-core))
5201 (define-public python-jupyter-client
5203 (name "python-jupyter-client")
5208 (uri (pypi-uri "jupyter_client" version))
5211 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5212 (build-system python-build-system)
5213 ;; Tests fail because of missing native python kernel which I assume is
5214 ;; provided by the ipython package, which we cannot use because it would
5215 ;; cause a dependency cycle.
5219 #:phases (modify-phases %standard-phases
5220 (add-after 'unpack 'set-tool-file-names
5221 (lambda* (#:key inputs #:allow-other-keys)
5222 (let ((iproute (assoc-ref inputs "iproute")))
5223 (substitute* "jupyter_client/localinterfaces.py"
5225 (string-append "'" iproute "/sbin/ip'")))
5228 `(("iproute" ,iproute)))
5230 `(("python-pyzmq" ,python-pyzmq)
5231 ("python-traitlets" ,python-traitlets)
5232 ("python-jupyter-core" ,python-jupyter-core)))
5233 (home-page "http://jupyter.org/")
5234 (synopsis "Jupyter protocol implementation and client libraries")
5236 "The @code{jupyter_client} package contains the reference implementation
5237 of the Jupyter protocol. It also provides client and kernel management APIs
5238 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5239 installing @code{kernelspec}s for use with Jupyter frontends.")
5240 (license license:bsd-3)))
5242 (define-public python2-jupyter-client
5243 (package-with-python2 python-jupyter-client))
5245 (define-public python-ipykernel
5247 (name "python-ipykernel")
5252 (uri (pypi-uri "ipykernel" version))
5254 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5255 (build-system python-build-system)
5258 (modify-phases %standard-phases
5261 (setenv "HOME" "/tmp")
5262 (invoke "pytest" "-v")
5264 (add-after 'install 'set-python-file-name
5265 (lambda* (#:key outputs #:allow-other-keys)
5266 ;; Record the absolute file name of the 'python' executable in
5268 (let ((out (assoc-ref outputs "out")))
5269 (substitute* (string-append out "/share/jupyter"
5270 "/kernels/python3/kernel.json")
5272 (string-append "\"" (which "python") "\"")))
5275 `(("python-ipython" ,python-ipython)
5276 ;; imported at runtime during connect
5277 ("python-jupyter-client" ,python-jupyter-client)))
5279 `(("python-flaky" ,python-flaky)
5280 ("python-nose" ,python-nose)
5281 ("python-pytest" ,python-pytest)))
5282 (home-page "https://ipython.org")
5283 (synopsis "IPython Kernel for Jupyter")
5285 "This package provides the IPython kernel for Jupyter.")
5286 (license license:bsd-3)))
5288 ;; Version 5.1.1 and above no longer support Python 2.
5289 (define-public python2-ipykernel
5291 (name "python2-ipykernel")
5296 (uri (pypi-uri "ipykernel" version))
5298 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5299 (build-system python-build-system)
5301 `(#:python ,python-2
5303 (modify-phases %standard-phases
5306 (setenv "HOME" "/tmp")
5307 (invoke "pytest" "-v")
5310 `(("python2-ipython" ,python2-ipython)
5311 ;; imported at runtime during connect
5312 ("python2-jupyter-client" ,python2-jupyter-client)))
5314 `(("python2-pytest" ,python2-pytest)
5315 ("python2-nose" ,python2-nose)))
5316 (home-page "https://ipython.org")
5317 (synopsis "IPython Kernel for Jupyter")
5319 "This package provides the IPython kernel for Jupyter.")
5320 (license license:bsd-3)))
5322 (define-public python-pari-jupyter
5324 (name "python-pari-jupyter")
5329 (uri (pypi-uri "pari_jupyter" version))
5332 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5333 (build-system python-build-system)
5335 `(("python-ipykernel" ,python-ipykernel)))
5337 `(("pari-gp" ,pari-gp)
5338 ("readline" ,readline)))
5340 `(#:tests? #f)) ; no test suite
5342 "https://github.com/jdemeyer/pari_jupyter")
5343 (synopsis "A Jupyter kernel for PARI/GP")
5344 (description "The package provides a PARI/GP kernel for Jupyter.")
5345 (license license:gpl3+)))
5347 (define-public python-backcall
5349 (name "python-backcall")
5354 (uri (pypi-uri "backcall" version))
5357 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5358 (build-system python-build-system)
5359 (home-page "https://github.com/takluyver/backcall/")
5360 (synopsis "Specifications for callback functions passed in to an API")
5362 "If your code lets other people supply callback functions, it's important
5363 to specify the function signature you expect, and check that functions support
5364 that. Adding extra parameters later would break other peoples code unless
5365 you're careful. The @code{backcall} package provides a way of specifying the
5366 callback signature using a prototype function.")
5367 (license license:bsd-3)))
5369 ;; This is the latest release of the LTS version of ipython with support for
5370 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5371 ;; dropped support for Python 2.7.
5372 (define-public python2-ipython
5374 (name "python2-ipython")
5379 (uri (pypi-uri "ipython" version ".tar.gz"))
5381 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5382 (build-system python-build-system)
5384 `(("python2-backports-shutil-get-terminal-size"
5385 ,python2-backports-shutil-get-terminal-size)
5386 ("python2-pathlib2" ,python2-pathlib2)
5387 ("python2-pyzmq" ,python2-pyzmq)
5388 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5389 ("python2-terminado" ,python2-terminado)
5390 ("python2-matplotlib" ,python2-matplotlib)
5391 ("python2-numpy" ,python2-numpy)
5392 ("python2-numpydoc" ,python2-numpydoc)
5393 ("python2-jinja2" ,python2-jinja2)
5394 ("python2-mistune" ,python2-mistune)
5395 ("python2-pexpect" ,python2-pexpect)
5396 ("python2-pickleshare" ,python2-pickleshare)
5397 ("python2-simplegeneric" ,python2-simplegeneric)
5398 ("python2-jsonschema" ,python2-jsonschema)
5399 ("python2-traitlets" ,python2-traitlets)
5400 ("python2-nbformat" ,python2-nbformat)
5401 ("python2-pygments" ,python2-pygments)))
5403 `(("readline" ,readline)
5406 `(("graphviz" ,graphviz)
5407 ("pkg-config" ,pkg-config)
5408 ("python2-requests" ,python2-requests) ;; for tests
5409 ("python2-testpath" ,python2-testpath)
5410 ("python2-mock" ,python2-mock)
5411 ("python2-nose" ,python2-nose)))
5413 `(#:python ,python-2
5415 (modify-phases %standard-phases
5416 (add-before 'check 'delete-broken-tests
5417 (lambda* (#:key inputs #:allow-other-keys)
5418 ;; These tests throw errors for unknown reasons.
5419 (delete-file "IPython/core/tests/test_profile.py")
5420 (delete-file "IPython/core/tests/test_interactiveshell.py")
5421 (delete-file "IPython/core/tests/test_magic.py")
5423 (home-page "https://ipython.org")
5424 (synopsis "IPython is a tool for interactive computing in Python")
5426 "IPython provides a rich architecture for interactive computing with:
5427 Powerful interactive shells, a browser-based notebook, support for interactive
5428 data visualization, embeddable interpreters and tools for parallel
5430 (license license:bsd-3)))
5432 (define-public python-ipython
5434 (name "python-ipython")
5439 (uri (pypi-uri "ipython" version ".tar.gz"))
5441 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5442 (build-system python-build-system)
5444 `(("python-backcall" ,python-backcall)
5445 ("python-pyzmq" ,python-pyzmq)
5446 ("python-prompt-toolkit" ,python-prompt-toolkit)
5447 ("python-terminado" ,python-terminado)
5448 ("python-matplotlib" ,python-matplotlib)
5449 ("python-numpy" ,python-numpy)
5450 ("python-numpydoc" ,python-numpydoc)
5451 ("python-jedi" ,python-jedi)
5452 ("python-jinja2" ,python-jinja2)
5453 ("python-mistune" ,python-mistune)
5454 ("python-pexpect" ,python-pexpect)
5455 ("python-pickleshare" ,python-pickleshare)
5456 ("python-simplegeneric" ,python-simplegeneric)
5457 ("python-jsonschema" ,python-jsonschema)
5458 ("python-traitlets" ,python-traitlets)
5459 ("python-nbformat" ,python-nbformat)
5460 ("python-pygments" ,python-pygments)))
5462 `(("readline" ,readline)
5465 `(("graphviz" ,graphviz)
5466 ("pkg-config" ,pkg-config)
5467 ("python-requests" ,python-requests) ;; for tests
5468 ("python-testpath" ,python-testpath)
5469 ("python-nose" ,python-nose)))
5472 (modify-phases %standard-phases
5473 (add-after 'unpack 'make-docs-reproducible
5475 (substitute* "IPython/sphinxext/ipython_directive.py"
5476 ((".*import datetime") "")
5477 ((".*datetime.datetime.now\\(\\)") "")
5478 (("%timeit") "# %timeit"))
5480 ;; Tests can only be run after the library has been installed and not
5481 ;; within the source directory.
5483 (add-after 'install 'check
5484 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5487 ;; Make installed package available for running the tests
5488 (add-installed-pythonpath inputs outputs)
5489 (setenv "HOME" "/tmp/") ;; required by a test
5490 ;; We only test the core because one of the other tests
5491 ;; tries to import ipykernel.
5492 (invoke "python" "IPython/testing/iptest.py"
5493 "-v" "IPython/core/tests"))
5495 (add-before 'check 'fix-tests
5496 (lambda* (#:key inputs #:allow-other-keys)
5497 (substitute* "./IPython/utils/_process_posix.py"
5498 (("/usr/bin/env', 'which") (which "which")))
5499 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5500 (("#!/usr/bin/env python")
5501 (string-append "#!" (which "python"))))
5502 ;; This test introduces a circular dependency on ipykernel
5503 ;; (which depends on ipython).
5504 (delete-file "IPython/core/tests/test_display.py")
5505 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5506 (delete-file "IPython/core/tests/test_interactiveshell.py")
5508 (home-page "https://ipython.org")
5509 (synopsis "IPython is a tool for interactive computing in Python")
5511 "IPython provides a rich architecture for interactive computing with:
5512 Powerful interactive shells, a browser-based notebook, support for interactive
5513 data visualization, embeddable interpreters and tools for parallel
5515 (license license:bsd-3)))
5517 (define-public python-ipython-documentation
5519 (inherit python-ipython)
5520 (name "python-ipython-documentation")
5521 (version (package-version python-ipython))
5524 (modify-phases %standard-phases
5528 (lambda* (#:key outputs #:allow-other-keys)
5529 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5530 (doc (string-append data "/doc/" ,name "-" ,version))
5531 (html (string-append doc "/html"))
5532 (man1 (string-append data "/man/man1"))
5533 (info (string-append data "/info"))
5534 (examples (string-append doc "/examples"))
5535 (python-arg (string-append "PYTHON=" (which "python"))))
5536 (setenv "LANG" "en_US.utf8")
5537 (with-directory-excursion "docs"
5538 ;; FIXME: pdf fails to build
5539 ;;(system* "make" "pdf" "PAPER=a4")
5540 (system* "make" python-arg "html")
5541 ;; FIXME: the generated texi file contains ^@^@, which trips
5543 ;; (system* "make" python-arg "info")
5545 (copy-recursively "docs/man" man1)
5546 (copy-recursively "examples" examples)
5547 (copy-recursively "docs/build/html" html)
5548 ;; (copy-file "docs/build/latex/ipython.pdf"
5549 ;; (string-append doc "/ipython.pdf"))
5551 ;; (copy-file "docs/build/texinfo/ipython.info"
5552 ;; (string-append info "/ipython.info"))
5553 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5556 `(("python-ipython" ,python-ipython)
5557 ("python-ipykernel" ,python-ipykernel)))
5559 `(("python-sphinx" ,python-sphinx)
5560 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5561 ;; FIXME: It's possible that a smaller union would work just as well.
5562 ("texlive" ,(texlive-union (list texlive-amsfonts
5564 texlive-generic-ifxetex
5565 texlive-generic-pdftex
5566 texlive-latex-capt-of
5568 texlive-latex-environ
5569 texlive-latex-eqparbox
5570 texlive-latex-etoolbox
5571 texlive-latex-expdlist
5572 texlive-latex-fancyhdr
5573 texlive-latex-fancyvrb
5574 texlive-latex-fncychap
5576 texlive-latex-framed
5577 texlive-latex-geometry
5578 texlive-latex-graphics
5579 texlive-latex-hyperref
5580 texlive-latex-mdwtools
5581 texlive-latex-multirow
5582 texlive-latex-needspace
5583 texlive-latex-oberdiek
5584 texlive-latex-parskip
5585 texlive-latex-preview
5586 texlive-latex-tabulary
5587 texlive-latex-threeparttable
5588 texlive-latex-titlesec
5589 texlive-latex-trimspaces
5591 texlive-latex-upquote
5593 texlive-latex-varwidth
5594 texlive-latex-wrapfig)))
5595 ("texinfo" ,texinfo)))))
5597 (define-public python-urwid
5599 (name "python-urwid")
5604 (uri (pypi-uri "urwid" version))
5607 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5608 (build-system python-build-system)
5609 (home-page "http://urwid.org")
5610 (synopsis "Console user interface library for Python")
5612 "Urwid is a curses-based UI/widget library for Python. It includes many
5613 features useful for text console applications.")
5614 (license license:lgpl2.1+)))
5616 (define-public python2-urwid
5617 (package-with-python2 python-urwid))
5619 (define-public python-urwidtrees
5621 (name "python-urwidtrees")
5626 ;; package author intends on distributing via github rather than pypi:
5627 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5629 (url "https://github.com/pazz/urwidtrees")
5631 (file-name (git-file-name name version))
5634 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5635 (build-system python-build-system)
5637 '(#:use-setuptools? #f
5638 #:tests? #f)) ; no tests
5639 (propagated-inputs `(("python-urwid" ,python-urwid)))
5640 (home-page "https://github.com/pazz/urwidtrees")
5641 (synopsis "Tree widgets for urwid")
5642 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5643 toolkit. Use it to build trees of widgets.")
5644 (license license:gpl3+)))
5646 (define-public python2-urwidtrees
5647 (package-with-python2 python-urwidtrees))
5649 (define-public python-ua-parser
5651 (name "python-ua-parser")
5656 (uri (pypi-uri "ua-parser" version))
5659 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5660 (build-system python-build-system)
5662 `(#:tests? #f)) ;no test suite in release
5664 `(("python-pyyaml" ,python-pyyaml)))
5665 (home-page "https://github.com/ua-parser/uap-python")
5666 (synopsis "User agent parser")
5668 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5669 (license license:asl2.0)))
5671 (define-public python2-ua-parser
5672 (package-with-python2 python-ua-parser))
5674 (define-public python-user-agents
5676 (name "python-user-agents")
5681 (uri (pypi-uri "user-agents" version))
5684 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5685 (build-system python-build-system)
5687 `(#:tests? #f)) ;missing devices.json test file in release
5689 `(("python-ua-parser" ,python-ua-parser)))
5690 (home-page "https://github.com/selwin/python-user-agents")
5691 (synopsis "User Agent strings parsing library")
5693 "A library to identify devices (phones, tablets) and their capabilities by
5694 parsing (browser/HTTP) user agent strings.")
5695 (license license:expat)))
5697 (define-public python2-user-agents
5698 (package-with-python2 python-user-agents))
5700 (define-public python-dbus
5702 (name "python-dbus")
5707 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5708 "dbus-python-" version ".tar.gz"))
5710 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5711 (build-system gnu-build-system)
5713 `(("pkg-config" ,pkg-config)))
5715 `(("python" ,python-wrapper)
5716 ("dbus-glib" ,dbus-glib)))
5717 (synopsis "Python bindings for D-bus")
5718 (description "python-dbus provides bindings for libdbus, the reference
5719 implementation of D-Bus.")
5720 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5721 (license license:expat)))
5723 (define-public python2-dbus
5724 (package (inherit python-dbus)
5725 (name "python2-dbus")
5726 (inputs `(("python" ,python-2)
5727 ,@(alist-delete "python"
5728 (package-inputs python-dbus)
5731 (define-public python-notify2
5733 (name "python-notify2")
5738 (uri (pypi-uri "notify2" version))
5741 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5742 (build-system python-build-system)
5743 (arguments `(#:tests? #f)) ; tests depend on system state
5745 `(("python-dbus" ,python-dbus)))
5746 (home-page "https://bitbucket.org/takluyver/pynotify2")
5747 (synopsis "Python interface to D-Bus notifications")
5749 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5750 It is a reimplementation of pynotify in pure Python, and an alternative to
5751 the GObject Introspection bindings to libnotify for non-GTK applications.")
5752 (license (list license:bsd-2
5753 license:lgpl2.1+))))
5755 (define-public python2-notify2
5756 (package-with-python2 python-notify2))
5758 (define-public python-lxml
5760 (name "python-lxml")
5765 (uri (pypi-uri "lxml" version))
5767 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
5768 (build-system python-build-system)
5770 `(#:phases (modify-phases %standard-phases
5773 (invoke "make" "test"))))))
5775 `(("libxml2" ,libxml2)
5776 ("libxslt" ,libxslt)))
5777 (home-page "https://lxml.de/")
5778 (synopsis "Python XML processing library")
5780 "The lxml XML toolkit is a Pythonic binding for the C libraries
5781 libxml2 and libxslt.")
5782 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5784 (define-public python2-lxml
5785 (package-with-python2 python-lxml))
5787 ;; beautifulsoup4 has a totally different namespace than 3.x,
5788 ;; and pypi seems to put it under its own name, so I guess we should too
5789 (define-public python-beautifulsoup4
5791 (name "python-beautifulsoup4")
5796 (uri (pypi-uri "beautifulsoup4" version))
5799 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5800 (build-system python-build-system)
5803 (modify-phases %standard-phases
5804 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5805 ;; must use this conversion script when building with Python 3. The
5806 ;; conversion script also runs the tests.
5807 ;; For more information, see the file 'convert-py3k' in the source
5810 (lambda _ (invoke "./convert-py3k"))))))
5812 `(("python-soupsieve" ,python-soupsieve)))
5814 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5816 "Python screen-scraping library")
5818 "Beautiful Soup is a Python library designed for rapidly setting up
5819 screen-scraping projects. It offers Pythonic idioms for navigating,
5820 searching, and modifying a parse tree, providing a toolkit for
5821 dissecting a document and extracting what you need. It automatically
5822 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5823 (license license:expat)
5824 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5826 (define-public python2-beautifulsoup4
5828 (inherit (package-with-python2
5829 (strip-python2-variant python-beautifulsoup4)))
5830 (arguments `(#:python ,python-2))))
5832 (define-public python-soupsieve
5834 (name "python-soupsieve")
5839 (uri (pypi-uri "soupsieve" version))
5842 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5843 (build-system python-build-system)
5844 (arguments `(#:tests? #f))
5845 ;;XXX: 2 tests fail currently despite claming they were to be
5846 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5847 ;;don't want to create a circular dependency.
5848 (home-page "https://github.com/facelessuser/soupsieve")
5849 (synopsis "CSS selector library")
5851 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5852 Soup 4. It aims to provide selecting, matching, and filtering using modern
5853 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5854 specifications up through the latest CSS level 4 drafts and beyond (though
5855 some are not yet implemented).")
5856 (properties `((python2-variant . ,(delay python2-soupsieve))))
5857 (license license:expat)))
5859 (define-public python2-soupsieve
5860 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5864 `(("python2-backports-functools-lru-cache"
5865 ,python2-backports-functools-lru-cache)
5866 ,@(package-propagated-inputs base))))))
5868 (define-public python-netifaces
5870 (name "python-netifaces")
5875 (uri (pypi-uri "netifaces" version))
5878 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5879 (build-system python-build-system)
5880 (home-page "https://github.com/al45tair/netifaces")
5882 "Python module for portable network interface information")
5884 "Netifaces is a Python module providing information on network
5885 interfaces in an easy and portable manner.")
5886 (license license:expat)))
5888 (define-public python2-netifaces
5889 (package-with-python2 python-netifaces))
5891 (define-public python-networkx
5893 (name "python-networkx")
5898 (uri (pypi-uri "networkx" version ".zip"))
5900 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5901 (build-system python-build-system)
5902 ;; python-decorator is needed at runtime.
5904 `(("python-decorator" ,python-decorator)))
5906 `(("python-nose" ,python-nose)
5908 (home-page "https://networkx.github.io/")
5909 (synopsis "Python module for creating and manipulating graphs and networks")
5911 "NetworkX is a Python package for the creation, manipulation, and study
5912 of the structure, dynamics, and functions of complex networks.")
5913 (license license:bsd-3)))
5915 (define-public python2-networkx
5916 (package-with-python2 python-networkx))
5918 (define-public python-datrie
5920 (name "python-datrie")
5925 (uri (pypi-uri "datrie" version))
5928 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5929 (build-system python-build-system)
5931 `(("python-cython" ,python-cython)
5932 ("python-hypothesis" ,python-hypothesis)
5933 ("python-pytest" ,python-pytest)
5934 ("python-pytest-runner" ,python-pytest-runner)))
5935 (home-page "https://github.com/kmike/datrie")
5936 (synopsis "Fast, efficiently stored trie for Python")
5938 "This package provides a fast, efficiently stored trie implementation for
5940 (license license:lgpl2.1+)))
5942 (define-public snakemake
5949 (uri (pypi-uri "snakemake" version))
5951 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5952 (build-system python-build-system)
5954 ;; TODO: Package missing test dependencies.
5957 (modify-phases %standard-phases
5958 ;; For cluster execution Snakemake will call Python. Since there is
5959 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5960 ;; this by calling the snakemake wrapper instead.
5961 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5962 (lambda* (#:key outputs #:allow-other-keys)
5963 (substitute* "snakemake/executors.py"
5964 (("\\{sys.executable\\} -m snakemake")
5965 (string-append (assoc-ref outputs "out")
5969 `(("python-appdirs" ,python-appdirs)
5970 ("python-configargparse" ,python-configargparse)
5971 ("python-datrie" ,python-datrie)
5972 ("python-docutils" ,python-docutils)
5973 ("python-gitpython" ,python-gitpython)
5974 ("python-jinja2" ,python-jinja2)
5975 ("python-jsonschema" ,python-jsonschema)
5976 ("python-networkx" ,python-networkx)
5977 ("python-psutil" ,python-psutil)
5978 ("python-pyyaml" ,python-pyyaml)
5979 ("python-ratelimiter" ,python-ratelimiter)
5980 ("python-requests" ,python-requests)
5981 ("python-wrapt" ,python-wrapt)))
5982 (home-page "https://snakemake.readthedocs.io")
5983 (synopsis "Python-based execution environment for make-like workflows")
5985 "Snakemake aims to reduce the complexity of creating workflows by
5986 providing a clean and modern domain specific specification language (DSL) in
5987 Python style, together with a fast and comfortable execution environment.")
5988 (license license:expat)))
5990 (define-public python-pyqrcode
5992 (name "python-pyqrcode")
5997 (uri (pypi-uri "PyQRCode" version))
6000 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6001 (build-system python-build-system)
6003 "https://github.com/mnooner256/pyqrcode")
6004 (synopsis "QR code generator")
6006 "Pyqrcode is a QR code generator written purely in Python with
6007 SVG, EPS, PNG and terminal output.")
6008 (license license:bsd-3)))
6010 (define-public python-seaborn
6012 (name "python-seaborn")
6017 (uri (pypi-uri "seaborn" version))
6019 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6023 ;; This has already been merged, but there is no new
6024 ;; release including this patch. It fixes problems
6025 ;; with axis rotation that would lead to test
6027 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6030 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6031 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6032 (build-system python-build-system)
6035 (modify-phases %standard-phases
6036 (add-before 'check 'start-xserver
6037 (lambda* (#:key inputs #:allow-other-keys)
6038 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6039 ;; There must be a running X server and make check doesn't
6040 ;; start one. Therefore we must do it.
6041 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6042 (setenv "DISPLAY" ":1")
6044 (add-after 'unpack 'fix-tests
6046 ;; test_cbar_ticks fails probably because of matplotlib's
6047 ;; expectation of using an older version of FreeType.
6048 (delete-file "seaborn/tests/test_matrix.py")
6050 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6052 `(("python-pandas" ,python-pandas)
6053 ("python-matplotlib" ,python-matplotlib)
6054 ("python-numpy" ,python-numpy)
6055 ("python-scipy" ,python-scipy)))
6057 `(("python-pytest" ,python-pytest)
6058 ("xorg-server" ,xorg-server-for-tests)))
6059 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6060 (synopsis "Statistical data visualization")
6062 "Seaborn is a library for making attractive and informative statistical
6063 graphics in Python. It is built on top of matplotlib and tightly integrated
6064 with the PyData stack, including support for numpy and pandas data structures
6065 and statistical routines from scipy and statsmodels.")
6066 (license license:bsd-3)))
6068 (define-public python2-seaborn
6069 (package-with-python2 python-seaborn))
6071 (define-public python-mpmath
6073 (name "python-mpmath")
6077 (uri (string-append "http://mpmath.org/files/mpmath-"
6081 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6082 (build-system python-build-system)
6085 (modify-phases %standard-phases
6088 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6089 (home-page "http://mpmath.org")
6090 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6092 "@code{mpmath} can be used as an arbitrary-precision substitute for
6093 Python's float/complex types and math/cmath modules, but also does much
6094 more advanced mathematics.")
6095 (license license:bsd-3)))
6097 (define-public python2-mpmath
6098 (package-with-python2 python-mpmath))
6100 (define-public python-bigfloat
6102 (name "python-bigfloat")
6107 (uri (pypi-uri "bigfloat" version))
6109 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6110 (build-system python-build-system)
6113 (home-page "https://github.com/mdickinson/bigfloat")
6114 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6116 "This package provides a Python interface to the MPFR library for
6117 multiprecision arithmetic.")
6118 (license license:lgpl3+)))
6120 (define-public python2-bigfloat
6121 (package-with-python2 python-bigfloat))
6123 (define-public python-sympy
6125 (name "python-sympy")
6131 "https://github.com/sympy/sympy/releases/download/sympy-"
6132 version "/sympy-" version ".tar.gz"))
6134 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6135 (build-system python-build-system)
6138 (modify-phases %standard-phases
6139 ;; Run the core tests after installation. By default it would run
6140 ;; *all* tests, which take a very long time to complete and are known
6143 (add-after 'install 'check
6144 (lambda* (#:key outputs #:allow-other-keys)
6145 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6148 `(("python-mpmath" ,python-mpmath)))
6149 (home-page "http://www.sympy.org/")
6150 (synopsis "Python library for symbolic mathematics")
6152 "SymPy is a Python library for symbolic mathematics. It aims to become a
6153 full-featured computer algebra system (CAS) while keeping the code as simple
6154 as possible in order to be comprehensible and easily extensible.")
6155 (license license:bsd-3)))
6157 (define-public python2-sympy
6159 (inherit (package-with-python2 python-sympy))
6162 (modify-phases %standard-phases
6163 ;; Run the core tests after installation. By default it would run
6164 ;; *all* tests, which take a very long time to complete and are known
6167 (add-after 'install 'check
6168 (lambda* (#:key outputs #:allow-other-keys)
6169 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6172 (define-public python-q
6179 (uri (pypi-uri "q" version))
6182 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6183 (build-system python-build-system)
6184 (home-page "https://github.com/zestyping/q")
6185 (synopsis "Quick-and-dirty debugging output for tired programmers")
6187 "q is a Python module for \"print\" style of debugging Python code. It
6188 provides convenient short API for print out of values, tracebacks, and
6189 falling into the Python interpreter.")
6190 (license license:asl2.0)))
6192 (define-public python2-q
6193 (package-with-python2 python-q))
6195 (define-public python2-xlib
6197 (name "python2-xlib")
6201 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6203 "python-xlib-" version ".tar.gz"))
6206 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6207 (build-system python-build-system)
6209 `(#:python ,python-2 ;Python 2 only
6210 #:tests? #f)) ;no tests
6211 (home-page "http://python-xlib.sourceforge.net/")
6212 (synopsis "Python X11 client library")
6214 "The Python X Library is intended to be a fully functional X client
6215 library for Python programs. It is useful to implement low-level X clients.
6216 It is written entirely in Python.")
6217 (license license:gpl2+)))
6219 (define-public python-singledispatch
6221 (name "python-singledispatch")
6226 (uri (pypi-uri "singledispatch" version))
6229 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6230 (build-system python-build-system)
6232 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6234 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6235 (synopsis "Backport of singledispatch feature from Python 3.4")
6237 "This library brings functools.singledispatch from Python 3.4 to Python
6239 (license license:expat)))
6241 (define-public python2-singledispatch
6242 (package-with-python2 python-singledispatch))
6244 ;; the python- version can be removed with python-3.5
6245 (define-public python-backports-abc
6247 (name "python-backports-abc")
6252 (uri (pypi-uri "backports_abc" version))
6255 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6256 (build-system python-build-system)
6257 (home-page "https://github.com/cython/backports_abc")
6258 (synopsis "Backport of additions to the 'collections.abc' module")
6260 "Python-backports-abc provides a backport of additions to the
6261 @code{collections.abc} module in Python-3.5.")
6262 (license license:psfl)))
6264 (define-public python2-backports-abc
6265 (package-with-python2 python-backports-abc))
6267 (define-public python-backports-csv
6269 (name "python-backports-csv")
6274 (uri (pypi-uri "backports.csv" version))
6277 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/ryanhiebert/backports.csv")
6280 (synopsis "Backport of Python 3's csv module for Python 2")
6282 "Provides a backport of Python 3's @code{csv} module for parsing
6283 comma separated values. The API of the @code{csv} module in Python 2
6284 is drastically different from the @code{csv} module in Python 3.
6285 This is due, for the most part, to the difference between str in
6286 Python 2 and Python 3.")
6287 (license license:psfl)))
6289 (define-public python2-backports-csv
6290 (package-with-python2 python-backports-csv))
6292 (define-public python2-backports-shutil-get-terminal-size
6294 (name "python2-backports-shutil-get-terminal-size")
6299 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6302 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6303 (build-system python-build-system)
6305 `(#:python ,python-2
6307 (modify-phases %standard-phases
6310 (invoke "py.test" "-v"))))))
6312 `(("python2-pytest" ,python2-pytest)))
6313 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6314 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6316 "This package provides a backport of the @code{get_terminal_size
6317 function} from Python 3.3's @code{shutil}.
6318 Unlike the original version it is written in pure Python rather than C,
6319 so it might be a tiny bit slower.")
6320 (license license:expat)))
6322 (define-public python-waf
6328 (uri (string-append "https://waf.io/"
6329 "waf-" version ".tar.bz2"))
6332 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6333 (build-system python-build-system)
6336 (modify-phases %standard-phases
6339 ;; XXX: Find a way to add all extra tools.
6340 (let ((tools '("gccdeps"
6341 "clang_compilation_database")))
6342 (invoke "python" "waf-light" "configure" "build"
6343 (string-append "--tools="
6344 (string-join tools ","))))))
6347 (invoke "python" "waf" "--version")))
6349 (lambda* (#:key outputs #:allow-other-keys)
6350 (let ((out (assoc-ref outputs "out")))
6351 (install-file "waf" (string-append out "/bin")))
6353 ;; waf breaks when it is wrapped.
6355 (home-page "https://waf.io/")
6356 (synopsis "Python-based build system")
6358 "Waf is a Python-based framework for configuring, compiling and installing
6360 (license license:bsd-3)))
6362 (define-public python2-waf
6363 (package-with-python2 python-waf))
6365 (define-public python-pyzmq
6367 (name "python-pyzmq")
6372 (uri (pypi-uri "pyzmq" version))
6374 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6375 (build-system python-build-system)
6378 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6379 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6380 ;; --inplace' for 'python setup.py test' to work.
6383 `(("zeromq" ,zeromq)))
6385 `(("pkg-config" ,pkg-config)
6386 ("python-nose" ,python-nose)))
6387 (home-page "https://github.com/zeromq/pyzmq")
6388 (synopsis "Python bindings for 0MQ")
6390 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6391 (license license:bsd-4)))
6393 (define-public python2-pyzmq
6394 (package-with-python2 python-pyzmq))
6396 (define-public python-pep8
6397 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6398 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6399 ;; some dependents' test suites, and nothing more.
6401 (name "python-pep8")
6406 (uri (pypi-uri "pep8" version))
6409 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6410 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6411 (build-system python-build-system)
6412 (home-page "https://pep8.readthedocs.org/")
6413 (synopsis "Python style guide checker")
6415 "This tools checks Python code against some of the style conventions in
6417 (license license:expat)))
6419 (define-public python2-pep8
6420 (package-with-python2 python-pep8))
6422 (define-public python-pyflakes
6424 (name "python-pyflakes")
6429 (uri (pypi-uri "pyflakes" version))
6432 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6433 (build-system python-build-system)
6435 "https://github.com/pyflakes/pyflakes")
6436 (synopsis "Passive checker of Python programs")
6438 "Pyflakes statically checks Python source code for common errors.")
6439 (license license:expat)))
6441 (define-public python2-pyflakes
6442 (package-with-python2 python-pyflakes))
6444 (define-public python-mccabe
6446 (name "python-mccabe")
6451 (uri (pypi-uri "mccabe" version))
6454 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6455 (build-system python-build-system)
6457 `(("python-pytest" ,python-pytest-bootstrap)
6458 ("python-pytest-runner" ,python-pytest-runner)))
6459 (home-page "https://github.com/flintwork/mccabe")
6460 (synopsis "McCabe checker, plugin for flake8")
6462 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6463 complexity of Python source code.")
6464 (license license:expat)))
6466 (define-public python2-mccabe
6467 (package-with-python2 python-mccabe))
6469 (define-public python-mccabe-0.2.1
6470 (package (inherit python-mccabe)
6475 (uri (pypi-uri "mccabe" version))
6478 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6480 (define-public python2-mccabe-0.2.1
6481 (package-with-python2 python-mccabe-0.2.1))
6483 ;; Flake8 2.4.1 requires an older version of pep8.
6484 ;; This should be removed ASAP.
6485 (define-public python-pep8-1.5.7
6486 (package (inherit python-pep8)
6491 (uri (pypi-uri "pep8" version))
6494 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6496 ;; XXX Tests not compatible with Python 3.5.
6499 (define-public python2-pep8-1.5.7
6500 (package-with-python2 python-pep8-1.5.7))
6502 ;; Flake8 2.4.1 requires an older version of pyflakes.
6503 ;; This should be removed ASAP.
6504 (define-public python-pyflakes-0.8.1
6505 (package (inherit python-pyflakes)
6510 (uri (pypi-uri "pyflakes" version))
6513 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6515 ;; XXX Tests not compatible with Python 3.5.
6518 (define-public python2-pyflakes-0.8.1
6519 (package-with-python2 python-pyflakes-0.8.1))
6521 (define-public python-flake8
6523 (name "python-flake8")
6527 (uri (pypi-uri "flake8" version))
6530 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6531 (build-system python-build-system)
6534 (modify-phases %standard-phases
6536 (add-after 'install 'check
6537 (lambda* (#:key inputs outputs #:allow-other-keys)
6538 (add-installed-pythonpath inputs outputs)
6539 (invoke "pytest" "-v")
6542 `(("python-pycodestyle" ,python-pycodestyle)
6543 ("python-entrypoints" ,python-entrypoints)
6544 ("python-pyflakes" ,python-pyflakes)
6545 ("python-mccabe" ,python-mccabe)))
6547 `(("python-mock" ,python-mock)
6548 ("python-pytest" ,python-pytest-bootstrap)
6549 ("python-pytest-runner" ,python-pytest-runner)))
6550 (home-page "https://gitlab.com/pycqa/flake8")
6552 "The modular source code checker: pep8, pyflakes and co")
6554 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6555 (properties `((python2-variant . ,(delay python2-flake8))))
6556 (license license:expat)))
6558 (define-public python2-flake8
6559 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6560 (package (inherit base)
6562 `(("python2-configparser" ,python2-configparser)
6563 ("python2-enum34" ,python2-enum34)
6564 ("python2-typing" ,python2-typing)
6565 ,@(package-propagated-inputs base))))))
6567 ;; python-hacking requires flake8 <2.6.0.
6568 (define-public python-flake8-2.5
6570 (inherit python-flake8)
6574 (uri (pypi-uri "flake8" version))
6577 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6579 `(("python-pep8" ,python-pep8)
6580 ,@(package-propagated-inputs python-flake8)))
6581 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6583 (define-public python2-flake8-2.5
6585 (inherit python2-flake8)
6586 (version (package-version python-flake8-2.5))
6588 (inherit (package-source python-flake8-2.5))))
6590 `(("python2-pep8" ,python2-pep8)
6591 ,@(package-propagated-inputs python2-flake8)))))
6593 (define-public python-flake8-polyfill
6595 (name "python-flake8-polyfill")
6600 (uri (pypi-uri "flake8-polyfill" version))
6603 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6604 (build-system python-build-system)
6607 (modify-phases %standard-phases
6610 ;; Be compatible with Pytest 4:
6611 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6612 (substitute* "setup.cfg"
6616 (setenv "PYTHONPATH"
6617 (string-append (getcwd) "/build/lib:"
6618 (getenv "PYTHONPATH")))
6619 (invoke "py.test" "-v"))))))
6621 `(("python-flake8" ,python-flake8)
6622 ("python-mock" ,python-mock)
6623 ("python-pep8" ,python-pep8)
6624 ("python-pycodestyle" ,python-pycodestyle)
6625 ("python-pytest" ,python-pytest)))
6626 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6627 (synopsis "Polyfill package for Flake8 plugins")
6629 "This package that provides some compatibility helpers for Flake8
6630 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6631 (license license:expat)))
6633 (define-public python2-flake8-polyfill
6634 (package-with-python2 python-flake8-polyfill))
6636 (define-public python-mistune
6638 (name "python-mistune")
6643 (uri (pypi-uri "mistune" version))
6646 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6647 (build-system python-build-system)
6649 `(("python-nose" ,python-nose)
6650 ("python-cython" ,python-cython)))
6651 (home-page "https://github.com/lepture/mistune")
6652 (synopsis "Markdown parser in pure Python")
6653 (description "This package provides a fast markdown parser in pure
6655 (license license:bsd-3)))
6657 (define-public python2-mistune
6658 (package-with-python2 python-mistune))
6660 (define-public python-markdown
6662 (name "python-markdown")
6667 (uri (pypi-uri "Markdown" version))
6670 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6671 (build-system python-build-system)
6673 `(("python-nose" ,python-nose)
6674 ("python-pyyaml" ,python-pyyaml)))
6675 (home-page "https://python-markdown.github.io/")
6676 (synopsis "Python implementation of Markdown")
6678 "This package provides a Python implementation of John Gruber's
6679 Markdown. The library features international input, various Markdown
6680 extensions, and several HTML output formats. A command line wrapper
6681 markdown_py is also provided to convert Markdown files to HTML.")
6682 (license license:bsd-3)))
6684 (define-public python2-markdown
6685 (package-with-python2 python-markdown))
6687 (define-public python-ptyprocess
6689 (name "python-ptyprocess")
6694 (uri (pypi-uri "ptyprocess" version))
6697 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6698 (build-system python-build-system)
6700 `(("python-nose" ,python-nose)))
6703 (modify-phases %standard-phases
6705 (lambda _ (invoke "nosetests"))))))
6706 (home-page "https://github.com/pexpect/ptyprocess")
6707 (synopsis "Run a subprocess in a pseudo terminal")
6709 "This package provides a Python library used to launch a subprocess in a
6710 pseudo terminal (pty), and interact with both the process and its pty.")
6711 (license license:isc)))
6713 (define-public python2-ptyprocess
6714 (package-with-python2 python-ptyprocess))
6716 (define-public python-cram
6718 (name "python-cram")
6720 (home-page "https://bitheap.org/cram/")
6723 (uri (list (string-append home-page "cram-"
6725 (pypi-uri "cram" version)))
6728 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6731 (modify-phases %standard-phases
6732 (add-after 'unpack 'patch-source
6734 (substitute* (find-files "cram" ".*\\.py$")
6735 ;; Replace default shell path.
6736 (("/bin/sh") (which "sh")))
6737 (substitute* (find-files "tests" ".*\\.t$")
6739 (("/bin/bash") (which "bash"))
6740 (("/bin/sh") (which "sh")))
6741 (substitute* "cram/_test.py"
6742 ;; This hack works around a bug triggered by substituting
6743 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6744 ;; "cram -h", which breaks the output at 80 characters. This
6745 ;; causes the line showing the default shell to break into two
6746 ;; lines, but the test expects a single line...
6747 (("env\\['COLUMNS'\\] = '80'")
6748 "env['COLUMNS'] = '160'"))
6750 (substitute* "Makefile"
6751 ;; Recent versions of python-coverage have caused the test
6752 ;; coverage to decrease (as of version 0.7). Allow that.
6753 (("--fail-under=100")
6758 ;; The test phase uses the built library and executable.
6759 (lambda* (#:key inputs outputs #:allow-other-keys)
6760 (add-installed-pythonpath inputs outputs)
6761 (setenv "PATH" (string-append (getenv "PATH") ":"
6762 (assoc-ref outputs "out") "/bin"))
6763 (invoke "make" "test"))))))
6764 (build-system python-build-system)
6766 `(("python-coverage" ,python-coverage)
6768 (synopsis "Simple testing framework for command line applications")
6770 "Cram is a functional testing framework for command line applications.
6771 Cram tests look like snippets of interactive shell sessions. Cram runs each
6772 command and compares the command output in the test with the command’s actual
6774 (license license:gpl2+)))
6776 (define-public python2-cram
6777 (package-with-python2 python-cram))
6779 (define-public python-straight-plugin
6781 (name "python-straight-plugin")
6786 (uri (pypi-uri "straight.plugin" version))
6789 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6790 (build-system python-build-system)
6791 (home-page "https://github.com/ironfroggy/straight.plugin")
6792 (synopsis "Simple namespaced plugin facility")
6793 (description "Straight Plugin provides a type of plugin you can create from
6794 almost any existing Python modules, and an easy way for outside developers to
6795 add functionality and customization to your projects with their own plugins.")
6796 (license license:expat)))
6798 (define-public python2-straight-plugin
6799 (package-with-python2 python-straight-plugin))
6801 (define-public python-fonttools
6803 (name "python-fonttools")
6807 (uri (pypi-uri "fonttools" version ".zip"))
6810 "012qqspnwdl4vy8qgzzpfglkk5dgzxiw0fak2jq74ngygvz3vfv6"))))
6811 (build-system python-build-system)
6814 ("python-pytest" ,python-pytest)
6815 ("python-pytest-runner" ,python-pytest-runner)))
6816 (home-page "https://github.com/fonttools/fonttools")
6817 (synopsis "Tools to manipulate font files")
6819 "FontTools/TTX is a library to manipulate font files from Python. It
6820 supports reading and writing of TrueType/OpenType fonts, reading and writing
6821 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6822 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6823 from an XML-based format.")
6824 (license license:expat)))
6826 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
6827 (define-public python2-fonttools
6828 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6834 (uri (pypi-uri "fonttools" version ".zip"))
6837 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
6839 (define-public python-ly
6846 (uri (pypi-uri name version))
6849 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6850 (build-system python-build-system)
6852 ;; FIXME: Some tests need network access.
6854 (synopsis "Tool and library for manipulating LilyPond files")
6855 (description "This package provides a Python library to parse, manipulate
6856 or create documents in LilyPond format. A command line program ly is also
6857 provided that can be used to do various manipulations with LilyPond files.")
6858 (home-page "https://pypi.python.org/pypi/python-ly")
6859 (license license:gpl2+)))
6861 (define-public python-appdirs
6863 (name "python-appdirs")
6868 (uri (pypi-uri "appdirs" version))
6871 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6872 (build-system python-build-system)
6873 (home-page "https://github.com/ActiveState/appdirs")
6875 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6877 "This module provides a portable way of finding out where user data
6878 should be stored on various operating systems.")
6879 (license license:expat)))
6881 (define-public python2-appdirs
6882 (package-with-python2 python-appdirs))
6884 (define-public python-llfuse
6886 (name "python-llfuse")
6890 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6893 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6894 (build-system python-build-system)
6899 `(("pkg-config" ,pkg-config)))
6900 (synopsis "Python bindings for FUSE")
6902 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6903 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6904 (license license:lgpl2.0+)
6905 (properties `((python2-variant . ,(delay python2-llfuse))))))
6907 (define-public python2-llfuse
6908 (package (inherit (package-with-python2
6909 (strip-python2-variant python-llfuse)))
6910 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6913 (define-public python-llfuse-0.41
6914 (package (inherit python-llfuse)
6919 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6920 "llfuse-" version ".tar.bz2"))
6923 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6924 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6925 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6926 (license (list license:expat license:lgpl2.0+))))
6928 (define-public python-msgpack
6930 (name "python-msgpack")
6934 (uri (pypi-uri "msgpack" version))
6937 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6938 (build-system python-build-system)
6940 `(#:modules ((guix build utils)
6941 (guix build python-build-system)
6946 (modify-phases %standard-phases
6949 (let ((cwd (getcwd)))
6950 (setenv "PYTHONPATH"
6951 (string-append cwd "/build/"
6952 (find (cut string-prefix? "lib" <>)
6953 (scandir (string-append cwd "/build")))
6955 (getenv "PYTHONPATH")))
6956 (invoke "pytest" "-v" "test")))))))
6958 `(("python-pytest" ,python-pytest)))
6959 (synopsis "MessagePack (de)serializer")
6960 (description "MessagePack is a fast, compact binary serialization format,
6961 suitable for similar data to JSON. This package provides CPython bindings for
6962 reading and writing MessagePack data.")
6963 (home-page "https://pypi.python.org/pypi/msgpack/")
6964 (license license:asl2.0)))
6966 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6967 ;; release 0.5. Some packages like borg still call it by the old name for now.
6968 ;; <https://bugs.gnu.org/30662>
6969 (define-public python-msgpack-transitional
6971 (inherit python-msgpack)
6972 (name "python-msgpack-transitional")
6974 (substitute-keyword-arguments (package-arguments python-msgpack)
6976 `(modify-phases ,phases
6977 (add-after 'unpack 'configure-transitional
6979 ;; Keep using the old name.
6980 (substitute* "setup.py"
6981 (("TRANSITIONAL = False")
6982 "TRANSITIONAL = 1"))
6985 (define-public python2-msgpack
6986 (package-with-python2 python-msgpack))
6988 (define-public python-netaddr
6990 (name "python-netaddr")
6995 (uri (pypi-uri "netaddr" version))
6998 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6999 (build-system python-build-system)
7000 (arguments `(#:tests? #f)) ;; No tests.
7001 (home-page "https://github.com/drkjam/netaddr/")
7002 (synopsis "Pythonic manipulation of network addresses")
7004 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7005 and MAC network addresses.")
7006 (license license:bsd-3)))
7008 (define-public python2-netaddr
7009 (package-with-python2 python-netaddr))
7011 (define-public python2-pyroute2
7013 (name "python2-pyroute2")
7018 (uri (pypi-uri "pyroute2" version))
7021 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7022 (build-system python-build-system)
7024 `(#:python ,python-2)) ;Python 3.x is not supported
7025 (home-page "https://github.com/svinota/pyroute2")
7026 (synopsis "Python netlink library")
7028 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7029 Supported netlink families and protocols include:
7031 @item rtnl, network settings - addresses, routes, traffic controls
7032 @item nfnetlink - netfilter API: ipset, nftables, ...
7033 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7034 @item devlink - manage and monitor devlink-enabled hardware
7035 @item generic - generic netlink families
7037 @item nl80211 - wireless functions API (basic support)
7038 @item taskstats - extended process statistics
7039 @item acpi_events - ACPI events monitoring
7040 @item thermal_events - thermal events monitoring
7041 @item VFS_DQUOT - disk quota events monitoring
7044 (license license:gpl2+)))
7046 (define-public python-wrapt
7048 (name "python-wrapt")
7053 (uri (pypi-uri "wrapt" version))
7056 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7057 (build-system python-build-system)
7059 ;; Tests are not included in the tarball, they are only available in the
7062 (home-page "https://github.com/GrahamDumpleton/wrapt")
7063 (synopsis "Module for decorators, wrappers and monkey patching")
7065 "The aim of the wrapt module is to provide a transparent object proxy for
7066 Python, which can be used as the basis for the construction of function
7067 wrappers and decorator functions.")
7068 (license license:bsd-2)))
7070 (define-public python2-wrapt
7071 (package-with-python2 python-wrapt))
7073 (define-public python-xlrd
7075 (name "python-xlrd")
7079 (uri (pypi-uri "xlrd" version))
7082 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7083 (build-system python-build-system)
7086 (modify-phases %standard-phases
7087 ;; Some tests depend on writing a temporary file to the user's home
7089 (add-after 'unpack 'fix-tests
7091 (delete-file "tests/test_open_workbook.py")
7093 (home-page "http://www.python-excel.org/")
7094 (synopsis "Library for extracting data from Excel files")
7095 (description "This package provides a library to extract data from
7096 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7097 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7098 Unicode-aware. It is not intended as an end-user tool.")
7099 (license license:bsd-3)))
7101 (define-public python2-xlrd
7102 (package-with-python2 python-xlrd))
7104 (define-public python-prettytable
7106 (name "python-prettytable")
7111 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7114 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7115 (build-system python-build-system)
7116 (home-page "http://code.google.com/p/prettytable/")
7117 (synopsis "Display tabular data in an ASCII table format")
7119 "A library designed to represent tabular data in visually appealing ASCII
7120 tables. PrettyTable allows for selection of which columns are to be printed,
7121 independent alignment of columns (left or right justified or centred) and
7122 printing of sub-tables by specifying a row range.")
7123 (license license:bsd-3)))
7125 (define-public python2-prettytable
7126 (package-with-python2 python-prettytable))
7128 (define-public python-tables
7130 (name "python-tables")
7135 (uri (pypi-uri "tables" version))
7138 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7139 (modules '((guix build utils)))
7142 ;; Remove pre-compiled .pyc files from source.
7143 (for-each delete-file-recursively
7144 (find-files "." "__pycache__" #:directories? #t))
7145 (for-each delete-file (find-files "." "\\.pyc$"))
7147 (build-system python-build-system)
7149 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7150 ;; or "check", so we must override the build and check phases.
7152 (modify-phases %standard-phases
7153 (add-after 'unpack 'use-gcc
7155 (substitute* "setup.py"
7156 (("compiler = new_compiler\\(\\)" line)
7158 "\ncompiler.set_executables(compiler='gcc',"
7159 "compiler_so='gcc',"
7161 "linker_so='gcc -shared')")))
7164 (lambda* (#:key inputs #:allow-other-keys)
7165 (invoke "python" "setup.py" "build"
7166 (string-append "--hdf5="
7167 (assoc-ref inputs "hdf5")))))
7169 (lambda* (#:key inputs #:allow-other-keys)
7170 (invoke "python" "setup.py" "check"
7171 (string-append "--hdf5="
7172 (assoc-ref inputs "hdf5"))))))))
7174 `(("python-numexpr" ,python-numexpr)
7175 ("python-numpy" ,python-numpy)))
7177 `(("python-cython" ,python-cython)
7178 ("pkg-config" ,pkg-config)))
7183 (home-page "http://www.pytables.org/")
7184 (synopsis "Hierarchical datasets for Python")
7185 (description "PyTables is a package for managing hierarchical datasets and
7186 designed to efficiently cope with extremely large amounts of data.")
7187 (license license:bsd-3)))
7189 (define-public python2-tables
7190 (package-with-python2 python-tables))
7192 (define-public python-pyasn1
7194 (name "python-pyasn1")
7199 (uri (pypi-uri "pyasn1" version))
7202 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7203 (build-system python-build-system)
7204 (home-page "http://pyasn1.sourceforge.net/")
7205 (synopsis "ASN.1 types and codecs")
7207 "This is an implementation of ASN.1 types and codecs in Python. It is
7208 suitable for a wide range of protocols based on the ASN.1 specification.")
7209 (license license:bsd-2)))
7211 (define-public python2-pyasn1
7212 (package-with-python2 python-pyasn1))
7214 (define-public python-pyasn1-modules
7216 (name "python-pyasn1-modules")
7221 (uri (pypi-uri "pyasn1-modules" version))
7224 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7225 (build-system python-build-system)
7227 `(("python-pyasn1" ,python-pyasn1)))
7228 (home-page "https://sourceforge.net/projects/pyasn1/")
7229 (synopsis "ASN.1 codec implementations")
7231 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7232 implementations of ASN.1-based codecs and protocols.")
7233 (license license:bsd-3)))
7235 (define-public python2-pyasn1-modules
7236 (package-with-python2 python-pyasn1-modules))
7238 (define-public python-ipaddress
7240 (name "python-ipaddress")
7244 (uri (pypi-uri "ipaddress" version))
7247 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7248 (build-system python-build-system)
7249 (home-page "https://github.com/phihag/ipaddress")
7250 (synopsis "IP address manipulation library")
7252 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7253 in Python. This library is used to create, poke at, and manipulate IPv4 and
7254 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7255 module to older versions of Python.")
7256 (license license:psfl)))
7258 (define-public python2-ipaddress
7259 (package-with-python2 python-ipaddress))
7261 (define-public python2-ipaddr
7263 (name "python2-ipaddr")
7268 (uri (pypi-uri "ipaddr" version))
7270 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7271 (build-system python-build-system)
7273 `(#:python ,python-2 ;version 2 only
7275 (modify-phases %standard-phases
7277 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7278 (home-page "https://github.com/google/ipaddr-py")
7279 (synopsis "IP address manipulation library")
7281 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7282 IPv6 addresses and networks.
7284 For new implementations you may prefer to use the standard module
7285 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7286 versions of Python.")
7287 (license license:asl2.0)))
7289 (define-public python-idna
7291 (name "python-idna")
7296 (uri (pypi-uri "idna" version))
7299 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7300 (build-system python-build-system)
7301 (home-page "https://github.com/kjd/idna")
7302 (synopsis "Internationalized domain names in applications")
7304 "This is a library to support the Internationalised Domain Names in
7305 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7306 protocol is often referred to as “IDNA2008” and can produce different results
7307 from the earlier standard from 2003. The library is also intended to act as a
7308 suitable drop-in replacement for the “encodings.idna” module that comes with
7309 the Python standard library but currently only supports the older 2003
7311 (license license:bsd-4)))
7313 (define-public python-idna-2.7
7314 (package (inherit python-idna)
7318 (uri (pypi-uri "idna" version))
7321 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7324 (define-public python2-idna
7325 (package-with-python2 python-idna))
7327 (define-public python-idna-ssl
7329 (name "python-idna-ssl")
7334 (uri (pypi-uri "idna-ssl" version))
7337 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7338 (build-system python-build-system)
7340 `(#:tests? #f)) ;circular dependency with python-aiohttp
7341 (home-page "https://github.com/aio-libs/idna-ssl")
7342 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7343 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7345 (license license:expat)))
7347 (define-public python-pretend
7349 (name "python-pretend")
7354 (uri (pypi-uri "pretend" version))
7357 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7358 (build-system python-build-system)
7359 (home-page "https://github.com/alex/pretend")
7360 (synopsis "Library for stubbing in Python")
7362 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7363 technique for writing tests. You may hear the term mixed up with mocks,
7364 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7365 responses, rather than doing any computation.")
7366 (license license:bsd-3)))
7368 (define-public python2-pretend
7369 (package-with-python2 python-pretend))
7371 (define-public python-pip
7378 (uri (pypi-uri "pip" version))
7381 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7382 (build-system python-build-system)
7384 '(#:tests? #f)) ; there are no tests in the pypi archive.
7385 (home-page "https://pip.pypa.io/")
7386 (synopsis "Package manager for Python software")
7388 "Pip is a package manager for Python software, that finds packages on the
7389 Python Package Index (PyPI).")
7390 (license license:expat)))
7392 (define-public python2-pip
7393 (package-with-python2 python-pip))
7395 (define-public python-tlsh
7397 (name "python-tlsh")
7399 (home-page "https://github.com/trendmicro/tlsh")
7404 (url "https://github.com/trendmicro/tlsh.git")
7405 (commit (string-append "v" version))))
7406 (file-name (git-file-name name version))
7408 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7409 (build-system cmake-build-system)
7411 '(#:out-of-source? #f
7412 #:phases (modify-phases %standard-phases
7415 (lambda* (#:key outputs #:allow-other-keys)
7416 ;; Build and install the Python bindings. The underlying
7417 ;; C++ library is apparently not meant to be installed.
7418 (let ((out (assoc-ref outputs "out")))
7419 (with-directory-excursion "py_ext"
7420 (and (system* "python" "setup.py" "build")
7421 (system* "python" "setup.py" "install"
7422 (string-append "--prefix=" out))))))))))
7423 (inputs `(("python" ,python-wrapper))) ;for the bindings
7424 (synopsis "Fuzzy matching library for Python")
7426 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7427 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7428 value which can be used for similarity comparisons. Similar objects have
7429 similar hash values, which allows for the detection of similar objects by
7430 comparing their hash values. The byte stream should have a sufficient amount
7431 of complexity; for example, a byte stream of identical bytes will not generate
7433 (license license:asl2.0)))
7435 (define-public python2-tlsh
7437 (inherit python-tlsh)
7438 (name "python2-tlsh")
7439 (inputs `(("python" ,python-2)))))
7441 (define-public python-termcolor
7443 (name "python-termcolor")
7448 (uri (pypi-uri "termcolor" version))
7451 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7452 (build-system python-build-system)
7454 ;; There are no tests.
7456 (home-page "https://pypi.python.org/pypi/termcolor")
7457 (synopsis "ANSII Color formatting for terminal output")
7459 "This package provides ANSII Color formatting for output in terminals.")
7460 (license license:expat)))
7462 (define-public python2-termcolor
7463 (package-with-python2 python-termcolor))
7465 (define-public python-libarchive-c
7467 (name "python-libarchive-c")
7471 (uri (pypi-uri "libarchive-c" version))
7474 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7475 (build-system python-build-system)
7477 '(#:phases (modify-phases %standard-phases
7479 'build 'reference-libarchive
7480 (lambda* (#:key inputs #:allow-other-keys)
7481 ;; Retain the absolute file name of libarchive.so.
7482 (let ((libarchive (assoc-ref inputs "libarchive")))
7483 (substitute* "libarchive/ffi.py"
7484 (("find_library\\('archive'\\)")
7485 (string-append "'" libarchive
7486 "/lib/libarchive.so'"))))))
7488 (lambda _ (invoke "pytest" "-vv"))))))
7490 `(("python-mock" ,python-mock)
7491 ("python-pytest" ,python-pytest)))
7493 `(("libarchive" ,libarchive)))
7494 (home-page "https://github.com/Changaco/python-libarchive-c")
7495 (synopsis "Python interface to libarchive")
7497 "This package provides Python bindings to libarchive, a C library to
7498 access possibly compressed archives in many different formats. It uses
7499 Python's @code{ctypes} foreign function interface (FFI).")
7500 (license license:lgpl2.0+)))
7502 (define-public python2-libarchive-c
7503 (package-with-python2 python-libarchive-c))
7505 (define-public python-file
7508 (name "python-file")
7509 (build-system python-build-system)
7511 '(#:tests? #f ;no tests
7512 #:configure-flags '("--single-version-externally-managed" "--root=/")
7513 #:phases (modify-phases %standard-phases
7514 (add-before 'build 'change-directory
7518 (add-before 'build 'set-library-file-name
7519 (lambda* (#:key inputs #:allow-other-keys)
7520 (let ((file (assoc-ref inputs "file")))
7521 (substitute* "magic.py"
7522 (("find_library\\('magic'\\)")
7523 (string-append "'" file "/lib/libmagic.so'")))
7525 (inputs `(("file" ,file)))
7526 (native-inputs (if (%current-target-system)
7527 `(("self" ,this-package))
7529 (synopsis "Python bindings to the libmagic file type guesser. Note that
7530 this module and the python-magic module both provide a \"magic.py\" file;
7531 these two modules, which are different and were developed separately, both
7532 serve the same purpose: provide Python bindings for libmagic.")))
7534 (define-public python2-file
7535 (package-with-python2 python-file))
7537 (define-public python-debian
7539 (name "python-debian")
7540 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7544 ;; Use git-fetch, as pypi doesn't include test suite.
7549 (file-name (git-file-name name version))
7552 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7553 (build-system python-build-system)
7555 `(#:phases (modify-phases %standard-phases
7556 (add-after 'unpack 'remove-debian-specific-tests
7557 ;; python-apt, apt and dpkg are not yet available in guix,
7558 ;; and these tests heavily depend on them.
7560 (delete-file "lib/debian/tests/test_deb822.py")
7561 (delete-file "lib/debian/tests/test_debfile.py")
7564 `(("python-six" ,python-six)
7565 ("python-chardet" ,python-chardet)))
7566 (synopsis "Debian package related modules")
7568 ;; XXX: Use @enumerate instead of @itemize to work around
7569 ;; <http://bugs.gnu.org/21772>.
7570 "This package provides Python modules that abstract many formats of
7571 Debian-related files, such as:
7574 @item Debtags information;
7575 @item @file{debian/changelog} files;
7576 @item packages files, pdiffs;
7577 @item control files of single or multiple RFC822-style paragraphs---e.g.
7578 @file{debian/control}, @file{.changes}, @file{.dsc};
7579 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7580 contained files and meta-information.
7583 ;; Modules are either GPLv2+ or GPLv3+.
7584 (license license:gpl3+)))
7586 (define-public python2-debian
7587 (package-with-python2 python-debian))
7589 (define-public python-nbformat
7591 (name "python-nbformat")
7596 (uri (pypi-uri "nbformat" version))
7599 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7600 (build-system python-build-system)
7601 (arguments `(#:tests? #f)) ; no test target
7603 `(("python-ipython-genutils" ,python-ipython-genutils)
7604 ("python-jsonschema" ,python-jsonschema)
7605 ("python-jupyter-core" ,python-jupyter-core)
7606 ("python-traitlets" ,python-traitlets)))
7607 (home-page "http://jupyter.org")
7608 (synopsis "Jupyter Notebook format")
7609 (description "This package provides the reference implementation of the
7610 Jupyter Notebook format and Python APIs for working with notebooks.")
7611 (license license:bsd-3)))
7613 (define-public python2-nbformat
7614 (package-with-python2 python-nbformat))
7616 (define-public python-bleach
7618 (name "python-bleach")
7623 (uri (pypi-uri "bleach" version))
7626 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7627 (build-system python-build-system)
7629 `(("python-webencodings" ,python-webencodings)
7630 ("python-six" ,python-six)))
7632 `(("python-pytest" ,python-pytest)
7633 ("python-pytest-runner" ,python-pytest-runner-2)))
7634 (home-page "https://github.com/jsocol/bleach")
7635 (synopsis "Whitelist-based HTML-sanitizing tool")
7636 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7637 (license license:asl2.0)))
7639 (define-public python2-bleach
7640 (package-with-python2 python-bleach))
7642 (define-public python-entrypoints
7644 (name "python-entrypoints")
7649 (uri (pypi-uri "entrypoints" version))
7652 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7653 (build-system python-build-system)
7654 ;; The package does not come with a setup.py file, so we have to generate
7659 (modify-phases %standard-phases
7660 (add-after 'unpack 'create-setup.py
7662 (call-with-output-file "setup.py"
7665 from setuptools import setup
7666 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7668 (home-page "https://github.com/takluyver/entrypoints")
7669 (synopsis "Discover and load entry points from installed Python packages")
7670 (description "Entry points are a way for Python packages to advertise
7671 objects with some common interface. The most common examples are
7672 @code{console_scripts} entry points, which define shell commands by
7673 identifying a Python function to run. The @code{entrypoints} module contains
7674 functions to find and load entry points.")
7675 (license license:expat)))
7677 (define-public python2-entrypoints
7678 (package-with-python2 python-entrypoints))
7680 (define-public python-nbconvert
7682 (name "python-nbconvert")
7687 (uri (pypi-uri "nbconvert" version))
7690 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7691 (build-system python-build-system)
7693 `(;; The "bdist_egg" target is disabled by default, causing the installation
7695 #:configure-flags (list "bdist_egg")
7696 ;; FIXME: 5 failures, 40 errors.
7699 ;; (modify-phases %standard-phases
7702 ;; (zero? (system* "py.test" "-v")))))
7704 `(("python-pytest" ,python-pytest)))
7706 `(("python-bleach" ,python-bleach)
7707 ("python-entrypoints" ,python-entrypoints)
7708 ("python-jinja2" ,python-jinja2)
7709 ("python-jupyter-core" ,python-jupyter-core)
7710 ("python-mistune" ,python-mistune)
7711 ("python-nbformat" ,python-nbformat)
7712 ("python-pygments" ,python-pygments)
7713 ("python-traitlets" ,python-traitlets)))
7714 (home-page "http://jupyter.org")
7715 (synopsis "Converting Jupyter Notebooks")
7716 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7717 notebooks to various other formats via Jinja templates. It allows you to
7718 convert an @code{.ipynb} notebook file into various static formats including:
7726 @item ReStructured Text (rst)
7727 @item executable script
7729 (license license:bsd-3)))
7731 (define-public python2-nbconvert
7732 (package-with-python2 python-nbconvert))
7734 (define-public python-notebook
7736 (name "python-notebook")
7740 (uri (pypi-uri "notebook" version))
7743 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7744 (build-system python-build-system)
7747 (modify-phases %standard-phases
7750 ;; These tests require a browser
7751 (delete-file-recursively "notebook/tests/selenium")
7752 ;; Some tests need HOME
7753 (setenv "HOME" "/tmp")
7754 ;; This file contains "warningfilters", which are not supported
7755 ;; by this version of nose.
7756 (delete-file "setup.cfg")
7757 (with-directory-excursion "/tmp"
7758 (invoke "nosetests" "-v"))
7761 `(("python-jupyter-core" ,python-jupyter-core)
7762 ("python-nbformat" ,python-nbformat)
7763 ("python-nbconvert" ,python-nbconvert)
7764 ("python-prometheus-client" ,python-prometheus-client)
7765 ("python-send2trash" ,python-send2trash)
7766 ("python-terminado" ,python-terminado)))
7768 `(("python-nose" ,python-nose)
7769 ("python-sphinx" ,python-sphinx)
7770 ("python-requests" ,python-requests)))
7771 (home-page "http://jupyter.org/")
7772 (synopsis "Web-based notebook environment for interactive computing")
7774 "The Jupyter HTML notebook is a web-based notebook environment for
7775 interactive computing.")
7776 (properties `((python2-variant . ,(delay python2-notebook))))
7777 (license license:bsd-3)))
7779 (define-public python2-notebook
7780 (let ((base (package-with-python2
7781 (strip-python2-variant python-notebook))))
7782 (package (inherit base)
7784 `(("python2-mock" ,python2-mock)
7785 ,@(package-native-inputs base)))
7787 (substitute-keyword-arguments (package-arguments base)
7789 `(modify-phases ,phases
7790 (add-before 'check 'disable-test-case
7791 ;; The test requires network access to localhost. Curiously it
7792 ;; fails with Python 2 only. Simply make the test-case return
7796 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7797 (("formats = self.nbconvert_api") "return #")))))))))))
7799 (define-public python-widgetsnbextension
7801 (name "python-widgetsnbextension")
7806 (uri (pypi-uri "widgetsnbextension" version))
7809 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7810 (build-system python-build-system)
7812 `(("python-ipykernel" ,python-ipykernel)
7813 ("python-notebook" ,python-notebook)))
7815 `(("python-certifi" ,python-certifi)
7816 ("python-nose" ,python-nose)))
7817 (home-page "https://ipython.org")
7818 (synopsis "IPython HTML widgets for Jupyter")
7819 (description "This package provides interactive HTML widgets for Jupyter
7821 (license license:bsd-3)))
7823 (define-public python2-widgetsnbextension
7824 (package-with-python2 python-widgetsnbextension))
7826 (define-public python-ipywidgets
7828 (name "python-ipywidgets")
7833 (uri (pypi-uri "ipywidgets" version))
7836 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7837 (build-system python-build-system)
7839 `(("python-ipython" ,python-ipython)
7840 ("python-traitlets" ,python-traitlets)
7841 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7843 `(("python-nose" ,python-nose)
7844 ("python-pytest" ,python-pytest)))
7845 (home-page "https://ipython.org")
7846 (synopsis "IPython HTML widgets for Jupyter")
7847 (description "Ipywidgets are interactive HTML widgets for Jupyter
7848 notebooks and the IPython kernel. Notebooks come alive when interactive
7849 widgets are used. Users gain control of their data and can visualize changes
7851 (license license:bsd-3)))
7853 (define-public python2-ipywidgets
7854 (package-with-python2 python-ipywidgets))
7856 (define-public python-jupyter-console
7858 (name "python-jupyter-console")
7863 (uri (pypi-uri "jupyter_console" version))
7866 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7867 (build-system python-build-system)
7869 `(("python-ipykernel" ,python-ipykernel)
7870 ("python-jupyter-client" ,python-jupyter-client)
7871 ("python-prompt-toolkit" ,python-prompt-toolkit)
7872 ("python-pygments" ,python-pygments)))
7874 `(("python-nose" ,python-nose)))
7875 (home-page "https://jupyter.org")
7876 (synopsis "Jupyter terminal console")
7877 (description "This package provides a terminal-based console frontend for
7878 Jupyter kernels. It also allows for console-based interaction with non-Python
7879 Jupyter kernels such as IJulia and IRKernel.")
7880 (license license:bsd-3)))
7882 (define-public python2-jupyter-console
7884 (name "python2-jupyter-console")
7889 (uri (pypi-uri "jupyter_console" version))
7892 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7893 (build-system python-build-system)
7894 ;; Tests only run in an TTY.
7895 (arguments `(#:tests? #f))
7897 `(("python2-ipykernel" ,python2-ipykernel)
7898 ("python2-jupyter-client" ,python2-jupyter-client)
7899 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7900 ("python2-pygments" ,python2-pygments)))
7902 `(("python2-nose" ,python2-nose)))
7903 (home-page "https://jupyter.org")
7904 (synopsis "Jupyter terminal console")
7905 (description "This package provides a terminal-based console frontend for
7906 Jupyter kernels. It also allows for console-based interaction with non-Python
7907 Jupyter kernels such as IJulia and IRKernel.")
7908 (license license:bsd-3)))
7910 ;; The python-ipython and python-jupyter-console require each other. To get
7911 ;; the functionality in both packages working, strip down the
7912 ;; python-jupyter-console package when using it as an input to python-ipython.
7913 (define python-jupyter-console-minimal
7915 (inherit python-jupyter-console)
7916 (name "python-jupyter-console-minimal")
7918 (substitute-keyword-arguments
7919 (package-arguments python-jupyter-console)
7921 `(modify-phases ,phases
7922 (add-after 'install 'delete-bin
7923 (lambda* (#:key outputs #:allow-other-keys)
7924 ;; Delete the bin files, to avoid conflicts in profiles
7925 ;; where python-ipython and python-jupyter-console are
7927 (delete-file-recursively
7929 (assoc-ref outputs "out") "/bin"))))))))
7930 ;; Remove the python-ipython propagated input, to avoid the cycle
7934 (package-propagated-inputs python-jupyter-console)))))
7936 (define-public python-qtconsole
7938 (name "python-qtconsole")
7943 (uri (pypi-uri "qtconsole" version))
7946 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7947 (build-system python-build-system)
7949 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7950 ;; but we only have the LTS version 5.x. This means that there might be
7951 ;; runtime errors, but since this is a dependency of the Jupyter package,
7952 ;; and Jupyter can be used without the qtconsole we can overlook this for
7956 (modify-phases %standard-phases
7957 (add-before 'check 'pre-check
7959 (setenv "QT_QPA_PLATFORM" "offscreen")
7962 `(("python-ipykernel" ,python-ipykernel)
7963 ("python-ipython" ,python-ipython)))
7965 `(("python-pytest" ,python-pytest)))
7966 (home-page "http://jupyter.org")
7967 (synopsis "Jupyter Qt console")
7968 (description "This package provides a Qt-based console for Jupyter with
7969 support for rich media output.")
7970 (license license:bsd-3)))
7972 (define-public python-jsbeautifier
7974 (name "python-jsbeautifier")
7976 (home-page "https://github.com/beautify-web/js-beautify")
7981 (commit (string-append "v" version))))
7982 (file-name (git-file-name name version))
7985 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7986 (build-system python-build-system)
7988 `(#:phases (modify-phases %standard-phases
7989 (add-after 'unpack 'chdir
7991 ;; The upstream Git repository contains all the code,
7992 ;; but this package only builds the python code.
7995 (add-after 'unpack 'patch-python-six-requirements
7997 (substitute* "python/setup.py"
8002 `(("python-editorconfig" ,python-editorconfig)
8003 ("python-six" ,python-six)))
8005 `(("python-pytest" ,python-pytest)))
8006 (synopsis "JavaScript unobfuscator and beautifier")
8007 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8008 popular online obfuscators.")
8009 (license license:expat)))
8011 (define-public jupyter
8018 (uri (pypi-uri "jupyter" version))
8021 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8022 (build-system python-build-system)
8023 (arguments '(#:tests? #f)) ; there are none.
8025 `(("python-ipykernel" ,python-ipykernel)
8026 ("python-ipywidgets" ,python-ipywidgets)
8027 ("python-jupyter-console" ,python-jupyter-console)
8028 ("python-nbconvert" ,python-nbconvert)
8029 ("python-notebook" ,python-notebook)
8030 ("python-qtconsole" ,python-qtconsole)))
8031 (native-search-paths
8032 (list (search-path-specification
8033 (variable "JUPYTER_PATH")
8034 (files '("share/jupyter")))))
8035 (home-page "https://jupyter.org")
8036 (synopsis "Web application for interactive documents")
8038 "The Jupyter Notebook is a web application that allows you to create and
8039 share documents that contain live code, equations, visualizations and
8040 explanatory text. Uses include: data cleaning and transformation, numerical
8041 simulation, statistical modeling, machine learning and much more.")
8042 (license license:bsd-3)))
8044 (define-public python-chardet
8046 (name "python-chardet")
8051 (uri (pypi-uri "chardet" version))
8054 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8056 `(("python-hypothesis" ,python-hypothesis)
8057 ("python-pytest" ,python-pytest)
8058 ("python-pytest-runner" ,python-pytest-runner)))
8059 (build-system python-build-system)
8060 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8061 (arguments `(#:tests? #f))
8062 (home-page "https://github.com/chardet/chardet")
8063 (synopsis "Universal encoding detector for Python 2 and 3")
8065 "This package provides @code{chardet}, a Python module that can
8066 automatically detect a wide range of file encodings.")
8067 (license license:lgpl2.1+)))
8069 (define-public python2-chardet
8070 (package-with-python2 python-chardet))
8072 (define-public python-docopt
8074 (name "python-docopt")
8079 ;; The release on PyPI does not include tests.
8081 (url "https://github.com/docopt/docopt")
8083 (file-name (git-file-name name version))
8086 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8087 (build-system python-build-system)
8089 `(("python-pytest" ,python-pytest)))
8092 (modify-phases %standard-phases
8094 (lambda _ (invoke "py.test"))))))
8095 (home-page "http://docopt.org")
8096 (synopsis "Command-line interface description language for Python")
8097 (description "This library allows the user to define a command-line
8098 interface from a program's help message rather than specifying it
8099 programmatically with command-line parsers like @code{getopt} and
8101 (license license:expat)))
8103 (define-public python2-docopt
8104 (package-with-python2 python-docopt))
8106 (define-public python-pythondialog
8108 (name "python-pythondialog")
8113 (uri (pypi-uri "pythondialog" version))
8116 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8117 (build-system python-build-system)
8120 (modify-phases %standard-phases
8121 (add-after 'unpack 'patch-path
8122 (lambda* (#:key inputs #:allow-other-keys)
8123 (let* ((dialog (assoc-ref inputs "dialog")))
8124 ;; Since this library really wants to grovel the search path, we
8125 ;; must hardcode dialog's store path into it.
8126 (substitute* "dialog.py"
8127 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8128 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8130 #:tests? #f)) ; no test suite
8132 `(("dialog" ,dialog)))
8133 (home-page "http://pythondialog.sourceforge.net/")
8134 (synopsis "Python interface to the UNIX dialog utility")
8135 (description "A Python wrapper for the dialog utility. Its purpose is to
8136 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8137 This allows one to make simple text-mode user interfaces on Unix-like systems")
8138 (license license:lgpl2.1)
8139 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8141 (define-public python2-pythondialog
8142 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8145 (version (package-version python-pythondialog))
8148 (uri (pypi-uri "python2-pythondialog" version))
8151 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8153 (define-public python-configobj
8155 (name "python-configobj")
8159 (uri (pypi-uri "configobj" version))
8162 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8163 ;; Patch setup.py so it looks for python-setuptools, which is
8164 ;; required to parse the keyword 'install_requires' in setup.py.
8165 (patches (search-patches "python-configobj-setuptools.patch"))))
8166 (build-system python-build-system)
8168 `(("python-six" ,python-six)))
8169 (synopsis "Config file reading, writing and validation")
8170 (description "ConfigObj is a simple but powerful config file reader and
8171 writer: an ini file round tripper. Its main feature is that it is very easy to
8172 use, with a straightforward programmer’s interface and a simple syntax for
8174 (home-page "https://github.com/DiffSK/configobj")
8175 (license license:bsd-3)))
8177 (define-public python2-configobj
8178 (package-with-python2 python-configobj))
8180 (define-public python-configargparse
8182 (name "python-configargparse")
8186 (uri (pypi-uri "ConfigArgParse" version))
8189 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8190 (build-system python-build-system)
8192 `(("python-pyyaml" ,python-pyyaml)))
8195 (modify-phases %standard-phases
8198 ;; Bypass setuptools-shim because one test relies on "setup.py"
8199 ;; being the first argument passed to the python call.
8201 ;; NOTE: Many tests do not run because they rely on Python's
8202 ;; built-in test.test_argparse, but we remove the unit tests from
8203 ;; our Python installation.
8204 (invoke "python" "setup.py" "test"))))))
8205 (synopsis "Replacement for argparse")
8206 (description "A drop-in replacement for argparse that allows options to also
8207 be set via config files and/or environment variables.")
8208 (home-page "https://github.com/bw2/ConfigArgParse")
8209 (license license:expat)))
8211 (define-public python2-configargparse
8212 (package-with-python2 python-configargparse))
8214 (define-public python-argparse-manpage
8216 (name "python-argparse-manpage")
8221 (uri (pypi-uri "argparse-manpage" version))
8224 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8225 (build-system python-build-system)
8226 (home-page "https://github.com/praiskup/argparse-manpage")
8227 (synopsis "Build manual page from Python's ArgumentParser object")
8229 "This package provides tools to build manual pages from Python's
8230 @code{ArgumentParser} object.")
8231 (license license:asl2.0)))
8233 (define-public python-contextlib2
8235 (name "python-contextlib2")
8240 (uri (pypi-uri "contextlib2" version))
8243 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8244 (build-system python-build-system)
8245 (home-page "http://contextlib2.readthedocs.org/")
8246 (synopsis "Tools for decorators and context managers")
8247 (description "This module is primarily a backport of the Python
8248 3.2 contextlib to earlier Python versions. Like contextlib, it
8249 provides utilities for common tasks involving decorators and context
8250 managers. It also contains additional features that are not part of
8251 the standard library.")
8252 (license license:psfl)))
8254 (define-public python2-contextlib2
8256 (name "python2-contextlib2")
8261 (uri (pypi-uri "contextlib2" version))
8264 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8265 (build-system python-build-system)
8267 `(#:python ,python-2
8269 (modify-phases %standard-phases
8271 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8273 `(("python2-unittest2" ,python2-unittest2)))
8274 (home-page "http://contextlib2.readthedocs.org/")
8275 (synopsis "Tools for decorators and context managers")
8276 (description "This module is primarily a backport of the Python
8277 3.2 contextlib to earlier Python versions. Like contextlib, it
8278 provides utilities for common tasks involving decorators and context
8279 managers. It also contains additional features that are not part of
8280 the standard library.")
8281 (license license:psfl)))
8283 (define-public python-texttable
8285 (name "python-texttable")
8290 (uri (pypi-uri "texttable" version))
8293 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8294 (build-system python-build-system)
8295 (arguments '(#:tests? #f)) ; no tests
8296 (home-page "https://github.com/foutaise/texttable/")
8297 (synopsis "Python module for creating simple ASCII tables")
8298 (description "Texttable is a Python module for creating simple ASCII
8300 (license license:lgpl2.1+)))
8302 (define-public python2-texttable
8303 (package-with-python2 python-texttable))
8305 (define-public python-atomicwrites
8307 (name "python-atomicwrites")
8311 (uri (pypi-uri "atomicwrites" version))
8314 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8315 (build-system python-build-system)
8316 (synopsis "Atomic file writes in Python")
8317 (description "Library for atomic file writes using platform dependent tools
8318 for atomic file system operations.")
8319 (home-page "https://github.com/untitaker/python-atomicwrites")
8320 (license license:expat)))
8322 (define-public python2-atomicwrites
8323 (package-with-python2 python-atomicwrites))
8325 (define-public python-click-threading
8327 (name "python-click-threading")
8331 (uri (pypi-uri "click-threading" version))
8334 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8335 (build-system python-build-system)
8337 `(("python-click" ,python-click)))
8338 (synopsis "Utilities for multithreading in Click")
8339 (description "This package provides utilities for multithreading in Click
8341 (home-page "https://github.com/click-contrib/click-threading")
8342 (license license:expat)))
8344 (define-public python-click-log
8346 (name "python-click-log")
8350 (uri (pypi-uri "click-log" version))
8353 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8354 (build-system python-build-system)
8356 `(("python-click" ,python-click)))
8357 (synopsis "Logging for click applications")
8358 (description "This package provides a Python library for logging Click
8360 (home-page "https://github.com/click-contrib/click-log")
8361 (license license:expat)))
8363 (define-public python-apipkg
8365 (name "python-apipkg")
8369 (uri (pypi-uri "apipkg" version))
8372 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8373 (build-system python-build-system)
8375 `(("python-pytest" ,python-pytest)))
8376 (synopsis "Namespace control and lazy-import mechanism")
8377 (description "With apipkg you can control the exported namespace of a Python
8378 package and greatly reduce the number of imports for your users. It is a small
8379 pure Python module that works on virtually all Python versions.")
8380 (home-page "https://github.com/pytest-dev/apipkg")
8381 (license license:expat)))
8383 (define-public python2-apipkg
8384 (package-with-python2 python-apipkg))
8386 (define-public python-execnet
8388 (name "python-execnet")
8392 (uri (pypi-uri "execnet" version))
8395 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8396 (build-system python-build-system)
8398 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8399 ;; The two test failures are caused by the lack of an `ssh` executable.
8400 ;; The test suite can be run with pytest after the 'install' phase.
8403 `(("python-pytest" ,python-pytest)
8404 ("python-setuptools-scm" ,python-setuptools-scm)))
8406 `(("python-apipkg" ,python-apipkg)))
8407 (synopsis "Rapid multi-Python deployment")
8408 (description "Execnet provides a share-nothing model with
8409 channel-send/receive communication for distributing execution across many
8410 Python interpreters across version, platform and network barriers. It has a
8411 minimal and fast API targeting the following uses:
8413 @item distribute tasks to (many) local or remote CPUs
8414 @item write and deploy hybrid multi-process applications
8415 @item write scripts to administer multiple environments
8417 (home-page "http://codespeak.net/execnet/")
8418 (license license:expat)))
8420 (define-public python2-execnet
8421 (package-with-python2 python-execnet))
8423 (define-public python-icalendar
8425 (name "python-icalendar")
8429 (uri (pypi-uri "icalendar" version))
8432 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8433 (build-system python-build-system)
8435 `(("python-dateutil" ,python-dateutil)
8436 ("python-pytz" ,python-pytz)))
8437 (synopsis "Python library for parsing iCalendar files")
8438 (description "The icalendar package is a parser/generator of iCalendar
8439 files for use with Python.")
8440 (home-page "https://github.com/collective/icalendar")
8441 (license license:bsd-2)))
8443 (define-public python-args
8445 (name "python-args")
8449 (uri (pypi-uri "args" version))
8452 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8453 (build-system python-build-system)
8454 (home-page "https://github.com/kennethreitz/args")
8455 (synopsis "Command-line argument parser")
8457 "This library provides a Python module to parse command-line arguments.")
8458 (license license:bsd-3)))
8460 (define-public python2-args
8461 (package-with-python2 python-args))
8463 (define-public python-clint
8465 (name "python-clint")
8469 (uri (pypi-uri "clint" version))
8472 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8473 (build-system python-build-system)
8476 (modify-phases %standard-phases
8478 (lambda _ (invoke "py.test" "-v"))))))
8480 `(("python-pytest" ,python-pytest)))
8482 `(("python-args" ,python-args)))
8483 (home-page "https://github.com/kennethreitz/clint")
8484 (synopsis "Command-line interface tools")
8486 "Clint is a Python module filled with a set of tools for developing
8487 command-line applications, including tools for colored and indented
8488 output, progress bar display, and pipes.")
8489 (license license:isc)))
8491 (define-public python2-clint
8492 (package-with-python2 python-clint))
8494 (define-public python-rply
8496 (name "python-rply")
8500 (uri (pypi-uri "rply" version))
8503 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8504 (build-system python-build-system)
8506 `(("python-appdirs" ,python-appdirs)))
8507 (home-page "https://github.com/alex/rply")
8508 (synopsis "Parser generator for Python")
8510 "This package provides a pure Python based parser generator, that also
8511 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8512 with a new public API, and RPython support.")
8513 (license license:bsd-3)))
8515 (define-public python2-rply
8516 (package-with-python2 python-rply))
8518 (define-public python-hy
8524 (uri (pypi-uri "hy" version))
8527 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8528 (build-system python-build-system)
8531 (modify-phases %standard-phases
8532 (add-before 'install 'set-HOME
8534 (setenv "HOME" "/tmp")))
8537 ;; Tests require write access to HOME.
8538 (setenv "HOME" "/tmp")
8539 (invoke "nosetests"))))))
8541 `(("python-coverage" ,python-coverage)
8542 ("python-nose" ,python-nose)))
8544 `(("python-astor" ,python-astor)
8545 ("python-clint" ,python-clint)
8546 ("python-rply" ,python-rply)
8547 ("python-fastentrypoints"
8548 ,python-fastentrypoints)
8549 ("python-funcparserlib"
8550 ,python-funcparserlib)))
8551 (home-page "http://hylang.org/")
8552 (synopsis "Lisp frontend to Python")
8554 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8555 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8556 Python at your fingertips, in Lisp form.")
8557 (license license:expat)))
8559 (define-public python2-hy
8560 (package-with-python2 python-hy))
8562 (define-public python2-functools32
8564 (name "python2-functools32")
8569 (uri (pypi-uri "functools32" version))
8572 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8573 (build-system python-build-system)
8575 `(#:python ,python-2
8576 #:tests? #f)) ; no test target
8577 (home-page "https://github.com/MiCHiLU/python-functools32")
8579 "Backport of the functools module from Python 3.2.3")
8581 "This package is a backport of the @code{functools} module from Python
8582 3.2.3 for use with older versions of Python and PyPy.")
8583 (license license:expat)))
8585 (define-public python2-subprocess32
8587 (name "python2-subprocess32")
8591 (uri (pypi-uri "subprocess32" version))
8594 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8596 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8597 (build-system python-build-system)
8599 `(#:python ,python-2
8600 ;; The test suite fails with Python > 2.7.13:
8601 ;; import test.support
8602 ;; ImportError: No module named support
8605 (modify-phases %standard-phases
8606 (add-after 'unpack 'patch-/bin/sh
8608 (substitute* '("subprocess32.py"
8609 "test_subprocess32.py")
8610 (("/bin/sh") (which "sh")))
8612 (home-page "https://github.com/google/python-subprocess32")
8613 (synopsis "Backport of the subprocess module from Python 3.2")
8615 "This is a backport of the @code{subprocess} standard library module
8616 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8617 new features. On POSIX systems it is guaranteed to be reliable when used
8618 in threaded applications. It includes timeout support from Python 3.3 but
8619 otherwise matches 3.2’s API.")
8620 (license license:psfl)))
8622 (define-public python2-futures
8624 (name "python2-futures")
8629 (uri (pypi-uri "futures" version))
8632 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8633 (build-system python-build-system)
8635 `(#:python ,python-2
8637 (modify-phases %standard-phases
8640 (invoke "python" "test_futures.py")
8642 (home-page "https://github.com/agronholm/pythonfutures")
8644 "Backport of the concurrent.futures package from Python 3.2")
8646 "The concurrent.futures module provides a high-level interface for
8647 asynchronously executing callables. This package backports the
8648 concurrent.futures package from Python 3.2")
8649 (license license:bsd-3)))
8651 (define-public python-promise
8653 (name "python-promise")
8658 (uri (pypi-uri "promise" version))
8661 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8662 (build-system python-build-system)
8663 ;; Tests wants python-futures, which is a python2 only program, and
8664 ;; can't be found by python-promise at test time.
8665 (arguments `(#:tests? #f))
8666 (home-page "https://github.com/syrusakbary/promise")
8667 (synopsis "Promises/A+ implementation for Python")
8669 "Promises/A+ implementation for Python")
8670 (properties `((python2-variant . ,(delay python2-promise))))
8671 (license license:expat)))
8673 (define-public python2-promise
8674 (let ((promise (package-with-python2
8675 (strip-python2-variant python-promise))))
8676 (package (inherit promise)
8677 (arguments (substitute-keyword-arguments (package-arguments promise)
8680 `(("python2-futures" ,python2-futures)
8681 ("python2-pytest" ,python2-pytest)
8682 ,@(package-native-inputs promise))))))
8684 (define-public python-progressbar33
8686 (name "python-progressbar33")
8691 (uri (pypi-uri "progressbar33" version))
8694 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8695 (build-system python-build-system)
8696 (home-page "http://github.com/germangh/python-progressbar")
8697 (synopsis "Text progress bar library for Python")
8699 "This package provides a text progress bar library for Python. This
8700 version only differs from the original @code{progressbar} package in that it
8701 uses relative package imports instead of absolute imports, which is necessary
8702 for the module to work under Python 3.3.")
8703 ;; Either or both of these licenses may be selected.
8704 (license (list license:lgpl2.1+ license:bsd-3))))
8706 (define-public python-colorama
8708 (name "python-colorama")
8713 (uri (pypi-uri "colorama" version))
8716 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8717 (build-system python-build-system)
8718 (synopsis "Colored terminal text rendering for Python")
8719 (description "Colorama is a Python library for rendering colored terminal
8721 (home-page "https://pypi.python.org/pypi/colorama")
8722 (license license:bsd-3)))
8724 (define-public python2-colorama
8725 (package-with-python2 python-colorama))
8727 (define-public python-rsa
8734 (uri (pypi-uri "rsa" version))
8737 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8738 (build-system python-build-system)
8740 `(("python-pyasn1" ,python-pyasn1)))
8741 (synopsis "Pure-Python RSA implementation")
8742 (description "Python-RSA is a pure-Python RSA implementation. It supports
8743 encryption and decryption, signing and verifying signatures, and key
8744 generation according to PKCS#1 version 1.5. It can be used as a Python
8745 library as well as on the command line.")
8746 (home-page "https://stuvel.eu/rsa")
8747 (license license:asl2.0)))
8749 (define-public python2-rsa
8750 (package-with-python2 python-rsa))
8752 (define-public python-pluggy
8754 (name "python-pluggy")
8759 (uri (pypi-uri "pluggy" version))
8762 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8763 (build-system python-build-system)
8765 `(("python-setuptools-scm" ,python-setuptools-scm)))
8766 (synopsis "Plugin and hook calling mechanism for Python")
8767 (description "Pluggy is an extraction of the plugin manager as used by
8768 Pytest but stripped of Pytest specific details.")
8769 (home-page "https://pypi.python.org/pypi/pluggy")
8770 (license license:expat)))
8772 (define-public python2-pluggy
8773 (package-with-python2 python-pluggy))
8775 (define-public python-tox
8782 (uri (pypi-uri "tox" version))
8785 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8786 (build-system python-build-system)
8788 ;; FIXME: Tests require pytest-timeout, which itself requires
8789 ;; pytest>=2.8.0 for installation.
8792 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8793 ("python-py" ,python-py)
8794 ("python-virtualenv" ,python-virtualenv)))
8796 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8797 ("python-pytest" ,python-pytest) ; >= 2.3.5
8798 ("python-setuptools-scm" ,python-setuptools-scm)))
8799 (home-page "http://tox.testrun.org/")
8800 (synopsis "Virtualenv-based automation of test activities")
8801 (description "Tox is a generic virtualenv management and test command line
8802 tool. It can be used to check that a package installs correctly with
8803 different Python versions and interpreters, or run tests in each type of
8804 supported environment, or act as a frontend to continuous integration
8806 (license license:expat)))
8808 (define-public python2-tox
8809 (package-with-python2 python-tox))
8811 (define-public python-jmespath
8813 (name "python-jmespath")
8818 (uri (pypi-uri "jmespath" version))
8821 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8822 (build-system python-build-system)
8824 `(("python-nose" ,python-nose)))
8825 (synopsis "JSON Matching Expressions")
8826 (description "JMESPath (pronounced “james path”) is a Python library that
8827 allows one to declaratively specify how to extract elements from a JSON
8829 (home-page "https://github.com/jmespath/jmespath.py")
8830 (license license:expat)))
8832 (define-public python2-jmespath
8833 (package-with-python2 python-jmespath))
8835 (define-public python-botocore
8837 (name "python-botocore")
8838 (version "1.12.149")
8842 (uri (pypi-uri "botocore" version))
8845 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8846 (build-system python-build-system)
8848 ;; FIXME: Many tests are failing.
8851 `(("python-dateutil" ,python-dateutil)
8852 ("python-docutils" ,python-docutils)
8853 ("python-jmespath" ,python-jmespath)))
8855 `(("python-mock" ,python-mock)
8856 ("python-nose" ,python-nose)
8858 ("python-tox" ,python-tox)
8859 ("python-urllib3" ,python-urllib3)
8860 ("python-wheel" ,python-wheel)))
8861 (home-page "https://github.com/boto/botocore")
8862 (synopsis "Low-level interface to AWS")
8863 (description "Botocore is a Python library that provides a low-level
8864 interface to the Amazon Web Services (AWS) API.")
8865 (license license:asl2.0)))
8867 (define-public python2-botocore
8868 (package-with-python2 python-botocore))
8870 (define-public python-xdo
8877 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8878 "python-xdo_" version ".orig.tar.gz"))
8881 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8882 (build-system python-build-system)
8885 (modify-phases %standard-phases
8886 (add-before 'install 'patch-libxdo-path
8887 ;; Hardcode the path of dynamically loaded libxdo library.
8888 (lambda* (#:key inputs #:allow-other-keys)
8889 (let ((libxdo (string-append
8890 (assoc-ref inputs "xdotool")
8892 (substitute* "xdo/_xdo.py"
8893 (("find_library\\(\"xdo\"\\)")
8894 (simple-format #f "\"~a\"" libxdo)))
8896 #:tests? #f)) ; no tests provided
8898 `(("python-six" ,python-six)))
8900 `(("xdotool" ,xdotool)
8901 ("libX11" ,libx11)))
8902 (home-page "https://tracker.debian.org/pkg/python-xdo")
8903 (synopsis "Python library for simulating X11 keyboard/mouse input")
8904 (description "Provides bindings to libxdo for manipulating X11 via simulated
8905 input. (Note that this is mostly a legacy library; you may wish to look at
8906 python-xdo for newer bindings.)")
8907 (license license:bsd-3)))
8909 (define-public python2-xdo
8910 (package-with-python2 python-xdo))
8912 (define-public python-mako
8914 (name "python-mako")
8919 (uri (pypi-uri "Mako" version))
8922 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8923 (build-system python-build-system)
8925 `(#:phases (modify-phases %standard-phases
8928 (invoke "pytest" "-vv"))))))
8930 `(("python-markupsafe" ,python-markupsafe)))
8932 `(("python-mock" ,python-mock)
8933 ("python-pytest" ,python-pytest)))
8934 (home-page "https://www.makotemplates.org/")
8935 (synopsis "Templating language for Python")
8936 (description "Mako is a templating language for Python that compiles
8937 templates into Python modules.")
8938 (license license:expat)))
8940 (define-public python2-mako
8941 (package-with-python2 python-mako))
8943 (define-public python-waitress
8945 (name "python-waitress")
8950 (uri (pypi-uri "waitress" version))
8951 (patches (search-patches "python-waitress-fix-tests.patch"))
8954 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8955 (build-system python-build-system)
8956 (home-page "https://github.com/Pylons/waitress")
8957 (synopsis "Waitress WSGI server")
8958 (description "Waitress is meant to be a production-quality pure-Python WSGI
8959 server with very acceptable performance.")
8960 (license license:zpl2.1)))
8962 (define-public python2-waitress
8963 (package-with-python2 python-waitress))
8965 (define-public python-whichcraft
8967 (name "python-whichcraft")
8972 (uri (pypi-uri "whichcraft" version))
8975 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8976 (build-system python-build-system)
8978 `(("python-pytest" ,python-pytest)))
8979 (home-page "https://github.com/pydanny/whichcraft")
8980 (synopsis "Cross-platform cross-python shutil.which functionality")
8982 "This package provides a shim of the shutil.which function that's
8983 designed to work across multiple versions of Python.")
8984 (license license:bsd-3)))
8986 (define-public python-cookiecutter
8988 (name "python-cookiecutter")
8993 (uri (pypi-uri "cookiecutter" version))
8996 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8997 (build-system python-build-system)
8999 `(("python-freezegun" ,python-freezegun)
9000 ("python-pytest" ,python-pytest)
9001 ("python-pytest-catchlog" ,python-pytest-catchlog)
9002 ("python-pytest-cov" ,python-pytest-cov)
9003 ("python-pytest-mock" ,python-pytest-mock)))
9005 `(("python-binaryornot" ,python-binaryornot)
9006 ("python-click" ,python-click)
9007 ("python-future" ,python-future)
9008 ("python-jinja2" ,python-jinja2)
9009 ("python-jinja2-time" ,python-jinja2-time)
9010 ("python-poyo" ,python-poyo)
9011 ("python-requests" ,python-requests)
9012 ("python-whichcraft" ,python-whichcraft)))
9013 (home-page "https://github.com/audreyr/cookiecutter")
9015 "Command-line utility that creates projects from project templates")
9017 "This package provides a command-line utility that creates projects from
9018 project templates, e.g. creating a Python package project from a Python package
9020 (license license:bsd-3)))
9022 (define-public python-pyquery
9024 (name "python-pyquery")
9029 (uri (pypi-uri "pyquery" version))
9032 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9033 (build-system python-build-system)
9035 `(("python-webob" ,python-webob)
9036 ("python-webtest" ,python-webtest)))
9038 `(("python-lxml" ,python-lxml)
9039 ("python-cssselect" ,python-cssselect)))
9040 (home-page "https://github.com/gawel/pyquery")
9041 (synopsis "Make jQuery-like queries on xml documents")
9042 (description "pyquery allows you to make jQuery queries on xml documents.
9043 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9044 fast xml and html manipulation.")
9045 (license license:bsd-3)))
9047 (define-public python-anyjson
9049 (name "python-anyjson")
9054 (uri (pypi-uri "anyjson" version))
9057 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9058 (build-system python-build-system)
9060 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9061 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9062 ;; whatever) so this transformation needs to be done before the tests
9063 ;; can be run. Maybe we could add a build step to transform beforehand
9064 ;; but it could be annoying/difficult.
9065 ;; We can enable tests for the Python 2 version, though, and do below.
9067 (home-page "https://bitbucket.org/runeh/anyjson/")
9069 "Wraps best available JSON implementation in a common interface")
9071 "Anyjson loads whichever is the fastest JSON module installed
9072 and provides a uniform API regardless of which JSON implementation is used.")
9073 (license license:bsd-3)
9074 (properties `((python2-variant . ,(delay python2-anyjson))))))
9076 (define-public python2-anyjson
9077 (let ((anyjson (package-with-python2
9078 (strip-python2-variant python-anyjson))))
9081 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9083 ,@(package-arguments anyjson)))
9084 (native-inputs `(("python2-nose" ,python2-nose))))))
9086 (define-public python-amqp
9088 (name "python-amqp")
9093 (uri (pypi-uri "amqp" version))
9096 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9097 (build-system python-build-system)
9099 `(("python-case" ,python-case)
9100 ("python-pytest-sugar" ,python-pytest-sugar)
9101 ("python-mock" ,python-mock)))
9103 `(("python-vine" ,python-vine)))
9104 (home-page "https://github.com/celery/py-amqp")
9106 "Low-level AMQP client for Python (fork of amqplib)")
9108 "This is a fork of amqplib which was originally written by Barry Pederson.
9109 It is maintained by the Celery project, and used by kombu as a pure python
9110 alternative when librabbitmq is not available.")
9111 (license license:lgpl2.1+)
9112 (properties `((python2-variant . ,(delay python2-amqp))))))
9114 (define-public python2-amqp
9115 (let ((amqp (package-with-python2
9116 (strip-python2-variant python-amqp))))
9119 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9120 ;; unmaintained. Weirdly, does not do this on the python 3
9123 ,@(package-arguments amqp))))))
9125 (define-public python-txamqp
9127 (name "python-txamqp")
9132 (uri (pypi-uri "txAMQP" version))
9135 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9136 (build-system python-build-system)
9138 `(("python-six" ,python-six)
9139 ("python-twisted" ,python-twisted)))
9140 (home-page "https://github.com/txamqp/txamqp")
9141 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9143 "This package provides a Python library for communicating with AMQP peers
9144 and brokers using the asynchronous networking framework Twisted. It contains
9145 all the necessary code to connect, send and receive messages to/from an
9146 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9147 also includes support for using Thrift RPC over AMQP in Twisted
9149 (license license:asl2.0)))
9151 (define-public python2-txamqp
9152 (package-with-python2 python-txamqp))
9154 (define-public python-kombu
9156 (name "python-kombu")
9161 (uri (pypi-uri "kombu" version))
9164 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9165 (build-system python-build-system)
9167 `(("python-mock" ,python-mock)
9168 ("python-case" ,python-case)
9169 ("python-pyro4" ,python-pyro4)
9170 ("python-pytest-sugar" ,python-pytest-sugar)
9171 ("python-pytz" ,python-pytz)))
9173 `(("python-anyjson" ,python-anyjson)
9174 ("python-amqp" ,python-amqp)
9175 ("python-redis" ,python-redis)))
9176 (home-page "https://kombu.readthedocs.io")
9177 (synopsis "Message passing library for Python")
9178 (description "The aim of Kombu is to make messaging in Python as easy as
9179 possible by providing an idiomatic high-level interface for the AMQ protocol,
9180 and also provide proven and tested solutions to common messaging problems.
9181 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9182 message orientation, queuing, routing, reliability and security, for which the
9183 RabbitMQ messaging server is the most popular implementation.")
9184 (license license:bsd-3)
9185 (properties `((python2-variant . ,(delay python2-kombu))))))
9187 (define-public python2-kombu
9188 (let ((kombu (package-with-python2
9189 (strip-python2-variant python-kombu))))
9192 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9193 ;; It works fine on the python3 variant.
9195 ,@(package-arguments kombu)))
9196 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9197 ,@(package-native-inputs kombu))))))
9199 (define-public python-billiard
9201 (name "python-billiard")
9206 (uri (pypi-uri "billiard" version))
9209 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9210 (build-system python-build-system)
9212 `(("python-case" ,python-case)
9213 ("python-pytest" ,python-pytest)))
9214 (home-page "https://github.com/celery/billiard")
9216 "Python multiprocessing fork with improvements and bugfixes")
9218 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9219 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9220 pyprocessing package. This standalone variant is intended to be compatible with
9221 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9222 (license license:bsd-3)
9223 (properties `((python2-variant . ,(delay python2-billiard))))))
9225 (define-public python2-billiard
9226 (let ((billiard (package-with-python2
9227 (strip-python2-variant python-billiard))))
9230 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9231 ("python2-mock" ,python2-mock)
9232 ,@(package-native-inputs billiard))))))
9234 (define-public python-celery
9236 (name "python-celery")
9241 (uri (pypi-uri "celery" version))
9244 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9245 (build-system python-build-system)
9247 '(;; TODO The tests fail with Python 3.7
9248 ;; https://github.com/celery/celery/issues/4849
9251 (modify-phases %standard-phases
9252 (add-after 'unpack 'patch-requirements
9254 (substitute* "requirements/test.txt"
9255 (("pytest>=3\\.0,<3\\.3")
9259 `(("python-case" ,python-case)
9260 ("python-pytest" ,python-pytest)))
9262 `(("python-pytz" ,python-pytz)
9263 ("python-billiard" ,python-billiard)
9264 ("python-kombu" ,python-kombu)))
9265 (home-page "https://celeryproject.org")
9266 (synopsis "Distributed Task Queue")
9267 (description "Celery is an asynchronous task queue/job queue based on
9268 distributed message passing. It is focused on real-time operation, but
9269 supports scheduling as well. The execution units, called tasks, are executed
9270 concurrently on a single or more worker servers using multiprocessing,
9271 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9272 synchronously (wait until ready).")
9273 (license license:bsd-3)
9274 (properties `((python2-variant . ,(delay python2-celery))))))
9276 (define-public python2-celery
9277 (let ((celery (package-with-python2
9278 (strip-python2-variant python-celery))))
9281 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9282 ("python2-mock" ,python2-mock)
9283 ,@(package-native-inputs celery))))))
9285 (define-public python-translitcodec
9287 (name "python-translitcodec")
9292 (uri (pypi-uri "translitcodec" version))
9295 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9296 (build-system python-build-system)
9298 `(#:tests? #f)) ; no tests provided
9300 "https://github.com/claudep/translitcodec")
9302 "Unicode to 8-bit charset transliteration codec")
9304 "This package contains codecs for transliterating ISO 10646 texts into
9305 best-effort representations using smaller coded character sets (ASCII,
9307 (license license:expat)))
9309 (define-public python2-translitcodec
9310 (package-with-python2 python-translitcodec))
9312 (define-public python-editor
9314 (name "python-editor")
9319 (uri (pypi-uri "python-editor" version))
9322 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9323 (build-system python-build-system)
9325 "https://github.com/fmoo/python-editor")
9327 "Programmatically open an editor, capture the result")
9329 "python-editor is a library that provides the editor module for
9330 programmatically interfacing with your system's $EDITOR.")
9331 (license license:asl2.0)))
9333 (define-public python2-editor
9334 (package-with-python2 python-editor))
9336 (define-public python-vobject
9338 (name "python-vobject")
9342 (uri (pypi-uri "vobject" version))
9345 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9346 (build-system python-build-system)
9348 '(;; The test suite relies on some non-portable Windows interfaces.
9351 `(("python-dateutil" ,python-dateutil)
9352 ("python-pyicu" ,python-pyicu)))
9353 (synopsis "Parse and generate vCard and vCalendar files")
9354 (description "Vobject is intended to be a full featured Python package for
9355 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9356 are supported and well tested. vCard 3.0 files are supported, and all data
9357 should be imported, but only a few components are understood in a sophisticated
9359 (home-page "http://eventable.github.io/vobject/")
9360 (license license:asl2.0)))
9362 (define-public python2-vobject
9363 (package-with-python2 python-vobject))
9365 (define-public python-munkres
9367 (name "python-munkres")
9371 (uri (pypi-uri "munkres" version))
9374 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9375 (build-system python-build-system)
9377 '(#:tests? #f)) ; no test suite
9378 (home-page "http://software.clapper.org/munkres/")
9379 (synopsis "Implementation of the Munkres algorithm")
9380 (description "The Munkres module provides an implementation of the Munkres
9381 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9382 useful for solving the Assignment Problem.")
9383 (license license:bsd-3)))
9385 (define-public python2-munkres
9386 (package-with-python2 python-munkres))
9388 (define-public python-whoosh
9390 (name "python-whoosh")
9395 (uri (pypi-uri "Whoosh" version))
9398 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9399 (build-system python-build-system)
9400 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9402 `(("python-pytest" ,python-pytest)))
9403 (home-page "https://bitbucket.org/mchaput/whoosh")
9404 (synopsis "Full text indexing, search, and spell checking library")
9406 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9408 (license license:bsd-2)))
9410 (define-public python2-whoosh
9411 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9412 (package (inherit whoosh)
9414 `(("python2-backport-ssl-match-hostname"
9415 ,python2-backport-ssl-match-hostname)
9416 ,@(package-propagated-inputs whoosh))))))
9418 (define-public python-pathlib
9420 (name "python-pathlib")
9424 (uri (pypi-uri "pathlib" version))
9427 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9428 (build-system python-build-system)
9429 ;; The tests depend on the internal "test" module, which does not provide
9430 ;; a stable interface.
9431 (arguments `(#:tests? #f))
9432 (home-page "https://pathlib.readthedocs.org/")
9433 (synopsis "Object-oriented file system paths")
9434 (description "Pathlib offers a set of classes to handle file system paths.
9435 It offers the following advantages over using string objects:
9438 @item No more cumbersome use of os and os.path functions. Everything can
9439 be done easily through operators, attribute accesses, and method calls.
9440 @item Embodies the semantics of different path types. For example,
9441 comparing Windows paths ignores casing.
9442 @item Well-defined semantics, eliminating any inconsistencies or
9443 ambiguities (forward vs. backward slashes, etc.).
9446 Note: In Python 3.4, pathlib is now part of the standard library. For other
9447 Python versions please consider python-pathlib2 instead, which tracks the
9448 standard library module. This module (python-pathlib) isn't maintained
9450 (license license:expat)))
9452 (define-public python2-pathlib
9453 (package-with-python2 python-pathlib))
9455 (define-public python2-pathlib2
9457 (name "python2-pathlib2")
9461 (uri (pypi-uri "pathlib2" version))
9464 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9465 (build-system python-build-system)
9466 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9467 ;; version is 3.4 which already includes this package as part of the
9468 ;; standard library.
9470 `(#:python ,python-2))
9472 `(("python2-scandir" ,python2-scandir)
9473 ("python2-six" ,python2-six)))
9474 (home-page "https://pypi.python.org/pypi/pathlib2/")
9475 (synopsis "Object-oriented file system paths - backport of standard
9477 (description "The goal of pathlib2 is to provide a backport of standard
9478 pathlib module which tracks the standard library module, so all the newest
9479 features of the standard pathlib can be used also on older Python versions.
9481 Pathlib offers a set of classes to handle file system paths. It offers the
9482 following advantages over using string objects:
9485 @item No more cumbersome use of os and os.path functions. Everything can
9486 be done easily through operators, attribute accesses, and method calls.
9487 @item Embodies the semantics of different path types. For example,
9488 comparing Windows paths ignores casing.
9489 @item Well-defined semantics, eliminating any inconsistencies or
9490 ambiguities (forward vs. backward slashes, etc.).
9492 (license license:expat)))
9494 (define-public python2-pathlib2-bootstrap
9497 (inherit python2-pathlib2)
9498 (name "python2-pathlib2-bootstrap")
9500 `(("python2-scandir" ,python2-scandir)
9501 ("python2-six" ,python2-six-bootstrap))))))
9503 (define-public python-jellyfish
9505 (name "python-jellyfish")
9509 (uri (pypi-uri "jellyfish" version))
9512 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9513 (build-system python-build-system)
9515 `(("python-pytest" ,python-pytest)))
9516 (home-page "https://github.com/jamesturk/jellyfish")
9517 (synopsis "Approximate and phonetic matching of strings")
9518 (description "Jellyfish uses a variety of string comparison and phonetic
9519 encoding algorithms to do fuzzy string matching.")
9520 (license license:bsd-2)
9521 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9523 (define-public python2-jellyfish
9524 (let ((jellyfish (package-with-python2
9525 (strip-python2-variant python-jellyfish))))
9526 (package (inherit jellyfish)
9527 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9528 ,@(package-native-inputs jellyfish))))))
9530 (define-public python2-unicodecsv
9532 (name "python2-unicodecsv")
9536 ;; The test suite is not included in the PyPi release.
9537 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9539 (url "https://github.com/jdunck/python-unicodecsv")
9541 (file-name (git-file-name name version))
9544 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9545 (build-system python-build-system)
9547 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9548 #:python ,python-2))
9550 `(("python2-unittest2" ,python2-unittest2)))
9551 (home-page "https://github.com/jdunck/python-unicodecsv")
9552 (synopsis "Unicode CSV module for Python 2")
9553 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9554 module, adding support for Unicode strings.")
9555 (license license:bsd-2)))
9557 (define-public python-rarfile
9559 (name "python-rarfile")
9563 (uri (pypi-uri "rarfile" version))
9566 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9567 (build-system python-build-system)
9570 (modify-phases %standard-phases
9572 ;; Many tests fail, but the installation proceeds.
9573 (lambda _ (invoke "make" "-C" "test" "test"))))))
9575 `(("which" ,which))) ; required for tests
9577 `(("libarchive" ,libarchive)))
9578 (home-page "https://github.com/markokr/rarfile")
9579 (synopsis "RAR archive reader for Python")
9580 (description "This is Python module for RAR archive reading. The interface
9581 is made as zipfile like as possible.")
9582 (license license:isc)))
9584 (define-public python2-rarfile
9585 (package-with-python2 python-rarfile))
9587 (define-public python-magic
9589 (name "python-magic")
9594 (uri (pypi-uri "python-magic" version))
9597 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9598 (file-name (string-append name "-" version "-checkout"))))
9599 (build-system python-build-system)
9601 ;; The tests are unreliable, so don't run them. The tests fail
9602 ;; under Python3 because they were written for Python2 and
9603 ;; contain import statements that do not work in Python3. One of
9604 ;; the tests fails under Python2 because its assertions are
9605 ;; overly stringent; it relies on comparing output strings which
9606 ;; are brittle and can change depending on the version of
9607 ;; libmagic being used and the system on which the test is
9608 ;; running. In my case, under GuixSD 0.10.0, only one test
9609 ;; failed, and it seems to have failed only because the version
9610 ;; of libmagic that is packaged in Guix outputs a slightly
9611 ;; different (but not wrong) string than the one that the test
9614 #:phases (modify-phases %standard-phases
9615 ;; Replace a specific method call with a hard-coded
9616 ;; path to the necessary libmagic.so file in the
9617 ;; store. If we don't do this, then the method call
9618 ;; will fail to find the libmagic.so file, which in
9619 ;; turn will cause any application using
9620 ;; python-magic to fail.
9621 (add-before 'build 'hard-code-path-to-libmagic
9622 (lambda* (#:key inputs #:allow-other-keys)
9623 (let ((file (assoc-ref inputs "file")))
9624 (substitute* "magic.py"
9625 (("ctypes.util.find_library\\('magic'\\)")
9626 (string-append "'" file "/lib/libmagic.so'")))
9628 (add-before 'install 'disable-egg-compression
9630 (let ((port (open-file "setup.cfg" "a")))
9631 (display "\n[easy_install]\nzip_ok = 0\n"
9636 ;; python-magic needs to be able to find libmagic.so.
9639 "https://github.com/ahupp/python-magic")
9641 "File type identification using libmagic")
9643 "This module uses ctypes to access the libmagic file type
9644 identification library. It makes use of the local magic database and
9645 supports both textual and MIME-type output. Note that this module and
9646 the python-file module both provide a \"magic.py\" file; these two
9647 modules, which are different and were developed separately, both serve
9648 the same purpose: to provide Python bindings for libmagic.")
9649 (license license:expat)))
9651 (define-public python2-magic
9652 (package-with-python2 python-magic))
9654 (define-public python2-s3cmd
9656 (name "python2-s3cmd")
9661 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9662 "s3cmd-" version ".tar.gz"))
9665 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9666 (build-system python-build-system)
9668 ;; s3cmd is written for python2 only and contains no tests.
9669 `(#:python ,python-2
9672 `(("python2-dateutil" ,python2-dateutil)
9673 ;; The python-file package also provides a magic.py module.
9674 ;; This is an unfortunate state of affairs; however, s3cmd
9675 ;; fails to install if it cannot find specifically the
9676 ;; python-magic package. Thus we include it, instead of using
9677 ;; python-file. Ironically, s3cmd sometimes works better
9678 ;; without libmagic bindings at all:
9679 ;; https://github.com/s3tools/s3cmd/issues/198
9680 ("python2-magic" ,python2-magic)))
9681 (home-page "http://s3tools.org/s3cmd")
9682 (synopsis "Command line tool for S3-compatible storage services")
9684 "S3cmd is a command line tool for uploading, retrieving and managing data
9685 in storage services that are compatible with the Amazon Simple Storage
9686 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9687 GnuPG encryption, and more. It also supports management of Amazon's
9688 CloudFront content delivery network.")
9689 (license license:gpl2+)))
9691 (define-public python-pkgconfig
9693 (name "python-pkgconfig")
9698 (uri (pypi-uri "pkgconfig" version))
9701 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9702 (build-system python-build-system)
9704 `(("python-nose" ,python-nose)))
9706 `(("pkg-config" ,pkg-config)))
9709 (modify-phases %standard-phases
9710 (add-before 'build 'patch
9711 ;; Hard-code the path to pkg-config.
9713 (substitute* "pkgconfig/pkgconfig.py"
9714 (("cmd = 'pkg-config")
9715 (string-append "cmd = '" (which "pkg-config"))))
9719 (invoke "nosetests" "test.py"))))))
9720 (home-page "https://github.com/matze/pkgconfig")
9721 (synopsis "Python interface for pkg-config")
9722 (description "This module provides a Python interface to pkg-config. It
9723 can be used to find all pkg-config packages, check if a package exists,
9724 check if a package meets certain version requirements, query CFLAGS and
9725 LDFLAGS and parse the output to build extensions with setup.py.")
9726 (license license:expat)))
9728 (define-public python2-pkgconfig
9729 (package-with-python2 python-pkgconfig))
9731 (define-public python-bz2file
9733 (name "python-bz2file")
9738 (uri (pypi-uri "bz2file" version))
9741 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9742 (build-system python-build-system)
9744 `(#:tests? #f)) ; Tests use deprecated python modules.
9745 (home-page "https://github.com/nvawda/bz2file")
9746 (synopsis "Read and write bzip2-compressed files")
9748 "Bz2file is a Python library for reading and writing bzip2-compressed
9749 files. It contains a drop-in replacement for the I/O interface in the
9750 standard library's @code{bz2} module, including features from the latest
9751 development version of CPython that are not available in older releases.")
9752 (license license:asl2.0)))
9754 (define-public python2-bz2file
9755 (package-with-python2 python-bz2file))
9757 (define-public python-future
9759 (name "python-future")
9764 (uri (pypi-uri "future" version))
9767 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9768 (build-system python-build-system)
9769 ;; Many tests connect to the network or are otherwise flawed.
9770 ;; https://github.com/PythonCharmers/python-future/issues/210
9773 (home-page "http://python-future.org")
9774 (synopsis "Single-source support for Python 3 and 2")
9776 "@code{python-future} is the missing compatibility layer between Python 2 and
9777 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9778 to support both Python 2 and Python 3 with minimal overhead.")
9779 (license license:expat)))
9781 (define-public python2-future
9782 (package-with-python2 python-future))
9784 (define-public python-cysignals
9786 (name "python-cysignals")
9791 (uri (pypi-uri "cysignals" version))
9794 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9795 (build-system python-build-system)
9797 `(("python-cython" ,python-cython)
9798 ("python-sphinx" ,python-sphinx)))
9800 `(("pari-gp" ,pari-gp)))
9802 `(#:modules ((guix build python-build-system)
9803 ((guix build gnu-build-system) #:prefix gnu:)
9805 ;; FIXME: Tests are executed after installation and currently fail
9806 ;; when not installing into standard locations; the author is working
9810 (modify-phases %standard-phases
9813 (assoc-ref gnu:%standard-phases 'configure)))))
9815 "https://github.com/sagemath/cysignals")
9817 "Handling of interrupts and signals for Cython")
9819 "The cysignals package provides mechanisms to handle interrupts (and
9820 other signals and errors) in Cython code, using two related approaches,
9821 for mixed Cython/Python code or external C libraries and pure Cython code,
9823 (license license:lgpl3+)))
9825 (define-public python2-cysignals
9826 (package-with-python2 python-cysignals))
9828 (define-public python2-shedskin
9830 (name "python2-shedskin")
9835 (uri (string-append "https://github.com/shedskin/shedskin/"
9836 "releases/download/v" version
9837 "/shedskin-" version ".tgz"))
9840 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9841 (build-system python-build-system)
9843 `(#:python ,python-2
9844 #:phases (modify-phases %standard-phases
9845 (add-after 'unpack 'fix-resulting-include-libs
9846 (lambda* (#:key inputs #:allow-other-keys)
9847 (let ((libgc (assoc-ref inputs "libgc"))
9848 (pcre (assoc-ref inputs "pcre")))
9849 (substitute* "shedskin/makefile.py"
9850 (("variable == 'CCFLAGS':[ ]*")
9851 (string-append "variable == 'CCFLAGS':\n"
9852 " line += ' -I " pcre "/include"
9853 " -I " libgc "/include'"))
9854 (("variable == 'LFLAGS':[ ]*")
9855 (string-append "variable == 'LFLAGS':\n"
9856 " line += ' -L" pcre "/lib"
9857 " -L " libgc "/lib'")))
9859 (inputs `(("pcre" ,pcre)
9861 (home-page "https://shedskin.github.io/")
9862 (synopsis "Experimental Python-2 to C++ Compiler")
9863 (description (string-append "This is an experimental compiler for a subset of
9864 Python. It generates C++ code and a Makefile."))
9865 (license (list license:gpl3 license:bsd-3 license:expat))))
9867 (define-public python2-rope
9869 (name "python2-rope")
9874 (uri (pypi-uri "rope" version))
9877 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9879 ;; Rope has only partial python3 support, see `python-rope'
9880 `(#:python ,python-2))
9881 (build-system python-build-system)
9883 `(("python2-unittest2" ,python2-unittest2)))
9884 (home-page "https://github.com/python-rope/rope")
9885 (synopsis "Refactoring library for Python")
9886 (description "Rope is a refactoring library for Python. It facilitates
9887 the renaming, moving and extracting of attributes, functions, modules, fields
9888 and parameters in Python 2 source code. These refactorings can also be applied
9889 to occurrences in strings and comments.")
9890 (license license:gpl2)))
9892 (define-public python-rope
9894 (inherit python2-rope)
9895 (name "python-rope")
9896 (arguments `(#:python ,python-wrapper
9897 ;; XXX: Only partial python3 support, results in some failing
9898 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9900 (properties `((python2-variant . ,(delay python2-rope))))))
9902 (define-public python-py3status
9904 (name "python-py3status")
9909 (uri (pypi-uri "py3status" version))
9911 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9912 (build-system python-build-system)
9917 (modify-phases %standard-phases
9918 ;; 'file' is used for detection of configuration file encoding
9919 ;; let's make link the dependency to particular input
9920 (add-before 'build 'patch-file-path
9921 (lambda* (#:key inputs #:allow-other-keys)
9922 (let ((file-path (assoc-ref inputs "file")))
9923 (substitute* "py3status/parse_config.py"
9924 (("\\[\"file\", \"-b\"")
9925 (string-append "['" file-path "/bin/file', '-b'")))
9927 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9928 (home-page "https://github.com/ultrabug/py3status")
9929 (synopsis "Extensible i3status wrapper written in Python")
9930 (description "py3status is an i3status wrapper which extends i3status
9931 functionality in a modular way, allowing you to extend your panel with your
9932 own code, responding to click events and updating clock every second.")
9933 (license license:bsd-3)))
9935 (define-public python-tblib
9937 (name "python-tblib")
9941 (uri (pypi-uri "tblib" version))
9943 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9944 (build-system python-build-system)
9947 (modify-phases %standard-phases
9948 (add-before 'check 'adjust-tests
9950 (when (which "python3")
9951 ;; Adjust the example output to match that of Python 3.7:
9952 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9953 (substitute* "README.rst"
9954 (("Exception\\('fail',") "Exception('fail'"))
9958 ;; Upstream runs tests after installation and the package itself
9959 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9961 (setenv "PYTHONPATH"
9962 (string-append (getcwd) "/build/lib:"
9963 (getenv "PYTHONPATH")))
9964 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9966 `(("python-pytest" ,python-pytest)
9967 ("python-six" ,python-six)))
9968 (home-page "https://github.com/ionelmc/python-tblib")
9969 (synopsis "Traceback serialization library")
9971 "Traceback serialization allows you to:
9974 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9975 different processes. This allows better error handling when running code over
9976 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9978 @item Parse traceback strings and raise with the parsed tracebacks.
9980 (license license:bsd-3)))
9982 (define-public python2-tblib
9983 (package-with-python2 python-tblib))
9985 (define-public python-greenlet
9987 (name "python-greenlet")
9991 (uri (pypi-uri "greenlet" version))
9994 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9995 (build-system python-build-system)
9996 (home-page "https://greenlet.readthedocs.io/")
9997 (synopsis "Lightweight in-process concurrent programming")
9999 "Greenlet package is a spin-off of Stackless, a version of CPython
10000 that supports micro-threads called \"tasklets\". Tasklets run
10001 pseudo-concurrently (typically in a single or a few OS-level threads) and
10002 are synchronized with data exchanges on \"channels\".")
10003 (license (list license:psfl license:expat))))
10005 (define-public python2-greenlet
10006 (package-with-python2 python-greenlet))
10008 (define-public python-objgraph
10010 (name "python-objgraph")
10015 (uri (pypi-uri "objgraph" version))
10018 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10019 (build-system python-build-system)
10021 `(("python-graphviz" ,python-graphviz)))
10023 `(("python-mock" ,python-mock)
10024 ("graphviz" ,graphviz)))
10025 (home-page "https://mg.pov.lt/objgraph/")
10026 (synopsis "Draw Python object reference graphs with graphviz")
10028 "This package provides tools to draw Python object reference graphs with
10030 (license license:expat)))
10032 (define-public python-gevent
10034 (name "python-gevent")
10038 (uri (pypi-uri "gevent" version))
10041 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10042 (modules '((guix build utils)))
10045 ;; unbunding libev and c-ares
10046 (delete-file-recursively "deps")
10048 (build-system python-build-system)
10050 `(#:modules ((ice-9 ftw)
10054 (guix build python-build-system))
10055 #:phases (modify-phases %standard-phases
10056 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10058 (substitute* "src/gevent/subprocess.py"
10059 (("/bin/sh") (which "sh")))
10060 (for-each (lambda (file)
10062 (("/bin/sh") (which "sh"))
10063 (("/bin/true") (which "true"))))
10064 (find-files "src/greentest" "\\.py$"))
10066 (add-before 'build 'do-not-use-bundled-sources
10067 (lambda* (#:key inputs #:allow-other-keys)
10068 (setenv "CONFIG_SHELL" (which "bash"))
10069 (setenv "LIBEV_EMBED" "false")
10070 (setenv "CARES_EMBED" "false")
10071 (setenv "EMBED" "false")
10073 ;; Prevent building bundled libev.
10074 (substitute* "setup.py"
10075 (("run_make=_BUILDING")
10078 (let ((greenlet (string-append
10079 (assoc-ref inputs "python-greenlet")
10081 (match (scandir greenlet
10083 (string-prefix? "python" item)))
10085 (setenv "C_INCLUDE_PATH"
10086 (string-append greenlet "/" python)))))
10088 (add-before 'check 'skip-timer-test
10090 ;; XXX: Skip 'TestTimerResolution', which appears to be
10092 (substitute* "src/greentest/test__core_timer.py"
10093 (("not greentest.RUNNING_ON_CI") "False"))
10097 ;; Make sure the build directory is on PYTHONPATH.
10098 (setenv "PYTHONPATH"
10100 (getenv "PYTHONPATH") ":"
10102 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10103 (with-directory-excursion "src/greentest"
10104 ;; XXX: Many tests require network access. Instead we only
10105 ;; run known-good tests. Unfortunately we cannot use
10106 ;; recursion here since this directory also contains
10107 ;; Python-version-specific subfolders.
10108 (apply invoke "python" "testrunner.py" "--config"
10109 "known_failures.py"
10110 (scandir "." (cut regexp-exec
10111 (make-regexp "test_+(subprocess|core)")
10114 `(("python-greenlet" ,python-greenlet)
10115 ("python-objgraph" ,python-objgraph)))
10117 `(("python-six" ,python-six)))
10119 `(("c-ares" ,c-ares)
10121 (home-page "http://www.gevent.org/")
10122 (synopsis "Coroutine-based network library")
10124 "gevent is a coroutine-based Python networking library that uses greenlet
10125 to provide a high-level synchronous API on top of the libev event loop.")
10126 (license license:expat)
10127 (properties `((python2-variant . ,(delay python2-gevent))))))
10129 (define-public python2-gevent
10130 (let ((base (package-with-python2
10131 (strip-python2-variant python-gevent))))
10134 (native-inputs `(,@(package-native-inputs python-gevent)
10135 ("python-mock" ,python2-mock))))))
10137 (define-public python-fastimport
10139 (name "python-fastimport")
10144 (uri (pypi-uri "fastimport" version))
10146 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10147 (build-system python-build-system)
10148 (home-page "https://github.com/jelmer/python-fastimport")
10149 (synopsis "VCS fastimport parser and generator in Python")
10150 (description "This package provides a parser for and generator of the Git
10151 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10153 (license license:gpl2+)))
10155 (define-public python2-fastimport
10156 (package-with-python2 python-fastimport))
10158 (define-public python-twisted
10160 (name "python-twisted")
10164 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10167 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10168 (build-system python-build-system)
10170 '(#:tests? #f)) ; FIXME: some tests fail
10172 `(("python-zope-interface" ,python-zope-interface)
10173 ("python-pyhamcrest" ,python-pyhamcrest)
10174 ("python-incremental" ,python-incremental)
10175 ("python-hyperlink" ,python-hyperlink)
10176 ("python-constantly" ,python-constantly)
10177 ("python-automat" ,python-automat)))
10178 (home-page "https://twistedmatrix.com/")
10179 (synopsis "Asynchronous networking framework written in Python")
10181 "Twisted is an extensible framework for Python programming, with special
10182 focus on event-based network programming and multiprotocol integration.")
10183 (license license:expat)))
10185 (define-public python2-twisted
10186 (package-with-python2 python-twisted))
10188 (define-public python-pika
10190 (name "python-pika")
10195 (uri (pypi-uri "pika" version))
10198 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10199 (build-system python-build-system)
10201 `(("python-pyev" ,python-pyev)
10202 ("python-tornado" ,python-tornado)
10203 ("python-twisted" ,python-twisted)))
10204 (home-page "https://pika.readthedocs.org")
10205 (synopsis "Pure Python AMQP Client Library")
10207 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10208 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10209 network support library.")
10210 (license license:bsd-3)))
10212 (define-public python2-pika
10213 (package-with-python2 python-pika))
10215 (define-public python-ply
10217 (name "python-ply")
10222 (uri (pypi-uri "ply" version))
10225 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10226 (build-system python-build-system)
10227 (home-page "http://www.dabeaz.com/ply/")
10228 (synopsis "Python Lex & Yacc")
10229 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10230 It uses LR parsing and does extensive error checking.")
10231 (license license:bsd-3)))
10233 (define-public python2-ply
10234 (package-with-python2 python-ply))
10236 (define-public python-tabulate
10238 (name "python-tabulate")
10242 (uri (pypi-uri "tabulate" version))
10245 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10246 (build-system python-build-system)
10248 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10249 ;; and the latest release is not tagged in the upstream repository.
10251 (home-page "https://bitbucket.org/astanin/python-tabulate")
10252 (synopsis "Pretty-print tabular data")
10254 "Tabulate is a library and command-line utility to pretty-print tabular
10256 (license license:expat)))
10258 (define-public python2-tabulate
10259 (package-with-python2 python-tabulate))
10261 (define-public python-kazoo
10263 (name "python-kazoo")
10268 (uri (pypi-uri "kazoo" version))
10271 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10272 (build-system python-build-system)
10273 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10275 `(("python-six" ,python-six)))
10276 (home-page "https://kazoo.readthedocs.org")
10277 (synopsis "High-level Zookeeper client library")
10279 "Kazoo is a Python client library for the Apache Zookeeper distributed
10280 application service. It is designed to be easy to use and to avoid common
10281 programming errors.")
10282 (license license:asl2.0)))
10284 (define-public python2-kazoo
10285 (package-with-python2 python-kazoo))
10287 (define-public python-pykafka
10289 (name "python-pykafka")
10293 (uri (pypi-uri "pykafka" version))
10296 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10297 (build-system python-build-system)
10298 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10300 `(("python-gevent" ,python-gevent)
10301 ("python-kazoo" ,python-kazoo)
10302 ("python-tabulate" ,python-tabulate)))
10304 `(("librdkafka" ,librdkafka)))
10305 (home-page "https://pykafka.readthedocs.io/")
10306 (synopsis "Apache Kafka client for Python")
10308 "PyKafka is a client for the Apache Kafka distributed messaging system.
10309 It includes Python implementations of Kafka producers and consumers, which
10310 are optionally backed by a C extension built on librdkafka.")
10311 (license license:asl2.0)))
10313 (define-public python2-pykafka
10314 (package-with-python2 python-pykafka))
10316 (define-public python-wcwidth
10318 (name "python-wcwidth")
10323 (uri (pypi-uri "wcwidth" version))
10326 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10327 (build-system python-build-system)
10328 (home-page "https://github.com/jquast/wcwidth")
10329 (synopsis "Measure number of terminal column cells of wide-character codes")
10330 (description "Wcwidth measures the number of terminal column cells of
10331 wide-character codes. It is useful for those implementing a terminal emulator,
10332 or programs that carefully produce output to be interpreted by one. It is a
10333 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10334 specified in POSIX.1-2001 and POSIX.1-2008.")
10335 (license license:expat)))
10337 (define-public python2-wcwidth
10338 (package-with-python2 python-wcwidth))
10340 (define-public python2-jsonrpclib
10342 (name "python2-jsonrpclib")
10346 (uri (pypi-uri "jsonrpclib" version))
10349 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10350 (build-system python-build-system)
10353 #:python ,python-2))
10354 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10355 (synopsis "Implementation of JSON-RPC specification for Python")
10357 "This library is an implementation of the JSON-RPC specification.
10358 It supports both the original 1.0 specification, as well as the
10359 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10361 (license license:asl2.0)))
10363 (define-public python-chai
10365 (name "python-chai")
10369 (uri (pypi-uri "chai" version))
10372 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10373 (build-system python-build-system)
10374 (home-page "https://github.com/agoragames/chai")
10375 (synopsis "Mocking framework for Python")
10377 "Chai provides an api for mocking, stubbing and spying your python
10378 objects, patterned after the Mocha library for Ruby.")
10379 (license license:bsd-3)))
10381 (define-public python2-chai
10382 (package-with-python2 python-chai))
10384 (define-public python-inflection
10386 (name "python-inflection")
10389 (origin (method url-fetch)
10390 (uri (pypi-uri "inflection" version))
10393 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10394 (build-system python-build-system)
10396 `(("python-pytest" ,python-pytest)))
10397 (home-page "https://github.com/jpvanhal/inflection")
10398 (synopsis "Python string transformation library")
10400 "Inflection is a string transformation library. It singularizes
10401 and pluralizes English words, and transforms strings from CamelCase to
10402 underscored string.")
10403 (license license:expat)))
10405 (define-public python2-inflection
10406 (package-with-python2 python-inflection))
10408 (define-public python-pylev
10410 (name "python-pylev")
10414 (uri (pypi-uri "pylev" version))
10417 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10418 (build-system python-build-system)
10419 (home-page "https://github.com/toastdriven/pylev")
10420 (synopsis "Levenshtein distance implementation in Python")
10421 (description "Pure Python Levenshtein implementation, based off the
10422 Wikipedia code samples at
10423 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10424 (license license:bsd-3)))
10426 (define-public python2-pylev
10427 (package-with-python2 python-pylev))
10429 (define-public python-cleo
10431 (name "python-cleo")
10435 (uri (pypi-uri "cleo" version))
10438 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10439 (build-system python-build-system)
10442 ("python-mock" ,python-mock)
10443 ("python-pytest-mock" ,python-pytest-mock)
10444 ("python-pytest" ,python-pytest)))
10446 `(("python-backpack" ,python-backpack)
10447 ("python-pastel" ,python-pastel)
10448 ("python-pylev" ,python-pylev)))
10449 (home-page "https://github.com/sdispater/cleo")
10450 (synopsis "Command-line arguments library for Python")
10452 "Cleo allows you to create command-line commands with signature in
10453 docstring and colored output.")
10454 (license license:expat)))
10456 (define-public python2-cleo
10457 (package-with-python2 python-cleo))
10459 (define-public python-tomlkit
10461 (name "python-tomlkit")
10466 (uri (pypi-uri "tomlkit" version))
10469 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10470 (build-system python-build-system)
10472 `(("python-pytest" ,python-pytest)))
10474 "https://github.com/sdispater/tomlkit")
10475 (synopsis "Style preserving TOML library")
10477 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10478 preserves all comments, indentations, whitespace and internal element ordering,
10479 and makes them accessible and editable via an intuitive API. It can also
10480 create new TOML documents from scratch using the provided helpers. Part of the
10481 implementation as been adapted, improved and fixed from Molten.")
10482 (license license:expat)))
10484 (define-public python-shellingham
10486 (name "python-shellingham")
10491 (uri (pypi-uri "shellingham" version))
10494 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10495 (build-system python-build-system)
10497 "https://github.com/sarugaku/shellingham")
10498 (synopsis "Tool to detect surrounding shell")
10500 "Shellingham detects what shell the current Python executable is
10502 (license license:isc)))
10504 (define-public python-memcached
10506 (name "python-memcached")
10511 (uri (pypi-uri "python-memcached" version))
10514 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10515 (build-system python-build-system)
10516 (propagated-inputs `(("python-six" ,python-six)))
10518 "https://github.com/linsomniac/python-memcached")
10519 (synopsis "Pure python memcached client")
10521 "This software is a pure Python interface to the memcached memory cache
10522 daemon. It is the client side software which allows storing values in one or
10523 more, possibly remote, memcached servers.")
10524 (license license:psfl)))
10526 (define-public python-clikit
10528 (name "python-clikit")
10533 (uri (pypi-uri "clikit" version))
10536 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10537 (build-system python-build-system)
10539 `(("python-pastel" ,python-pastel)
10540 ("python-pylev" ,python-pylev)))
10541 (home-page "https://github.com/sdispater/clikit")
10542 (synopsis "Group of utilities to build command line interfaces")
10544 "CliKit is a group of utilities to build testable command line
10546 (license license:expat)))
10548 (define-public python-msgpack-python
10550 (name "python-msgpack-python")
10555 (uri (pypi-uri "msgpack-python" version))
10558 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10559 (build-system python-build-system)
10560 (home-page "http://msgpack.org/")
10561 (synopsis "Package to deserialize messages in MessagePack binary format")
10563 "MessagePack is an efficient binary serialization format. It lets you
10564 exchange data among multiple languages like JSON. But it's faster and
10565 smaller. Small integers are encoded into a single byte, and typical short
10566 strings require only one extra byte in addition to the strings themselves.")
10567 (license license:asl2.0)))
10569 (define-public python-cachy
10571 (name "python-cachy")
10576 (uri (pypi-uri "cachy" version))
10579 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10580 (build-system python-build-system)
10582 `(("python-fakeredis" ,python-fakeredis)
10583 ("python-flexmock" ,python-flexmock)
10584 ("python-pytest" ,python-pytest)))
10586 `(("python-memcached" ,python-memcached)
10587 ("python-msgpack-python" ,python-msgpack-python)
10588 ("python-redis" ,python-redis)))
10589 (home-page "https://github.com/sdispater/cachy")
10590 (synopsis "Simple yet effective caching library")
10592 "Cachy provides a simple yet effective caching library. A simple but
10593 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10594 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10595 (license license:expat)))
10597 (define-public poetry
10600 (version "0.12.17")
10601 ;; Poetry can only be built from source with poetry.
10605 (uri (pypi-uri "poetry" version))
10608 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10609 (build-system python-build-system)
10611 `(#:tests? #f ;; Pypi does not have tests.
10613 (modify-phases %standard-phases
10616 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10617 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10621 `(("python-cachecontrol" ,python-cachecontrol)
10622 ("python-cachy" ,python-cachy)
10623 ("python-cleo" ,python-cleo)
10624 ("python-glob2" ,python-glob2)
10625 ("python-html5lib" ,python-html5lib)
10626 ("python-jsonschema" ,python-jsonschema)
10627 ("python-msgpack" ,python-msgpack)
10628 ("python-pathlib2" ,python-pathlib2)
10629 ("python-pkginfo" ,python-pkginfo)
10630 ("python-pyparsing" ,python-pyparsing)
10631 ("python-pyrsistent" ,python-pyrsistent)
10632 ("python-requests" ,python-requests)
10633 ("python-requests-toolbelt" ,python-requests-toolbelt)
10634 ("python-shellingham" ,python-shellingham)
10635 ("python-tomlkit" ,python-tomlkit)
10636 ("python-virtualenv" ,python-virtualenv)))
10637 (home-page "https://poetry.eustace.io/")
10638 (synopsis "Python dependency management and packaging made easy")
10639 (description "Poetry is a tool for dependency management and packaging
10640 in Python. It allows you to declare the libraries your project depends on and
10641 it will manage (install/update) them for you.")
10642 (license license:expat)))
10644 (define-public python-lazy-object-proxy
10646 (name "python-lazy-object-proxy")
10650 (uri (pypi-uri "lazy-object-proxy" version))
10653 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10655 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10656 (build-system python-build-system)
10657 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10658 (synopsis "Lazy object proxy for python")
10660 "Lazy object proxy is an object that wraps a callable but defers the call
10661 until the object is actually required, and caches the result of said call.")
10662 (license license:bsd-2)))
10664 (define-public python2-lazy-object-proxy
10665 (package-with-python2 python-lazy-object-proxy))
10667 (define-public python-dnspython
10669 (name "python-dnspython")
10673 (uri (string-append "http://www.dnspython.org/kits/"
10674 version "/dnspython-" version ".tar.gz"))
10677 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10678 (build-system python-build-system)
10679 (arguments '(#:tests? #f)) ; XXX: requires internet access
10680 (home-page "http://www.dnspython.org")
10681 (synopsis "DNS toolkit for Python")
10683 "dnspython is a DNS toolkit for Python. It supports almost all record
10684 types. It can be used for queries, zone transfers, and dynamic updates.
10685 It supports TSIG authenticated messages and EDNS0.")
10686 (license license:expat)))
10688 (define-public python2-dnspython
10689 (package-with-python2 python-dnspython))
10691 (define-public python-email-validator
10693 (name "python-email-validator")
10696 (origin (method url-fetch)
10697 (uri (pypi-uri "email_validator" version))
10700 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10701 (build-system python-build-system)
10704 (modify-phases %standard-phases
10705 (add-before 'build 'use-dnspython
10707 (substitute* "setup.py"
10708 (("dnspython3") "dnspython"))
10711 `(("python-dnspython" ,python-dnspython)
10712 ("python-idna" ,python-idna)))
10713 (home-page "https://github.com/JoshData/python-email-validator")
10714 (synopsis "Email address validation library for Python")
10716 "This library validates email address syntax and deliverability.")
10717 (license license:cc0)))
10719 (define-public python2-email-validator
10720 (package-with-python2 python-email-validator))
10722 (define-public python-ukpostcodeparser
10724 (name "python-ukpostcodeparser")
10728 (uri (pypi-uri "UkPostcodeParser" version))
10731 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10732 (build-system python-build-system)
10733 (home-page "https://github.com/hamstah/ukpostcodeparser")
10734 (synopsis "UK Postcode parser for Python")
10736 "This library provides the @code{parse_uk_postcode} function for
10737 parsing UK postcodes.")
10738 (license license:expat)))
10740 (define-public python2-ukpostcodeparser
10741 (package-with-python2 python-ukpostcodeparser))
10743 (define-public python-faker
10745 (name "python-faker")
10749 (uri (pypi-uri "Faker" version))
10752 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10754 (search-patches "python-faker-fix-build-32bit.patch"))
10755 (modules '((guix build utils)))
10758 (for-each delete-file (find-files "." "\\.pyc$"))
10760 (build-system python-build-system)
10763 (modify-phases %standard-phases
10765 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10768 ("python-email-validator" ,python-email-validator)
10769 ("python-mock" ,python-mock)
10770 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10772 `(("python-dateutil" ,python-dateutil)
10773 ("python-six" ,python-six)))
10774 (home-page "https://github.com/joke2k/faker")
10775 (synopsis "Python package that generates fake data")
10777 "Faker is a Python package that generates fake data such as names,
10778 addresses, and phone numbers.")
10779 (license license:expat)
10780 (properties `((python2-variant . ,(delay python2-faker))))))
10782 (define-public python2-faker
10783 (let ((base (package-with-python2 (strip-python2-variant
10788 `(("python2-ipaddress" ,python2-ipaddress)
10789 ,@(package-propagated-inputs base))))))
10791 (define-public python-pyaml
10793 (name "python-pyaml")
10794 (version "18.11.0")
10797 (uri (pypi-uri "pyaml" version))
10800 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10801 (build-system python-build-system)
10803 `(("python-unidecode" ,python-unidecode)))
10805 `(("python-pyyaml" ,python-pyyaml)))
10806 (home-page "https://github.com/mk-fg/pretty-yaml")
10807 (synopsis "YAML pretty-print library for Python")
10809 "pyaml is a PyYAML based python module to produce pretty and readable
10810 YAML-serialized data.")
10811 (license license:wtfpl2)))
10813 (define-public python2-pyaml
10814 (package-with-python2 python-pyaml))
10816 (define-public python-backpack
10818 (name "python-backpack")
10823 (uri (pypi-uri "backpack" version))
10826 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10827 (build-system python-build-system)
10829 `(("python-pytest" ,python-pytest)
10830 ("python-nose" ,python-nose)))
10832 `(("python-simplejson" ,python-simplejson)))
10833 (home-page "https://github.com/sdispater/backpack")
10834 (synopsis "Utilities for working with Python collections")
10835 (description "Backpack provides some useful utilities for working with
10836 collections of data.")
10837 (license license:expat)))
10839 (define-public python2-backpack
10840 (package-with-python2 python-backpack))
10842 (define-public python-prompt-toolkit
10844 (name "python-prompt-toolkit")
10849 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10852 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10853 (build-system python-build-system)
10856 (modify-phases %standard-phases
10858 (add-after 'install 'post-install-check
10859 (lambda* (#:key inputs outputs #:allow-other-keys)
10860 ;; HOME is needed for the test
10861 ;; "test_pathcompleter_can_expanduser".
10862 (setenv "HOME" "/tmp")
10863 (add-installed-pythonpath inputs outputs)
10864 (invoke "py.test"))))))
10866 `(("python-wcwidth" ,python-wcwidth)
10867 ("python-six" ,python-six)
10868 ("python-pygments" ,python-pygments)))
10870 `(("python-pytest" ,python-pytest)))
10871 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10872 (synopsis "Library for building command line interfaces in Python")
10874 "Prompt-Toolkit is a library for building interactive command line
10875 interfaces in Python. It's like GNU Readline but it also features syntax
10876 highlighting while typing, out-of-the-box multi-line input editing, advanced
10877 code completion, incremental search, support for Chinese double-width
10878 characters, mouse support, and auto suggestions.")
10879 (license license:bsd-3)))
10881 (define-public python2-prompt-toolkit
10882 (package-with-python2 python-prompt-toolkit))
10884 (define-public python-prompt-toolkit-1
10885 (package (inherit python-prompt-toolkit)
10890 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10893 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10895 (define-public python2-prompt-toolkit-1
10896 (package-with-python2 python-prompt-toolkit-1))
10898 (define-public python-jedi
10900 (name "python-jedi")
10905 (uri (pypi-uri "jedi" version))
10908 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10909 (build-system python-build-system)
10912 (modify-phases %standard-phases
10913 (add-after 'unpack 'disable-file-completion-test
10914 ;; A single parameterized test currently fail (see:
10915 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10917 (substitute* "test/test_api/test_completion.py"
10918 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10922 (setenv "HOME" "/tmp")
10923 (invoke "python" "-m" "pytest"))))))
10925 `(("python-pytest" ,python-pytest)
10926 ("python-docopt" ,python-docopt)))
10928 `(("python-parso" ,python-parso)))
10929 (home-page "https://github.com/davidhalter/jedi")
10930 (synopsis "Autocompletion and static analysis library for Python")
10932 "Jedi is a static analysis tool for Python that can be used in Integrated
10933 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10934 on a deeper level than many other static analysis frameworks for Python.
10936 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10938 (license license:expat)))
10940 (define-public python2-jedi
10941 (package-with-python2 python-jedi))
10943 (define-public ptpython
10949 (uri (pypi-uri "ptpython" version))
10952 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10953 (build-system python-build-system)
10955 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10957 `(("python-docopt" ,python-docopt)
10958 ("python-jedi" ,python-jedi)
10959 ("python-prompt-toolkit" ,python-prompt-toolkit)
10960 ("python-pygments" ,python-pygments)))
10961 (home-page "https://github.com/jonathanslenders/ptpython")
10962 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10964 "ptpython is a Python read-eval-print loop with IDE-like features.
10965 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10966 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10968 (license license:bsd-3)
10969 (properties `((python2-variant . ,(delay ptpython-2))))))
10971 (define-public ptpython-2
10972 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10975 (name "ptpython2"))))
10977 (define-public python-stem
10979 (name "python-stem")
10984 (uri (pypi-uri "stem" version))
10987 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10988 (build-system python-build-system)
10991 (modify-phases %standard-phases
10994 (invoke "./run_tests.py" "--unit")
10997 `(("python-mock" ,python-mock)
10998 ("python-pycodestyle" ,python-pycodestyle)
10999 ("python-pyflakes" ,python-pyflakes)))
11000 (home-page "https://stem.torproject.org/")
11002 "Python controller library that allows applications to interact with Tor")
11004 "Stem is a Python controller library for Tor. With it you can use Tor's
11005 control protocol to script against the Tor process and read descriptor data
11006 relays publish about themselves.")
11007 (license license:lgpl3)))
11009 (define-public python2-stem
11010 (package-with-python2 python-stem))
11012 (define-public python-pyserial
11014 (name "python-pyserial")
11019 (uri (pypi-uri "pyserial" version))
11022 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11023 (build-system python-build-system)
11025 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11027 ;; (modify-phases %standard-phases
11030 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11032 "https://github.com/pyserial/pyserial")
11033 (synopsis "Python Serial Port Bindings")
11034 (description "@code{pyserial} provide serial port bindings for Python. It
11035 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11036 and/or Xon/Xoff. The port is accessed in RAW mode.")
11037 (license license:bsd-3)))
11039 (define-public python2-pyserial
11040 (package-with-python2 python-pyserial))
11042 (define-public python-kivy
11044 (name "python-kivy")
11049 (uri (pypi-uri "Kivy" version))
11050 (file-name (string-append name "-" version ".tar.gz"))
11053 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11054 (build-system python-build-system)
11056 `(#:tests? #f ; Tests require many optional packages
11058 (modify-phases %standard-phases
11059 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11060 (lambda* (#:key inputs #:allow-other-keys)
11061 (setenv "KIVY_SDL2_PATH"
11062 (string-append (assoc-ref inputs "sdl-union")
11067 ("pkg-config" ,pkg-config)
11068 ("python-cython" ,python-cython)))
11070 `(("gstreamer" ,gstreamer)
11073 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11074 (home-page "http://kivy.org")
11076 "Multitouch application framework")
11078 "A software library for rapid development of
11079 hardware-accelerated multitouch applications.")
11080 (license license:expat)))
11082 (define-public python2-kivy
11083 (package-with-python2 python-kivy))
11085 (define-public python-kivy-next
11086 (deprecated-package "python-kivy-next" python-kivy))
11088 (define-public python2-kivy-next
11089 (deprecated-package "python2-kivy-next" python2-kivy))
11091 (define-public python-binaryornot
11093 (name "python-binaryornot")
11097 (uri (pypi-uri "binaryornot" version))
11100 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11101 (build-system python-build-system)
11104 (modify-phases %standard-phases
11105 (add-after 'unpack 'patch-tests
11107 ;; TypeError: binary() got an unexpected keyword argument
11109 (substitute* "tests/test_check.py"
11110 (("average_size=512") ""))
11113 `(("python-chardet" ,python-chardet)
11114 ("python-hypothesis" ,python-hypothesis)))
11115 (home-page "https://github.com/audreyr/binaryornot")
11116 (synopsis "Package to check if a file is binary or text")
11117 (description "Ultra-lightweight pure Python package to check if a file is
11119 (license license:bsd-3)
11120 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11122 (define-public python2-binaryornot
11123 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11124 (package (inherit base)
11126 `(("python2-enum34" ,python2-enum34)
11127 ,@(package-propagated-inputs base))))))
11129 (define-public python-binwalk
11130 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11133 (name "python-binwalk")
11134 (version (git-version "2.1.1" revision commit))
11138 (uri (git-reference
11139 (url "https://github.com/ReFirmLabs/binwalk")
11141 (file-name (git-file-name name version))
11144 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11145 (build-system python-build-system)
11148 (modify-phases %standard-phases
11149 (add-before 'check 'set-pythonpath
11151 (setenv "PYTHONPATH"
11154 ":" (getenv "PYTHONPATH")))
11158 `(("python-coverage" ,python-coverage)
11159 ("python-nose" ,python-nose)))
11160 (home-page "https://github.com/ReFirmLabs/binwalk")
11161 (synopsis "Firmware analysis tool")
11162 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11163 (license license:expat))))
11165 (define-public python-nltk
11167 (name "python-nltk")
11171 (uri (pypi-uri "nltk" version))
11174 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11175 (build-system python-build-system)
11177 '(;; The tests require some extra resources to be downloaded.
11178 ;; TODO Try packaging these resources.
11180 (home-page "http://nltk.org/")
11181 (synopsis "Natural Language Toolkit")
11182 (description "It provides interfaces to over 50 corpora and lexical
11183 resources such as WordNet, along with a suite of text processing libraries
11184 for classification, tokenization, stemming, tagging, parsing, and semantic
11185 reasoning, wrappers for natural language processing libraries.")
11186 (license license:asl2.0)))
11188 (define-public python2-nltk
11189 (package-with-python2 python-nltk))
11191 (define-public python-pymongo
11193 (name "python-pymongo")
11197 (uri (pypi-uri "pymongo" version))
11200 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11201 (build-system python-build-system)
11203 `(("python-certifi" ,python-certifi)))
11204 (home-page "https://github.com/mongodb/mongo-python-driver")
11205 (synopsis "Python driver for MongoDB")
11206 (description "Python driver for MongoDB.")
11207 (license license:asl2.0)))
11209 (define-public python2-pymongo
11210 (package-with-python2 python-pymongo))
11212 (define-public python-consul
11214 (name "python-consul")
11219 (uri (pypi-uri "python-consul" version))
11222 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11223 (build-system python-build-system)
11225 '(#:tests? #f)) ; The tests are not distributed
11227 `(("python-requests" ,python-requests)
11228 ("python-six" ,python-six)))
11229 (home-page "https://github.com/cablehead/python-consul")
11230 (synopsis "Python client for Consul")
11232 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11233 discovery, monitoring and configuration.")
11234 (license license:expat)))
11236 (define-public python2-consul
11237 (package-with-python2 python-consul))
11239 (define-public python-schematics
11241 (name "python-schematics")
11246 (uri (git-reference
11247 (url "https://github.com/schematics/schematics.git")
11248 (commit (string-append "v" version))))
11249 (file-name (git-file-name name version))
11251 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11252 (build-system python-build-system)
11254 `(("python-six" ,python-six)))
11256 ;; The tests require a bunch of not very nice packages with fixed
11257 ;; version requirements (e.g. python-coveralls).
11259 (home-page "https://github.com/schematics/schematics")
11260 (synopsis "Python Data Structures for Humans")
11261 (description "Python Data Structures for Humans.")
11262 (license license:bsd-3)))
11264 (define-public python2-schematics
11265 (package-with-python2 python-schematics))
11267 (define-public python-odfpy
11269 (name "python-odfpy")
11273 (uri (pypi-uri "odfpy" version))
11276 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11278 `(#:modules ((srfi srfi-1)
11279 (guix build python-build-system)
11280 (guix build utils))
11282 (modify-phases %standard-phases
11284 ;; The test runner invokes python2 and python3 for test*.py.
11285 ;; To avoid having both in inputs, we replicate it here.
11287 (for-each (lambda (test-file) (invoke "python" test-file))
11288 (find-files "tests" "^test.*\\.py$"))
11290 (build-system python-build-system)
11291 (home-page "https://github.com/eea/odfpy")
11292 (synopsis "Python API and tools to manipulate OpenDocument files")
11293 (description "Collection of libraries and utility programs written in
11294 Python to manipulate OpenDocument 1.2 files.")
11296 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11297 ;; number of files with other licenses.
11298 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11300 (define-public python2-odfpy
11301 (package-with-python2 python-odfpy))
11303 (define-public python-natsort
11305 (name "python-natsort")
11309 (uri (pypi-uri "natsort" version))
11312 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11313 (build-system python-build-system)
11315 `(#:modules ((guix build utils)
11316 (guix build python-build-system)
11321 (modify-phases %standard-phases
11322 (add-before 'check 'set-cachedir
11323 ;; Tests require write access to $HOME by default
11324 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11327 (let ((cwd (getcwd)))
11328 (setenv "PYTHONPATH"
11331 (find (cut string-prefix? "lib" <>)
11332 (scandir (string-append cwd "/build")))
11334 (getenv "PYTHONPATH")))
11335 (invoke "pytest" "-v")))))))
11337 `(("python-hypothesis" ,python-hypothesis)
11338 ("python-pytest-cov" ,python-pytest-cov)
11339 ("python-pytest-mock" ,python-pytest-mock)
11340 ("python-pytest" ,python-pytest)))
11341 (propagated-inputs ; TODO: Add python-fastnumbers.
11342 `(("python-pyicu" ,python-pyicu)))
11343 (home-page "https://github.com/SethMMorton/natsort")
11344 (synopsis "Natural sorting for python and shell")
11346 "Natsort lets you apply natural sorting on lists instead of
11347 lexicographical. If you use the built-in @code{sorted} method in python
11348 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11349 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11350 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11351 identifies numbers and sorts them separately from strings. It can also sort
11352 version numbers, real numbers, mixed types and more, and comes with a shell
11353 command @command{natsort} that exposes this functionality in the command line.")
11354 (license license:expat)
11355 (properties `((python2-variant . ,(delay python2-natsort))))))
11357 (define-public python2-natsort
11358 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11359 (package (inherit base)
11361 `(("python2-pathlib" ,python2-pathlib)
11362 ,@(package-native-inputs base))))))
11364 (define-public python-glances
11366 (name "python-glances")
11371 (uri (pypi-uri "Glances" version))
11373 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11374 (modules '((guix build utils)))
11377 ;; Glances phones PyPI for weekly update checks by default.
11378 ;; Disable these. The user can re-enable them if desired.
11379 (substitute* "glances/outdated.py"
11380 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11381 (string-append indentation
11382 "self.args.disable_check_update = True\n"
11385 (build-system python-build-system)
11387 `(("python-future" ,python-future)
11388 ("python-psutil" ,python-psutil)))
11389 (home-page "https://github.com/nicolargo/glances")
11390 (synopsis "Cross-platform curses-based monitoring tool")
11392 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11393 Glances uses the PsUtil library to get information from your system. It
11394 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11395 (license license:lgpl3+)))
11397 (define-public python2-glances
11398 (package-with-python2 python-glances))
11400 (define-public python-graphql-core
11402 (name "python-graphql-core")
11407 (uri (pypi-uri "graphql-core" version))
11410 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11411 (build-system python-build-system)
11413 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11415 (modify-phases %standard-phases
11416 (add-after 'unpack 'patch-hardcoded-version
11417 (lambda _ (substitute*
11419 (("'gevent==1.1rc1'") "'gevent'"))
11422 `(("python-gevent" ,python-gevent)
11423 ("python-mock" ,python-mock)
11424 ("python-pytest-mock" ,python-pytest-mock)))
11426 `(("python-promise" ,python-promise)
11427 ("python-six" ,python-six)))
11428 (home-page "https://github.com/graphql-python/graphql-core")
11429 (synopsis "GraphQL implementation for Python")
11431 "GraphQL implementation for Python. GraphQL is a data query language and
11432 runtime designed and used to request and deliver data to mobile and web apps.
11433 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11435 (license license:expat)))
11437 (define-public python2-graphql-core
11438 (package-with-python2 python-graphql-core))
11440 (define-public python-graphql-relay
11442 (name "python-graphql-relay")
11447 (uri (pypi-uri "graphql-relay" version))
11450 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11451 (build-system python-build-system)
11453 '(#:tests? #f)) ; The tests are not distributed
11455 `(("python-graphql-core" ,python-graphql-core)
11456 ("python-promise" ,python-promise)
11457 ("python-six" ,python-six)))
11458 (home-page "https://github.com/graphql-python/graphql-relay-py")
11459 (synopsis "Relay implementation for Python")
11461 "This is a library to allow the easy creation of Relay-compliant servers
11462 using the GraphQL Python reference implementation of a GraphQL server. It
11463 should be noted that the code is a exact port of the original
11464 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11466 (license license:expat)))
11468 (define-public python2-graphql-relay
11469 (package-with-python2 python-graphql-relay))
11471 (define-public python-graphene
11473 (name "python-graphene")
11478 (uri (pypi-uri "graphene" version))
11481 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11482 (build-system python-build-system)
11484 `(("python-graphql-core" ,python-graphql-core)
11485 ("python-graphql-relay" ,python-graphql-relay)
11486 ("python-iso8601" ,python-iso8601)
11487 ("python-promise" ,python-promise)
11488 ("python-six" ,python-six)))
11490 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11491 (home-page "http://graphene-python.org/")
11492 (synopsis "GraphQL Framework for Python")
11494 "Graphene is a Python library for building GraphQL schemas/types.
11495 A GraphQL schema describes your data model, and provides a GraphQL server
11496 with an associated set of resolve methods that know how to fetch data.")
11497 (properties `((python2-variant . ,(delay python2-graphene))))
11498 (license license:expat)))
11500 (define-public python2-graphene
11501 (let ((base (package-with-python2
11502 (strip-python2-variant python-graphene))))
11503 (package (inherit base)
11505 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11506 ,@(package-native-inputs base))))))
11508 (define-public python-nautilus
11510 (name "python-nautilus")
11515 (uri (pypi-uri "nautilus" version))
11518 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11519 (build-system python-build-system)
11520 (arguments `(#:tests? #f)) ; fails to import test modules
11522 `(("python-bcrypt" ,python-bcrypt)
11523 ("python-click" ,python-click)
11524 ("python-consul" ,python-consul)
11525 ("python-graphene" ,python-graphene)
11526 ("python-jinja2" ,python-jinja2)
11527 ("python-peewee" ,python-peewee)
11528 ("python-pika" ,python-pika)
11529 ("python-tornado" ,python-tornado)
11530 ("python-wtforms" ,python-wtforms)))
11532 `(("python-nose2" ,python-nose2)))
11533 (home-page "https://github.com/AlecAivazis/nautilus")
11534 (synopsis "Library for creating microservice applications")
11536 "Nautilus is a framework for flux based microservices that looks to
11537 provide extendible implementations of common aspects of a cloud so that you can
11538 focus on building massively scalable web applications.")
11539 (license license:expat)))
11541 (define-public python-snowballstemmer
11543 (name "python-snowballstemmer")
11547 (uri (pypi-uri "snowballstemmer" version))
11550 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11551 (build-system python-build-system)
11553 `(;; No tests exist
11555 (home-page "https://github.com/shibukawa/snowball_py")
11556 (synopsis "Snowball stemming library collection for Python")
11557 (description "This package provides 16 word stemmer algorithms generated
11558 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11560 (license license:bsd-3)))
11562 (define-public python2-snowballstemmer
11563 (package-with-python2 python-snowballstemmer))
11565 (define-public python-setproctitle
11567 (name "python-setproctitle")
11572 (uri (pypi-uri "setproctitle" version))
11575 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11576 (build-system python-build-system)
11579 (modify-phases %standard-phases
11580 (add-before 'check 'patch-Makefile
11581 ;; Stricly this is only required for the python2 variant.
11582 ;; But adding a phase in an inherited package seems to be
11583 ;; cumbersum. So we patch even for python3.
11585 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11587 (substitute* "Makefile"
11588 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11589 (string-append nose "/bin/nosetests "))))
11593 (setenv "PYTHON" (or (which "python3") (which "python")))
11594 (setenv "PYCONFIG" (or (which "python3-config")
11595 (which "python-config")))
11596 (setenv "CC" "gcc")
11597 ;; No need to extend PYTHONPATH to find the built package, since
11598 ;; the Makefile will build anyway
11599 (invoke "make" "check"))))))
11601 `(("procps" ,procps))) ; required for tests
11603 "https://github.com/dvarrazzo/py-setproctitle")
11605 "Setproctitle implementation for Python to customize the process title")
11606 (description "The library allows a process to change its title (as displayed
11607 by system tools such as ps and top).
11609 Changing the title is mostly useful in multi-process systems, for
11610 example when a master process is forked: changing the children's title
11611 allows to identify the task each process is busy with. The technique
11612 is used by PostgreSQL and the OpenSSH Server for example.")
11613 (license license:bsd-3)
11614 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11616 (define-public python2-setproctitle
11617 (let ((base (package-with-python2
11618 (strip-python2-variant python-setproctitle))))
11621 (native-inputs `(("python2-nose" ,python2-nose)
11622 ,@(package-native-inputs base))))))
11624 (define-public python-validictory
11626 (name "python-validictory")
11631 (uri (pypi-uri "validictory" version))
11634 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11635 (build-system python-build-system)
11638 (modify-phases %standard-phases
11639 (add-after 'unpack 'bootstrap
11640 ;; Move the tests out of the package directory to avoid
11643 (rename-file "validictory/tests" "tests")
11644 (delete-file "tests/__init__.py")))
11647 ;; Extend PYTHONPATH so the built package will be found.
11648 (setenv "PYTHONPATH"
11649 (string-append (getcwd) "/build/lib:"
11650 (getenv "PYTHONPATH")))
11651 (invoke "py.test" "-vv" ))))))
11653 `(("python-pytest" ,python-pytest)))
11655 "https://github.com/jamesturk/validictory")
11656 (synopsis "General purpose Python data validator")
11657 (description "It allows validation of arbitrary Python data structures.
11659 The schema format is based on the JSON Schema
11660 proposal (http://json-schema.org), so combined with json the library is also
11661 useful as a validator for JSON data.")
11662 (license license:expat)))
11664 (define-public python2-validictory
11665 (package-with-python2 python-validictory))
11667 (define-public python-pyelftools
11669 (name "python-pyelftools")
11674 (uri (pypi-uri "pyelftools" version))
11677 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11678 (build-system python-build-system)
11681 (modify-phases %standard-phases
11682 (add-before 'check 'set-pythonpath
11684 (setenv "PYTHONPATH"
11687 ":" (getenv "PYTHONPATH")))
11690 "https://github.com/eliben/pyelftools")
11692 "Analyze binary and library file information")
11693 (description "This Python library provides interfaces for parsing and
11694 analyzing two binary and library file formats; the Executable and Linking
11695 Format (ELF), and debugging information in the Debugging With Attributed
11696 Record Format (DWARF).")
11697 (license license:public-domain)))
11699 (define-public python-pyev
11701 (name "python-pyev")
11706 (uri (pypi-uri "pyev" version))
11709 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11710 (build-system python-build-system)
11712 `(#:tests? #f ; no test suite
11714 (modify-phases %standard-phases
11715 (add-after 'unpack 'patch
11716 (lambda* (#:key inputs #:allow-other-keys)
11717 (let ((libev (string-append (assoc-ref inputs "libev")
11718 "/lib/libev.so.4")))
11719 (substitute* "setup.py"
11720 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11721 (string-append "libev_dll_name = \"" libev "\"")))))))))
11723 `(("libev" ,libev)))
11724 (home-page "http://pythonhosted.org/pyev/")
11725 (synopsis "Python libev interface")
11726 (description "Pyev provides a Python interface to libev.")
11727 (license license:gpl3)))
11729 (define-public python2-pyev
11730 (package-with-python2 python-pyev))
11732 (define-public python-imagesize
11734 (name "python-imagesize")
11739 (uri (pypi-uri "imagesize" version))
11742 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11743 (build-system python-build-system)
11744 (home-page "https://github.com/shibukawa/imagesize_py")
11745 (synopsis "Gets image size of files in various formats in Python")
11747 "This package allows determination of image size from
11748 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11749 (license license:expat)))
11751 (define-public python2-imagesize
11752 (package-with-python2 python-imagesize))
11754 (define-public python-termstyle
11756 (name "python-termstyle")
11761 (uri (pypi-uri "termstyle" version))
11764 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11765 (build-system python-build-system)
11768 (modify-phases %standard-phases
11771 (invoke "python" "test3.py"))))))
11772 (home-page "https://github.com/gfxmonk/termstyle")
11773 (synopsis "Console text coloring for Python")
11774 (description "This package provides console text coloring for Python.")
11775 (license license:bsd-3)))
11777 (define-public python-argcomplete
11779 (name "python-argcomplete")
11784 (uri (pypi-uri "argcomplete" version))
11787 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11788 (build-system python-build-system)
11791 (modify-phases %standard-phases
11792 (add-after 'unpack 'embed-tool-references
11794 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11796 (string-append " " (which "grep")))
11798 (string-append " " (which "egrep")))
11800 (string-append "elif " (which "which")))
11802 (string-append "$(" (which "which"))))
11808 `(("python-coverage" ,python-coverage)
11809 ("python-flake8" ,python-flake8)
11810 ("python-pexpect" ,python-pexpect)
11811 ("python-wheel" ,python-wheel)
11814 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11815 (home-page "https://github.com/kislyuk/argcomplete")
11816 (synopsis "Shell tab completion for Python argparse")
11817 (description "argcomplete provides extensible command line tab completion
11818 of arguments and options for Python scripts using @code{argparse}. It's
11819 particularly useful for programs with many options or sub-parsers that can
11820 dynamically suggest completions; for example, when browsing resources over the
11822 (license license:asl2.0)))
11824 (define-public python2-argcomplete
11825 (package-with-python2 python-argcomplete))
11827 (define-public python-xopen
11829 (name "python-xopen")
11834 (uri (pypi-uri "xopen" version))
11837 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11838 (build-system python-build-system)
11840 `(("python-setuptools-scm" ,python-setuptools-scm)))
11841 (home-page "https://github.com/marcelm/xopen/")
11842 (synopsis "Open compressed files transparently")
11843 (description "This module provides an @code{xopen} function that works like
11844 Python's built-in @code{open} function, but can also deal with compressed files.
11845 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11846 recognized by their file extensions. The focus is on being as efficient as
11847 possible on all supported Python versions.")
11848 (license license:expat)))
11850 (define-public python2-xopen
11851 (let ((base (package-with-python2
11852 (strip-python2-variant python-xopen))))
11855 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11856 ,@(package-propagated-inputs base))))))
11858 (define-public python-cheetah
11860 (name "python-cheetah")
11865 (uri (pypi-uri "Cheetah3" version))
11868 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11869 (build-system python-build-system)
11871 `(#:modules ((guix build utils)
11872 (guix build python-build-system)
11876 #:phases (modify-phases %standard-phases
11877 (add-after 'unpack 'use-absolute-python
11879 (substitute* "Cheetah/CheetahWrapper.py"
11880 (("#!/usr/bin/env python")
11881 (string-append "#!" (which "python"))))
11885 (let ((cwd (getcwd)))
11886 (setenv "PYTHONPATH"
11889 (find (cut string-prefix? "lib" <>)
11890 (scandir (string-append cwd "/build")))
11891 ":" (getenv "PYTHONPATH")))
11893 (string-append (getenv "PATH")
11895 (setenv "TMPDIR" "/tmp")
11897 (substitute* "Cheetah/Tests/Test.py"
11898 (("unittest.TextTestRunner\\(\\)")
11899 "unittest.TextTestRunner(verbosity=2)"))
11901 (invoke "python" "Cheetah/Tests/Test.py")))))))
11903 `(("python-markdown" ,python-markdown))) ;optional
11904 (home-page "http://cheetahtemplate.org/")
11905 (synopsis "Template engine")
11906 (description "Cheetah is a text-based template engine and Python code
11909 Cheetah can be used as a standalone templating utility or referenced as
11910 a library from other Python applications. It has many potential uses,
11911 but web developers looking for a viable alternative to ASP, JSP, PHP and
11912 PSP are expected to be its principle user group.
11916 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11918 @item Cleanly separates content, graphic design, and program code.
11919 @item Blends the power and flexibility of Python with a simple template language
11920 that non-programmers can understand.
11921 @item Gives template writers full access to any Python data structure, module,
11922 function, object, or method in their templates.
11923 @item Makes code reuse easy by providing an object-orientated interface to
11924 templates that is accessible from Python code or other Cheetah templates.
11925 One template can subclass another and selectively reimplement sections of it.
11926 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11927 improve the performance of a dynamic website.
11928 @item Compiles templates into optimized, yet readable, Python code.
11930 (license (license:x11-style "file://LICENSE"))))
11932 (define-public python2-cheetah
11933 (package-with-python2 python-cheetah))
11935 (define-public python-dulwich
11937 (name "python-dulwich")
11942 (uri (list (string-append "https://www.dulwich.io/releases/"
11943 "dulwich-" version ".tar.gz")
11944 (pypi-uri "dulwich" version)))
11947 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11948 (build-system python-build-system)
11951 (modify-phases %standard-phases
11952 (add-before 'check 'fix-tests
11953 (lambda* (#:key inputs #:allow-other-keys)
11954 ;; The tests use Popen with a custom environment which doesn't
11956 (substitute* "dulwich/tests/compat/utils.py"
11957 (("'git'") (string-append "'"
11960 (substitute* '("dulwich/tests/test_repository.py"
11961 "dulwich/tests/test_hooks.py")
11962 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11963 (setenv "TEST_RUNNER" "unittest")
11964 (setenv "PYTHONHASHSEED" "random")
11967 `(("python-fastimport" ,python-fastimport)))
11969 `(("python-mock" ,python-mock)
11970 ("python-geventhttpclient" ,python-geventhttpclient)
11972 (home-page "https://www.dulwich.io/")
11973 (synopsis "Git implementation in Python")
11974 (description "Dulwich is an implementation of the Git file formats and
11975 protocols written in pure Python.")
11976 ;; Can be used with either license.
11977 (license (list license:asl2.0 license:gpl2+))))
11979 (define-public python2-dulwich
11980 (package-with-python2 python-dulwich))
11982 (define-public python-pbkdf2
11984 (name "python-pbkdf2")
11989 (uri (pypi-uri "pbkdf2" version))
11992 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11993 (build-system python-build-system)
11996 (modify-phases %standard-phases
11999 (setenv "PYTHONPATH"
12000 (string-append (getcwd) "/build/lib:"
12001 (getenv "PYTHONPATH")))
12002 (invoke "python" "test/test_pbkdf2.py"))))))
12004 `(("python-pycrypto" ,python-pycrypto))) ; optional
12005 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12006 (synopsis "Password-based key derivation")
12007 (description "This module implements the password-based key derivation
12008 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12010 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12011 is part of the RSA Public Key Cryptography Standards series. The provided
12012 implementation takes a password or a passphrase and a salt value (and
12013 optionally a iteration count, a digest module, and a MAC module) and provides
12014 a file-like object from which an arbitrarly-sized key can be read.")
12015 (license license:expat)))
12017 (define-public python2-pbkdf2
12018 (package-with-python2 python-pbkdf2))
12020 (define-public python-qrcode
12022 (name "python-qrcode")
12027 (uri (pypi-uri "qrcode" version))
12029 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12030 (build-system python-build-system)
12032 ;; FIXME: Tests require packaging 'pymaging'.
12035 `(("python-lxml" ,python-lxml) ; for SVG output
12036 ("python-pillow" ,python-pillow) ; for PNG output
12037 ("python-six" ,python-six)))
12038 (home-page "https://github.com/lincolnloop/python-qrcode")
12039 (synopsis "QR Code image generator")
12040 (description "This package provides a pure Python QR Code generator
12041 module. It uses the Python Imaging Library (PIL) to allow for the generation
12044 In addition this package provides a command line tool to generate QR codes and
12045 either write these QR codes to a file or do the output as ascii art at the
12047 (license license:bsd-3)))
12049 (define-public python2-qrcode
12050 (package-with-python2 python-qrcode))
12052 (define-public python-rst2ansi
12054 (name "python-rst2ansi")
12059 (uri (pypi-uri "rst2ansi" version))
12062 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12063 (build-system python-build-system)
12065 `(("python-docutils" ,python-docutils)))
12066 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12067 (synopsis "Convert RST to ANSI-decorated console output")
12069 "Python module dedicated to rendering RST (reStructuredText) documents
12070 to ansi-escaped strings suitable for display in a terminal.")
12071 (license license:expat)))
12073 (define-public python-ansi2html
12075 (name "python-ansi2html")
12080 (uri (pypi-uri "ansi2html" version))
12083 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12084 (build-system python-build-system)
12086 `(("python-mock" ,python-mock)
12087 ("python-nose" ,python-nose)))
12089 `(("python-six" ,python-six)))
12090 (home-page "https://github.com/ralphbean/ansi2html")
12091 (synopsis "Convert ANSI-decorated console output to HTML")
12093 "@command{ansi2html} is a Python library and command line utility for
12094 convering text with ANSI color codes to HTML or LaTeX.")
12095 (license license:gpl3+)))
12097 (define-public python2-ansi2html
12098 (package-with-python2 python-ansi2html))
12100 (define-public python-ddt
12102 (name "python-ddt")
12107 (uri (pypi-uri "ddt" version))
12110 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12111 (build-system python-build-system)
12113 `(("python-mock" ,python-mock)
12114 ("python-nose" ,python-nose)))
12116 `(("python-six" ,python-six)
12117 ("python-pyyaml" ,python-pyyaml)))
12118 (home-page "https://github.com/txels/ddt")
12119 (synopsis "Data-Driven Tests")
12121 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12122 running it with different test data, and make it appear as multiple test
12124 (license license:expat)))
12126 (define-public python2-ddt
12127 (package-with-python2 python-ddt))
12129 (define-public python-pycountry
12131 (name "python-pycountry")
12132 (version "18.5.26")
12136 (uri (pypi-uri "pycountry" version))
12139 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12140 (build-system python-build-system)
12141 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12142 (synopsis "ISO databases for languages, countries, currencies, etc.")
12144 "@code{pycountry} provides the ISO databases for the standards:
12146 @item 639-3 (Languages)
12147 @item 3166 (Countries)
12148 @item 3166-3 (Deleted Countries)
12149 @item 3166-2 (Subdivisions of countries)
12150 @item 4217 (Currencies)
12151 @item 15924 (Scripts)
12153 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12154 through a Python API.")
12155 (license license:lgpl2.1+)))
12157 (define-public python2-pycountry
12158 (package-with-python2 python-pycountry))
12160 (define-public python-pycosat
12162 (name "python-pycosat")
12167 (uri (pypi-uri "pycosat" version))
12170 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12171 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12172 (build-system python-build-system)
12173 (home-page "https://github.com/ContinuumIO/pycosat")
12174 (synopsis "Bindings to picosat (a SAT solver)")
12176 "This package provides efficient Python bindings to @code{picosat} on
12177 the C level. When importing pycosat, the @code{picosat} solver becomes part
12178 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12179 Problem} (SAT) solver.")
12180 (license license:expat)))
12182 (define-public python2-pycosat
12183 (package-with-python2 python-pycosat))
12185 (define-public python2-ruamel.ordereddict
12187 (name "python2-ruamel.ordereddict")
12192 (uri (pypi-uri "ruamel.ordereddict" version))
12195 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12196 (build-system python-build-system)
12198 `(#:python ,python-2
12200 (modify-phases %standard-phases
12202 (add-after 'install 'check
12203 (lambda* (#:key inputs outputs #:allow-other-keys)
12204 (add-installed-pythonpath inputs outputs)
12205 (invoke "python" "test/testordereddict.py"))))))
12206 (home-page "https://bitbucket.org/ruamel/ordereddict")
12207 (synopsis "Version of dict that keeps keys in insertion order")
12209 "This is an implementation of an ordered dictionary with @dfn{Key
12210 Insertion Order} (KIO: updates of values do not affect the position of the
12211 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12212 removed and put at the back). The standard library module @code{OrderedDict},
12213 implemented later, implements a subset of @code{ordereddict} functionality.
12214 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12215 Order} (KSO, no sorting function can be specified, but a transform can be
12216 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12217 (license license:expat)))
12219 (define-public python-pypeg2
12221 (name "python-pypeg2")
12226 (uri (pypi-uri "pyPEG2" version))
12229 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12230 (build-system python-build-system)
12231 (propagated-inputs `(("python-lxml" ,python-lxml)))
12233 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12235 (home-page "https://fdik.org/pyPEG/")
12236 (synopsis "Parsering Expression Grammars in Python")
12237 (description "PyPEG is an intrinsic parser interpreter framework for
12238 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12239 parse many formal languages.")
12240 (license license:gpl2)))
12242 (define-public python-incremental
12244 (name "python-incremental")
12249 (uri (pypi-uri "incremental" version))
12252 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12253 (build-system python-build-system)
12254 (home-page "https://github.com/hawkowl/incremental")
12255 (synopsis "Library for versioning Python projects")
12256 (description "Incremental is a small library that versions your Python
12258 (license license:expat)))
12260 (define-public python2-incremental
12261 (package-with-python2 python-incremental))
12263 (define-public python-invoke
12265 (name "python-invoke")
12266 (home-page "http://www.pyinvoke.org/")
12270 (uri (pypi-uri "invoke" version))
12273 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12274 (build-system python-build-system)
12276 ;; XXX: Requires many dependencies that are not yet in Guix.
12278 (synopsis "Pythonic task execution")
12280 "Invoke is a Python task execution tool and library, drawing inspiration
12281 from various sources to arrive at a powerful and clean feature set. It is
12282 evolved from the Fabric project, but focuses on local and abstract concerns
12283 instead of servers and network commands.")
12284 (license license:bsd-3)))
12286 (define-public python2-invoke
12287 (package-with-python2 python-invoke))
12289 (define-public python-automat
12291 (name "python-automat")
12295 (uri (pypi-uri "Automat" version))
12298 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12299 (build-system python-build-system)
12300 ;; We disable the tests because they require python-twisted, while
12301 ;; python-twisted depends on python-automat. Twisted is optional, but the
12302 ;; tests fail if it is not available. Also see
12303 ;; <https://github.com/glyph/automat/issues/71>.
12304 (arguments '(#:tests? #f))
12306 `(("python-m2r" ,python-m2r)
12307 ("python-setuptools-scm" ,python-setuptools-scm)
12308 ("python-graphviz" ,python-graphviz)))
12310 `(("python-six" ,python-six)
12311 ("python-attrs" ,python-attrs)))
12312 (home-page "https://github.com/glyph/Automat")
12313 (synopsis "Self-service finite-state machines")
12314 (description "Automat is a library for concise, idiomatic Python
12315 expression of finite-state automata (particularly deterministic finite-state
12317 (license license:expat)))
12319 (define-public python2-automat
12320 (package-with-python2 python-automat))
12322 (define-public python-m2r
12324 (name "python-m2r")
12328 (uri (pypi-uri "m2r" version))
12331 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12332 (build-system python-build-system)
12334 `(("python-docutils" ,python-docutils)
12335 ("python-mistune" ,python-mistune)))
12337 `(("python-pygments" ,python-pygments)
12338 ("python-mock" ,python-mock)))
12339 (home-page "https://github.com/miyakogi/m2r")
12340 (synopsis "Markdown to reStructuredText converter")
12341 (description "M2R converts a markdown file including reST markups to valid
12343 (license license:expat)))
12345 (define-public python2-m2r
12346 (package-with-python2 python-m2r))
12348 (define-public python-constantly
12350 (name "python-constantly")
12354 (uri (pypi-uri "constantly" version))
12357 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12358 (build-system python-build-system)
12359 (home-page "https://github.com/twisted/constantly")
12360 (synopsis "Symbolic constants in Python")
12361 (description "Constantly is a Python library that provides symbolic
12362 constant support. It includes collections and constants with text, numeric,
12363 and bit flag values.")
12364 (license license:expat)))
12366 (define-public python2-constantly
12367 (package-with-python2 python-constantly))
12369 (define-public python-attrs
12371 (name "python-attrs")
12375 (uri (pypi-uri "attrs" version))
12378 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12379 (build-system python-build-system)
12381 `(#:modules ((guix build utils)
12382 (guix build python-build-system)
12386 #:phases (modify-phases %standard-phases
12389 (let ((cwd (getcwd)))
12390 (setenv "PYTHONPATH"
12393 (find (cut string-prefix? "lib" <>)
12394 (scandir (string-append cwd "/build")))
12396 (getenv "PYTHONPATH")))
12397 (invoke "python" "-m" "pytest")))))))
12399 `(("python-coverage" ,python-coverage)
12400 ("python-hypothesis" ,python-hypothesis)
12401 ("python-pympler" ,python-pympler)
12402 ("python-pytest" ,python-pytest)
12403 ("python-six" ,python-six)
12404 ("python-sphinx" ,python-sphinx)
12405 ("python-zope-interface" ,python-zope-interface)))
12406 (home-page "https://github.com/python-attrs/attrs/")
12407 (synopsis "Attributes without boilerplate")
12408 (description "@code{attrs} is a Python package with class decorators that
12409 ease the chores of implementing the most common attribute-related object
12411 (license license:expat)))
12413 (define-public python2-attrs
12414 (package-with-python2 python-attrs))
12416 (define-public python-attrs-bootstrap
12418 (inherit python-attrs)
12419 (name "python-attrs-bootstrap")
12420 (native-inputs `())
12421 (arguments `(#:tests? #f))))
12423 (define-public python2-attrs-bootstrap
12424 (package-with-python2 python-attrs-bootstrap))
12426 (define-public python2-cliapp
12428 (name "python2-cliapp")
12429 (version "1.20180812.1")
12433 (uri (string-append
12434 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12435 version ".tar.gz"))
12438 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12439 (build-system python-build-system)
12441 `(#:python ,python-2
12443 (modify-phases %standard-phases
12444 ;; check phase needs to be run before the build phase. If not,
12445 ;; coverage-test-runner looks for tests for the built source files,
12448 (add-before 'build 'check
12450 ;; Disable python3 tests
12451 (substitute* "check"
12452 (("python3") "# python3"))
12453 (invoke "./check"))))))
12455 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12456 ("python2-pep8" ,python2-pep8)))
12458 `(("python2-pyaml" ,python2-pyaml)))
12459 (home-page "https://liw.fi/cliapp/")
12460 (synopsis "Python framework for command line programs")
12461 (description "@code{python2-cliapp} is a python framework for
12462 command line programs. It contains the typical stuff such programs
12463 need to do, such as parsing the command line for options, and
12464 iterating over input files.")
12465 (license license:gpl2+)))
12467 (define-public python2-ttystatus
12469 (name "python2-ttystatus")
12474 (uri (string-append
12475 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12476 version ".tar.gz"))
12479 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12480 (build-system python-build-system)
12482 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12483 ("python2-pep8" ,python2-pep8)))
12485 `(#:python ,python-2
12487 (modify-phases %standard-phases
12488 ;; check phase needs to be run before the build phase. If not,
12489 ;; coverage-test-runner looks for tests for the built source files,
12492 (add-before 'build 'check
12493 (lambda _ (invoke "make" "check"))))))
12494 (home-page "https://liw.fi/ttystatus/")
12495 (synopsis "Python library for showing progress reporting and
12496 status updates on terminals")
12497 (description "@code{python2-ttystatus} is a python library for
12498 showing progress reporting and status updates on terminals, for
12499 command line programs. Output is automatically adapted to the width
12500 of the terminal: truncated if it does not fit, and resized if the
12501 terminal size changes.")
12502 (license license:gpl3+)))
12504 (define-public python2-tracing
12506 (name "python2-tracing")
12511 (uri (string-append
12512 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12513 version ".tar.gz"))
12516 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12517 (build-system python-build-system)
12519 `(#:python ,python-2))
12520 (home-page "https://liw.fi/tracing/")
12521 (synopsis "Python debug logging helper")
12522 (description "@code{python2-tracing} is a python library for
12523 logging debug messages. It provides a way to turn debugging messages
12524 on and off, based on the filename they occur in. It is much faster
12525 than using @code{logging.Filter} to accomplish the same thing, which
12526 matters when code is run in production mode. The actual logging still
12527 happens using the @code{logging} library.")
12528 (license license:gpl3+)))
12530 (define-public python2-larch
12532 (name "python2-larch")
12533 (version "1.20151025")
12537 (uri (string-append
12538 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12539 version ".tar.gz"))
12540 (patches (search-patches
12541 "python2-larch-coverage-4.0a6-compatibility.patch"))
12544 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12545 (build-system python-build-system)
12547 `(#:python ,python-2
12549 (modify-phases %standard-phases
12550 ;; check phase needs to be run before the build phase. If not,
12551 ;; coverage-test-runner looks for tests for the built source files,
12554 (add-before 'build 'check
12555 (lambda _ (invoke "make" "check"))))))
12557 `(("cmdtest" ,cmdtest)
12558 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12560 `(("python2-tracing" ,python2-tracing)))
12561 (home-page "https://liw.fi/larch/")
12562 (synopsis "Python copy-on-write B-tree library")
12563 (description "@code{python2-larch} is an implementation of
12564 particular kind of B-tree, based on research by Ohad Rodeh. See
12565 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12566 on the data structure.
12568 The distinctive feature of this B-tree is that a node is never
12569 (conceptually) modified. Instead, all updates are done by
12570 copy-on-write. This makes it easy to clone a tree, and modify only the
12571 clone, while other processes access the original tree.")
12572 (license license:gpl3+)))
12574 (define-public python-astroid
12576 (name "python-astroid")
12581 (uri (pypi-uri "astroid" version))
12583 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12584 (build-system python-build-system)
12586 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12587 ("python-six" ,python-six)
12588 ("python-typed-ast" ,python-typed-ast)
12589 ("python-wrapt" ,python-wrapt)))
12591 `(("python-dateutil" ,python-dateutil)
12592 ("python-nose" ,python-nose)
12593 ("python-pytest" ,python-pytest)
12594 ("python-pytest-runner" ,python-pytest-runner)))
12597 (modify-phases %standard-phases
12598 (add-after 'unpack 'remove-spurious-test
12600 ;; This can be removed after upgrading from python-3.7
12601 ;; https://github.com/PyCQA/astroid/issues/593
12602 ;; https://bugs.python.org/issue34056
12603 (delete-file "astroid/tests/unittest_modutils.py")
12607 (invoke "pytest" "astroid"))))))
12608 (home-page "https://github.com/PyCQA/astroid")
12609 (synopsis "Common base representation of python source code for pylint and
12611 (description "@code{python-astroid} provides a common base representation
12612 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12614 It provides a compatible representation which comes from the _ast module. It
12615 rebuilds the tree generated by the builtin _ast module by recursively walking
12616 down the AST and building an extended ast. The new node classes have
12617 additional methods and attributes for different usages. They include some
12618 support for static inference and local name scopes. Furthermore, astroid
12619 builds partial trees by inspecting living objects.")
12620 (license license:lgpl2.1+)
12621 (properties `((python2-variant . ,(delay python2-astroid))))))
12623 (define-public python2-astroid
12624 (let ((base (package-with-python2
12625 (strip-python2-variant python-astroid))))
12626 (package (inherit base)
12627 ;; Version 2.x removes python2 support.
12632 (uri (pypi-uri "astroid" version))
12635 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12637 (substitute-keyword-arguments (package-arguments base)
12639 `(modify-phases ,phases
12640 (add-after 'unpack 'remove-spurious-test
12642 ;; https://github.com/PyCQA/astroid/issues/276
12643 (delete-file "astroid/tests/unittest_brain.py")
12647 (invoke"python" "-m" "unittest" "discover"
12648 "-p" "unittest*.py")))))))
12649 (native-inputs `())
12651 `(("python2-backports-functools-lru-cache"
12652 ,python2-backports-functools-lru-cache)
12653 ("python2-enum34" ,python2-enum34)
12654 ("python2-singledispatch" ,python2-singledispatch)
12655 ,@(alist-delete "python-typed-ast"
12656 (package-propagated-inputs base)))))))
12658 (define-public python-isort
12660 (name "python-isort")
12665 (uri (git-reference
12666 ;; Tests pass only from the Github sources
12667 (url "https://github.com/timothycrosley/isort")
12669 (file-name (git-file-name name version))
12672 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12673 (build-system python-build-system)
12675 `(("python-mock" ,python-mock)
12676 ("python-pytest" ,python-pytest)))
12677 (home-page "https://github.com/timothycrosley/isort")
12678 (synopsis "Python utility/library to sort python imports")
12679 (description "@code{python-isort} is a python utility/library to sort
12680 imports alphabetically, and automatically separated into sections. It
12681 provides a command line utility, a python library and plugins for various
12683 (license license:expat)
12684 (properties `((python2-variant . ,(delay python2-isort))))))
12686 (define-public python2-isort
12687 (let ((base (package-with-python2
12688 (strip-python2-variant python-isort))))
12689 (package (inherit base)
12691 `(("python2-futures" ,python2-futures)
12692 ,@(package-native-inputs base))))))
12694 (define-public python2-backports-functools-lru-cache
12696 (name "python2-backports-functools-lru-cache")
12701 ;; only the pypi tarballs contain the necessary metadata
12702 (uri (pypi-uri "backports.functools_lru_cache" version))
12705 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12706 (build-system python-build-system)
12708 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12710 `(#:python ,python-2))
12711 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12712 (synopsis "Backport of functools.lru_cache from Python 3.3")
12713 (description "@code{python2-backports-functools-lru-cache} is a backport
12714 of @code{functools.lru_cache} from python 3.3.")
12715 (license license:expat)))
12717 (define-public python-configparser
12719 (name "python-configparser")
12724 (uri (pypi-uri "configparser" version))
12727 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12728 (build-system python-build-system)
12729 (home-page "https://github.com/jaraco/configparser/")
12730 (synopsis "Backport of configparser from python 3.5")
12731 (description "@code{python-configparser} is a backport of
12732 @code{configparser} from Python 3.5 so that it can be used directly
12733 in other versions.")
12734 (license license:expat)))
12736 (define-public python2-configparser
12737 (package-with-python2 python-configparser))
12739 (define-public python-mando
12741 (name "python-mando")
12745 (uri (pypi-uri "mando" version))
12748 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12749 (build-system python-build-system)
12751 `(("python-rst2ansi" ,python-rst2ansi)
12752 ("python-six" ,python-six)))
12754 `(("python-pytest" ,python-pytest)))
12755 (home-page "https://mando.readthedocs.org/")
12757 "Wrapper around argparse, allowing creation of complete CLI applications")
12759 "This package is a wrapper around argparse, allowing you to write complete CLI
12760 applications in seconds while maintaining all the flexibility.")
12761 (license license:expat)))
12763 (define-public python2-mando
12764 (package-with-python2 python-mando))
12766 (define-public python2-argparse
12768 (name "python2-argparse")
12773 (uri (pypi-uri "argparse" version))
12776 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12777 (build-system python-build-system)
12779 `(#:python ,python-2))
12780 (home-page "https://github.com/ThomasWaldmann/argparse/")
12781 (synopsis "Python command-line parsing library")
12783 "This package is mostly for people who want to have @code{argparse} on
12784 older Pythons because it was not part of the standard library back then.")
12785 (license license:psfl)))
12787 (define-public python-fudge
12789 (name "python-fudge")
12790 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12791 ;; package, which is currently the only use of this package.
12796 (uri (pypi-uri "fudge" version))
12799 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12800 (build-system python-build-system)
12802 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12803 (home-page "https://github.com/fudge-py/fudge")
12804 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12806 "Fudge is a Python module for using fake objects (mocks and stubs) to
12809 In readable Python code, you declare the methods available on your fake object
12810 and how they should be called. Then you inject that into your application and
12811 start testing. This declarative approach means you don’t have to record and
12812 playback actions and you don’t have to inspect your fakes after running code.
12813 If the fake object was used incorrectly then you’ll see an informative
12814 exception message with a traceback that points to the culprit.")
12815 (license license:expat)))
12817 (define-public python2-fudge
12818 (package-with-python2 python-fudge))
12820 (define-public python-mwclient
12822 (name "python-mwclient")
12827 ;; The PyPI version wouldn't contain tests.
12828 (uri (git-reference
12829 (url "https://github.com/mwclient/mwclient")
12830 (commit (string-append "v" version))))
12831 (file-name (git-file-name name version))
12834 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12835 (build-system python-build-system)
12837 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12838 ("python-six" ,python-six)))
12840 `(("python-mock" ,python-mock)
12841 ("python-pytest" ,python-pytest)
12842 ("python-pytest-cov" ,python-pytest-cov)
12843 ("python-pytest-runner" ,python-pytest-runner)
12844 ("python-responses" ,python-responses)))
12845 (home-page "https://github.com/btongminh/mwclient")
12846 (synopsis "MediaWiki API client")
12847 (description "This package provides a MediaWiki API client.")
12848 (license license:expat)))
12850 (define-public python2-mwclient
12851 (package-with-python2 python-mwclient))
12853 (define-public python-utils
12855 (name "python-utils")
12859 (uri (pypi-uri "python-utils" version))
12862 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12863 (build-system python-build-system)
12865 `(("pytest-runner" ,python-pytest-runner)
12866 ("pytest" ,python-pytest)
12867 ("six" ,python-six)))
12868 (home-page "https://github.com/WoLpH/python-utils")
12869 (synopsis "Convenient utilities not included with the standard Python install")
12871 "Python Utils is a collection of small Python functions and classes which
12872 make common patterns shorter and easier.")
12873 (license license:bsd-2)))
12875 (define-public python2-utils
12876 (package-with-python2 python-utils))
12878 (define-public python-diff-match-patch
12880 (name "python-diff-match-patch")
12881 (version "20121119")
12885 (uri (pypi-uri "diff-match-patch" version))
12888 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12889 (build-system python-build-system)
12890 (home-page "https://code.google.com/p/google-diff-match-patch")
12891 (synopsis "Synchronize plain text")
12892 (description "Diff Match and Patch libraries offer robust algorithms to
12893 perform the operations required for synchronizing plain text.")
12894 (license license:asl2.0)))
12896 (define-public python2-diff-match-patch
12897 (package-with-python2 python-diff-match-patch))
12899 (define-public python-dirsync
12901 (name "python-dirsync")
12906 (uri (pypi-uri "dirsync" version))
12909 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12910 (build-system python-build-system)
12912 `(("six" ,python-six)))
12913 (home-page "https://bitbucket.org/tkhyn/dirsync")
12914 (synopsis "Advanced directory tree synchronisation tool")
12915 (description "Advanced directory tree synchronisation tool.")
12916 (license license:expat)))
12918 (define-public python2-dirsync
12919 (package-with-python2 python-dirsync))
12921 (define-public python-levenshtein
12923 (name "python-levenshtein")
12928 (uri (pypi-uri "python-Levenshtein" version))
12931 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12932 (build-system python-build-system)
12933 (home-page "https://github.com/ztane/python-Levenshtein")
12934 (synopsis "Fast computation of Levenshtein distance and string similarity")
12936 "The Levenshtein Python C extension module contains functions for fast computation of
12938 @item Levenshtein (edit) distance, and edit operations
12939 @item string similarity
12940 @item approximate median strings, and generally string averaging
12941 @item string sequence and set similarity
12943 It supports both normal and Unicode strings.")
12944 (license license:gpl2+)))
12946 (define-public python2-levenshtein
12947 (package-with-python2 python-levenshtein))
12949 (define-public python-scandir
12951 (name "python-scandir")
12956 (uri (pypi-uri "scandir" version))
12958 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12959 (build-system python-build-system)
12961 `(#:phases (modify-phases %standard-phases
12964 (invoke "python" "test/run_tests.py"))))))
12965 (home-page "https://github.com/benhoyt/scandir")
12966 (synopsis "Directory iteration function")
12968 "Directory iteration function like os.listdir(), except that instead of
12969 returning a list of bare filenames, it yields DirEntry objects that include
12970 file type and stat information along with the name. Using scandir() increases
12971 the speed of os.walk() by 2-20 times (depending on the platform and file
12972 system) by avoiding unnecessary calls to os.stat() in most cases.
12974 This package is part of the Python standard library since version 3.5.")
12975 (license license:bsd-3)))
12977 (define-public python2-scandir
12978 (package-with-python2 python-scandir))
12980 (define-public python2-stemming
12982 (name "python2-stemming")
12987 (uri (pypi-uri "stemming" version))
12989 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12990 (build-system python-build-system)
12992 `(#:python ,python-2))
12993 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12994 (synopsis "Python implementations of various stemming algorithms")
12996 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12997 stemming algorithms for English. These implementations are straightforward and
12998 efficient, unlike some Python versions of the same algorithms available on the
12999 Web. This package is an extraction of the stemming code included in the Whoosh
13001 (license license:public-domain)))
13003 (define-public python-factory-boy
13005 (name "python-factory-boy")
13010 (uri (pypi-uri "factory_boy" version))
13012 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13013 (build-system python-build-system)
13015 ;; Tests are not included in the tarball.
13018 `(("faker" ,python-faker)))
13019 (home-page "https://github.com/benhoyt/scandir")
13020 (synopsis "Versatile test fixtures replacement")
13022 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13024 As a fixtures replacement tool, it aims to replace static, hard to maintain
13025 fixtures with easy-to-use factories for complex object.
13027 Instead of building an exhaustive test setup with every possible combination
13028 of corner cases, factory_boy allows you to use objects customized for the
13029 current test, while only declaring the test-specific fields")
13030 (license license:expat)))
13032 (define-public python2-factory-boy
13033 (package-with-python2 python-factory-boy))
13035 (define-public python-translate-toolkit
13037 (name "python-translate-toolkit")
13042 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13044 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13045 (build-system python-build-system)
13047 `(("python-pytest" ,python-pytest)
13048 ("python-sphinx" ,python-sphinx)))
13050 `(("python-babel" ,python-babel)
13051 ("python-beautifulsoup4" ,python-beautifulsoup4)
13052 ("python-chardet" ,python-chardet)
13053 ("python-diff-match-patch" ,python-diff-match-patch)
13054 ("python-levenshtein" ,python-levenshtein)
13055 ("python-lxml" ,python-lxml)
13056 ("python-six" ,python-six)
13057 ("python-vobject" ,python-vobject)
13058 ("python-pyyaml" ,python-pyyaml)))
13060 ;; TODO: tests are not run, because they end with
13061 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13063 ;; during test setup.
13065 (home-page "https://toolkit.translatehouse.org")
13066 (synopsis "Tools and API for translation and localization engineering")
13068 "Tools and API for translation and localization engineering. It contains
13069 several utilities, as well as an API for building localization tools.")
13070 (license license:gpl2+)))
13072 (define-public python2-translate-toolkit
13073 (package-with-python2 python-translate-toolkit))
13075 (define-public python-packaging
13077 (name "python-packaging")
13082 (uri (pypi-uri "packaging" version))
13085 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13086 (build-system python-build-system)
13088 `(#:phases (modify-phases %standard-phases
13090 (lambda _ (invoke "py.test" "-vv"))))))
13092 `(("python-pretend" ,python-pretend)
13093 ("python-pytest" ,python-pytest)))
13095 `(("python-pyparsing" ,python-pyparsing)
13096 ("python-six" ,python-six)))
13097 (home-page "https://github.com/pypa/packaging")
13098 (synopsis "Core utilities for Python packages")
13099 (description "Packaging is a Python module for dealing with Python packages.
13100 It offers an interface for working with package versions, names, and dependency
13102 ;; From 'LICENSE': This software is made available under the terms of
13103 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13104 ;; Contributions to this software is made under the terms of *both* these
13106 (license (list license:asl2.0 license:bsd-2))))
13108 (define-public python2-packaging
13109 (package-with-python2 python-packaging))
13111 (define-public python-relatorio
13113 (name "python-relatorio")
13118 (uri (pypi-uri "relatorio" version))
13121 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13122 (build-system python-build-system)
13124 `(("python-lxml" ,python-lxml)
13125 ("python-genshi" ,python-genshi)))
13127 `(("python-magic" ,python-magic)))
13128 (home-page "https://relatorio.tryton.org/")
13129 (synopsis "Templating library able to output ODT and PDF files")
13130 (description "Relatorio is a templating library which provides a way to
13131 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13132 for more filetypes can be easily added by creating plugins for them.")
13133 (license license:gpl3+)))
13135 (define-public python2-relatorio
13136 (package-with-python2 python-relatorio))
13138 (define-public python-radon
13140 (name "python-radon")
13145 (uri (pypi-uri "radon" version))
13148 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13149 (build-system python-build-system)
13151 `(#:phases (modify-phases %standard-phases
13154 (invoke "python" "radon/tests/run.py"))))))
13156 `(("python-colorama" ,python-colorama)
13157 ("python-flake8-polyfill" ,python-flake8-polyfill)
13158 ("python-mando" ,python-mando)))
13160 `(("python-pytest" ,python-pytest)
13161 ("python-pytest-mock" ,python-pytest-mock)))
13162 (home-page "https://radon.readthedocs.org/")
13163 (synopsis "Code Metrics in Python")
13164 (description "Radon is a Python tool which computes various code metrics.
13165 Supported metrics are:
13167 @item raw metrics: SLOC, comment lines, blank lines, &c.
13168 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13169 @item Halstead metrics (all of them)
13170 @item the Maintainability Index (a Visual Studio metric)
13172 (license license:expat)))
13174 (define-public python2-radon
13175 (package-with-python2 python-radon))
13177 (define-public python-sure
13179 (name "python-sure")
13184 (uri (pypi-uri "sure" version))
13187 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13188 (build-system python-build-system)
13190 `(("python-mock" ,python-mock)
13191 ("python-six" ,python-six)))
13193 `(("python-nose" ,python-nose)))
13194 (home-page "https://github.com/gabrielfalcao/sure")
13195 (synopsis "Automated testing library in python for python")
13197 "Sure is a python library that leverages a DSL for writing assertions.
13198 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13199 (license license:gpl3+)))
13201 (define-public python2-sure
13202 (package-with-python2 python-sure))
13204 (define-public python2-couleur
13205 ;; This package does not seem to support python3 at all, hence,
13206 ;; only the python2 variant definition is provided.
13208 (name "python2-couleur")
13213 (uri (pypi-uri "couleur" version))
13216 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13217 (build-system python-build-system)
13219 `(#:python ,python-2))
13220 (home-page "https://github.com/gabrielfalcao/couleur")
13222 "ANSI terminal tool for python, colored shell and other handy fancy features")
13224 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13225 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13226 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13227 ;; https://github.com/gabrielfalcao/couleur/issues/11
13228 (license license:lgpl3+)))
13230 (define-public python-misaka
13232 (name "python-misaka")
13237 (uri (pypi-uri "misaka" version))
13240 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13241 (build-system python-build-system)
13243 `(;; Line 37 of setup.py calls self.run_command('develop')
13244 ;; in the 'check' phase. This command seems to be trying
13246 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13247 ;; for which it does not have the permission to write.
13250 `(("python-cffi" ,python-cffi)))
13251 (home-page "https://github.com/FSX/misaka")
13252 (synopsis "Python binding for Hoedown")
13254 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13255 library written in C. It features a fast HTML renderer and functionality to make custom
13256 renderers (e.g. man pages or LaTeX).")
13257 (license license:expat)))
13259 (define-public python2-misaka
13260 (package-with-python2 python-misaka))
13262 (define-public python2-steadymark
13263 ;; This is forced into being a python2 only variant
13264 ;; due to its dependence on couleur that has no support
13267 (name "python2-steadymark")
13272 (uri (pypi-uri "steadymark" version))
13275 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13276 (build-system python-build-system)
13278 `(("python-couleur" ,python2-couleur)
13279 ("python-sure" ,python2-sure)
13280 ("python-misaka" ,python2-misaka)))
13282 `(#:python ,python-2
13284 (modify-phases %standard-phases
13285 (add-before 'build 'patch-setup-py
13287 ;; Update requirements from dependency==version
13288 ;; to dependency>=version
13289 (substitute* "setup.py"
13292 (home-page "https://github.com/gabrielfalcao/steadymark")
13293 (synopsis "Markdown-based test runner for python")
13295 "@code{Steadymark} allows documentation to be written in github-flavoured
13296 markdown. The documentation may contain snippets of code surrounded by python
13297 code blocks and @code{Steadymark} will find these snippets and run them, making
13298 sure that there are no old malfunctional examples in the documentation examples.")
13299 (license license:expat)))
13301 (define-public python-jsonpointer
13303 (name "python-jsonpointer")
13308 (uri (pypi-uri "jsonpointer" version))
13311 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13312 (build-system python-build-system)
13313 (home-page "https://github.com/stefankoegl/python-json-pointer")
13314 (synopsis "Identify specific nodes in a JSON document")
13315 (description "@code{jsonpointer} allows you to access specific nodes
13316 by path in a JSON document (see RFC 6901).")
13317 (license license:bsd-3)))
13319 (define-public python2-jsonpointer
13320 (package-with-python2 python-jsonpointer))
13322 (define-public python-jsonpatch
13324 (name "python-jsonpatch")
13329 ;; pypi version lacks tests.js
13330 (uri (git-reference
13331 (url "https://github.com/stefankoegl/python-json-patch")
13332 (commit (string-append "v" version))))
13333 (file-name (git-file-name name version))
13336 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13337 (build-system python-build-system)
13339 `(("python-jsonpointer" ,python-jsonpointer)))
13340 (home-page "https://github.com/stefankoegl/python-json-patch")
13341 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13342 (description "@code{jsonpatch} is a library and program that allows
13343 applying JSON Patches according to RFC 6902.")
13344 (license license:bsd-3)))
13346 (define-public python2-jsonpatch
13347 (package-with-python2 python-jsonpatch))
13349 (define-public python-jsonpatch-0.4
13350 (package (inherit python-jsonpatch)
13351 (name "python-jsonpatch")
13356 (uri (git-reference
13357 (url "https://github.com/stefankoegl/python-json-patch")
13358 (commit (string-append "v" version))))
13359 (file-name (git-file-name name version))
13362 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13364 (define-public python2-jsonpatch-0.4
13365 (package-with-python2 python-jsonpatch-0.4))
13367 (define-public python-rfc3986
13369 (name "python-rfc3986")
13373 (uri (pypi-uri "rfc3986" version))
13376 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13377 (build-system python-build-system)
13379 `(#:modules ((guix build utils)
13380 (guix build python-build-system)
13385 (modify-phases %standard-phases
13388 (let ((cwd (getcwd)))
13389 (setenv "PYTHONPATH"
13390 (string-append cwd "/build/"
13391 (find (cut string-prefix? "lib" <>)
13392 (scandir (string-append cwd "/build")))
13394 (getenv "PYTHONPATH")))
13395 (invoke "pytest" "-v")))))))
13397 `(("python-pytest" ,python-pytest)))
13398 (home-page "https://rfc3986.readthedocs.io/")
13399 (synopsis "Parse and validate URI references")
13401 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13402 validation and authority parsing. This module also supports RFC@tie{}6874
13403 which adds support for zone identifiers to IPv6 addresses.")
13404 (license license:asl2.0)))
13406 (define-public python2-rfc3986
13407 (package-with-python2 python-rfc3986))
13409 (define-public python-rfc3987
13411 (name "python-rfc3987")
13416 (uri (pypi-uri "rfc3987" version))
13419 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13420 (build-system python-build-system)
13421 (home-page "https://pypi.python.org/pypi/rfc3987")
13422 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13423 (description "@code{rfc3987} provides routines for parsing and
13424 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13425 (license license:gpl3+)))
13427 (define-public python2-rfc3987
13428 (package-with-python2 python-rfc3987))
13430 (define-public python-validate-email
13432 (name "python-validate-email")
13437 (uri (pypi-uri "validate_email" version))
13440 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13441 (build-system python-build-system)
13442 (home-page "https://github.com/syrusakbary/validate_email")
13443 (synopsis "Verifies if an email address is valid and really exists")
13444 (description "@code{validate_email} can be used to verify if an email
13445 address is valid and really exists.")
13446 (license license:lgpl3+)))
13448 (define-public python2-validate-email
13449 (package-with-python2 python-validate-email))
13451 (define-public python-flex
13453 (name "python-flex")
13458 (uri (pypi-uri "flex" version))
13461 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13462 (build-system python-build-system)
13464 `(("python-click" ,python-click)
13465 ("python-iso8601" ,python-iso8601)
13466 ("python-jsonpointer" ,python-jsonpointer)
13467 ("python-pyyaml" ,python-pyyaml)
13468 ("python-requests" ,python-requests)
13469 ("python-rfc3987" ,python-rfc3987)
13470 ("python-six" ,python-six)
13471 ("python-validate-email" ,python-validate-email)))
13472 (home-page "https://github.com/pipermerriam/flex")
13473 (synopsis "Validates Swagger schemata")
13474 (description "@code{flex} can be used to validate Swagger schemata.")
13475 (license license:bsd-3)))
13477 (define-public python2-flex
13478 (package-with-python2 python-flex))
13480 (define-public python-marshmallow
13482 (name "python-marshmallow")
13483 (version "3.0.0b14")
13487 (uri (pypi-uri "marshmallow" version))
13490 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13491 (build-system python-build-system)
13493 `(("python-dateutil" ,python-dateutil)
13494 ("python-simplejson" ,python-simplejson)))
13496 `(("python-pytest" ,python-pytest)
13497 ("python-pytz" ,python-pytz)))
13498 (home-page "https://github.com/marshmallow-code/marshmallow")
13499 (synopsis "Convert complex datatypes to and from native
13500 Python datatypes.")
13501 (description "@code{marshmallow} provides a library for converting
13502 complex datatypes to and from native Python datatypes.")
13503 (license license:expat)))
13505 (define-public python2-marshmallow
13506 (package-with-python2 python-marshmallow))
13508 (define-public python-apispec
13510 (name "python-apispec")
13515 (uri (pypi-uri "apispec" version))
13518 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13519 (build-system python-build-system)
13521 `(("python-pyyaml" ,python-pyyaml)))
13523 `(("python-pytest" ,python-pytest)
13524 ("python-flask" ,python-flask)
13525 ("python-marshmallow" ,python-marshmallow)
13526 ("python-tornado" ,python-tornado)
13527 ("python-bottle" ,python-bottle)
13528 ("python-mock" ,python-mock)))
13529 (home-page "https://github.com/marshmallow-code/apispec")
13530 (synopsis "Swagger 2.0 API specification generator")
13531 (description "@code{python-apispec} is a pluggable API specification
13532 generator. Currently supports the OpenAPI specification (f.k.a.
13534 (license license:expat)))
13536 (define-public python2-apispec
13537 (package-with-python2 python-apispec))
13539 (define-public python-flasgger
13541 (name "python-flasgger")
13546 (uri (git-reference
13547 (url "https://github.com/rochacbruno/flasgger.git")
13549 (file-name (git-file-name name version))
13551 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13552 (build-system python-build-system)
13555 (modify-phases %standard-phases
13557 (lambda* (#:key inputs outputs #:allow-other-keys)
13558 (substitute* "Makefile"
13559 (("flake8 flasgger --ignore=F403")
13560 "flake8 flasgger --ignore=E731,F403"))
13561 (setenv "PYTHONPATH" (string-append (getcwd)
13563 (getenv "PYTHONPATH")))
13564 (invoke "py.test"))))))
13566 `(("python-flask" ,python-flask)
13567 ("python-pyyaml" ,python-pyyaml)
13568 ("python-jsonschema" ,python-jsonschema)
13569 ("python-mistune" ,python-mistune)
13570 ("python-six" ,python-six)))
13572 `(("python-decorator" ,python-decorator)
13573 ("python-flake8" ,python-flake8)
13574 ("python-flask-restful" ,python-flask-restful)
13575 ("python-flex" ,python-flex)
13576 ("python-pytest" ,python-pytest)
13577 ("python-pytest-cov" ,python-pytest-cov)
13578 ("python-marshmallow" ,python-marshmallow)
13579 ("python-apispec" ,python-apispec)))
13580 (home-page "https://github.com/rochacbruno/flasgger/")
13581 (synopsis "Extract Swagger specs from your Flask project")
13582 (description "@code{python-flasgger} allows extracting Swagger specs
13583 from your Flask project. It is a fork of Flask-Swagger.")
13584 (license license:expat)))
13586 (define-public python2-flasgger
13587 (package-with-python2 python-flasgger))
13589 (define-public python-swagger-spec-validator
13591 (name "python-swagger-spec-validator")
13596 (uri (pypi-uri "swagger-spec-validator" version))
13599 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13600 (build-system python-build-system)
13602 `(("python-jsonschema" ,python-jsonschema)
13603 ("python-pyyaml" ,python-pyyaml)
13604 ("python-six" ,python-six)))
13606 "https://github.com/Yelp/swagger_spec_validator")
13607 (synopsis "Validation of Swagger specifications")
13608 (description "@code{swagger_spec_validator} provides a library for
13609 validating Swagger API specifications.")
13610 (license license:asl2.0)))
13612 (define-public python2-swagger-spec-validator
13613 (package-with-python2 python-swagger-spec-validator))
13615 (define-public python-apache-libcloud
13617 (name "python-apache-libcloud")
13622 (uri (pypi-uri "apache-libcloud" version))
13625 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13626 (build-system python-build-system)
13629 (modify-phases %standard-phases
13630 (add-after 'unpack 'patch-ssh
13631 (lambda* (#:key inputs #:allow-other-keys)
13632 (substitute* "libcloud/compute/ssh.py"
13633 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13636 (add-after 'unpack 'patch-tests
13638 (substitute* "./libcloud/test/test_file_fixtures.py"
13639 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13640 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13641 return (httplib.OK,
13643 {\"test\": \"value\"},
13644 httplib.responses[httplib.OK])
13646 (substitute* "libcloud/test/compute/test_ssh_client.py"
13647 (("class ShellOutSSHClientTests")
13648 "@unittest.skip(\"Guix container doesn't have ssh service\")
13649 class ShellOutSSHClientTests")
13650 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13651 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13652 (("'.xF0', '.x90', '.x8D', '.x88'")
13653 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13655 (add-before 'check 'copy-secret
13657 (copy-file "libcloud/test/secrets.py-dist"
13658 "libcloud/test/secrets.py")
13661 `(("openssh" ,openssh)))
13663 `(("python-paramiko" ,python-paramiko)
13664 ("python-requests" ,python-requests)))
13666 `(("python-lockfile" ,python-lockfile)
13667 ("python-mock" ,python-mock)
13668 ("python-pytest" ,python-pytest)
13669 ("python-pytest-runner" ,python-pytest-runner)
13670 ("python-requests-mock" ,python-requests-mock)))
13671 (home-page "https://libcloud.apache.org/")
13672 (synopsis "Unified Cloud API")
13673 (description "@code{libcloud} is a Python library for interacting with
13674 many of the popular cloud service providers using a unified API.")
13675 (license license:asl2.0)))
13677 (define-public python2-apache-libcloud
13678 (package-with-python2 python-apache-libcloud))
13680 (define-public python-smmap2
13682 (name "python-smmap2")
13687 (uri (pypi-uri "smmap2" version))
13689 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13690 (build-system python-build-system)
13692 `(("python-nosexcover" ,python-nosexcover)))
13693 (home-page "https://github.com/Byron/smmap")
13694 (synopsis "Python sliding window memory map manager")
13695 (description "@code{smmap2} is a pure Python implementation of a sliding
13696 window memory map manager.")
13697 (license license:bsd-3)))
13699 (define-public python2-smmap2
13700 (package-with-python2 python-smmap2))
13702 (define-public python-regex
13704 (name "python-regex")
13705 (version "2019.04.14")
13708 (uri (pypi-uri "regex" version))
13711 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13712 ;; TODO: Fix and enable regex_test.py tests that complain about the
13713 ;; test.support module not existing.
13714 (build-system python-build-system)
13715 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13716 (synopsis "Alternative regular expression module")
13717 (description "This regular expression implementation is backwards-
13718 compatible with the standard @code{re} module, but offers additional
13719 functionality like full case-folding for case-insensitive matches in Unicode.")
13720 (license license:psfl)))
13722 (define-public python2-regex
13723 (package-with-python2 python-regex))
13725 (define-public python2-pyopengl
13727 (name "python2-pyopengl")
13732 (uri (pypi-uri "PyOpenGL" version))
13735 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13737 `(#:python ,python-2))
13738 (build-system python-build-system)
13739 (home-page "http://pyopengl.sourceforge.net")
13740 (synopsis "Standard OpenGL bindings for Python")
13742 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13743 related APIs. The binding is created using the standard @code{ctypes}
13745 (license license:bsd-3)))
13747 (define-public python2-pyopengl-accelerate
13749 (inherit python2-pyopengl)
13750 (name "python2-pyopengl-accelerate")
13755 (uri (pypi-uri "PyOpenGL-accelerate" version))
13758 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13759 (synopsis "Acceleration code for PyOpenGL")
13761 "This is the Cython-coded accelerator module for PyOpenGL.")))
13763 (define-public python-rencode
13765 (name "python-rencode")
13770 (uri (pypi-uri "rencode" version))
13773 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13774 (build-system python-build-system)
13777 (modify-phases %standard-phases
13778 (add-before 'check 'delete-bogus-test
13779 ;; This test requires /home/aresch/Downloads, which is not provided by
13780 ;; the build environment.
13782 (delete-file "rencode/t.py")
13784 (native-inputs `(("pkg-config" ,pkg-config)
13785 ("python-cython" ,python-cython)))
13786 (home-page "https://github.com/aresch/rencode")
13787 (synopsis "Serialization of heterogeneous data structures")
13789 "The @code{rencode} module is a data structure serialization library,
13790 similar to @code{bencode} from the BitTorrent project. For complex,
13791 heterogeneous data structures with many small elements, r-encoding stake up
13792 significantly less space than b-encodings. This version of rencode is a
13793 complete rewrite in Cython to attempt to increase the performance over the
13794 pure Python module.")
13795 (license license:bsd-3)))
13797 (define-public python2-rencode
13798 (package-with-python2 python-rencode))
13800 (define-public python-xenon
13802 (name "python-xenon")
13807 (uri (pypi-uri "xenon" version))
13810 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13811 (build-system python-build-system)
13813 `(("python-pyyaml" ,python-pyyaml)
13814 ("python-radon" ,python-radon)
13815 ("python-requests" ,python-requests)
13816 ("python-flake8" ,python-flake8)
13817 ("python-tox" ,python-tox)))
13820 (modify-phases %standard-phases
13821 (add-before 'build 'patch-test-requirements
13823 ;; Remove httpretty dependency for tests.
13824 (substitute* "setup.py"
13825 (("httpretty") ""))
13827 (home-page "https://xenon.readthedocs.org/")
13828 (synopsis "Monitor code metrics for Python on your CI server")
13830 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13831 Ideally, @code{xenon} is run every time code is committed. Through command
13832 line options, various thresholds can be set for the complexity of code. It
13833 will fail (i.e. it will exit with a non-zero exit code) when any of these
13834 requirements is not met.")
13835 (license license:expat)))
13837 (define-public python2-xenon
13838 (package-with-python2 python-xenon))
13840 (define-public python-pysocks
13842 (name "python-pysocks")
13847 (uri (pypi-uri "PySocks" version))
13850 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13851 (build-system python-build-system)
13852 (arguments `(#:tests? #f))
13853 (home-page "https://github.com/Anorov/PySocks")
13854 (synopsis "SOCKS client module")
13855 (description "@code{pysocks} is an updated and semi-actively maintained
13856 version of @code{SocksiPy} with bug fixes and extra features.")
13857 (license license:bsd-3)))
13859 (define-public python2-pysocks
13860 (package-with-python2 python-pysocks))
13862 (define-public python-pydiff
13864 (name "python-pydiff")
13869 (uri (pypi-uri "pydiff" version))
13872 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13873 (build-system python-build-system)
13874 (home-page "https://github.com/myint/pydiff")
13875 (synopsis "Library to diff two Python files at the bytecode level")
13877 "@code{pydiff} makes it easy to look for actual code changes while
13878 ignoring formatting changes.")
13879 (license license:expat)))
13881 (define-public python2-pydiff
13882 (package-with-python2 python-pydiff))
13884 (define-public python-tqdm
13886 (name "python-tqdm")
13891 (uri (pypi-uri "tqdm" version))
13894 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13895 (build-system python-build-system)
13897 `(("python-flake8" ,python-flake8)
13898 ("python-nose" ,python-nose)
13899 ("python-coverage" ,python-coverage)))
13900 (home-page "https://github.com/tqdm/tqdm")
13901 (synopsis "Fast, extensible progress meter")
13903 "Make loops show a progress bar on the console by just wrapping any
13904 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13905 design and layout.")
13906 (license (list license:mpl2.0 license:expat))
13907 (properties `((python2-variant . ,(delay python2-tqdm))))))
13909 (define-public python2-tqdm
13910 (let ((tqdm (package-with-python2
13911 (strip-python2-variant python-tqdm))))
13912 (package (inherit tqdm)
13913 (native-inputs `(("python2-functools32" ,python2-functools32)
13914 ,@(package-native-inputs tqdm))))))
13916 (define-public python-pkginfo
13918 (name "python-pkginfo")
13923 (uri (pypi-uri "pkginfo" version))
13926 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13927 (build-system python-build-system)
13929 ;; The tests are broken upstream.
13932 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13934 "Query metadatdata from sdists, bdists, and installed packages")
13936 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13937 source distriubtion (an sdist) or a binary distribution (e.g., created by
13938 running bdist_egg). It can also query the EGG-INFO directory of an installed
13939 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13940 created by running @code{python setup.py develop}).")
13941 (license license:expat)))
13943 (define-public python2-pkginfo
13944 (package-with-python2 python-pkginfo))
13946 (define-public python-twine
13948 (name "python-twine")
13953 (uri (pypi-uri "twine" version))
13956 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13957 (build-system python-build-system)
13959 `(("python-tqdm" ,python-tqdm)
13960 ("python-pkginfo" ,python-pkginfo)
13961 ("python-requests" ,python-requests)
13962 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13963 (home-page "https://github.com/pypa/twine")
13964 (synopsis "Collection of utilities for interacting with PyPI")
13966 "@code{twine} currently supports registering projects and uploading
13967 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13968 their files and supports any packaging format (including wheels).")
13969 (license license:asl2.0)))
13971 (define-public python2-twine
13972 (package-with-python2 python-twine))
13974 (define-public python-linecache2
13976 (name "python-linecache2")
13981 (uri (pypi-uri "linecache2" version))
13984 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13985 (build-system python-build-system)
13987 `(;; The tests depend on unittest2, and our version is a bit too old.
13990 `(("python-pbr" ,python-pbr-minimal)))
13992 "https://github.com/testing-cabal/linecache2")
13993 (synopsis "Backports of the linecache module")
13995 "The linecache module allows one to get any line from any file, while
13996 attempting to optimize internally, using a cache, the common case where many
13997 lines are read from a single file.")
13998 (license license:psfl)))
14000 (define-public python2-linecache2
14001 (package-with-python2 python-linecache2))
14003 (define-public python-traceback2
14005 (name "python-traceback2")
14010 (uri (pypi-uri "traceback2" version))
14013 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14014 (build-system python-build-system)
14016 `(;; python-traceback2 and python-unittest2 depend on one another.
14019 `(("python-pbr" ,python-pbr-minimal)))
14021 `(("python-linecache2" ,python-linecache2)))
14023 "https://github.com/testing-cabal/traceback2")
14024 (synopsis "Backports of the traceback module")
14026 "This module provides a standard interface to extract, format and print
14027 stack traces of Python programs. It exactly mimics the behavior of the Python
14028 interpreter when it prints a stack trace.")
14029 (license license:psfl)))
14031 (define-public python2-traceback2
14032 (package-with-python2 python-traceback2))
14034 (define-public python-ratelimiter
14036 (name "python-ratelimiter")
14041 (uri (pypi-uri "ratelimiter" version))
14044 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14045 (build-system python-build-system)
14047 '(#:tests? #f)) ; There are no tests in the pypi archive.
14048 (home-page "https://github.com/RazerM/ratelimiter")
14049 (synopsis "Simple rate limiting object")
14051 "The @code{ratelimiter} module ensures that an operation will not be
14052 executed more than a given number of times during a given period.")
14053 (license license:asl2.0)))
14055 (define-public python2-ratelimiter
14056 (package-with-python2 python-ratelimiter))
14058 (define-public python-dukpy
14060 (name "python-dukpy")
14065 (uri (git-reference
14066 (url "https://github.com/kovidgoyal/dukpy.git")
14067 (commit (string-append "v" version))))
14068 (file-name (git-file-name name version))
14070 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14071 (build-system python-build-system)
14072 (home-page "https://github.com/kovidgoyal/dukpy")
14073 (synopsis "Run JavaScript in python")
14075 "dukpy is a JavaScript runtime environment for Python using the duktape
14076 embeddable JavaScript engine.")
14077 ;; Dukpy is licensed under MIT like the embedded duktape library,
14078 ;; with 'errors.c' as GPL3.
14079 (license (list license:expat license:gpl3))))
14081 (define-public python2-dukpy
14082 (package-with-python2 python-dukpy))
14084 (define-public python-jsonrpclib-pelix
14086 (name "python-jsonrpclib-pelix")
14091 (uri (pypi-uri "jsonrpclib-pelix" version))
14094 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14095 (build-system python-build-system)
14097 `(#:tests? #f)) ; no tests in PyPI tarball
14098 (home-page "https://github.com/tcalmant/jsonrpclib/")
14099 (synopsis "JSON-RPC 2.0 client library for Python")
14101 "This library implements the JSON-RPC v2.0
14102 specification (backwards-compatible) as a client library for Python. This
14103 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14105 (license license:asl2.0)))
14107 (define-public python2-jsonrpclib-pelix
14108 (package-with-python2 python-jsonrpclib-pelix))
14110 (define-public python-setuptools-scm-git-archive
14112 (name "python-setuptools-scm-git-archive")
14117 (uri (pypi-uri "setuptools_scm_git_archive" version))
14120 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14121 (build-system python-build-system)
14123 `(("python-pytest" ,python-pytest)))
14125 `(("python-setuptools-scm" ,python-setuptools-scm)))
14126 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14127 (synopsis "Setuptools_scm plugin for git archives")
14129 "The setuptools_scm_git_archive package is a plugin to
14130 setuptools_scm, which supports obtaining versions from git archives that
14131 belong to tagged versions.")
14132 (license license:expat)))
14134 (define-public python2-setuptools-scm-git-archive
14135 (package-with-python2 python-setuptools-scm-git-archive))
14137 (define-public python-setuptools-git
14139 (name "python-setuptools-git")
14144 (uri (pypi-uri "setuptools-git" version))
14147 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14148 (build-system python-build-system)
14151 (modify-phases %standard-phases
14152 ;; This is needed for tests.
14153 (add-after 'unpack 'configure-git
14155 (setenv "HOME" "/tmp")
14156 (invoke "git" "config" "--global" "user.email" "guix")
14157 (invoke "git" "config" "--global" "user.name" "guix")
14160 `(("git" ,git-minimal)))
14161 (home-page "https://github.com/msabramo/setuptools-git")
14162 (synopsis "Setuptools revision control system plugin for Git")
14164 "This package provides a plugin for Setuptools for revision control with
14166 (license license:bsd-3)))
14168 (define-public python-pyclipper
14170 (name "python-pyclipper")
14171 (version "1.1.0.post3")
14175 (uri (pypi-uri "pyclipper" version ".zip"))
14177 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14178 (modules '((guix build utils)))
14181 ;; This file is generated by Cython.
14182 (delete-file "pyclipper/pyclipper.cpp") #t))))
14183 (build-system python-build-system)
14186 (modify-phases %standard-phases
14187 (add-before 'build 'cythonize-sources
14189 (with-directory-excursion "pyclipper"
14190 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14192 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14194 `(("python-cython" ,python-cython)
14195 ("python-pytest" ,python-pytest)
14196 ("python-pytest-runner" ,python-pytest-runner)
14197 ("python-unittest2" ,python-unittest2)
14199 (home-page "https://github.com/greginvm/pyclipper")
14200 (synopsis "Wrapper for Angus Johnson's Clipper library")
14202 "Pyclipper is a Cython wrapper for the C++ translation of the
14203 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14204 (license license:expat)))
14206 (define-public python2-pyclipper
14207 (package-with-python2 python-pyclipper))
14209 (define-public python2-booleanoperations
14211 (name "python2-booleanoperations")
14216 (uri (pypi-uri "booleanOperations" version ".zip"))
14219 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14220 (build-system python-build-system)
14222 `(#:python ,python-2))
14225 ("python2-pytest" ,python2-pytest)
14226 ("python2-pytest-runner" ,python2-pytest-runner)))
14228 `(("python-fonttools" ,python2-fonttools)
14229 ("python-pyclipper" ,python2-pyclipper)
14230 ("python-ufolib" ,python2-ufolib)))
14231 (home-page "https://github.com/typemytype/booleanOperations")
14232 (synopsis "Boolean operations on paths")
14234 "BooleanOperations provides a Python library that enables
14235 boolean operations on paths.")
14236 (license license:expat)))
14238 (define-public python-tempdir
14240 (name "python-tempdir")
14245 (uri (pypi-uri "tempdir" version))
14248 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14249 (build-system python-build-system)
14250 (home-page "https://pypi.org/project/tempdir/")
14252 ;; the package has no tests
14254 (synopsis "Python library for managing temporary directories")
14256 "This library manages temporary directories that are automatically
14257 deleted with all their contents when they are no longer needed. It is
14258 particularly convenient for use in tests.")
14259 (license license:expat)))
14261 (define-public python2-tempdir
14262 (package-with-python2 python-tempdir))
14264 (define-public python-activepapers
14266 (name "python-activepapers")
14271 (uri (pypi-uri "ActivePapers.Py" version))
14274 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14275 (build-system python-build-system)
14277 `(#:modules ((ice-9 ftw)
14280 (guix build python-build-system))
14283 (modify-phases %standard-phases
14284 (add-after 'unpack 'delete-python2-code
14286 (for-each delete-file
14287 '("lib/activepapers/builtins2.py"
14288 "lib/activepapers/standardlib2.py"
14289 "lib/activepapers/utility2.py"))))
14292 ;; Deactivate the test cases that download files
14293 (setenv "NO_NETWORK_ACCESS" "1")
14294 ;; For some strange reason, some tests fail if nosetests runs all
14295 ;; test modules in a single execution. They pass if each test
14296 ;; module is run individually.
14297 (for-each (lambda (filename)
14298 (invoke "nosetests"
14299 (string-append "tests/" filename)))
14302 (string-suffix? ".py" filename)))))))))
14304 `(("python-tempdir" ,python-tempdir)
14305 ("python-nose" ,python-nose)))
14307 `(("python-h5py" ,python-h5py)))
14308 (home-page "http://www.activepapers.org/")
14309 (synopsis "Executable papers for scientific computing")
14311 "ActivePapers is a tool for working with executable papers, which
14312 combine data, code, and documentation in single-file packages,
14313 suitable for publication as supplementary material or on repositories
14314 such as figshare or Zenodo.")
14315 (properties `((python2-variant . ,(delay python2-activepapers))))
14316 (license license:bsd-3)))
14318 (define-public python2-activepapers
14319 (let ((base (package-with-python2
14320 (strip-python2-variant python-activepapers))))
14324 (substitute-keyword-arguments (package-arguments base)
14326 `(modify-phases ,phases
14327 (delete 'delete-python2-code)
14328 (add-after 'unpack 'delete-python3-code
14330 (for-each delete-file
14331 '("lib/activepapers/builtins3.py"
14332 "lib/activepapers/standardlib3.py"
14333 "lib/activepapers/utility3.py")))))))))))
14335 (define-public python-semver
14337 (name "python-semver")
14342 (uri (pypi-uri "semver" version))
14345 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14346 (build-system python-build-system)
14348 `(("python-tox" ,python-tox)
14349 ("python-virtualenv" ,python-virtualenv)))
14350 (home-page "https://github.com/k-bx/python-semver")
14351 (synopsis "Python helper for Semantic Versioning")
14352 (description "This package provides a Python library for
14353 @url{Semantic Versioning, http://semver.org/}.")
14354 (license license:bsd-3)))
14356 (define-public python2-semver
14357 (package-with-python2 python-semver))
14359 (define-public python-pyro4
14361 (name "python-pyro4")
14366 (uri (pypi-uri "Pyro4" version))
14368 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14369 (build-system python-build-system)
14371 '(#:tests? #f)) ;FIXME: Some tests require network access.
14373 `(("python-cloudpickle" ,python-cloudpickle)
14374 ("python-dill" ,python-dill)
14375 ("python-msgpack" ,python-msgpack)))
14377 `(("python-serpent" ,python-serpent)))
14378 (home-page "https://pyro4.readthedocs.io")
14379 (synopsis "Distributed object middleware for Python")
14381 "Pyro enables you to build applications in which objects can talk to each
14382 other over the network. You can just use normal Python method calls to call
14383 objects on other machines, also known as remote procedure calls (RPC).")
14384 (license license:expat)))
14386 (define-public python2-pyro
14388 (name "python2-pyro")
14393 (uri (pypi-uri "Pyro" version))
14394 (file-name (string-append "Pyro-" version ".tar.gz"))
14397 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14398 (build-system python-build-system)
14400 ;; Pyro is not compatible with Python 3
14401 `(#:python ,python-2
14402 ;; Pyro has no test cases for automatic execution
14404 (home-page "http://pythonhosted.org/Pyro/")
14405 (synopsis "Distributed object manager for Python")
14406 (description "Pyro is a Distributed Object Technology system
14407 written in Python that is designed to be easy to use. It resembles
14408 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14409 which is a system and language independent Distributed Object Technology
14410 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14411 longer maintained. New projects should use Pyro4 instead, which
14412 is the new Pyro version that is actively developed.")
14413 (license license:expat)))
14415 (define-public python2-scientific
14417 (name "python2-scientific")
14422 (uri (git-reference
14423 (url "https://github.com/khinsen/ScientificPython")
14424 (commit (string-append "rel" version))))
14425 (file-name (git-file-name name version))
14428 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14429 (build-system python-build-system)
14431 `(("netcdf" ,netcdf)))
14433 `(("python-numpy" ,python2-numpy-1.8)
14434 ("python-pyro" ,python2-pyro)))
14436 ;; ScientificPython is not compatible with Python 3
14437 `(#:python ,python-2
14438 #:tests? #f ; No test suite
14440 (modify-phases %standard-phases
14442 (lambda* (#:key inputs #:allow-other-keys)
14443 (invoke "python" "setup.py" "build"
14444 (string-append "--netcdf_prefix="
14445 (assoc-ref inputs "netcdf"))))))))
14446 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14447 (synopsis "Python modules for scientific computing")
14448 (description "ScientificPython is a collection of Python modules that are
14449 useful for scientific computing. Most modules are rather general (Geometry,
14450 physical units, automatic derivatives, ...) whereas others are more
14451 domain-specific (e.g. netCDF and PDB support). The library is currently
14452 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14453 (license license:cecill-c)))
14455 (define-public python2-mmtk
14457 (name "python2-mmtk")
14462 (uri (git-reference
14463 (url "https://github.com/khinsen/MMTK")
14464 (commit (string-append "rel" version))))
14465 (file-name (git-file-name name version))
14468 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14469 (build-system python-build-system)
14471 `(("netcdf" ,netcdf)))
14473 `(("python-scientific" ,python2-scientific)
14474 ("python-tkinter" ,python-2 "tk")))
14476 `(#:python ,python-2
14479 (modify-phases %standard-phases
14480 (add-before 'build 'includes-from-scientific
14481 (lambda* (#:key inputs #:allow-other-keys)
14482 (mkdir-p "Include/Scientific")
14485 (assoc-ref inputs "python-scientific")
14486 "/include/python2.7/Scientific")
14487 "Include/Scientific"))))))
14488 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14489 (synopsis "Python library for molecular simulation")
14490 (description "MMTK is a library for molecular simulations with an emphasis
14491 on biomolecules. It provides widely used methods such as Molecular Dynamics
14492 and normal mode analysis, but also basic routines for implementing new methods
14493 for simulation and analysis. The library is currently not actively maintained
14494 and works only with Python 2 and NumPy < 1.9.")
14495 (license license:cecill-c)))
14497 (define-public python-phonenumbers
14499 (name "python-phonenumbers")
14504 (uri (pypi-uri "phonenumbers" version))
14507 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14508 (build-system python-build-system)
14510 "https://github.com/daviddrysdale/python-phonenumbers")
14512 "Python library for dealing with international phone numbers")
14514 "This package provides a Python port of Google's libphonenumber library.")
14515 (license license:asl2.0)))
14517 (define-public python2-phonenumbers
14518 (package-with-python2 python-phonenumbers))
14520 (define-public python-send2trash
14522 (name "python-send2trash")
14525 (origin (method git-fetch)
14526 ;; Source tarball on PyPI doesn't include tests.
14527 (uri (git-reference
14528 (url "https://github.com/hsoft/send2trash.git")
14530 (file-name (git-file-name name version))
14533 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14534 (build-system python-build-system)
14537 (modify-phases %standard-phases
14538 (add-before 'check 'pre-check
14540 (mkdir-p "/tmp/foo")
14541 (setenv "HOME" "/tmp/foo")
14543 (home-page "https://github.com/hsoft/send2trash")
14544 (synopsis "Send files to the user's @file{~/Trash} directory")
14545 (description "This package provides a Python library to send files to the
14546 user's @file{~/Trash} directory.")
14547 (properties `((python2-variant . ,(delay python2-send2trash))))
14548 (license license:bsd-3)))
14550 (define-public python2-send2trash
14552 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14554 (substitute-keyword-arguments (package-arguments python-send2trash)
14556 `(modify-phases ,phases
14557 (add-before 'check 'setenv
14559 (setenv "PYTHONPATH"
14560 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14563 (define-public python-yapf
14565 (name "python-yapf")
14570 (uri (pypi-uri "yapf" version))
14573 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14574 (build-system python-build-system)
14575 (home-page "https://github.com/google/yapf")
14576 (synopsis "Formatter for Python code")
14577 (description "YAPF is a formatter for Python code. It's based off of
14578 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14579 takes the code and reformats it to the best formatting that conforms to the
14580 style guide, even if the original code didn't violate the style guide.")
14581 (license license:asl2.0)))
14583 (define-public python2-yapf
14584 (package-with-python2 python-yapf))
14586 (define-public python-gyp
14587 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14590 (name "python-gyp")
14591 ;; Google does not release versions,
14592 ;; based on second most recent commit date.
14593 (version (git-version "0.0.0" revision commit))
14596 ;; Google does not release tarballs,
14597 ;; git checkout is needed.
14599 (uri (git-reference
14600 (url "https://chromium.googlesource.com/external/gyp")
14602 (file-name (git-file-name name version))
14605 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14606 (build-system python-build-system)
14607 (home-page "https://gyp.gsrc.io/")
14608 (synopsis "GYP is a Meta-Build system")
14610 "GYP builds build systems for large, cross platform applications.
14611 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14612 files, and Makefiles.")
14613 (license license:bsd-3))))
14615 (define-public python2-gyp
14616 (package-with-python2 python-gyp))
14618 (define-public python-whatever
14620 (name "python-whatever")
14625 (uri (git-reference
14626 (url "https://github.com/Suor/whatever")
14628 (file-name (git-file-name name version))
14630 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14631 (build-system python-build-system)
14634 (modify-phases %standard-phases
14637 (invoke "py.test"))))))
14639 `(("python-pytest" ,python-pytest)))
14640 (home-page "http://github.com/Suor/whatever")
14641 (synopsis "Make anonymous functions by partial application of operators")
14642 (description "@code{whatever} provides an easy way to make anonymous
14643 functions by partial application of operators.")
14644 (license license:bsd-3)))
14646 (define-public python2-whatever
14647 (package-with-python2 python-whatever))
14649 (define-public python-funcy
14651 (name "python-funcy")
14656 (uri (git-reference
14657 (url "https://github.com/Suor/funcy.git")
14660 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14661 (file-name (git-file-name name version))))
14662 (build-system python-build-system)
14665 (modify-phases %standard-phases
14668 (invoke "py.test"))))))
14670 `(("python-pytest" ,python-pytest)
14671 ("python-whatever" ,python-whatever)))
14672 (home-page "http://github.com/Suor/funcy")
14673 (synopsis "Functional tools")
14674 (description "@code{funcy} is a library that provides functional tools.
14677 @item merge - Merges collections of the same type
14678 @item walk - Type-preserving map
14679 @item select - Selects a part of a collection
14680 @item take - Takes the first n items of a collection
14681 @item first - Takes the first item of a collection
14682 @item remove - Predicated-removes items of a collection
14683 @item concat - Concatenates two collections
14684 @item flatten - Flattens a collection with subcollections
14685 @item distinct - Returns only distinct items
14686 @item split - Predicated-splits a collection
14687 @item split_at - Splits a collection at a given item
14688 @item group_by - Groups items by group
14689 @item pairwise - Pairs off adjacent items
14690 @item partial - Partially-applies a function
14691 @item curry - Curries a function
14692 @item compose - Composes functions
14693 @item complement - Complements a predicate
14694 @item all_fn - \"all\" with predicate
14696 (license license:bsd-3)))
14698 (define-public python2-funcy
14699 (package-with-python2 python-funcy))
14701 (define-public python-isoweek
14703 (name "python-isoweek")
14708 (uri (pypi-uri "isoweek" version))
14711 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14712 (build-system python-build-system)
14713 (home-page "https://github.com/gisle/isoweek")
14714 (synopsis "Objects representing a week")
14715 (description "The @code{isoweek} module provide the class Week that
14716 implements the week definition of ISO 8601. This standard also defines
14717 a notation for identifying weeks; yyyyWww (where the W is a literal).
14718 Week instances stringify to this form.")
14719 (license license:bsd-3)))
14721 (define-public python2-isoweek
14722 (package-with-python2 python-isoweek))
14724 (define-public python-tokenize-rt
14726 (name "python-tokenize-rt")
14731 (uri (pypi-uri "tokenize-rt" version))
14734 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14735 (build-system python-build-system)
14736 (home-page "https://github.com/asottile/tokenize-rt")
14737 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14739 "This Python library is a wrapper around @code{tokenize} from the Python
14740 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14741 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14742 and @code{tokens_to_src} to roundtrip.")
14743 (license license:expat)))
14745 (define-public python-future-fstrings
14747 (name "python-future-fstrings")
14752 (uri (pypi-uri "future_fstrings" version))
14755 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14756 (build-system python-build-system)
14758 `(("python-tokenize-rt" ,python-tokenize-rt)))
14759 (home-page "https://github.com/asottile/future-fstrings")
14760 (synopsis "Backport of fstrings to Python < 3.6")
14762 "This package provides a UTF-8 compatible encoding
14763 @code{future_fstrings}, which performs source manipulation. It decodes the
14764 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14765 @code{f} strings.")
14766 (license license:expat)))
14768 (define-public python-typed-ast
14770 (name "python-typed-ast")
14775 (uri (git-reference
14776 (url "https://github.com/python/typed_ast.git")
14779 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14780 (file-name (git-file-name name version))))
14781 (build-system python-build-system)
14783 `(#:modules ((guix build utils)
14784 (guix build python-build-system)
14789 (modify-phases %standard-phases
14792 (let ((cwd (getcwd)))
14793 (setenv "PYTHONPATH"
14794 (string-append cwd "/build/"
14795 (find (cut string-prefix? "lib" <>)
14796 (scandir (string-append cwd "/build")))
14798 (getenv "PYTHONPATH"))))
14801 (native-inputs `(("python-pytest" ,python-pytest)))
14802 (home-page "https://github.com/python/typed_ast")
14803 (synopsis "Fork of Python @code{ast} modules with type comment support")
14804 (description "This package provides a parser similar to the standard
14805 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14806 include PEP 484 type comments and are independent of the version of Python
14807 under which they are run. The @code{typed_ast} parsers produce the standard
14808 Python AST (plus type comments), and are both fast and correct, as they are
14809 based on the CPython 2.7 and 3.7 parsers.")
14810 ;; See the file "LICENSE" for the details.
14811 (license (list license:psfl
14813 license:expat)))) ;ast27/Parser/spark.py
14815 (define-public python-typing
14817 (name "python-typing")
14822 (uri (pypi-uri "typing" version))
14825 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14826 (build-system python-build-system)
14827 (home-page "https://docs.python.org/3/library/typing.html")
14828 (synopsis "Type hints for Python")
14829 (description "This is a backport of the standard library @code{typing}
14830 module to Python versions older than 3.5. Typing defines a standard notation
14831 for Python function and variable type annotations. The notation can be used
14832 for documenting code in a concise, standard format, and it has been designed
14833 to also be used by static and runtime type checkers, static analyzers, IDEs
14835 (license license:psfl)))
14837 (define-public python2-typing
14838 (package-with-python2 python-typing))
14840 (define-public python-typing-extensions
14842 (name "python-typing-extensions")
14847 (uri (pypi-uri "typing_extensions" version))
14850 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14851 (build-system python-build-system)
14853 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14854 (synopsis "Experimental type hints for Python")
14856 "The typing_extensions module contains additional @code{typing} hints not
14857 yet present in the of the @code{typing} standard library.
14858 Included are implementations of:
14861 @item ContextManager
14872 @item TYPE_CHECKING
14873 @item AsyncGenerator
14875 (license license:psfl)))
14877 (define-public bpython
14884 (uri (pypi-uri "bpython" version))
14886 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14887 (build-system python-build-system)
14890 (modify-phases %standard-phases
14891 (add-after 'unpack 'remove-failing-test
14893 ;; Remove failing test. FIXME: make it pass
14894 (delete-file "bpython/test/test_args.py")
14896 (add-after 'wrap 'add-aliases
14897 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14898 (lambda* (#:key outputs #:allow-other-keys)
14899 (let ((out (assoc-ref outputs "out")))
14902 (symlink old (string-append out "/bin/" new)))
14903 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14904 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14907 `(("python-pygments" ,python-pygments)
14908 ("python-requests" ,python-requests)
14909 ("python-babel" ,python-babel) ; optional, for internationalization
14910 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14911 ("python-greenlet" ,python-greenlet)
14912 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14913 ("python-six" ,python-six)))
14915 `(("python-sphinx" ,python-sphinx)
14916 ("python-mock" ,python-mock)))
14917 (home-page "https://bpython-interpreter.org/")
14918 (synopsis "Fancy interface to the Python interpreter")
14919 (description "Bpython is a fancy interface to the Python
14920 interpreter. bpython's main features are
14923 @item in-line syntax highlighting,
14924 @item readline-like autocomplete with suggestions displayed as you type,
14925 @item expected parameter list for any Python function,
14926 @item \"rewind\" function to pop the last line of code from memory and
14928 @item send the code you've entered off to a pastebin,
14929 @item save the code you've entered to a file, and
14930 @item auto-indentation.
14932 (license license:expat)))
14934 (define-public bpython2
14935 (let ((base (package-with-python2
14936 (strip-python2-variant bpython))))
14937 (package (inherit base)
14940 `(#:python ,python-2
14942 (modify-phases %standard-phases
14943 (add-after 'unpack 'remove-failing-test
14945 ;; Remove failing test. FIXME: make it pass
14946 (delete-file "bpython/test/test_args.py")
14947 ;; Disable failing test-cases (renaming inhibits they are
14949 (substitute* "bpython/test/test_curtsies_repl.py"
14950 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14951 (string-append a "xxx_off_" b))
14952 (("^(\\s*def )(test_complex\\W)" _ a b)
14953 (string-append a "xxx_off_" b)))
14955 (add-before 'build 'rename-scripts
14956 ;; rename the scripts to bypthon2, bpdb2, etc.
14958 (substitute* "setup.py"
14959 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14960 (string-append name "2" rest "\n"))
14961 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14962 (string-append name "2" (or sub "") rest "\n")))
14965 (define-public python-pyinotify
14967 (name "python-pyinotify")
14971 (uri (pypi-uri "pyinotify" version))
14974 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14975 (build-system python-build-system)
14976 (arguments `(#:tests? #f)) ;no tests
14977 (home-page "https://github.com/seb-m/pyinotify")
14978 (synopsis "Python library for monitoring inotify events")
14980 "@code{pyinotify} provides a Python interface for monitoring
14981 file system events on Linux.")
14982 (license license:expat)))
14984 (define-public python2-pyinotify
14985 (package-with-python2 python-pyinotify))
14987 ;; Ada parser uses this version.
14988 (define-public python2-quex-0.67.3
14990 (name "python2-quex")
14995 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14996 (version-major+minor version)
14997 "/quex-" version ".zip"))
15000 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15001 (build-system python-build-system)
15003 `(("unzip" ,unzip)))
15005 `(#:python ,python-2
15008 (modify-phases %standard-phases
15009 (delete 'configure)
15012 (lambda* (#:key outputs #:allow-other-keys)
15013 (let* ((out (assoc-ref outputs "out"))
15014 (share/quex (string-append out "/share/quex"))
15015 (bin (string-append out "/bin")))
15016 (copy-recursively "." share/quex)
15018 (symlink (string-append share/quex "/quex-exe.py")
15019 (string-append bin "/quex"))
15021 (native-search-paths
15022 (list (search-path-specification
15023 (variable "QUEX_PATH")
15024 (files '("share/quex")))))
15025 (home-page "http://quex.sourceforge.net/")
15026 (synopsis "Lexical analyzer generator in Python")
15027 (description "@code{quex} is a lexical analyzer generator in Python.")
15028 (license license:lgpl2.1+))) ; Non-military
15030 (define-public python2-quex
15031 (package (inherit python2-quex-0.67.3)
15032 (name "python2-quex")
15037 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15040 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15041 (file-name (string-append name "-" version ".tar.gz"))))))
15043 (define-public python-more-itertools
15045 (name "python-more-itertools")
15050 (uri (pypi-uri "more-itertools" version))
15053 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15054 (build-system python-build-system)
15055 (home-page "https://github.com/erikrose/more-itertools")
15056 (synopsis "More routines for operating on iterables, beyond itertools")
15057 (description "Python's built-in @code{itertools} module implements a
15058 number of iterator building blocks inspired by constructs from APL, Haskell,
15059 and SML. @code{more-itertools} includes additional building blocks for
15060 working with iterables.")
15061 (properties `((python2-variant . ,(delay python2-more-itertools))))
15062 (license license:expat)))
15064 ;; The 5.x series are the last versions supporting Python 2.7.
15065 (define-public python2-more-itertools
15067 (inherit python-more-itertools)
15068 (name "python2-more-itertools")
15072 (uri (pypi-uri "more-itertools" version))
15075 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15077 `(#:python ,python2-minimal))
15079 `(("python2-six" ,python2-six-bootstrap)))))
15081 (define-public python-latexcodec
15083 (name "python-latexcodec")
15088 (uri (pypi-uri "latexcodec" version))
15090 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15091 (build-system python-build-system)
15093 `(("python-six" ,python-six)))
15094 (home-page "https://readthedocs.org/projects/latexcodec/")
15095 (synopsis "Work with LaTeX code in Python")
15096 (description "Lexer and codec to work with LaTeX code in Python.")
15097 (license license:expat)))
15099 (define-public python-pybtex
15101 (name "python-pybtex")
15106 (uri (pypi-uri "pybtex" version))
15108 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15109 (build-system python-build-system)
15111 `(("python-nose" ,python-nose)))
15113 `(("python-latexcodec" ,python-latexcodec)
15114 ("python-pyyaml" ,python-pyyaml)
15115 ("python-six" ,python-six)))
15117 `(#:test-target "nosetests"))
15118 (home-page "https://pybtex.org/")
15119 (synopsis "BibTeX-compatible bibliography processor")
15120 (description "Pybtex is a BibTeX-compatible bibliography processor written
15121 in Python. You can simply type pybtex instead of bibtex.")
15122 (license license:expat)))
15124 (define-public python-onetimepass
15126 (name "python-onetimepass")
15131 (uri (pypi-uri "onetimepass" version))
15133 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15134 (build-system python-build-system)
15135 (propagated-inputs `(("python-six" ,python-six)))
15136 (home-page "https://github.com/tadeck/onetimepass/")
15137 (synopsis "One-time password library")
15138 (description "Python one-time password library for HMAC-based (HOTP) and
15139 time-based (TOTP) passwords.")
15140 (license license:expat)))
15142 (define-public python-parso
15144 (name "python-parso")
15149 (uri (pypi-uri "parso" version))
15152 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15154 `(("python-pytest" ,python-pytest)))
15155 (build-system python-build-system)
15157 `(#:phases (modify-phases %standard-phases
15159 (lambda _ (invoke "pytest" "-vv"))))))
15160 (home-page "https://github.com/davidhalter/parso")
15161 (synopsis "Python Parser")
15162 (description "Parso is a Python parser that supports error recovery and
15163 round-trip parsing for different Python versions (in multiple Python versions).
15164 Parso is also able to list multiple syntax errors in your Python file.")
15165 (license license:expat)))
15167 (define-public python2-parso
15168 (package-with-python2 python-parso))
15170 (define-public python-async-generator
15172 (name "python-async-generator")
15177 (uri (pypi-uri "async_generator" version))
15180 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15181 (build-system python-build-system)
15183 `(("python-pytest" ,python-pytest)))
15184 (home-page "https://github.com/python-trio/async_generator")
15185 (synopsis "Async generators and context managers for Python 3.5+")
15186 (description "@code{async_generator} back-ports Python 3.6's native async
15187 generators and Python 3.7's context managers into Python 3.5.")
15189 (license (list license:expat license:asl2.0))))
15191 (define-public python-async-timeout
15193 (name "python-async-timeout")
15198 (uri (pypi-uri "async-timeout" version))
15201 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15202 (build-system python-build-system)
15203 (home-page "https://github.com/aio-libs/async_timeout/")
15204 (synopsis "Timeout context manager for asyncio programs")
15205 (description "@code{async-timeout} provides a timeout timeout context
15206 manager compatible with @code{asyncio}.")
15207 (license license:asl2.0)))
15209 (define-public python-glob2
15211 (name "python-glob2")
15216 (uri (git-reference
15217 (url "https://github.com/miracle2k/python-glob2.git")
15218 (commit (string-append "v" version))))
15219 (file-name (git-file-name name version))
15221 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15222 (build-system python-build-system)
15223 (home-page "https://github.com/miracle2k/python-glob2/")
15224 (synopsis "Extended Version of the python buildin glob module")
15225 (description "This is an extended version of the Python
15226 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15230 @item The ability to capture the text matched by glob patterns, and return
15231 those matches alongside the file names.
15232 @item A recursive @code{**} globbing syntax, akin for example to the
15233 @code{globstar} option of Bash.
15234 @item The ability to replace the file system functions used, in order to glob
15235 on virtual file systems.
15236 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15239 Glob2 currently based on the glob code from Python 3.3.1.")
15240 (license license:bsd-2)))
15242 (define-public python2-glob2
15243 (package-with-python2 python-glob2))
15245 (define-public python-gipc
15247 (name "python-gipc")
15252 (uri (pypi-uri "gipc" version ".zip"))
15255 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15256 (build-system python-build-system)
15258 `(("unzip" ,unzip)))
15260 `(("python-gevent" ,python-gevent)))
15261 (home-page "http://gehrcke.de/gipc")
15262 (synopsis "Child process management in the context of gevent")
15263 (description "Usage of Python's multiprocessing package in a
15264 gevent-powered application may raise problems. With @code{gipc},
15265 process-based child processes can safely be created anywhere within a
15266 gevent-powered application.")
15267 (license license:expat)))
15269 (define-public python2-gipc
15270 (package-with-python2 python-gipc))
15272 (define-public python-fusepy
15274 (name "python-fusepy")
15279 (uri (pypi-uri "fusepy" version))
15282 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15283 (build-system python-build-system)
15286 (modify-phases %standard-phases
15287 (add-before 'build 'set-library-file-name
15288 (lambda* (#:key inputs #:allow-other-keys)
15289 (let ((fuse (assoc-ref inputs "fuse")))
15290 (substitute* "fuse.py"
15291 (("find_library\\('fuse'\\)")
15292 (string-append "'" fuse "/lib/libfuse.so'")))
15296 (home-page "https://github.com/fusepy/fusepy")
15297 (synopsis "Simple ctypes bindings for FUSE")
15298 (description "Python module that provides a simple interface to FUSE and
15299 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15300 (license license:isc)))
15302 (define-public python2-fusepy
15303 (package-with-python2 python-fusepy))
15305 (define-public python2-gdrivefs
15307 (name "python2-gdrivefs")
15312 (uri (pypi-uri "gdrivefs" version))
15315 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15316 (build-system python-build-system)
15318 `(#:python ,python-2
15320 (modify-phases %standard-phases
15321 (add-before 'build 'patch-setup-py
15323 ;; Update requirements from dependency==version
15324 ;; to dependency>=version
15325 (substitute* "gdrivefs/resources/requirements.txt"
15329 `(("python2-gipc" ,python2-gipc)
15330 ("python2-gevent" ,python2-gevent)
15331 ("python2-greenlet" ,python2-greenlet)
15332 ("python2-httplib2" ,python2-httplib2)
15333 ("python2-uritemplate" ,python2-uritemplate)
15334 ("python2-oauth2client" ,python2-oauth2client)
15335 ("python2-six" ,python2-six)))
15337 `(("python2-dateutil" ,python2-dateutil)
15338 ("python2-fusepy" ,python2-fusepy)
15339 ("python2-google-api-client" ,python2-google-api-client)))
15340 (home-page "https://github.com/dsoprea/GDriveFS")
15341 (synopsis "Mount Google Drive as a local file system")
15342 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15343 under Python 2.7.")
15344 (license license:gpl2)))
15346 (define-public pybind11
15352 (uri (git-reference
15353 (url "https://github.com/pybind/pybind11.git")
15354 (commit (string-append "v" version))))
15357 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15358 (file-name (git-file-name name version))))
15359 (build-system cmake-build-system)
15361 `(("python" ,python)
15362 ("python-pytest" ,python-pytest)))
15364 `(#:test-target "check"))
15365 (home-page "https://github.com/pybind/pybind11/")
15366 (synopsis "Seamless operability between C++11 and Python")
15367 (description "pybind11 is a lightweight header-only library that exposes
15368 C++ types in Python and vice versa, mainly to create Python bindings of
15369 existing C++ code. Its goals and syntax are similar to the excellent
15370 Boost.Python library by David Abrahams: to minimize boilerplate code in
15371 traditional extension modules by inferring type information using compile-time
15373 (license license:expat)))
15375 (define-public python-fasteners
15377 (name "python-fasteners")
15382 (uri (pypi-uri "fasteners" version))
15385 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15386 (build-system python-build-system)
15388 `(("python-monotonic" ,python-monotonic)
15389 ("python-six" ,python-six)
15390 ("python-testtools" ,python-testtools)))
15391 (home-page "https://github.com/harlowja/fasteners")
15392 (synopsis "Python package that provides useful locks")
15394 "This package provides a Python program that provides following locks:
15397 @item Locking decorator
15398 @item Reader-writer locks
15399 @item Inter-process locks
15400 @item Generic helpers
15402 (properties `((python2-variant . ,(delay python2-fasteners))))
15403 (license license:asl2.0)))
15405 (define-public python2-fasteners
15406 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15410 `(("python2-futures" ,python2-futures)
15411 ,@(package-propagated-inputs base))))))
15413 (define-public python-requests-file
15415 (name "python-requests-file")
15420 (uri (pypi-uri "requests-file" version))
15423 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15424 (build-system python-build-system)
15426 `(("python-requests" ,python-requests)
15427 ("python-six" ,python-six)))
15429 "https://github.com/dashea/requests-file")
15430 (synopsis "File transport adapter for Requests")
15432 "Requests-File is a transport adapter for use with the Requests Python
15433 library to allow local file system access via @code{file://} URLs.")
15434 (license license:asl2.0)))
15436 (define-public python2-requests-file
15437 (package-with-python2 python-requests-file))
15439 (define-public python-tldextract
15441 (name "python-tldextract")
15446 (uri (pypi-uri "tldextract" version))
15449 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15450 (build-system python-build-system)
15452 `(("python-pytest" ,python-pytest)
15453 ("python-responses" ,python-responses)))
15455 `(("python-idna" ,python-idna)
15456 ("python-requests" ,python-requests)
15457 ("python-requests-file" ,python-requests-file)))
15459 "https://github.com/john-kurkowski/tldextract")
15461 "Separate the TLD from the registered domain and subdomains of a URL")
15463 "TLDExtract accurately separates the TLD from the registered domain and
15464 subdomains of a URL, using the Public Suffix List. By default, this includes
15465 the public ICANN TLDs and their exceptions. It can optionally support the
15466 Public Suffix List's private domains as well.")
15467 (license license:bsd-3)))
15469 (define-public python2-tldextract
15470 (package-with-python2 python-tldextract))
15472 (define-public python-pynamecheap
15474 (name "python-pynamecheap")
15479 (uri (pypi-uri "PyNamecheap" version))
15482 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15483 (build-system python-build-system)
15485 `(("python-requests" ,python-requests)))
15487 "https://github.com/Bemmu/PyNamecheap")
15489 "Namecheap API client in Python")
15491 "PyNamecheap is a Namecheap API client in Python.")
15492 (license license:expat)))
15494 (define-public python2-pynamecheap
15495 (package-with-python2 python-pynamecheap))
15497 (define-public python-dns-lexicon
15499 (name "python-dns-lexicon")
15504 (uri (pypi-uri "dns-lexicon" version))
15507 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15508 (build-system python-build-system)
15510 `(#:tests? #f)) ;requires internet access
15512 `(("python-future" ,python-future)
15513 ("python-pynamecheap" ,python-pynamecheap)
15514 ("python-requests" ,python-requests)
15515 ("python-tldextract" ,python-tldextract)
15516 ("python-urllib3" ,python-urllib3)))
15517 (home-page "https://github.com/AnalogJ/lexicon")
15519 "Manipulate DNS records on various DNS providers")
15521 "Lexicon provides a way to manipulate DNS records on multiple DNS
15522 providers in a standardized way. It has a CLI but it can also be used as a
15523 Python library. It was designed to be used in automation, specifically with
15525 (license license:expat)))
15527 (define-public python2-dns-lexicon
15528 (package-with-python2 python-dns-lexicon))
15530 (define-public python-commandlines
15532 (name "python-commandlines")
15537 (uri (pypi-uri "commandlines" version))
15540 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15541 (build-system python-build-system)
15542 (home-page "https://github.com/chrissimpkins/commandlines")
15543 (synopsis "Command line argument to object parsing library")
15545 "@code{Commandlines} is a Python library for command line application
15546 development that supports command line argument parsing, command string
15547 validation testing and application logic.")
15548 (license license:expat)))
15550 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15551 ;; python-numba. They have a very unflexible relationship.
15552 (define-public python-numba
15554 (name "python-numba")
15559 (uri (pypi-uri "numba" version))
15562 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15563 (build-system python-build-system)
15565 `(#:modules ((guix build utils)
15566 (guix build python-build-system)
15571 (modify-phases %standard-phases
15572 (add-after 'unpack 'disable-proprietary-features
15574 (setenv "NUMBA_DISABLE_HSA" "1")
15575 (setenv "NUMBA_DISABLE_CUDA" "1")
15577 (add-after 'unpack 'remove-failing-tests
15579 ;; FIXME: These tests fail for unknown reasons:
15580 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15581 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15582 (substitute* "numba/tests/test_dispatcher.py"
15583 (("def test(_non_writable_pycache)" _ m)
15584 (string-append "def guix_skip" m))
15585 (("def test(_non_creatable_pycache)" _ m)
15586 (string-append "def guix_skip" m))
15587 (("def test(_frozen)" _ m)
15588 (string-append "def guix_skip" m)))
15590 ;; These tests fail because we don't run the tests from the build
15591 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15592 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15593 (substitute* "numba/tests/test_pycc.py"
15594 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15595 (string-append "def guix_skip" m)))
15597 ;; These tests fail because our version of Python does not have
15598 ;; a recognizable front-end for the Numba distribution to use
15599 ;; to check against.
15600 (substitute* "numba/tests/test_entrypoints.py"
15601 (("def test(_init_entrypoint)" _ m)
15602 (string-append "def guix_skip" m)))
15603 (substitute* "numba/tests/test_jitclasses.py"
15604 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15605 (string-append "def guix_skip" m)))
15609 (let ((cwd (getcwd)))
15610 (setenv "PYTHONPATH"
15611 (string-append cwd "/build/"
15612 (find (cut string-prefix? "lib" <>)
15613 (scandir (string-append cwd "/build")))
15615 (getenv "PYTHONPATH")))
15616 ;; Something is wrong with the PYTHONPATH when running the
15617 ;; tests from the build directory, as it complains about not being
15618 ;; able to import certain modules.
15619 (with-directory-excursion "/tmp"
15620 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15623 `(("python-llvmlite" ,python-llvmlite)
15624 ("python-numpy" ,python-numpy)
15625 ("python-singledispatch" ,python-singledispatch)))
15626 ;; Needed for tests.
15628 `(("python-jinja2" ,python-jinja2)
15629 ("python-pygments" ,python-pygments)))
15630 (home-page "https://numba.pydata.org")
15631 (synopsis "Compile Python code using LLVM")
15632 (description "Numba gives you the power to speed up your applications with
15633 high performance functions written directly in Python. With a few
15634 annotations, array-oriented and math-heavy Python code can be just-in-time
15635 compiled to native machine instructions, similar in performance to C, C++ and
15636 Fortran, without having to switch languages or Python interpreters.
15638 Numba works by generating optimized machine code using the LLVM compiler
15639 infrastructure at import time, runtime, or statically (using the included pycc
15641 (license license:bsd-3)))
15643 (define-public python-anndata
15645 (name "python-anndata")
15650 (uri (pypi-uri "anndata" version))
15653 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15654 (build-system python-build-system)
15656 `(("python-h5py" ,python-h5py)
15657 ("python-natsort" ,python-natsort)
15658 ("python-pandas" ,python-pandas)
15659 ("python-scipy" ,python-scipy)))
15660 (home-page "https://github.com/theislab/anndata")
15661 (synopsis "Annotated data for data analysis pipelines")
15662 (description "Anndata is a package for simple (functional) high-level APIs
15663 for data analysis pipelines. In this context, it provides an efficient,
15664 scalable way of keeping track of data together with learned annotations and
15665 reduces the code overhead typically encountered when using a mostly
15666 object-oriented library such as @code{scikit-learn}.")
15667 (license license:bsd-3)))
15669 (define-public python-dill
15671 (name "python-dill")
15672 (version "0.3.1.1")
15676 (uri (pypi-uri "dill" version))
15678 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15679 (build-system python-build-system)
15682 (modify-phases %standard-phases
15685 (with-directory-excursion "/tmp"
15686 (invoke "nosetests" "-v"))
15689 `(("python-nose" ,python-nose)))
15690 (home-page "https://pypi.org/project/dill/")
15691 (synopsis "Serialize all of Python")
15692 (description "Dill extends Python's @code{pickle} module for serializing
15693 and de-serializing Python objects to the majority of the built-in Python
15694 types. Dill provides the user the same interface as the @code{pickle} module,
15695 and also includes some additional features. In addition to pickling Python
15696 objects, @code{dill} provides the ability to save the state of an interpreter
15697 session in a single command. Hence, it would be feasible to save a
15698 interpreter session, close the interpreter, ship the pickled file to another
15699 computer, open a new interpreter, unpickle the session and thus continue from
15700 the saved state of the original interpreter session.")
15701 (license license:bsd-3)))
15703 (define-public python-multiprocess
15705 (name "python-multiprocess")
15710 (uri (pypi-uri "multiprocess" version))
15713 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15714 (build-system python-build-system)
15717 (modify-phases %standard-phases
15718 (add-after 'unpack 'disable-broken-tests
15720 ;; This test is broken as there is no keyboard interrupt.
15721 (substitute* "py3.7/multiprocess/tests/__init__.py"
15722 (("^(.*)def test_wait_result"
15724 (string-append indent
15725 "@unittest.skip(\"Disabled by Guix\")\n"
15728 ;; Tests must be run after installation.
15730 (add-after 'install 'check
15731 (lambda* (#:key inputs outputs #:allow-other-keys)
15732 (add-installed-pythonpath inputs outputs)
15733 (invoke "python" "-m" "multiprocess.tests")
15736 `(("python-dill" ,python-dill)))
15737 (home-page "https://pypi.org/project/multiprocess/")
15738 (synopsis "Multiprocessing and multithreading in Python")
15740 "This package is a fork of the multiprocessing Python package, a package
15741 which supports the spawning of processes using the API of the standard
15742 library's @code{threading} module.")
15743 (license license:bsd-3)))
15745 (define-public python-toolz
15747 (name "python-toolz")
15752 (uri (pypi-uri "toolz" version))
15755 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15756 (build-system python-build-system)
15757 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15758 ;; unregistered loader type"
15759 (arguments '(#:tests? #f))
15760 (home-page "https://github.com/pytoolz/toolz/")
15761 (synopsis "List processing tools and functional utilities")
15763 "This package provides a set of utility functions for iterators,
15764 functions, and dictionaries.")
15765 (license license:bsd-3)))
15767 (define-public python2-toolz
15768 (package-with-python2 python-toolz))
15770 (define-public python-cytoolz
15772 (name "python-cytoolz")
15773 (version "0.9.0.1")
15777 (uri (pypi-uri "cytoolz" version))
15780 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15781 (build-system python-build-system)
15782 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15784 (arguments '(#:tests? #f))
15786 `(("python-toolz" ,python-toolz)))
15788 `(("python-cython" ,python-cython)))
15789 (home-page "https://github.com/pytoolz/cytoolz")
15790 (synopsis "High performance functional utilities")
15792 "The cytoolz package implements the same API as provided by toolz. The
15793 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15794 that is accessible to other projects developed in Cython.")
15795 (license license:bsd-3)))
15797 (define-public python-sortedcontainers
15799 (name "python-sortedcontainers")
15804 (uri (pypi-uri "sortedcontainers" version))
15807 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15808 (build-system python-build-system)
15810 `(("python-tox" ,python-tox)))
15811 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15812 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15814 "This package provides a sorted collections library, written in
15816 (license license:asl2.0)))
15818 (define-public python-cloudpickle
15820 (name "python-cloudpickle")
15825 (uri (pypi-uri "cloudpickle" version))
15828 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15829 (build-system python-build-system)
15830 ;; FIXME: there are 5 errors in 122 tests:
15831 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15832 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15833 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15834 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15835 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15836 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15837 (arguments '(#:tests? #f))
15839 `(("python-pytest" ,python-pytest)
15840 ("python-mock" ,python-mock)
15841 ("python-tornado" ,python-tornado)))
15842 (home-page "https://github.com/cloudpipe/cloudpickle")
15843 (synopsis "Extended pickling support for Python objects")
15845 "Cloudpickle makes it possible to serialize Python constructs not
15846 supported by the default pickle module from the Python standard library. It
15847 is especially useful for cluster computing where Python expressions are
15848 shipped over the network to execute on remote hosts, possibly close to the
15850 (license license:bsd-3)))
15852 (define-public python2-cloudpickle
15853 (package-with-python2 python-cloudpickle))
15855 (define-public python-locket
15857 (name "python-locket")
15862 (uri (pypi-uri "locket" version))
15865 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15866 (build-system python-build-system)
15867 (home-page "https://github.com/mwilliamson/locket.py")
15868 (synopsis "File-based locks for Python")
15870 "Locket implements a lock that can be used by multiple processes provided
15871 they use the same path.")
15872 (license license:bsd-2)))
15874 (define-public python2-locket
15875 (package-with-python2 python-locket))
15877 (define-public python-blosc
15879 (name "python-blosc")
15884 (uri (pypi-uri "blosc" version))
15887 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15888 (build-system python-build-system)
15889 ;; FIXME: all tests pass, but then this error is printed:
15890 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15891 (arguments '(#:tests? #f))
15893 `(("python-numpy" ,python-numpy)))
15894 (home-page "https://github.com/blosc/python-blosc")
15895 (synopsis "Python wrapper for the Blosc data compressor library")
15896 (description "Blosc is a high performance compressor optimized for binary
15897 data. It has been designed to transmit data to the processor cache faster
15898 than the traditional, non-compressed, direct memory fetch approach via a
15899 @code{memcpy()} system call.
15901 Blosc works well for compressing numerical arrays that contains data with
15902 relatively low entropy, like sparse data, time series, grids with
15903 regular-spaced values, etc.
15905 This Python package wraps the Blosc library.")
15906 (license license:bsd-3)))
15908 (define-public python2-blosc
15909 (package-with-python2 python-blosc))
15911 (define-public python-partd
15913 (name "python-partd")
15918 (uri (pypi-uri "partd" version))
15921 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15922 (build-system python-build-system)
15924 `(("python-blosc" ,python-blosc)
15925 ("python-locket" ,python-locket)
15926 ("python-numpy" ,python-numpy)
15927 ("python-pandas" ,python-pandas)
15928 ("python-pyzmq" ,python-pyzmq)
15929 ("python-toolz" ,python-toolz)))
15930 (home-page "https://github.com/dask/partd/")
15931 (synopsis "Appendable key-value storage")
15932 (description "Partd stores key-value pairs. Values are raw bytes. We
15933 append on old values. Partd excels at shuffling operations.")
15934 (license license:bsd-3)))
15936 (define-public python2-partd
15937 (package-with-python2 python-partd))
15939 (define-public python-fsspec
15941 (name "python-fsspec")
15946 (uri (pypi-uri "fsspec" version))
15949 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15950 (build-system python-build-system)
15951 (arguments '(#:tests? #f)) ; there are none
15952 (home-page "https://github.com/intake/filesystem_spec")
15953 (synopsis "File-system specification")
15954 (description "The purpose of this package is to produce a template or
15955 specification for a file-system interface, that specific implementations
15956 should follow, so that applications making use of them can rely on a common
15957 behavior and not have to worry about the specific internal implementation
15958 decisions with any given backend.")
15959 (license license:bsd-3)))
15961 (define-public python-dask
15963 (name "python-dask")
15968 (uri (pypi-uri "dask" version))
15970 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15971 (build-system python-build-system)
15974 (modify-phases %standard-phases
15975 (add-after 'unpack 'disable-broken-tests
15977 ;; This test is marked as xfail when pytest-xdist is used.
15978 (substitute* "dask/tests/test_threaded.py"
15979 (("def test_interrupt\\(\\)" m)
15980 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15982 ;; This one fails with a type error:
15983 ;; TypeError: Already tz-aware, use tz_convert to convert.
15984 (substitute* "dask/dataframe/tests/test_shuffle.py"
15985 (("def test_set_index_timestamp\\(\\)" m)
15986 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15990 (lambda _ (invoke "pytest" "-vv"))))))
15992 `(("python-cloudpickle" ,python-cloudpickle)
15993 ("python-fsspec" ,python-fsspec)
15994 ("python-numpy" ,python-numpy)
15995 ("python-packaging" ,python-packaging)
15996 ("python-pandas" ,python-pandas)
15997 ("python-partd" ,python-partd)
15998 ("python-toolz" ,python-toolz)
15999 ("python-pyyaml" ,python-pyyaml)))
16001 `(("python-pytest" ,python-pytest)
16002 ("python-pytest-runner" ,python-pytest-runner)))
16003 (home-page "https://github.com/dask/dask/")
16004 (synopsis "Parallel computing with task scheduling")
16006 "Dask is a flexible parallel computing library for analytics. It
16007 consists of two components: dynamic task scheduling optimized for computation,
16008 and large data collections like parallel arrays, dataframes, and lists that
16009 extend common interfaces like NumPy, Pandas, or Python iterators to
16010 larger-than-memory or distributed environments. These parallel collections
16011 run on top of the dynamic task schedulers. ")
16012 (license license:bsd-3)))
16014 (define-public python-ilinkedlist
16016 (name "python-ilinkedlist")
16021 (uri (pypi-uri "ilinkedlist" version))
16024 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16025 (build-system python-build-system)
16026 (native-inputs `(("python-pytest" ,python-pytest)))
16027 (inputs `(("python" ,python)))
16028 (home-page "https://github.com/luther9/ilinkedlist-py")
16029 (synopsis "Immutable linked list library")
16031 "This is a implementation of immutable linked lists for Python. It
16032 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16033 Since a linked list is treated as immutable, it is hashable, and its length
16034 can be retrieved in constant time. Some of the terminology is inspired by
16035 LISP. It is possible to create an improper list by creating a @code{Pair}
16036 with a non-list @code{cdr}.")
16037 (license license:gpl3+)))
16039 (define-public python-readlike
16041 (name "python-readlike")
16046 (uri (pypi-uri "readlike" version))
16048 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16049 (build-system python-build-system)
16050 (home-page "https://github.com/jangler/readlike")
16051 (synopsis "GNU Readline-like line editing module")
16053 "This Python module provides line editing functions similar to the default
16054 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16055 @code{readline} package, this one allows access to those capabilties in settings
16056 outside of a standard command-line interface. It is especially well-suited to
16057 interfacing with Urwid, due to a shared syntax for describing key inputs.
16059 Currently, all stateless Readline commands are implemented. Yanking and history
16060 are not supported.")
16061 (license license:expat)))
16063 (define-public python2-readlike
16064 (package-with-python2 python-readlike))
16066 (define-public python-reparser
16068 (name "python-reparser")
16073 (uri (pypi-uri "ReParser" version))
16075 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16076 (build-system python-build-system)
16077 (home-page "https://github.com/xmikos/reparser")
16078 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16080 "This Python library provides a simple lexer/parser for inline markup based
16081 on regular expressions.")
16082 (license license:expat)))
16084 (define-public python2-reparser
16085 (let ((reparser (package-with-python2
16086 (strip-python2-variant python-reparser))))
16087 (package (inherit reparser)
16089 `(("python2-enum34" ,python2-enum34)
16090 ,@(package-propagated-inputs reparser))))))
16092 (define-public python-precis-i18n
16094 (name "python-precis-i18n")
16099 (uri (pypi-uri "precis_i18n" version))
16102 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16103 (build-system python-build-system)
16104 (home-page "https://github.com/byllyfish/precis_i18n")
16105 (synopsis "Implementation of the PRECIS framework")
16107 "This module implements the PRECIS Framework as described in RFC 8264,
16108 RFC 8265 and RFC 8266.")
16109 (license license:expat)))
16111 (define-public python-absl-py
16113 (name "python-absl-py")
16118 (uri (pypi-uri "absl-py" version))
16121 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16122 (build-system python-build-system)
16124 `(("python-six" ,python-six)))
16125 (home-page "https://github.com/abseil/abseil-py")
16126 (synopsis "Abseil Python common libraries")
16128 "This package provides the Abseil Python Common Libraries, a collection
16129 of Python libraries for building Python applications.")
16130 (license license:asl2.0)))
16132 (define-public python-astor
16134 (name "python-astor")
16139 (uri (pypi-uri "astor" version))
16142 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16143 (build-system python-build-system)
16144 ;; FIXME: There are two errors and two test failures.
16145 (arguments `(#:tests? #f))
16146 (home-page "https://github.com/berkerpeksag/astor")
16147 (synopsis "Read and write Python ASTs")
16148 (description "Astor is designed to allow easy manipulation of Python
16149 source via the Abstract Syntax Tree.")
16150 (license license:bsd-3)))
16152 (define-public python2-astor
16153 (package-with-python2 python-astor))
16155 (define-public python-grpcio
16157 (name "python-grpcio")
16162 (uri (pypi-uri "grpcio" version))
16165 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16166 (build-system python-build-system)
16168 `(("python-six" ,python-six)))
16169 (home-page "https://grpc.io")
16170 (synopsis "HTTP/2-based RPC framework")
16171 (description "This package provides a Python library for communicating
16172 with the HTTP/2-based RPC framework gRPC.")
16173 (license license:asl2.0)))
16175 (define-public python-astunparse
16177 (name "python-astunparse")
16182 (uri (pypi-uri "astunparse" version))
16184 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16185 (build-system python-build-system)
16186 (arguments '(#:tests? #f)) ; there are none
16188 `(("python-six" ,python-six)
16189 ("python-wheel" ,python-wheel)))
16190 (home-page "https://github.com/simonpercivall/astunparse")
16191 (synopsis "AST unparser for Python")
16192 (description "This package provides an AST unparser for Python. It is a
16193 factored out version of @code{unparse} found in the Python source
16195 (license license:bsd-3)))
16197 (define-public python-gast
16199 (name "python-gast")
16204 (uri (pypi-uri "gast" version))
16206 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16207 (build-system python-build-system)
16209 `(("python-astunparse" ,python-astunparse)))
16210 (home-page "https://pypi.org/project/gast/")
16211 (synopsis "Generic Python AST that abstracts the underlying Python version")
16213 "GAST provides a compatibility layer between the AST of various Python
16214 versions, as produced by @code{ast.parse} from the standard @code{ast}
16216 (license license:bsd-3)))
16218 (define-public python-wikidata
16220 (name "python-wikidata")
16225 (uri (pypi-uri "Wikidata" version))
16228 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16229 (build-system python-build-system)
16231 `(("python-babel" ,python-babel)))
16232 (home-page "https://github.com/dahlia/wikidata")
16233 (synopsis "Wikidata client library")
16235 "This package provides a Python interface to
16236 @url{https://www.wikidata.org/, Wikidata}.")
16237 (properties '((upstream-name . "Wikidata")))
16238 (license license:gpl3+)))
16240 (define-public python-doctest-ignore-unicode
16242 (name "python-doctest-ignore-unicode")
16247 (uri (pypi-uri "doctest-ignore-unicode" version))
16250 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16251 (build-system python-build-system)
16253 `(("python-nose" ,python-nose)))
16254 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16255 (synopsis "Ignore Unicode literal prefixes in doctests")
16257 "This package adds support for a flag to ignore Unicode literal prefixes
16259 (license license:asl2.0)))
16261 (define-public python-attr
16263 (name "python-attr")
16268 (uri (pypi-uri "attr" version))
16271 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16272 (build-system python-build-system)
16273 (home-page "https://github.com/denis-ryzhkov/attr")
16274 (synopsis "Decorator for attributes of target function or class")
16275 (description "Simple decorator to set attributes of target function or
16276 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16277 (license license:expat)))
16279 (define-public python-construct
16281 (name "python-construct")
16286 (uri (pypi-uri "construct" version))
16289 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16290 (build-system python-build-system)
16292 `(#:tests? #f)) ; No tests exist.
16294 `(("python-extras" ,python-extras)
16295 ("python-arrow" ,python-arrow)
16296 ("python-numpy" ,python-numpy)
16297 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16298 (home-page "http://construct.readthedocs.io")
16299 (synopsis "Declarative and symmetrical parser and builder for binary data")
16301 "This package provides both simple, atomic constructs (such as
16302 integers of various sizes), as well as composite ones which allow you
16303 form hierarchical and sequential structures of increasing complexity.
16304 It features bit and byte granularity, easy debugging and testing, an
16305 easy-to-extend subclass system, and lots of primitive constructs to
16306 make your work easier.")
16307 (license license:expat)))
16309 (define-public python-humanize
16311 (name "python-humanize")
16316 (uri (pypi-uri "humanize" version))
16319 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16321 '(#:tests? #f)) ; tests not in pypi archive
16322 (build-system python-build-system)
16323 (home-page "https://github.com/jmoiron/humanize")
16324 (synopsis "Print numerical information in a human-readable form")
16325 (description "This package provides a Python module that displays numbers
16326 and dates in \"human readable\" forms. For example, it would display
16327 \"12345591313\" as \"12.3 billion\".")
16328 (license license:expat)))
16330 (define-public python-txaio
16332 (name "python-txaio")
16337 (uri (pypi-uri "txaio" version))
16340 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16341 (build-system python-build-system)
16343 `(("python-twisted" ,python-twisted)
16344 ("python-six" ,python-six)))
16345 (home-page "https://github.com/crossbario/txaio")
16346 (synopsis "Compatibility layer between Python asyncio and Twisted")
16347 (description "Txaio provides a compatibility layer between the Python
16348 @code{asyncio} module and @code{Twisted}.")
16349 (license license:expat)))
16351 (define-public python-toolshed
16353 (name "python-toolshed")
16358 (uri (pypi-uri "toolshed" version))
16361 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16362 (build-system python-build-system)
16364 `(("python-nose" ,python-nose)))
16365 (home-page "https://github.com/brentp/toolshed/")
16366 (synopsis "Collection of modules and functions for working with data")
16367 (description "This is a collection of well-tested, simple modules and
16368 functions that aim to reduce boilerplate when working with data.")
16369 (license license:bsd-2)))
16371 (define-public python-annoy
16373 (name "python-annoy")
16378 (uri (pypi-uri "annoy" version))
16381 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16382 (build-system python-build-system)
16384 `(("python-nose" ,python-nose)))
16385 (home-page "https://github.com/spotify/annoy/")
16386 (synopsis "Approximate nearest neighbors library")
16388 "Annoy is a C++ library with Python bindings to search for points in
16389 space that are close to a given query point. It also creates large read-only
16390 file-based data structures that are @code{mmap}ped into memory so that many
16391 processes may share the same data.")
16392 (license license:asl2.0)))
16394 (define-public python-pylzma
16396 (name "python-pylzma")
16401 (uri (pypi-uri "pylzma" version))
16404 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16405 (build-system python-build-system)
16406 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16407 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16408 (description "This package provides Python bindings for the LZMA library
16410 (license license:lgpl2.1+)))
16412 (define-public python2-pylzma
16413 (package-with-python2 python-pylzma))
16415 (define-public python2-zeroconf
16417 (name "python2-zeroconf")
16419 ;; This is the last version that supports Python 2.x.
16424 (uri (pypi-uri "zeroconf" version))
16427 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16428 (build-system python-build-system)
16430 `(#:python ,python-2
16432 (modify-phases %standard-phases
16433 (add-after 'unpack 'patch-requires
16434 (lambda* (#:key inputs #:allow-other-keys)
16435 (substitute* "setup.py"
16440 `(("python2-six" ,python2-six)
16441 ("python2-enum32" ,python2-enum34)
16442 ("python2-netifaces" ,python2-netifaces)
16443 ("python2-typing" ,python2-typing)))
16444 (home-page "https://github.com/jstasiak/python-zeroconf")
16445 (synopsis "Pure Python mDNS service discovery")
16447 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16449 (license license:lgpl2.1+)))
16451 (define-public python-bsddb3
16453 (name "python-bsddb3")
16458 (uri (pypi-uri "bsddb3" version))
16461 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16462 (build-system python-build-system)
16467 (modify-phases %standard-phases
16468 (add-after 'unpack 'configure-locations
16469 (lambda* (#:key inputs #:allow-other-keys)
16470 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16471 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16475 (invoke "python3" "test3.py" "-v"))))))
16476 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16477 (synopsis "Python bindings for Oracle Berkeley DB")
16479 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16480 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16481 Transaction objects, and each of these is exposed as a Python type in the
16482 bsddb3.db module. The database objects can use various access methods: btree,
16483 hash, recno, and queue. Complete support of Berkeley DB distributed
16484 transactions. Complete support for Berkeley DB Replication Manager.
16485 Complete support for Berkeley DB Base Replication. Support for RPC.")
16486 (license license:bsd-3)))
16488 (define-public python-dbfread
16490 (name "python-dbfread")
16494 (uri (pypi-uri "dbfread" version))
16497 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16498 (build-system python-build-system)
16500 `(("python-pytest" ,python-pytest)))
16501 (home-page "https://dbfread.readthedocs.io")
16502 (synopsis "Read DBF Files with Python")
16504 "This library reads DBF files and returns the data as native Python data
16505 types for further processing. It is primarily intended for batch jobs and
16507 (license license:expat)))
16509 (define-public python-cached-property
16511 (name "python-cached-property")
16516 (uri (pypi-uri "cached-property" version))
16519 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16520 (build-system python-build-system)
16523 (modify-phases %standard-phases
16524 ;; https://github.com/pydanny/cached-property/issues/131
16525 ;; recent versions of freezegun break one test
16526 (add-after 'unpack 'disable-broken-test
16528 (substitute* "tests/test_cached_property.py"
16529 (("def test_threads_ttl_expiry\\(self\\)" m)
16530 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16534 `(("python-freezegun" ,python-freezegun)))
16536 "https://github.com/pydanny/cached-property")
16538 "Decorator for caching properties in classes")
16540 "This package provides a decorator which makes caching
16541 time-or-computationally-expensive properties quick and easy and works in Python
16543 (license license:bsd-3)))
16545 (define-public python-folium
16547 (name "python-folium")
16552 (uri (pypi-uri "folium" version))
16555 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16556 (build-system python-build-system)
16558 `(("python-branca" ,python-branca)
16559 ("python-jinja2" ,python-jinja2)
16560 ("python-numpy" ,python-numpy)
16561 ("python-requests" ,python-requests)))
16563 `(("python-pytest" ,python-pytest)))
16564 (home-page "https://github.com/python-visualization/folium")
16565 (synopsis "Make beautiful maps with Leaflet.js & Python")
16566 (description "@code{folium} makes it easy to visualize data that’s been
16567 manipulated in Python on an interactive leaflet map. It enables both the
16568 binding of data to a map for @code{choropleth} visualizations as well as
16569 passing rich vector/raster/HTML visualizations as markers on the map.
16571 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16572 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16573 supports Image, Video, GeoJSON and TopoJSON overlays.")
16574 (license license:expat)))
16576 (define-public jube
16578 ;; This is a command-line tool, so no "python-" prefix.
16583 (uri (string-append
16584 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16588 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16589 (file-name (string-append "jube-" version ".tar.gz"))))
16590 (build-system python-build-system)
16591 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16592 (synopsis "Benchmarking environment")
16594 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16595 benchmarked application, benchmark data is stored in a format that allows JUBE
16596 to deduct the desired information. This data can be parsed by automatic pre-
16597 and post-processing scripts that draw information and store it more densely
16598 for manual interpretation.")
16599 (license license:gpl3+)))
16601 (define-public python-pyroutelib3
16603 (name "python-pyroutelib3")
16604 (version "1.3.post1")
16608 (uri (pypi-uri "pyroutelib3" version))
16611 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16612 (build-system python-build-system)
16614 `(("python-dateutil" ,python-dateutil)))
16615 (home-page "https://github.com/MKuranowski/pyroutelib3")
16616 (synopsis "Library for simple routing on OSM data")
16617 (description "Library for simple routing on OSM data")
16618 (license license:gpl3+)))
16620 (define-public python-elementpath
16622 (name "python-elementpath")
16627 (uri (pypi-uri "elementpath" version))
16630 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16631 (build-system python-build-system)
16633 "https://github.com/sissaschool/elementpath")
16635 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16637 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16638 for Python's ElementTree XML data structures, both for the standard
16639 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16641 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16642 because lxml.etree already has it's own implementation of XPath 1.0.")
16643 (license license:expat)))
16645 (define-public python-bibtexparser
16647 (name "python-bibtexparser")
16652 (uri (pypi-uri "bibtexparser" version))
16655 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16656 (build-system python-build-system)
16658 `(("python-pyparsing" ,python-pyparsing)))
16660 `(("python-future" ,python-future)))
16661 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16662 (synopsis "Python library to parse BibTeX files")
16663 (description "BibtexParser is a Python library to parse BibTeX files.")
16664 (license (list license:bsd-3 license:lgpl3))))
16666 (define-public python-distro
16668 (name "python-distro")
16673 (uri (pypi-uri "distro" version))
16676 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16677 (build-system python-build-system)
16679 `(("python-pytest" ,python-pytest)))
16680 (home-page "https://github.com/nir0s/distro")
16682 "OS platform information API")
16684 "@code{distro} provides information about the OS distribution it runs on,
16685 such as a reliable machine-readable ID, or version information.
16687 It is the recommended replacement for Python's original
16688 `platform.linux_distribution` function (which will be removed in Python 3.8).
16689 @code{distro} also provides a command-line interface to output the platform
16690 information in various formats.")
16691 (license license:asl2.0)))
16693 (define-public python-cairosvg
16695 (name "python-cairosvg")
16700 (uri (pypi-uri "CairoSVG" version))
16702 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16703 (build-system python-build-system)
16706 (modify-phases %standard-phases
16708 (lambda _ (invoke "pytest"))))))
16710 `(("python-cairocffi" ,python-cairocffi)
16711 ("python-cssselect2" ,python-cssselect2)
16712 ("python-defusedxml" ,python-defusedxml)
16713 ("python-pillow" ,python-pillow)
16714 ("python-tinycss2" ,python-tinycss2)))
16716 `(("python-pytest-flake8" ,python-pytest-flake8)
16717 ("python-pytest-isort" ,python-pytest-isort)
16718 ("python-pytest-runner" ,python-pytest-runner)))
16719 (home-page "https://cairosvg.org/")
16720 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16721 (description "CairoSVG is a SVG converter based on Cairo. It can export
16722 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16723 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16724 parsed, the result is drawn to a Cairo surface that can be exported to
16725 qvarious formats: PDF, PostScript, PNG and even SVG.")
16726 (license license:lgpl3+)))
16728 (define-public python-pyphen
16730 (name "python-pyphen")
16735 (uri (pypi-uri "Pyphen" version))
16737 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16738 (build-system python-build-system)
16739 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16740 ;; embedded set provided by upstream - like Debian does.
16741 (home-page "https://github.com/Kozea/Pyphen")
16742 (synopsis "Pure Python module to hyphenate text")
16743 (description "Pyphen is a pure Python module to hyphenate text using
16744 existing Hunspell hyphenation dictionaries.")
16745 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16747 (define-public python-intelhex
16749 (name "python-intelhex")
16754 (uri (pypi-uri "intelhex" version))
16757 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16758 (build-system python-build-system)
16759 (arguments '(#:tests? #f)) ;issue with version
16760 (home-page "https://pypi.org/project/IntelHex/")
16761 (synopsis "Python library for Intel HEX files manipulations")
16762 (description "The Intel HEX file format is widely used in microprocessors
16763 and microcontrollers area (embedded systems etc.) as the de facto standard for
16764 representation of code to be programmed into microelectronic devices. This
16765 package provides an intelhex Python library to read, write, create from
16766 scratch and manipulate data from Intel HEX file format. It also includes
16767 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16768 converters and more, those based on the library itself.")
16769 (license license:bsd-3)))
16771 (define-public python-pykwalify
16773 (name "python-pykwalify")
16778 (uri (pypi-uri "pykwalify" version))
16781 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16782 (build-system python-build-system)
16783 (arguments '(#:tests? #f)) ;missing dependencies
16785 `(("python-dateutil" ,python-dateutil)
16786 ("python-docopt" ,python-docopt)
16787 ("python-pyyaml" ,python-pyyaml)))
16788 (home-page "https://github.com/grokzen/pykwalify")
16790 "Python lib/cli for JSON/YAML schema validation")
16792 "This package provides a parser, schema validator, and data binding tool
16793 for YAML and JSON.")
16794 (license license:expat)))
16796 (define-public python-dbusmock
16798 (name "python-dbusmock")
16803 (uri (pypi-uri "python-dbusmock" version))
16806 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16807 (build-system python-build-system)
16810 (modify-phases %standard-phases
16811 (add-after 'unpack 'patch-shell-path
16813 (substitute* "tests/test_code.py"
16814 (("/bin/bash") (which "bash")))
16818 ("dbus" ,dbus) ; for dbus-daemon
16819 ("python-nose" ,python-nose)
16822 `(("python-dbus" ,python-dbus)
16823 ("python-pygobject" ,python-pygobject)))
16824 (home-page "https://github.com/martinpitt/python-dbusmock")
16825 (synopsis "Python library for mock D-Bus objects")
16826 (description "python-dbusmock allows for the easy creation of mock objects on
16827 D-Bus. This is useful for writing tests for software which talks to D-Bus
16828 services such as upower, systemd, logind, gnome-session or others, and it is
16829 hard (or impossible without root privileges) to set the state of the real
16830 services to what you expect in your tests.")
16831 (license license:lgpl3+)))
16833 (define-public python-ujson
16835 (name "python-ujson")
16840 (uri (pypi-uri "ujson" version))
16843 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16844 (build-system python-build-system)
16845 (home-page "http://www.esn.me")
16847 "Ultra fast JSON encoder and decoder for Python")
16849 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16850 bindings for Python 2.5+ and 3.")
16851 (license license:bsd-3)))
16853 (define-public python2-ujson
16854 (package-with-python2 python-ujson))
16856 (define-public python-iocapture
16857 ;; The latest release is more than a year older than this commit.
16858 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16861 (name "python-iocapture")
16866 (uri (git-reference
16867 (url "https://github.com/oinume/iocapture.git")
16869 (file-name (git-file-name name version))
16872 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16873 (build-system python-build-system)
16876 (modify-phases %standard-phases
16878 (add-after 'install 'check
16879 (lambda* (#:key inputs outputs #:allow-other-keys)
16880 (add-installed-pythonpath inputs outputs)
16881 (invoke "py.test" "-v" "tests")
16884 `(("python-flexmock" ,python-flexmock)
16885 ("python-pytest" ,python-pytest)
16886 ("python-pytest-cov" ,python-pytest-cov)
16887 ("python-six" ,python-six)))
16888 (home-page "https://github.com/oinume/iocapture")
16889 (synopsis "Python capturing tool for stdout and stderr")
16891 "This package helps you to capture the standard out (stdout) and the
16892 standard error channel (stderr) in your program.")
16893 (license license:expat))))
16895 (define-public python-argh
16896 ;; There are 21 commits since the latest release containing important
16898 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16901 (name "python-argh")
16902 (version (git-version "0.26.2" revision commit))
16906 (uri (git-reference
16907 (url "https://github.com/neithere/argh.git")
16909 (file-name (git-file-name name version))
16912 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16913 (build-system python-build-system)
16915 `(("python-iocapture" ,python-iocapture)
16916 ("python-mock" ,python-mock)
16917 ("python-pytest" ,python-pytest)
16918 ("python-pytest-cov" ,python-pytest-cov)
16919 ("python-pytest-xdist" ,python-pytest-xdist)
16920 ("python-tox" ,python-tox)))
16921 (home-page "https://github.com/neithere/argh/")
16922 (synopsis "Argparse wrapper with natural syntax")
16924 "python-argh is a small library that provides several layers of
16925 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16926 always possible to declare a command with the highest possible (and least
16927 flexible) layer and then tune the behaviour with any of the lower layers
16928 including the native API of @code{python-argparse}.")
16929 (license license:lgpl3+))))
16931 (define-public python-ppft
16933 (name "python-ppft")
16934 (version "1.6.6.1")
16938 (uri (pypi-uri "ppft" version))
16941 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16942 (build-system python-build-system)
16943 (arguments '(#:tests? #f)) ; there are none
16945 `(("python-six" ,python-six)))
16946 (home-page "https://pypi.org/project/ppft/")
16947 (synopsis "Fork of Parallel Python")
16949 "This package is a fork of Parallel Python. The Parallel Python
16950 module (@code{pp}) provides an easy and efficient way to create
16951 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16952 computers and clusters. It features cross-platform portability and dynamic
16954 (license license:bsd-3)))
16956 (define-public python-pox
16958 (name "python-pox")
16963 (uri (pypi-uri "pox" version))
16966 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16967 (build-system python-build-system)
16970 (modify-phases %standard-phases
16973 (mkdir-p "/tmp/guix")
16974 (setenv "SHELL" "bash")
16975 (setenv "USERNAME" "guix")
16976 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16977 (invoke "py.test" "-vv")
16980 `(("python-pytest" ,python-pytest)
16982 (home-page "https://pypi.org/project/pox/")
16983 (synopsis "Python utilities for filesystem exploration and automated builds")
16985 "Pox provides a collection of utilities for navigating and manipulating
16986 filesystems. This module is designed to facilitate some of the low level
16987 operating system interactions that are useful when exploring a filesystem on a
16988 remote host. Pox provides Python equivalents of several shell commands such
16989 as @command{which} and @command{find}. These commands allow automated
16990 discovery of what has been installed on an operating system, and where the
16991 essential tools are located.")
16992 (license license:bsd-3)))
16994 (define-public python-pathos
16996 (name "python-pathos")
17001 (uri (pypi-uri "pathos" version))
17004 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17005 (build-system python-build-system)
17008 (modify-phases %standard-phases
17011 (setenv "PYTHONPATH"
17012 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17013 (invoke "python" "./tests/__main__.py"))))))
17015 `(("python-dill" ,python-dill)
17016 ("python-multiprocess" ,python-multiprocess)
17017 ("python-pox" ,python-pox)
17018 ("python-ppft" ,python-ppft)))
17020 `(("python-pytest" ,python-pytest)))
17021 (home-page "https://pypi.org/project/pathos/")
17023 "Parallel graph management and execution in heterogeneous computing")
17025 "Python-pathos is a framework for heterogenous computing. It provides a
17026 consistent high-level interface for configuring and launching parallel
17027 computations across heterogenous resources. Python-pathos provides configurable
17028 launchers for parallel and distributed computing, where each launcher contains
17029 the syntactic logic to configure and launch jobs in an execution environment.")
17030 (license license:bsd-3)))
17032 (define-public python-flit
17034 (name "python-flit")
17039 (uri (pypi-uri "flit" version))
17042 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17043 (build-system python-build-system)
17045 `(#:tests? #f)) ; XXX: Check requires network access.
17046 (home-page "https://flit.readthedocs.io/")
17048 "Simple packaging tool for simple packages")
17050 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17051 packages a single importable module or package at a time, using the import
17052 name as the name on PyPI. All subpackages and data files within a package
17053 are included automatically.")
17054 (license license:bsd-3)))
17056 (define-public python-pathtools
17058 (name "python-pathtools")
17063 (uri (pypi-uri "pathtools" version))
17066 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17067 (build-system python-build-system)
17069 "https://github.com/gorakhargosh/pathtools")
17070 (synopsis "Path utilities for Python")
17071 (description "Pattern matching and various utilities for file systems
17073 (license license:expat)))
17075 (define-public python-fastentrypoints
17077 (name "python-fastentrypoints")
17082 (uri (pypi-uri "fastentrypoints" version))
17085 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17086 (build-system python-build-system)
17088 "https://github.com/ninjaaron/fast-entry_points")
17090 "Makes entry_points specified in setup.py load more quickly")
17092 "Using entry_points in your setup.py makes scripts that start really
17093 slowly because it imports pkg_resources. This package allows such setup
17094 scripts to load entry points more quickly.")
17095 (license license:bsd-3)))
17097 (define-public python-funcparserlib
17099 (name "python-funcparserlib")
17104 (uri (pypi-uri "funcparserlib" version))
17107 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17109 `(("python-tox" ,python-tox)))
17112 (modify-phases %standard-phases
17115 (invoke "tox"))))))
17116 (build-system python-build-system)
17118 "https://github.com/vlasovskikh/funcparserlib")
17120 "Recursive descent parsing library based on functional combinators")
17122 "This package is a recursive descent parsing library for Python based on
17123 functional combinators. Parser combinators are just higher-order functions
17124 that take parsers as their arguments and return them as result values.")
17125 (license license:expat)))