1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
70 ;;; This file is part of GNU Guix.
72 ;;; GNU Guix is free software; you can redistribute it and/or modify it
73 ;;; under the terms of the GNU General Public License as published by
74 ;;; the Free Software Foundation; either version 3 of the License, or (at
75 ;;; your option) any later version.
77 ;;; GNU Guix is distributed in the hope that it will be useful, but
78 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
79 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 ;;; GNU General Public License for more details.
82 ;;; You should have received a copy of the GNU General Public License
83 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85 (define-module (gnu packages python-xyz)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (gnu packages)
88 #:use-module (gnu packages algebra)
89 #:use-module (gnu packages adns)
90 #:use-module (gnu packages attr)
91 #:use-module (gnu packages backup)
92 #:use-module (gnu packages bash)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages databases)
97 #:use-module (gnu packages dbm)
98 #:use-module (gnu packages file)
99 #:use-module (gnu packages fontutils)
100 #:use-module (gnu packages gcc)
101 #:use-module (gnu packages geo)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages graphviz)
106 #:use-module (gnu packages graphics)
107 #:use-module (gnu packages gstreamer)
108 #:use-module (gnu packages gtk)
109 #:use-module (gnu packages icu4c)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages libevent)
113 #:use-module (gnu packages libffi)
114 #:use-module (gnu packages linux)
115 #:use-module (gnu packages llvm)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages maths)
118 #:use-module (gnu packages monitoring)
119 #:use-module (gnu packages multiprecision)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages openstack)
123 #:use-module (gnu packages pcre)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages readline)
133 #:use-module (gnu packages sdl)
134 #:use-module (gnu packages search)
135 #:use-module (gnu packages shells)
136 #:use-module (gnu packages sphinx)
137 #:use-module (gnu packages ssh)
138 #:use-module (gnu packages terminals)
139 #:use-module (gnu packages tex)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages video)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages base)
147 #:use-module (gnu packages xml)
148 #:use-module (gnu packages xorg)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages tcl)
151 #:use-module (gnu packages bdw-gc)
152 #:use-module (gnu packages serialization)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix hg-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system gnu)
159 #:use-module (guix build-system cmake)
160 #:use-module (guix build-system python)
161 #:use-module (guix build-system trivial)
162 #:use-module (srfi srfi-1)
163 #:use-module (srfi srfi-26))
165 (define-public python-psutil
167 (name "python-psutil")
172 (uri (pypi-uri "psutil" version))
175 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
176 (build-system python-build-system)
178 ;; FIXME: some tests does not return and times out.
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
201 (define-public python-shapely
203 (name "python-shapely")
204 (version "1.6.4.post2")
208 (uri (pypi-uri "Shapely" version))
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
221 `(("python-numpy" ,python-numpy)))
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
244 (define-public python-shortuuid
246 (name "python-shortuuid")
251 (uri (pypi-uri "shortuuid" version))
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
266 (define-public python-logwrap
268 (name "python-logwrap")
273 (uri (pypi-uri "logwrap" version ".zip"))
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
296 (define-public python-clyent
298 (name "python-clyent")
303 (uri (pypi-uri "clyent" version))
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
319 (define-public python-babel
321 (name "python-babel")
326 (uri (pypi-uri "Babel" version))
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
335 `(("python-pytz" ,python-pytz)))
337 `(#:phases (modify-phases %standard-phases
340 (invoke "pytest" "-vv" "-k"
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
349 "Tools for internationalizing Python applications")
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
356 (license license:bsd-3)))
358 (define-public python2-babel
359 (package-with-python2 python-babel))
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
364 (inherit python2-babel)
368 (uri (pypi-uri "Babel" version))
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373 (define-public python2-backport-ssl-match-hostname
375 (name "python2-backport-ssl-match-hostname")
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
397 (define-public python-boolean.py
399 (name "python-boolean.py")
403 ;; There's no source tarball on PyPI.
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
415 "This is a small Python library that implements boolean algebra.
416 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417 @code{Symbol} class that can take on one of these two values. Calculations
418 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420 Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
423 (define-public python-hdf4
430 (uri (pypi-uri name version))
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
443 (modify-phases %standard-phases
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461 NetCDF files can also be read and modified. Python-HDF4 is a fork of
462 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
465 (define-public python2-hdf4
466 (package-with-python2 python-hdf4))
468 (define-public python-h5py
475 (uri (pypi-uri "h5py" version))
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
481 `(#:tests? #f ; no test target
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
507 "The h5py package provides both a high- and low-level interface to the
508 HDF5 library from Python. The low-level interface is intended to be a
509 complete wrapping of the HDF5 API, while the high-level component supports
510 access to HDF5 files, datasets and groups using established Python and NumPy
512 (license license:bsd-3)))
514 (define-public python2-h5py
515 (package-with-python2 python-h5py))
517 (define-public python-sh
524 (uri (pypi-uri "sh" version))
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
531 (modify-phases %standard-phases
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
536 (invoke "python" "sh.py" "test"))))))
538 `(("python-coverage" ,python-coverage)))
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542 @code{subprocess} feature.")
543 (license license:expat)))
545 (define-public python2-sh
546 (package-with-python2 python-sh))
548 (define-public python-cftime
550 (name "python-cftime")
555 (uri (pypi-uri "cftime" version))
558 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
559 (build-system python-build-system)
561 `(("python-numpy" ,python-numpy)))
563 `(("python-coveralls" ,python-coveralls)
564 ("python-cython" ,python-cython)
565 ("python-pytest-cov" ,python-pytest-cov)))
566 (home-page "https://github.com/Unidata/cftime")
567 (synopsis "Library for time handling")
569 "This package provides time-handling functionality that used to be part
570 of the netcdf4 package before.")
571 ;; This package claims to include code under the GPLv3 but is released
573 (license (list license:isc license:gpl3+))))
575 (define-public python-netcdf4
577 (name "python-netcdf4")
582 (uri (pypi-uri "netCDF4" version))
585 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
586 (build-system python-build-system)
589 (modify-phases %standard-phases
590 (add-after 'unpack 'configure-locations
591 (lambda* (#:key inputs #:allow-other-keys)
592 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
595 `(("python-cython" ,python-cython)))
597 `(("python-numpy" ,python-numpy)
598 ("python-cftime" ,python-cftime)))
603 (home-page "https://github.com/Unidata/netcdf4-python")
604 (synopsis "Python/numpy interface to the netCDF library")
605 (description "Netcdf4-python is a Python interface to the netCDF C
606 library. netCDF version 4 has many features not found in earlier
607 versions of the library and is implemented on top of HDF5. This module
608 can read and write files in both the new netCDF 4 and the old netCDF 3
609 format, and can create files that are readable by HDF5 clients. The
610 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
611 to users of that module.")
612 ;; The software is mainly ISC, but includes some files covered
613 ;; by the Expat license.
614 (license (list license:isc license:expat))))
616 (define-public python2-netcdf4
617 (package-with-python2 python-netcdf4))
619 (define-public python-license-expression
621 (name "python-license-expression")
626 (uri (pypi-uri "license-expression" version))
628 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
629 (build-system python-build-system)
631 `(("python-boolean.py" ,python-boolean.py)))
632 (home-page "https://github.com/nexB/license-expression")
633 (synopsis "Apply boolean logic to license expressions")
635 "This Python module defines a tiny language to evaluate and compare
636 license expressions using boolean logic. Logical combinations of licenses can
637 be tested for equality, containment, and equivalence. They can be normalised
638 and simplified. It supports SPDX license expressions as well as other naming
639 conventions and aliases in the same expression.")
640 (license license:gpl2+)))
642 (define-public python-lockfile
644 (name "python-lockfile")
649 (uri (pypi-uri "lockfile" version))
652 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
653 (build-system python-build-system)
654 (arguments '(#:test-target "check"))
656 `(("python-pbr" ,python-pbr)))
657 (home-page "https://launchpad.net/pylockfile")
658 (synopsis "Platform-independent file locking module")
660 "The lockfile package exports a LockFile class which provides a simple
661 API for locking files.")
662 (license license:expat)))
664 (define-public python2-lockfile
665 (package-with-python2 python-lockfile))
667 (define-public python-semantic-version
669 (name "python-semantic-version")
674 (uri (pypi-uri "semantic_version" version))
677 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
678 (build-system python-build-system)
680 `(#:tests? #f)) ; PyPI tarball lacks tests
681 (home-page "https://github.com/rbarrois/python-semanticversion")
682 (synopsis "Semantic versioning module for Python")
684 "The @code{semantic_version} class is a small library for handling
685 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
687 It can compare versions, generate a new version that represents a bump in one of
688 the version levels, and check whether any given string is a proper semantic
689 version identifier.")
690 (license license:bsd-3)))
692 (define-public python2-semantic-version
693 (package-with-python2 python-semantic-version))
695 (define-public python-serpent
697 (name "python-serpent")
702 (uri (pypi-uri "serpent" version))
704 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
705 (build-system python-build-system)
707 `(("python-attrs" ,python-attrs)
708 ("python-pytz" ,python-pytz)))
709 (home-page "https://github.com/irmen/Serpent")
710 (synopsis "Serializer for literal Python expressions")
712 "Serpent provides @code{ast.literal_eval()}-compatible object tree
713 serialization. It serializes an object tree into bytes (an utf-8 encoded
714 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
715 to rebuild the original object tree.
717 Because only safe literals are encoded, it is safe to send serpent data to
718 other machines, such as over the network.")
719 (license license:expat)))
721 (define-public python-setuptools
723 (name "python-setuptools")
728 (uri (pypi-uri "setuptools" version ".zip"))
731 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
732 (modules '((guix build utils)))
735 ;; Remove included binaries which are used to build self-extracting
736 ;; installers for Windows.
737 ;; TODO: Find some way to build them ourself so we can include them.
738 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
740 (build-system python-build-system)
741 ;; FIXME: Tests require pytest, which itself relies on setuptools.
742 ;; One could bootstrap with an internal untested setuptools.
745 (home-page "https://pypi.python.org/pypi/setuptools")
747 "Library designed to facilitate packaging Python projects")
749 "Setuptools is a fully-featured, stable library designed to facilitate
750 packaging Python projects, where packaging includes:
751 Python package and module definitions,
752 distribution package metadata,
754 project installation,
755 platform-specific details,
757 ;; TODO: setuptools now bundles the following libraries:
758 ;; packaging, pyparsing, six and appdirs. How to unbundle?
759 (license (list license:psfl ; setuptools itself
760 license:expat ; six, appdirs, pyparsing
761 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 (define-public python2-setuptools
765 (package-with-python2 python-setuptools))
767 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
768 (define-public python-setuptools-for-tensorflow
771 (inherit python-setuptools)
774 (inherit (package-source python-setuptools))
775 (uri (pypi-uri "setuptools" version ".zip"))
778 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
780 (define-public python-uniseg
782 (name "python-uniseg")
787 (uri (pypi-uri "uniseg" version ".zip"))
790 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
791 (build-system python-build-system)
793 '(#:tests? #f)) ; The test suite requires network access.
797 "https://bitbucket.org/emptypage/uniseg-python")
799 "Python library to determine Unicode text segmentations")
801 "Uniseg is a Python package used to determine Unicode text segmentations.
802 Supported segmentations include:
804 @item @dfn{Code point} (any value in the Unicode codespace)
805 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
806 multiple Unicode code points, e.g. \"G\" + acute-accent)
811 (license license:expat)))
813 (define-public python2-uniseg
814 (package-with-python2 python-uniseg))
816 (define-public python-humanfriendly
818 (name "python-humanfriendly")
823 (uri (pypi-uri "humanfriendly" version))
826 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
827 (build-system python-build-system)
829 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
832 `(("python-monotonic" ,python-monotonic)))
833 (home-page "https://humanfriendly.readthedocs.io")
834 (synopsis "Human-friendly input and output in Python")
836 "The functions and classes in @code{humanfriendly} can be used to make
837 text interfaces more user-friendly. It includes tools to parse and format
838 numbers, file sizes, and timespans, timers for long-running operations, menus
839 to allow the user to choose from a list of options, and terminal interaction
841 (license license:expat)))
843 (define-public python2-humanfriendly
844 (package-with-python2 python-humanfriendly))
846 (define-public python-capturer
848 (name "python-capturer")
853 (uri (pypi-uri "capturer" version))
856 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
857 (build-system python-build-system)
861 `(("python-humanfriendly" ,python-humanfriendly)))
862 (home-page "https://capturer.readthedocs.io")
863 (synopsis "Capture stdout and stderr streams of the current process")
865 "The capturer package makes it easy to capture the stdout and stderr
866 streams of the current process and subprocesses. Output can be relayed
867 to the terminal in real time but is also available to the Python program
868 for additional processing.")
869 (license license:expat)))
871 (define-public python2-capturer
872 (package-with-python2 python-capturer))
874 (define-public python-case
881 (uri (pypi-uri "case" version))
884 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
885 (build-system python-build-system)
887 `(("python-mock" ,python-mock)
888 ("python-nose" ,python-nose)
889 ("python-six" ,python-six)
890 ("python-unittest2" ,python-unittest2)))
892 `(("python-coverage" ,python-coverage)))
893 (home-page "https://github.com/celery/case")
894 (synopsis "Unittest utilities and convenience methods")
896 "The @code{case} package provides utilities on top of unittest, including
897 some helpful Python 2 compatibility convenience methods.")
898 (license license:bsd-3)))
900 (define-public python-verboselogs
902 (name "python-verboselogs")
907 (uri (pypi-uri "verboselogs" version))
910 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
911 (build-system python-build-system)
913 `(("python-mock" ,python-mock)
914 ("python-astroid" ,python-astroid)
915 ("python-pylint" ,python-pylint)))
916 (home-page "https://verboselogs.readthedocs.io")
917 (synopsis "Verbose logging level for Python's logging module")
919 "The @code{verboselogs} package extends Python's @code{logging} module to
920 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
921 (license license:expat)))
923 (define-public python2-verboselogs
924 (package-with-python2 python-verboselogs))
926 (define-public python-coloredlogs
928 (name "python-coloredlogs")
933 (uri (pypi-uri "coloredlogs" version))
936 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
937 (build-system python-build-system)
939 `(;Tests require some updated modules
942 `(("python-capturer" ,python-capturer)))
943 (home-page "https://coloredlogs.readthedocs.io")
944 (synopsis "Colored stream handler for Python's logging module")
946 "The @code{coloredlogs} package enables colored terminal output for
947 Python's logging module. The @code{ColoredFormatter} class inherits from
948 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
950 (license license:expat)))
952 (define-public python2-coloredlogs
953 (package-with-python2 python-coloredlogs))
955 (define-public python-editorconfig
957 (name "python-editorconfig")
962 (uri (pypi-uri "EditorConfig" version))
965 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
966 (build-system python-build-system)
967 (home-page "https://editorconfig.org/")
968 (synopsis "EditorConfig bindings for python")
969 (description "The EditorConfig project consists of a file format for
970 defining coding styles and a collection of text editor plugins that enable
971 editors to read the file format and adhere to defined styles. EditorConfig
972 files are easily readable and they work nicely with version control systems.")
973 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
974 (license (list license:bsd-2 license:psfl))))
976 (define-public python-et-xmlfile
978 (name "python-et-xmlfile")
983 (uri (pypi-uri "et_xmlfile" version))
986 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
987 (build-system python-build-system)
989 `(#:phases (modify-phases %standard-phases
992 (invoke "pytest"))))))
994 `(("python-pytest" ,python-pytest)
995 ("python-lxml" ,python-lxml))) ;used for the tests
996 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
997 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
998 (description "This Python library is based upon the @code{xmlfile} module
999 from @code{lxml}. It aims to provide a low memory, compatible implementation
1000 of @code{xmlfile}.")
1001 (license license:expat)))
1003 (define-public python2-et-xmlfile
1004 (package-with-python2 python-et-xmlfile))
1006 (define-public python-openpyxl
1008 (name "python-openpyxl")
1012 ;; We use the upstream repository, as the tests are not included in the
1016 (url "https://bitbucket.org/openpyxl/openpyxl")
1017 (changeset version)))
1018 (file-name (string-append name "-" version "-checkout"))
1020 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1021 (build-system python-build-system)
1023 `(#:phases (modify-phases %standard-phases
1026 (invoke "pytest"))))))
1028 ;; For the test suite.
1029 `(("python-lxml" ,python-lxml)
1030 ("python-pillow" ,python-pillow)
1031 ("python-pytest" ,python-pytest)))
1033 `(("python-et-xmlfile" ,python-et-xmlfile)
1034 ("python-jdcal" ,python-jdcal)))
1035 (home-page "https://openpyxl.readthedocs.io")
1036 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1037 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1038 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1040 (license license:expat)))
1042 (define-public python-eventlet
1044 (name "python-eventlet")
1049 (uri (pypi-uri "eventlet" version))
1052 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1053 (build-system python-build-system)
1055 `(("python-greenlet" ,python-greenlet)))
1057 ;; TODO: Requires unpackaged 'enum-compat'.
1059 (home-page "http://eventlet.net")
1060 (synopsis "Concurrent networking library for Python")
1062 "Eventlet is a concurrent networking library for Python that
1063 allows you to change how you run your code, not how you write it.
1064 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1065 Coroutines ensure that the developer uses a blocking style of programming
1066 that is similar to threading, but provide the benefits of non-blocking I/O.
1067 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1068 from the Python interpreter, or as a small part of a larger application.")
1069 (license license:expat)))
1071 (define-public python2-eventlet
1072 (let ((base (package-with-python2
1073 (strip-python2-variant python-eventlet))))
1074 (package (inherit base)
1076 `(("python2-enum34" ,python2-enum34)
1077 ,@(package-propagated-inputs base))))))
1079 (define-public python-six
1086 (uri (pypi-uri "six" version))
1089 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1090 (build-system python-build-system)
1093 (modify-phases %standard-phases
1096 (invoke "py.test" "-v"))))))
1098 `(("python-py" ,python-py)
1099 ("python-pytest" ,python-pytest-bootstrap)))
1100 (home-page "https://pypi.python.org/pypi/six/")
1101 (synopsis "Python 2 and 3 compatibility utilities")
1103 "Six is a Python 2 and 3 compatibility library. It provides utility
1104 functions for smoothing over the differences between the Python versions with
1105 the goal of writing Python code that is compatible on both Python versions.
1106 Six supports every Python version since 2.5. It is contained in only one
1107 Python file, so it can be easily copied into your project.")
1108 (license license:x11)))
1110 (define-public python2-six
1111 (package-with-python2 python-six))
1113 (define-public python-six-bootstrap
1115 (inherit python-six)
1116 (name "python-six-bootstrap")
1118 (arguments `(#:tests? #f))))
1120 (define-public python2-six-bootstrap
1121 (package-with-python2 python-six-bootstrap))
1123 (define-public python-schedule
1125 (name "python-schedule")
1130 (uri (pypi-uri "schedule" version))
1133 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1134 (build-system python-build-system)
1136 `(("python-pytest" ,python-pytest)
1137 ("python-mock" ,python-mock)))
1138 (home-page "https://github.com/dbader/schedule")
1139 (synopsis "Schedule periodic function calls in Python")
1141 "Schedule is an in-process scheduler for periodic jobs that uses the
1142 builder pattern for configuration. Schedule lets you run Python functions (or
1143 any other callable) periodically at pre-determined intervals using a simple,
1144 human-friendly syntax.")
1145 (license license:expat)))
1147 (define-public python2-schedule
1148 (package-with-python2 python-schedule))
1150 (define-public python-pandas
1152 (name "python-pandas")
1157 (uri (pypi-uri "pandas" version))
1159 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1160 (build-system python-build-system)
1162 `(#:modules ((guix build utils)
1163 (guix build python-build-system)
1166 #:phases (modify-phases %standard-phases
1167 (add-after 'unpack 'patch-which
1168 (lambda* (#:key inputs #:allow-other-keys)
1169 (let ((which (assoc-ref inputs "which")))
1170 (substitute* "pandas/io/clipboard/__init__.py"
1171 (("^CHECK_CMD = .*")
1172 (string-append "CHECK_CMD = \"" which "\"\n"))))
1176 (let ((build-directory
1179 (car (scandir "build"
1180 (cut string-prefix? "lib." <>))))))
1181 ;; Disable the "strict data files" option which causes
1182 ;; the build to error out if required data files are
1183 ;; not available (as is the case with PyPI archives).
1184 (substitute* "setup.cfg"
1185 (("addopts = --strict-data-files") "addopts = "))
1186 (with-directory-excursion build-directory
1187 ;; Delete tests that require "moto" which is not yet
1189 (for-each delete-file
1190 '("pandas/tests/io/conftest.py"
1191 "pandas/tests/io/json/test_compression.py"
1192 "pandas/tests/io/parser/test_network.py"
1193 "pandas/tests/io/test_parquet.py"))
1194 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1195 "--skip-network" "-k"
1196 ;; XXX: Due to the deleted tests above.
1197 "not test_read_s3_jsonl"))))))))
1199 `(("python-numpy" ,python-numpy)
1200 ("python-openpyxl" ,python-openpyxl)
1201 ("python-pytz" ,python-pytz)
1202 ("python-dateutil" ,python-dateutil)
1203 ("python-xlrd" ,python-xlrd)))
1205 `(("which" ,which)))
1207 `(("python-cython" ,python-cython)
1208 ("python-beautifulsoup4" ,python-beautifulsoup4)
1209 ("python-lxml" ,python-lxml)
1210 ("python-html5lib" ,python-html5lib)
1211 ("python-nose" ,python-nose)
1212 ("python-pytest" ,python-pytest)
1213 ("python-pytest-mock" ,python-pytest-mock)))
1214 (home-page "https://pandas.pydata.org")
1215 (synopsis "Data structures for data analysis, time series, and statistics")
1217 "Pandas is a Python package providing fast, flexible, and expressive data
1218 structures designed to make working with structured (tabular,
1219 multidimensional, potentially heterogeneous) and time series data both easy
1220 and intuitive. It aims to be the fundamental high-level building block for
1221 doing practical, real world data analysis in Python.")
1222 (license license:bsd-3)))
1224 (define-public python2-pandas
1225 (package-with-python2 python-pandas))
1227 (define-public python2-mechanize
1229 (name "python2-mechanize")
1234 (uri (pypi-uri "mechanize" version))
1237 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1238 (build-system python-build-system)
1240 `(#:python ,python-2 ; apparently incompatible with Python 3
1242 ;; test fails with message
1243 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1244 ;; (python-3.3.2) or
1245 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1247 ;; The source code is from March 2011 and probably not up-to-date
1248 ;; with respect to python unit tests.
1249 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1251 "Stateful programmatic web browsing in Python")
1253 "Mechanize implements stateful programmatic web browsing in Python,
1254 after Andy Lester’s Perl module WWW::Mechanize.")
1255 (license (license:non-copyleft
1257 "See COPYING in the distribution."))))
1260 (define-public python-simplejson
1262 (name "python-simplejson")
1267 (uri (pypi-uri "simplejson" version))
1270 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1271 (build-system python-build-system)
1272 (home-page "http://simplejson.readthedocs.org/en/latest/")
1274 "Json library for Python")
1276 "JSON (JavaScript Object Notation) is a subset of JavaScript
1277 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1280 Simplejson exposes an API familiar to users of the standard library marshal
1281 and pickle modules. It is the externally maintained version of the json
1282 library contained in Python 2.6, but maintains compatibility with Python 2.5
1283 and (currently) has significant performance advantages, even without using
1284 the optional C extension for speedups. Simplejson is also supported on
1286 (license license:x11)))
1288 (define-public python2-simplejson
1289 (package-with-python2 python-simplejson))
1292 (define-public python-pyicu
1294 (name "python-pyicu")
1299 (uri (pypi-uri "PyICU" version))
1302 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1303 (build-system python-build-system)
1305 `(("icu4c" ,icu4c)))
1307 `(("python-pytest" ,python-pytest)
1308 ("python-six" ,python-six)))
1309 (home-page "https://github.com/ovalhub/pyicu")
1310 (synopsis "Python extension wrapping the ICU C++ API")
1312 "PyICU is a python extension wrapping the ICU C++ API.")
1313 (properties `((python2-variant . ,(delay python2-pyicu))))
1314 (license license:x11)))
1316 (define-public python2-pyicu
1317 (let ((base (package-with-python2
1318 (strip-python2-variant python-pyicu))))
1322 `(,@(package-arguments base)
1324 (modify-phases %standard-phases
1325 (add-before 'check 'delete-failing-test
1327 ;; XXX: This fails due to Unicode issues unique to Python 2,
1328 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1329 (delete-file "test/test_Script.py")
1332 (define-public python2-dogtail
1333 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1334 ;; spaces in indentation" with Python 3.
1336 (name "python2-dogtail")
1340 (uri (pypi-uri "dogtail" version))
1343 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1344 (build-system python-build-system)
1345 (arguments `(#:python ,python-2
1346 #:tests? #f)) ; invalid command "test"
1347 ;; Currently no offical homepage.
1348 (home-page "https://pypi.python.org/pypi/dogtail/")
1349 (synopsis "GUI test tool and automation framework written in Python")
1351 "Dogtail is a GUI test tool and automation framework written in Python.
1352 It uses Accessibility (a11y) technologies to communicate with desktop
1353 applications. dogtail scripts are written in Python and executed like any
1354 other Python program.")
1355 (license license:gpl2+)))
1357 (define-public python-empy
1359 (name "python-empy")
1363 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1367 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1368 (build-system python-build-system)
1370 `(#:tests? #f)) ; python2 only
1371 (home-page "http://www.alcyone.com/software/empy/")
1372 (synopsis "Templating system for Python")
1374 "EmPy is a system for embedding Python expressions and statements in
1375 template text; it takes an EmPy source file, processes it, and produces
1376 output. This is accomplished via expansions, which are special signals to the
1377 EmPy system and are set off by a special prefix (by default the at sign, @@).
1378 EmPy can expand arbitrary Python expressions and statements in this way, as
1379 well as a variety of special forms. Textual data not explicitly delimited in
1380 this way is sent unaffected to the output, allowing Python to be used in
1381 effect as a markup language. Also supported are callbacks via hooks,
1382 recording and playback via diversions, and dynamic, chainable filters. The
1383 system is highly configurable via command line options and embedded
1385 (license license:lgpl2.1+)))
1387 (define-public python2-empy
1388 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1391 (arguments `(,@(package-arguments base)
1394 (define-public python2-element-tree
1396 (name "python2-element-tree")
1401 "http://effbot.org/media/downloads/elementtree-"
1402 version "-20050316.tar.gz"))
1405 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1406 (build-system python-build-system)
1408 `(#:python ,python-2 ; seems to be part of Python 3
1409 #:tests? #f)) ; no 'test' sub-command
1410 (synopsis "Toolkit for XML processing in Python")
1412 "ElementTree is a Python library supporting lightweight XML processing.")
1413 (home-page "http://effbot.org/zone/element-index.htm")
1414 (license (license:x11-style
1415 "http://docs.python.org/2/license.html"
1416 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1418 (define-public python2-pybugz
1420 (name "python2-pybugz")
1425 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1429 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1430 (patches (search-patches "pybugz-stty.patch"
1431 "pybugz-encode-error.patch"))))
1432 (build-system python-build-system)
1434 `(#:python ,python-2 ; SyntaxError with Python 3
1435 #:tests? #f)) ; no 'test' sub-command
1437 `(("element-tree" ,python2-element-tree)))
1438 (synopsis "Python and command-line interface to Bugzilla")
1440 "PyBugz is a Python library and command-line tool to query the Bugzilla
1441 bug tracking system. It is meant as an aid to speed up interaction with the
1443 (home-page "http://www.liquidx.net/pybugz/")
1444 (license license:gpl2)))
1446 (define-public python2-enum
1448 (name "python2-enum")
1452 (uri (pypi-uri "enum" version))
1455 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1456 (build-system python-build-system)
1458 `(#:python ,python-2))
1459 (home-page "http://pypi.python.org/pypi/enum/")
1460 (synopsis "Robust enumerated type support in Python")
1462 "This provides a module for robust enumerations in Python. It has
1463 been superseded by the Python standard library and is provided only for
1465 ;; Choice of either license.
1466 (license (list license:gpl3+ license:psfl))))
1468 (define-public python-enum34
1470 (name "python-enum34")
1475 (uri (pypi-uri "enum34" version))
1478 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1479 (build-system python-build-system)
1480 (home-page "https://pypi.python.org/pypi/enum34")
1481 (synopsis "Backported Python 3.4 Enum")
1483 "Enum34 is the new Python stdlib enum module available in Python 3.4
1484 backported for previous versions of Python from 2.4 to 3.3.")
1485 (license license:bsd-3)))
1487 (define-public python2-enum34
1488 (package-with-python2 python-enum34))
1490 (define-public python-parse-type
1492 (name "python-parse-type")
1497 (uri (pypi-uri "parse_type" version))
1500 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1501 (build-system python-build-system)
1503 `(("python-six" ,python-six)
1504 ("python-parse" ,python-parse)))
1506 `(("python-pytest" ,python-pytest)
1507 ("python-pytest-runner" ,python-pytest-runner)))
1508 (home-page "https://github.com/jenisys/parse_type")
1509 (synopsis "Extended parse module")
1511 "Parse_type extends the python parse module.")
1513 `((python2-variant . ,(delay python2-parse-type))))
1514 (license license:bsd-3)))
1516 (define-public python2-parse-type
1517 (let ((base (package-with-python2
1518 (strip-python2-variant python-parse-type))))
1519 (package (inherit base)
1521 `(("python2-enum34" ,python2-enum34)
1522 ,@(package-propagated-inputs base))))))
1524 (define-public python-parse
1526 (name "python-parse")
1531 (uri (pypi-uri "parse" version))
1534 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1535 (build-system python-build-system)
1538 (modify-phases %standard-phases
1540 (lambda _ (invoke "python" "test_parse.py"))))))
1541 (home-page "https://github.com/r1chardj0n3s/parse")
1542 (synopsis "Parse strings")
1544 "Parse strings using a specification based on the Python @code{format()}
1546 (license license:x11)))
1548 (define-public python-polib
1550 (name "python-polib")
1554 (uri (pypi-uri "polib" version))
1557 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1558 (build-system python-build-system)
1559 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1560 (synopsis "Manipulate, create and modify gettext files")
1561 (description "Polib can manipulate any gettext format (po, pot and mo)
1562 files. It can be used to create po files from scratch or to modify
1564 (license license:expat)))
1566 (define-public python2-polib
1567 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1570 (arguments `(,@(package-arguments base)
1571 ;; Tests don't work with python2.
1574 (define-public scons
1581 (url "https://github.com/SCons/scons.git")
1583 (file-name (git-file-name name version))
1586 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1587 (build-system python-build-system)
1589 `(#:use-setuptools? #f ; still relies on distutils
1590 #:tests? #f ; no 'python setup.py test' command
1592 (modify-phases %standard-phases
1593 (add-before 'build 'bootstrap
1595 (substitute* "src/engine/SCons/compat/__init__.py"
1596 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1597 "sys.modules[new] = __import__(old)"))
1598 (substitute* "src/engine/SCons/Platform/__init__.py"
1599 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1600 "mod = __import__(full_name)"))
1601 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1602 (chdir "build/scons")
1604 (home-page "http://scons.org/")
1605 (synopsis "Software construction tool written in Python")
1607 "SCons is a software construction tool. Think of SCons as an improved,
1608 cross-platform substitute for the classic Make utility with integrated
1609 functionality similar to autoconf/automake and compiler caches such as ccache.
1610 In short, SCons is an easier, more reliable and faster way to build
1612 (license license:x11)))
1614 (define-public scons-python2
1616 (inherit (package-with-python2 scons))
1617 (name "scons-python2")))
1619 (define-public python-extras
1621 (name "python-extras")
1626 (uri (pypi-uri "extras" version))
1629 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1630 (build-system python-build-system)
1632 ;; FIXME: Circular dependency on testtools.
1634 (home-page "https://github.com/testing-cabal/extras")
1635 (synopsis "Useful extensions to the Python standard library")
1637 "Extras is a set of extensions to the Python standard library.")
1638 (license license:expat)))
1640 (define-public python2-extras
1641 (package-with-python2 python-extras))
1643 (define-public python-mimeparse
1645 (name "python-mimeparse")
1650 (uri (pypi-uri "python-mimeparse" version))
1653 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1654 (build-system python-build-system)
1657 (modify-phases %standard-phases
1660 (invoke "./mimeparse_test.py"))))))
1662 "https://github.com/dbtsai/python-mimeparse")
1663 (synopsis "Python library for parsing MIME types")
1665 "Mimeparse provides basic functions for parsing MIME type names and
1666 matching them against a list of media-ranges.")
1667 (license license:expat)))
1669 (define-public python2-mimeparse
1670 (package-with-python2 python-mimeparse))
1672 (define-public python-miniboa
1674 (name "python-miniboa")
1679 (uri (pypi-uri "miniboa" version))
1682 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1683 (build-system python-build-system)
1684 (home-page "https://github.com/shmup/miniboa")
1685 (synopsis "Simple, single-threaded Telnet server")
1687 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1689 (license license:asl2.0)))
1691 (define-public python2-miniboa
1692 (package-with-python2 python-miniboa))
1694 (define-public python-pafy
1696 (name "python-pafy")
1701 (uri (pypi-uri "pafy" version))
1704 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1705 (build-system python-build-system)
1707 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1709 ;; Youtube-dl is a python package which is imported in the file
1710 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1711 `(("youtube-dl" ,youtube-dl)))
1712 (home-page "https://np1.github.io/pafy/")
1713 (synopsis "Retrieve YouTube content and metadata")
1715 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1716 (license license:lgpl3+)))
1718 (define-public python2-funcsigs
1720 (name "python2-funcsigs")
1724 (uri (pypi-uri "funcsigs" version))
1727 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1728 (build-system python-build-system)
1730 `(#:python ,python-2))
1732 `(("python2-unittest2" ,python2-unittest2)))
1733 (home-page "http://funcsigs.readthedocs.org")
1734 (synopsis "Python function signatures from PEP362")
1736 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1737 (license license:asl2.0)))
1739 (define-public python2-funcsigs-bootstrap
1741 (inherit python2-funcsigs)
1742 (name "python2-funcsigs-bootstrap")
1746 ,@(package-arguments python2-funcsigs)))))
1748 (define-public python-py
1755 (uri (pypi-uri "py" version))
1758 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1759 (build-system python-build-system)
1761 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1762 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1763 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1764 ;; Is this module globally installed?"
1767 `(("python-setuptools-scm" ,python-setuptools-scm)))
1768 (home-page "https://github.com/pytest-dev/py")
1769 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1771 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1772 code introspection, and logging.")
1773 (license license:expat)))
1775 (define-public python2-py
1776 (package-with-python2 python-py))
1778 ;; Recent versions of python-fixtures and python-testrepository need
1779 ;; python-pbr for packaging, which itself needs these two packages for
1781 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1782 ;; same source, just without any test dependencies and with tests disabled.
1783 ;; python-pbr-minmal is then used to package python-fixtures and
1784 ;; python-testrepository.
1785 ;; Strictly speaking we currently could remove the test-requirements from the
1786 ;; normal python-pbr package (and save this package) since test are disabled
1787 ;; there anyway. But this may change in future.
1788 (define-public python-pbr-minimal
1790 (name "python-pbr-minimal")
1795 (uri (pypi-uri "pbr" version))
1798 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1799 (build-system python-build-system)
1802 (home-page "http://docs.openstack.org/developer/pbr/")
1803 (synopsis "Minimal build of python-pbr used for bootstrapping")
1805 "Used only for bootstrapping python2-pbr, you should not need this.")
1806 (license license:asl2.0)))
1808 (define-public python2-pbr-minimal
1809 (package-with-python2 python-pbr-minimal))
1811 (define-public python-pbr
1813 (inherit python-pbr-minimal)
1816 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1818 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1820 `(("python-fixtures" ,python-fixtures-bootstrap)
1821 ;; discover, coverage, hacking, subunit
1822 ("python-mock" ,python-mock)
1823 ("python-six" ,python-six)
1824 ("python-sphinx" ,python-sphinx)
1825 ("python-testrepository" ,python-testrepository-bootstrap)
1826 ("python-testresources" ,python-testresources-bootstrap)
1827 ("python-testscenarios" ,python-testscenarios-bootstrap)
1828 ("python-testtools" ,python-testtools-bootstrap)
1829 ("python-virtualenv" ,python-virtualenv)))
1830 (synopsis "Enhance the default behavior of Python’s setuptools")
1832 "Python Build Reasonableness (PBR) is a library that injects some useful
1833 and sensible default behaviors into your setuptools run. It will set
1834 versions, process requirements files and generate AUTHORS and ChangeLog file
1835 from git information.
1838 (define-public python2-pbr
1839 (package-with-python2 python-pbr))
1841 (define-public python-pyrsistent
1843 (name "python-pyrsistent")
1845 (home-page "https://github.com/tobgu/pyrsistent")
1848 (uri (pypi-uri "pyrsistent" version))
1851 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1852 (build-system python-build-system)
1854 `(("python-hypothesis" ,python-hypothesis)
1855 ("python-pytest" ,python-pytest)
1856 ("python-pytest-runner" ,python-pytest-runner)))
1858 `(("python-six" ,python-six)))
1859 (synopsis "Persistent data structures for Python")
1861 "Pyrsistent is a number of persistent collections (by some referred to as
1862 functional data structures). Persistent in the sense that they are immutable.
1864 All methods on a data structure that would normally mutate it instead return a
1865 new copy of the structure containing the requested updates. The original
1866 structure is left untouched.")
1867 (license license:expat)))
1869 (define-public python2-pyrsistent
1870 (package-with-python2 python-pyrsistent))
1872 (define-public python-exif-read
1874 (name "python-exif-read")
1878 (uri (pypi-uri "ExifRead" version))
1881 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1882 (build-system python-build-system)
1883 (arguments `(#:tests? #f)) ; no tests
1884 (home-page "https://github.com/ianare/exif-py")
1885 (synopsis "Python library to extract EXIF data from image files")
1887 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1889 (license license:bsd-3)))
1891 (define-public python2-exif-read
1892 (package-with-python2 python-exif-read))
1894 (define-public python-pyld
1896 (name "python-pyld")
1900 (uri (pypi-uri "PyLD" version))
1903 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1904 (build-system python-build-system)
1905 (home-page "https://github.com/digitalbazaar/pyld")
1906 (synopsis "Python implementation of the JSON-LD specification")
1908 "PyLD is an implementation of the JSON-LD specification.")
1909 (license license:bsd-3)))
1911 (define-public python2-pyld
1912 (package-with-python2 python-pyld))
1914 (define-public python-click
1916 (name "python-click")
1921 (uri (pypi-uri "click" version))
1924 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1925 (build-system python-build-system)
1928 (modify-phases %standard-phases
1929 (add-after 'unpack 'fix-paths
1930 (lambda* (#:key inputs #:allow-other-keys)
1931 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1932 "cross-libc" "libc"))))
1933 (substitute* "click/_unicodefun.py"
1935 (string-append "'" glibc "/bin/locale'"))))
1939 (invoke "python" "-m" "pytest"))))))
1941 `(("python-pytest" ,python-pytest)))
1942 (home-page "https://palletsprojects.com/p/click/")
1943 (synopsis "Command line library for Python")
1945 "Click is a Python package for creating command line interfaces in a
1946 composable way with as little code as necessary. Its name stands for
1947 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1948 with sensible defaults out of the box.")
1949 (license license:bsd-3)))
1951 (define-public python2-click
1952 (package-with-python2 python-click))
1954 (define-public python-wheel
1956 (name "python-wheel")
1961 (uri (pypi-uri "wheel" version))
1964 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1965 (build-system python-build-system)
1967 `(("python-jsonschema" ,python-jsonschema)
1968 ("python-pytest-cov" ,python-pytest-cov)))
1969 (home-page "https://bitbucket.org/pypa/wheel/")
1970 (synopsis "Format for built Python packages")
1972 "A wheel is a ZIP-format archive with a specially formatted filename and
1973 the @code{.whl} extension. It is designed to contain all the files for a PEP
1974 376 compatible install in a way that is very close to the on-disk format. Many
1975 packages will be properly installed with only the @code{Unpack} step and the
1976 unpacked archive preserves enough information to @code{Spread} (copy data and
1977 scripts to their final locations) at any later time. Wheel files can be
1978 installed with a newer @code{pip} or with wheel's own command line utility.")
1979 (license license:expat)
1980 (properties `((python2-variant . ,(delay python2-wheel))))))
1982 (define-public python2-wheel
1983 (let ((wheel (package-with-python2
1984 (strip-python2-variant python-wheel))))
1985 (package (inherit wheel)
1986 (native-inputs `(("python2-functools32" ,python2-functools32)
1987 ,@(package-native-inputs wheel))))))
1989 (define-public python-vcversioner
1991 (name "python-vcversioner")
1992 (version "2.16.0.0")
1996 (uri (pypi-uri "vcversioner" version))
1999 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2000 (build-system python-build-system)
2001 (synopsis "Python library for version number discovery")
2002 (description "Vcversioner is a Python library that inspects tagging
2003 information in a variety of version control systems in order to discover
2005 (home-page "https://github.com/habnabit/vcversioner")
2006 (license license:isc)))
2008 (define-public python2-vcversioner
2009 (package-with-python2 python-vcversioner))
2011 (define-public python-jdcal
2013 (name "python-jdcal")
2018 (uri (pypi-uri "jdcal" version))
2021 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2022 (build-system python-build-system)
2024 `(#:phases (modify-phases %standard-phases
2027 (invoke "pytest"))))))
2029 `(("python-pytest" ,python-pytest)))
2030 (home-page "https://github.com/phn/jdcal")
2031 (synopsis "Functions to convert between Julian dates Gregorian dates")
2032 (description "This Python library provides functions for converting
2033 between Julian dates and Gregorian dates.")
2034 (license license:bsd-2)))
2036 (define-public python2-jdcal
2037 (package-with-python2 python-jdcal))
2039 (define-public python-jsonschema
2041 (name "python-jsonschema")
2045 (uri (pypi-uri "jsonschema" version))
2048 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2049 (build-system python-build-system)
2052 (modify-phases %standard-phases
2055 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2056 (invoke "trial" "jsonschema"))))))
2058 `(("python-setuptools_scm" ,python-setuptools-scm)
2059 ("python-twisted" ,python-twisted)))
2061 `(("python-attrs" ,python-attrs)
2062 ("python-pyrsistent" ,python-pyrsistent)
2063 ("python-six" ,python-six)))
2064 (home-page "https://github.com/Julian/jsonschema")
2065 (synopsis "Implementation of JSON Schema for Python")
2067 "Jsonschema is an implementation of JSON Schema for Python.")
2068 (license license:expat)
2069 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2071 (define-public python2-jsonschema
2072 (let ((jsonschema (package-with-python2
2073 (strip-python2-variant python-jsonschema))))
2074 (package (inherit jsonschema)
2076 `(("python2-functools32" ,python2-functools32)
2077 ,@(package-propagated-inputs jsonschema))))))
2079 ;; This old version is still required by docker-compose as of 1.24.0.
2080 (define-public python-jsonschema-2.6
2082 (name "python-jsonschema")
2086 (uri (pypi-uri "jsonschema" version))
2089 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2090 (build-system python-build-system)
2093 (modify-phases %standard-phases
2094 (replace 'check (lambda _ (invoke "nosetests"))))))
2096 `(("python-nose" ,python-nose)
2097 ("python-vcversioner" ,python-vcversioner)))
2098 (home-page "https://github.com/Julian/jsonschema")
2099 (synopsis "Implementation of JSON Schema for Python")
2101 "Jsonschema is an implementation of JSON Schema for Python.")
2102 (license license:expat)
2103 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2105 (define-public python-schema
2107 (name "python-schema")
2112 (uri (pypi-uri "schema" version))
2115 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2116 (build-system python-build-system)
2118 `(("python-pytest" ,python-pytest)))
2119 (home-page "https://github.com/keleshev/schema")
2120 (synopsis "Simple data validation library")
2122 "@code{python-schema} is a library for validating Python data
2123 structures, such as those obtained from config-files, forms, external
2124 services or command-line parsing, converted from JSON/YAML (or
2125 something else) to Python data-types.")
2126 (license license:psfl)))
2128 (define-public python2-schema
2129 (package-with-python2 python-schema))
2131 (define-public python-schema-0.5
2132 (package (inherit python-schema)
2137 (uri (pypi-uri "schema" version))
2140 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2142 (define-public python2-schema-0.5
2143 (package-with-python2 python-schema-0.5))
2145 (define-public python-kitchen
2147 (name "python-kitchen")
2152 (uri (pypi-uri "kitchen" version))
2155 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2156 (build-system python-build-system)
2158 `(("python-chardet" ,python-chardet)))
2159 (home-page "https://github.com/fedora-infra/kitchen")
2160 (synopsis "Python API for snippets")
2161 (description "@code{kitchen} module provides a python API for all sorts of
2162 little useful snippets of code that everybody ends up writing for their projects
2163 but never seem big enough to build an independent release. Use kitchen and stop
2164 cutting and pasting that code over and over.")
2165 (license (list license:lgpl2.1+
2166 ;; subprocess.py, test_subprocess.py,
2167 ;; kitchen/pycompat25/defaultdict.py:
2170 (define-public python2-kitchen
2171 (package-with-python2 python-kitchen))
2173 (define-public python-unidecode
2175 (name "python-unidecode")
2179 (uri (pypi-uri "Unidecode" version))
2182 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2183 (build-system python-build-system)
2184 (home-page "https://pypi.python.org/pypi/Unidecode")
2185 (synopsis "ASCII transliterations of Unicode text")
2187 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2188 useful when integrating with legacy code that doesn't support Unicode, or for
2189 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2190 machine identifiers from human-readable Unicode strings that should still be
2191 somewhat intelligible.")
2192 (license license:gpl2+)))
2194 (define-public python2-unidecode
2195 (package-with-python2 python-unidecode))
2197 (define-public python-pyjwt
2199 (name "python-pyjwt")
2204 (uri (pypi-uri "PyJWT" version))
2207 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2208 (modules '((guix build utils)))
2211 (for-each delete-file-recursively
2212 (find-files "." "\\.pyc$"))
2214 (build-system python-build-system)
2216 `(("python-pytest" ,python-pytest)
2217 ("python-pytest-cov" ,python-pytest-cov)
2218 ("python-pytest-runner" ,python-pytest-runner)))
2219 (home-page "https://github.com/progrium/pyjwt")
2220 (synopsis "JSON Web Token implementation in Python")
2222 "PyJWT is a JSON Web Token implementation written in Python.")
2223 (license license:expat)))
2225 (define-public python2-pyjwt
2226 (package-with-python2 python-pyjwt))
2228 (define-public python-pykka
2230 (name "python-pykka")
2235 (uri (pypi-uri "Pykka" version))
2238 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2239 (build-system python-build-system)
2241 `(("python-mock" ,python-mock)
2242 ("python-nose" ,python-nose)
2243 ("python-gevent" ,python-gevent)
2244 ("python-eventlet" ,python-eventlet)))
2245 (home-page "https://www.pykka.org/")
2246 (synopsis "Pykka is a Python implementation of the actor model")
2248 "Pykka is a Python implementation of the actor model.
2249 The actor model introduces some simple rules to control the sharing
2250 of state and cooperation between execution units, which makes it
2251 easier to build concurrent applications.")
2252 (license license:asl2.0)))
2254 (define-public python2-pykka
2255 (package-with-python2 python-pykka))
2257 (define-public python-pymsgbox
2259 (name "python-pymsgbox")
2265 ;; LICENSE.txt is not present on pypi
2266 (url "https://github.com/asweigart/PyMsgBox")
2267 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2268 (file-name (git-file-name name version))
2271 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2273 ;; Circular dependency to run tests:
2274 ;; Tests need pyautogui, which depends on pymsgbox.
2276 (build-system python-build-system)
2277 (home-page "https://github.com/asweigart/PyMsgBox")
2278 (synopsis "Python module for JavaScript-like message boxes")
2280 "PyMsgBox is a simple, cross-platform, pure Python module for
2281 JavaScript-like message boxes. Types of dialog boxes include:
2289 (license license:bsd-3)))
2291 (define-public python-pympler
2293 (name "python-pympler")
2294 (home-page "https://pythonhosted.org/Pympler/")
2298 (uri (pypi-uri "Pympler" version))
2301 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2302 (build-system python-build-system)
2304 `(#:phases (modify-phases %standard-phases
2306 (add-after 'install 'check
2307 (lambda* (#:key inputs outputs #:allow-other-keys)
2308 (add-installed-pythonpath inputs outputs)
2309 (invoke "python" "setup.py" "test"))))))
2310 (synopsis "Measure, monitor and analyze memory behavior")
2312 "Pympler is a development tool to measure, monitor and analyze
2313 the memory behavior of Python objects in a running Python application.
2315 By pympling a Python application, detailed insight in the size and the
2316 lifetime of Python objects can be obtained. Undesirable or unexpected
2317 runtime behavior like memory bloat and other @samp{pymples} can easily
2320 A web profiling frontend exposes process statistics, garbage
2321 visualisation and class tracker statistics.")
2322 (license license:asl2.0)))
2324 (define-public python2-pympler
2325 (package-with-python2 python-pympler))
2327 (define-public python-itsdangerous
2329 (name "python-itsdangerous")
2334 (uri (pypi-uri "itsdangerous" version))
2337 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2338 (build-system python-build-system)
2339 (home-page "https://palletsprojects.com/p/itsdangerous/")
2340 (synopsis "Python library for passing data to/from untrusted environments")
2342 "Itsdangerous provides various helpers to pass trusted data to untrusted
2343 environments and back.")
2344 (license license:bsd-3)))
2346 (define-public python2-itsdangerous
2347 (package-with-python2 python-itsdangerous))
2349 (define-public python-pyyaml
2351 (name "python-pyyaml")
2356 (uri (pypi-uri "PyYAML" version))
2359 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2360 (build-system python-build-system)
2362 `(("libyaml" ,libyaml)))
2363 (home-page "http://pyyaml.org/wiki/PyYAML")
2364 (synopsis "YAML parser and emitter for Python")
2366 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2367 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2368 API, and sensible error messages. PyYAML supports standard YAML tags and
2369 provides Python-specific tags that allow to represent an arbitrary Python
2371 (license license:expat)))
2373 (define-public python2-pyyaml
2374 (package-with-python2 python-pyyaml))
2376 (define-public python-vine
2378 (name "python-vine")
2383 (uri (pypi-uri "vine" version))
2386 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2387 (build-system python-build-system)
2389 `(("python-pytest" ,python-pytest)
2390 ("python-case" ,python-case)))
2391 (home-page "https://github.com/celery/vine")
2392 (synopsis "Promises for Python")
2394 "@code{vine} provides a special implementation of promises in that it can
2395 be used both for \"promise of a value\" and lazy evaluation. The biggest
2396 upside for this is that everything in a promise can also be a promise,
2397 e.g. filters, callbacks and errbacks can all be promises.")
2398 (license license:bsd-3)))
2400 (define-public python-virtualenv
2402 (name "python-virtualenv")
2407 (uri (pypi-uri "virtualenv" version))
2410 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2411 (build-system python-build-system)
2414 (modify-phases %standard-phases
2415 (add-before 'check 'disable-failing-test
2417 ;; Disable failing test. See upstream bug report
2418 ;; https://github.com/pypa/virtualenv/issues/957
2419 (substitute* "tests/test_virtualenv.py"
2420 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2423 `(("python-mock" ,python-mock)
2424 ("python-pytest" ,python-pytest)))
2425 (home-page "https://virtualenv.pypa.io/")
2426 (synopsis "Virtual Python environment builder")
2428 "Virtualenv is a tool to create isolated Python environments.")
2429 (license license:expat)))
2431 (define-public python2-virtualenv
2432 (package-with-python2 python-virtualenv))
2434 (define-public python-markupsafe
2436 (name "python-markupsafe")
2441 (uri (pypi-uri "MarkupSafe" version))
2444 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2445 (build-system python-build-system)
2447 `(#:modules ((ice-9 ftw)
2451 (guix build python-build-system))
2452 #:phases (modify-phases %standard-phases
2455 (let ((cwd (getcwd))
2456 (libdir (find (cut string-prefix? "lib." <>)
2457 (scandir "build"))))
2458 (setenv "PYTHONPATH"
2459 (string-append cwd "/build/" libdir ":"
2460 (getenv "PYTHONPATH")))
2461 (invoke "pytest" "-vv")))))))
2463 `(("python-pytest" ,python-pytest)))
2464 (home-page "https://github.com/mitsuhiko/markupsafe")
2465 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2467 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2469 (license license:bsd-3)))
2471 (define-public python2-markupsafe
2472 (package-with-python2 python-markupsafe))
2474 (define-public python-jinja2
2476 (name "python-jinja2")
2481 (uri (pypi-uri "Jinja2" version))
2484 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2485 (build-system python-build-system)
2487 `(("python-markupsafe" ,python-markupsafe)))
2488 (home-page "http://jinja.pocoo.org/")
2489 (synopsis "Python template engine")
2491 "Jinja2 is a small but fast and easy to use stand-alone template engine
2492 written in pure Python.")
2493 (license license:bsd-3)))
2495 (define-public python2-jinja2
2496 (package-with-python2 python-jinja2))
2498 (define-public python-pystache
2500 (name "python-pystache")
2504 (uri (pypi-uri "pystache" version))
2507 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2508 (build-system python-build-system)
2510 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2511 (home-page "http://defunkt.io/pystache/")
2512 (synopsis "Python logic-less template engine")
2514 "Pystache is a Python implementation of the framework agnostic,
2515 logic-free templating system Mustache.")
2516 (license license:expat)
2517 (properties `((python2-variant . ,(delay python2-pystache))))))
2519 (define-public python2-pystache
2520 (package (inherit (package-with-python2
2521 (strip-python2-variant python-pystache)))
2523 `(#:python ,python-2
2525 (modify-phases %standard-phases
2528 (invoke "python" "test_pystache.py"))))))))
2530 (define-public python-joblib
2532 (name "python-joblib")
2536 (uri (pypi-uri "joblib" version))
2539 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2540 (build-system python-build-system)
2543 (modify-phases %standard-phases
2545 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2547 `(("python-pytest" ,python-pytest)))
2548 (home-page "https://joblib.readthedocs.io/")
2549 (synopsis "Using Python functions as pipeline jobs")
2551 "Joblib is a set of tools to provide lightweight pipelining in Python.
2552 In particular, joblib offers: transparent disk-caching of the output values
2553 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2554 logging and tracing of the execution.")
2555 (license license:bsd-3)))
2557 (define-public python2-joblib
2558 (package-with-python2 python-joblib))
2560 (define-public python-daemon
2562 (name "python-daemon")
2567 (uri (pypi-uri "python-daemon" version))
2570 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2571 (build-system python-build-system)
2574 (modify-phases %standard-phases
2575 (add-before 'check 'disable-tests
2577 ;; FIXME: Determine why test fails
2578 (substitute* "test/test_daemon.py"
2579 (("test_detaches_process_context")
2580 "skip_test_detaches_process_context"))
2583 `(("python-lockfile" ,python-lockfile)))
2585 `(("python-unittest2" ,python-unittest2)
2586 ("python-testtools" ,python-testtools)
2587 ("python-testscenarios" ,python-testscenarios)
2588 ("python-mock" ,python-mock)
2589 ("python-docutils" ,python-docutils)))
2590 (home-page "https://pagure.io/python-daemon/")
2591 (synopsis "Python library for making a Unix daemon process")
2592 (description "Python-daemon is a library that assists a Python program to
2593 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2595 This library provides a @code{DaemonContext} class that manages the following
2596 important tasks for becoming a daemon process:
2598 @item Detach the process into its own process group.
2599 @item Set process environment appropriate for running inside a chroot.
2600 @item Renounce suid and sgid privileges.
2601 @item Close all open file descriptors.
2602 @item Change the working directory, uid, gid, and umask.
2603 @item Set appropriate signal handlers.
2604 @item Open new file descriptors for stdin, stdout, and stderr.
2605 @item Manage a specified PID lock file.
2606 @item Register cleanup functions for at-exit processing.
2608 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2609 (license (list license:asl2.0 license:gpl3+))))
2611 (define-public python-docutils
2613 (name "python-docutils")
2618 (uri (pypi-uri "docutils" version))
2621 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2622 (build-system python-build-system)
2624 '(#:tests? #f)) ; no setup.py test command
2625 (home-page "http://docutils.sourceforge.net/")
2626 (synopsis "Python Documentation Utilities")
2628 "Docutils is a modular system for processing documentation into useful
2629 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2631 ;; Most of the source code is public domain, but some source files are
2632 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2633 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2635 (define-public python2-docutils
2636 (package-with-python2 python-docutils))
2638 (define-public python-pygments
2640 (name "python-pygments")
2645 (uri (pypi-uri "Pygments" version))
2648 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2649 (build-system python-build-system)
2651 ;; FIXME: Tests require sphinx, which depends on this.
2653 (home-page "http://pygments.org/")
2654 (synopsis "Syntax highlighting")
2656 "Pygments is a syntax highlighting package written in Python.")
2657 (license license:bsd-2)))
2659 (define-public python2-pygments
2660 (package-with-python2 python-pygments))
2662 (define-public python-bumpversion
2664 (name "python-bumpversion")
2669 (uri (pypi-uri "bumpversion" version))
2672 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2673 (build-system python-build-system)
2674 (home-page "https://github.com/peritus/bumpversion")
2675 (synopsis "Tool to bump software version")
2676 (description "This tool provides a command-line interface (CLI) to bump a
2677 software version simply.")
2678 (license license:expat)))
2680 (define-public python-deprecated
2682 (name "python-deprecated")
2688 (url "https://github.com/tantale/deprecated.git")
2689 (commit (string-append "v" version))))
2690 (file-name (git-file-name name version))
2693 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2694 (build-system python-build-system)
2696 `(#:phases (modify-phases %standard-phases
2699 (invoke "pytest"))))))
2701 `(("python-wrapt" ,python-wrapt)))
2703 `(("python-bumpversion" ,python-bumpversion)
2704 ("python-pytest" ,python-pytest)
2705 ("python-pytest-cov" ,python-pytest-cov)
2706 ("python-sphinx" ,python-sphinx)
2707 ("python-tox" ,python-tox)))
2708 (home-page "https://github.com/tantale/deprecated")
2709 (synopsis "Python decorator to deprecate classes, functions or methods")
2710 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2711 to deprecate classes, functions or methods.")
2712 (license license:expat)))
2714 (define-public python-pygithub
2716 (name "python-pygithub")
2719 ;; We fetch from the Git repo because there are no tests in the PyPI
2724 (url "https://github.com/PyGithub/PyGithub.git")
2725 (commit (string-append "v" version))))
2726 (file-name (git-file-name name version))
2729 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2730 (build-system python-build-system)
2732 `(#:phases (modify-phases %standard-phases
2733 ;; Some tests rely on the network.
2734 (add-after 'unpack 'disable-failing-tests
2736 (substitute* "tests/Issue142.py"
2737 (("testDecodeJson") "disabled_testDecodeJson"))
2739 (add-before 'check 'prepare-for-tests
2741 (for-each (lambda (f)
2743 (find-files "./tests"))
2744 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2745 (setenv "PYTHONPATH"
2746 (string-append "./tests:" (getenv "PYTHONPATH")))
2749 `(("python-deprecated" ,python-deprecated)
2750 ("python-pyjwt" ,python-pyjwt)
2751 ("python-requests" ,python-requests)))
2752 (native-inputs `(("python-httpretty" ,python-httpretty)))
2753 (home-page "https://pygithub.readthedocs.io/en/latest/")
2754 (synopsis "Python library for the GitHub API")
2755 (description "This library allows managing GitHub resources such as
2756 repositories, user profiles, and organizations in your Python applications,
2757 using version 3 of the GitHub application programming interface (API).")
2758 (license license:lgpl3+)))
2760 (define-public python-rellu
2762 (name "python-rellu")
2767 (uri (pypi-uri "rellu" version))
2770 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2771 (build-system python-build-system)
2773 `(("python-invoke" ,python-invoke)
2774 ("python-pygithub" ,python-pygithub)))
2775 (home-page "https://github.com/robotframework/rellu")
2776 (synopsis "Utilities to create PyPI releases")
2777 (description "This collection of utilities contains tooling and templates
2778 to assist in creating releases on GitHub and publishing them on PyPI. It is
2779 designed to be used by Robot Framework and tools and libraries in its
2780 ecosystem, but can naturally be used also by other projects.")
2781 (license license:asl2.0)))
2783 (define-public python-robotframework
2785 (name "python-robotframework")
2787 ;; There are no tests in the PyPI archive.
2792 (url "https://github.com/robotframework/robotframework.git")
2793 (commit (string-append "v" version))))
2794 (file-name (git-file-name name version))
2796 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2797 (patches (search-patches
2798 "python-robotframework-honor-source-date-epoch.patch"))))
2799 (build-system python-build-system)
2801 `(#:phases (modify-phases %standard-phases
2802 (add-before 'build 'build-and-install-doc
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let* ((doc-output (assoc-ref outputs "doc"))
2805 (doc (string-append doc-output "/share/"
2806 ,name "-" ,version "/")))
2807 (invoke "invoke" "library-docs" "all")
2809 (copy-recursively "doc/libraries"
2810 (string-append doc "/libraries"))
2814 (invoke "python" "utest/run.py"))))))
2816 `(("python-invoke" ,python-invoke)
2817 ("python-rellu" ,python-rellu)
2818 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2819 (outputs '("out" "doc"))
2820 (home-page "https://robotframework.org")
2821 (synopsis "Generic automation framework")
2822 (description "Robot Framework is a generic automation framework for
2823 acceptance testing, acceptance test driven development (ATDD), and robotic
2824 process automation (RPA).")
2825 (license license:asl2.0)))
2827 (define-public python-robotframework-lint
2828 ;; There is no properly tagged release; the commit below seems to correspond
2829 ;; to the 0.9 stable release available from PyPI. The tests are not
2830 ;; included in the PyPI archive, so we fetch the sources from the upstream
2832 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2835 (name "python-robotframework-lint")
2836 (version (git-version "0.9.0" revision commit))
2841 (url "https://github.com/boakley/robotframework-lint.git")
2843 (file-name (git-file-name name version))
2846 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2847 (build-system python-build-system)
2850 (modify-phases %standard-phases
2853 (invoke "python" "-m" "robot" "-A"
2854 "tests/conf/default.args" "tests"))))))
2856 `(("python-robotframework" ,python-robotframework)))
2857 (home-page "https://github.com/boakley/robotframework-lint/")
2858 (synopsis "Static analysis tool (linter) for Robot Framework")
2859 (description "This package provides the @code{rflint} command-line
2860 utility, a static analysis tool (linter) for Robot Framework source files.")
2861 (license license:asl2.0))))
2863 (define-public python-robotframework-sshlibrary
2865 (name "python-robotframework-sshlibrary")
2867 ;; There are no tests in the PyPI archive.
2872 (url "https://github.com/robotframework/SSHLibrary.git")
2873 (commit (string-append "v" version))))
2874 (file-name (git-file-name name version))
2877 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2878 (build-system python-build-system)
2881 (modify-phases %standard-phases
2882 (add-before 'build 'build-and-install-doc
2883 (lambda* (#:key outputs #:allow-other-keys)
2884 (let* ((doc-output (assoc-ref outputs "doc"))
2885 (doc (string-append doc-output "/share/"
2886 ,name "-" ,version "/")))
2887 (invoke "chmod" "-R" "+w" "docs")
2888 (invoke "invoke" "kw-docs" "project-docs")
2890 (for-each delete-file (find-files "docs" "\\.rst"))
2891 (copy-recursively "docs" doc)
2895 ;; Some tests require an SSH server; we remove them.
2896 (delete-file "utest/test_client_api.py")
2897 (delete-file "utest/test_scp.py")
2898 (invoke "python" "utest/run.py"))))))
2900 `(("python-robotframework" ,python-robotframework)
2901 ("python-paramiko" ,python-paramiko)
2902 ("python-scp" ,python-scp)))
2904 `(("openssh" ,openssh)
2906 ;; To generate the documentation
2907 ("python-docutils" ,python-docutils)
2908 ("python-invoke" ,python-invoke)
2909 ("python-pygments" ,python-pygments)
2910 ("python-rellu" ,python-rellu)))
2911 (outputs '("out" "doc"))
2912 (home-page "https://github.com/robotframework/SSHLibrary")
2913 (synopsis "Robot Framework library for SSH and SFTP")
2914 (description "SSHLibrary is a Robot Framework library providing support
2915 for SSH and SFTP. It has the following main usages:
2917 @item Executing commands on the remote machine, either blocking or non-blocking.
2918 @item Writing and reading in an interactive shell.
2919 @item Transferring files and directories over SFTP.
2920 @item Ensuring that files and directories exist on the remote machine.
2922 (license license:asl2.0)))
2924 (define-public python-scp
2931 (uri (pypi-uri "scp" version))
2934 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2935 (build-system python-build-system)
2937 '(#:tests? #f)) ;tests require an SSH server
2939 `(("python-paramiko" ,python-paramiko)))
2940 (home-page "https://github.com/jbardin/scp.py")
2941 (synopsis "SCP protocol module for Python and Paramiko")
2942 (description "The scp module extends the Paramiko library to send and
2943 receive files via the SCP1 protocol, as implemented by the OpenSSH
2944 @command{scp} program.")
2945 (license license:gpl2+)))
2947 (define-public python-rst.linker
2949 (name "python-rst.linker")
2954 (uri (pypi-uri "rst.linker" version))
2957 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2958 (build-system python-build-system)
2960 `(("python-dateutil" ,python-dateutil)
2961 ("python-six" ,python-six)))
2963 `(("python-setuptools-scm" ,python-setuptools-scm)))
2964 ;; Test would require path.py, which would introduce a cyclic dependence.
2965 (arguments `(#:tests? #f))
2966 ;; Note: As of version 1.7 the documentation is not worth building.
2967 (home-page "https://github.com/jaraco/rst.linker")
2968 (synopsis "Sphinx plugin to add links and timestamps")
2969 (description "rst.linker allows to automatically replace text by a
2970 reStructuredText external reference or timestamps. It's primary purpose is to
2971 augment the changelog, but it can be used for other documents, too.")
2972 (license license:expat)))
2974 (define-public python2-rst.linker
2975 (package-with-python2 python-rst.linker))
2977 (define-public python-feedgenerator
2979 (name "python-feedgenerator")
2984 (uri (pypi-uri "feedgenerator" version))
2987 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2988 (modules '((guix build utils)))
2991 ;; Remove pre-compiled .pyc files from source.
2992 (for-each delete-file-recursively
2993 (find-files "." "__pycache__" #:directories? #t))
2994 (for-each delete-file (find-files "." "\\.pyc$"))
2996 (build-system python-build-system)
2998 `(("python-pytz" ,python-pytz)
2999 ("python-six" ,python-six)))
3000 (home-page "https://github.com/getpelican/feedgenerator")
3002 "Standalone version of Django's Atom/RSS feed generator")
3004 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3005 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3006 (license license:bsd-3)))
3008 (define-public python2-feedgenerator
3009 (package-with-python2 python-feedgenerator))
3011 (define-public python-toml
3013 (name "python-toml")
3018 (uri (pypi-uri "toml" version))
3021 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3022 (build-system python-build-system)
3024 `(#:tests? #f)) ;no tests suite in release
3025 (home-page "https://github.com/uiri/toml")
3026 (synopsis "Library for TOML")
3028 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3029 Language (TOML) configuration files.")
3030 (license license:expat)))
3032 (define-public python-jsonrpc-server
3034 (name "python-jsonrpc-server")
3039 (uri (pypi-uri "python-jsonrpc-server" version))
3042 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3043 (build-system python-build-system)
3045 `(("python-future" ,python-future)
3046 ("python-mock" ,python-mock)
3047 ("python-pytest" ,python-pytest)))
3049 "https://github.com/palantir/python-jsonrpc-server")
3050 (synopsis "JSON RPC 2.0 server library")
3052 "This package provides a JSON RPC 2.0 server library for Python.")
3053 (license license:expat)))
3055 (define-public python-pydocstyle
3057 (name "python-pydocstyle")
3062 (uri (pypi-uri "pydocstyle" version))
3065 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3066 (build-system python-build-system)
3068 `(("python-six" ,python-six)
3069 ("python-snowballstemmer" ,python-snowballstemmer)))
3071 "https://github.com/PyCQA/pydocstyle/")
3072 (synopsis "Python docstring style checker")
3074 "This package provides a style checker for the Python Language
3076 (license license:expat)))
3078 ;; XXX: We must use a non-release version since the latest release version
3079 ;; requires python-jedi version < 0.15.
3080 (define-public python-language-server
3081 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3084 (name "python-language-server")
3085 (version (git-version "0.28.3" revision commit))
3090 (url "https://github.com/palantir/python-language-server.git")
3094 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3095 (build-system python-build-system)
3097 `(("python-pluggy" ,python-pluggy)
3098 ("python-jsonrpc-server" ,python-jsonrpc-server)
3099 ("python-jedi" ,python-jedi)
3100 ("python-yapf" ,python-yapf)
3101 ("python-pyflakes" ,python-pyflakes)
3102 ("python-pydocstyle" ,python-pydocstyle)
3103 ("python-pycodestyle" ,python-pycodestyle)
3104 ("python-mccabe" ,python-mccabe)
3105 ("python-rope" ,python-rope)
3106 ("python-autopep8" ,python-autopep8)
3107 ("python-pylint" ,python-pylint)))
3108 (home-page "https://github.com/palantir/python-language-server")
3109 (synopsis "Python implementation of the Language Server Protocol")
3111 "The Python Language Server (pyls) is an implementation of the Python 3
3112 language specification for the Language Server Protocol (LSP). This tool is
3113 used in text editing environments to provide a complete and integrated
3114 feature-set for programming Python effectively.")
3115 (license license:expat))))
3117 (define-public python-black
3119 (name "python-black")
3124 (uri (pypi-uri "black" version))
3127 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3128 (build-system python-build-system)
3131 (modify-phases %standard-phases
3132 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3134 (let ((python3 (which "python3")))
3135 (substitute* '("tests/data/fmtonoff.py"
3136 "tests/data/string_prefixes.py"
3137 "tests/data/function.py")
3138 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3139 (string-append "#!" python3 (if (string? minor-version)
3143 `(("python-click" ,python-click)
3144 ("python-attrs" ,python-attrs)
3145 ("python-appdirs" ,python-appdirs)
3146 ("python-toml" ,python-toml)))
3147 (home-page "https://github.com/ambv/black")
3148 (synopsis "The uncompromising code formatter")
3149 (description "Black is the uncompromising Python code formatter.")
3150 (license license:expat)))
3152 (define-public python-blinker
3154 (name "python-blinker")
3159 (uri (pypi-uri "blinker" version))
3162 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3163 (build-system python-build-system)
3164 (home-page "http://pythonhosted.org/blinker/")
3165 (synopsis "Fast, simple object-to-object and broadcast signaling")
3167 "Blinker provides a fast dispatching system that allows any number of
3168 interested parties to subscribe to events, or \"signals\".")
3169 (license license:expat)))
3171 (define-public python2-blinker
3172 (package-with-python2 python-blinker))
3174 (define-public pelican
3181 (uri (pypi-uri "pelican" version))
3184 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3185 (build-system python-build-system)
3187 `(("python-feedgenerator" ,python-feedgenerator)
3188 ("python-jinja2" ,python-jinja2)
3189 ("python-pygments" ,python-pygments)
3190 ("python-docutils" ,python-docutils)
3191 ("python-pytz" ,python-pytz)
3192 ("python-blinker" ,python-blinker)
3193 ("python-unidecode" ,python-unidecode)
3194 ("python-six" ,python-six)
3195 ("python-dateutil" ,python-dateutil)
3196 ("python-markdown" ,python-markdown)))
3197 (home-page "https://getpelican.com/")
3199 `(;; XXX Requires a lot more packages to do unit tests :P
3201 #:phases (modify-phases %standard-phases
3203 'install 'adjust-requires
3204 ;; Since feedgenerator is installed from git, it doesn't
3205 ;; conform to the version requirements.
3207 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3208 ;; version requirement so setuptools doesn't get confused.
3210 (substitute* "setup.py"
3211 (("['\"]feedgenerator.*?['\"]")
3212 "'feedgenerator'")))))))
3213 (synopsis "Python-based static site publishing system")
3215 "Pelican is a tool to generate a static blog from reStructuredText,
3216 Markdown input files, and more. Pelican uses Jinja2 for templating
3217 and is very extensible.")
3218 (license license:agpl3+)))
3220 (define-public mallard-ducktype
3222 (name "mallard-ducktype")
3227 ;; git-reference because tests are not included in pypi source tarball
3228 ;; https://issues.guix.gnu.org/issue/36755#2
3230 (url "https://github.com/projectmallard/mallard-ducktype.git")
3232 (file-name (git-file-name name version))
3235 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3236 (build-system python-build-system)
3239 (modify-phases %standard-phases
3242 (with-directory-excursion "tests"
3243 (invoke "sh" "runtests")))))))
3244 (home-page "http://projectmallard.org")
3245 (synopsis "Convert Ducktype to Mallard documentation markup")
3247 "Ducktype is a lightweight syntax that can represent all the semantics
3248 of the Mallard XML documentation system. Ducktype files can be converted to
3249 Mallard using the @command{ducktype} tool. The yelp-tools package
3250 provides additional functionality on the produced Mallard documents.")
3251 (license license:expat)))
3253 (define-public python-scikit-image
3255 (name "python-scikit-image")
3260 (uri (pypi-uri "scikit-image" version))
3262 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3263 (build-system python-build-system)
3265 ;; TODO: Some tests require running X11 server. Disable them?
3267 ;; See DEPENDS.txt for the list of build and run time requiremnts
3269 `(("python-cloudpickle" ,python-cloudpickle)
3270 ("python-dask" ,python-dask)
3271 ("python-matplotlib" ,python-matplotlib)
3272 ("python-networkx" ,python-networkx)
3273 ("python-numpy" ,python-numpy)
3274 ("python-pillow" ,python-pillow)
3275 ("python-pywavelets" ,python-pywavelets)
3276 ("python-scipy" ,python-scipy)
3277 ("python-six" ,python-six)))
3279 `(("python-cython" ,python-cython)))
3280 (home-page "http://scikit-image.org/")
3281 (synopsis "Image processing in Python")
3283 "Scikit-image is a collection of algorithms for image processing.")
3284 (license license:bsd-3)))
3286 (define-public python2-scikit-image
3287 (package-with-python2 python-scikit-image))
3289 (define-public python-cython
3291 (name "python-cython")
3296 (uri (pypi-uri "Cython" version))
3299 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3300 (build-system python-build-system)
3301 ;; we need the full python package and not just the python-wrapper
3302 ;; because we need libpython3.3m.so
3304 `(("python" ,python)))
3307 (modify-phases %standard-phases
3308 (add-before 'check 'set-HOME
3309 ;; some tests require access to "$HOME/.cython"
3310 (lambda _ (setenv "HOME" "/tmp") #t))
3312 ;; FIXME: These tests started failing on armhf after the 0.28 update
3313 ;; (commit c69d11c5930), both with an error such as this:
3314 ;; compiling (cpp) and running dictcomp ...
3315 ;; === C/C++ compiler error output: ===
3317 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3318 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3319 ,@(if (target-arm32?)
3320 `((add-before 'check 'disable-failing-tests
3322 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3323 (for-each (lambda (test)
3324 (format disabled-tests "~a\n" test))
3325 '("memslice" "dictcomp"))
3326 (close-port disabled-tests)))))
3331 ;; Disable compiler optimizations to greatly reduce the running
3332 ;; time of the test suite.
3333 (setenv "CFLAGS" "-O0")
3335 (invoke "python" "runtests.py" "-vv"
3336 "-j" (number->string (parallel-job-count))))))))
3337 (home-page "https://cython.org/")
3338 (synopsis "C extensions for Python")
3339 (description "Cython is an optimising static compiler for both the Python
3340 programming language and the extended Cython programming language. It makes
3341 writing C extensions for Python as easy as Python itself.")
3342 (license license:asl2.0)
3343 (properties `((python2-variant . ,(delay python2-cython))))))
3345 (define-public python2-cython
3346 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3349 (name "python2-cython")
3351 `(("python-2" ,python-2))) ;this is not automatically changed
3353 (substitute-keyword-arguments (package-arguments base)
3355 `(modify-phases ,phases
3356 (add-before 'check 'adjust-test_embed
3358 (substitute* "runtests.py"
3359 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3360 ;; so it can give the right -L flag to GCC when embedding static
3361 ;; builds of Python. It is unaware that the Python "config"
3362 ;; directory (where the static library lives) was renamed in
3363 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3364 ;; which works fine, because that is where the shared library is.
3366 ;; It also appears to be unaware that the Makefile in Demos/embed
3367 ;; already unconditionally pass the static library location to GCC,
3368 ;; after checking sysconfig.get_config_var('LIBPL).
3370 ;; The effect is that the linker is unable to resolve libexpat
3371 ;; symbols when building for Python 2, because neither the Python 2
3372 ;; shared library nor Expat is available. To fix it, we can either
3373 ;; add Expat as an input and make it visible to the linker, or just
3374 ;; prevent it from overriding the Python shared library location.
3375 ;; The end result is identical, so we take the easy route.
3376 ((" or libname not in os\\.listdir\\(libdir\\)")
3380 ;; The RPython toolchain currently does not support Python 3.
3381 (define-public python2-rpython
3383 (name "python2-rpython")
3388 (uri (pypi-uri "rpython" version))
3391 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3392 (build-system python-build-system)
3393 (arguments `(#:python ,python-2))
3395 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3396 (home-page "https://rpython.readthedocs.org")
3397 (synopsis "Framework for implementing interpreters and virtual machines")
3398 (description "RPython is a translation and support framework for
3399 producing implementations of dynamic languages, emphasizing a clean separation
3400 between language specification and implementation aspects.")
3401 (license license:expat)))
3403 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3404 ;; python-scipy still build, as these three packages are often used together.
3405 (define-public python-numpy
3407 (name "python-numpy")
3413 "https://github.com/numpy/numpy/releases/download/v"
3414 version "/numpy-" version ".tar.gz"))
3417 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3418 (build-system python-build-system)
3420 `(("openblas" ,openblas)
3421 ("lapack" ,lapack)))
3423 `(("python-cython" ,python-cython)
3424 ("python-pytest" ,python-pytest)
3425 ("gfortran" ,gfortran)))
3428 (modify-phases %standard-phases
3429 (add-before 'build 'configure-blas-lapack
3430 (lambda* (#:key inputs #:allow-other-keys)
3431 (call-with-output-file "site.cfg"
3435 libraries = openblas
3436 library_dirs = ~a/lib
3437 include_dirs = ~a/include
3439 # backslash-n to make emacs happy
3441 lapack_libs = lapack
3442 library_dirs = ~a/lib
3443 include_dirs = ~a/include
3445 (assoc-ref inputs "openblas")
3446 (assoc-ref inputs "openblas")
3447 (assoc-ref inputs "lapack")
3448 (assoc-ref inputs "lapack"))))
3450 (add-before 'build 'fix-executable-paths
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3453 ;; instead of /bin/sh.
3454 (substitute* "numpy/distutils/exec_command.py"
3455 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3456 (string-append match-start (assoc-ref inputs "bash") match-end)))
3457 ;; Use "gcc" executable, not "cc".
3458 (substitute* "numpy/distutils/system_info.py"
3459 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3460 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3462 ;; Tests can only be run after the library has been installed and not
3463 ;; within the source directory.
3465 (add-after 'install 'check
3466 (lambda* (#:key outputs inputs #:allow-other-keys)
3467 ;; Make installed package available for running the tests
3468 (add-installed-pythonpath inputs outputs)
3469 ;; Make sure "f2py" etc is found.
3470 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3471 ":" (getenv "PATH")))
3472 (with-directory-excursion "/tmp"
3473 (invoke "python" "-c"
3474 "import numpy; numpy.test(verbose=2)")))))))
3475 (home-page "http://www.numpy.org/")
3476 (synopsis "Fundamental package for scientific computing with Python")
3477 (description "NumPy is the fundamental package for scientific computing
3478 with Python. It contains among other things: a powerful N-dimensional array
3479 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3480 and Fortran code, useful linear algebra, Fourier transform, and random number
3482 (license license:bsd-3)))
3484 (define-public python2-numpy
3485 (package-with-python2 python-numpy))
3487 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3488 ;; interest only for legacy code going back to NumPy's predecessor
3490 (define-public python2-numpy-1.8
3491 (package (inherit python2-numpy)
3497 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3498 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3501 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3503 (substitute-keyword-arguments (package-arguments python2-numpy)
3505 `(modify-phases ,phases
3506 (replace 'configure-blas-lapack
3507 (lambda* (#:key inputs #:allow-other-keys)
3508 (call-with-output-file "site.cfg"
3512 libraries = openblas,lapack
3513 library_dirs = ~a/lib:~a/lib
3514 include_dirs = ~a/include:~a/include
3516 (assoc-ref inputs "openblas")
3517 (assoc-ref inputs "lapack")
3518 (assoc-ref inputs "openblas")
3519 (assoc-ref inputs "lapack"))))
3522 `(("python2-nose" ,python2-nose)))
3523 (description "NumPy is the fundamental package for scientific computing
3524 with Python. It contains among other things: a powerful N-dimensional array
3525 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3526 and Fortran code, useful linear algebra, Fourier transform, and random number
3527 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3528 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3530 (license license:bsd-3)))
3532 (define-public python-munch
3534 (name "python-munch")
3539 (uri (pypi-uri "munch" version))
3542 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3543 (build-system python-build-system)
3544 (home-page "https://github.com/Infinidat/munch")
3545 (synopsis "Dot-accessible dictionary")
3546 (description "Munch is a dot-accessible dictionary similar to JavaScript
3548 (license license:expat)))
3550 (define-public python2-munch
3551 (package-with-python2 python-munch))
3553 (define-public python-colormath
3555 (name "python-colormath")
3560 (uri (pypi-uri "colormath" version))
3563 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3564 (build-system python-build-system)
3566 `(("python-networkx" ,python-networkx)
3567 ("python-numpy" ,python-numpy)))
3568 (home-page "https://github.com/gtaylor/python-colormath")
3569 (synopsis "Color math and conversion library")
3571 "This is a Python library for color math and conversions.")
3572 (license license:bsd-3)))
3574 (define-public python2-colormath
3575 (package-with-python2 python-colormath))
3577 (define-public python-spectra
3579 (name "python-spectra")
3584 (uri (pypi-uri "spectra" version))
3587 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3588 (build-system python-build-system)
3591 (modify-phases %standard-phases
3593 (lambda _ (invoke "nosetests" "-v"))))))
3595 `(("python-colormath" ,python-colormath)))
3597 `(("python-nose" ,python-nose)))
3598 (home-page "https://github.com/jsvine/spectra")
3599 (synopsis "Color scales and color conversion")
3601 "This package provides a Python library intended to make color math,
3602 color scales, and color space conversion easy. It has support for:
3607 @item Color blending
3608 @item Brightening/darkening colors
3609 @item Saturating/desaturating colors
3610 @item Conversion to/from multiple color spaces.
3612 (license license:expat)))
3614 (define-public python2-spectra
3615 (package-with-python2 python-spectra))
3617 (define-public python-numpy-documentation
3619 (name "python-numpy-documentation")
3620 (version (package-version python-numpy))
3621 (source (package-source python-numpy))
3622 (build-system python-build-system)
3624 `(("python-matplotlib" ,python-matplotlib)
3625 ("python-numpy" ,python-numpy)
3626 ("pkg-config" ,pkg-config)
3627 ("python-sphinx" ,python-sphinx)
3628 ("python-numpydoc" ,python-numpydoc)
3629 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3631 texlive-generic-ifxetex
3632 texlive-generic-pdftex
3634 texlive-latex-capt-of
3636 texlive-latex-environ
3637 texlive-latex-eqparbox
3638 texlive-latex-etoolbox
3639 texlive-latex-expdlist
3640 texlive-latex-fancyhdr
3641 texlive-latex-fancyvrb
3642 texlive-latex-fncychap
3644 texlive-latex-framed
3645 texlive-latex-geometry
3646 texlive-latex-graphics
3647 texlive-latex-hyperref
3648 texlive-latex-mdwtools
3649 texlive-latex-multirow
3650 texlive-latex-needspace
3651 texlive-latex-oberdiek
3652 texlive-latex-parskip
3653 texlive-latex-preview
3654 texlive-latex-tabulary
3655 texlive-latex-threeparttable
3656 texlive-latex-titlesec
3657 texlive-latex-trimspaces
3659 texlive-latex-upquote
3661 texlive-latex-varwidth
3662 texlive-latex-wrapfig)))
3663 ("texinfo" ,texinfo)
3665 ("scipy-sphinx-theme"
3666 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3669 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3670 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3673 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3674 ,@(package-native-inputs python-numpy)))
3676 `(#:tests? #f ; we're only generating the documentation
3678 (modify-phases %standard-phases
3681 (lambda* (#:key inputs outputs #:allow-other-keys)
3682 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3684 data "/doc/" ,name "-"
3685 ,(package-version python-numpy)))
3686 (info-reader (string-append data "/info"))
3687 (html (string-append doc "/html"))
3688 (scipy-sphinx-theme "scipy-sphinx-theme")
3689 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3690 (pyver ,(string-append "PYVER=")))
3692 ;; FIXME: this is needed to for texlive-union to generate
3693 ;; fonts, which are not found.
3694 (setenv "HOME" "/tmp")
3696 (with-directory-excursion "doc"
3697 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3699 (invoke "make" "html" pyver)
3700 (invoke "make" "latex" "PAPER=a4" pyver)
3701 (invoke "make" "-C" "build/latex"
3702 "all-pdf" "PAPER=a4" pyver)
3703 ;; FIXME: Generation of the info file fails.
3704 ;; (invoke "make" "info" pyver)
3706 ;; (copy-file "build/texinfo/numpy.info"
3707 ;; (string-append info "/numpy.info"))
3708 (for-each (lambda (file)
3709 (copy-file (string-append "build/latex" file)
3710 (string-append doc file)))
3711 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3712 (with-directory-excursion "build/html"
3713 (for-each (lambda (file)
3714 (let* ((dir (dirname file))
3715 (tgt-dir (string-append html "/" dir)))
3716 (unless (equal? "." dir)
3718 (install-file file html)))
3719 (find-files "." ".*")))))
3721 (home-page (package-home-page python-numpy))
3722 (synopsis "Documentation for the python-numpy package")
3723 (description (package-description python-numpy))
3724 (license (package-license python-numpy))))
3726 (define-public python2-numpy-documentation
3727 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3729 (inherit numpy-documentation)
3730 (native-inputs `(("python2-functools32" ,python2-functools32)
3731 ,@(package-native-inputs numpy-documentation))))))
3733 (define-public python-pygit2
3735 (name "python-pygit2")
3740 (uri (pypi-uri "pygit2" version))
3742 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3743 (build-system python-build-system)
3745 '(#:tests? #f)) ; tests don't run correctly in our environment
3747 `(("python-six" ,python-six)
3748 ("python-cffi" ,python-cffi)
3749 ("libgit2" ,libgit2)
3750 ("python-tox" ,python-tox)))
3752 `(("python-pytest" ,python-pytest)))
3753 (home-page "https://github.com/libgit2/pygit2")
3754 (synopsis "Python bindings for libgit2")
3755 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3756 library, libgit2 implements Git plumbing.")
3757 ;; GPL2.0 only, with linking exception.
3758 (license license:gpl2)))
3760 (define-public python2-pygit2
3761 (package-with-python2 python-pygit2))
3763 (define-public python-pyparsing
3765 (name "python-pyparsing")
3770 (uri (pypi-uri "pyparsing" version))
3772 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3773 (build-system python-build-system)
3774 (outputs '("out" "doc"))
3776 `(#:tests? #f ; no test target
3778 (modify-phases %standard-phases
3779 (add-after 'install 'install-doc
3780 (lambda* (#:key outputs #:allow-other-keys)
3781 (let* ((doc (string-append (assoc-ref outputs "doc")
3782 "/share/doc/" ,name "-" ,version))
3783 (html-doc (string-append doc "/html"))
3784 (examples (string-append doc "/examples")))
3790 (install-file file tgt))
3791 (find-files dir ".*")))
3792 (list "docs" "htmldoc" "examples")
3793 (list doc html-doc examples))
3795 (home-page "https://github.com/pyparsing/pyparsing")
3796 (synopsis "Python parsing class library")
3798 "The pyparsing module is an alternative approach to creating and
3799 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3800 of regular expressions. The pyparsing module provides a library of classes
3801 that client code uses to construct the grammar directly in Python code.")
3802 (license license:expat)))
3804 (define-public python2-pyparsing
3805 (package-with-python2 python-pyparsing))
3807 (define-public python-numpydoc
3809 (name "python-numpydoc")
3814 (uri (pypi-uri "numpydoc" version))
3817 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3818 (build-system python-build-system)
3820 `(("python-sphinx" ,python-sphinx)))
3822 `(("python-nose" ,python-nose)))
3823 (home-page "https://pypi.python.org/pypi/numpydoc")
3825 "Numpy's Sphinx extensions")
3827 "Sphinx extension to support docstrings in Numpy format.")
3828 (license license:bsd-2)))
3830 (define-public python2-numpydoc
3831 (package-with-python2 python-numpydoc))
3833 (define-public python-numexpr
3835 (name "python-numexpr")
3840 (uri (pypi-uri "numexpr" version))
3843 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3844 (build-system python-build-system)
3845 (arguments `(#:tests? #f)) ; no tests included
3847 `(("python-numpy" ,python-numpy)))
3848 (home-page "https://github.com/pydata/numexpr")
3849 (synopsis "Fast numerical expression evaluator for NumPy")
3851 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3852 expressions that operate on arrays are accelerated and use less memory than
3853 doing the same calculation in Python. In addition, its multi-threaded
3854 capabilities can make use of all your cores, which may accelerate
3855 computations, most specially if they are not memory-bounded (e.g. those using
3856 transcendental functions).")
3857 (license license:expat)))
3859 (define-public python2-numexpr
3860 (package-with-python2 python-numexpr))
3862 (define-public python-cycler
3864 (name "python-cycler")
3868 (uri (pypi-uri "cycler" version))
3871 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3872 (build-system python-build-system)
3874 ;; XXX: The current version requires 'coveralls' which we don't have.
3875 ;; Enable this for the next release which uses 'python-pytest'.
3878 `(("python-six" ,python-six)))
3879 (home-page "http://matplotlib.org/cycler/")
3880 (synopsis "Composable keyword argument iterator")
3882 "When using @code{matplotlib} and plotting more than one line, it is
3883 common to want to be able to want to be able to cycle over one or more artist
3884 styles; but the plotting logic can quickly become involved.
3885 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3886 @code{Cycler} class was developed.")
3887 (license license:bsd-3)))
3889 (define-public python2-cycler
3890 (package-with-python2 python-cycler))
3892 (define-public python-colorspacious
3894 (name "python-colorspacious")
3900 (url "https://github.com/njsmith/colorspacious.git")
3901 (commit (string-append "v" version))))
3902 (file-name (git-file-name name version))
3904 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3905 (build-system python-build-system)
3907 `(("python-numpy" ,python-numpy)))
3909 `(("python-nose" ,python-nose)))
3912 (modify-phases %standard-phases
3915 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3916 (home-page "https://github.com/njsmith/colorspacious")
3917 (synopsis "Python library for colorspace conversions")
3918 (description "@code{colorspacious} is a Python library that lets you
3919 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3920 (license license:expat)))
3922 (define-public python2-colorspacious
3923 (package-with-python2 python-colorspacious))
3925 (define-public python-matplotlib
3927 (name "python-matplotlib")
3932 (uri (pypi-uri "matplotlib" version))
3935 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3936 (build-system python-build-system)
3937 (propagated-inputs ; the following packages are all needed at run time
3938 `(("python-cycler" ,python-cycler)
3939 ("python-kiwisolver" ,python-kiwisolver)
3940 ("python-pyparsing" ,python-pyparsing)
3941 ("python-pygobject" ,python-pygobject)
3942 ("gobject-introspection" ,gobject-introspection)
3943 ("python-tkinter" ,python "tk")
3944 ("python-dateutil" ,python-dateutil)
3945 ("python-numpy" ,python-numpy)
3946 ("python-pillow" ,python-pillow)
3947 ("python-pytz" ,python-pytz)
3948 ("python-six" ,python-six)
3949 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3950 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3951 ;; object. For this reason we need to import both libraries.
3952 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3953 ("python-pycairo" ,python-pycairo)
3954 ("python-cairocffi" ,python-cairocffi)))
3956 `(("libpng" ,libpng)
3957 ("imagemagick" ,imagemagick)
3958 ("freetype" ,freetype)
3961 ;; FIXME: Add backends when available.
3962 ;("python-wxpython" ,python-wxpython)
3966 `(("pkg-config" ,pkg-config)
3967 ("python-pytest" ,python-pytest)
3968 ("python-mock" ,python-mock)
3973 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3976 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3979 (modify-phases %standard-phases
3980 ;; XXX We disable all image comparison tests because we're using a
3981 ;; newer version of FreeType than matplotlib expects. This leads to
3982 ;; minor differences throughout the tests.
3983 (add-after 'unpack 'fix-and-disable-failing-tests
3985 (substitute* (append (find-files "lib/matplotlib/tests/"
3987 (find-files "lib/mpl_toolkits/tests"
3989 (("^from matplotlib" match)
3990 (string-append "import pytest\n" match))
3991 (("( *)@image_comparison" match indent)
3992 (string-append indent
3993 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3995 (substitute* "lib/matplotlib/tests/test_animation.py"
3996 (("/bin/sh") (which "sh")))
3997 (for-each delete-file
3998 ;; test_normal_axes, test_get_tightbbox_polar
3999 '("lib/matplotlib/tests/test_axes.py"
4000 ;; test_outward_ticks
4001 "lib/matplotlib/tests/test_tightlayout.py"
4002 ;; Fontconfig returns no fonts.
4003 "lib/matplotlib/tests/test_font_manager.py"))
4005 (add-before 'install 'install-jquery-ui
4006 (lambda* (#:key outputs inputs #:allow-other-keys)
4007 (let ((dir (string-append (assoc-ref outputs "out")
4008 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4011 (assoc-ref inputs "jquery-ui")
4015 (add-after 'install 'check
4016 (lambda* (#:key outputs inputs #:allow-other-keys)
4017 (add-installed-pythonpath inputs outputs)
4018 (invoke "python" "tests.py" "-v"
4019 "-m" "not network")))
4020 (add-before 'build 'configure-environment
4021 (lambda* (#:key outputs inputs #:allow-other-keys)
4022 (let ((cairo (assoc-ref inputs "cairo")))
4023 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4025 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4026 (setenv "HOME" (getcwd))
4027 (call-with-output-file "setup.cfg"
4029 (format port "[directories]~%
4030 basedirlist = ~a,~a~%
4033 (assoc-ref inputs "tcl")
4034 (assoc-ref inputs "tk")))))
4036 (home-page "https://matplotlib.org/")
4037 (synopsis "2D plotting library for Python")
4039 "Matplotlib is a Python 2D plotting library which produces publication
4040 quality figures in a variety of hardcopy formats and interactive environments
4041 across platforms. Matplotlib can be used in Python scripts, the python and
4042 ipython shell, web application servers, and six graphical user interface
4044 (license license:psfl)
4045 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4047 (define-public python2-matplotlib
4048 (let ((matplotlib (package-with-python2
4049 (strip-python2-variant python-matplotlib))))
4050 (package (inherit matplotlib)
4055 (uri (pypi-uri "matplotlib" version))
4058 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4060 (substitute-keyword-arguments (package-arguments matplotlib)
4062 `(modify-phases ,phases
4063 (replace 'install-jquery-ui
4064 (lambda* (#:key outputs inputs #:allow-other-keys)
4065 (let ((dir (string-append (assoc-ref outputs "out")
4066 "/lib/python2.7/site-packages/"
4067 "matplotlib/backends/web_backend/")))
4070 (assoc-ref inputs "jquery-ui")
4073 (delete 'check))))) ; These tests weren't run the the past.
4074 ;; Make sure to use special packages for Python 2 instead
4075 ;; of those automatically rewritten by package-with-python2.
4077 `(("python2-pycairo" ,python2-pycairo)
4078 ("python2-backports-functools-lru-cache"
4079 ,python2-backports-functools-lru-cache)
4080 ("python2-functools32" ,python2-functools32)
4081 ("python2-pygobject-2" ,python2-pygobject-2)
4082 ("python2-subprocess32" ,python2-subprocess32)
4083 ("python2-tkinter" ,python-2 "tk")
4084 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4085 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4087 (define-public python-matplotlib-documentation
4089 (name "python-matplotlib-documentation")
4090 (version (package-version python-matplotlib))
4091 (source (package-source python-matplotlib))
4092 (build-system python-build-system)
4094 `(("python-matplotlib" ,python-matplotlib)
4095 ("python-colorspacious" ,python-colorspacious)
4096 ("python-sphinx" ,python-sphinx)
4097 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4098 ("python-sphinx-gallery" ,python-sphinx-gallery)
4099 ("python-numpydoc" ,python-numpydoc)
4100 ("python-ipython" ,python-ipython)
4101 ("python-ipykernel" ,python-ipykernel)
4102 ("python-mock" ,python-mock)
4103 ("graphviz" ,graphviz)
4104 ("texlive" ,(texlive-union (list texlive-amsfonts
4105 texlive-latex-amsmath
4106 texlive-latex-enumitem
4107 texlive-latex-expdlist
4108 texlive-latex-geometry
4109 texlive-latex-preview
4110 texlive-latex-type1cm
4113 texlive-generic-pdftex
4116 texlive-fonts-adobe-times
4117 texlive-fonts-txfonts)))
4118 ("texinfo" ,texinfo)
4119 ,@(package-native-inputs python-matplotlib)))
4121 `(#:tests? #f ; we're only generating documentation
4123 (modify-phases %standard-phases
4124 ;; The tests in python-matplotlib are run after the install phase, so
4125 ;; we need to delete the extra phase here.
4130 (setenv "PYTHONPATH"
4131 (string-append (getenv "PYTHONPATH")
4132 ":" (getcwd) "/../examples/units"))
4133 (substitute* "conf.py"
4135 (("^SHA = check_output.*")
4136 (string-append "SHA = \"" ,version "\"\n"))
4137 ;; Don't fetch intersphinx files from the Internet
4138 (("^explicit_order_folders" m)
4139 (string-append "intersphinx_mapping = {}\n" m))
4140 (("'sphinx.ext.intersphinx',") "")
4141 ;; Disable URL embedding which requires internet access.
4142 (("'https://docs.scipy.org/doc/numpy'") "None")
4143 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4145 "SPHINXBUILD=sphinx-build"
4146 "SPHINXOPTS=" ; don't abort on warnings
4149 (lambda* (#:key inputs outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4151 (doc (string-append data "/doc/python-matplotlib-" ,version))
4152 (info (string-append data "/info"))
4153 (html (string-append doc "/html")))
4156 (copy-recursively "build/html" html)
4157 (symlink (string-append html "/_images")
4158 (string-append info "/matplotlib-figures"))
4159 (with-directory-excursion "build/texinfo"
4160 (substitute* "matplotlib.texi"
4161 (("@image\\{([^,]*)" all file)
4162 (string-append "@image{matplotlib-figures/" file)))
4163 (symlink (string-append html "/_images")
4164 "./matplotlib-figures")
4165 (invoke "makeinfo" "--no-split"
4166 "-o" "matplotlib.info" "matplotlib.texi"))
4167 (install-file "build/texinfo/matplotlib.info" info))
4169 (home-page (package-home-page python-matplotlib))
4170 (synopsis "Documentation for the python-matplotlib package")
4171 (description (package-description python-matplotlib))
4172 (license (package-license python-matplotlib))))
4174 (define-public python2-matplotlib-documentation
4175 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4179 (alist-delete "python-sphinx-copybutton"
4180 (package-native-inputs parent))))))
4182 (define-public python-matplotlib-venn
4184 (name "python-matplotlib-venn")
4189 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4192 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4193 (build-system python-build-system)
4194 (arguments '(#:tests? #f)) ; tests are not included
4196 `(("python-matplotlib" ,python-matplotlib)
4197 ("python-numpy" ,python-numpy)
4198 ("python-scipy" ,python-scipy)))
4200 `(("unzip" ,unzip)))
4201 (home-page "https://github.com/konstantint/matplotlib-venn")
4202 (synopsis "Plot area-proportional Venn diagrams")
4204 "This package provides tools for plotting area-proportional two- and
4205 three-way Venn diagrams in @code{matplotlib}.")
4206 (license license:expat)))
4208 (define-public python2-pysnptools
4210 (name "python2-pysnptools")
4215 (uri (pypi-uri "pysnptools" version))
4218 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4219 (build-system python-build-system)
4221 `(#:python ,python-2 ; only Python 2.7 is supported
4222 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4224 `(("python2-numpy" ,python2-numpy)
4225 ("python2-scipy" ,python2-scipy)
4226 ("python2-pandas" ,python2-pandas)))
4228 `(("python2-cython" ,python2-cython)))
4229 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4230 (synopsis "Library for reading and manipulating genetic data")
4232 "PySnpTools is a library for reading and manipulating genetic data. It
4233 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4234 those files. It can also efficiently manipulate ranges of integers using set
4235 operators such as union, intersection, and difference.")
4236 (license license:asl2.0)))
4238 (define-public python-scipy
4240 (name "python-scipy")
4245 (uri (pypi-uri "scipy" version))
4248 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4249 (build-system python-build-system)
4251 `(("python-numpy" ,python-numpy)
4252 ("python-matplotlib" ,python-matplotlib)
4253 ("python-pyparsing" ,python-pyparsing)))
4255 `(("lapack" ,lapack)
4256 ("openblas" ,openblas)))
4258 `(("python-cython" ,python-cython)
4259 ("python-pytest" ,python-pytest)
4260 ("python-sphinx" ,python-sphinx)
4261 ("python-numpydoc" ,python-numpydoc)
4262 ("gfortran" ,gfortran)
4265 (outputs '("out" "doc"))
4268 (modify-phases %standard-phases
4269 (add-after 'unpack 'disable-broken-tests
4271 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4272 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4273 (string-append indent
4274 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4276 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4277 (("^def test_parallel_threads\\(\\):" m)
4278 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4281 (add-before 'build 'configure-openblas
4282 (lambda* (#:key inputs #:allow-other-keys)
4283 (call-with-output-file "site.cfg"
4287 libraries = openblas
4288 library_dirs = ~a/lib
4289 include_dirs = ~a/include
4291 # backslash-n to make emacs happy
4293 library_dirs = ~a/lib
4294 atlas_libs = openblas
4296 (assoc-ref inputs "openblas")
4297 (assoc-ref inputs "openblas")
4298 (assoc-ref inputs "openblas"))))
4300 (add-after 'install 'install-doc
4301 (lambda* (#:key inputs outputs #:allow-other-keys)
4302 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4303 (doc (string-append data "/doc/" ,name "-" ,version))
4304 (html (string-append doc "/html"))
4305 (pyver ,(string-append "PYVER=" (version-major+minor
4306 (package-version python))))
4307 ;; By default it tries to run sphinx-build through the Python
4308 ;; interpreter which won't work with our shell wrapper.
4309 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4310 ;; Make installed package available for building the
4312 (add-installed-pythonpath inputs outputs)
4313 (with-directory-excursion "doc"
4314 ;; Fix generation of images for mathematical expressions.
4315 (substitute* (find-files "source" "conf\\.py")
4316 (("pngmath_use_preview = True")
4317 "pngmath_use_preview = False"))
4319 (invoke "make" "html" pyver sphinxbuild)
4320 (with-directory-excursion "build/html"
4321 (for-each (lambda (file)
4322 (let* ((dir (dirname file))
4323 (tgt-dir (string-append html "/" dir)))
4324 (install-file file html)))
4325 (find-files "." ".*")))))
4327 ;; Tests can only be run after the library has been installed and not
4328 ;; within the source directory.
4330 (add-after 'install 'check
4331 (lambda* (#:key inputs outputs #:allow-other-keys)
4332 (add-installed-pythonpath inputs outputs)
4333 (with-directory-excursion "/tmp"
4334 (invoke "python" "-c"
4335 "import scipy; scipy.test(verbose=2)")))))))
4336 (home-page "https://www.scipy.org/")
4337 (synopsis "The Scipy library provides efficient numerical routines")
4338 (description "The SciPy library is one of the core packages that make up
4339 the SciPy stack. It provides many user-friendly and efficient numerical
4340 routines such as routines for numerical integration and optimization.")
4341 (properties `((python2-variant . ,(delay python2-scipy))))
4342 (license license:bsd-3)))
4344 ;; Version 1.2.2 is the last version to support Python 2
4345 (define-public python2-scipy
4347 (inherit (package-with-python2
4348 (strip-python2-variant python-scipy)))
4353 (uri (pypi-uri "scipy" version))
4356 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4358 (define-public python-socksipy-branch
4360 (name "python-socksipy-branch")
4365 (uri (pypi-uri "SocksiPy-branch" version))
4368 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4369 (build-system python-build-system)
4371 `(#:tests? #f)) ; There are no tests
4372 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4373 (synopsis "Python SOCKS module")
4375 "SocksiPy - A Python SOCKS client module. It provides a
4376 socket-like interface that supports connections to any TCP
4377 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4378 The original version was developed by Dan Haim, this is a
4379 branch created by Mario Vilas to address some open issues,
4380 as the original project seems to have been abandoned circa 2007.")
4381 (license license:bsd-3)))
4383 (define-public python2-socksipy-branch
4384 (package-with-python2 python-socksipy-branch))
4386 (define-public python-pycodestyle
4388 (name "python-pycodestyle")
4393 (uri (pypi-uri "pycodestyle" version))
4396 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4397 (build-system python-build-system)
4398 (home-page "https://pycodestyle.readthedocs.io/")
4399 (synopsis "Python style guide checker")
4400 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4401 Python code against some of the style conventions in
4402 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4403 (license license:expat)))
4405 (define-public python2-pycodestyle
4406 (package-with-python2 python-pycodestyle))
4408 (define-public python-multidict
4410 (name "python-multidict")
4415 (uri (pypi-uri "multidict" version))
4418 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4419 (build-system python-build-system)
4421 `(("python-pytest" ,python-pytest)
4422 ("python-pytest-runner" ,python-pytest-runner)))
4423 (home-page "https://github.com/aio-libs/multidict/")
4424 (synopsis "Multidict implementation")
4425 (description "Multidict is dict-like collection of key-value pairs
4426 where key might be occurred more than once in the container.")
4427 (license license:asl2.0)))
4429 (define-public python-orderedmultidict
4431 (name "python-orderedmultidict")
4436 (uri (pypi-uri "orderedmultidict" version))
4439 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4440 (build-system python-build-system)
4443 (modify-phases %standard-phases
4444 (add-after 'unpack 'fix-tests
4446 ;; The package uses nosetest for running the tests.
4447 ;; Adding this initfile allows to run the test suite
4448 ;; without requiring nosetest.
4449 (with-output-to-file "tests/__init__.py" newline)
4452 `(("python-six" ,python-six)))
4454 `(("python-pycodestyle" ,python-pycodestyle)))
4455 (home-page "https://github.com/gruns/orderedmultidict")
4456 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4457 (description "This package contains a library for ordered multivalue
4458 dictionaries. A multivalue dictionary is a dictionary that can store
4459 multiple values for the same key. An ordered multivalue dictionary is a
4460 multivalue dictionary that retains the order of insertions and deletions.")
4461 (license license:unlicense)))
4463 (define-public python2-orderedmultidict
4464 (package-with-python2 python-orderedmultidict))
4466 (define-public python-autopep8
4468 (name "python-autopep8")
4473 (uri (pypi-uri "autopep8" version))
4476 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4477 (build-system python-build-system)
4479 `(("python-pycodestyle" ,python-pycodestyle)))
4480 (home-page "https://github.com/hhatto/autopep8")
4481 (synopsis "Format Python code according to the PEP 8 style guide")
4483 "@code{autopep8} automatically formats Python code to conform to
4484 the PEP 8 style guide. It uses the pycodestyle utility to determine
4485 what parts of the code needs to be formatted. @code{autopep8} is
4486 capable of fixing most of the formatting issues that can be reported
4488 (license (license:non-copyleft
4489 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4491 (define-public python2-autopep8
4492 (package-with-python2 python-autopep8))
4494 (define-public python-distutils-extra
4496 (name "python-distutils-extra")
4501 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4502 version "/+download/python-distutils-extra-"
4506 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4507 (build-system python-build-system)
4508 (home-page "https://launchpad.net/python-distutils-extra/")
4509 (synopsis "Enhancements to Python's distutils")
4511 "The python-distutils-extra module enables you to easily integrate
4512 gettext support, themed icons, and scrollkeeper-based documentation into
4513 Python's distutils.")
4514 (license license:gpl2)))
4516 (define-public python2-distutils-extra
4517 (package-with-python2 python-distutils-extra))
4519 (define-public python2-elib.intl
4521 (name "python2-elib.intl")
4525 ;; This project doesn't tag releases or publish tarballs, so we take
4526 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4529 (url "https://github.com/dieterv/elib.intl.git")
4530 (commit "d09997cfef")))
4531 (file-name (string-append name "-" version "-checkout"))
4534 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4535 (build-system python-build-system)
4537 ;; incompatible with Python 3 (exception syntax)
4538 `(#:python ,python-2
4540 (home-page "https://github.com/dieterv/elib.intl")
4541 (synopsis "Enhanced internationalization for Python")
4543 "The elib.intl module provides enhanced internationalization (I18N)
4544 services for your Python modules and applications.")
4545 (license license:lgpl3+)))
4547 (define-public python-olefile
4549 (name "python-olefile")
4554 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4555 "download/v" version "/olefile-" version ".tar.gz"))
4556 (file-name (string-append name "-" version ".tar.gz"))
4559 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4560 (build-system python-build-system)
4561 (home-page "https://www.decalage.info/python/olefileio")
4562 (synopsis "Read and write Microsoft OLE2 files.")
4564 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4565 Storage or Compound Document, Microsoft Office). It is an improved version of
4566 the OleFileIO module from PIL, the Python Image Library.")
4567 (license license:bsd-3)))
4569 (define-public python2-olefile
4570 (package-with-python2 python-olefile))
4572 (define-public python-pillow
4574 (name "python-pillow")
4579 (uri (pypi-uri "Pillow" version))
4582 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4583 (build-system python-build-system)
4585 `(("python-pytest" ,python-pytest)))
4587 `(("freetype" ,freetype)
4590 ("libjpeg" ,libjpeg)
4591 ("openjpeg" ,openjpeg)
4592 ("libtiff" ,libtiff)
4593 ("libwebp" ,libwebp)))
4595 `(("python-olefile" ,python-olefile)))
4598 (modify-phases %standard-phases
4599 (add-after 'unpack 'patch-ldconfig
4601 (substitute* "setup.py"
4602 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4603 (delete 'check) ; We must run checks after python-pillow is installed.
4604 (add-after 'install 'check-installed
4605 (lambda* (#:key outputs inputs #:allow-other-keys)
4607 (setenv "HOME" (getcwd))
4608 ;; Make installed package available for running the tests.
4609 (add-installed-pythonpath inputs outputs)
4610 (invoke "python" "selftest.py" "--installed")
4611 (invoke "python" "-m" "pytest" "-vv")))))))
4612 (home-page "https://python-pillow.org")
4613 (synopsis "Fork of the Python Imaging Library")
4615 "The Python Imaging Library adds image processing capabilities to your
4616 Python interpreter. This library provides extensive file format support, an
4617 efficient internal representation, and fairly powerful image processing
4618 capabilities. The core image library is designed for fast access to data
4619 stored in a few basic pixel formats. It should provide a solid foundation for
4620 a general image processing tool.")
4621 (license (license:x11-style
4622 "http://www.pythonware.com/products/pil/license.htm"
4623 "The PIL Software License"))))
4625 (define-public python2-pillow
4626 (package-with-python2 python-pillow))
4628 (define-public python-pycparser
4630 (name "python-pycparser")
4635 (uri (pypi-uri "pycparser" version))
4638 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4639 (outputs '("out" "doc"))
4640 (build-system python-build-system)
4642 `(("pkg-config" ,pkg-config)))
4645 (modify-phases %standard-phases
4648 (with-directory-excursion "tests"
4649 (invoke "python" "all_tests.py"))
4651 (add-after 'install 'install-doc
4652 (lambda* (#:key outputs #:allow-other-keys)
4653 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4654 (doc (string-append data "/doc/" ,name "-" ,version))
4655 (examples (string-append doc "/examples")))
4657 (for-each (lambda (file)
4658 (copy-file (string-append "." file)
4659 (string-append doc file)))
4660 '("/README.rst" "/CHANGES" "/LICENSE"))
4661 (copy-recursively "examples" examples)
4663 (home-page "https://github.com/eliben/pycparser")
4664 (synopsis "C parser in Python")
4666 "Pycparser is a complete parser of the C language, written in pure Python
4667 using the PLY parsing library. It parses C code into an AST and can serve as
4668 a front-end for C compilers or analysis tools.")
4669 (license license:bsd-3)))
4671 (define-public python2-pycparser
4672 (package-with-python2 python-pycparser))
4674 (define-public python-pywavelets
4676 (name "python-pywavelets")
4678 (home-page "https://github.com/PyWavelets/pywt")
4681 (uri (pypi-uri "PyWavelets" version))
4684 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4685 (build-system python-build-system)
4687 '(#:modules ((ice-9 ftw)
4691 (guix build python-build-system))
4692 #:phases (modify-phases %standard-phases
4695 (let ((cwd (getcwd))
4696 (libdir (find (cut string-prefix? "lib." <>)
4697 (scandir "build"))))
4698 (with-directory-excursion (string-append cwd "/build/" libdir)
4699 (invoke "nosetests" "-v" "."))))))))
4701 `(("python-matplotlib" ,python-matplotlib) ;for tests
4702 ("python-nose" ,python-nose)))
4704 `(("python-numpy" ,python-numpy)))
4705 (synopsis "Wavelet transforms in Python")
4707 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4708 mathematical basis functions that are localized in both time and frequency.
4709 Wavelet transforms are time-frequency transforms employing wavelets. They are
4710 similar to Fourier transforms, the difference being that Fourier transforms are
4711 localized only in frequency instead of in time and frequency.")
4712 (license license:expat)))
4714 (define-public python2-pywavelets
4715 (package-with-python2 python-pywavelets))
4717 (define-public python-xcffib
4719 (name "python-xcffib")
4724 (uri (pypi-uri "xcffib" version))
4727 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4728 (build-system python-build-system)
4730 `(("libxcb" ,libxcb)))
4732 `(("python-cffi" ,python-cffi) ; used at run time
4733 ("python-six" ,python-six)))
4735 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4738 (modify-phases %standard-phases
4739 (add-after 'unpack 'fix-libxcb-path
4740 (lambda* (#:key inputs #:allow-other-keys)
4741 (let ((libxcb (assoc-ref inputs "libxcb")))
4742 (substitute* '("xcffib/__init__.py")
4743 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4745 (add-after 'install 'install-doc
4746 (lambda* (#:key outputs #:allow-other-keys)
4747 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4748 "/doc/" ,name "-" ,version)))
4750 (copy-file "README.md"
4751 (string-append doc "/README.md"))
4753 (home-page "https://github.com/tych0/xcffib")
4754 (synopsis "XCB Python bindings")
4756 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4757 support for Python 3 and PyPy. It is based on cffi.")
4758 (license license:expat)))
4760 (define-public python2-xcffib
4761 (package-with-python2 python-xcffib))
4763 (define-public python-cairocffi
4765 (name "python-cairocffi")
4770 (uri (pypi-uri "cairocffi" version))
4773 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4774 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4775 (build-system python-build-system)
4776 (outputs '("out" "doc"))
4780 ("gdk-pixbuf" ,gdk-pixbuf)
4784 `(("pkg-config" ,pkg-config)
4785 ("python-pytest" ,python-pytest)
4786 ("python-pytest-cov" ,python-pytest-cov)
4787 ("python-pytest-runner" ,python-pytest-runner)
4788 ("python-sphinx" ,python-sphinx)
4789 ("python-docutils" ,python-docutils)))
4791 `(("python-xcffib" ,python-xcffib))) ; used at run time
4794 (modify-phases %standard-phases
4795 (add-after 'unpack 'patch-paths
4796 (lambda* (#:key inputs outputs #:allow-other-keys)
4797 (substitute* (find-files "." "\\.py$")
4798 (("dlopen\\(ffi, 'cairo'")
4799 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4800 "/lib/libcairo.so.2'"))
4801 (("dlopen\\(ffi, 'gdk-3'")
4802 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4803 "/lib/libgtk-3.so.0'"))
4804 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4805 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4806 "/lib/libgdk_pixbuf-2.0.so.0'"))
4807 (("dlopen\\(ffi, 'glib-2.0'")
4808 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4809 "/lib/libglib-2.0.so.0'"))
4810 (("dlopen\\(ffi, 'gobject-2.0'")
4811 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4812 "/lib/libgobject-2.0.so.0'"))
4813 (("dlopen\\(ffi, 'pangocairo-1.0'")
4814 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4815 "/lib/libpangocairo-1.0.so.0'"))
4816 (("dlopen\\(ffi, 'pango-1.0'")
4817 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4818 "/lib/libpango-1.0.so.0'")))
4820 (add-after 'install 'install-doc
4821 (lambda* (#:key inputs outputs #:allow-other-keys)
4822 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4823 (doc (string-append data "/doc/" ,name "-" ,version))
4824 (html (string-append doc "/html")))
4825 (setenv "LD_LIBRARY_PATH"
4826 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4827 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4828 (setenv "LANG" "en_US.UTF-8")
4830 (for-each (lambda (file)
4831 (copy-file (string-append "." file)
4832 (string-append doc file)))
4833 '("/README.rst" "/CHANGES" "/LICENSE"))
4834 (system* "python" "setup.py" "build_sphinx")
4835 (copy-recursively "docs/_build/html" html)
4837 (home-page "https://github.com/Kozea/cairocffi")
4838 (synopsis "Python bindings and object-oriented API for Cairo")
4840 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4841 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4842 graphics library with support for multiple backends including image buffers,
4843 PNG, PostScript, PDF, and SVG file output.")
4844 (license license:bsd-3)))
4846 (define-public python2-cairocffi
4847 (package-with-python2 python-cairocffi))
4849 (define-public python-decorator
4851 (name "python-decorator")
4856 (uri (pypi-uri "decorator" version))
4858 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4859 (build-system python-build-system)
4860 (home-page "https://pypi.python.org/pypi/decorator/")
4861 (synopsis "Python module to simplify usage of decorators")
4863 "The aim of the decorator module is to simplify the usage of decorators
4864 for the average programmer, and to popularize decorators usage giving examples
4865 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4866 etc. The core of this module is a decorator factory.")
4867 (license license:expat)))
4869 (define-public python2-decorator
4870 (package-with-python2 python-decorator))
4872 (define-public python-drmaa
4874 (name "python-drmaa")
4879 (uri (pypi-uri "drmaa" version))
4881 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4882 (build-system python-build-system)
4883 ;; The test suite requires libdrmaa which is provided by the cluster
4884 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4885 ;; should be set to the path of the libdrmaa library.
4886 (arguments '(#:tests? #f))
4888 `(("python-nose" ,python-nose)))
4889 (home-page "https://pypi.python.org/pypi/drmaa")
4890 (synopsis "Python bindings for the DRMAA library")
4892 "A Python package for Distributed Resource Management (DRM) job
4893 submission and control. This package is an implementation of the DRMAA 1.0
4894 Python language binding specification.")
4895 (license license:bsd-3)))
4897 (define-public python2-drmaa
4898 (package-with-python2 python-drmaa))
4900 (define-public python-grako
4902 (name "python-grako")
4908 (pypi-uri "grako" version ".zip"))
4911 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4912 (build-system python-build-system)
4913 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4916 ("python-pytest" ,python-pytest)
4917 ("python-pytest-runner" ,python-pytest-runner)))
4918 (home-page "https://bitbucket.org/neogeny/grako")
4919 (synopsis "EBNF parser generator")
4921 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4922 memoizing PEG/Packrat parser in Python.")
4923 (license license:bsd-3)))
4925 (define-public python2-grako
4926 (package-with-python2 python-grako))
4928 (define-public python-gridmap
4930 (name "python-gridmap")
4936 (url "https://github.com/pygridtools/gridmap.git")
4937 (commit (string-append "v" version))))
4938 (file-name (git-file-name name version))
4940 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4941 (build-system python-build-system)
4943 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4945 `(("python-psutil" ,python-psutil)
4946 ("python-drmaa" ,python-drmaa)
4947 ("python-pyzmq" ,python-pyzmq)))
4948 (home-page "https://github.com/pygridtools/gridmap")
4949 (synopsis "Create jobs on a cluster directly from Python")
4951 "Gridmap is a Python package to allow you to easily create jobs on the
4952 cluster directly from Python. You can directly map Python functions onto the
4953 cluster without needing to write any wrapper code yourself.")
4954 (license license:gpl3+)))
4956 (define-public python2-gridmap
4957 (package-with-python2 python-gridmap))
4959 (define-public python-honcho
4961 (name "python-honcho")
4967 (url "https://github.com/nickstenning/honcho.git")
4968 (commit (string-append "v" version))))
4969 (file-name (git-file-name name version))
4971 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4972 (build-system python-build-system)
4974 `(("python-pytest" ,python-pytest)
4975 ("python-mock" ,python-mock)
4976 ("python-tox" ,python-tox)
4977 ("which" ,which))) ;for tests
4979 `(("python-jinja2" ,python-jinja2)))
4982 (modify-phases %standard-phases
4984 (add-after 'install 'check
4985 (lambda* (#:key outputs inputs #:allow-other-keys)
4986 ;; fix honcho path in testsuite
4987 (substitute* "tests/conftest.py"
4988 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4989 "/bin/honcho" "'")))
4990 ;; It's easier to run tests after install.
4991 ;; Make installed package available for running the tests
4992 (add-installed-pythonpath inputs outputs)
4993 (invoke "py.test" "-v"))))))
4994 (home-page "https://github.com/nickstenning/honcho")
4995 (synopsis "Manage Procfile-based applications")
4997 "A Procfile is a file which describes how to run an application
4998 consisting of several processes. honcho starts all listed processes.
4999 The output of all running processes is collected by honcho and
5001 (license license:expat)))
5003 (define-public python2-honcho
5004 (package-with-python2 python-honcho))
5006 (define-public python-pexpect
5008 (name "python-pexpect")
5013 (uri (pypi-uri "pexpect" version))
5015 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5016 (build-system python-build-system)
5019 (modify-phases %standard-phases
5020 (add-before 'check 'prepare-tests
5022 (substitute* (find-files "tests")
5023 (("/bin/ls") (which "ls"))
5024 (("/bin/echo") (which "echo"))
5025 (("/bin/which") (which "which"))
5026 ;; Many tests try to use the /bin directory which
5027 ;; is not present in the build environment.
5028 ;; Use one that's non-empty and unlikely to change.
5029 (("/bin'") "/dev'"))
5030 ;; XXX: Socket connection test gets "Connection reset by peer".
5031 ;; Why does it not work? Delete for now.
5032 (delete-file "tests/test_socket.py")
5034 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5036 `(("python-nose" ,python-nose)
5037 ("python-pytest" ,python-pytest)
5040 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5042 `(("python-ptyprocess" ,python-ptyprocess)))
5043 (home-page "http://pexpect.readthedocs.org/")
5044 (synopsis "Controlling interactive console applications")
5046 "Pexpect is a pure Python module for spawning child applications;
5047 controlling them; and responding to expected patterns in their output.
5048 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5049 child application and control it as if a human were typing commands.")
5050 (license license:isc)))
5052 (define-public python2-pexpect
5053 (package-with-python2 python-pexpect))
5055 (define-public python-setuptools-scm
5057 (name "python-setuptools-scm")
5061 (uri (pypi-uri "setuptools_scm" version))
5064 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5065 (build-system python-build-system)
5066 (home-page "https://github.com/pypa/setuptools_scm/")
5067 (synopsis "Manage Python package versions in SCM metadata")
5069 "Setuptools_scm handles managing your Python package versions in
5070 @dfn{software configuration management} (SCM) metadata instead of declaring
5071 them as the version argument or in a SCM managed file.")
5072 (license license:expat)))
5074 (define-public python2-setuptools-scm
5075 (package-with-python2 python-setuptools-scm))
5077 (define-public python-pathlib2
5079 (name "python-pathlib2")
5084 (uri (pypi-uri "pathlib2" version))
5087 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5088 (build-system python-build-system)
5090 `(("python-scandir" ,python-scandir)
5091 ("python-six" ,python-six)))
5092 (home-page "https://pypi.python.org/pypi/pathlib2/")
5093 (synopsis "Object-oriented file system paths")
5094 (description "The goal of pathlib2 is to provide a backport of the
5095 standard @code{pathlib} module which tracks the standard library module, so
5096 all the newest features of the standard @code{pathlib} can be used also on
5097 older Python versions.")
5098 (license license:expat)))
5100 (define-public python-importlib-metadata
5102 (name "python-importlib-metadata")
5107 (uri (pypi-uri "importlib_metadata" version))
5109 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5110 (build-system python-build-system)
5112 `(("python-configparser" ,python-configparser)
5113 ("python-contextlib2" ,python-contextlib2)
5114 ("python-docutils" ,python-docutils)
5115 ("python-pathlib2" ,python-pathlib2)
5116 ("python-rst.linker" ,python-rst.linker)
5117 ("python-zipp" ,python-zipp)))
5119 `(("python-setuptools-scm" ,python-setuptools-scm)
5120 ("python-sphinx" ,python-sphinx)))
5121 (home-page "https://importlib-metadata.readthedocs.io/")
5122 (synopsis "Read metadata from Python packages")
5124 "@code{importlib_metadata} is a library which provides an API for
5125 accessing an installed Python package's metadata, such as its entry points or
5126 its top-level name. This functionality intends to replace most uses of
5127 @code{pkg_resources} entry point API and metadata API. Along with
5128 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5129 need to use the older and less efficient @code{pkg_resources} package.")
5130 (license license:asl2.0)))
5132 (define-public python-jaraco-packaging
5134 (name "python-jaraco-packaging")
5139 (uri (pypi-uri "jaraco.packaging" version))
5142 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5143 (build-system python-build-system)
5145 `(("python-pytest" ,python-pytest)
5146 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5147 ("python-pytest-flake8" ,python-pytest-flake8)
5148 ("python-rst.linker" ,python-rst.linker)
5149 ("python-setuptools" ,python-setuptools)
5150 ("python-setuptools-scm" ,python-setuptools-scm)
5151 ("python-six" ,python-six)
5152 ("python-sphinx" ,python-sphinx)))
5153 (home-page "https://github.com/jaraco/jaraco.packaging")
5154 (synopsis "Tools to supplement packaging Python releases")
5156 "This package provides various tools to supplement packaging Python
5158 (license license:expat)))
5160 (define-public python-pathpy
5162 (name "python-pathpy")
5167 (uri (pypi-uri "path.py" version))
5169 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5170 (outputs '("out" "doc"))
5171 (build-system python-build-system)
5173 `(("python-appdirs" ,python-appdirs)
5174 ("python-importlib-metadata" ,python-importlib-metadata)))
5176 `(("python-setuptools-scm" ,python-setuptools-scm)
5177 ("python-sphinx" ,python-sphinx)
5178 ("python-rst.linker" ,python-rst.linker)
5179 ("python-pytest" ,python-pytest)
5180 ("python-pytest-runner" ,python-pytest-runner)
5181 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5184 (modify-phases %standard-phases
5185 (add-after 'build 'build-doc
5187 (setenv "LANG" "en_US.UTF-8")
5188 (invoke "python" "setup.py" "build_sphinx")))
5189 (add-after 'install 'install-doc
5190 (lambda* (#:key outputs #:allow-other-keys)
5191 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5192 (doc (string-append data "/doc/" ,name "-" ,version))
5193 (html (string-append doc "/html")))
5195 (for-each (lambda (file)
5196 (copy-file file (string-append doc "/" file)))
5197 '("README.rst" "CHANGES.rst"))
5198 (copy-recursively "build/sphinx/html" html)
5202 ;; The import time test aborts if an import takes longer than
5203 ;; 100ms. It may very well take a little longer than that.
5204 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5205 (home-page "https://github.com/jaraco/path.py")
5206 (synopsis "Python module wrapper for built-in os.path")
5208 "@code{path.py} implements path objects as first-class entities, allowing
5209 common operations on files to be invoked on those path objects directly.")
5210 (license license:expat)))
5212 (define-public python2-pathpy
5213 (package-with-python2 python-pathpy))
5215 (define-public python-simplegeneric
5217 (name "python-simplegeneric")
5222 (uri (pypi-uri "simplegeneric" version ".zip"))
5224 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5225 (build-system python-build-system)
5227 `(("unzip" ,unzip)))
5228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5229 (synopsis "Python module for simple generic functions")
5231 "The simplegeneric module lets you define simple single-dispatch generic
5232 functions, akin to Python’s built-in generic functions like @code{len()},
5233 @code{iter()} and so on. However, instead of using specially-named methods,
5234 these generic functions use simple lookup tables, akin to those used by
5235 e.g. @code{pickle.dump()} and other generic functions found in the Python
5237 (license license:zpl2.1)))
5239 (define-public python2-simplegeneric
5240 (package-with-python2 python-simplegeneric))
5242 (define-public python-ipython-genutils
5243 ;; TODO: This package is retired, check if can be removed, see description.
5245 (name "python-ipython-genutils")
5250 (uri (pypi-uri "ipython_genutils" version))
5252 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5253 (build-system python-build-system)
5254 (arguments `(#:tests? #f)) ; no tests
5255 (home-page "https://ipython.org")
5256 (synopsis "Vestigial utilities from IPython")
5258 "This package provides retired utilities from IPython. No packages
5259 outside IPython/Jupyter should depend on it.
5261 This package shouldn't exist. It contains some common utilities shared by
5262 Jupyter and IPython projects during The Big Split. As soon as possible, those
5263 packages will remove their dependency on this, and this package will go
5265 (license license:bsd-3)))
5267 (define-public python2-ipython-genutils
5268 (package-with-python2 python-ipython-genutils))
5270 (define-public python-traitlets
5272 (name "python-traitlets")
5277 (uri (pypi-uri "traitlets" version))
5280 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5281 (build-system python-build-system)
5284 (modify-phases %standard-phases
5285 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5287 `(("python-ipython-genutils" ,python-ipython-genutils)
5288 ("python-decorator" ,python-decorator)))
5290 `(("python-pytest" ,python-pytest)))
5291 (properties `((python2-variant . ,(delay python2-traitlets))))
5292 (home-page "https://ipython.org")
5293 (synopsis "Configuration system for Python applications")
5295 "Traitlets is a framework that lets Python classes have attributes with
5296 type checking, dynamically calculated default values, and ‘on change’
5297 callbacks. The package also includes a mechanism to use traitlets for
5298 configuration, loading values from files or from command line arguments. This
5299 is a distinct layer on top of traitlets, so you can use traitlets in your code
5300 without using the configuration machinery.")
5301 (license license:bsd-3)))
5303 (define-public python2-traitlets
5304 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5308 `(("python2-enum34" ,python2-enum34)
5309 ,@(package-propagated-inputs traitlets))))))
5311 (define-public python-jupyter-core
5313 (name "python-jupyter-core")
5318 (uri (string-append (pypi-uri "jupyter_core" version)))
5321 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5322 (build-system python-build-system)
5323 ;; FIXME: not sure how to run the tests
5324 (arguments `(#:tests? #f))
5326 `(("python-traitlets" ,python-traitlets)))
5327 (home-page "http://jupyter.org/")
5328 (synopsis "Jupyter base package")
5330 "Jupyter core is the base package on which Jupyter projects rely.")
5331 (license license:bsd-3)))
5333 (define-public python2-jupyter-core
5334 (package-with-python2 python-jupyter-core))
5336 (define-public python-jupyter-client
5338 (name "python-jupyter-client")
5343 (uri (pypi-uri "jupyter_client" version))
5346 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5347 (build-system python-build-system)
5348 ;; Tests fail because of missing native python kernel which I assume is
5349 ;; provided by the ipython package, which we cannot use because it would
5350 ;; cause a dependency cycle.
5354 #:phases (modify-phases %standard-phases
5355 (add-after 'unpack 'set-tool-file-names
5356 (lambda* (#:key inputs #:allow-other-keys)
5357 (let ((iproute (assoc-ref inputs "iproute")))
5358 (substitute* "jupyter_client/localinterfaces.py"
5360 (string-append "'" iproute "/sbin/ip'")))
5363 `(("iproute" ,iproute)))
5365 `(("python-pyzmq" ,python-pyzmq)
5366 ("python-traitlets" ,python-traitlets)
5367 ("python-jupyter-core" ,python-jupyter-core)))
5368 (home-page "http://jupyter.org/")
5369 (synopsis "Jupyter protocol implementation and client libraries")
5371 "The @code{jupyter_client} package contains the reference implementation
5372 of the Jupyter protocol. It also provides client and kernel management APIs
5373 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5374 installing @code{kernelspec}s for use with Jupyter frontends.")
5375 (license license:bsd-3)))
5377 (define-public python2-jupyter-client
5378 (package-with-python2 python-jupyter-client))
5380 (define-public python-ipykernel
5382 (name "python-ipykernel")
5387 (uri (pypi-uri "ipykernel" version))
5389 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5390 (build-system python-build-system)
5393 (modify-phases %standard-phases
5396 (setenv "HOME" "/tmp")
5397 (invoke "pytest" "-v")
5399 (add-after 'install 'set-python-file-name
5400 (lambda* (#:key outputs #:allow-other-keys)
5401 ;; Record the absolute file name of the 'python' executable in
5403 (let ((out (assoc-ref outputs "out")))
5404 (substitute* (string-append out "/share/jupyter"
5405 "/kernels/python3/kernel.json")
5407 (string-append "\"" (which "python") "\"")))
5410 `(("python-ipython" ,python-ipython)
5411 ;; imported at runtime during connect
5412 ("python-jupyter-client" ,python-jupyter-client)))
5414 `(("python-pytest" ,python-pytest)
5415 ("python-nose" ,python-nose)))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython Kernel for Jupyter")
5419 "This package provides the IPython kernel for Jupyter.")
5420 (license license:bsd-3)))
5422 ;; Version 5.1.1 and above no longer support Python 2.
5423 (define-public python2-ipykernel
5425 (name "python2-ipykernel")
5430 (uri (pypi-uri "ipykernel" version))
5432 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5433 (build-system python-build-system)
5435 `(#:python ,python-2
5437 (modify-phases %standard-phases
5440 (setenv "HOME" "/tmp")
5441 (invoke "pytest" "-v")
5444 `(("python2-ipython" ,python2-ipython)
5445 ;; imported at runtime during connect
5446 ("python2-jupyter-client" ,python2-jupyter-client)))
5448 `(("python2-pytest" ,python2-pytest)
5449 ("python2-nose" ,python2-nose)))
5450 (home-page "https://ipython.org")
5451 (synopsis "IPython Kernel for Jupyter")
5453 "This package provides the IPython kernel for Jupyter.")
5454 (license license:bsd-3)))
5456 (define-public python-pari-jupyter
5458 (name "python-pari-jupyter")
5463 (uri (pypi-uri "pari_jupyter" version))
5466 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5467 (build-system python-build-system)
5469 `(("python-ipykernel" ,python-ipykernel)))
5471 `(("pari-gp" ,pari-gp)
5472 ("readline" ,readline)))
5474 `(#:tests? #f)) ; no test suite
5476 "https://github.com/jdemeyer/pari_jupyter")
5477 (synopsis "A Jupyter kernel for PARI/GP")
5478 (description "The package provides a PARI/GP kernel for Jupyter.")
5479 (license license:gpl3+)))
5481 (define-public python-backcall
5483 (name "python-backcall")
5488 (uri (pypi-uri "backcall" version))
5491 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5492 (build-system python-build-system)
5493 (home-page "https://github.com/takluyver/backcall/")
5494 (synopsis "Specifications for callback functions passed in to an API")
5496 "If your code lets other people supply callback functions, it's important
5497 to specify the function signature you expect, and check that functions support
5498 that. Adding extra parameters later would break other peoples code unless
5499 you're careful. The @code{backcall} package provides a way of specifying the
5500 callback signature using a prototype function.")
5501 (license license:bsd-3)))
5503 ;; This is the latest release of the LTS version of ipython with support for
5504 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5505 ;; dropped support for Python 2.7.
5506 (define-public python2-ipython
5508 (name "python2-ipython")
5513 (uri (pypi-uri "ipython" version ".tar.gz"))
5515 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5516 (build-system python-build-system)
5518 `(("python2-backports-shutil-get-terminal-size"
5519 ,python2-backports-shutil-get-terminal-size)
5520 ("python2-pathlib2" ,python2-pathlib2)
5521 ("python2-pyzmq" ,python2-pyzmq)
5522 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5523 ("python2-terminado" ,python2-terminado)
5524 ("python2-matplotlib" ,python2-matplotlib)
5525 ("python2-numpy" ,python2-numpy)
5526 ("python2-numpydoc" ,python2-numpydoc)
5527 ("python2-jinja2" ,python2-jinja2)
5528 ("python2-mistune" ,python2-mistune)
5529 ("python2-pexpect" ,python2-pexpect)
5530 ("python2-pickleshare" ,python2-pickleshare)
5531 ("python2-simplegeneric" ,python2-simplegeneric)
5532 ("python2-jsonschema" ,python2-jsonschema)
5533 ("python2-traitlets" ,python2-traitlets)
5534 ("python2-nbformat" ,python2-nbformat)
5535 ("python2-pygments" ,python2-pygments)))
5537 `(("readline" ,readline)
5540 `(("graphviz" ,graphviz)
5541 ("pkg-config" ,pkg-config)
5542 ("python2-requests" ,python2-requests) ;; for tests
5543 ("python2-testpath" ,python2-testpath)
5544 ("python2-mock" ,python2-mock)
5545 ("python2-nose" ,python2-nose)))
5547 `(#:python ,python-2
5549 (modify-phases %standard-phases
5550 (add-before 'check 'delete-broken-tests
5551 (lambda* (#:key inputs #:allow-other-keys)
5552 ;; These tests throw errors for unknown reasons.
5553 (delete-file "IPython/core/tests/test_profile.py")
5554 (delete-file "IPython/core/tests/test_interactiveshell.py")
5555 (delete-file "IPython/core/tests/test_magic.py")
5557 (home-page "https://ipython.org")
5558 (synopsis "IPython is a tool for interactive computing in Python")
5560 "IPython provides a rich architecture for interactive computing with:
5561 Powerful interactive shells, a browser-based notebook, support for interactive
5562 data visualization, embeddable interpreters and tools for parallel
5564 (license license:bsd-3)))
5566 (define-public python-ipython
5568 (name "python-ipython")
5573 (uri (pypi-uri "ipython" version ".tar.gz"))
5575 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5576 (build-system python-build-system)
5578 `(("python-backcall" ,python-backcall)
5579 ("python-pyzmq" ,python-pyzmq)
5580 ("python-prompt-toolkit" ,python-prompt-toolkit)
5581 ("python-terminado" ,python-terminado)
5582 ("python-matplotlib" ,python-matplotlib)
5583 ("python-numpy" ,python-numpy)
5584 ("python-numpydoc" ,python-numpydoc)
5585 ("python-jedi" ,python-jedi)
5586 ("python-jinja2" ,python-jinja2)
5587 ("python-mistune" ,python-mistune)
5588 ("python-pexpect" ,python-pexpect)
5589 ("python-pickleshare" ,python-pickleshare)
5590 ("python-simplegeneric" ,python-simplegeneric)
5591 ("python-jsonschema" ,python-jsonschema)
5592 ("python-traitlets" ,python-traitlets)
5593 ("python-nbformat" ,python-nbformat)
5594 ("python-pygments" ,python-pygments)))
5596 `(("readline" ,readline)
5599 `(("graphviz" ,graphviz)
5600 ("pkg-config" ,pkg-config)
5601 ("python-requests" ,python-requests) ;; for tests
5602 ("python-testpath" ,python-testpath)
5603 ("python-nose" ,python-nose)))
5606 (modify-phases %standard-phases
5607 (add-after 'unpack 'make-docs-reproducible
5609 (substitute* "IPython/sphinxext/ipython_directive.py"
5610 ((".*import datetime") "")
5611 ((".*datetime.datetime.now\\(\\)") "")
5612 (("%timeit") "# %timeit"))
5614 ;; Tests can only be run after the library has been installed and not
5615 ;; within the source directory.
5617 (add-after 'install 'check
5618 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5621 ;; Make installed package available for running the tests
5622 (add-installed-pythonpath inputs outputs)
5623 (setenv "HOME" "/tmp/") ;; required by a test
5624 ;; We only test the core because one of the other tests
5625 ;; tries to import ipykernel.
5626 (invoke "python" "IPython/testing/iptest.py"
5627 "-v" "IPython/core/tests"))
5629 (add-before 'check 'fix-tests
5630 (lambda* (#:key inputs #:allow-other-keys)
5631 (substitute* "./IPython/utils/_process_posix.py"
5632 (("/usr/bin/env', 'which") (which "which")))
5633 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5634 (("#!/usr/bin/env python")
5635 (string-append "#!" (which "python"))))
5636 ;; This test introduces a circular dependency on ipykernel
5637 ;; (which depends on ipython).
5638 (delete-file "IPython/core/tests/test_display.py")
5639 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5640 (delete-file "IPython/core/tests/test_interactiveshell.py")
5642 (home-page "https://ipython.org")
5643 (synopsis "IPython is a tool for interactive computing in Python")
5645 "IPython provides a rich architecture for interactive computing with:
5646 Powerful interactive shells, a browser-based notebook, support for interactive
5647 data visualization, embeddable interpreters and tools for parallel
5649 (license license:bsd-3)))
5651 (define-public python-ipython-documentation
5653 (inherit python-ipython)
5654 (name "python-ipython-documentation")
5655 (version (package-version python-ipython))
5658 (modify-phases %standard-phases
5662 (lambda* (#:key outputs #:allow-other-keys)
5663 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5664 (doc (string-append data "/doc/" ,name "-" ,version))
5665 (html (string-append doc "/html"))
5666 (man1 (string-append data "/man/man1"))
5667 (info (string-append data "/info"))
5668 (examples (string-append doc "/examples"))
5669 (python-arg (string-append "PYTHON=" (which "python"))))
5670 (setenv "LANG" "en_US.utf8")
5671 (with-directory-excursion "docs"
5672 ;; FIXME: pdf fails to build
5673 ;;(system* "make" "pdf" "PAPER=a4")
5674 (system* "make" python-arg "html")
5675 ;; FIXME: the generated texi file contains ^@^@, which trips
5677 ;; (system* "make" python-arg "info")
5679 (copy-recursively "docs/man" man1)
5680 (copy-recursively "examples" examples)
5681 (copy-recursively "docs/build/html" html)
5682 ;; (copy-file "docs/build/latex/ipython.pdf"
5683 ;; (string-append doc "/ipython.pdf"))
5685 ;; (copy-file "docs/build/texinfo/ipython.info"
5686 ;; (string-append info "/ipython.info"))
5687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5690 `(("python-ipython" ,python-ipython)
5691 ("python-ipykernel" ,python-ipykernel)))
5693 `(("python-sphinx" ,python-sphinx)
5694 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5695 ;; FIXME: It's possible that a smaller union would work just as well.
5696 ("texlive" ,(texlive-union (list texlive-amsfonts
5698 texlive-generic-ifxetex
5699 texlive-generic-pdftex
5700 texlive-latex-capt-of
5702 texlive-latex-environ
5703 texlive-latex-eqparbox
5704 texlive-latex-etoolbox
5705 texlive-latex-expdlist
5706 texlive-latex-fancyhdr
5707 texlive-latex-fancyvrb
5708 texlive-latex-fncychap
5710 texlive-latex-framed
5711 texlive-latex-geometry
5712 texlive-latex-graphics
5713 texlive-latex-hyperref
5714 texlive-latex-mdwtools
5715 texlive-latex-multirow
5716 texlive-latex-needspace
5717 texlive-latex-oberdiek
5718 texlive-latex-parskip
5719 texlive-latex-preview
5720 texlive-latex-tabulary
5721 texlive-latex-threeparttable
5722 texlive-latex-titlesec
5723 texlive-latex-trimspaces
5725 texlive-latex-upquote
5727 texlive-latex-varwidth
5728 texlive-latex-wrapfig)))
5729 ("texinfo" ,texinfo)))))
5731 (define-public python-urwid
5733 (name "python-urwid")
5738 (uri (pypi-uri "urwid" version))
5741 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5742 (build-system python-build-system)
5743 (home-page "http://urwid.org")
5744 (synopsis "Console user interface library for Python")
5746 "Urwid is a curses-based UI/widget library for Python. It includes many
5747 features useful for text console applications.")
5748 (license license:lgpl2.1+)))
5750 (define-public python2-urwid
5751 (package-with-python2 python-urwid))
5753 (define-public python-urwidtrees
5755 (name "python-urwidtrees")
5760 ;; package author intends on distributing via github rather than pypi:
5761 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5762 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5764 (file-name (string-append name "-" version ".tar.gz"))
5767 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5768 (build-system python-build-system)
5770 '(#:tests? #f)) ; no tests
5771 (propagated-inputs `(("python-urwid" ,python-urwid)))
5772 (home-page "https://github.com/pazz/urwidtrees")
5773 (synopsis "Tree widgets for urwid")
5774 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5775 toolkit. Use it to build trees of widgets.")
5776 (license license:gpl3+)))
5778 (define-public python2-urwidtrees
5779 (package-with-python2 python-urwidtrees))
5781 (define-public python-ua-parser
5783 (name "python-ua-parser")
5788 (uri (pypi-uri "ua-parser" version))
5791 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5792 (build-system python-build-system)
5794 `(#:tests? #f)) ;no test suite in release
5796 `(("python-pyyaml" ,python-pyyaml)))
5797 (home-page "https://github.com/ua-parser/uap-python")
5798 (synopsis "User agent parser")
5800 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5801 (license license:asl2.0)))
5803 (define-public python2-ua-parser
5804 (package-with-python2 python-ua-parser))
5806 (define-public python-user-agents
5808 (name "python-user-agents")
5813 (uri (pypi-uri "user-agents" version))
5816 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5817 (build-system python-build-system)
5819 `(#:tests? #f)) ;missing devices.json test file in release
5821 `(("python-ua-parser" ,python-ua-parser)))
5822 (home-page "https://github.com/selwin/python-user-agents")
5823 (synopsis "User Agent strings parsing library")
5825 "A library to identify devices (phones, tablets) and their capabilities by
5826 parsing (browser/HTTP) user agent strings.")
5827 (license license:expat)))
5829 (define-public python2-user-agents
5830 (package-with-python2 python-user-agents))
5832 (define-public python-dbus
5834 (name "python-dbus")
5839 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5840 "dbus-python-" version ".tar.gz"))
5843 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5844 (build-system gnu-build-system)
5847 (modify-phases %standard-phases
5851 ;; XXX: For the missing '/etc/machine-id'.
5852 (substitute* "test/run-test.sh"
5853 (("DBUS_FATAL_WARNINGS=1")
5854 "DBUS_FATAL_WARNINGS=0"))
5857 `(("pkg-config" ,pkg-config)))
5859 `(("python" ,python-wrapper)
5860 ("dbus-glib" ,dbus-glib)))
5861 (synopsis "Python bindings for D-bus")
5862 (description "python-dbus provides bindings for libdbus, the reference
5863 implementation of D-Bus.")
5864 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5865 (license license:expat)))
5867 (define-public python2-dbus
5868 (package (inherit python-dbus)
5869 (name "python2-dbus")
5870 (inputs `(("python" ,python-2)
5871 ,@(alist-delete "python"
5872 (package-inputs python-dbus)
5874 ;; FIXME: on Python 2, the test_utf8 fails with:
5875 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5876 (arguments `(#:tests? #f))))
5878 (define-public python-notify2
5880 (name "python-notify2")
5885 (uri (pypi-uri "notify2" version))
5888 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5889 (build-system python-build-system)
5890 (arguments `(#:tests? #f)) ; tests depend on system state
5892 `(("python-dbus" ,python-dbus)))
5893 (home-page "https://bitbucket.org/takluyver/pynotify2")
5894 (synopsis "Python interface to D-Bus notifications")
5896 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5897 It is a reimplementation of pynotify in pure Python, and an alternative to
5898 the GObject Introspection bindings to libnotify for non-GTK applications.")
5899 (license (list license:bsd-2
5900 license:lgpl2.1+))))
5902 (define-public python2-notify2
5903 (package-with-python2 python-notify2))
5905 (define-public python-lxml
5907 (name "python-lxml")
5912 (uri (pypi-uri "lxml" version))
5915 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5916 (build-system python-build-system)
5918 `(("libxml2" ,libxml2)
5919 ("libxslt" ,libxslt)))
5920 (home-page "http://lxml.de/")
5922 "Python XML processing library")
5924 "The lxml XML toolkit is a Pythonic binding for the C libraries
5925 libxml2 and libxslt.")
5926 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5928 (define-public python2-lxml
5929 (package-with-python2 python-lxml))
5931 ;; beautifulsoup4 has a totally different namespace than 3.x,
5932 ;; and pypi seems to put it under its own name, so I guess we should too
5933 (define-public python-beautifulsoup4
5935 (name "python-beautifulsoup4")
5940 (uri (pypi-uri "beautifulsoup4" version))
5943 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5944 (build-system python-build-system)
5947 (modify-phases %standard-phases
5948 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5949 ;; must use this conversion script when building with Python 3. The
5950 ;; conversion script also runs the tests.
5951 ;; For more information, see the file 'convert-py3k' in the source
5954 (lambda _ (invoke "./convert-py3k"))))))
5956 `(("python-soupsieve" ,python-soupsieve)))
5958 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5960 "Python screen-scraping library")
5962 "Beautiful Soup is a Python library designed for rapidly setting up
5963 screen-scraping projects. It offers Pythonic idioms for navigating,
5964 searching, and modifying a parse tree, providing a toolkit for
5965 dissecting a document and extracting what you need. It automatically
5966 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5967 (license license:expat)
5968 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5970 (define-public python2-beautifulsoup4
5972 (inherit (package-with-python2
5973 (strip-python2-variant python-beautifulsoup4)))
5974 (arguments `(#:python ,python-2))))
5976 (define-public python-soupsieve
5978 (name "python-soupsieve")
5983 (uri (pypi-uri "soupsieve" version))
5986 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5987 (build-system python-build-system)
5988 (arguments `(#:tests? #f))
5989 ;;XXX: 2 tests fail currently despite claming they were to be
5990 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5991 ;;don't want to create a circular dependency.
5992 (home-page "https://github.com/facelessuser/soupsieve")
5993 (synopsis "CSS selector library")
5995 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5996 Soup 4. It aims to provide selecting, matching, and filtering using modern
5997 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5998 specifications up through the latest CSS level 4 drafts and beyond (though
5999 some are not yet implemented).")
6000 (properties `((python2-variant . ,(delay python2-soupsieve))))
6001 (license license:expat)))
6003 (define-public python2-soupsieve
6004 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6008 `(("python2-backports-functools-lru-cache"
6009 ,python2-backports-functools-lru-cache)
6010 ,@(package-propagated-inputs base))))))
6012 (define-public python-netifaces
6014 (name "python-netifaces")
6019 (uri (pypi-uri "netifaces" version))
6022 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6023 (build-system python-build-system)
6024 (home-page "https://github.com/al45tair/netifaces")
6026 "Python module for portable network interface information")
6028 "Netifaces is a Python module providing information on network
6029 interfaces in an easy and portable manner.")
6030 (license license:expat)))
6032 (define-public python2-netifaces
6033 (package-with-python2 python-netifaces))
6035 (define-public python-networkx
6037 (name "python-networkx")
6042 (uri (pypi-uri "networkx" version ".zip"))
6044 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6045 (build-system python-build-system)
6046 ;; python-decorator is needed at runtime.
6048 `(("python-decorator" ,python-decorator)))
6050 `(("python-nose" ,python-nose)
6052 (home-page "https://networkx.github.io/")
6053 (synopsis "Python module for creating and manipulating graphs and networks")
6055 "NetworkX is a Python package for the creation, manipulation, and study
6056 of the structure, dynamics, and functions of complex networks.")
6057 (license license:bsd-3)))
6059 (define-public python2-networkx
6060 (package-with-python2 python-networkx))
6062 (define-public python-datrie
6064 (name "python-datrie")
6069 (uri (pypi-uri "datrie" version))
6072 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6073 (build-system python-build-system)
6075 `(("python-cython" ,python-cython)
6076 ("python-hypothesis" ,python-hypothesis)
6077 ("python-pytest" ,python-pytest)
6078 ("python-pytest-runner" ,python-pytest-runner)))
6079 (home-page "https://github.com/kmike/datrie")
6080 (synopsis "Fast, efficiently stored trie for Python")
6082 "This package provides a fast, efficiently stored trie implementation for
6084 (license license:lgpl2.1+)))
6086 (define-public snakemake
6093 (uri (pypi-uri "snakemake" version))
6095 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6096 (build-system python-build-system)
6098 ;; TODO: Package missing test dependencies.
6101 (modify-phases %standard-phases
6102 ;; For cluster execution Snakemake will call Python. Since there is
6103 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6104 ;; this by calling the snakemake wrapper instead.
6105 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6106 (lambda* (#:key outputs #:allow-other-keys)
6107 (substitute* "snakemake/executors.py"
6108 (("\\{sys.executable\\} -m snakemake")
6109 (string-append (assoc-ref outputs "out")
6113 `(("python-gitpython" ,python-gitpython)
6114 ("python-wrapt" ,python-wrapt)
6115 ("python-requests" ,python-requests)
6116 ("python-appdirs" ,python-appdirs)
6117 ("python-configargparse" ,python-configargparse)
6118 ("python-datrie" ,python-datrie)
6119 ("python-docutils" ,python-docutils)
6120 ("python-jinja2" ,python-jinja2)
6121 ("python-jsonschema" ,python-jsonschema)
6122 ("python-networkx" ,python-networkx)
6123 ("python-pyyaml" ,python-pyyaml)
6124 ("python-ratelimiter" ,python-ratelimiter)))
6125 (home-page "https://snakemake.readthedocs.io")
6126 (synopsis "Python-based execution environment for make-like workflows")
6128 "Snakemake aims to reduce the complexity of creating workflows by
6129 providing a clean and modern domain specific specification language (DSL) in
6130 Python style, together with a fast and comfortable execution environment.")
6131 (license license:expat)))
6133 ;; This is currently needed for the pigx-* packages.
6134 (define-public snakemake-4
6135 (package (inherit snakemake)
6140 (uri (pypi-uri "snakemake" version))
6142 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6144 `(("python-wrapt" ,python-wrapt)
6145 ("python-requests" ,python-requests)
6146 ("python-appdirs" ,python-appdirs)
6147 ("python-configargparse" ,python-configargparse)
6148 ("python-pyyaml" ,python-pyyaml)
6149 ("python-ratelimiter" ,python-ratelimiter)))))
6151 (define-public python-pyqrcode
6153 (name "python-pyqrcode")
6158 (uri (pypi-uri "PyQRCode" version))
6161 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6162 (build-system python-build-system)
6164 "https://github.com/mnooner256/pyqrcode")
6165 (synopsis "QR code generator")
6167 "Pyqrcode is a QR code generator written purely in Python with
6168 SVG, EPS, PNG and terminal output.")
6169 (license license:bsd-3)))
6171 (define-public python-seaborn
6173 (name "python-seaborn")
6178 (uri (pypi-uri "seaborn" version))
6180 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6181 (build-system python-build-system)
6184 (modify-phases %standard-phases
6185 (add-before 'check 'start-xserver
6186 (lambda* (#:key inputs #:allow-other-keys)
6187 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6188 ;; There must be a running X server and make check doesn't
6189 ;; start one. Therefore we must do it.
6190 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6191 (setenv "DISPLAY" ":1")
6193 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6195 `(("python-pandas" ,python-pandas)
6196 ("python-matplotlib" ,python-matplotlib)
6197 ("python-numpy" ,python-numpy)
6198 ("python-scipy" ,python-scipy)))
6200 `(("python-pytest" ,python-pytest)
6201 ("xorg-server" ,xorg-server)))
6202 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6203 (synopsis "Statistical data visualization")
6205 "Seaborn is a library for making attractive and informative statistical
6206 graphics in Python. It is built on top of matplotlib and tightly integrated
6207 with the PyData stack, including support for numpy and pandas data structures
6208 and statistical routines from scipy and statsmodels.")
6209 (license license:bsd-3)))
6211 (define-public python2-seaborn
6212 (package-with-python2 python-seaborn))
6214 (define-public python-mpmath
6216 (name "python-mpmath")
6220 (uri (string-append "http://mpmath.org/files/mpmath-"
6224 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6225 (build-system python-build-system)
6228 (modify-phases %standard-phases
6231 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6232 (home-page "http://mpmath.org")
6233 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6235 "@code{mpmath} can be used as an arbitrary-precision substitute for
6236 Python's float/complex types and math/cmath modules, but also does much
6237 more advanced mathematics.")
6238 (license license:bsd-3)))
6240 (define-public python2-mpmath
6241 (package-with-python2 python-mpmath))
6243 (define-public python-bigfloat
6245 (name "python-bigfloat")
6250 (uri (pypi-uri "bigfloat" version))
6252 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6253 (build-system python-build-system)
6256 (home-page "https://github.com/mdickinson/bigfloat")
6257 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6259 "This package provides a Python interface to the MPFR library for
6260 multiprecision arithmetic.")
6261 (license license:lgpl3+)))
6263 (define-public python2-bigfloat
6264 (package-with-python2 python-bigfloat))
6266 (define-public python-sympy
6268 (name "python-sympy")
6274 "https://github.com/sympy/sympy/releases/download/sympy-"
6275 version "/sympy-" version ".tar.gz"))
6277 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6278 (build-system python-build-system)
6281 (modify-phases %standard-phases
6282 ;; Run the core tests after installation. By default it would run
6283 ;; *all* tests, which take a very long time to complete and are known
6286 (add-after 'install 'check
6287 (lambda* (#:key outputs #:allow-other-keys)
6288 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6291 `(("python-mpmath" ,python-mpmath)))
6292 (home-page "http://www.sympy.org/")
6293 (synopsis "Python library for symbolic mathematics")
6295 "SymPy is a Python library for symbolic mathematics. It aims to become a
6296 full-featured computer algebra system (CAS) while keeping the code as simple
6297 as possible in order to be comprehensible and easily extensible.")
6298 (license license:bsd-3)))
6300 (define-public python2-sympy
6302 (inherit (package-with-python2 python-sympy))
6305 (modify-phases %standard-phases
6306 ;; Run the core tests after installation. By default it would run
6307 ;; *all* tests, which take a very long time to complete and are known
6310 (add-after 'install 'check
6311 (lambda* (#:key outputs #:allow-other-keys)
6312 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6315 (define-public python-q
6322 (uri (pypi-uri "q" version))
6325 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6326 (build-system python-build-system)
6327 (home-page "https://github.com/zestyping/q")
6328 (synopsis "Quick-and-dirty debugging output for tired programmers")
6330 "q is a Python module for \"print\" style of debugging Python code. It
6331 provides convenient short API for print out of values, tracebacks, and
6332 falling into the Python interpreter.")
6333 (license license:asl2.0)))
6335 (define-public python2-q
6336 (package-with-python2 python-q))
6338 (define-public python2-xlib
6340 (name "python2-xlib")
6344 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6346 "python-xlib-" version ".tar.gz"))
6349 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6350 (build-system python-build-system)
6352 `(#:python ,python-2 ;Python 2 only
6353 #:tests? #f)) ;no tests
6354 (home-page "http://python-xlib.sourceforge.net/")
6355 (synopsis "Python X11 client library")
6357 "The Python X Library is intended to be a fully functional X client
6358 library for Python programs. It is useful to implement low-level X clients.
6359 It is written entirely in Python.")
6360 (license license:gpl2+)))
6362 (define-public python-singledispatch
6364 (name "python-singledispatch")
6369 (uri (pypi-uri "singledispatch" version))
6372 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6373 (build-system python-build-system)
6375 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6377 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6378 (synopsis "Backport of singledispatch feature from Python 3.4")
6380 "This library brings functools.singledispatch from Python 3.4 to Python
6382 (license license:expat)))
6384 (define-public python2-singledispatch
6385 (package-with-python2 python-singledispatch))
6387 ;; the python- version can be removed with python-3.5
6388 (define-public python-backports-abc
6390 (name "python-backports-abc")
6395 (uri (pypi-uri "backports_abc" version))
6398 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6399 (build-system python-build-system)
6400 (home-page "https://github.com/cython/backports_abc")
6401 (synopsis "Backport of additions to the 'collections.abc' module")
6403 "Python-backports-abc provides a backport of additions to the
6404 @code{collections.abc} module in Python-3.5.")
6405 (license license:psfl)))
6407 (define-public python2-backports-abc
6408 (package-with-python2 python-backports-abc))
6410 (define-public python-backports-csv
6412 (name "python-backports-csv")
6417 (uri (pypi-uri "backports.csv" version))
6420 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6421 (build-system python-build-system)
6422 (home-page "https://github.com/ryanhiebert/backports.csv")
6423 (synopsis "Backport of Python 3's csv module for Python 2")
6425 "Provides a backport of Python 3's @code{csv} module for parsing
6426 comma separated values. The API of the @code{csv} module in Python 2
6427 is drastically different from the @code{csv} module in Python 3.
6428 This is due, for the most part, to the difference between str in
6429 Python 2 and Python 3.")
6430 (license license:psfl)))
6432 (define-public python2-backports-csv
6433 (package-with-python2 python-backports-csv))
6435 (define-public python2-backports-shutil-get-terminal-size
6437 (name "python2-backports-shutil-get-terminal-size")
6442 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6445 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6446 (build-system python-build-system)
6448 `(#:python ,python-2
6450 (modify-phases %standard-phases
6453 (invoke "py.test" "-v"))))))
6455 `(("python2-pytest" ,python2-pytest)))
6456 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6457 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6459 "This package provides a backport of the @code{get_terminal_size
6460 function} from Python 3.3's @code{shutil}.
6461 Unlike the original version it is written in pure Python rather than C,
6462 so it might be a tiny bit slower.")
6463 (license license:expat)))
6465 (define-public python-waf
6471 (uri (string-append "https://waf.io/"
6472 "waf-" version ".tar.bz2"))
6475 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6476 (build-system python-build-system)
6479 (modify-phases %standard-phases
6482 (invoke "python" "waf-light" "configure" "build")))
6485 (invoke "python" "waf" "--version")))
6487 (lambda* (#:key outputs #:allow-other-keys)
6488 (let ((out (assoc-ref outputs "out")))
6489 (install-file "waf" (string-append out "/bin")))
6491 ;; waf breaks when it is wrapped.
6493 (home-page "https://waf.io/")
6494 (synopsis "Python-based build system")
6496 "Waf is a Python-based framework for configuring, compiling and installing
6498 (license license:bsd-3)))
6500 (define-public python2-waf
6501 (package-with-python2 python-waf))
6503 (define-public python-pyzmq
6505 (name "python-pyzmq")
6510 (uri (pypi-uri "pyzmq" version))
6512 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6513 (build-system python-build-system)
6516 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6517 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6518 ;; --inplace' for 'python setup.py test' to work.
6521 `(("zeromq" ,zeromq)))
6523 `(("pkg-config" ,pkg-config)
6524 ("python-nose" ,python-nose)))
6525 (home-page "https://github.com/zeromq/pyzmq")
6526 (synopsis "Python bindings for 0MQ")
6528 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6529 (license license:bsd-4)))
6531 (define-public python2-pyzmq
6532 (package-with-python2 python-pyzmq))
6534 (define-public python-pep8
6535 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6536 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6537 ;; some dependents' test suites, and nothing more.
6539 (name "python-pep8")
6544 (uri (pypi-uri "pep8" version))
6547 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6548 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6549 (build-system python-build-system)
6550 (home-page "https://pep8.readthedocs.org/")
6551 (synopsis "Python style guide checker")
6553 "This tools checks Python code against some of the style conventions in
6555 (license license:expat)))
6557 (define-public python2-pep8
6558 (package-with-python2 python-pep8))
6560 (define-public python-pyflakes
6562 (name "python-pyflakes")
6567 (uri (pypi-uri "pyflakes" version))
6570 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6571 (build-system python-build-system)
6573 "https://github.com/pyflakes/pyflakes")
6574 (synopsis "Passive checker of Python programs")
6576 "Pyflakes statically checks Python source code for common errors.")
6577 (license license:expat)))
6579 (define-public python2-pyflakes
6580 (package-with-python2 python-pyflakes))
6582 (define-public python-mccabe
6584 (name "python-mccabe")
6589 (uri (pypi-uri "mccabe" version))
6592 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6593 (build-system python-build-system)
6595 `(("python-pytest" ,python-pytest-bootstrap)
6596 ("python-pytest-runner" ,python-pytest-runner)))
6597 (home-page "https://github.com/flintwork/mccabe")
6598 (synopsis "McCabe checker, plugin for flake8")
6600 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6601 complexity of Python source code.")
6602 (license license:expat)))
6604 (define-public python2-mccabe
6605 (package-with-python2 python-mccabe))
6607 (define-public python-mccabe-0.2.1
6608 (package (inherit python-mccabe)
6613 (uri (pypi-uri "mccabe" version))
6616 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6618 (define-public python2-mccabe-0.2.1
6619 (package-with-python2 python-mccabe-0.2.1))
6621 ;; Flake8 2.4.1 requires an older version of pep8.
6622 ;; This should be removed ASAP.
6623 (define-public python-pep8-1.5.7
6624 (package (inherit python-pep8)
6629 (uri (pypi-uri "pep8" version))
6632 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6634 ;; XXX Tests not compatible with Python 3.5.
6637 (define-public python2-pep8-1.5.7
6638 (package-with-python2 python-pep8-1.5.7))
6640 ;; Flake8 2.4.1 requires an older version of pyflakes.
6641 ;; This should be removed ASAP.
6642 (define-public python-pyflakes-0.8.1
6643 (package (inherit python-pyflakes)
6648 (uri (pypi-uri "pyflakes" version))
6651 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6653 ;; XXX Tests not compatible with Python 3.5.
6656 (define-public python2-pyflakes-0.8.1
6657 (package-with-python2 python-pyflakes-0.8.1))
6659 (define-public python-flake8
6661 (name "python-flake8")
6665 (uri (pypi-uri "flake8" version))
6668 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6669 (build-system python-build-system)
6672 (modify-phases %standard-phases
6674 (add-after 'install 'check
6675 (lambda* (#:key inputs outputs #:allow-other-keys)
6676 (add-installed-pythonpath inputs outputs)
6677 (invoke "pytest" "-v")
6680 `(("python-pycodestyle" ,python-pycodestyle)
6681 ("python-entrypoints" ,python-entrypoints)
6682 ("python-pyflakes" ,python-pyflakes)
6683 ("python-mccabe" ,python-mccabe)))
6685 `(("python-mock" ,python-mock)
6686 ("python-pytest" ,python-pytest-bootstrap)
6687 ("python-pytest-runner" ,python-pytest-runner)))
6688 (home-page "https://gitlab.com/pycqa/flake8")
6690 "The modular source code checker: pep8, pyflakes and co")
6692 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6693 (properties `((python2-variant . ,(delay python2-flake8))))
6694 (license license:expat)))
6696 (define-public python2-flake8
6697 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6698 (package (inherit base)
6700 `(("python2-configparser" ,python2-configparser)
6701 ("python2-enum34" ,python2-enum34)
6702 ("python2-typing" ,python2-typing)
6703 ,@(package-propagated-inputs base))))))
6705 ;; python-hacking requires flake8 <2.6.0.
6706 (define-public python-flake8-2.5
6708 (inherit python-flake8)
6712 (uri (pypi-uri "flake8" version))
6715 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6717 `(("python-pep8" ,python-pep8)
6718 ,@(package-propagated-inputs python-flake8)))
6719 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6721 (define-public python2-flake8-2.5
6723 (inherit python2-flake8)
6724 (version (package-version python-flake8-2.5))
6726 (inherit (package-source python-flake8-2.5))))
6728 `(("python2-pep8" ,python2-pep8)
6729 ,@(package-propagated-inputs python2-flake8)))))
6731 (define-public python-flake8-polyfill
6733 (name "python-flake8-polyfill")
6738 (uri (pypi-uri "flake8-polyfill" version))
6741 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6742 (build-system python-build-system)
6745 (modify-phases %standard-phases
6748 ;; Be compatible with Pytest 4:
6749 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6750 (substitute* "setup.cfg"
6754 (setenv "PYTHONPATH"
6755 (string-append (getcwd) "/build/lib:"
6756 (getenv "PYTHONPATH")))
6757 (invoke "py.test" "-v"))))))
6759 `(("python-flake8" ,python-flake8)
6760 ("python-mock" ,python-mock)
6761 ("python-pep8" ,python-pep8)
6762 ("python-pycodestyle" ,python-pycodestyle)
6763 ("python-pytest" ,python-pytest)))
6764 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6765 (synopsis "Polyfill package for Flake8 plugins")
6767 "This package that provides some compatibility helpers for Flake8
6768 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6769 (license license:expat)))
6771 (define-public python2-flake8-polyfill
6772 (package-with-python2 python-flake8-polyfill))
6774 (define-public python-mistune
6776 (name "python-mistune")
6781 (uri (pypi-uri "mistune" version))
6784 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6785 (build-system python-build-system)
6787 `(("python-nose" ,python-nose)
6788 ("python-cython" ,python-cython)))
6789 (home-page "https://github.com/lepture/mistune")
6790 (synopsis "Markdown parser in pure Python")
6791 (description "This package provides a fast markdown parser in pure
6793 (license license:bsd-3)))
6795 (define-public python2-mistune
6796 (package-with-python2 python-mistune))
6798 (define-public python-markdown
6800 (name "python-markdown")
6805 (uri (pypi-uri "Markdown" version))
6808 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6809 (build-system python-build-system)
6811 `(("python-nose" ,python-nose)
6812 ("python-pyyaml" ,python-pyyaml)))
6813 (home-page "https://python-markdown.github.io/")
6814 (synopsis "Python implementation of Markdown")
6816 "This package provides a Python implementation of John Gruber's
6817 Markdown. The library features international input, various Markdown
6818 extensions, and several HTML output formats. A command line wrapper
6819 markdown_py is also provided to convert Markdown files to HTML.")
6820 (license license:bsd-3)))
6822 (define-public python2-markdown
6823 (package-with-python2 python-markdown))
6825 (define-public python-ptyprocess
6827 (name "python-ptyprocess")
6832 (uri (pypi-uri "ptyprocess" version))
6835 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6836 (build-system python-build-system)
6838 `(("python-nose" ,python-nose)))
6841 (modify-phases %standard-phases
6843 (lambda _ (invoke "nosetests"))))))
6844 (home-page "https://github.com/pexpect/ptyprocess")
6845 (synopsis "Run a subprocess in a pseudo terminal")
6847 "This package provides a Python library used to launch a subprocess in a
6848 pseudo terminal (pty), and interact with both the process and its pty.")
6849 (license license:isc)))
6851 (define-public python2-ptyprocess
6852 (package-with-python2 python-ptyprocess))
6854 (define-public python-cram
6856 (name "python-cram")
6858 (home-page "https://bitheap.org/cram/")
6861 (uri (list (string-append home-page "cram-"
6863 (pypi-uri "cram" version)))
6866 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6869 (modify-phases %standard-phases
6870 (add-after 'unpack 'patch-source
6872 (substitute* (find-files "cram" ".*\\.py$")
6873 ;; Replace default shell path.
6874 (("/bin/sh") (which "sh")))
6875 (substitute* (find-files "tests" ".*\\.t$")
6877 (("/bin/bash") (which "bash"))
6878 (("/bin/sh") (which "sh")))
6879 (substitute* "cram/_test.py"
6880 ;; This hack works around a bug triggered by substituting
6881 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6882 ;; "cram -h", which breaks the output at 80 characters. This
6883 ;; causes the line showing the default shell to break into two
6884 ;; lines, but the test expects a single line...
6885 (("env\\['COLUMNS'\\] = '80'")
6886 "env['COLUMNS'] = '160'"))
6888 (substitute* "Makefile"
6889 ;; Recent versions of python-coverage have caused the test
6890 ;; coverage to decrease (as of version 0.7). Allow that.
6891 (("--fail-under=100")
6896 ;; The test phase uses the built library and executable.
6897 (lambda* (#:key inputs outputs #:allow-other-keys)
6898 (add-installed-pythonpath inputs outputs)
6899 (setenv "PATH" (string-append (getenv "PATH") ":"
6900 (assoc-ref outputs "out") "/bin"))
6901 (invoke "make" "test"))))))
6902 (build-system python-build-system)
6904 `(("python-coverage" ,python-coverage)
6906 (synopsis "Simple testing framework for command line applications")
6908 "Cram is a functional testing framework for command line applications.
6909 Cram tests look like snippets of interactive shell sessions. Cram runs each
6910 command and compares the command output in the test with the command’s actual
6912 (license license:gpl2+)))
6914 (define-public python2-cram
6915 (package-with-python2 python-cram))
6917 (define-public python-straight-plugin
6919 (name "python-straight-plugin")
6924 (uri (pypi-uri "straight.plugin" version))
6927 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6928 (build-system python-build-system)
6929 (home-page "https://github.com/ironfroggy/straight.plugin")
6930 (synopsis "Simple namespaced plugin facility")
6931 (description "Straight Plugin provides a type of plugin you can create from
6932 almost any existing Python modules, and an easy way for outside developers to
6933 add functionality and customization to your projects with their own plugins.")
6934 (license license:expat)))
6936 (define-public python2-straight-plugin
6937 (package-with-python2 python-straight-plugin))
6939 (define-public python-fonttools
6941 (name "python-fonttools")
6945 (uri (pypi-uri "fonttools" version ".zip"))
6948 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6949 (build-system python-build-system)
6952 ("python-pytest" ,python-pytest)
6953 ("python-pytest-runner" ,python-pytest-runner)))
6954 (home-page "https://github.com/behdad/fonttools")
6955 (synopsis "Tools to manipulate font files")
6957 "FontTools/TTX is a library to manipulate font files from Python. It
6958 supports reading and writing of TrueType/OpenType fonts, reading and writing
6959 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6960 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6961 from an XML-based format.")
6962 (license license:expat)))
6964 (define-public python2-fonttools
6965 (package-with-python2 python-fonttools))
6967 (define-public python-ly
6974 (uri (pypi-uri name version))
6977 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6978 (build-system python-build-system)
6980 ;; FIXME: Some tests need network access.
6982 (synopsis "Tool and library for manipulating LilyPond files")
6983 (description "This package provides a Python library to parse, manipulate
6984 or create documents in LilyPond format. A command line program ly is also
6985 provided that can be used to do various manipulations with LilyPond files.")
6986 (home-page "https://pypi.python.org/pypi/python-ly")
6987 (license license:gpl2+)))
6989 (define-public python-appdirs
6991 (name "python-appdirs")
6996 (uri (pypi-uri "appdirs" version))
6999 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7000 (build-system python-build-system)
7001 (home-page "https://github.com/ActiveState/appdirs")
7003 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7005 "This module provides a portable way of finding out where user data
7006 should be stored on various operating systems.")
7007 (license license:expat)))
7009 (define-public python2-appdirs
7010 (package-with-python2 python-appdirs))
7012 (define-public python-llfuse
7014 (name "python-llfuse")
7018 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7021 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7022 (build-system python-build-system)
7027 `(("pkg-config" ,pkg-config)))
7028 (synopsis "Python bindings for FUSE")
7030 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7031 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7032 (license license:lgpl2.0+)
7033 (properties `((python2-variant . ,(delay python2-llfuse))))))
7035 (define-public python2-llfuse
7036 (package (inherit (package-with-python2
7037 (strip-python2-variant python-llfuse)))
7038 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7041 (define-public python-llfuse-0.41
7042 (package (inherit python-llfuse)
7047 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7048 "llfuse-" version ".tar.bz2"))
7051 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7052 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7053 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7054 (license (list license:expat license:lgpl2.0+))))
7056 (define-public python-msgpack
7058 (name "python-msgpack")
7062 (uri (pypi-uri "msgpack" version))
7065 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7066 (build-system python-build-system)
7068 `(#:modules ((guix build utils)
7069 (guix build python-build-system)
7074 (modify-phases %standard-phases
7077 (let ((cwd (getcwd)))
7078 (setenv "PYTHONPATH"
7079 (string-append cwd "/build/"
7080 (find (cut string-prefix? "lib" <>)
7081 (scandir (string-append cwd "/build")))
7083 (getenv "PYTHONPATH")))
7084 (invoke "pytest" "-v" "test")))))))
7086 `(("python-pytest" ,python-pytest)))
7087 (synopsis "MessagePack (de)serializer")
7088 (description "MessagePack is a fast, compact binary serialization format,
7089 suitable for similar data to JSON. This package provides CPython bindings for
7090 reading and writing MessagePack data.")
7091 (home-page "https://pypi.python.org/pypi/msgpack/")
7092 (license license:asl2.0)))
7094 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7095 ;; release 0.5. Some packages like borg still call it by the old name for now.
7096 ;; <https://bugs.gnu.org/30662>
7097 (define-public python-msgpack-transitional
7099 (inherit python-msgpack)
7100 (name "python-msgpack-transitional")
7102 (substitute-keyword-arguments (package-arguments python-msgpack)
7104 `(modify-phases ,phases
7105 (add-after 'unpack 'configure-transitional
7107 ;; Keep using the old name.
7108 (substitute* "setup.py"
7109 (("TRANSITIONAL = False")
7110 "TRANSITIONAL = 1"))
7113 (define-public python2-msgpack
7114 (package-with-python2 python-msgpack))
7116 (define-public python-netaddr
7118 (name "python-netaddr")
7123 (uri (pypi-uri "netaddr" version))
7126 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7127 (build-system python-build-system)
7128 (arguments `(#:tests? #f)) ;; No tests.
7129 (home-page "https://github.com/drkjam/netaddr/")
7130 (synopsis "Pythonic manipulation of network addresses")
7132 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7133 and MAC network addresses.")
7134 (license license:bsd-3)))
7136 (define-public python2-netaddr
7137 (package-with-python2 python-netaddr))
7139 (define-public python2-pyroute2
7141 (name "python2-pyroute2")
7146 (uri (pypi-uri "pyroute2" version))
7149 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7150 (build-system python-build-system)
7152 `(#:python ,python-2)) ;Python 3.x is not supported
7153 (home-page "https://github.com/svinota/pyroute2")
7154 (synopsis "Python netlink library")
7156 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7157 Supported netlink families and protocols include:
7159 @item rtnl, network settings - addresses, routes, traffic controls
7160 @item nfnetlink - netfilter API: ipset, nftables, ...
7161 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7162 @item devlink - manage and monitor devlink-enabled hardware
7163 @item generic - generic netlink families
7165 @item nl80211 - wireless functions API (basic support)
7166 @item taskstats - extended process statistics
7167 @item acpi_events - ACPI events monitoring
7168 @item thermal_events - thermal events monitoring
7169 @item VFS_DQUOT - disk quota events monitoring
7172 (license license:gpl2+)))
7174 (define-public python-wrapt
7176 (name "python-wrapt")
7181 (uri (pypi-uri "wrapt" version))
7184 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7185 (build-system python-build-system)
7187 ;; Tests are not included in the tarball, they are only available in the
7190 (home-page "https://github.com/GrahamDumpleton/wrapt")
7191 (synopsis "Module for decorators, wrappers and monkey patching")
7193 "The aim of the wrapt module is to provide a transparent object proxy for
7194 Python, which can be used as the basis for the construction of function
7195 wrappers and decorator functions.")
7196 (license license:bsd-2)))
7198 (define-public python2-wrapt
7199 (package-with-python2 python-wrapt))
7201 (define-public python-xlrd
7203 (name "python-xlrd")
7207 (uri (pypi-uri "xlrd" version))
7210 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7211 (build-system python-build-system)
7214 (modify-phases %standard-phases
7215 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7216 ;; run tests instead for now.
7217 (replace 'check (lambda _ (invoke "nosetests"))))))
7218 (native-inputs `(("python-nose" ,python-nose)))
7219 (home-page "http://www.python-excel.org/")
7220 (synopsis "Library for extracting data from Excel files")
7221 (description "This package provides a library to extract data from
7222 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7223 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7224 Unicode-aware. It is not intended as an end-user tool.")
7225 (license license:bsd-3)))
7227 (define-public python2-xlrd
7228 (package-with-python2 python-xlrd))
7230 (define-public python-prettytable
7232 (name "python-prettytable")
7237 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7240 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7241 (build-system python-build-system)
7242 (home-page "http://code.google.com/p/prettytable/")
7243 (synopsis "Display tabular data in an ASCII table format")
7245 "A library designed to represent tabular data in visually appealing ASCII
7246 tables. PrettyTable allows for selection of which columns are to be printed,
7247 independent alignment of columns (left or right justified or centred) and
7248 printing of sub-tables by specifying a row range.")
7249 (license license:bsd-3)))
7251 (define-public python2-prettytable
7252 (package-with-python2 python-prettytable))
7254 (define-public python-tables
7256 (name "python-tables")
7261 (uri (pypi-uri "tables" version))
7264 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7265 (modules '((guix build utils)))
7268 ;; Remove pre-compiled .pyc files from source.
7269 (for-each delete-file-recursively
7270 (find-files "." "__pycache__" #:directories? #t))
7271 (for-each delete-file (find-files "." "\\.pyc$"))
7273 (build-system python-build-system)
7275 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7276 ;; or "check", so we must override the build and check phases.
7278 (modify-phases %standard-phases
7279 (add-after 'unpack 'use-gcc
7281 (substitute* "setup.py"
7282 (("compiler = new_compiler\\(\\)" line)
7284 "\ncompiler.set_executables(compiler='gcc',"
7285 "compiler_so='gcc',"
7287 "linker_so='gcc -shared')")))
7290 (lambda* (#:key inputs #:allow-other-keys)
7291 (invoke "python" "setup.py" "build"
7292 (string-append "--hdf5="
7293 (assoc-ref inputs "hdf5")))))
7295 (lambda* (#:key inputs #:allow-other-keys)
7296 (invoke "python" "setup.py" "check"
7297 (string-append "--hdf5="
7298 (assoc-ref inputs "hdf5"))))))))
7300 `(("python-numexpr" ,python-numexpr)
7301 ("python-numpy" ,python-numpy)))
7303 `(("python-cython" ,python-cython)
7304 ("pkg-config" ,pkg-config)))
7309 (home-page "http://www.pytables.org/")
7310 (synopsis "Hierarchical datasets for Python")
7311 (description "PyTables is a package for managing hierarchical datasets and
7312 designed to efficiently cope with extremely large amounts of data.")
7313 (license license:bsd-3)))
7315 (define-public python2-tables
7316 (package-with-python2 python-tables))
7318 (define-public python-pyasn1
7320 (name "python-pyasn1")
7325 (uri (pypi-uri "pyasn1" version))
7328 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7329 (build-system python-build-system)
7330 (home-page "http://pyasn1.sourceforge.net/")
7331 (synopsis "ASN.1 types and codecs")
7333 "This is an implementation of ASN.1 types and codecs in Python. It is
7334 suitable for a wide range of protocols based on the ASN.1 specification.")
7335 (license license:bsd-2)))
7337 (define-public python2-pyasn1
7338 (package-with-python2 python-pyasn1))
7340 (define-public python-pyasn1-modules
7342 (name "python-pyasn1-modules")
7347 (uri (pypi-uri "pyasn1-modules" version))
7350 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7351 (build-system python-build-system)
7353 `(("python-pyasn1" ,python-pyasn1)))
7354 (home-page "https://sourceforge.net/projects/pyasn1/")
7355 (synopsis "ASN.1 codec implementations")
7357 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7358 implementations of ASN.1-based codecs and protocols.")
7359 (license license:bsd-3)))
7361 (define-public python2-pyasn1-modules
7362 (package-with-python2 python-pyasn1-modules))
7364 (define-public python-ipaddress
7366 (name "python-ipaddress")
7370 (uri (pypi-uri "ipaddress" version))
7373 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7374 (build-system python-build-system)
7375 (home-page "https://github.com/phihag/ipaddress")
7376 (synopsis "IP address manipulation library")
7378 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7379 in Python. This library is used to create, poke at, and manipulate IPv4 and
7380 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7381 module to older versions of Python.")
7382 (license license:psfl)))
7384 (define-public python2-ipaddress
7385 (package-with-python2 python-ipaddress))
7387 (define-public python2-ipaddr
7389 (name "python2-ipaddr")
7394 (uri (pypi-uri "ipaddr" version))
7396 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7397 (build-system python-build-system)
7399 `(#:python ,python-2 ;version 2 only
7401 (modify-phases %standard-phases
7403 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7404 (home-page "https://github.com/google/ipaddr-py")
7405 (synopsis "IP address manipulation library")
7407 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7408 IPv6 addresses and networks.
7410 For new implementations you may prefer to use the standard module
7411 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7412 versions of Python.")
7413 (license license:asl2.0)))
7415 (define-public python-idna
7417 (name "python-idna")
7422 (uri (pypi-uri "idna" version))
7425 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7426 (build-system python-build-system)
7427 (home-page "https://github.com/kjd/idna")
7428 (synopsis "Internationalized domain names in applications")
7430 "This is a library to support the Internationalised Domain Names in
7431 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7432 protocol is often referred to as “IDNA2008” and can produce different results
7433 from the earlier standard from 2003. The library is also intended to act as a
7434 suitable drop-in replacement for the “encodings.idna” module that comes with
7435 the Python standard library but currently only supports the older 2003
7437 (license license:bsd-4)))
7439 (define-public python-idna-2.7
7440 (package (inherit python-idna)
7444 (uri (pypi-uri "idna" version))
7447 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7450 (define-public python2-idna
7451 (package-with-python2 python-idna))
7453 (define-public python-idna-ssl
7455 (name "python-idna-ssl")
7460 (uri (pypi-uri "idna-ssl" version))
7463 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7464 (build-system python-build-system)
7466 `(#:tests? #f)) ;circular dependency with python-aiohttp
7467 (home-page "https://github.com/aio-libs/idna-ssl")
7468 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7469 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7471 (license license:expat)))
7473 (define-public python-pretend
7475 (name "python-pretend")
7480 (uri (pypi-uri "pretend" version))
7483 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7484 (build-system python-build-system)
7485 (home-page "https://github.com/alex/pretend")
7486 (synopsis "Library for stubbing in Python")
7488 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7489 technique for writing tests. You may hear the term mixed up with mocks,
7490 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7491 responses, rather than doing any computation.")
7492 (license license:bsd-3)))
7494 (define-public python2-pretend
7495 (package-with-python2 python-pretend))
7497 (define-public python-pip
7504 (uri (pypi-uri "pip" version))
7507 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7508 (build-system python-build-system)
7510 '(#:tests? #f)) ; there are no tests in the pypi archive.
7511 (home-page "https://pip.pypa.io/")
7512 (synopsis "Package manager for Python software")
7514 "Pip is a package manager for Python software, that finds packages on the
7515 Python Package Index (PyPI).")
7516 (license license:expat)))
7518 (define-public python2-pip
7519 (package-with-python2 python-pip))
7521 (define-public python-tlsh
7523 (name "python-tlsh")
7525 (home-page "https://github.com/trendmicro/tlsh")
7530 (url "https://github.com/trendmicro/tlsh.git")
7531 (commit (string-append "v" version))))
7532 (file-name (git-file-name name version))
7534 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7535 (build-system cmake-build-system)
7537 '(#:out-of-source? #f
7538 #:phases (modify-phases %standard-phases
7541 (lambda* (#:key outputs #:allow-other-keys)
7542 ;; Build and install the Python bindings. The underlying
7543 ;; C++ library is apparently not meant to be installed.
7544 (let ((out (assoc-ref outputs "out")))
7545 (with-directory-excursion "py_ext"
7546 (and (system* "python" "setup.py" "build")
7547 (system* "python" "setup.py" "install"
7548 (string-append "--prefix=" out))))))))))
7549 (inputs `(("python" ,python-wrapper))) ;for the bindings
7550 (synopsis "Fuzzy matching library for Python")
7552 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7553 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7554 value which can be used for similarity comparisons. Similar objects have
7555 similar hash values, which allows for the detection of similar objects by
7556 comparing their hash values. The byte stream should have a sufficient amount
7557 of complexity; for example, a byte stream of identical bytes will not generate
7559 (license license:asl2.0)))
7561 (define-public python2-tlsh
7563 (inherit python-tlsh)
7564 (name "python2-tlsh")
7565 (inputs `(("python" ,python-2)))))
7567 (define-public python-termcolor
7569 (name "python-termcolor")
7574 (uri (pypi-uri "termcolor" version))
7577 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7578 (build-system python-build-system)
7580 ;; There are no tests.
7582 (home-page "https://pypi.python.org/pypi/termcolor")
7583 (synopsis "ANSII Color formatting for terminal output")
7585 "This package provides ANSII Color formatting for output in terminals.")
7586 (license license:expat)))
7588 (define-public python2-termcolor
7589 (package-with-python2 python-termcolor))
7591 (define-public python-libarchive-c
7593 (name "python-libarchive-c")
7597 (uri (pypi-uri "libarchive-c" version))
7600 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7601 (build-system python-build-system)
7603 '(#:phases (modify-phases %standard-phases
7605 'build 'reference-libarchive
7606 (lambda* (#:key inputs #:allow-other-keys)
7607 ;; Retain the absolute file name of libarchive.so.
7608 (let ((libarchive (assoc-ref inputs "libarchive")))
7609 (substitute* "libarchive/ffi.py"
7610 (("find_library\\('archive'\\)")
7611 (string-append "'" libarchive
7612 "/lib/libarchive.so'"))))))
7614 (lambda _ (invoke "pytest" "-vv"))))))
7616 `(("python-mock" ,python-mock)
7617 ("python-pytest" ,python-pytest)))
7619 `(("libarchive" ,libarchive)))
7620 (home-page "https://github.com/Changaco/python-libarchive-c")
7621 (synopsis "Python interface to libarchive")
7623 "This package provides Python bindings to libarchive, a C library to
7624 access possibly compressed archives in many different formats. It uses
7625 Python's @code{ctypes} foreign function interface (FFI).")
7626 (license license:lgpl2.0+)))
7628 (define-public python2-libarchive-c
7629 (package-with-python2 python-libarchive-c))
7631 (define-public python-file
7634 (name "python-file")
7635 (build-system python-build-system)
7637 '(#:tests? #f ;no tests
7638 #:configure-flags '("--single-version-externally-managed" "--root=/")
7639 #:phases (modify-phases %standard-phases
7640 (add-before 'build 'change-directory
7644 (add-before 'build 'set-library-file-name
7645 (lambda* (#:key inputs #:allow-other-keys)
7646 (let ((file (assoc-ref inputs "file")))
7647 (substitute* "magic.py"
7648 (("find_library\\('magic'\\)")
7649 (string-append "'" file "/lib/libmagic.so'")))
7651 (inputs `(("file" ,file)))
7652 (native-inputs (if (%current-target-system)
7653 `(("self" ,this-package))
7655 (synopsis "Python bindings to the libmagic file type guesser. Note that
7656 this module and the python-magic module both provide a \"magic.py\" file;
7657 these two modules, which are different and were developed separately, both
7658 serve the same purpose: provide Python bindings for libmagic.")))
7660 (define-public python2-file
7661 (package-with-python2 python-file))
7663 (define-public python-debian
7665 (name "python-debian")
7666 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7670 ;; Use git-fetch, as pypi doesn't include test suite.
7675 (file-name (git-file-name name version))
7678 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7679 (build-system python-build-system)
7681 `(#:phases (modify-phases %standard-phases
7682 (add-after 'unpack 'remove-debian-specific-tests
7683 ;; python-apt, apt and dpkg are not yet available in guix,
7684 ;; and these tests heavily depend on them.
7686 (delete-file "lib/debian/tests/test_deb822.py")
7687 (delete-file "lib/debian/tests/test_debfile.py")
7690 `(("python-six" ,python-six)
7691 ("python-chardet" ,python-chardet)))
7692 (synopsis "Debian package related modules")
7694 ;; XXX: Use @enumerate instead of @itemize to work around
7695 ;; <http://bugs.gnu.org/21772>.
7696 "This package provides Python modules that abstract many formats of
7697 Debian-related files, such as:
7700 @item Debtags information;
7701 @item @file{debian/changelog} files;
7702 @item packages files, pdiffs;
7703 @item control files of single or multiple RFC822-style paragraphs---e.g.
7704 @file{debian/control}, @file{.changes}, @file{.dsc};
7705 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7706 contained files and meta-information.
7709 ;; Modules are either GPLv2+ or GPLv3+.
7710 (license license:gpl3+)))
7712 (define-public python2-debian
7713 (package-with-python2 python-debian))
7715 (define-public python-nbformat
7717 (name "python-nbformat")
7722 (uri (pypi-uri "nbformat" version))
7725 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7726 (build-system python-build-system)
7727 (arguments `(#:tests? #f)) ; no test target
7729 `(("python-ipython-genutils" ,python-ipython-genutils)
7730 ("python-jsonschema" ,python-jsonschema)
7731 ("python-jupyter-core" ,python-jupyter-core)
7732 ("python-traitlets" ,python-traitlets)))
7733 (home-page "http://jupyter.org")
7734 (synopsis "Jupyter Notebook format")
7735 (description "This package provides the reference implementation of the
7736 Jupyter Notebook format and Python APIs for working with notebooks.")
7737 (license license:bsd-3)))
7739 (define-public python2-nbformat
7740 (package-with-python2 python-nbformat))
7742 (define-public python-bleach
7744 (name "python-bleach")
7749 (uri (pypi-uri "bleach" version))
7752 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7753 (build-system python-build-system)
7755 `(("python-html5lib" ,python-html5lib-0.9)
7756 ("python-six" ,python-six)))
7758 `(("python-nose" ,python-nose)))
7759 (home-page "https://github.com/jsocol/bleach")
7760 (synopsis "Whitelist-based HTML-sanitizing tool")
7761 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7762 (license license:asl2.0)))
7764 (define-public python2-bleach
7765 (package-with-python2 python-bleach))
7767 (define-public python-entrypoints
7769 (name "python-entrypoints")
7774 (uri (pypi-uri "entrypoints" version))
7777 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7778 (build-system python-build-system)
7779 ;; The package does not come with a setup.py file, so we have to generate
7784 (modify-phases %standard-phases
7785 (add-after 'unpack 'create-setup.py
7787 (call-with-output-file "setup.py"
7790 from setuptools import setup
7791 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7793 (home-page "https://github.com/takluyver/entrypoints")
7794 (synopsis "Discover and load entry points from installed Python packages")
7795 (description "Entry points are a way for Python packages to advertise
7796 objects with some common interface. The most common examples are
7797 @code{console_scripts} entry points, which define shell commands by
7798 identifying a Python function to run. The @code{entrypoints} module contains
7799 functions to find and load entry points.")
7800 (license license:expat)))
7802 (define-public python2-entrypoints
7803 (package-with-python2 python-entrypoints))
7805 (define-public python-nbconvert
7807 (name "python-nbconvert")
7812 (uri (pypi-uri "nbconvert" version))
7815 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7816 (build-system python-build-system)
7818 `(;; The "bdist_egg" target is disabled by default, causing the installation
7820 #:configure-flags (list "bdist_egg")
7821 ;; FIXME: 5 failures, 40 errors.
7824 ;; (modify-phases %standard-phases
7827 ;; (zero? (system* "py.test" "-v")))))
7829 `(("python-pytest" ,python-pytest)))
7831 `(("python-bleach" ,python-bleach)
7832 ("python-entrypoints" ,python-entrypoints)
7833 ("python-jinja2" ,python-jinja2)
7834 ("python-jupyter-core" ,python-jupyter-core)
7835 ("python-mistune" ,python-mistune)
7836 ("python-nbformat" ,python-nbformat)
7837 ("python-pygments" ,python-pygments)
7838 ("python-traitlets" ,python-traitlets)))
7839 (home-page "http://jupyter.org")
7840 (synopsis "Converting Jupyter Notebooks")
7841 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7842 notebooks to various other formats via Jinja templates. It allows you to
7843 convert an @code{.ipynb} notebook file into various static formats including:
7851 @item ReStructured Text (rst)
7852 @item executable script
7854 (license license:bsd-3)))
7856 (define-public python2-nbconvert
7857 (package-with-python2 python-nbconvert))
7859 (define-public python-notebook
7861 (name "python-notebook")
7865 (uri (pypi-uri "notebook" version))
7868 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7869 (build-system python-build-system)
7872 (modify-phases %standard-phases
7875 ;; These tests require a browser
7876 (delete-file-recursively "notebook/tests/selenium")
7877 ;; Some tests need HOME
7878 (setenv "HOME" "/tmp")
7879 ;; This file contains "warningfilters", which are not supported
7880 ;; by this version of nose.
7881 (delete-file "setup.cfg")
7882 (with-directory-excursion "/tmp"
7883 (invoke "nosetests" "-v"))
7886 `(("python-jupyter-core" ,python-jupyter-core)
7887 ("python-nbformat" ,python-nbformat)
7888 ("python-nbconvert" ,python-nbconvert)
7889 ("python-prometheus-client" ,python-prometheus-client)
7890 ("python-send2trash" ,python-send2trash)
7891 ("python-terminado" ,python-terminado)))
7893 `(("python-nose" ,python-nose)
7894 ("python-sphinx" ,python-sphinx)
7895 ("python-requests" ,python-requests)))
7896 (home-page "http://jupyter.org/")
7897 (synopsis "Web-based notebook environment for interactive computing")
7899 "The Jupyter HTML notebook is a web-based notebook environment for
7900 interactive computing.")
7901 (properties `((python2-variant . ,(delay python2-notebook))))
7902 (license license:bsd-3)))
7904 (define-public python2-notebook
7905 (let ((base (package-with-python2
7906 (strip-python2-variant python-notebook))))
7907 (package (inherit base)
7909 `(("python2-mock" ,python2-mock)
7910 ,@(package-native-inputs base)))
7912 (substitute-keyword-arguments (package-arguments base)
7914 `(modify-phases ,phases
7915 (add-before 'check 'disable-test-case
7916 ;; The test requires network access to localhost. Curiously it
7917 ;; fails with Python 2 only. Simply make the test-case return
7921 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7922 (("formats = self.nbconvert_api") "return #")))))))))))
7924 (define-public python-widgetsnbextension
7926 (name "python-widgetsnbextension")
7931 (uri (pypi-uri "widgetsnbextension" version))
7934 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7935 (build-system python-build-system)
7937 `(("python-ipykernel" ,python-ipykernel)
7938 ("python-notebook" ,python-notebook)))
7940 `(("python-certifi" ,python-certifi)
7941 ("python-nose" ,python-nose)))
7942 (home-page "https://ipython.org")
7943 (synopsis "IPython HTML widgets for Jupyter")
7944 (description "This package provides interactive HTML widgets for Jupyter
7946 (license license:bsd-3)))
7948 (define-public python2-widgetsnbextension
7949 (package-with-python2 python-widgetsnbextension))
7951 (define-public python-ipywidgets
7953 (name "python-ipywidgets")
7958 (uri (pypi-uri "ipywidgets" version))
7961 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7962 (build-system python-build-system)
7964 `(("python-ipython" ,python-ipython)
7965 ("python-traitlets" ,python-traitlets)
7966 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7968 `(("python-nose" ,python-nose)
7969 ("python-pytest" ,python-pytest)))
7970 (home-page "https://ipython.org")
7971 (synopsis "IPython HTML widgets for Jupyter")
7972 (description "Ipywidgets are interactive HTML widgets for Jupyter
7973 notebooks and the IPython kernel. Notebooks come alive when interactive
7974 widgets are used. Users gain control of their data and can visualize changes
7976 (license license:bsd-3)))
7978 (define-public python2-ipywidgets
7979 (package-with-python2 python-ipywidgets))
7981 (define-public python-jupyter-console
7983 (name "python-jupyter-console")
7988 (uri (pypi-uri "jupyter_console" version))
7991 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7992 (build-system python-build-system)
7994 `(("python-ipykernel" ,python-ipykernel)
7995 ("python-jupyter-client" ,python-jupyter-client)
7996 ("python-prompt-toolkit" ,python-prompt-toolkit)
7997 ("python-pygments" ,python-pygments)))
7999 `(("python-nose" ,python-nose)))
8000 (home-page "https://jupyter.org")
8001 (synopsis "Jupyter terminal console")
8002 (description "This package provides a terminal-based console frontend for
8003 Jupyter kernels. It also allows for console-based interaction with non-Python
8004 Jupyter kernels such as IJulia and IRKernel.")
8005 (license license:bsd-3)))
8007 (define-public python2-jupyter-console
8009 (name "python2-jupyter-console")
8014 (uri (pypi-uri "jupyter_console" version))
8017 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8018 (build-system python-build-system)
8019 ;; Tests only run in an TTY.
8020 (arguments `(#:tests? #f))
8022 `(("python2-ipykernel" ,python2-ipykernel)
8023 ("python2-jupyter-client" ,python2-jupyter-client)
8024 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8025 ("python2-pygments" ,python2-pygments)))
8027 `(("python2-nose" ,python2-nose)))
8028 (home-page "https://jupyter.org")
8029 (synopsis "Jupyter terminal console")
8030 (description "This package provides a terminal-based console frontend for
8031 Jupyter kernels. It also allows for console-based interaction with non-Python
8032 Jupyter kernels such as IJulia and IRKernel.")
8033 (license license:bsd-3)))
8035 ;; The python-ipython and python-jupyter-console require each other. To get
8036 ;; the functionality in both packages working, strip down the
8037 ;; python-jupyter-console package when using it as an input to python-ipython.
8038 (define python-jupyter-console-minimal
8040 (inherit python-jupyter-console)
8041 (name "python-jupyter-console-minimal")
8043 (substitute-keyword-arguments
8044 (package-arguments python-jupyter-console)
8046 `(modify-phases ,phases
8047 (add-after 'install 'delete-bin
8048 (lambda* (#:key outputs #:allow-other-keys)
8049 ;; Delete the bin files, to avoid conflicts in profiles
8050 ;; where python-ipython and python-jupyter-console are
8052 (delete-file-recursively
8054 (assoc-ref outputs "out") "/bin"))))))))
8055 ;; Remove the python-ipython propagated input, to avoid the cycle
8059 (package-propagated-inputs python-jupyter-console)))))
8061 (define-public python-qtconsole
8063 (name "python-qtconsole")
8068 (uri (pypi-uri "qtconsole" version))
8071 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8072 (build-system python-build-system)
8074 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8075 ;; but we only have the LTS version 5.x. This means that there might be
8076 ;; runtime errors, but since this is a dependency of the Jupyter package,
8077 ;; and Jupyter can be used without the qtconsole we can overlook this for
8081 (modify-phases %standard-phases
8082 (add-before 'check 'pre-check
8084 (setenv "QT_QPA_PLATFORM" "offscreen")
8087 `(("python-ipykernel" ,python-ipykernel)
8088 ("python-ipython" ,python-ipython)))
8090 `(("python-pytest" ,python-pytest)))
8091 (home-page "http://jupyter.org")
8092 (synopsis "Jupyter Qt console")
8093 (description "This package provides a Qt-based console for Jupyter with
8094 support for rich media output.")
8095 (license license:bsd-3)))
8097 (define-public python-jsbeautifier
8099 (name "python-jsbeautifier")
8101 (home-page "https://github.com/beautify-web/js-beautify")
8106 (commit (string-append "v" version))))
8107 (file-name (git-file-name name version))
8110 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8111 (build-system python-build-system)
8113 `(#:phases (modify-phases %standard-phases
8114 (add-after 'unpack 'chdir
8116 ;; The upstream Git repository contains all the code,
8117 ;; but this package only builds the python code.
8120 (add-after 'unpack 'patch-python-six-requirements
8122 (substitute* "python/setup.py"
8127 `(("python-editorconfig" ,python-editorconfig)
8128 ("python-six" ,python-six)))
8130 `(("python-pytest" ,python-pytest)))
8131 (synopsis "JavaScript unobfuscator and beautifier")
8132 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8133 popular online obfuscators.")
8134 (license license:expat)))
8136 (define-public jupyter
8143 (uri (pypi-uri "jupyter" version))
8146 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8147 (build-system python-build-system)
8148 (arguments '(#:tests? #f)) ; there are none.
8150 `(("python-ipykernel" ,python-ipykernel)
8151 ("python-ipywidgets" ,python-ipywidgets)
8152 ("python-jupyter-console" ,python-jupyter-console)
8153 ("python-nbconvert" ,python-nbconvert)
8154 ("python-notebook" ,python-notebook)
8155 ("python-qtconsole" ,python-qtconsole)))
8156 (native-search-paths
8157 (list (search-path-specification
8158 (variable "JUPYTER_PATH")
8159 (files '("share/jupyter")))))
8160 (home-page "https://jupyter.org")
8161 (synopsis "Web application for interactive documents")
8163 "The Jupyter Notebook is a web application that allows you to create and
8164 share documents that contain live code, equations, visualizations and
8165 explanatory text. Uses include: data cleaning and transformation, numerical
8166 simulation, statistical modeling, machine learning and much more.")
8167 (license license:bsd-3)))
8169 (define-public python-chardet
8171 (name "python-chardet")
8176 (uri (pypi-uri "chardet" version))
8179 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8181 `(("python-hypothesis" ,python-hypothesis)
8182 ("python-pytest" ,python-pytest)
8183 ("python-pytest-runner" ,python-pytest-runner)))
8184 (build-system python-build-system)
8185 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8186 (arguments `(#:tests? #f))
8187 (home-page "https://github.com/chardet/chardet")
8188 (synopsis "Universal encoding detector for Python 2 and 3")
8190 "This package provides @code{chardet}, a Python module that can
8191 automatically detect a wide range of file encodings.")
8192 (license license:lgpl2.1+)))
8194 (define-public python2-chardet
8195 (package-with-python2 python-chardet))
8197 (define-public python-docopt
8199 (name "python-docopt")
8204 ;; The release on PyPI does not include tests.
8206 "https://github.com/docopt/docopt/archive/"
8208 (file-name (string-append name "-" version ".tar.gz"))
8211 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8212 (build-system python-build-system)
8214 `(("python-pytest" ,python-pytest)))
8217 (modify-phases %standard-phases
8219 (lambda _ (invoke "py.test"))))))
8220 (home-page "http://docopt.org")
8221 (synopsis "Command-line interface description language for Python")
8222 (description "This library allows the user to define a command-line
8223 interface from a program's help message rather than specifying it
8224 programmatically with command-line parsers like @code{getopt} and
8226 (license license:expat)))
8228 (define-public python2-docopt
8229 (package-with-python2 python-docopt))
8231 (define-public python-pythondialog
8233 (name "python-pythondialog")
8238 (uri (pypi-uri "pythondialog" version))
8241 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8242 (build-system python-build-system)
8245 (modify-phases %standard-phases
8246 (add-after 'unpack 'patch-path
8247 (lambda* (#:key inputs #:allow-other-keys)
8248 (let* ((dialog (assoc-ref inputs "dialog")))
8249 ;; Since this library really wants to grovel the search path, we
8250 ;; must hardcode dialog's store path into it.
8251 (substitute* "dialog.py"
8252 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8253 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8255 #:tests? #f)) ; no test suite
8257 `(("dialog" ,dialog)))
8258 (home-page "http://pythondialog.sourceforge.net/")
8259 (synopsis "Python interface to the UNIX dialog utility")
8260 (description "A Python wrapper for the dialog utility. Its purpose is to
8261 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8262 This allows one to make simple text-mode user interfaces on Unix-like systems")
8263 (license license:lgpl2.1)
8264 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8266 (define-public python2-pythondialog
8267 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8270 (version (package-version python-pythondialog))
8273 (uri (pypi-uri "python2-pythondialog" version))
8276 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8278 (define-public python-configobj
8280 (name "python-configobj")
8284 (uri (pypi-uri "configobj" version))
8287 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8288 ;; Patch setup.py so it looks for python-setuptools, which is
8289 ;; required to parse the keyword 'install_requires' in setup.py.
8290 (patches (search-patches "python-configobj-setuptools.patch"))))
8291 (build-system python-build-system)
8293 `(("python-six" ,python-six)))
8294 (synopsis "Config file reading, writing and validation")
8295 (description "ConfigObj is a simple but powerful config file reader and
8296 writer: an ini file round tripper. Its main feature is that it is very easy to
8297 use, with a straightforward programmer’s interface and a simple syntax for
8299 (home-page "https://github.com/DiffSK/configobj")
8300 (license license:bsd-3)))
8302 (define-public python2-configobj
8303 (package-with-python2 python-configobj))
8305 (define-public python-configargparse
8307 (name "python-configargparse")
8311 (uri (pypi-uri "ConfigArgParse" version))
8314 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8315 (build-system python-build-system)
8317 `(("python-pyyaml" ,python-pyyaml)))
8320 (modify-phases %standard-phases
8323 ;; Bypass setuptools-shim because one test relies on "setup.py"
8324 ;; being the first argument passed to the python call.
8326 ;; NOTE: Many tests do not run because they rely on Python's
8327 ;; built-in test.test_argparse, but we remove the unit tests from
8328 ;; our Python installation.
8329 (invoke "python" "setup.py" "test"))))))
8330 (synopsis "Replacement for argparse")
8331 (description "A drop-in replacement for argparse that allows options to also
8332 be set via config files and/or environment variables.")
8333 (home-page "https://github.com/bw2/ConfigArgParse")
8334 (license license:expat)))
8336 (define-public python2-configargparse
8337 (package-with-python2 python-configargparse))
8339 (define-public python-argparse-manpage
8341 (name "python-argparse-manpage")
8346 (uri (pypi-uri "argparse-manpage" version))
8349 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8350 (build-system python-build-system)
8351 (home-page "https://github.com/praiskup/argparse-manpage")
8352 (synopsis "Build manual page from Python's ArgumentParser object")
8354 "This package provides tools to build manual pages from Python's
8355 @code{ArgumentParser} object.")
8356 (license license:asl2.0)))
8358 (define-public python-contextlib2
8360 (name "python-contextlib2")
8365 (uri (pypi-uri "contextlib2" version))
8368 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8369 (build-system python-build-system)
8370 (home-page "http://contextlib2.readthedocs.org/")
8371 (synopsis "Tools for decorators and context managers")
8372 (description "This module is primarily a backport of the Python
8373 3.2 contextlib to earlier Python versions. Like contextlib, it
8374 provides utilities for common tasks involving decorators and context
8375 managers. It also contains additional features that are not part of
8376 the standard library.")
8377 (license license:psfl)))
8379 (define-public python2-contextlib2
8381 (name "python2-contextlib2")
8386 (uri (pypi-uri "contextlib2" version))
8389 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8390 (build-system python-build-system)
8392 `(#:python ,python-2
8394 (modify-phases %standard-phases
8396 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8398 `(("python2-unittest2" ,python2-unittest2)))
8399 (home-page "http://contextlib2.readthedocs.org/")
8400 (synopsis "Tools for decorators and context managers")
8401 (description "This module is primarily a backport of the Python
8402 3.2 contextlib to earlier Python versions. Like contextlib, it
8403 provides utilities for common tasks involving decorators and context
8404 managers. It also contains additional features that are not part of
8405 the standard library.")
8406 (license license:psfl)))
8408 (define-public python-texttable
8410 (name "python-texttable")
8415 (uri (pypi-uri "texttable" version))
8418 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8419 (build-system python-build-system)
8420 (arguments '(#:tests? #f)) ; no tests
8421 (home-page "https://github.com/foutaise/texttable/")
8422 (synopsis "Python module for creating simple ASCII tables")
8423 (description "Texttable is a Python module for creating simple ASCII
8425 (license license:lgpl2.1+)))
8427 (define-public python2-texttable
8428 (package-with-python2 python-texttable))
8430 (define-public python-atomicwrites
8432 (name "python-atomicwrites")
8436 (uri (pypi-uri "atomicwrites" version))
8439 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8440 (build-system python-build-system)
8441 (synopsis "Atomic file writes in Python")
8442 (description "Library for atomic file writes using platform dependent tools
8443 for atomic file system operations.")
8444 (home-page "https://github.com/untitaker/python-atomicwrites")
8445 (license license:expat)))
8447 (define-public python2-atomicwrites
8448 (package-with-python2 python-atomicwrites))
8450 (define-public python-click-threading
8452 (name "python-click-threading")
8456 (uri (pypi-uri "click-threading" version))
8459 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8460 (build-system python-build-system)
8462 `(("python-click" ,python-click)))
8463 (synopsis "Utilities for multithreading in Click")
8464 (description "This package provides utilities for multithreading in Click
8466 (home-page "https://github.com/click-contrib/click-threading")
8467 (license license:expat)))
8469 (define-public python-click-log
8471 (name "python-click-log")
8475 (uri (pypi-uri "click-log" version))
8478 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8479 (build-system python-build-system)
8481 `(("python-click" ,python-click)))
8482 (synopsis "Logging for click applications")
8483 (description "This package provides a Python library for logging Click
8485 (home-page "https://github.com/click-contrib/click-log")
8486 (license license:expat)))
8488 (define-public python-apipkg
8490 (name "python-apipkg")
8494 (uri (pypi-uri "apipkg" version))
8497 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8498 (build-system python-build-system)
8500 `(("python-pytest" ,python-pytest)))
8501 (synopsis "Namespace control and lazy-import mechanism")
8502 (description "With apipkg you can control the exported namespace of a Python
8503 package and greatly reduce the number of imports for your users. It is a small
8504 pure Python module that works on virtually all Python versions.")
8505 (home-page "https://github.com/pytest-dev/apipkg")
8506 (license license:expat)))
8508 (define-public python2-apipkg
8509 (package-with-python2 python-apipkg))
8511 (define-public python-execnet
8513 (name "python-execnet")
8517 (uri (pypi-uri "execnet" version))
8520 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8521 (build-system python-build-system)
8523 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8524 ;; The two test failures are caused by the lack of an `ssh` executable.
8525 ;; The test suite can be run with pytest after the 'install' phase.
8528 `(("python-pytest" ,python-pytest)
8529 ("python-setuptools-scm" ,python-setuptools-scm)))
8531 `(("python-apipkg" ,python-apipkg)))
8532 (synopsis "Rapid multi-Python deployment")
8533 (description "Execnet provides a share-nothing model with
8534 channel-send/receive communication for distributing execution across many
8535 Python interpreters across version, platform and network barriers. It has a
8536 minimal and fast API targeting the following uses:
8538 @item distribute tasks to (many) local or remote CPUs
8539 @item write and deploy hybrid multi-process applications
8540 @item write scripts to administer multiple environments
8542 (home-page "http://codespeak.net/execnet/")
8543 (license license:expat)))
8545 (define-public python2-execnet
8546 (package-with-python2 python-execnet))
8548 (define-public python-icalendar
8550 (name "python-icalendar")
8554 (uri (pypi-uri "icalendar" version))
8557 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8558 (build-system python-build-system)
8560 `(("python-dateutil" ,python-dateutil)
8561 ("python-pytz" ,python-pytz)))
8562 (synopsis "Python library for parsing iCalendar files")
8563 (description "The icalendar package is a parser/generator of iCalendar
8564 files for use with Python.")
8565 (home-page "https://github.com/collective/icalendar")
8566 (license license:bsd-2)))
8568 (define-public python-args
8570 (name "python-args")
8574 (uri (pypi-uri "args" version))
8577 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8578 (build-system python-build-system)
8579 (home-page "https://github.com/kennethreitz/args")
8580 (synopsis "Command-line argument parser")
8582 "This library provides a Python module to parse command-line arguments.")
8583 (license license:bsd-3)))
8585 (define-public python2-args
8586 (package-with-python2 python-args))
8588 (define-public python-clint
8590 (name "python-clint")
8594 (uri (pypi-uri "clint" version))
8597 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8598 (build-system python-build-system)
8601 (modify-phases %standard-phases
8603 (lambda _ (invoke "py.test" "-v"))))))
8605 `(("python-pytest" ,python-pytest)))
8607 `(("python-args" ,python-args)))
8608 (home-page "https://github.com/kennethreitz/clint")
8609 (synopsis "Command-line interface tools")
8611 "Clint is a Python module filled with a set of tools for developing
8612 command-line applications, including tools for colored and indented
8613 output, progress bar display, and pipes.")
8614 (license license:isc)))
8616 (define-public python2-clint
8617 (package-with-python2 python-clint))
8619 (define-public python-rply
8621 (name "python-rply")
8625 (uri (pypi-uri "rply" version))
8628 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8629 (build-system python-build-system)
8631 `(("python-appdirs" ,python-appdirs)))
8632 (home-page "https://github.com/alex/rply")
8633 (synopsis "Parser generator for Python")
8635 "This package provides a pure Python based parser generator, that also
8636 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8637 with a new public API, and RPython support.")
8638 (license license:bsd-3)))
8640 (define-public python2-rply
8641 (package-with-python2 python-rply))
8643 (define-public python-hy
8649 (uri (pypi-uri "hy" version))
8652 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8653 (build-system python-build-system)
8656 (modify-phases %standard-phases
8659 ;; Tests require write access to HOME.
8660 (setenv "HOME" "/tmp")
8661 (invoke "nosetests"))))))
8663 `(("python-coverage" ,python-coverage)
8664 ("python-nose" ,python-nose)))
8666 `(("python-astor" ,python-astor)
8667 ("python-clint" ,python-clint)
8668 ("python-rply" ,python-rply)))
8669 (home-page "http://hylang.org/")
8670 (synopsis "Lisp frontend to Python")
8672 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8673 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8674 Python at your fingertips, in Lisp form.")
8675 (license license:expat)))
8677 (define-public python2-hy
8678 (package-with-python2 python-hy))
8680 (define-public python2-functools32
8682 (name "python2-functools32")
8687 (uri (pypi-uri "functools32" version))
8690 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8691 (build-system python-build-system)
8693 `(#:python ,python-2
8694 #:tests? #f)) ; no test target
8695 (home-page "https://github.com/MiCHiLU/python-functools32")
8697 "Backport of the functools module from Python 3.2.3")
8699 "This package is a backport of the @code{functools} module from Python
8700 3.2.3 for use with older versions of Python and PyPy.")
8701 (license license:expat)))
8703 (define-public python2-subprocess32
8705 (name "python2-subprocess32")
8709 (uri (pypi-uri "subprocess32" version))
8712 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8714 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8715 (build-system python-build-system)
8717 `(#:python ,python-2
8718 ;; The test suite fails with Python > 2.7.13:
8719 ;; import test.support
8720 ;; ImportError: No module named support
8723 (modify-phases %standard-phases
8724 (add-after 'unpack 'patch-/bin/sh
8726 (substitute* '("subprocess32.py"
8727 "test_subprocess32.py")
8728 (("/bin/sh") (which "sh")))
8730 (home-page "https://github.com/google/python-subprocess32")
8731 (synopsis "Backport of the subprocess module from Python 3.2")
8733 "This is a backport of the @code{subprocess} standard library module
8734 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8735 new features. On POSIX systems it is guaranteed to be reliable when used
8736 in threaded applications. It includes timeout support from Python 3.3 but
8737 otherwise matches 3.2’s API.")
8738 (license license:psfl)))
8740 (define-public python2-futures
8742 (name "python2-futures")
8747 (uri (pypi-uri "futures" version))
8750 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8751 (build-system python-build-system)
8753 `(#:python ,python-2
8755 (modify-phases %standard-phases
8758 (invoke "python" "test_futures.py")
8760 (home-page "https://github.com/agronholm/pythonfutures")
8762 "Backport of the concurrent.futures package from Python 3.2")
8764 "The concurrent.futures module provides a high-level interface for
8765 asynchronously executing callables. This package backports the
8766 concurrent.futures package from Python 3.2")
8767 (license license:bsd-3)))
8769 (define-public python-promise
8771 (name "python-promise")
8776 (uri (pypi-uri "promise" version))
8779 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8780 (build-system python-build-system)
8781 ;; Tests wants python-futures, which is a python2 only program, and
8782 ;; can't be found by python-promise at test time.
8783 (arguments `(#:tests? #f))
8784 (home-page "https://github.com/syrusakbary/promise")
8785 (synopsis "Promises/A+ implementation for Python")
8787 "Promises/A+ implementation for Python")
8788 (properties `((python2-variant . ,(delay python2-promise))))
8789 (license license:expat)))
8791 (define-public python2-promise
8792 (let ((promise (package-with-python2
8793 (strip-python2-variant python-promise))))
8794 (package (inherit promise)
8795 (arguments (substitute-keyword-arguments (package-arguments promise)
8798 `(("python2-futures" ,python2-futures)
8799 ("python2-pytest" ,python2-pytest)
8800 ,@(package-native-inputs promise))))))
8802 (define-public python-progressbar33
8804 (name "python-progressbar33")
8809 (uri (pypi-uri "progressbar33" version))
8812 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8813 (build-system python-build-system)
8814 (home-page "http://github.com/germangh/python-progressbar")
8815 (synopsis "Text progress bar library for Python")
8817 "This package provides a text progress bar library for Python. This
8818 version only differs from the original @code{progressbar} package in that it
8819 uses relative package imports instead of absolute imports, which is necessary
8820 for the module to work under Python 3.3.")
8821 ;; Either or both of these licenses may be selected.
8822 (license (list license:lgpl2.1+ license:bsd-3))))
8824 (define-public python-colorama
8826 (name "python-colorama")
8831 (uri (pypi-uri "colorama" version))
8834 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8835 (build-system python-build-system)
8836 (synopsis "Colored terminal text rendering for Python")
8837 (description "Colorama is a Python library for rendering colored terminal
8839 (home-page "https://pypi.python.org/pypi/colorama")
8840 (license license:bsd-3)))
8842 (define-public python2-colorama
8843 (package-with-python2 python-colorama))
8845 (define-public python-rsa
8852 (uri (pypi-uri "rsa" version))
8855 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8856 (build-system python-build-system)
8858 `(("python-pyasn1" ,python-pyasn1)))
8859 (synopsis "Pure-Python RSA implementation")
8860 (description "Python-RSA is a pure-Python RSA implementation. It supports
8861 encryption and decryption, signing and verifying signatures, and key
8862 generation according to PKCS#1 version 1.5. It can be used as a Python
8863 library as well as on the command line.")
8864 (home-page "https://stuvel.eu/rsa")
8865 (license license:asl2.0)))
8867 (define-public python2-rsa
8868 (package-with-python2 python-rsa))
8870 (define-public python-pluggy
8872 (name "python-pluggy")
8877 (uri (pypi-uri "pluggy" version))
8880 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8881 (build-system python-build-system)
8883 `(("python-setuptools-scm" ,python-setuptools-scm)))
8884 (synopsis "Plugin and hook calling mechanism for Python")
8885 (description "Pluggy is an extraction of the plugin manager as used by
8886 Pytest but stripped of Pytest specific details.")
8887 (home-page "https://pypi.python.org/pypi/pluggy")
8888 (license license:expat)))
8890 (define-public python2-pluggy
8891 (package-with-python2 python-pluggy))
8893 (define-public python-tox
8900 (uri (pypi-uri "tox" version))
8903 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8904 (build-system python-build-system)
8906 ;; FIXME: Tests require pytest-timeout, which itself requires
8907 ;; pytest>=2.8.0 for installation.
8910 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8911 ("python-py" ,python-py)
8912 ("python-virtualenv" ,python-virtualenv)))
8914 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8915 ("python-pytest" ,python-pytest) ; >= 2.3.5
8916 ("python-setuptools-scm" ,python-setuptools-scm)))
8917 (home-page "http://tox.testrun.org/")
8918 (synopsis "Virtualenv-based automation of test activities")
8919 (description "Tox is a generic virtualenv management and test command line
8920 tool. It can be used to check that a package installs correctly with
8921 different Python versions and interpreters, or run tests in each type of
8922 supported environment, or act as a frontend to continuous integration
8924 (license license:expat)))
8926 (define-public python2-tox
8927 (package-with-python2 python-tox))
8929 (define-public python-jmespath
8931 (name "python-jmespath")
8936 (uri (pypi-uri "jmespath" version))
8939 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8940 (build-system python-build-system)
8942 `(("python-nose" ,python-nose)))
8943 (synopsis "JSON Matching Expressions")
8944 (description "JMESPath (pronounced “james path”) is a Python library that
8945 allows one to declaratively specify how to extract elements from a JSON
8947 (home-page "https://github.com/jmespath/jmespath.py")
8948 (license license:expat)))
8950 (define-public python2-jmespath
8951 (package-with-python2 python-jmespath))
8953 (define-public python-botocore
8955 (name "python-botocore")
8956 (version "1.12.149")
8960 (uri (pypi-uri "botocore" version))
8963 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8964 (build-system python-build-system)
8966 ;; FIXME: Many tests are failing.
8969 `(("python-dateutil" ,python-dateutil)
8970 ("python-docutils" ,python-docutils)
8971 ("python-jmespath" ,python-jmespath)))
8973 `(("python-mock" ,python-mock)
8974 ("python-nose" ,python-nose)
8976 ("python-tox" ,python-tox)
8977 ("python-urllib3" ,python-urllib3)
8978 ("python-wheel" ,python-wheel)))
8979 (home-page "https://github.com/boto/botocore")
8980 (synopsis "Low-level interface to AWS")
8981 (description "Botocore is a Python library that provides a low-level
8982 interface to the Amazon Web Services (AWS) API.")
8983 (license license:asl2.0)))
8985 (define-public python2-botocore
8986 (package-with-python2 python-botocore))
8988 (define-public python-xdo
8995 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8996 "python-xdo_" version ".orig.tar.gz"))
8999 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9000 (build-system python-build-system)
9003 (modify-phases %standard-phases
9004 (add-before 'install 'patch-libxdo-path
9005 ;; Hardcode the path of dynamically loaded libxdo library.
9006 (lambda* (#:key inputs #:allow-other-keys)
9007 (let ((libxdo (string-append
9008 (assoc-ref inputs "xdotool")
9010 (substitute* "xdo/_xdo.py"
9011 (("find_library\\(\"xdo\"\\)")
9012 (simple-format #f "\"~a\"" libxdo)))
9014 #:tests? #f)) ; no tests provided
9016 `(("python-six" ,python-six)))
9018 `(("xdotool" ,xdotool)
9019 ("libX11" ,libx11)))
9020 (home-page "https://tracker.debian.org/pkg/python-xdo")
9021 (synopsis "Python library for simulating X11 keyboard/mouse input")
9022 (description "Provides bindings to libxdo for manipulating X11 via simulated
9023 input. (Note that this is mostly a legacy library; you may wish to look at
9024 python-xdo for newer bindings.)")
9025 (license license:bsd-3)))
9027 (define-public python2-xdo
9028 (package-with-python2 python-xdo))
9030 (define-public python-mako
9032 (name "python-mako")
9037 (uri (pypi-uri "Mako" version))
9040 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9041 (build-system python-build-system)
9043 `(#:phases (modify-phases %standard-phases
9046 (invoke "pytest" "-vv"))))))
9048 `(("python-markupsafe" ,python-markupsafe)))
9050 `(("python-mock" ,python-mock)
9051 ("python-pytest" ,python-pytest)))
9052 (home-page "https://www.makotemplates.org/")
9053 (synopsis "Templating language for Python")
9054 (description "Mako is a templating language for Python that compiles
9055 templates into Python modules.")
9056 (license license:expat)))
9058 (define-public python2-mako
9059 (package-with-python2 python-mako))
9061 (define-public python-waitress
9063 (name "python-waitress")
9068 (uri (pypi-uri "waitress" version))
9069 (patches (search-patches "python-waitress-fix-tests.patch"))
9072 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9073 (build-system python-build-system)
9074 (home-page "https://github.com/Pylons/waitress")
9075 (synopsis "Waitress WSGI server")
9076 (description "Waitress is meant to be a production-quality pure-Python WSGI
9077 server with very acceptable performance.")
9078 (license license:zpl2.1)))
9080 (define-public python2-waitress
9081 (package-with-python2 python-waitress))
9083 (define-public python-pyquery
9085 (name "python-pyquery")
9090 (uri (pypi-uri "pyquery" version))
9093 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9094 (build-system python-build-system)
9096 `(("python-webob" ,python-webob)
9097 ("python-webtest" ,python-webtest)))
9099 `(("python-lxml" ,python-lxml)
9100 ("python-cssselect" ,python-cssselect)))
9101 (home-page "https://github.com/gawel/pyquery")
9102 (synopsis "Make jQuery-like queries on xml documents")
9103 (description "pyquery allows you to make jQuery queries on xml documents.
9104 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9105 fast xml and html manipulation.")
9106 (license license:bsd-3)))
9108 (define-public python-anyjson
9110 (name "python-anyjson")
9115 (uri (pypi-uri "anyjson" version))
9118 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9119 (build-system python-build-system)
9121 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9122 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9123 ;; whatever) so this transformation needs to be done before the tests
9124 ;; can be run. Maybe we could add a build step to transform beforehand
9125 ;; but it could be annoying/difficult.
9126 ;; We can enable tests for the Python 2 version, though, and do below.
9128 (home-page "https://bitbucket.org/runeh/anyjson/")
9130 "Wraps best available JSON implementation in a common interface")
9132 "Anyjson loads whichever is the fastest JSON module installed
9133 and provides a uniform API regardless of which JSON implementation is used.")
9134 (license license:bsd-3)
9135 (properties `((python2-variant . ,(delay python2-anyjson))))))
9137 (define-public python2-anyjson
9138 (let ((anyjson (package-with-python2
9139 (strip-python2-variant python-anyjson))))
9142 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9144 ,@(package-arguments anyjson)))
9145 (native-inputs `(("python2-nose" ,python2-nose))))))
9147 (define-public python-amqp
9149 (name "python-amqp")
9154 (uri (pypi-uri "amqp" version))
9157 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9158 (build-system python-build-system)
9160 `(("python-case" ,python-case)
9161 ("python-pytest-sugar" ,python-pytest-sugar)
9162 ("python-mock" ,python-mock)))
9164 `(("python-vine" ,python-vine)))
9165 (home-page "https://github.com/celery/py-amqp")
9167 "Low-level AMQP client for Python (fork of amqplib)")
9169 "This is a fork of amqplib which was originally written by Barry Pederson.
9170 It is maintained by the Celery project, and used by kombu as a pure python
9171 alternative when librabbitmq is not available.")
9172 (license license:lgpl2.1+)
9173 (properties `((python2-variant . ,(delay python2-amqp))))))
9175 (define-public python2-amqp
9176 (let ((amqp (package-with-python2
9177 (strip-python2-variant python-amqp))))
9180 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9181 ;; unmaintained. Weirdly, does not do this on the python 3
9184 ,@(package-arguments amqp))))))
9186 (define-public python-txamqp
9188 (name "python-txamqp")
9193 (uri (pypi-uri "txAMQP" version))
9196 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9197 (build-system python-build-system)
9199 `(("python-six" ,python-six)
9200 ("python-twisted" ,python-twisted)))
9201 (home-page "https://github.com/txamqp/txamqp")
9202 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9204 "This package provides a Python library for communicating with AMQP peers
9205 and brokers using the asynchronous networking framework Twisted. It contains
9206 all the necessary code to connect, send and receive messages to/from an
9207 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9208 also includes support for using Thrift RPC over AMQP in Twisted
9210 (license license:asl2.0)))
9212 (define-public python2-txamqp
9213 (package-with-python2 python-txamqp))
9215 (define-public python-kombu
9217 (name "python-kombu")
9222 (uri (pypi-uri "kombu" version))
9225 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9226 (build-system python-build-system)
9228 `(("python-mock" ,python-mock)
9229 ("python-case" ,python-case)
9230 ("python-pyro4" ,python-pyro4)
9231 ("python-pytest-sugar" ,python-pytest-sugar)
9232 ("python-pytz" ,python-pytz)))
9234 `(("python-anyjson" ,python-anyjson)
9235 ("python-amqp" ,python-amqp)
9236 ("python-redis" ,python-redis)))
9237 (home-page "https://kombu.readthedocs.io")
9238 (synopsis "Message passing library for Python")
9239 (description "The aim of Kombu is to make messaging in Python as easy as
9240 possible by providing an idiomatic high-level interface for the AMQ protocol,
9241 and also provide proven and tested solutions to common messaging problems.
9242 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9243 message orientation, queuing, routing, reliability and security, for which the
9244 RabbitMQ messaging server is the most popular implementation.")
9245 (license license:bsd-3)
9246 (properties `((python2-variant . ,(delay python2-kombu))))))
9248 (define-public python2-kombu
9249 (let ((kombu (package-with-python2
9250 (strip-python2-variant python-kombu))))
9253 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9254 ;; It works fine on the python3 variant.
9256 ,@(package-arguments kombu)))
9257 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9258 ,@(package-native-inputs kombu))))))
9260 (define-public python-billiard
9262 (name "python-billiard")
9267 (uri (pypi-uri "billiard" version))
9270 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9271 (build-system python-build-system)
9273 `(("python-case" ,python-case)
9274 ("python-pytest" ,python-pytest)))
9275 (home-page "https://github.com/celery/billiard")
9277 "Python multiprocessing fork with improvements and bugfixes")
9279 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9280 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9281 pyprocessing package. This standalone variant is intended to be compatible with
9282 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9283 (license license:bsd-3)
9284 (properties `((python2-variant . ,(delay python2-billiard))))))
9286 (define-public python2-billiard
9287 (let ((billiard (package-with-python2
9288 (strip-python2-variant python-billiard))))
9291 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9292 ("python2-mock" ,python2-mock)
9293 ,@(package-native-inputs billiard))))))
9295 (define-public python-celery
9297 (name "python-celery")
9302 (uri (pypi-uri "celery" version))
9305 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9306 (build-system python-build-system)
9308 '(;; TODO The tests fail with Python 3.7
9309 ;; https://github.com/celery/celery/issues/4849
9312 (modify-phases %standard-phases
9313 (add-after 'unpack 'patch-requirements
9315 (substitute* "requirements/test.txt"
9316 (("pytest>=3\\.0,<3\\.3")
9320 `(("python-case" ,python-case)
9321 ("python-pytest" ,python-pytest)))
9323 `(("python-pytz" ,python-pytz)
9324 ("python-billiard" ,python-billiard)
9325 ("python-kombu" ,python-kombu)))
9326 (home-page "https://celeryproject.org")
9327 (synopsis "Distributed Task Queue")
9328 (description "Celery is an asynchronous task queue/job queue based on
9329 distributed message passing. It is focused on real-time operation, but
9330 supports scheduling as well. The execution units, called tasks, are executed
9331 concurrently on a single or more worker servers using multiprocessing,
9332 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9333 synchronously (wait until ready).")
9334 (license license:bsd-3)
9335 (properties `((python2-variant . ,(delay python2-celery))))))
9337 (define-public python2-celery
9338 (let ((celery (package-with-python2
9339 (strip-python2-variant python-celery))))
9342 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9343 ("python2-mock" ,python2-mock)
9344 ,@(package-native-inputs celery))))))
9346 (define-public python-translitcodec
9348 (name "python-translitcodec")
9353 (uri (pypi-uri "translitcodec" version))
9356 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9357 (build-system python-build-system)
9359 `(#:tests? #f)) ; no tests provided
9361 "https://github.com/claudep/translitcodec")
9363 "Unicode to 8-bit charset transliteration codec")
9365 "This package contains codecs for transliterating ISO 10646 texts into
9366 best-effort representations using smaller coded character sets (ASCII,
9368 (license license:expat)))
9370 (define-public python2-translitcodec
9371 (package-with-python2 python-translitcodec))
9373 (define-public python-editor
9375 (name "python-editor")
9380 (uri (pypi-uri "python-editor" version))
9383 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9384 (build-system python-build-system)
9386 "https://github.com/fmoo/python-editor")
9388 "Programmatically open an editor, capture the result")
9390 "python-editor is a library that provides the editor module for
9391 programmatically interfacing with your system's $EDITOR.")
9392 (license license:asl2.0)))
9394 (define-public python2-editor
9395 (package-with-python2 python-editor))
9397 (define-public python-vobject
9399 (name "python-vobject")
9403 (uri (pypi-uri "vobject" version))
9406 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9407 (build-system python-build-system)
9409 '(;; The test suite relies on some non-portable Windows interfaces.
9412 `(("python-dateutil" ,python-dateutil)
9413 ("python-pyicu" ,python-pyicu)))
9414 (synopsis "Parse and generate vCard and vCalendar files")
9415 (description "Vobject is intended to be a full featured Python package for
9416 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9417 are supported and well tested. vCard 3.0 files are supported, and all data
9418 should be imported, but only a few components are understood in a sophisticated
9420 (home-page "http://eventable.github.io/vobject/")
9421 (license license:asl2.0)))
9423 (define-public python2-vobject
9424 (package-with-python2 python-vobject))
9426 (define-public python-munkres
9428 (name "python-munkres")
9432 (uri (pypi-uri "munkres" version))
9435 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9436 (build-system python-build-system)
9438 '(#:tests? #f)) ; no test suite
9439 (home-page "http://software.clapper.org/munkres/")
9440 (synopsis "Implementation of the Munkres algorithm")
9441 (description "The Munkres module provides an implementation of the Munkres
9442 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9443 useful for solving the Assignment Problem.")
9444 (license license:bsd-3)))
9446 (define-public python2-munkres
9447 (package-with-python2 python-munkres))
9449 (define-public python-whoosh
9451 (name "python-whoosh")
9456 (uri (pypi-uri "Whoosh" version))
9459 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9460 (build-system python-build-system)
9462 `(("python-pytest" ,python-pytest)))
9463 (home-page "https://bitbucket.org/mchaput/whoosh")
9464 (synopsis "Full text indexing, search, and spell checking library")
9466 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9468 (license license:bsd-2)))
9470 (define-public python2-whoosh
9471 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9472 (package (inherit whoosh)
9474 `(("python2-backport-ssl-match-hostname"
9475 ,python2-backport-ssl-match-hostname)
9476 ,@(package-propagated-inputs whoosh))))))
9478 (define-public python-pathlib
9480 (name "python-pathlib")
9484 (uri (pypi-uri "pathlib" version))
9487 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9488 (build-system python-build-system)
9489 ;; The tests depend on the internal "test" module, which does not provide
9490 ;; a stable interface.
9491 (arguments `(#:tests? #f))
9492 (home-page "https://pathlib.readthedocs.org/")
9493 (synopsis "Object-oriented file system paths")
9494 (description "Pathlib offers a set of classes to handle file system paths.
9495 It offers the following advantages over using string objects:
9498 @item No more cumbersome use of os and os.path functions. Everything can
9499 be done easily through operators, attribute accesses, and method calls.
9500 @item Embodies the semantics of different path types. For example,
9501 comparing Windows paths ignores casing.
9502 @item Well-defined semantics, eliminating any inconsistencies or
9503 ambiguities (forward vs. backward slashes, etc.).
9506 Note: In Python 3.4, pathlib is now part of the standard library. For other
9507 Python versions please consider python-pathlib2 instead, which tracks the
9508 standard library module. This module (python-pathlib) isn't maintained
9510 (license license:expat)))
9512 (define-public python2-pathlib
9513 (package-with-python2 python-pathlib))
9515 (define-public python2-pathlib2
9517 (name "python2-pathlib2")
9521 (uri (pypi-uri "pathlib2" version))
9524 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9525 (build-system python-build-system)
9526 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9527 ;; version is 3.4 which already includes this package as part of the
9528 ;; standard library.
9530 `(#:python ,python-2))
9532 `(("python2-scandir" ,python2-scandir)
9533 ("python2-six" ,python2-six)))
9534 (home-page "https://pypi.python.org/pypi/pathlib2/")
9535 (synopsis "Object-oriented file system paths - backport of standard
9537 (description "The goal of pathlib2 is to provide a backport of standard
9538 pathlib module which tracks the standard library module, so all the newest
9539 features of the standard pathlib can be used also on older Python versions.
9541 Pathlib offers a set of classes to handle file system paths. It offers the
9542 following advantages over using string objects:
9545 @item No more cumbersome use of os and os.path functions. Everything can
9546 be done easily through operators, attribute accesses, and method calls.
9547 @item Embodies the semantics of different path types. For example,
9548 comparing Windows paths ignores casing.
9549 @item Well-defined semantics, eliminating any inconsistencies or
9550 ambiguities (forward vs. backward slashes, etc.).
9552 (license license:expat)))
9554 (define-public python2-pathlib2-bootstrap
9557 (inherit python2-pathlib2)
9558 (name "python2-pathlib2-bootstrap")
9560 `(("python2-scandir" ,python2-scandir)
9561 ("python2-six" ,python2-six-bootstrap))))))
9563 (define-public python-jellyfish
9565 (name "python-jellyfish")
9569 (uri (pypi-uri "jellyfish" version))
9572 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9573 (build-system python-build-system)
9575 `(("python-pytest" ,python-pytest)))
9576 (home-page "https://github.com/jamesturk/jellyfish")
9577 (synopsis "Approximate and phonetic matching of strings")
9578 (description "Jellyfish uses a variety of string comparison and phonetic
9579 encoding algorithms to do fuzzy string matching.")
9580 (license license:bsd-2)
9581 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9583 (define-public python2-jellyfish
9584 (let ((jellyfish (package-with-python2
9585 (strip-python2-variant python-jellyfish))))
9586 (package (inherit jellyfish)
9587 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9588 ,@(package-native-inputs jellyfish))))))
9590 (define-public python2-unicodecsv
9592 (name "python2-unicodecsv")
9596 ;; The test suite is not included in the PyPi release.
9597 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9598 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9599 "archive/" version ".tar.gz"))
9600 (file-name (string-append name "-" version ".tar.gz"))
9603 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9604 (build-system python-build-system)
9606 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9607 #:python ,python-2))
9609 `(("python2-unittest2" ,python2-unittest2)))
9610 (home-page "https://github.com/jdunck/python-unicodecsv")
9611 (synopsis "Unicode CSV module for Python 2")
9612 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9613 module, adding support for Unicode strings.")
9614 (license license:bsd-2)))
9616 (define-public python-rarfile
9618 (name "python-rarfile")
9622 (uri (pypi-uri "rarfile" version))
9625 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9626 (build-system python-build-system)
9629 (modify-phases %standard-phases
9631 ;; Many tests fail, but the installation proceeds.
9632 (lambda _ (invoke "make" "-C" "test" "test"))))))
9634 `(("which" ,which))) ; required for tests
9636 `(("libarchive" ,libarchive)))
9637 (home-page "https://github.com/markokr/rarfile")
9638 (synopsis "RAR archive reader for Python")
9639 (description "This is Python module for RAR archive reading. The interface
9640 is made as zipfile like as possible.")
9641 (license license:isc)))
9643 (define-public python2-rarfile
9644 (package-with-python2 python-rarfile))
9646 (define-public python-magic
9648 (name "python-magic")
9653 (uri (pypi-uri "python-magic" version))
9656 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9657 (file-name (string-append name "-" version "-checkout"))))
9658 (build-system python-build-system)
9660 ;; The tests are unreliable, so don't run them. The tests fail
9661 ;; under Python3 because they were written for Python2 and
9662 ;; contain import statements that do not work in Python3. One of
9663 ;; the tests fails under Python2 because its assertions are
9664 ;; overly stringent; it relies on comparing output strings which
9665 ;; are brittle and can change depending on the version of
9666 ;; libmagic being used and the system on which the test is
9667 ;; running. In my case, under GuixSD 0.10.0, only one test
9668 ;; failed, and it seems to have failed only because the version
9669 ;; of libmagic that is packaged in Guix outputs a slightly
9670 ;; different (but not wrong) string than the one that the test
9673 #:phases (modify-phases %standard-phases
9674 ;; Replace a specific method call with a hard-coded
9675 ;; path to the necessary libmagic.so file in the
9676 ;; store. If we don't do this, then the method call
9677 ;; will fail to find the libmagic.so file, which in
9678 ;; turn will cause any application using
9679 ;; python-magic to fail.
9680 (add-before 'build 'hard-code-path-to-libmagic
9681 (lambda* (#:key inputs #:allow-other-keys)
9682 (let ((file (assoc-ref inputs "file")))
9683 (substitute* "magic.py"
9684 (("ctypes.util.find_library\\('magic'\\)")
9685 (string-append "'" file "/lib/libmagic.so'")))
9687 (add-before 'install 'disable-egg-compression
9689 (let ((port (open-file "setup.cfg" "a")))
9690 (display "\n[easy_install]\nzip_ok = 0\n"
9695 ;; python-magic needs to be able to find libmagic.so.
9698 "https://github.com/ahupp/python-magic")
9700 "File type identification using libmagic")
9702 "This module uses ctypes to access the libmagic file type
9703 identification library. It makes use of the local magic database and
9704 supports both textual and MIME-type output. Note that this module and
9705 the python-file module both provide a \"magic.py\" file; these two
9706 modules, which are different and were developed separately, both serve
9707 the same purpose: to provide Python bindings for libmagic.")
9708 (license license:expat)))
9710 (define-public python2-magic
9711 (package-with-python2 python-magic))
9713 (define-public python2-s3cmd
9715 (name "python2-s3cmd")
9720 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9721 "s3cmd-" version ".tar.gz"))
9724 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9725 (build-system python-build-system)
9727 ;; s3cmd is written for python2 only and contains no tests.
9728 `(#:python ,python-2
9731 `(("python2-dateutil" ,python2-dateutil)
9732 ;; The python-file package also provides a magic.py module.
9733 ;; This is an unfortunate state of affairs; however, s3cmd
9734 ;; fails to install if it cannot find specifically the
9735 ;; python-magic package. Thus we include it, instead of using
9736 ;; python-file. Ironically, s3cmd sometimes works better
9737 ;; without libmagic bindings at all:
9738 ;; https://github.com/s3tools/s3cmd/issues/198
9739 ("python2-magic" ,python2-magic)))
9740 (home-page "http://s3tools.org/s3cmd")
9741 (synopsis "Command line tool for S3-compatible storage services")
9743 "S3cmd is a command line tool for uploading, retrieving and managing data
9744 in storage services that are compatible with the Amazon Simple Storage
9745 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9746 GnuPG encryption, and more. It also supports management of Amazon's
9747 CloudFront content delivery network.")
9748 (license license:gpl2+)))
9750 (define-public python-pkgconfig
9752 (name "python-pkgconfig")
9757 (uri (pypi-uri "pkgconfig" version))
9760 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9761 (build-system python-build-system)
9763 `(("python-nose" ,python-nose)))
9765 `(("pkg-config" ,pkg-config)))
9768 (modify-phases %standard-phases
9769 (add-before 'build 'patch
9770 ;; Hard-code the path to pkg-config.
9772 (substitute* "pkgconfig/pkgconfig.py"
9773 (("cmd = 'pkg-config")
9774 (string-append "cmd = '" (which "pkg-config"))))
9778 (invoke "nosetests" "test.py"))))))
9779 (home-page "https://github.com/matze/pkgconfig")
9780 (synopsis "Python interface for pkg-config")
9781 (description "This module provides a Python interface to pkg-config. It
9782 can be used to find all pkg-config packages, check if a package exists,
9783 check if a package meets certain version requirements, query CFLAGS and
9784 LDFLAGS and parse the output to build extensions with setup.py.")
9785 (license license:expat)))
9787 (define-public python2-pkgconfig
9788 (package-with-python2 python-pkgconfig))
9790 (define-public python-bz2file
9792 (name "python-bz2file")
9797 (uri (pypi-uri "bz2file" version))
9800 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9801 (build-system python-build-system)
9803 `(#:tests? #f)) ; Tests use deprecated python modules.
9804 (home-page "https://github.com/nvawda/bz2file")
9805 (synopsis "Read and write bzip2-compressed files")
9807 "Bz2file is a Python library for reading and writing bzip2-compressed
9808 files. It contains a drop-in replacement for the I/O interface in the
9809 standard library's @code{bz2} module, including features from the latest
9810 development version of CPython that are not available in older releases.")
9811 (license license:asl2.0)))
9813 (define-public python2-bz2file
9814 (package-with-python2 python-bz2file))
9816 (define-public python-future
9818 (name "python-future")
9823 (uri (pypi-uri "future" version))
9826 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9827 (build-system python-build-system)
9828 ;; Many tests connect to the network or are otherwise flawed.
9829 ;; https://github.com/PythonCharmers/python-future/issues/210
9832 (home-page "http://python-future.org")
9833 (synopsis "Single-source support for Python 3 and 2")
9835 "@code{python-future} is the missing compatibility layer between Python 2 and
9836 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9837 to support both Python 2 and Python 3 with minimal overhead.")
9838 (license license:expat)))
9840 (define-public python2-future
9841 (package-with-python2 python-future))
9843 (define-public python-cysignals
9845 (name "python-cysignals")
9850 (uri (pypi-uri "cysignals" version))
9853 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9854 (build-system python-build-system)
9856 `(("python-cython" ,python-cython)
9857 ("python-sphinx" ,python-sphinx)))
9859 `(("pari-gp" ,pari-gp)))
9861 `(#:modules ((guix build python-build-system)
9862 ((guix build gnu-build-system) #:prefix gnu:)
9864 ;; FIXME: Tests are executed after installation and currently fail
9865 ;; when not installing into standard locations; the author is working
9869 (modify-phases %standard-phases
9872 (assoc-ref gnu:%standard-phases 'configure)))))
9874 "https://github.com/sagemath/cysignals")
9876 "Handling of interrupts and signals for Cython")
9878 "The cysignals package provides mechanisms to handle interrupts (and
9879 other signals and errors) in Cython code, using two related approaches,
9880 for mixed Cython/Python code or external C libraries and pure Cython code,
9882 (license license:lgpl3+)))
9884 (define-public python2-cysignals
9885 (package-with-python2 python-cysignals))
9887 (define-public python2-shedskin
9889 (name "python2-shedskin")
9894 (uri (string-append "https://github.com/shedskin/shedskin/"
9895 "releases/download/v" version
9896 "/shedskin-" version ".tgz"))
9899 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9900 (build-system python-build-system)
9902 `(#:python ,python-2
9903 #:phases (modify-phases %standard-phases
9904 (add-after 'unpack 'fix-resulting-include-libs
9905 (lambda* (#:key inputs #:allow-other-keys)
9906 (let ((libgc (assoc-ref inputs "libgc"))
9907 (pcre (assoc-ref inputs "pcre")))
9908 (substitute* "shedskin/makefile.py"
9909 (("variable == 'CCFLAGS':[ ]*")
9910 (string-append "variable == 'CCFLAGS':\n"
9911 " line += ' -I " pcre "/include"
9912 " -I " libgc "/include'"))
9913 (("variable == 'LFLAGS':[ ]*")
9914 (string-append "variable == 'LFLAGS':\n"
9915 " line += ' -L" pcre "/lib"
9916 " -L " libgc "/lib'")))
9918 (inputs `(("pcre" ,pcre)
9920 (home-page "https://shedskin.github.io/")
9921 (synopsis "Experimental Python-2 to C++ Compiler")
9922 (description (string-append "This is an experimental compiler for a subset of
9923 Python. It generates C++ code and a Makefile."))
9924 (license (list license:gpl3 license:bsd-3 license:expat))))
9926 (define-public python2-rope
9928 (name "python2-rope")
9933 (uri (pypi-uri "rope" version))
9936 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9938 ;; Rope has only partial python3 support, see `python-rope'
9939 `(#:python ,python-2))
9940 (build-system python-build-system)
9942 `(("python2-unittest2" ,python2-unittest2)))
9943 (home-page "https://github.com/python-rope/rope")
9944 (synopsis "Refactoring library for Python")
9945 (description "Rope is a refactoring library for Python. It facilitates
9946 the renaming, moving and extracting of attributes, functions, modules, fields
9947 and parameters in Python 2 source code. These refactorings can also be applied
9948 to occurrences in strings and comments.")
9949 (license license:gpl2)))
9951 (define-public python-rope
9953 (inherit python2-rope)
9954 (name "python-rope")
9955 (arguments `(#:python ,python-wrapper
9956 ;; XXX: Only partial python3 support, results in some failing
9957 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9959 (properties `((python2-variant . ,(delay python2-rope))))))
9961 (define-public python-py3status
9963 (name "python-py3status")
9968 (uri (pypi-uri "py3status" version))
9971 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9972 (build-system python-build-system)
9977 (modify-phases %standard-phases
9978 ;; 'file' is used for detection of configuration file encoding
9979 ;; let's make link the dependency to particular input
9980 (add-before 'build 'patch-file-path
9981 (lambda* (#:key inputs #:allow-other-keys)
9982 (let ((file-path (assoc-ref inputs "file")))
9983 (substitute* "py3status/parse_config.py"
9984 (("\\['file', '-b'")
9985 (string-append "['" file-path "/bin/file', '-b'")))
9987 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9988 (home-page "https://github.com/ultrabug/py3status")
9989 (synopsis "Extensible i3status wrapper written in Python")
9990 (description "py3status is an i3status wrapper which extends i3status
9991 functionality in a modular way, allowing you to extend your panel with your
9992 own code, responding to click events and updating clock every second.")
9993 (license license:bsd-3)))
9995 (define-public python-tblib
9997 (name "python-tblib")
10001 (uri (pypi-uri "tblib" version))
10003 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10004 (build-system python-build-system)
10007 (modify-phases %standard-phases
10008 (add-before 'check 'adjust-tests
10010 (when (which "python3")
10011 ;; Adjust the example output to match that of Python 3.7:
10012 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10013 (substitute* "README.rst"
10014 (("Exception\\('fail',") "Exception('fail'"))
10018 ;; Upstream runs tests after installation and the package itself
10019 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10021 (setenv "PYTHONPATH"
10022 (string-append (getcwd) "/build/lib:"
10023 (getenv "PYTHONPATH")))
10024 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10026 `(("python-pytest" ,python-pytest)
10027 ("python-six" ,python-six)))
10028 (home-page "https://github.com/ionelmc/python-tblib")
10029 (synopsis "Traceback serialization library")
10031 "Traceback serialization allows you to:
10034 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10035 different processes. This allows better error handling when running code over
10036 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10038 @item Parse traceback strings and raise with the parsed tracebacks.
10040 (license license:bsd-3)))
10042 (define-public python2-tblib
10043 (package-with-python2 python-tblib))
10045 (define-public python-greenlet
10047 (name "python-greenlet")
10051 (uri (pypi-uri "greenlet" version))
10054 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10055 (build-system python-build-system)
10056 (home-page "https://greenlet.readthedocs.io/")
10057 (synopsis "Lightweight in-process concurrent programming")
10059 "Greenlet package is a spin-off of Stackless, a version of CPython
10060 that supports micro-threads called \"tasklets\". Tasklets run
10061 pseudo-concurrently (typically in a single or a few OS-level threads) and
10062 are synchronized with data exchanges on \"channels\".")
10063 (license (list license:psfl license:expat))))
10065 (define-public python2-greenlet
10066 (package-with-python2 python-greenlet))
10068 (define-public python-objgraph
10070 (name "python-objgraph")
10075 (uri (pypi-uri "objgraph" version))
10078 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10079 (build-system python-build-system)
10081 `(("python-graphviz" ,python-graphviz)))
10083 `(("python-mock" ,python-mock)
10084 ("graphviz" ,graphviz)))
10085 (home-page "https://mg.pov.lt/objgraph/")
10086 (synopsis "Draw Python object reference graphs with graphviz")
10088 "This package provides tools to draw Python object reference graphs with
10090 (license license:expat)))
10092 (define-public python-gevent
10094 (name "python-gevent")
10098 (uri (pypi-uri "gevent" version))
10101 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10102 (modules '((guix build utils)))
10105 ;; unbunding libev and c-ares
10106 (delete-file-recursively "deps")
10108 (build-system python-build-system)
10110 `(#:modules ((ice-9 ftw)
10114 (guix build python-build-system))
10115 #:phases (modify-phases %standard-phases
10116 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10118 (substitute* "src/gevent/subprocess.py"
10119 (("/bin/sh") (which "sh")))
10120 (for-each (lambda (file)
10122 (("/bin/sh") (which "sh"))
10123 (("/bin/true") (which "true"))))
10124 (find-files "src/greentest" "\\.py$"))
10126 (add-before 'build 'do-not-use-bundled-sources
10127 (lambda* (#:key inputs #:allow-other-keys)
10128 (setenv "CONFIG_SHELL" (which "bash"))
10129 (setenv "LIBEV_EMBED" "false")
10130 (setenv "CARES_EMBED" "false")
10131 (setenv "EMBED" "false")
10133 ;; Prevent building bundled libev.
10134 (substitute* "setup.py"
10135 (("run_make=_BUILDING")
10138 (let ((greenlet (string-append
10139 (assoc-ref inputs "python-greenlet")
10141 (match (scandir greenlet
10143 (string-prefix? "python" item)))
10145 (setenv "C_INCLUDE_PATH"
10146 (string-append greenlet "/" python)))))
10148 (add-before 'check 'skip-timer-test
10150 ;; XXX: Skip 'TestTimerResolution', which appears to be
10152 (substitute* "src/greentest/test__core_timer.py"
10153 (("not greentest.RUNNING_ON_CI") "False"))
10157 ;; Make sure the build directory is on PYTHONPATH.
10158 (setenv "PYTHONPATH"
10160 (getenv "PYTHONPATH") ":"
10162 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10163 (with-directory-excursion "src/greentest"
10164 ;; XXX: Many tests require network access. Instead we only
10165 ;; run known-good tests. Unfortunately we cannot use
10166 ;; recursion here since this directory also contains
10167 ;; Python-version-specific subfolders.
10168 (apply invoke "python" "testrunner.py" "--config"
10169 "known_failures.py"
10170 (scandir "." (cut regexp-exec
10171 (make-regexp "test_+(subprocess|core)")
10174 `(("python-greenlet" ,python-greenlet)
10175 ("python-objgraph" ,python-objgraph)))
10177 `(("python-six" ,python-six)))
10179 `(("c-ares" ,c-ares)
10181 (home-page "http://www.gevent.org/")
10182 (synopsis "Coroutine-based network library")
10184 "gevent is a coroutine-based Python networking library that uses greenlet
10185 to provide a high-level synchronous API on top of the libev event loop.")
10186 (license license:expat)
10187 (properties `((python2-variant . ,(delay python2-gevent))))))
10189 (define-public python2-gevent
10190 (let ((base (package-with-python2
10191 (strip-python2-variant python-gevent))))
10194 (native-inputs `(,@(package-native-inputs python-gevent)
10195 ("python-mock" ,python2-mock))))))
10197 (define-public python-fastimport
10199 (name "python-fastimport")
10204 (uri (pypi-uri "fastimport" version))
10206 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10207 (build-system python-build-system)
10208 (home-page "https://github.com/jelmer/python-fastimport")
10209 (synopsis "VCS fastimport parser and generator in Python")
10210 (description "This package provides a parser for and generator of the Git
10211 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10213 (license license:gpl2+)))
10215 (define-public python2-fastimport
10216 (package-with-python2 python-fastimport))
10218 (define-public python-twisted
10220 (name "python-twisted")
10224 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10227 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10228 (build-system python-build-system)
10230 '(#:tests? #f)) ; FIXME: some tests fail
10232 `(("python-zope-interface" ,python-zope-interface)
10233 ("python-pyhamcrest" ,python-pyhamcrest)
10234 ("python-incremental" ,python-incremental)
10235 ("python-hyperlink" ,python-hyperlink)
10236 ("python-constantly" ,python-constantly)
10237 ("python-automat" ,python-automat)))
10238 (home-page "https://twistedmatrix.com/")
10239 (synopsis "Asynchronous networking framework written in Python")
10241 "Twisted is an extensible framework for Python programming, with special
10242 focus on event-based network programming and multiprotocol integration.")
10243 (license license:expat)))
10245 (define-public python2-twisted
10246 (package-with-python2 python-twisted))
10248 (define-public python-pika
10250 (name "python-pika")
10255 (uri (pypi-uri "pika" version))
10258 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10259 (build-system python-build-system)
10261 `(("python-pyev" ,python-pyev)
10262 ("python-tornado" ,python-tornado)
10263 ("python-twisted" ,python-twisted)))
10264 (home-page "https://pika.readthedocs.org")
10265 (synopsis "Pure Python AMQP Client Library")
10267 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10268 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10269 network support library.")
10270 (license license:bsd-3)))
10272 (define-public python2-pika
10273 (package-with-python2 python-pika))
10275 (define-public python-ply
10277 (name "python-ply")
10282 (uri (pypi-uri "ply" version))
10285 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10286 (build-system python-build-system)
10287 (home-page "http://www.dabeaz.com/ply/")
10288 (synopsis "Python Lex & Yacc")
10289 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10290 It uses LR parsing and does extensive error checking.")
10291 (license license:bsd-3)))
10293 (define-public python2-ply
10294 (package-with-python2 python-ply))
10296 (define-public python-tabulate
10298 (name "python-tabulate")
10302 (uri (pypi-uri "tabulate" version))
10305 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10306 (build-system python-build-system)
10308 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10309 ;; and the latest release is not tagged in the upstream repository.
10311 (home-page "https://bitbucket.org/astanin/python-tabulate")
10312 (synopsis "Pretty-print tabular data")
10314 "Tabulate is a library and command-line utility to pretty-print tabular
10316 (license license:expat)))
10318 (define-public python2-tabulate
10319 (package-with-python2 python-tabulate))
10321 (define-public python-kazoo
10323 (name "python-kazoo")
10328 (uri (pypi-uri "kazoo" version))
10331 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10332 (build-system python-build-system)
10333 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10335 `(("python-six" ,python-six)))
10336 (home-page "https://kazoo.readthedocs.org")
10337 (synopsis "High-level Zookeeper client library")
10339 "Kazoo is a Python client library for the Apache Zookeeper distributed
10340 application service. It is designed to be easy to use and to avoid common
10341 programming errors.")
10342 (license license:asl2.0)))
10344 (define-public python2-kazoo
10345 (package-with-python2 python-kazoo))
10347 (define-public python-pykafka
10349 (name "python-pykafka")
10353 (uri (pypi-uri "pykafka" version))
10356 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10357 (build-system python-build-system)
10358 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10360 `(("python-gevent" ,python-gevent)
10361 ("python-kazoo" ,python-kazoo)
10362 ("python-tabulate" ,python-tabulate)))
10364 `(("librdkafka" ,librdkafka)))
10365 (home-page "https://pykafka.readthedocs.io/")
10366 (synopsis "Apache Kafka client for Python")
10368 "PyKafka is a client for the Apache Kafka distributed messaging system.
10369 It includes Python implementations of Kafka producers and consumers, which
10370 are optionally backed by a C extension built on librdkafka.")
10371 (license license:asl2.0)))
10373 (define-public python2-pykafka
10374 (package-with-python2 python-pykafka))
10376 (define-public python-wcwidth
10378 (name "python-wcwidth")
10383 (uri (pypi-uri "wcwidth" version))
10386 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10387 (build-system python-build-system)
10388 (home-page "https://github.com/jquast/wcwidth")
10389 (synopsis "Measure number of terminal column cells of wide-character codes")
10390 (description "Wcwidth measures the number of terminal column cells of
10391 wide-character codes. It is useful for those implementing a terminal emulator,
10392 or programs that carefully produce output to be interpreted by one. It is a
10393 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10394 specified in POSIX.1-2001 and POSIX.1-2008.")
10395 (license license:expat)))
10397 (define-public python2-wcwidth
10398 (package-with-python2 python-wcwidth))
10400 (define-public python2-jsonrpclib
10402 (name "python2-jsonrpclib")
10406 (uri (pypi-uri "jsonrpclib" version))
10409 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10410 (build-system python-build-system)
10413 #:python ,python-2))
10414 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10415 (synopsis "Implementation of JSON-RPC specification for Python")
10417 "This library is an implementation of the JSON-RPC specification.
10418 It supports both the original 1.0 specification, as well as the
10419 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10421 (license license:asl2.0)))
10423 (define-public python-chai
10425 (name "python-chai")
10429 (uri (pypi-uri "chai" version))
10432 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10433 (build-system python-build-system)
10434 (home-page "https://github.com/agoragames/chai")
10435 (synopsis "Mocking framework for Python")
10437 "Chai provides an api for mocking, stubbing and spying your python
10438 objects, patterned after the Mocha library for Ruby.")
10439 (license license:bsd-3)))
10441 (define-public python2-chai
10442 (package-with-python2 python-chai))
10444 (define-public python-inflection
10446 (name "python-inflection")
10449 (origin (method url-fetch)
10450 (uri (pypi-uri "inflection" version))
10453 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10454 (build-system python-build-system)
10456 `(("python-pytest" ,python-pytest)))
10457 (home-page "https://github.com/jpvanhal/inflection")
10458 (synopsis "Python string transformation library")
10460 "Inflection is a string transformation library. It singularizes
10461 and pluralizes English words, and transforms strings from CamelCase to
10462 underscored string.")
10463 (license license:expat)))
10465 (define-public python2-inflection
10466 (package-with-python2 python-inflection))
10468 (define-public python-pylev
10470 (name "python-pylev")
10474 (uri (pypi-uri "pylev" version))
10477 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10478 (build-system python-build-system)
10479 (home-page "https://github.com/toastdriven/pylev")
10480 (synopsis "Levenshtein distance implementation in Python")
10481 (description "Pure Python Levenshtein implementation, based off the
10482 Wikipedia code samples at
10483 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10484 (license license:bsd-3)))
10486 (define-public python2-pylev
10487 (package-with-python2 python-pylev))
10489 (define-public python-cleo
10491 (name "python-cleo")
10495 (uri (pypi-uri "cleo" version))
10498 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10499 (build-system python-build-system)
10502 ("python-mock" ,python-mock)
10503 ("python-pytest-mock" ,python-pytest-mock)
10504 ("python-pytest" ,python-pytest)))
10506 `(("python-backpack" ,python-backpack)
10507 ("python-pastel" ,python-pastel)
10508 ("python-pylev" ,python-pylev)))
10509 (home-page "https://github.com/sdispater/cleo")
10510 (synopsis "Command-line arguments library for Python")
10512 "Cleo allows you to create command-line commands with signature in
10513 docstring and colored output.")
10514 (license license:expat)))
10516 (define-public python2-cleo
10517 (package-with-python2 python-cleo))
10519 (define-public python-lazy-object-proxy
10521 (name "python-lazy-object-proxy")
10525 (uri (pypi-uri "lazy-object-proxy" version))
10528 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10529 (build-system python-build-system)
10530 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10531 (synopsis "Lazy object proxy for python")
10533 "Lazy object proxy is an object that wraps a callable but defers the call
10534 until the object is actually required, and caches the result of said call.")
10535 (license license:bsd-2)))
10537 (define-public python2-lazy-object-proxy
10538 (package-with-python2 python-lazy-object-proxy))
10540 (define-public python-dnspython
10542 (name "python-dnspython")
10546 (uri (string-append "http://www.dnspython.org/kits/"
10547 version "/dnspython-" version ".tar.gz"))
10550 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10551 (build-system python-build-system)
10552 (arguments '(#:tests? #f)) ; XXX: requires internet access
10553 (home-page "http://www.dnspython.org")
10554 (synopsis "DNS toolkit for Python")
10556 "dnspython is a DNS toolkit for Python. It supports almost all record
10557 types. It can be used for queries, zone transfers, and dynamic updates.
10558 It supports TSIG authenticated messages and EDNS0.")
10559 (license license:expat)))
10561 (define-public python2-dnspython
10562 (package-with-python2 python-dnspython))
10564 (define-public python-email-validator
10566 (name "python-email-validator")
10569 (origin (method url-fetch)
10570 (uri (pypi-uri "email_validator" version))
10573 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10574 (build-system python-build-system)
10577 (modify-phases %standard-phases
10578 (add-before 'build 'use-dnspython
10580 (substitute* "setup.py"
10581 (("dnspython3") "dnspython"))
10584 `(("python-dnspython" ,python-dnspython)
10585 ("python-idna" ,python-idna)))
10586 (home-page "https://github.com/JoshData/python-email-validator")
10587 (synopsis "Email address validation library for Python")
10589 "This library validates email address syntax and deliverability.")
10590 (license license:cc0)))
10592 (define-public python2-email-validator
10593 (package-with-python2 python-email-validator))
10595 (define-public python-ukpostcodeparser
10597 (name "python-ukpostcodeparser")
10601 (uri (pypi-uri "UkPostcodeParser" version))
10604 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10605 (build-system python-build-system)
10606 (home-page "https://github.com/hamstah/ukpostcodeparser")
10607 (synopsis "UK Postcode parser for Python")
10609 "This library provides the @code{parse_uk_postcode} function for
10610 parsing UK postcodes.")
10611 (license license:expat)))
10613 (define-public python2-ukpostcodeparser
10614 (package-with-python2 python-ukpostcodeparser))
10616 (define-public python-faker
10618 (name "python-faker")
10622 (uri (pypi-uri "Faker" version))
10625 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10627 (search-patches "python-faker-fix-build-32bit.patch"))
10628 (modules '((guix build utils)))
10631 (for-each delete-file (find-files "." "\\.pyc$"))
10633 (build-system python-build-system)
10636 (modify-phases %standard-phases
10638 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10641 ("python-email-validator" ,python-email-validator)
10642 ("python-mock" ,python-mock)
10643 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10645 `(("python-dateutil" ,python-dateutil)
10646 ("python-six" ,python-six)))
10647 (home-page "https://github.com/joke2k/faker")
10648 (synopsis "Python package that generates fake data")
10650 "Faker is a Python package that generates fake data such as names,
10651 addresses, and phone numbers.")
10652 (license license:expat)
10653 (properties `((python2-variant . ,(delay python2-faker))))))
10655 (define-public python2-faker
10656 (let ((base (package-with-python2 (strip-python2-variant
10661 `(("python2-ipaddress" ,python2-ipaddress)
10662 ,@(package-propagated-inputs base))))))
10664 (define-public python-pyaml
10666 (name "python-pyaml")
10667 (version "18.11.0")
10670 (uri (pypi-uri "pyaml" version))
10673 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10674 (build-system python-build-system)
10676 `(("python-unidecode" ,python-unidecode)))
10678 `(("python-pyyaml" ,python-pyyaml)))
10679 (home-page "https://github.com/mk-fg/pretty-yaml")
10680 (synopsis "YAML pretty-print library for Python")
10682 "pyaml is a PyYAML based python module to produce pretty and readable
10683 YAML-serialized data.")
10684 (license license:wtfpl2)))
10686 (define-public python2-pyaml
10687 (package-with-python2 python-pyaml))
10689 (define-public python-backpack
10691 (name "python-backpack")
10696 (uri (pypi-uri "backpack" version))
10699 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10700 (build-system python-build-system)
10702 `(("python-pytest" ,python-pytest)
10703 ("python-nose" ,python-nose)))
10705 `(("python-simplejson" ,python-simplejson)))
10706 (home-page "https://github.com/sdispater/backpack")
10707 (synopsis "Utilities for working with Python collections")
10708 (description "Backpack provides some useful utilities for working with
10709 collections of data.")
10710 (license license:expat)))
10712 (define-public python2-backpack
10713 (package-with-python2 python-backpack))
10715 (define-public python-prompt-toolkit
10717 (name "python-prompt-toolkit")
10722 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10725 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10726 (build-system python-build-system)
10729 (modify-phases %standard-phases
10731 (add-after 'install 'post-install-check
10732 (lambda* (#:key inputs outputs #:allow-other-keys)
10733 ;; HOME is needed for the test
10734 ;; "test_pathcompleter_can_expanduser".
10735 (setenv "HOME" "/tmp")
10736 (add-installed-pythonpath inputs outputs)
10737 (invoke "py.test"))))))
10739 `(("python-wcwidth" ,python-wcwidth)
10740 ("python-six" ,python-six)
10741 ("python-pygments" ,python-pygments)))
10743 `(("python-pytest" ,python-pytest)))
10744 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10745 (synopsis "Library for building command line interfaces in Python")
10747 "Prompt-Toolkit is a library for building interactive command line
10748 interfaces in Python. It's like GNU Readline but it also features syntax
10749 highlighting while typing, out-of-the-box multi-line input editing, advanced
10750 code completion, incremental search, support for Chinese double-width
10751 characters, mouse support, and auto suggestions.")
10752 (license license:bsd-3)))
10754 (define-public python2-prompt-toolkit
10755 (package-with-python2 python-prompt-toolkit))
10757 (define-public python-prompt-toolkit-1
10758 (package (inherit python-prompt-toolkit)
10763 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10766 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10768 (define-public python2-prompt-toolkit-1
10769 (package-with-python2 python-prompt-toolkit-1))
10771 (define-public python-jedi
10773 (name "python-jedi")
10778 (uri (pypi-uri "jedi" version))
10781 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10782 (build-system python-build-system)
10785 (modify-phases %standard-phases
10786 (add-after 'unpack 'disable-file-completion-test
10787 ;; A single parameterized test currently fail (see:
10788 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10790 (substitute* "test/test_api/test_completion.py"
10791 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10795 (setenv "HOME" "/tmp")
10796 (invoke "python" "-m" "pytest"))))))
10798 `(("python-pytest" ,python-pytest)
10799 ("python-docopt" ,python-docopt)))
10801 `(("python-parso" ,python-parso)))
10802 (home-page "https://github.com/davidhalter/jedi")
10803 (synopsis "Autocompletion and static analysis library for Python")
10805 "Jedi is a static analysis tool for Python that can be used in Integrated
10806 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10807 on a deeper level than many other static analysis frameworks for Python.
10809 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10811 (license license:expat)))
10813 (define-public python2-jedi
10814 (package-with-python2 python-jedi))
10816 (define-public ptpython
10822 (uri (pypi-uri "ptpython" version))
10825 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10826 (build-system python-build-system)
10828 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10830 `(("python-docopt" ,python-docopt)
10831 ("python-jedi" ,python-jedi)
10832 ("python-prompt-toolkit" ,python-prompt-toolkit)
10833 ("python-pygments" ,python-pygments)))
10834 (home-page "https://github.com/jonathanslenders/ptpython")
10835 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10837 "ptpython is a Python read-eval-print loop with IDE-like features.
10838 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10839 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10841 (license license:bsd-3)
10842 (properties `((python2-variant . ,(delay ptpython-2))))))
10844 (define-public ptpython-2
10845 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10848 (name "ptpython2"))))
10850 (define-public python-stem
10852 (name "python-stem")
10857 (uri (pypi-uri "stem" version))
10860 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10861 (build-system python-build-system)
10864 (modify-phases %standard-phases
10867 (invoke "./run_tests.py" "--unit")
10870 `(("python-mock" ,python-mock)
10871 ("python-pycodestyle" ,python-pycodestyle)
10872 ("python-pyflakes" ,python-pyflakes)))
10873 (home-page "https://stem.torproject.org/")
10875 "Python controller library that allows applications to interact with Tor")
10877 "Stem is a Python controller library for Tor. With it you can use Tor's
10878 control protocol to script against the Tor process and read descriptor data
10879 relays publish about themselves.")
10880 (license license:lgpl3)))
10882 (define-public python2-stem
10883 (package-with-python2 python-stem))
10885 (define-public python-pyserial
10887 (name "python-pyserial")
10892 (uri (pypi-uri "pyserial" version))
10895 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10896 (build-system python-build-system)
10898 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10900 ;; (modify-phases %standard-phases
10903 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10905 "https://github.com/pyserial/pyserial")
10906 (synopsis "Python Serial Port Bindings")
10907 (description "@code{pyserial} provide serial port bindings for Python. It
10908 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10909 and/or Xon/Xoff. The port is accessed in RAW mode.")
10910 (license license:bsd-3)))
10912 (define-public python2-pyserial
10913 (package-with-python2 python-pyserial))
10915 (define-public python-kivy
10917 (name "python-kivy")
10922 (uri (pypi-uri "Kivy" version))
10923 (file-name (string-append name "-" version ".tar.gz"))
10926 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10927 (build-system python-build-system)
10929 `(#:tests? #f ; Tests require many optional packages
10931 (modify-phases %standard-phases
10932 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10933 (lambda* (#:key inputs #:allow-other-keys)
10934 (setenv "KIVY_SDL2_PATH"
10935 (string-append (assoc-ref inputs "sdl-union")
10940 ("pkg-config" ,pkg-config)
10941 ("python-cython" ,python-cython)))
10943 `(("gstreamer" ,gstreamer)
10946 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10947 (home-page "http://kivy.org")
10949 "Multitouch application framework")
10951 "A software library for rapid development of
10952 hardware-accelerated multitouch applications.")
10953 (license license:expat)))
10955 (define-public python2-kivy
10956 (package-with-python2 python-kivy))
10958 (define-public python-kivy-next
10959 (deprecated-package "python-kivy-next" python-kivy))
10961 (define-public python2-kivy-next
10962 (deprecated-package "python2-kivy-next" python2-kivy))
10964 (define-public python-binaryornot
10966 (name "python-binaryornot")
10970 (uri (pypi-uri "binaryornot" version))
10973 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10974 (build-system python-build-system)
10976 `(("python-chardet" ,python-chardet)
10977 ("python-hypothesis" ,python-hypothesis)))
10978 (home-page "https://github.com/audreyr/binaryornot")
10979 (synopsis "Package to check if a file is binary or text")
10980 (description "Ultra-lightweight pure Python package to check if a file is
10982 (license license:bsd-3)
10983 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10985 (define-public python2-binaryornot
10986 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10987 (package (inherit base)
10989 `(("python2-enum34" ,python2-enum34)
10990 ,@(package-propagated-inputs base))))))
10992 (define-public python-binwalk
10993 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
10996 (name "python-binwalk")
10997 (version (git-version "2.1.1" revision commit))
11001 (uri (git-reference
11002 (url "https://github.com/ReFirmLabs/binwalk")
11004 (file-name (git-file-name name version))
11007 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11008 (build-system python-build-system)
11011 (modify-phases %standard-phases
11012 (add-before 'check 'set-pythonpath
11014 (setenv "PYTHONPATH"
11017 ":" (getenv "PYTHONPATH")))
11021 `(("python-coverage" ,python-coverage)
11022 ("python-nose" ,python-nose)))
11023 (home-page "https://github.com/ReFirmLabs/binwalk")
11024 (synopsis "Firmware analysis tool")
11025 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11026 (license license:expat))))
11028 (define-public python-nltk
11030 (name "python-nltk")
11034 (uri (pypi-uri "nltk" version))
11037 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11038 (build-system python-build-system)
11040 '(;; The tests require some extra resources to be downloaded.
11041 ;; TODO Try packaging these resources.
11043 (home-page "http://nltk.org/")
11044 (synopsis "Natural Language Toolkit")
11045 (description "It provides interfaces to over 50 corpora and lexical
11046 resources such as WordNet, along with a suite of text processing libraries
11047 for classification, tokenization, stemming, tagging, parsing, and semantic
11048 reasoning, wrappers for natural language processing libraries.")
11049 (license license:asl2.0)))
11051 (define-public python2-nltk
11052 (package-with-python2 python-nltk))
11054 (define-public python-pymongo
11056 (name "python-pymongo")
11060 (uri (pypi-uri "pymongo" version))
11063 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11064 (build-system python-build-system)
11066 `(("python-certifi" ,python-certifi)))
11067 (home-page "https://github.com/mongodb/mongo-python-driver")
11068 (synopsis "Python driver for MongoDB")
11069 (description "Python driver for MongoDB.")
11070 (license license:asl2.0)))
11072 (define-public python2-pymongo
11073 (package-with-python2 python-pymongo))
11075 (define-public python-consul
11077 (name "python-consul")
11082 (uri (pypi-uri "python-consul" version))
11085 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11086 (build-system python-build-system)
11088 '(#:tests? #f)) ; The tests are not distributed
11090 `(("python-requests" ,python-requests)
11091 ("python-six" ,python-six)))
11092 (home-page "https://github.com/cablehead/python-consul")
11093 (synopsis "Python client for Consul")
11095 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11096 discovery, monitoring and configuration.")
11097 (license license:expat)))
11099 (define-public python2-consul
11100 (package-with-python2 python-consul))
11102 (define-public python-schematics
11104 (name "python-schematics")
11109 (uri (git-reference
11110 (url "https://github.com/schematics/schematics.git")
11111 (commit (string-append "v" version))))
11112 (file-name (git-file-name name version))
11114 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11115 (build-system python-build-system)
11117 `(("python-six" ,python-six)))
11119 ;; The tests require a bunch of not very nice packages with fixed
11120 ;; version requirements (e.g. python-coveralls).
11122 (home-page "https://github.com/schematics/schematics")
11123 (synopsis "Python Data Structures for Humans")
11124 (description "Python Data Structures for Humans.")
11125 (license license:bsd-3)))
11127 (define-public python2-schematics
11128 (package-with-python2 python-schematics))
11130 (define-public python-odfpy
11132 (name "python-odfpy")
11136 (uri (pypi-uri "odfpy" version))
11139 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11141 `(#:modules ((srfi srfi-1)
11142 (guix build python-build-system)
11143 (guix build utils))
11145 (modify-phases %standard-phases
11147 ;; The test runner invokes python2 and python3 for test*.py.
11148 ;; To avoid having both in inputs, we replicate it here.
11150 (for-each (lambda (test-file) (invoke "python" test-file))
11151 (find-files "tests" "^test.*\\.py$"))
11153 (build-system python-build-system)
11154 (home-page "https://github.com/eea/odfpy")
11155 (synopsis "Python API and tools to manipulate OpenDocument files")
11156 (description "Collection of libraries and utility programs written in
11157 Python to manipulate OpenDocument 1.2 files.")
11159 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11160 ;; number of files with other licenses.
11161 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11163 (define-public python2-odfpy
11164 (package-with-python2 python-odfpy))
11166 (define-public python-natsort
11168 (name "python-natsort")
11172 (uri (pypi-uri "natsort" version))
11175 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11176 (build-system python-build-system)
11178 `(#:modules ((guix build utils)
11179 (guix build python-build-system)
11184 (modify-phases %standard-phases
11185 (add-before 'check 'set-cachedir
11186 ;; Tests require write access to $HOME by default
11187 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11190 (let ((cwd (getcwd)))
11191 (setenv "PYTHONPATH"
11194 (find (cut string-prefix? "lib" <>)
11195 (scandir (string-append cwd "/build")))
11197 (getenv "PYTHONPATH")))
11198 (invoke "pytest" "-v")))))))
11200 `(("python-hypothesis" ,python-hypothesis)
11201 ("python-pytest-cov" ,python-pytest-cov)
11202 ("python-pytest-mock" ,python-pytest-mock)
11203 ("python-pytest" ,python-pytest)))
11204 (propagated-inputs ; TODO: Add python-fastnumbers.
11205 `(("python-pyicu" ,python-pyicu)))
11206 (home-page "https://github.com/SethMMorton/natsort")
11207 (synopsis "Natural sorting for python and shell")
11209 "Natsort lets you apply natural sorting on lists instead of
11210 lexicographical. If you use the built-in @code{sorted} method in python
11211 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11212 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11213 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11214 identifies numbers and sorts them separately from strings. It can also sort
11215 version numbers, real numbers, mixed types and more, and comes with a shell
11216 command @command{natsort} that exposes this functionality in the command line.")
11217 (license license:expat)
11218 (properties `((python2-variant . ,(delay python2-natsort))))))
11220 (define-public python2-natsort
11221 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11222 (package (inherit base)
11224 `(("python2-pathlib" ,python2-pathlib)
11225 ,@(package-native-inputs base))))))
11227 (define-public python-glances
11229 (name "python-glances")
11234 (uri (pypi-uri "Glances" version))
11237 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11238 (modules '((guix build utils)))
11241 ;; Glances phones PyPI for weekly update checks by default.
11242 ;; Disable these. The user can re-enable them if desired.
11243 (substitute* "glances/outdated.py"
11244 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11245 (string-append indentation
11246 "self.args.disable_check_update = True\n"
11249 (build-system python-build-system)
11251 `(("python-future" ,python-future)
11252 ("python-psutil" ,python-psutil)))
11254 "https://github.com/nicolargo/glances")
11255 (synopsis "Cross-platform curses-based monitoring tool")
11257 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11258 Glances uses the PsUtil library to get information from your system. It
11259 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11260 (license license:lgpl3+)))
11262 (define-public python2-glances
11263 (package-with-python2 python-glances))
11265 (define-public python-graphql-core
11267 (name "python-graphql-core")
11272 (uri (pypi-uri "graphql-core" version))
11275 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11276 (build-system python-build-system)
11278 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11280 (modify-phases %standard-phases
11281 (add-after 'unpack 'patch-hardcoded-version
11282 (lambda _ (substitute*
11284 (("'gevent==1.1rc1'") "'gevent'"))
11287 `(("python-gevent" ,python-gevent)
11288 ("python-mock" ,python-mock)
11289 ("python-pytest-mock" ,python-pytest-mock)))
11291 `(("python-promise" ,python-promise)
11292 ("python-six" ,python-six)))
11293 (home-page "https://github.com/graphql-python/graphql-core")
11294 (synopsis "GraphQL implementation for Python")
11296 "GraphQL implementation for Python. GraphQL is a data query language and
11297 runtime designed and used to request and deliver data to mobile and web apps.
11298 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11300 (license license:expat)))
11302 (define-public python2-graphql-core
11303 (package-with-python2 python-graphql-core))
11305 (define-public python-graphql-relay
11307 (name "python-graphql-relay")
11312 (uri (pypi-uri "graphql-relay" version))
11315 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11316 (build-system python-build-system)
11318 '(#:tests? #f)) ; The tests are not distributed
11320 `(("python-graphql-core" ,python-graphql-core)
11321 ("python-promise" ,python-promise)
11322 ("python-six" ,python-six)))
11323 (home-page "https://github.com/graphql-python/graphql-relay-py")
11324 (synopsis "Relay implementation for Python")
11326 "This is a library to allow the easy creation of Relay-compliant servers
11327 using the GraphQL Python reference implementation of a GraphQL server. It
11328 should be noted that the code is a exact port of the original
11329 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11331 (license license:expat)))
11333 (define-public python2-graphql-relay
11334 (package-with-python2 python-graphql-relay))
11336 (define-public python-graphene
11338 (name "python-graphene")
11343 (uri (pypi-uri "graphene" version))
11346 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11347 (build-system python-build-system)
11349 `(("python-graphql-core" ,python-graphql-core)
11350 ("python-graphql-relay" ,python-graphql-relay)
11351 ("python-iso8601" ,python-iso8601)
11352 ("python-promise" ,python-promise)
11353 ("python-six" ,python-six)))
11355 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11356 (home-page "http://graphene-python.org/")
11357 (synopsis "GraphQL Framework for Python")
11359 "Graphene is a Python library for building GraphQL schemas/types.
11360 A GraphQL schema describes your data model, and provides a GraphQL server
11361 with an associated set of resolve methods that know how to fetch data.")
11362 (properties `((python2-variant . ,(delay python2-graphene))))
11363 (license license:expat)))
11365 (define-public python2-graphene
11366 (let ((base (package-with-python2
11367 (strip-python2-variant python-graphene))))
11368 (package (inherit base)
11370 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11371 ,@(package-native-inputs base))))))
11373 (define-public python-nautilus
11375 (name "python-nautilus")
11380 (uri (pypi-uri "nautilus" version))
11383 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11384 (build-system python-build-system)
11385 (arguments `(#:tests? #f)) ; fails to import test modules
11387 `(("python-bcrypt" ,python-bcrypt)
11388 ("python-click" ,python-click)
11389 ("python-consul" ,python-consul)
11390 ("python-graphene" ,python-graphene)
11391 ("python-jinja2" ,python-jinja2)
11392 ("python-peewee" ,python-peewee)
11393 ("python-pika" ,python-pika)
11394 ("python-tornado" ,python-tornado)
11395 ("python-wtforms" ,python-wtforms)))
11397 `(("python-nose2" ,python-nose2)))
11398 (home-page "https://github.com/AlecAivazis/nautilus")
11399 (synopsis "Library for creating microservice applications")
11401 "Nautilus is a framework for flux based microservices that looks to
11402 provide extendible implementations of common aspects of a cloud so that you can
11403 focus on building massively scalable web applications.")
11404 (license license:expat)))
11406 (define-public python-snowballstemmer
11408 (name "python-snowballstemmer")
11412 (uri (pypi-uri "snowballstemmer" version))
11415 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11416 (build-system python-build-system)
11418 `(;; No tests exist
11420 (home-page "https://github.com/shibukawa/snowball_py")
11421 (synopsis "Snowball stemming library collection for Python")
11422 (description "This package provides 16 word stemmer algorithms generated
11423 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11425 (license license:bsd-3)))
11427 (define-public python2-snowballstemmer
11428 (package-with-python2 python-snowballstemmer))
11430 (define-public python-setproctitle
11432 (name "python-setproctitle")
11437 (uri (pypi-uri "setproctitle" version))
11440 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11441 (build-system python-build-system)
11444 (modify-phases %standard-phases
11445 (add-before 'check 'patch-Makefile
11446 ;; Stricly this is only required for the python2 variant.
11447 ;; But adding a phase in an inherited package seems to be
11448 ;; cumbersum. So we patch even for python3.
11450 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11452 (substitute* "Makefile"
11453 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11454 (string-append nose "/bin/nosetests "))))
11458 (setenv "PYTHON" (or (which "python3") (which "python")))
11459 (setenv "PYCONFIG" (or (which "python3-config")
11460 (which "python-config")))
11461 (setenv "CC" "gcc")
11462 ;; No need to extend PYTHONPATH to find the built package, since
11463 ;; the Makefile will build anyway
11464 (invoke "make" "check"))))))
11466 `(("procps" ,procps))) ; required for tests
11468 "https://github.com/dvarrazzo/py-setproctitle")
11470 "Setproctitle implementation for Python to customize the process title")
11471 (description "The library allows a process to change its title (as displayed
11472 by system tools such as ps and top).
11474 Changing the title is mostly useful in multi-process systems, for
11475 example when a master process is forked: changing the children's title
11476 allows to identify the task each process is busy with. The technique
11477 is used by PostgreSQL and the OpenSSH Server for example.")
11478 (license license:bsd-3)
11479 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11481 (define-public python2-setproctitle
11482 (let ((base (package-with-python2
11483 (strip-python2-variant python-setproctitle))))
11486 (native-inputs `(("python2-nose" ,python2-nose)
11487 ,@(package-native-inputs base))))))
11489 (define-public python-validictory
11491 (name "python-validictory")
11496 (uri (pypi-uri "validictory" version))
11499 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11500 (build-system python-build-system)
11503 (modify-phases %standard-phases
11504 (add-after 'unpack 'bootstrap
11505 ;; Move the tests out of the package directory to avoid
11508 (rename-file "validictory/tests" "tests")
11509 (delete-file "tests/__init__.py")))
11512 ;; Extend PYTHONPATH so the built package will be found.
11513 (setenv "PYTHONPATH"
11514 (string-append (getcwd) "/build/lib:"
11515 (getenv "PYTHONPATH")))
11516 (invoke "py.test" "-vv" ))))))
11518 `(("python-pytest" ,python-pytest)))
11520 "https://github.com/jamesturk/validictory")
11521 (synopsis "General purpose Python data validator")
11522 (description "It allows validation of arbitrary Python data structures.
11524 The schema format is based on the JSON Schema
11525 proposal (http://json-schema.org), so combined with json the library is also
11526 useful as a validator for JSON data.")
11527 (license license:expat)))
11529 (define-public python2-validictory
11530 (package-with-python2 python-validictory))
11532 (define-public python-pyelftools
11534 (name "python-pyelftools")
11539 (uri (pypi-uri "pyelftools" version))
11542 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11543 (build-system python-build-system)
11546 (modify-phases %standard-phases
11547 (add-before 'check 'set-pythonpath
11549 (setenv "PYTHONPATH"
11552 ":" (getenv "PYTHONPATH")))
11555 "https://github.com/eliben/pyelftools")
11557 "Analyze binary and library file information")
11558 (description "This Python library provides interfaces for parsing and
11559 analyzing two binary and library file formats; the Executable and Linking
11560 Format (ELF), and debugging information in the Debugging With Attributed
11561 Record Format (DWARF).")
11562 (license license:public-domain)))
11564 (define-public python-pyev
11566 (name "python-pyev")
11571 (uri (pypi-uri "pyev" version))
11574 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11575 (build-system python-build-system)
11577 `(#:tests? #f ; no test suite
11579 (modify-phases %standard-phases
11580 (add-after 'unpack 'patch
11581 (lambda* (#:key inputs #:allow-other-keys)
11582 (let ((libev (string-append (assoc-ref inputs "libev")
11583 "/lib/libev.so.4")))
11584 (substitute* "setup.py"
11585 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11586 (string-append "libev_dll_name = \"" libev "\"")))))))))
11588 `(("libev" ,libev)))
11589 (home-page "http://pythonhosted.org/pyev/")
11590 (synopsis "Python libev interface")
11591 (description "Pyev provides a Python interface to libev.")
11592 (license license:gpl3)))
11594 (define-public python2-pyev
11595 (package-with-python2 python-pyev))
11597 (define-public python-imagesize
11599 (name "python-imagesize")
11604 (uri (pypi-uri "imagesize" version))
11607 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11608 (build-system python-build-system)
11609 (home-page "https://github.com/shibukawa/imagesize_py")
11610 (synopsis "Gets image size of files in various formats in Python")
11612 "This package allows determination of image size from
11613 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11614 (license license:expat)))
11616 (define-public python2-imagesize
11617 (package-with-python2 python-imagesize))
11619 (define-public python-termstyle
11621 (name "python-termstyle")
11626 (uri (pypi-uri "termstyle" version))
11629 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11630 (build-system python-build-system)
11633 (modify-phases %standard-phases
11636 (invoke "python" "test3.py"))))))
11637 (home-page "https://github.com/gfxmonk/termstyle")
11638 (synopsis "Console text coloring for Python")
11639 (description "This package provides console text coloring for Python.")
11640 (license license:bsd-3)))
11642 (define-public python-argcomplete
11644 (name "python-argcomplete")
11649 (uri (pypi-uri "argcomplete" version))
11652 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11653 (build-system python-build-system)
11655 `(("python-pexpect" ,python-pexpect)
11657 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11658 (home-page "https://github.com/kislyuk/argcomplete")
11659 (synopsis "Shell tab completion for Python argparse")
11660 (description "argcomplete provides extensible command line tab completion
11661 of arguments and options for Python scripts using @code{argparse}. It's
11662 particularly useful for programs with many options or sub-parsers that can
11663 dynamically suggest completions; for example, when browsing resources over the
11665 (license license:asl2.0)))
11667 (define-public python2-argcomplete
11668 (package-with-python2 python-argcomplete))
11670 (define-public python-xopen
11672 (name "python-xopen")
11677 (uri (pypi-uri "xopen" version))
11680 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11681 (build-system python-build-system)
11683 `(("python-setuptools-scm" ,python-setuptools-scm)))
11684 (home-page "https://github.com/marcelm/xopen/")
11685 (synopsis "Open compressed files transparently")
11686 (description "This module provides an @code{xopen} function that works like
11687 Python's built-in @code{open} function, but can also deal with compressed files.
11688 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11689 recognized by their file extensions. The focus is on being as efficient as
11690 possible on all supported Python versions.")
11691 (license license:expat)))
11693 (define-public python2-xopen
11694 (let ((base (package-with-python2
11695 (strip-python2-variant python-xopen))))
11698 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11699 ,@(package-propagated-inputs base))))))
11701 (define-public python-cheetah
11703 (name "python-cheetah")
11708 (uri (pypi-uri "Cheetah3" version))
11711 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11712 (build-system python-build-system)
11714 `(#:modules ((guix build utils)
11715 (guix build python-build-system)
11719 #:phases (modify-phases %standard-phases
11720 (add-after 'unpack 'use-absolute-python
11722 (substitute* "Cheetah/CheetahWrapper.py"
11723 (("#!/usr/bin/env python")
11724 (string-append "#!" (which "python"))))
11728 (let ((cwd (getcwd)))
11729 (setenv "PYTHONPATH"
11732 (find (cut string-prefix? "lib" <>)
11733 (scandir (string-append cwd "/build")))
11734 ":" (getenv "PYTHONPATH")))
11736 (string-append (getenv "PATH")
11738 (setenv "TMPDIR" "/tmp")
11740 (substitute* "Cheetah/Tests/Test.py"
11741 (("unittest.TextTestRunner\\(\\)")
11742 "unittest.TextTestRunner(verbosity=2)"))
11744 (invoke "python" "Cheetah/Tests/Test.py")))))))
11746 `(("python-markdown" ,python-markdown))) ;optional
11747 (home-page "http://cheetahtemplate.org/")
11748 (synopsis "Template engine")
11749 (description "Cheetah is a text-based template engine and Python code
11752 Cheetah can be used as a standalone templating utility or referenced as
11753 a library from other Python applications. It has many potential uses,
11754 but web developers looking for a viable alternative to ASP, JSP, PHP and
11755 PSP are expected to be its principle user group.
11759 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11761 @item Cleanly separates content, graphic design, and program code.
11762 @item Blends the power and flexibility of Python with a simple template language
11763 that non-programmers can understand.
11764 @item Gives template writers full access to any Python data structure, module,
11765 function, object, or method in their templates.
11766 @item Makes code reuse easy by providing an object-orientated interface to
11767 templates that is accessible from Python code or other Cheetah templates.
11768 One template can subclass another and selectively reimplement sections of it.
11769 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11770 improve the performance of a dynamic website.
11771 @item Compiles templates into optimized, yet readable, Python code.
11773 (license (license:x11-style "file://LICENSE"))))
11775 (define-public python2-cheetah
11776 (package-with-python2 python-cheetah))
11778 (define-public python-dulwich
11780 (name "python-dulwich")
11785 (uri (list (string-append "https://www.dulwich.io/releases/"
11786 "dulwich-" version ".tar.gz")
11787 (pypi-uri "dulwich" version)))
11790 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11791 (build-system python-build-system)
11794 (modify-phases %standard-phases
11795 (add-before 'check 'fix-tests
11796 (lambda* (#:key inputs #:allow-other-keys)
11797 ;; The tests use Popen with a custom environment which doesn't
11799 (substitute* "dulwich/tests/compat/utils.py"
11800 (("'git'") (string-append "'"
11803 (substitute* '("dulwich/tests/test_repository.py"
11804 "dulwich/tests/test_hooks.py")
11805 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11806 (setenv "TEST_RUNNER" "unittest")
11807 (setenv "PYTHONHASHSEED" "random")
11810 `(("python-fastimport" ,python-fastimport)))
11812 `(("python-mock" ,python-mock)
11813 ("python-geventhttpclient" ,python-geventhttpclient)
11815 (home-page "https://www.dulwich.io/")
11816 (synopsis "Git implementation in Python")
11817 (description "Dulwich is an implementation of the Git file formats and
11818 protocols written in pure Python.")
11819 ;; Can be used with either license.
11820 (license (list license:asl2.0 license:gpl2+))))
11822 (define-public python2-dulwich
11823 (package-with-python2 python-dulwich))
11825 (define-public python-pbkdf2
11827 (name "python-pbkdf2")
11832 (uri (pypi-uri "pbkdf2" version))
11835 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11836 (build-system python-build-system)
11839 (modify-phases %standard-phases
11842 (setenv "PYTHONPATH"
11843 (string-append (getcwd) "/build/lib:"
11844 (getenv "PYTHONPATH")))
11845 (invoke "python" "test/test_pbkdf2.py"))))))
11847 `(("python-pycrypto" ,python-pycrypto))) ; optional
11848 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11849 (synopsis "Password-based key derivation")
11850 (description "This module implements the password-based key derivation
11851 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11853 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11854 is part of the RSA Public Key Cryptography Standards series. The provided
11855 implementation takes a password or a passphrase and a salt value (and
11856 optionally a iteration count, a digest module, and a MAC module) and provides
11857 a file-like object from which an arbitrarly-sized key can be read.")
11858 (license license:expat)))
11860 (define-public python2-pbkdf2
11861 (package-with-python2 python-pbkdf2))
11863 (define-public python-qrcode
11865 (name "python-qrcode")
11870 (uri (pypi-uri "qrcode" version))
11872 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11873 (build-system python-build-system)
11875 ;; FIXME: Tests require packaging 'pymaging'.
11878 `(("python-lxml" ,python-lxml) ; for SVG output
11879 ("python-pillow" ,python-pillow) ; for PNG output
11880 ("python-six" ,python-six)))
11881 (home-page "https://github.com/lincolnloop/python-qrcode")
11882 (synopsis "QR Code image generator")
11883 (description "This package provides a pure Python QR Code generator
11884 module. It uses the Python Imaging Library (PIL) to allow for the generation
11887 In addition this package provides a command line tool to generate QR codes and
11888 either write these QR codes to a file or do the output as ascii art at the
11890 (license license:bsd-3)))
11892 (define-public python2-qrcode
11893 (package-with-python2 python-qrcode))
11895 (define-public python-rst2ansi
11897 (name "python-rst2ansi")
11902 (uri (pypi-uri "rst2ansi" version))
11905 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11906 (build-system python-build-system)
11908 `(("python-docutils" ,python-docutils)))
11909 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11910 (synopsis "Convert RST to ANSI-decorated console output")
11912 "Python module dedicated to rendering RST (reStructuredText) documents
11913 to ansi-escaped strings suitable for display in a terminal.")
11914 (license license:expat)))
11916 (define-public python-ansi2html
11918 (name "python-ansi2html")
11923 (uri (pypi-uri "ansi2html" version))
11926 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11927 (build-system python-build-system)
11929 `(("python-mock" ,python-mock)
11930 ("python-nose" ,python-nose)))
11932 `(("python-six" ,python-six)))
11933 (home-page "https://github.com/ralphbean/ansi2html")
11934 (synopsis "Convert ANSI-decorated console output to HTML")
11936 "@command{ansi2html} is a Python library and command line utility for
11937 convering text with ANSI color codes to HTML or LaTeX.")
11938 (license license:gpl3+)))
11940 (define-public python2-ansi2html
11941 (package-with-python2 python-ansi2html))
11943 (define-public python-ddt
11945 (name "python-ddt")
11950 (uri (pypi-uri "ddt" version))
11953 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11954 (build-system python-build-system)
11956 `(("python-mock" ,python-mock)
11957 ("python-nose" ,python-nose)))
11959 `(("python-six" ,python-six)
11960 ("python-pyyaml" ,python-pyyaml)))
11961 (home-page "https://github.com/txels/ddt")
11962 (synopsis "Data-Driven Tests")
11964 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11965 running it with different test data, and make it appear as multiple test
11967 (license license:expat)))
11969 (define-public python2-ddt
11970 (package-with-python2 python-ddt))
11972 (define-public python-pycountry
11974 (name "python-pycountry")
11975 (version "18.5.26")
11979 (uri (pypi-uri "pycountry" version))
11982 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11983 (build-system python-build-system)
11984 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11985 (synopsis "ISO databases for languages, countries, currencies, etc.")
11987 "@code{pycountry} provides the ISO databases for the standards:
11989 @item 639-3 (Languages)
11990 @item 3166 (Countries)
11991 @item 3166-3 (Deleted Countries)
11992 @item 3166-2 (Subdivisions of countries)
11993 @item 4217 (Currencies)
11994 @item 15924 (Scripts)
11996 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11997 through a Python API.")
11998 (license license:lgpl2.1+)))
12000 (define-public python2-pycountry
12001 (package-with-python2 python-pycountry))
12003 (define-public python-pycosat
12005 (name "python-pycosat")
12010 (uri (pypi-uri "pycosat" version))
12013 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12014 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12015 (build-system python-build-system)
12016 (home-page "https://github.com/ContinuumIO/pycosat")
12017 (synopsis "Bindings to picosat (a SAT solver)")
12019 "This package provides efficient Python bindings to @code{picosat} on
12020 the C level. When importing pycosat, the @code{picosat} solver becomes part
12021 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12022 Problem} (SAT) solver.")
12023 (license license:expat)))
12025 (define-public python2-pycosat
12026 (package-with-python2 python-pycosat))
12028 (define-public python2-ruamel.ordereddict
12030 (name "python2-ruamel.ordereddict")
12035 (uri (pypi-uri "ruamel.ordereddict" version))
12038 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12039 (build-system python-build-system)
12041 `(#:python ,python-2
12043 (modify-phases %standard-phases
12045 (add-after 'install 'check
12046 (lambda* (#:key inputs outputs #:allow-other-keys)
12047 (add-installed-pythonpath inputs outputs)
12048 (invoke "python" "test/testordereddict.py"))))))
12049 (home-page "https://bitbucket.org/ruamel/ordereddict")
12050 (synopsis "Version of dict that keeps keys in insertion order")
12052 "This is an implementation of an ordered dictionary with @dfn{Key
12053 Insertion Order} (KIO: updates of values do not affect the position of the
12054 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12055 removed and put at the back). The standard library module @code{OrderedDict},
12056 implemented later, implements a subset of @code{ordereddict} functionality.
12057 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12058 Order} (KSO, no sorting function can be specified, but a transform can be
12059 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12060 (license license:expat)))
12062 (define-public python-pypeg2
12064 (name "python-pypeg2")
12069 (uri (pypi-uri "pyPEG2" version))
12072 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12073 (build-system python-build-system)
12074 (propagated-inputs `(("python-lxml" ,python-lxml)))
12076 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12078 (home-page "https://fdik.org/pyPEG/")
12079 (synopsis "Parsering Expression Grammars in Python")
12080 (description "PyPEG is an intrinsic parser interpreter framework for
12081 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12082 parse many formal languages.")
12083 (license license:gpl2)))
12085 (define-public python-incremental
12087 (name "python-incremental")
12092 (uri (pypi-uri "incremental" version))
12095 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12096 (build-system python-build-system)
12097 (home-page "https://github.com/hawkowl/incremental")
12098 (synopsis "Library for versioning Python projects")
12099 (description "Incremental is a small library that versions your Python
12101 (license license:expat)))
12103 (define-public python2-incremental
12104 (package-with-python2 python-incremental))
12106 (define-public python-invoke
12108 (name "python-invoke")
12109 (home-page "http://www.pyinvoke.org/")
12113 (uri (pypi-uri "invoke" version))
12116 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12117 (build-system python-build-system)
12119 ;; XXX: Requires many dependencies that are not yet in Guix.
12121 (synopsis "Pythonic task execution")
12123 "Invoke is a Python task execution tool and library, drawing inspiration
12124 from various sources to arrive at a powerful and clean feature set. It is
12125 evolved from the Fabric project, but focuses on local and abstract concerns
12126 instead of servers and network commands.")
12127 (license license:bsd-3)))
12129 (define-public python2-invoke
12130 (package-with-python2 python-invoke))
12132 (define-public python-automat
12134 (name "python-automat")
12138 (uri (pypi-uri "Automat" version))
12141 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12142 (build-system python-build-system)
12143 ;; We disable the tests because they require python-twisted, while
12144 ;; python-twisted depends on python-automat. Twisted is optional, but the
12145 ;; tests fail if it is not available. Also see
12146 ;; <https://github.com/glyph/automat/issues/71>.
12147 (arguments '(#:tests? #f))
12149 `(("python-m2r" ,python-m2r)
12150 ("python-setuptools-scm" ,python-setuptools-scm)
12151 ("python-graphviz" ,python-graphviz)))
12153 `(("python-six" ,python-six)
12154 ("python-attrs" ,python-attrs)))
12155 (home-page "https://github.com/glyph/Automat")
12156 (synopsis "Self-service finite-state machines")
12157 (description "Automat is a library for concise, idiomatic Python
12158 expression of finite-state automata (particularly deterministic finite-state
12160 (license license:expat)))
12162 (define-public python2-automat
12163 (package-with-python2 python-automat))
12165 (define-public python-m2r
12167 (name "python-m2r")
12171 (uri (pypi-uri "m2r" version))
12174 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12175 (build-system python-build-system)
12177 `(("python-docutils" ,python-docutils)
12178 ("python-mistune" ,python-mistune)))
12180 `(("python-pygments" ,python-pygments)
12181 ("python-mock" ,python-mock)))
12182 (home-page "https://github.com/miyakogi/m2r")
12183 (synopsis "Markdown to reStructuredText converter")
12184 (description "M2R converts a markdown file including reST markups to valid
12186 (license license:expat)))
12188 (define-public python2-m2r
12189 (package-with-python2 python-m2r))
12191 (define-public python-constantly
12193 (name "python-constantly")
12197 (uri (pypi-uri "constantly" version))
12200 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12201 (build-system python-build-system)
12202 (home-page "https://github.com/twisted/constantly")
12203 (synopsis "Symbolic constants in Python")
12204 (description "Constantly is a Python library that provides symbolic
12205 constant support. It includes collections and constants with text, numeric,
12206 and bit flag values.")
12207 (license license:expat)))
12209 (define-public python2-constantly
12210 (package-with-python2 python-constantly))
12212 (define-public python-attrs
12214 (name "python-attrs")
12218 (uri (pypi-uri "attrs" version))
12221 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12222 (build-system python-build-system)
12224 `(#:modules ((guix build utils)
12225 (guix build python-build-system)
12229 #:phases (modify-phases %standard-phases
12232 (let ((cwd (getcwd)))
12233 (setenv "PYTHONPATH"
12236 (find (cut string-prefix? "lib" <>)
12237 (scandir (string-append cwd "/build")))
12239 (getenv "PYTHONPATH")))
12240 (invoke "python" "-m" "pytest")))))))
12242 `(("python-coverage" ,python-coverage)
12243 ("python-hypothesis" ,python-hypothesis)
12244 ("python-pympler" ,python-pympler)
12245 ("python-pytest" ,python-pytest)
12246 ("python-six" ,python-six)
12247 ("python-sphinx" ,python-sphinx)
12248 ("python-zope-interface" ,python-zope-interface)))
12249 (home-page "https://github.com/python-attrs/attrs/")
12250 (synopsis "Attributes without boilerplate")
12251 (description "@code{attrs} is a Python package with class decorators that
12252 ease the chores of implementing the most common attribute-related object
12254 (license license:expat)))
12256 (define-public python2-attrs
12257 (package-with-python2 python-attrs))
12259 (define-public python-attrs-bootstrap
12261 (inherit python-attrs)
12262 (name "python-attrs-bootstrap")
12263 (native-inputs `())
12264 (arguments `(#:tests? #f))))
12266 (define-public python2-attrs-bootstrap
12267 (package-with-python2 python-attrs-bootstrap))
12269 (define-public python2-cliapp
12271 (name "python2-cliapp")
12272 (version "1.20180812.1")
12276 (uri (string-append
12277 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12278 version ".tar.gz"))
12281 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12282 (build-system python-build-system)
12284 `(#:python ,python-2
12286 (modify-phases %standard-phases
12287 ;; check phase needs to be run before the build phase. If not,
12288 ;; coverage-test-runner looks for tests for the built source files,
12291 (add-before 'build 'check
12293 ;; Disable python3 tests
12294 (substitute* "check"
12295 (("python3") "# python3"))
12296 (invoke "./check"))))))
12298 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12299 ("python2-pep8" ,python2-pep8)))
12301 `(("python2-pyaml" ,python2-pyaml)))
12302 (home-page "https://liw.fi/cliapp/")
12303 (synopsis "Python framework for command line programs")
12304 (description "@code{python2-cliapp} is a python framework for
12305 command line programs. It contains the typical stuff such programs
12306 need to do, such as parsing the command line for options, and
12307 iterating over input files.")
12308 (license license:gpl2+)))
12310 (define-public python2-ttystatus
12312 (name "python2-ttystatus")
12317 (uri (string-append
12318 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12319 version ".tar.gz"))
12322 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12323 (build-system python-build-system)
12325 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12326 ("python2-pep8" ,python2-pep8)))
12328 `(#:python ,python-2
12330 (modify-phases %standard-phases
12331 ;; check phase needs to be run before the build phase. If not,
12332 ;; coverage-test-runner looks for tests for the built source files,
12335 (add-before 'build 'check
12336 (lambda _ (invoke "make" "check"))))))
12337 (home-page "https://liw.fi/ttystatus/")
12338 (synopsis "Python library for showing progress reporting and
12339 status updates on terminals")
12340 (description "@code{python2-ttystatus} is a python library for
12341 showing progress reporting and status updates on terminals, for
12342 command line programs. Output is automatically adapted to the width
12343 of the terminal: truncated if it does not fit, and resized if the
12344 terminal size changes.")
12345 (license license:gpl3+)))
12347 (define-public python2-tracing
12349 (name "python2-tracing")
12354 (uri (string-append
12355 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12356 version ".tar.gz"))
12359 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12360 (build-system python-build-system)
12362 `(#:python ,python-2))
12363 (home-page "https://liw.fi/tracing/")
12364 (synopsis "Python debug logging helper")
12365 (description "@code{python2-tracing} is a python library for
12366 logging debug messages. It provides a way to turn debugging messages
12367 on and off, based on the filename they occur in. It is much faster
12368 than using @code{logging.Filter} to accomplish the same thing, which
12369 matters when code is run in production mode. The actual logging still
12370 happens using the @code{logging} library.")
12371 (license license:gpl3+)))
12373 (define-public python2-larch
12375 (name "python2-larch")
12376 (version "1.20151025")
12380 (uri (string-append
12381 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12382 version ".tar.gz"))
12383 (patches (search-patches
12384 "python2-larch-coverage-4.0a6-compatibility.patch"))
12387 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12388 (build-system python-build-system)
12390 `(#:python ,python-2
12392 (modify-phases %standard-phases
12393 ;; check phase needs to be run before the build phase. If not,
12394 ;; coverage-test-runner looks for tests for the built source files,
12397 (add-before 'build 'check
12398 (lambda _ (invoke "make" "check"))))))
12400 `(("cmdtest" ,cmdtest)
12401 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12403 `(("python2-tracing" ,python2-tracing)))
12404 (home-page "https://liw.fi/larch/")
12405 (synopsis "Python copy-on-write B-tree library")
12406 (description "@code{python2-larch} is an implementation of
12407 particular kind of B-tree, based on research by Ohad Rodeh. See
12408 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12409 on the data structure.
12411 The distinctive feature of this B-tree is that a node is never
12412 (conceptually) modified. Instead, all updates are done by
12413 copy-on-write. This makes it easy to clone a tree, and modify only the
12414 clone, while other processes access the original tree.")
12415 (license license:gpl3+)))
12417 (define-public python-astroid
12419 (name "python-astroid")
12424 (uri (pypi-uri "astroid" version))
12427 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12428 (build-system python-build-system)
12430 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12431 ("python-six" ,python-six)
12432 ("python-wrapt" ,python-wrapt)))
12434 `(("python-dateutil" ,python-dateutil)
12435 ("python-nose" ,python-nose)
12436 ("python-pytest" ,python-pytest)
12437 ("python-pytest-runner" ,python-pytest-runner)))
12440 (modify-phases %standard-phases
12441 (add-after 'unpack 'remove-spurious-test
12443 ;; This can be removed after upgrading from python-3.7
12444 ;; https://github.com/PyCQA/astroid/issues/593
12445 ;; https://bugs.python.org/issue34056
12446 (delete-file "astroid/tests/unittest_modutils.py")
12450 (invoke "pytest" "astroid"))))))
12451 (home-page "https://github.com/PyCQA/astroid")
12452 (synopsis "Common base representation of python source code for pylint and
12454 (description "@code{python-astroid} provides a common base representation
12455 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12457 It provides a compatible representation which comes from the _ast module. It
12458 rebuilds the tree generated by the builtin _ast module by recursively walking
12459 down the AST and building an extended ast. The new node classes have
12460 additional methods and attributes for different usages. They include some
12461 support for static inference and local name scopes. Furthermore, astroid
12462 builds partial trees by inspecting living objects.")
12463 (license license:lgpl2.1+)
12464 (properties `((python2-variant . ,(delay python2-astroid))))))
12466 (define-public python2-astroid
12467 (let ((base (package-with-python2
12468 (strip-python2-variant python-astroid))))
12469 (package (inherit base)
12470 ;; Version 2.x removes python2 support.
12475 (uri (pypi-uri "astroid" version))
12478 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12480 (substitute-keyword-arguments (package-arguments base)
12482 `(modify-phases ,phases
12483 (add-after 'unpack 'remove-spurious-test
12485 ;; https://github.com/PyCQA/astroid/issues/276
12486 (delete-file "astroid/tests/unittest_brain.py")
12490 (invoke"python" "-m" "unittest" "discover"
12491 "-p" "unittest*.py")))))))
12492 (native-inputs `())
12494 `(("python2-backports-functools-lru-cache"
12495 ,python2-backports-functools-lru-cache)
12496 ("python2-enum34" ,python2-enum34)
12497 ("python2-singledispatch" ,python2-singledispatch)
12498 ,@(package-propagated-inputs base))))))
12500 (define-public python-isort
12502 (name "python-isort")
12507 (uri (git-reference
12508 ;; Tests pass only from the Github sources
12509 (url "https://github.com/timothycrosley/isort")
12511 (file-name (git-file-name name version))
12514 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12515 (build-system python-build-system)
12517 `(("python-mock" ,python-mock)
12518 ("python-pytest" ,python-pytest)))
12519 (home-page "https://github.com/timothycrosley/isort")
12520 (synopsis "Python utility/library to sort python imports")
12521 (description "@code{python-isort} is a python utility/library to sort
12522 imports alphabetically, and automatically separated into sections. It
12523 provides a command line utility, a python library and plugins for various
12525 (license license:expat)
12526 (properties `((python2-variant . ,(delay python2-isort))))))
12528 (define-public python2-isort
12529 (let ((base (package-with-python2
12530 (strip-python2-variant python-isort))))
12531 (package (inherit base)
12533 `(("python2-futures" ,python2-futures)
12534 ,@(package-native-inputs base))))))
12536 (define-public python2-backports-functools-lru-cache
12538 (name "python2-backports-functools-lru-cache")
12543 ;; only the pypi tarballs contain the necessary metadata
12544 (uri (pypi-uri "backports.functools_lru_cache" version))
12547 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12548 (build-system python-build-system)
12550 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12552 `(#:python ,python-2))
12553 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12554 (synopsis "Backport of functools.lru_cache from Python 3.3")
12555 (description "@code{python2-backports-functools-lru-cache} is a backport
12556 of @code{functools.lru_cache} from python 3.3.")
12557 (license license:expat)))
12559 (define-public python-configparser
12561 (name "python-configparser")
12566 (uri (pypi-uri "configparser" version))
12569 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12570 (build-system python-build-system)
12571 (home-page "https://github.com/jaraco/configparser/")
12572 (synopsis "Backport of configparser from python 3.5")
12573 (description "@code{python-configparser} is a backport of
12574 @code{configparser} from Python 3.5 so that it can be used directly
12575 in other versions.")
12576 (license license:expat)))
12578 (define-public python2-configparser
12579 (package-with-python2 python-configparser))
12581 (define-public python-mando
12583 (name "python-mando")
12587 (uri (pypi-uri "mando" version))
12590 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12591 (build-system python-build-system)
12593 `(("python-rst2ansi" ,python-rst2ansi)
12594 ("python-six" ,python-six)))
12596 `(("python-pytest" ,python-pytest)))
12597 (home-page "https://mando.readthedocs.org/")
12599 "Wrapper around argparse, allowing creation of complete CLI applications")
12601 "This package is a wrapper around argparse, allowing you to write complete CLI
12602 applications in seconds while maintaining all the flexibility.")
12603 (license license:expat)))
12605 (define-public python2-mando
12606 (package-with-python2 python-mando))
12608 (define-public python2-argparse
12610 (name "python2-argparse")
12615 (uri (pypi-uri "argparse" version))
12618 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12619 (build-system python-build-system)
12621 `(#:python ,python-2))
12622 (home-page "https://github.com/ThomasWaldmann/argparse/")
12623 (synopsis "Python command-line parsing library")
12625 "This package is mostly for people who want to have @code{argparse} on
12626 older Pythons because it was not part of the standard library back then.")
12627 (license license:psfl)))
12629 (define-public python-fudge
12631 (name "python-fudge")
12632 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12633 ;; package, which is currently the only use of this package.
12638 (uri (pypi-uri "fudge" version))
12641 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12642 (build-system python-build-system)
12644 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12645 (home-page "https://github.com/fudge-py/fudge")
12646 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12648 "Fudge is a Python module for using fake objects (mocks and stubs) to
12651 In readable Python code, you declare the methods available on your fake object
12652 and how they should be called. Then you inject that into your application and
12653 start testing. This declarative approach means you don’t have to record and
12654 playback actions and you don’t have to inspect your fakes after running code.
12655 If the fake object was used incorrectly then you’ll see an informative
12656 exception message with a traceback that points to the culprit.")
12657 (license license:expat)))
12659 (define-public python2-fudge
12660 (package-with-python2 python-fudge))
12662 (define-public python-mwclient
12664 (name "python-mwclient")
12669 ;; The PyPI version wouldn't contain tests.
12670 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12671 "v" version ".tar.gz"))
12672 (file-name (string-append name "-" version ".tar.gz"))
12675 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12676 (build-system python-build-system)
12678 `(("python-requests" ,python-requests)
12679 ("python-requests-oauthlib"
12680 ,python-requests-oauthlib)
12681 ("python-six" ,python-six)))
12683 `(("python-mock" ,python-mock)
12684 ("python-pytest" ,python-pytest)
12685 ("python-pytest-pep8" ,python-pytest-pep8)
12686 ("python-pytest-cache" ,python-pytest-cache)
12687 ("python-pytest-cov" ,python-pytest-cov)
12688 ("python-responses" ,python-responses)))
12689 (home-page "https://github.com/btongminh/mwclient")
12690 (synopsis "MediaWiki API client")
12691 (description "This package provides a MediaWiki API client.")
12692 (license license:expat)))
12694 (define-public python2-mwclient
12695 (package-with-python2 python-mwclient))
12697 (define-public python-utils
12699 (name "python-utils")
12703 (uri (pypi-uri "python-utils" version))
12706 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12707 (build-system python-build-system)
12709 `(("pytest-runner" ,python-pytest-runner)
12710 ("pytest" ,python-pytest)
12711 ("six" ,python-six)))
12712 (home-page "https://github.com/WoLpH/python-utils")
12713 (synopsis "Convenient utilities not included with the standard Python install")
12715 "Python Utils is a collection of small Python functions and classes which
12716 make common patterns shorter and easier.")
12717 (license license:bsd-2)))
12719 (define-public python2-utils
12720 (package-with-python2 python-utils))
12722 (define-public python-diff-match-patch
12724 (name "python-diff-match-patch")
12725 (version "20121119")
12729 (uri (pypi-uri "diff-match-patch" version))
12732 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12733 (build-system python-build-system)
12734 (home-page "https://code.google.com/p/google-diff-match-patch")
12735 (synopsis "Synchronize plain text")
12736 (description "Diff Match and Patch libraries offer robust algorithms to
12737 perform the operations required for synchronizing plain text.")
12738 (license license:asl2.0)))
12740 (define-public python2-diff-match-patch
12741 (package-with-python2 python-diff-match-patch))
12743 (define-public python-dirsync
12745 (name "python-dirsync")
12750 (uri (pypi-uri "dirsync" version))
12753 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12754 (build-system python-build-system)
12756 `(("six" ,python-six)))
12757 (home-page "https://bitbucket.org/tkhyn/dirsync")
12758 (synopsis "Advanced directory tree synchronisation tool")
12759 (description "Advanced directory tree synchronisation tool.")
12760 (license license:expat)))
12762 (define-public python2-dirsync
12763 (package-with-python2 python-dirsync))
12765 (define-public python-levenshtein
12767 (name "python-levenshtein")
12772 (uri (pypi-uri "python-Levenshtein" version))
12775 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12776 (build-system python-build-system)
12777 (home-page "https://github.com/ztane/python-Levenshtein")
12778 (synopsis "Fast computation of Levenshtein distance and string similarity")
12780 "The Levenshtein Python C extension module contains functions for fast computation of
12782 @item Levenshtein (edit) distance, and edit operations
12783 @item string similarity
12784 @item approximate median strings, and generally string averaging
12785 @item string sequence and set similarity
12787 It supports both normal and Unicode strings.")
12788 (license license:gpl2+)))
12790 (define-public python2-levenshtein
12791 (package-with-python2 python-levenshtein))
12793 (define-public python-scandir
12795 (name "python-scandir")
12800 (uri (pypi-uri "scandir" version))
12802 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12803 (build-system python-build-system)
12805 `(#:phases (modify-phases %standard-phases
12808 (invoke "python" "test/run_tests.py"))))))
12809 (home-page "https://github.com/benhoyt/scandir")
12810 (synopsis "Directory iteration function")
12812 "Directory iteration function like os.listdir(), except that instead of
12813 returning a list of bare filenames, it yields DirEntry objects that include
12814 file type and stat information along with the name. Using scandir() increases
12815 the speed of os.walk() by 2-20 times (depending on the platform and file
12816 system) by avoiding unnecessary calls to os.stat() in most cases.
12818 This package is part of the Python standard library since version 3.5.")
12819 (license license:bsd-3)))
12821 (define-public python2-scandir
12822 (package-with-python2 python-scandir))
12824 (define-public python2-stemming
12826 (name "python2-stemming")
12831 (uri (pypi-uri "stemming" version))
12833 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12834 (build-system python-build-system)
12836 `(#:python ,python-2))
12837 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12838 (synopsis "Python implementations of various stemming algorithms")
12840 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12841 stemming algorithms for English. These implementations are straightforward and
12842 efficient, unlike some Python versions of the same algorithms available on the
12843 Web. This package is an extraction of the stemming code included in the Whoosh
12845 (license license:public-domain)))
12847 (define-public python-factory-boy
12849 (name "python-factory-boy")
12854 (uri (pypi-uri "factory_boy" version))
12856 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12857 (build-system python-build-system)
12859 ;; Tests are not included in the tarball.
12862 `(("faker" ,python-faker)))
12863 (home-page "https://github.com/benhoyt/scandir")
12864 (synopsis "Versatile test fixtures replacement")
12866 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12868 As a fixtures replacement tool, it aims to replace static, hard to maintain
12869 fixtures with easy-to-use factories for complex object.
12871 Instead of building an exhaustive test setup with every possible combination
12872 of corner cases, factory_boy allows you to use objects customized for the
12873 current test, while only declaring the test-specific fields")
12874 (license license:expat)))
12876 (define-public python2-factory-boy
12877 (package-with-python2 python-factory-boy))
12879 (define-public python-translate-toolkit
12881 (name "python-translate-toolkit")
12886 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12888 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12889 (build-system python-build-system)
12891 `(("python-pytest" ,python-pytest)
12892 ("python-sphinx" ,python-sphinx)))
12894 `(("python-babel" ,python-babel)
12895 ("python-beautifulsoup4" ,python-beautifulsoup4)
12896 ("python-chardet" ,python-chardet)
12897 ("python-diff-match-patch" ,python-diff-match-patch)
12898 ("python-levenshtein" ,python-levenshtein)
12899 ("python-lxml" ,python-lxml)
12900 ("python-six" ,python-six)
12901 ("python-vobject" ,python-vobject)
12902 ("python-pyyaml" ,python-pyyaml)))
12904 ;; TODO: tests are not run, because they end with
12905 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12907 ;; during test setup.
12909 (home-page "https://toolkit.translatehouse.org")
12910 (synopsis "Tools and API for translation and localization engineering")
12912 "Tools and API for translation and localization engineering. It contains
12913 several utilities, as well as an API for building localization tools.")
12914 (license license:gpl2+)))
12916 (define-public python2-translate-toolkit
12917 (package-with-python2 python-translate-toolkit))
12919 (define-public python-packaging
12921 (name "python-packaging")
12926 (uri (pypi-uri "packaging" version))
12929 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12930 (build-system python-build-system)
12932 `(#:phases (modify-phases %standard-phases
12934 (lambda _ (invoke "py.test" "-vv"))))))
12936 `(("python-pretend" ,python-pretend)
12937 ("python-pytest" ,python-pytest)))
12939 `(("python-pyparsing" ,python-pyparsing)
12940 ("python-six" ,python-six)))
12941 (home-page "https://github.com/pypa/packaging")
12942 (synopsis "Core utilities for Python packages")
12943 (description "Packaging is a Python module for dealing with Python packages.
12944 It offers an interface for working with package versions, names, and dependency
12946 ;; From 'LICENSE': This software is made available under the terms of
12947 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12948 ;; Contributions to this software is made under the terms of *both* these
12950 (license (list license:asl2.0 license:bsd-2))))
12952 (define-public python2-packaging
12953 (package-with-python2 python-packaging))
12955 (define-public python-relatorio
12957 (name "python-relatorio")
12962 (uri (pypi-uri "relatorio" version))
12965 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12966 (build-system python-build-system)
12968 `(("python-lxml" ,python-lxml)
12969 ("python-genshi" ,python-genshi)))
12971 `(("python-magic" ,python-magic)))
12972 (home-page "https://relatorio.tryton.org/")
12973 (synopsis "Templating library able to output ODT and PDF files")
12974 (description "Relatorio is a templating library which provides a way to
12975 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12976 for more filetypes can be easily added by creating plugins for them.")
12977 (license license:gpl3+)))
12979 (define-public python2-relatorio
12980 (package-with-python2 python-relatorio))
12982 (define-public python-radon
12984 (name "python-radon")
12989 (uri (pypi-uri "radon" version))
12992 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12993 (build-system python-build-system)
12995 `(#:phases (modify-phases %standard-phases
12998 (invoke "python" "radon/tests/run.py"))))))
13000 `(("python-colorama" ,python-colorama)
13001 ("python-flake8-polyfill" ,python-flake8-polyfill)
13002 ("python-mando" ,python-mando)))
13004 `(("python-pytest" ,python-pytest)
13005 ("python-pytest-mock" ,python-pytest-mock)))
13006 (home-page "https://radon.readthedocs.org/")
13007 (synopsis "Code Metrics in Python")
13008 (description "Radon is a Python tool which computes various code metrics.
13009 Supported metrics are:
13011 @item raw metrics: SLOC, comment lines, blank lines, &c.
13012 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13013 @item Halstead metrics (all of them)
13014 @item the Maintainability Index (a Visual Studio metric)
13016 (license license:expat)))
13018 (define-public python2-radon
13019 (package-with-python2 python-radon))
13021 (define-public python-sure
13023 (name "python-sure")
13028 (uri (pypi-uri "sure" version))
13031 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13032 (build-system python-build-system)
13034 `(("python-mock" ,python-mock)
13035 ("python-six" ,python-six)))
13037 `(("python-nose" ,python-nose)))
13038 (home-page "https://github.com/gabrielfalcao/sure")
13039 (synopsis "Automated testing library in python for python")
13041 "Sure is a python library that leverages a DSL for writing assertions.
13042 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13043 (license license:gpl3+)))
13045 (define-public python2-sure
13046 (package-with-python2 python-sure))
13048 (define-public python2-couleur
13049 ;; This package does not seem to support python3 at all, hence,
13050 ;; only the python2 variant definition is provided.
13052 (name "python2-couleur")
13057 (uri (pypi-uri "couleur" version))
13060 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13061 (build-system python-build-system)
13063 `(#:python ,python-2))
13064 (home-page "https://github.com/gabrielfalcao/couleur")
13066 "ANSI terminal tool for python, colored shell and other handy fancy features")
13068 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13069 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13070 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13071 ;; https://github.com/gabrielfalcao/couleur/issues/11
13072 (license license:lgpl3+)))
13074 (define-public python-misaka
13076 (name "python-misaka")
13081 (uri (pypi-uri "misaka" version))
13084 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13085 (build-system python-build-system)
13087 `(;; Line 37 of setup.py calls self.run_command('develop')
13088 ;; in the 'check' phase. This command seems to be trying
13090 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13091 ;; for which it does not have the permission to write.
13094 `(("python-cffi" ,python-cffi)))
13095 (home-page "https://github.com/FSX/misaka")
13096 (synopsis "Python binding for Hoedown")
13098 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13099 library written in C. It features a fast HTML renderer and functionality to make custom
13100 renderers (e.g. man pages or LaTeX).")
13101 (license license:expat)))
13103 (define-public python2-misaka
13104 (package-with-python2 python-misaka))
13106 (define-public python2-steadymark
13107 ;; This is forced into being a python2 only variant
13108 ;; due to its dependence on couleur that has no support
13111 (name "python2-steadymark")
13116 (uri (pypi-uri "steadymark" version))
13119 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13120 (build-system python-build-system)
13122 `(("python-couleur" ,python2-couleur)
13123 ("python-sure" ,python2-sure)
13124 ("python-misaka" ,python2-misaka)))
13126 `(#:python ,python-2
13128 (modify-phases %standard-phases
13129 (add-before 'build 'patch-setup-py
13131 ;; Update requirements from dependency==version
13132 ;; to dependency>=version
13133 (substitute* "setup.py"
13136 (home-page "https://github.com/gabrielfalcao/steadymark")
13137 (synopsis "Markdown-based test runner for python")
13139 "@code{Steadymark} allows documentation to be written in github-flavoured
13140 markdown. The documentation may contain snippets of code surrounded by python
13141 code blocks and @code{Steadymark} will find these snippets and run them, making
13142 sure that there are no old malfunctional examples in the documentation examples.")
13143 (license license:expat)))
13145 (define-public python-jsonpointer
13147 (name "python-jsonpointer")
13152 (uri (pypi-uri "jsonpointer" version))
13155 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13156 (build-system python-build-system)
13157 (home-page "https://github.com/stefankoegl/python-json-pointer")
13158 (synopsis "Identify specific nodes in a JSON document")
13159 (description "@code{jsonpointer} allows you to access specific nodes
13160 by path in a JSON document (see RFC 6901).")
13161 (license license:bsd-3)))
13163 (define-public python2-jsonpointer
13164 (package-with-python2 python-jsonpointer))
13166 (define-public python-jsonpatch
13168 (name "python-jsonpatch")
13173 ;; pypi version lacks tests.js
13174 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13175 "archive/v" version ".tar.gz"))
13176 (file-name (string-append name "-" version ".tar.gz"))
13179 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13180 (build-system python-build-system)
13182 `(("python-jsonpointer" ,python-jsonpointer)))
13183 (home-page "https://github.com/stefankoegl/python-json-patch")
13184 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13185 (description "@code{jsonpatch} is a library and program that allows
13186 applying JSON Patches according to RFC 6902.")
13187 (license license:bsd-3)))
13189 (define-public python2-jsonpatch
13190 (package-with-python2 python-jsonpatch))
13192 (define-public python-jsonpatch-0.4
13193 (package (inherit python-jsonpatch)
13194 (name "python-jsonpatch")
13199 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13200 "archive/v" version ".tar.gz"))
13201 (file-name (string-append name "-" version ".tar.gz"))
13204 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13206 (define-public python2-jsonpatch-0.4
13207 (package-with-python2 python-jsonpatch-0.4))
13209 (define-public python-rfc3986
13211 (name "python-rfc3986")
13215 (uri (pypi-uri "rfc3986" version))
13218 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13219 (build-system python-build-system)
13221 `(#:modules ((guix build utils)
13222 (guix build python-build-system)
13227 (modify-phases %standard-phases
13230 (let ((cwd (getcwd)))
13231 (setenv "PYTHONPATH"
13232 (string-append cwd "/build/"
13233 (find (cut string-prefix? "lib" <>)
13234 (scandir (string-append cwd "/build")))
13236 (getenv "PYTHONPATH")))
13237 (invoke "pytest" "-v")))))))
13239 `(("python-pytest" ,python-pytest)))
13240 (home-page "https://rfc3986.readthedocs.io/")
13241 (synopsis "Parse and validate URI references")
13243 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13244 validation and authority parsing. This module also supports RFC@tie{}6874
13245 which adds support for zone identifiers to IPv6 addresses.")
13246 (license license:asl2.0)))
13248 (define-public python2-rfc3986
13249 (package-with-python2 python-rfc3986))
13251 (define-public python-rfc3987
13253 (name "python-rfc3987")
13258 (uri (pypi-uri "rfc3987" version))
13261 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13262 (build-system python-build-system)
13263 (home-page "https://pypi.python.org/pypi/rfc3987")
13264 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13265 (description "@code{rfc3987} provides routines for parsing and
13266 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13267 (license license:gpl3+)))
13269 (define-public python2-rfc3987
13270 (package-with-python2 python-rfc3987))
13272 (define-public python-validate-email
13274 (name "python-validate-email")
13279 (uri (pypi-uri "validate_email" version))
13282 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13283 (build-system python-build-system)
13284 (home-page "https://github.com/syrusakbary/validate_email")
13285 (synopsis "Verifies if an email address is valid and really exists")
13286 (description "@code{validate_email} can be used to verify if an email
13287 address is valid and really exists.")
13288 (license license:lgpl3+)))
13290 (define-public python2-validate-email
13291 (package-with-python2 python-validate-email))
13293 (define-public python-flex
13295 (name "python-flex")
13300 (uri (pypi-uri "flex" version))
13303 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13304 (build-system python-build-system)
13306 `(("python-click" ,python-click)
13307 ("python-iso8601" ,python-iso8601)
13308 ("python-jsonpointer" ,python-jsonpointer)
13309 ("python-pyyaml" ,python-pyyaml)
13310 ("python-requests" ,python-requests)
13311 ("python-rfc3987" ,python-rfc3987)
13312 ("python-six" ,python-six)
13313 ("python-validate-email" ,python-validate-email)))
13314 (home-page "https://github.com/pipermerriam/flex")
13315 (synopsis "Validates Swagger schemata")
13316 (description "@code{flex} can be used to validate Swagger schemata.")
13317 (license license:bsd-3)))
13319 (define-public python2-flex
13320 (package-with-python2 python-flex))
13322 (define-public python-marshmallow
13324 (name "python-marshmallow")
13325 (version "3.0.0b14")
13329 (uri (pypi-uri "marshmallow" version))
13332 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13333 (build-system python-build-system)
13335 `(("python-dateutil" ,python-dateutil)
13336 ("python-simplejson" ,python-simplejson)))
13338 `(("python-pytest" ,python-pytest)
13339 ("python-pytz" ,python-pytz)))
13340 (home-page "https://github.com/marshmallow-code/marshmallow")
13341 (synopsis "Convert complex datatypes to and from native
13342 Python datatypes.")
13343 (description "@code{marshmallow} provides a library for converting
13344 complex datatypes to and from native Python datatypes.")
13345 (license license:expat)))
13347 (define-public python2-marshmallow
13348 (package-with-python2 python-marshmallow))
13350 (define-public python-apispec
13352 (name "python-apispec")
13357 (uri (pypi-uri "apispec" version))
13360 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13361 (build-system python-build-system)
13363 `(("python-pyyaml" ,python-pyyaml)))
13365 `(("python-pytest" ,python-pytest)
13366 ("python-flask" ,python-flask)
13367 ("python-marshmallow" ,python-marshmallow)
13368 ("python-tornado" ,python-tornado)
13369 ("python-bottle" ,python-bottle)
13370 ("python-mock" ,python-mock)))
13371 (home-page "https://github.com/marshmallow-code/apispec")
13372 (synopsis "Swagger 2.0 API specification generator")
13373 (description "@code{python-apispec} is a pluggable API specification
13374 generator. Currently supports the OpenAPI specification (f.k.a.
13376 (license license:expat)))
13378 (define-public python2-apispec
13379 (package-with-python2 python-apispec))
13381 (define-public python-flasgger
13383 (name "python-flasgger")
13388 (uri (git-reference
13389 (url "https://github.com/rochacbruno/flasgger.git")
13391 (file-name (git-file-name name version))
13393 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13394 (build-system python-build-system)
13397 (modify-phases %standard-phases
13399 (lambda* (#:key inputs outputs #:allow-other-keys)
13400 (substitute* "Makefile"
13401 (("flake8 flasgger --ignore=F403")
13402 "flake8 flasgger --ignore=E731,F403"))
13403 (setenv "PYTHONPATH" (string-append (getcwd)
13405 (getenv "PYTHONPATH")))
13406 (invoke "py.test"))))))
13408 `(("python-flask" ,python-flask)
13409 ("python-pyyaml" ,python-pyyaml)
13410 ("python-jsonschema" ,python-jsonschema)
13411 ("python-mistune" ,python-mistune)
13412 ("python-six" ,python-six)))
13414 `(("python-decorator" ,python-decorator)
13415 ("python-flake8" ,python-flake8)
13416 ("python-flask-restful" ,python-flask-restful)
13417 ("python-flex" ,python-flex)
13418 ("python-pytest" ,python-pytest)
13419 ("python-pytest-cov" ,python-pytest-cov)
13420 ("python-marshmallow" ,python-marshmallow)
13421 ("python-apispec" ,python-apispec)))
13422 (home-page "https://github.com/rochacbruno/flasgger/")
13423 (synopsis "Extract Swagger specs from your Flask project")
13424 (description "@code{python-flasgger} allows extracting Swagger specs
13425 from your Flask project. It is a fork of Flask-Swagger.")
13426 (license license:expat)))
13428 (define-public python2-flasgger
13429 (package-with-python2 python-flasgger))
13431 (define-public python-swagger-spec-validator
13433 (name "python-swagger-spec-validator")
13438 (uri (pypi-uri "swagger-spec-validator" version))
13441 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13442 (build-system python-build-system)
13444 `(("python-jsonschema" ,python-jsonschema)
13445 ("python-pyyaml" ,python-pyyaml)
13446 ("python-six" ,python-six)))
13448 "https://github.com/Yelp/swagger_spec_validator")
13449 (synopsis "Validation of Swagger specifications")
13450 (description "@code{swagger_spec_validator} provides a library for
13451 validating Swagger API specifications.")
13452 (license license:asl2.0)))
13454 (define-public python2-swagger-spec-validator
13455 (package-with-python2 python-swagger-spec-validator))
13457 (define-public python-apache-libcloud
13459 (name "python-apache-libcloud")
13464 (uri (pypi-uri "apache-libcloud" version))
13467 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13468 (build-system python-build-system)
13471 (modify-phases %standard-phases
13472 (add-after 'unpack 'patch-ssh
13473 (lambda* (#:key inputs #:allow-other-keys)
13474 (substitute* "libcloud/compute/ssh.py"
13475 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13478 (add-after 'unpack 'patch-tests
13480 (substitute* "./libcloud/test/test_file_fixtures.py"
13481 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13482 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13483 return (httplib.OK,
13485 {\"test\": \"value\"},
13486 httplib.responses[httplib.OK])
13488 (substitute* "libcloud/test/compute/test_ssh_client.py"
13489 (("class ShellOutSSHClientTests")
13490 "@unittest.skip(\"Guix container doesn't have ssh service\")
13491 class ShellOutSSHClientTests")
13492 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13493 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13494 (("'.xF0', '.x90', '.x8D', '.x88'")
13495 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13497 (add-before 'check 'copy-secret
13499 (copy-file "libcloud/test/secrets.py-dist"
13500 "libcloud/test/secrets.py")
13503 `(("openssh" ,openssh)))
13505 `(("python-paramiko" ,python-paramiko)
13506 ("python-requests" ,python-requests)))
13508 `(("python-lockfile" ,python-lockfile)
13509 ("python-mock" ,python-mock)
13510 ("python-pytest" ,python-pytest)
13511 ("python-pytest-runner" ,python-pytest-runner)
13512 ("python-requests-mock" ,python-requests-mock)))
13513 (home-page "https://libcloud.apache.org/")
13514 (synopsis "Unified Cloud API")
13515 (description "@code{libcloud} is a Python library for interacting with
13516 many of the popular cloud service providers using a unified API.")
13517 (license license:asl2.0)))
13519 (define-public python2-apache-libcloud
13520 (package-with-python2 python-apache-libcloud))
13522 (define-public python-smmap2
13524 (name "python-smmap2")
13529 (uri (pypi-uri "smmap2" version))
13532 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13533 (build-system python-build-system)
13535 `(("python-nosexcover" ,python-nosexcover)))
13536 (home-page "https://github.com/Byron/smmap")
13537 (synopsis "Python sliding window memory map manager")
13538 (description "@code{smmap2} is a pure Python implementation of a sliding
13539 window memory map manager.")
13540 (license license:bsd-3)))
13542 (define-public python2-smmap2
13543 (package-with-python2 python-smmap2))
13545 (define-public python-regex
13547 (name "python-regex")
13548 (version "2019.04.14")
13551 (uri (pypi-uri "regex" version))
13554 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13555 ;; TODO: Fix and enable regex_test.py tests that complain about the
13556 ;; test.support module not existing.
13557 (build-system python-build-system)
13558 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13559 (synopsis "Alternative regular expression module")
13560 (description "This regular expression implementation is backwards-
13561 compatible with the standard @code{re} module, but offers additional
13562 functionality like full case-folding for case-insensitive matches in Unicode.")
13563 (license license:psfl)))
13565 (define-public python2-regex
13566 (package-with-python2 python-regex))
13568 (define-public python2-pyopengl
13570 (name "python2-pyopengl")
13575 (uri (pypi-uri "PyOpenGL" version))
13578 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13580 `(#:python ,python-2))
13581 (build-system python-build-system)
13582 (home-page "http://pyopengl.sourceforge.net")
13583 (synopsis "Standard OpenGL bindings for Python")
13585 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13586 related APIs. The binding is created using the standard @code{ctypes}
13588 (license license:bsd-3)))
13590 (define-public python2-pyopengl-accelerate
13592 (inherit python2-pyopengl)
13593 (name "python2-pyopengl-accelerate")
13598 (uri (pypi-uri "PyOpenGL-accelerate" version))
13601 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13602 (synopsis "Acceleration code for PyOpenGL")
13604 "This is the Cython-coded accelerator module for PyOpenGL.")))
13606 (define-public python-rencode
13608 (name "python-rencode")
13613 (uri (pypi-uri "rencode" version))
13616 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13617 (build-system python-build-system)
13620 (modify-phases %standard-phases
13621 (add-before 'check 'delete-bogus-test
13622 ;; This test requires /home/aresch/Downloads, which is not provided by
13623 ;; the build environment.
13625 (delete-file "rencode/t.py")
13627 (native-inputs `(("pkg-config" ,pkg-config)
13628 ("python-cython" ,python-cython)))
13629 (home-page "https://github.com/aresch/rencode")
13630 (synopsis "Serialization of heterogeneous data structures")
13632 "The @code{rencode} module is a data structure serialization library,
13633 similar to @code{bencode} from the BitTorrent project. For complex,
13634 heterogeneous data structures with many small elements, r-encoding stake up
13635 significantly less space than b-encodings. This version of rencode is a
13636 complete rewrite in Cython to attempt to increase the performance over the
13637 pure Python module.")
13638 (license license:bsd-3)))
13640 (define-public python2-rencode
13641 (package-with-python2 python-rencode))
13643 (define-public python-xenon
13645 (name "python-xenon")
13650 (uri (pypi-uri "xenon" version))
13653 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13654 (build-system python-build-system)
13656 `(("python-pyyaml" ,python-pyyaml)
13657 ("python-radon" ,python-radon)
13658 ("python-requests" ,python-requests)
13659 ("python-flake8" ,python-flake8)
13660 ("python-tox" ,python-tox)))
13663 (modify-phases %standard-phases
13664 (add-before 'build 'patch-test-requirements
13666 ;; Remove httpretty dependency for tests.
13667 (substitute* "setup.py"
13668 (("httpretty") ""))
13670 (home-page "https://xenon.readthedocs.org/")
13671 (synopsis "Monitor code metrics for Python on your CI server")
13673 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13674 Ideally, @code{xenon} is run every time code is committed. Through command
13675 line options, various thresholds can be set for the complexity of code. It
13676 will fail (i.e. it will exit with a non-zero exit code) when any of these
13677 requirements is not met.")
13678 (license license:expat)))
13680 (define-public python2-xenon
13681 (package-with-python2 python-xenon))
13683 (define-public python-pysocks
13685 (name "python-pysocks")
13690 (uri (pypi-uri "PySocks" version))
13693 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13694 (build-system python-build-system)
13695 (arguments `(#:tests? #f))
13696 (home-page "https://github.com/Anorov/PySocks")
13697 (synopsis "SOCKS client module")
13698 (description "@code{pysocks} is an updated and semi-actively maintained
13699 version of @code{SocksiPy} with bug fixes and extra features.")
13700 (license license:bsd-3)))
13702 (define-public python2-pysocks
13703 (package-with-python2 python-pysocks))
13705 (define-public python-pydiff
13707 (name "python-pydiff")
13712 (uri (pypi-uri "pydiff" version))
13715 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13716 (build-system python-build-system)
13717 (home-page "https://github.com/myint/pydiff")
13718 (synopsis "Library to diff two Python files at the bytecode level")
13720 "@code{pydiff} makes it easy to look for actual code changes while
13721 ignoring formatting changes.")
13722 (license license:expat)))
13724 (define-public python2-pydiff
13725 (package-with-python2 python-pydiff))
13727 (define-public python-tqdm
13729 (name "python-tqdm")
13734 (uri (pypi-uri "tqdm" version))
13737 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13738 (build-system python-build-system)
13740 `(("python-flake8" ,python-flake8)
13741 ("python-nose" ,python-nose)
13742 ("python-coverage" ,python-coverage)))
13743 (home-page "https://github.com/tqdm/tqdm")
13744 (synopsis "Fast, extensible progress meter")
13746 "Make loops show a progress bar on the console by just wrapping any
13747 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13748 design and layout.")
13749 (license (list license:mpl2.0 license:expat))))
13751 (define-public python2-tqdm
13752 (package-with-python2 python-tqdm))
13754 (define-public python-pkginfo
13756 (name "python-pkginfo")
13761 (uri (pypi-uri "pkginfo" version))
13764 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13765 (build-system python-build-system)
13767 ;; The tests are broken upstream.
13770 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13772 "Query metadatdata from sdists, bdists, and installed packages")
13774 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13775 source distriubtion (an sdist) or a binary distribution (e.g., created by
13776 running bdist_egg). It can also query the EGG-INFO directory of an installed
13777 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13778 created by running @code{python setup.py develop}).")
13779 (license license:expat)))
13781 (define-public python2-pkginfo
13782 (package-with-python2 python-pkginfo))
13784 (define-public python-twine
13786 (name "python-twine")
13791 (uri (pypi-uri "twine" version))
13794 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13795 (build-system python-build-system)
13797 `(("python-tqdm" ,python-tqdm)
13798 ("python-pkginfo" ,python-pkginfo)
13799 ("python-requests" ,python-requests)
13800 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13801 (home-page "https://github.com/pypa/twine")
13802 (synopsis "Collection of utilities for interacting with PyPI")
13804 "@code{twine} currently supports registering projects and uploading
13805 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13806 their files and supports any packaging format (including wheels).")
13807 (license license:asl2.0)))
13809 (define-public python2-twine
13810 (package-with-python2 python-twine))
13812 (define-public python-linecache2
13814 (name "python-linecache2")
13819 (uri (pypi-uri "linecache2" version))
13822 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13823 (build-system python-build-system)
13825 `(;; The tests depend on unittest2, and our version is a bit too old.
13828 `(("python-pbr" ,python-pbr-minimal)))
13830 "https://github.com/testing-cabal/linecache2")
13831 (synopsis "Backports of the linecache module")
13833 "The linecache module allows one to get any line from any file, while
13834 attempting to optimize internally, using a cache, the common case where many
13835 lines are read from a single file.")
13836 (license license:psfl)))
13838 (define-public python2-linecache2
13839 (package-with-python2 python-linecache2))
13841 (define-public python-traceback2
13843 (name "python-traceback2")
13848 (uri (pypi-uri "traceback2" version))
13851 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13852 (build-system python-build-system)
13854 `(;; python-traceback2 and python-unittest2 depend on one another.
13857 `(("python-pbr" ,python-pbr-minimal)))
13859 `(("python-linecache2" ,python-linecache2)))
13861 "https://github.com/testing-cabal/traceback2")
13862 (synopsis "Backports of the traceback module")
13864 "This module provides a standard interface to extract, format and print
13865 stack traces of Python programs. It exactly mimics the behavior of the Python
13866 interpreter when it prints a stack trace.")
13867 (license license:psfl)))
13869 (define-public python2-traceback2
13870 (package-with-python2 python-traceback2))
13872 (define-public python-ratelimiter
13874 (name "python-ratelimiter")
13879 (uri (pypi-uri "ratelimiter" version))
13882 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13883 (build-system python-build-system)
13885 '(#:tests? #f)) ; There are no tests in the pypi archive.
13886 (home-page "https://github.com/RazerM/ratelimiter")
13887 (synopsis "Simple rate limiting object")
13889 "The @code{ratelimiter} module ensures that an operation will not be
13890 executed more than a given number of times during a given period.")
13891 (license license:asl2.0)))
13893 (define-public python2-ratelimiter
13894 (package-with-python2 python-ratelimiter))
13896 (define-public python-dukpy
13898 (name "python-dukpy")
13903 (uri (git-reference
13904 (url "https://github.com/kovidgoyal/dukpy.git")
13905 (commit (string-append "v" version))))
13906 (file-name (git-file-name name version))
13908 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13909 (build-system python-build-system)
13910 (home-page "https://github.com/kovidgoyal/dukpy")
13911 (synopsis "Run JavaScript in python")
13913 "dukpy is a JavaScript runtime environment for Python using the duktape
13914 embeddable JavaScript engine.")
13915 ;; Dukpy is licensed under MIT like the embedded duktape library,
13916 ;; with 'errors.c' as GPL3.
13917 (license (list license:expat license:gpl3))))
13919 (define-public python2-dukpy
13920 (package-with-python2 python-dukpy))
13922 (define-public python-jsonrpclib-pelix
13924 (name "python-jsonrpclib-pelix")
13929 (uri (pypi-uri "jsonrpclib-pelix" version))
13932 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13933 (build-system python-build-system)
13935 `(#:tests? #f)) ; no tests in PyPI tarball
13936 (home-page "https://github.com/tcalmant/jsonrpclib/")
13937 (synopsis "JSON-RPC 2.0 client library for Python")
13939 "This library implements the JSON-RPC v2.0
13940 specification (backwards-compatible) as a client library for Python. This
13941 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13943 (license license:asl2.0)))
13945 (define-public python2-jsonrpclib-pelix
13946 (package-with-python2 python-jsonrpclib-pelix))
13948 (define-public python-setuptools-scm-git-archive
13950 (name "python-setuptools-scm-git-archive")
13955 (uri (pypi-uri "setuptools_scm_git_archive" version))
13958 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13959 (build-system python-build-system)
13961 `(("python-pytest" ,python-pytest)))
13963 `(("python-setuptools-scm" ,python-setuptools-scm)))
13964 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13965 (synopsis "Setuptools_scm plugin for git archives")
13967 "The setuptools_scm_git_archive package is a plugin to
13968 setuptools_scm, which supports obtaining versions from git archives that
13969 belong to tagged versions.")
13970 (license license:expat)))
13972 (define-public python2-setuptools-scm-git-archive
13973 (package-with-python2 python-setuptools-scm-git-archive))
13975 (define-public python-setuptools-git
13977 (name "python-setuptools-git")
13982 (uri (pypi-uri "setuptools-git" version))
13985 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13986 (build-system python-build-system)
13989 (modify-phases %standard-phases
13990 ;; This is needed for tests.
13991 (add-after 'unpack 'configure-git
13993 (setenv "HOME" "/tmp")
13994 (invoke "git" "config" "--global" "user.email" "guix")
13995 (invoke "git" "config" "--global" "user.name" "guix")
13998 `(("git" ,git-minimal)))
13999 (home-page "https://github.com/msabramo/setuptools-git")
14000 (synopsis "Setuptools revision control system plugin for Git")
14002 "This package provides a plugin for Setuptools for revision control with
14004 (license license:bsd-3)))
14006 (define-public python-pyclipper
14008 (name "python-pyclipper")
14009 (version "1.1.0.post1")
14013 (uri (pypi-uri "pyclipper" version ".zip"))
14016 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14017 (modules '((guix build utils)))
14020 ;; This file is generated by Cython.
14021 (delete-file "pyclipper/pyclipper.cpp") #t))))
14022 (build-system python-build-system)
14025 (modify-phases %standard-phases
14026 (add-before 'build 'cythonize-sources
14028 (with-directory-excursion "pyclipper"
14029 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14031 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14033 `(("python-cython" ,python-cython)
14034 ("python-pytest" ,python-pytest)
14035 ("python-pytest-runner" ,python-pytest-runner)
14036 ("python-unittest2" ,python-unittest2)
14038 (home-page "https://github.com/greginvm/pyclipper")
14039 (synopsis "Wrapper for Angus Johnson's Clipper library")
14041 "Pyclipper is a Cython wrapper for the C++ translation of the
14042 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14043 (license license:expat)))
14045 (define-public python2-pyclipper
14046 (package-with-python2 python-pyclipper))
14048 (define-public python2-booleanoperations
14050 (name "python2-booleanoperations")
14055 (uri (pypi-uri "booleanOperations" version ".zip"))
14058 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14059 (build-system python-build-system)
14061 `(#:python ,python-2))
14064 ("python2-pytest" ,python2-pytest)
14065 ("python2-pytest-runner" ,python2-pytest-runner)))
14067 `(("python-fonttools" ,python2-fonttools)
14068 ("python-pyclipper" ,python2-pyclipper)
14069 ("python-ufolib" ,python2-ufolib)))
14070 (home-page "https://github.com/typemytype/booleanOperations")
14071 (synopsis "Boolean operations on paths")
14073 "BooleanOperations provides a Python library that enables
14074 boolean operations on paths.")
14075 (license license:expat)))
14077 (define-public python-tempdir
14079 (name "python-tempdir")
14084 (uri (pypi-uri "tempdir" version))
14087 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14088 (build-system python-build-system)
14089 (home-page "https://pypi.org/project/tempdir/")
14091 ;; the package has no tests
14093 (synopsis "Python library for managing temporary directories")
14095 "This library manages temporary directories that are automatically
14096 deleted with all their contents when they are no longer needed. It is
14097 particularly convenient for use in tests.")
14098 (license license:expat)))
14100 (define-public python2-tempdir
14101 (package-with-python2 python-tempdir))
14103 (define-public python-activepapers
14105 (name "python-activepapers")
14110 (uri (pypi-uri "ActivePapers.Py" version))
14113 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14114 (build-system python-build-system)
14116 `(#:modules ((ice-9 ftw)
14119 (guix build python-build-system))
14122 (modify-phases %standard-phases
14123 (add-after 'unpack 'delete-python2-code
14125 (for-each delete-file
14126 '("lib/activepapers/builtins2.py"
14127 "lib/activepapers/standardlib2.py"
14128 "lib/activepapers/utility2.py"))))
14131 ;; Deactivate the test cases that download files
14132 (setenv "NO_NETWORK_ACCESS" "1")
14133 ;; For some strange reason, some tests fail if nosetests runs all
14134 ;; test modules in a single execution. They pass if each test
14135 ;; module is run individually.
14136 (for-each (lambda (filename)
14137 (invoke "nosetests"
14138 (string-append "tests/" filename)))
14141 (string-suffix? ".py" filename)))))))))
14143 `(("python-tempdir" ,python-tempdir)
14144 ("python-nose" ,python-nose)))
14146 `(("python-h5py" ,python-h5py)))
14147 (home-page "http://www.activepapers.org/")
14148 (synopsis "Executable papers for scientific computing")
14150 "ActivePapers is a tool for working with executable papers, which
14151 combine data, code, and documentation in single-file packages,
14152 suitable for publication as supplementary material or on repositories
14153 such as figshare or Zenodo.")
14154 (properties `((python2-variant . ,(delay python2-activepapers))))
14155 (license license:bsd-3)))
14157 (define-public python2-activepapers
14158 (let ((base (package-with-python2
14159 (strip-python2-variant python-activepapers))))
14163 (substitute-keyword-arguments (package-arguments base)
14165 `(modify-phases ,phases
14166 (delete 'delete-python2-code)
14167 (add-after 'unpack 'delete-python3-code
14169 (for-each delete-file
14170 '("lib/activepapers/builtins3.py"
14171 "lib/activepapers/standardlib3.py"
14172 "lib/activepapers/utility3.py")))))))))))
14174 (define-public python-semver
14176 (name "python-semver")
14181 (uri (pypi-uri "semver" version))
14184 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14185 (build-system python-build-system)
14188 (modify-phases %standard-phases
14189 (add-after 'unpack 'patch-test-requirements
14191 (substitute* "setup.py"
14192 ;; Our Python is new enough.
14193 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14196 `(("python-tox" ,python-tox)
14197 ("python-virtualenv" ,python-virtualenv)))
14198 (home-page "https://github.com/k-bx/python-semver")
14199 (synopsis "Python helper for Semantic Versioning")
14200 (description "This package provides a Python library for
14201 @url{Semantic Versioning, http://semver.org/}.")
14202 (license license:bsd-3)))
14204 (define-public python2-semver
14205 (package-with-python2 python-semver))
14207 (define-public python-pyro4
14209 (name "python-pyro4")
14214 (uri (pypi-uri "Pyro4" version))
14216 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14217 (build-system python-build-system)
14219 `(("python-serpent" ,python-serpent)))
14220 (home-page "https://pyro4.readthedocs.io")
14221 (synopsis "Distributed object middleware for Python")
14223 "Pyro enables you to build applications in which objects can talk to each
14224 other over the network. You can just use normal Python method calls to call
14225 objects on other machines, also known as remote procedure calls (RPC).")
14226 (license license:expat)))
14228 (define-public python2-pyro
14230 (name "python2-pyro")
14235 (uri (pypi-uri "Pyro" version))
14236 (file-name (string-append "Pyro-" version ".tar.gz"))
14239 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14240 (build-system python-build-system)
14242 ;; Pyro is not compatible with Python 3
14243 `(#:python ,python-2
14244 ;; Pyro has no test cases for automatic execution
14246 (home-page "http://pythonhosted.org/Pyro/")
14247 (synopsis "Distributed object manager for Python")
14248 (description "Pyro is a Distributed Object Technology system
14249 written in Python that is designed to be easy to use. It resembles
14250 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14251 which is a system and language independent Distributed Object Technology
14252 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14253 longer maintained. New projects should use Pyro4 instead, which
14254 is the new Pyro version that is actively developed.")
14255 (license license:expat)))
14257 (define-public python2-scientific
14259 (name "python2-scientific")
14264 (uri (string-append "https://bitbucket.org/khinsen/"
14265 "scientificpython/downloads/ScientificPython-"
14266 version ".tar.gz"))
14267 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14270 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14271 (build-system python-build-system)
14273 `(("netcdf" ,netcdf)))
14275 `(("python-numpy" ,python2-numpy-1.8)
14276 ("python-pyro" ,python2-pyro)))
14278 ;; ScientificPython is not compatible with Python 3
14279 `(#:python ,python-2
14280 #:tests? #f ; No test suite
14282 (modify-phases %standard-phases
14284 (lambda* (#:key inputs #:allow-other-keys)
14285 (invoke "python" "setup.py" "build"
14286 (string-append "--netcdf_prefix="
14287 (assoc-ref inputs "netcdf"))))))))
14288 (home-page "https://bitbucket.org/khinsen/scientificpython")
14289 (synopsis "Python modules for scientific computing")
14290 (description "ScientificPython is a collection of Python modules that are
14291 useful for scientific computing. Most modules are rather general (Geometry,
14292 physical units, automatic derivatives, ...) whereas others are more
14293 domain-specific (e.g. netCDF and PDB support). The library is currently
14294 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14295 (license license:cecill-c)))
14297 (define-public python2-mmtk
14299 (name "python2-mmtk")
14304 (uri (string-append "https://bitbucket.org/khinsen/"
14305 "mmtk/downloads/MMTK-" version ".tar.gz"))
14306 (file-name (string-append "MMTK-" version ".tar.gz"))
14309 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14310 (build-system python-build-system)
14312 `(("netcdf" ,netcdf)))
14314 `(("python-scientific" ,python2-scientific)
14315 ("python-tkinter" ,python-2 "tk")))
14317 `(#:python ,python-2
14320 (modify-phases %standard-phases
14321 (add-before 'build 'includes-from-scientific
14322 (lambda* (#:key inputs #:allow-other-keys)
14323 (mkdir-p "Include/Scientific")
14326 (assoc-ref inputs "python-scientific")
14327 "/include/python2.7/Scientific")
14328 "Include/Scientific"))))))
14329 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14330 (synopsis "Python library for molecular simulation")
14331 (description "MMTK is a library for molecular simulations with an emphasis
14332 on biomolecules. It provides widely used methods such as Molecular Dynamics
14333 and normal mode analysis, but also basic routines for implementing new methods
14334 for simulation and analysis. The library is currently not actively maintained
14335 and works only with Python 2 and NumPy < 1.9.")
14336 (license license:cecill-c)))
14338 (define-public python-phonenumbers
14340 (name "python-phonenumbers")
14345 (uri (pypi-uri "phonenumbers" version))
14348 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14349 (build-system python-build-system)
14351 "https://github.com/daviddrysdale/python-phonenumbers")
14353 "Python library for dealing with international phone numbers")
14355 "This package provides a Python port of Google's libphonenumber library.")
14356 (license license:asl2.0)))
14358 (define-public python2-phonenumbers
14359 (package-with-python2 python-phonenumbers))
14361 (define-public python-send2trash
14363 (name "python-send2trash")
14366 (origin (method git-fetch)
14367 ;; Source tarball on PyPI doesn't include tests.
14368 (uri (git-reference
14369 (url "https://github.com/hsoft/send2trash.git")
14371 (file-name (git-file-name name version))
14374 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14375 (build-system python-build-system)
14378 (modify-phases %standard-phases
14379 (add-before 'check 'pre-check
14381 (mkdir-p "/tmp/foo")
14382 (setenv "HOME" "/tmp/foo")
14384 (home-page "https://github.com/hsoft/send2trash")
14385 (synopsis "Send files to the user's @file{~/Trash} directory")
14386 (description "This package provides a Python library to send files to the
14387 user's @file{~/Trash} directory.")
14388 (properties `((python2-variant . ,(delay python2-send2trash))))
14389 (license license:bsd-3)))
14391 (define-public python2-send2trash
14393 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14395 (substitute-keyword-arguments (package-arguments python-send2trash)
14397 `(modify-phases ,phases
14398 (add-before 'check 'setenv
14400 (setenv "PYTHONPATH"
14401 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14404 (define-public python-yapf
14406 (name "python-yapf")
14411 (uri (pypi-uri "yapf" version))
14414 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14415 (build-system python-build-system)
14416 (home-page "https://github.com/google/yapf")
14417 (synopsis "Formatter for Python code")
14418 (description "YAPF is a formatter for Python code. It's based off of
14419 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14420 takes the code and reformats it to the best formatting that conforms to the
14421 style guide, even if the original code didn't violate the style guide.")
14422 (license license:asl2.0)))
14424 (define-public python2-yapf
14425 (package-with-python2 python-yapf))
14427 (define-public python-gyp
14428 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14431 (name "python-gyp")
14432 ;; Google does not release versions,
14433 ;; based on second most recent commit date.
14434 (version (git-version "0.0.0" revision commit))
14437 ;; Google does not release tarballs,
14438 ;; git checkout is needed.
14440 (uri (git-reference
14441 (url "https://chromium.googlesource.com/external/gyp")
14443 (file-name (git-file-name name version))
14446 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14447 (build-system python-build-system)
14448 (home-page "https://gyp.gsrc.io/")
14449 (synopsis "GYP is a Meta-Build system")
14451 "GYP builds build systems for large, cross platform applications.
14452 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14453 files, and Makefiles.")
14454 (license license:bsd-3))))
14456 (define-public python2-gyp
14457 (package-with-python2 python-gyp))
14459 (define-public python-whatever
14461 (name "python-whatever")
14466 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14470 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14471 (file-name (string-append name "-" version ".tar.gz"))))
14472 (build-system python-build-system)
14475 (modify-phases %standard-phases
14478 (invoke "py.test"))))))
14480 `(("python-pytest" ,python-pytest)))
14481 (home-page "http://github.com/Suor/whatever")
14482 (synopsis "Make anonymous functions by partial application of operators")
14483 (description "@code{whatever} provides an easy way to make anonymous
14484 functions by partial application of operators.")
14485 (license license:bsd-3)))
14487 (define-public python2-whatever
14488 (package-with-python2 python-whatever))
14490 (define-public python-funcy
14492 (name "python-funcy")
14497 (uri (git-reference
14498 (url "https://github.com/Suor/funcy.git")
14501 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14502 (file-name (git-file-name name version))))
14503 (build-system python-build-system)
14506 (modify-phases %standard-phases
14509 (invoke "py.test"))))))
14511 `(("python-pytest" ,python-pytest)
14512 ("python-whatever" ,python-whatever)))
14513 (home-page "http://github.com/Suor/funcy")
14514 (synopsis "Functional tools")
14515 (description "@code{funcy} is a library that provides functional tools.
14518 @item merge - Merges collections of the same type
14519 @item walk - Type-preserving map
14520 @item select - Selects a part of a collection
14521 @item take - Takes the first n items of a collection
14522 @item first - Takes the first item of a collection
14523 @item remove - Predicated-removes items of a collection
14524 @item concat - Concatenates two collections
14525 @item flatten - Flattens a collection with subcollections
14526 @item distinct - Returns only distinct items
14527 @item split - Predicated-splits a collection
14528 @item split_at - Splits a collection at a given item
14529 @item group_by - Groups items by group
14530 @item pairwise - Pairs off adjacent items
14531 @item partial - Partially-applies a function
14532 @item curry - Curries a function
14533 @item compose - Composes functions
14534 @item complement - Complements a predicate
14535 @item all_fn - \"all\" with predicate
14537 (license license:bsd-3)))
14539 (define-public python2-funcy
14540 (package-with-python2 python-funcy))
14542 (define-public python-isoweek
14544 (name "python-isoweek")
14549 (uri (pypi-uri "isoweek" version))
14552 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14553 (build-system python-build-system)
14554 (home-page "https://github.com/gisle/isoweek")
14555 (synopsis "Objects representing a week")
14556 (description "The @code{isoweek} module provide the class Week that
14557 implements the week definition of ISO 8601. This standard also defines
14558 a notation for identifying weeks; yyyyWww (where the W is a literal).
14559 Week instances stringify to this form.")
14560 (license license:bsd-3)))
14562 (define-public python2-isoweek
14563 (package-with-python2 python-isoweek))
14565 (define-public python-tokenize-rt
14567 (name "python-tokenize-rt")
14572 (uri (pypi-uri "tokenize-rt" version))
14575 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14576 (build-system python-build-system)
14577 (home-page "https://github.com/asottile/tokenize-rt")
14578 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14580 "This Python library is a wrapper around @code{tokenize} from the Python
14581 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14582 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14583 and @code{tokens_to_src} to roundtrip.")
14584 (license license:expat)))
14586 (define-public python-future-fstrings
14588 (name "python-future-fstrings")
14593 (uri (pypi-uri "future_fstrings" version))
14596 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14597 (build-system python-build-system)
14599 `(("python-tokenize-rt" ,python-tokenize-rt)))
14600 (home-page "https://github.com/asottile/future-fstrings")
14601 (synopsis "Backport of fstrings to Python < 3.6")
14603 "This package provides a UTF-8 compatible encoding
14604 @code{future_fstrings}, which performs source manipulation. It decodes the
14605 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14606 @code{f} strings.")
14607 (license license:expat)))
14609 (define-public python-typed-ast
14611 (name "python-typed-ast")
14616 (uri (pypi-uri "typed-ast" version))
14619 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14620 (build-system python-build-system)
14622 `(#:modules ((guix build utils)
14623 (guix build python-build-system)
14628 (modify-phases %standard-phases
14631 (let ((cwd (getcwd)))
14632 (setenv "PYTHONPATH"
14633 (string-append cwd "/build/"
14634 (find (cut string-prefix? "lib" <>)
14635 (scandir (string-append cwd "/build")))
14637 (getenv "PYTHONPATH"))))
14640 (native-inputs `(("python-pytest" ,python-pytest)))
14641 (home-page "https://github.com/python/typed_ast")
14642 (synopsis "Fork of Python @code{ast} modules with type comment support")
14643 (description "This package provides a parser similar to the standard
14644 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14645 include PEP 484 type comments and are independent of the version of Python
14646 under which they are run. The @code{typed_ast} parsers produce the standard
14647 Python AST (plus type comments), and are both fast and correct, as they are
14648 based on the CPython 2.7 and 3.7 parsers.")
14649 ;; See the file "LICENSE" for the details.
14650 (license (list license:psfl
14652 license:expat)))) ;ast27/Parser/spark.py
14654 (define-public python-typing
14656 (name "python-typing")
14661 (uri (pypi-uri "typing" version))
14664 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14665 (build-system python-build-system)
14666 (home-page "https://docs.python.org/3/library/typing.html")
14667 (synopsis "Type hints for Python")
14668 (description "This is a backport of the standard library @code{typing}
14669 module to Python versions older than 3.5. Typing defines a standard notation
14670 for Python function and variable type annotations. The notation can be used
14671 for documenting code in a concise, standard format, and it has been designed
14672 to also be used by static and runtime type checkers, static analyzers, IDEs
14674 (license license:psfl)))
14676 (define-public python2-typing
14677 (package-with-python2 python-typing))
14679 (define-public python-typing-extensions
14681 (name "python-typing-extensions")
14686 (uri (pypi-uri "typing_extensions" version))
14689 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14690 (build-system python-build-system)
14692 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14693 (synopsis "Experimental type hints for Python")
14695 "The typing_extensions module contains additional @code{typing} hints not
14696 yet present in the of the @code{typing} standard library.
14697 Included are implementations of:
14700 @item ContextManager
14711 @item TYPE_CHECKING
14712 @item AsyncGenerator
14714 (license license:psfl)))
14716 (define-public bpython
14723 (uri (pypi-uri "bpython" version))
14726 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14727 (build-system python-build-system)
14730 (modify-phases %standard-phases
14731 (add-after 'unpack 'remove-failing-test
14733 ;; Remove failing test. FIXME: make it pass
14734 (delete-file "bpython/test/test_args.py")
14736 (add-after 'wrap 'add-aliases
14737 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14738 (lambda* (#:key outputs #:allow-other-keys)
14739 (let ((out (assoc-ref outputs "out")))
14742 (symlink old (string-append out "/bin/" new)))
14743 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14744 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14747 `(("python-pygments" ,python-pygments)
14748 ("python-requests" ,python-requests)
14749 ("python-babel" ,python-babel) ; optional, for internationalization
14750 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14751 ("python-greenlet" ,python-greenlet)
14752 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14753 ("python-six" ,python-six)))
14755 `(("python-sphinx" ,python-sphinx)
14756 ("python-mock" ,python-mock)))
14757 (home-page "https://bpython-interpreter.org/")
14758 (synopsis "Fancy interface to the Python interpreter")
14759 (description "Bpython is a fancy interface to the Python
14760 interpreter. bpython's main features are
14763 @item in-line syntax highlighting,
14764 @item readline-like autocomplete with suggestions displayed as you type,
14765 @item expected parameter list for any Python function,
14766 @item \"rewind\" function to pop the last line of code from memory and
14768 @item send the code you've entered off to a pastebin,
14769 @item save the code you've entered to a file, and
14770 @item auto-indentation.
14772 (license license:expat)))
14774 (define-public bpython2
14775 (let ((base (package-with-python2
14776 (strip-python2-variant bpython))))
14777 (package (inherit base)
14780 `(#:python ,python-2
14782 (modify-phases %standard-phases
14783 (add-after 'unpack 'remove-failing-test
14785 ;; Remove failing test. FIXME: make it pass
14786 (delete-file "bpython/test/test_args.py")
14787 ;; Disable failing test-cases (renaming inhibits they are
14789 (substitute* "bpython/test/test_curtsies_repl.py"
14790 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14791 (string-append a "xxx_off_" b))
14792 (("^(\\s*def )(test_complex\\W)" _ a b)
14793 (string-append a "xxx_off_" b)))
14795 (add-before 'build 'rename-scripts
14796 ;; rename the scripts to bypthon2, bpdb2, etc.
14798 (substitute* "setup.py"
14799 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14800 (string-append name "2" rest "\n"))
14801 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14802 (string-append name "2" (or sub "") rest "\n")))
14805 (define-public python-pyinotify
14807 (name "python-pyinotify")
14811 (uri (pypi-uri "pyinotify" version))
14814 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14815 (build-system python-build-system)
14816 (arguments `(#:tests? #f)) ;no tests
14817 (home-page "https://github.com/seb-m/pyinotify")
14818 (synopsis "Python library for monitoring inotify events")
14820 "@code{pyinotify} provides a Python interface for monitoring
14821 file system events on Linux.")
14822 (license license:expat)))
14824 (define-public python2-pyinotify
14825 (package-with-python2 python-pyinotify))
14827 ;; Ada parser uses this version.
14828 (define-public python2-quex-0.67.3
14830 (name "python2-quex")
14835 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14836 (version-major+minor version)
14837 "/quex-" version ".zip"))
14840 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14841 (build-system python-build-system)
14843 `(("unzip" ,unzip)))
14845 `(#:python ,python-2
14848 (modify-phases %standard-phases
14849 (delete 'configure)
14852 (lambda* (#:key outputs #:allow-other-keys)
14853 (let* ((out (assoc-ref outputs "out"))
14854 (share/quex (string-append out "/share/quex"))
14855 (bin (string-append out "/bin")))
14856 (copy-recursively "." share/quex)
14858 (symlink (string-append share/quex "/quex-exe.py")
14859 (string-append bin "/quex"))
14861 (native-search-paths
14862 (list (search-path-specification
14863 (variable "QUEX_PATH")
14864 (files '("share/quex")))))
14865 (home-page "http://quex.sourceforge.net/")
14866 (synopsis "Lexical analyzer generator in Python")
14867 (description "@code{quex} is a lexical analyzer generator in Python.")
14868 (license license:lgpl2.1+))) ; Non-military
14870 (define-public python2-quex
14871 (package (inherit python2-quex-0.67.3)
14872 (name "python2-quex")
14877 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14880 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14881 (file-name (string-append name "-" version ".tar.gz"))))))
14883 (define-public python-more-itertools
14885 (name "python-more-itertools")
14890 (uri (pypi-uri "more-itertools" version))
14893 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14894 (build-system python-build-system)
14895 (home-page "https://github.com/erikrose/more-itertools")
14896 (synopsis "More routines for operating on iterables, beyond itertools")
14897 (description "Python's built-in @code{itertools} module implements a
14898 number of iterator building blocks inspired by constructs from APL, Haskell,
14899 and SML. @code{more-itertools} includes additional building blocks for
14900 working with iterables.")
14901 (properties `((python2-variant . ,(delay python2-more-itertools))))
14902 (license license:expat)))
14904 ;; The 5.x series are the last versions supporting Python 2.7.
14905 (define-public python2-more-itertools
14907 (inherit python-more-itertools)
14908 (name "python2-more-itertools")
14912 (uri (pypi-uri "more-itertools" version))
14915 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14917 `(#:python ,python2-minimal))
14919 `(("python2-six" ,python2-six-bootstrap)))))
14921 (define-public python-latexcodec
14923 (name "python-latexcodec")
14928 (uri (pypi-uri "latexcodec" version))
14930 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14931 (build-system python-build-system)
14933 `(("python-six" ,python-six)))
14934 (home-page "https://readthedocs.org/projects/latexcodec/")
14935 (synopsis "Work with LaTeX code in Python")
14936 (description "Lexer and codec to work with LaTeX code in Python.")
14937 (license license:expat)))
14939 (define-public python-pybtex
14941 (name "python-pybtex")
14946 (uri (pypi-uri "pybtex" version))
14948 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14949 (build-system python-build-system)
14951 `(("python-nose" ,python-nose)))
14953 `(("python-latexcodec" ,python-latexcodec)
14954 ("python-pyyaml" ,python-pyyaml)
14955 ("python-six" ,python-six)))
14957 `(#:test-target "nosetests"))
14958 (home-page "https://pybtex.org/")
14959 (synopsis "BibTeX-compatible bibliography processor")
14960 (description "Pybtex is a BibTeX-compatible bibliography processor written
14961 in Python. You can simply type pybtex instead of bibtex.")
14962 (license license:expat)))
14964 (define-public python-onetimepass
14966 (name "python-onetimepass")
14971 (uri (pypi-uri "onetimepass" version))
14973 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14974 (build-system python-build-system)
14975 (propagated-inputs `(("python-six" ,python-six)))
14976 (home-page "https://github.com/tadeck/onetimepass/")
14977 (synopsis "One-time password library")
14978 (description "Python one-time password library for HMAC-based (HOTP) and
14979 time-based (TOTP) passwords.")
14980 (license license:expat)))
14982 (define-public python-parso
14984 (name "python-parso")
14989 (uri (pypi-uri "parso" version))
14992 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14994 `(("python-pytest" ,python-pytest)))
14995 (build-system python-build-system)
14997 `(#:phases (modify-phases %standard-phases
14999 (lambda _ (invoke "pytest" "-vv"))))))
15000 (home-page "https://github.com/davidhalter/parso")
15001 (synopsis "Python Parser")
15002 (description "Parso is a Python parser that supports error recovery and
15003 round-trip parsing for different Python versions (in multiple Python versions).
15004 Parso is also able to list multiple syntax errors in your Python file.")
15005 (license license:expat)))
15007 (define-public python2-parso
15008 (package-with-python2 python-parso))
15010 (define-public python-async-generator
15012 (name "python-async-generator")
15017 (uri (pypi-uri "async_generator" version))
15020 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15021 (build-system python-build-system)
15023 `(("python-pytest" ,python-pytest)))
15024 (home-page "https://github.com/python-trio/async_generator")
15025 (synopsis "Async generators and context managers for Python 3.5+")
15026 (description "@code{async_generator} back-ports Python 3.6's native async
15027 generators and Python 3.7's context managers into Python 3.5.")
15029 (license (list license:expat license:asl2.0))))
15031 (define-public python-async-timeout
15033 (name "python-async-timeout")
15038 (uri (pypi-uri "async-timeout" version))
15041 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15042 (build-system python-build-system)
15043 (home-page "https://github.com/aio-libs/async_timeout/")
15044 (synopsis "Timeout context manager for asyncio programs")
15045 (description "@code{async-timeout} provides a timeout timeout context
15046 manager compatible with @code{asyncio}.")
15047 (license license:asl2.0)))
15049 (define-public python-glob2
15051 (name "python-glob2")
15056 (uri (git-reference
15057 (url "https://github.com/miracle2k/python-glob2.git")
15059 (file-name (git-file-name name version))
15061 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15062 (build-system python-build-system)
15063 (home-page "https://github.com/miracle2k/python-glob2/")
15064 (synopsis "Extended Version of the python buildin glob module")
15065 (description "This is an extended version of the Python
15066 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15070 @item The ability to capture the text matched by glob patterns, and return
15071 those matches alongside the file names.
15072 @item A recursive @code{**} globbing syntax, akin for example to the
15073 @code{globstar} option of Bash.
15074 @item The ability to replace the file system functions used, in order to glob
15075 on virtual file systems.
15076 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15079 Glob2 currently based on the glob code from Python 3.3.1.")
15080 (license license:bsd-2)))
15082 (define-public python2-glob2
15083 (package-with-python2 python-glob2))
15085 (define-public python-gipc
15087 (name "python-gipc")
15092 (uri (pypi-uri "gipc" version ".zip"))
15095 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15096 (build-system python-build-system)
15098 `(("unzip" ,unzip)))
15100 `(("python-gevent" ,python-gevent)))
15101 (home-page "http://gehrcke.de/gipc")
15102 (synopsis "Child process management in the context of gevent")
15103 (description "Usage of Python's multiprocessing package in a
15104 gevent-powered application may raise problems. With @code{gipc},
15105 process-based child processes can safely be created anywhere within a
15106 gevent-powered application.")
15107 (license license:expat)))
15109 (define-public python2-gipc
15110 (package-with-python2 python-gipc))
15112 (define-public python-fusepy
15114 (name "python-fusepy")
15119 (uri (pypi-uri "fusepy" version))
15122 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15123 (build-system python-build-system)
15126 (modify-phases %standard-phases
15127 (add-before 'build 'set-library-file-name
15128 (lambda* (#:key inputs #:allow-other-keys)
15129 (let ((fuse (assoc-ref inputs "fuse")))
15130 (substitute* "fuse.py"
15131 (("find_library\\('fuse'\\)")
15132 (string-append "'" fuse "/lib/libfuse.so'")))
15136 (home-page "https://github.com/fusepy/fusepy")
15137 (synopsis "Simple ctypes bindings for FUSE")
15138 (description "Python module that provides a simple interface to FUSE and
15139 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15140 (license license:isc)))
15142 (define-public python2-fusepy
15143 (package-with-python2 python-fusepy))
15145 (define-public python2-gdrivefs
15147 (name "python2-gdrivefs")
15152 (uri (pypi-uri "gdrivefs" version))
15155 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15156 (build-system python-build-system)
15158 `(#:python ,python-2
15160 (modify-phases %standard-phases
15161 (add-before 'build 'patch-setup-py
15163 ;; Update requirements from dependency==version
15164 ;; to dependency>=version
15165 (substitute* "gdrivefs/resources/requirements.txt"
15169 `(("python2-gipc" ,python2-gipc)
15170 ("python2-gevent" ,python2-gevent)
15171 ("python2-greenlet" ,python2-greenlet)
15172 ("python2-httplib2" ,python2-httplib2)
15173 ("python2-uritemplate" ,python2-uritemplate)
15174 ("python2-oauth2client" ,python2-oauth2client)
15175 ("python2-six" ,python2-six)))
15177 `(("python2-dateutil" ,python2-dateutil)
15178 ("python2-fusepy" ,python2-fusepy)
15179 ("python2-google-api-client" ,python2-google-api-client)))
15180 (home-page "https://github.com/dsoprea/GDriveFS")
15181 (synopsis "Mount Google Drive as a local file system")
15182 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15183 under Python 2.7.")
15184 (license license:gpl2)))
15186 (define-public pybind11
15192 (uri (git-reference
15193 (url "https://github.com/pybind/pybind11.git")
15194 (commit (string-append "v" version))))
15197 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15198 (file-name (git-file-name name version))))
15199 (build-system cmake-build-system)
15201 `(("python" ,python)
15202 ("python-pytest" ,python-pytest)))
15204 `(#:test-target "check"))
15205 (home-page "https://github.com/pybind/pybind11/")
15206 (synopsis "Seamless operability between C++11 and Python")
15207 (description "pybind11 is a lightweight header-only library that exposes
15208 C++ types in Python and vice versa, mainly to create Python bindings of
15209 existing C++ code. Its goals and syntax are similar to the excellent
15210 Boost.Python library by David Abrahams: to minimize boilerplate code in
15211 traditional extension modules by inferring type information using compile-time
15213 (license license:expat)))
15215 (define-public python-fasteners
15217 (name "python-fasteners")
15222 (uri (pypi-uri "fasteners" version))
15225 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15226 (build-system python-build-system)
15228 `(("python-monotonic" ,python-monotonic)
15229 ("python-six" ,python-six)
15230 ("python-testtools" ,python-testtools)))
15231 (home-page "https://github.com/harlowja/fasteners")
15232 (synopsis "Python package that provides useful locks")
15234 "This package provides a Python program that provides following locks:
15237 @item Locking decorator
15238 @item Reader-writer locks
15239 @item Inter-process locks
15240 @item Generic helpers
15242 (properties `((python2-variant . ,(delay python2-fasteners))))
15243 (license license:asl2.0)))
15245 (define-public python2-fasteners
15246 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15250 `(("python2-futures" ,python2-futures)
15251 ,@(package-propagated-inputs base))))))
15253 (define-public python-requests-file
15255 (name "python-requests-file")
15260 (uri (pypi-uri "requests-file" version))
15263 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15264 (build-system python-build-system)
15266 `(("python-requests" ,python-requests)
15267 ("python-six" ,python-six)))
15269 "https://github.com/dashea/requests-file")
15270 (synopsis "File transport adapter for Requests")
15272 "Requests-File is a transport adapter for use with the Requests Python
15273 library to allow local file system access via @code{file://} URLs.")
15274 (license license:asl2.0)))
15276 (define-public python2-requests-file
15277 (package-with-python2 python-requests-file))
15279 (define-public python-tldextract
15281 (name "python-tldextract")
15286 (uri (pypi-uri "tldextract" version))
15289 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15290 (build-system python-build-system)
15292 `(("python-pytest" ,python-pytest)
15293 ("python-responses" ,python-responses)))
15295 `(("python-idna" ,python-idna)
15296 ("python-requests" ,python-requests)
15297 ("python-requests-file" ,python-requests-file)))
15299 "https://github.com/john-kurkowski/tldextract")
15301 "Separate the TLD from the registered domain and subdomains of a URL")
15303 "TLDExtract accurately separates the TLD from the registered domain and
15304 subdomains of a URL, using the Public Suffix List. By default, this includes
15305 the public ICANN TLDs and their exceptions. It can optionally support the
15306 Public Suffix List's private domains as well.")
15307 (license license:bsd-3)))
15309 (define-public python2-tldextract
15310 (package-with-python2 python-tldextract))
15312 (define-public python-pynamecheap
15314 (name "python-pynamecheap")
15319 (uri (pypi-uri "PyNamecheap" version))
15322 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15323 (build-system python-build-system)
15325 `(("python-requests" ,python-requests)))
15327 "https://github.com/Bemmu/PyNamecheap")
15329 "Namecheap API client in Python")
15331 "PyNamecheap is a Namecheap API client in Python.")
15332 (license license:expat)))
15334 (define-public python2-pynamecheap
15335 (package-with-python2 python-pynamecheap))
15337 (define-public python-dns-lexicon
15339 (name "python-dns-lexicon")
15344 (uri (pypi-uri "dns-lexicon" version))
15347 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15348 (build-system python-build-system)
15350 `(#:tests? #f)) ;requires internet access
15352 `(("python-future" ,python-future)
15353 ("python-pynamecheap" ,python-pynamecheap)
15354 ("python-requests" ,python-requests)
15355 ("python-tldextract" ,python-tldextract)
15356 ("python-urllib3" ,python-urllib3)))
15357 (home-page "https://github.com/AnalogJ/lexicon")
15359 "Manipulate DNS records on various DNS providers")
15361 "Lexicon provides a way to manipulate DNS records on multiple DNS
15362 providers in a standardized way. It has a CLI but it can also be used as a
15363 Python library. It was designed to be used in automation, specifically with
15365 (license license:expat)))
15367 (define-public python2-dns-lexicon
15368 (package-with-python2 python-dns-lexicon))
15370 (define-public python-commandlines
15372 (name "python-commandlines")
15377 (uri (pypi-uri "commandlines" version))
15380 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15381 (build-system python-build-system)
15382 (home-page "https://github.com/chrissimpkins/commandlines")
15383 (synopsis "Command line argument to object parsing library")
15385 "@code{Commandlines} is a Python library for command line application
15386 development that supports command line argument parsing, command string
15387 validation testing and application logic.")
15388 (license license:expat)))
15390 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15391 ;; python-numba. They have a very unflexible relationship.
15392 (define-public python-numba
15394 (name "python-numba")
15399 (uri (pypi-uri "numba" version))
15402 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15403 (build-system python-build-system)
15405 `(#:modules ((guix build utils)
15406 (guix build python-build-system)
15411 (modify-phases %standard-phases
15412 (add-after 'unpack 'disable-proprietary-features
15414 (setenv "NUMBA_DISABLE_HSA" "1")
15415 (setenv "NUMBA_DISABLE_CUDA" "1")
15417 (add-after 'unpack 'remove-failing-tests
15419 ;; FIXME: these tests fail for unknown reasons:
15420 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15421 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15422 (substitute* "numba/tests/test_dispatcher.py"
15423 (("def test(_non_writable_pycache)" _ m)
15424 (string-append "def guix_skip" m))
15425 (("def test(_non_creatable_pycache)" _ m)
15426 (string-append "def guix_skip" m))
15427 (("def test(_frozen)" _ m)
15428 (string-append "def guix_skip" m)))
15430 ;; These tests fail because we don't run the tests from the build
15431 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15432 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15433 (substitute* "numba/tests/test_pycc.py"
15434 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15435 (string-append "def guix_skip" m)))
15439 (let ((cwd (getcwd)))
15440 (setenv "PYTHONPATH"
15441 (string-append cwd "/build/"
15442 (find (cut string-prefix? "lib" <>)
15443 (scandir (string-append cwd "/build")))
15445 (getenv "PYTHONPATH")))
15446 ;; Something is wrong with the PYTHONPATH when running the
15447 ;; tests from the build directory, as it complains about not being
15448 ;; able to import certain modules.
15449 (with-directory-excursion "/tmp"
15450 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15453 `(("python-llvmlite" ,python-llvmlite)
15454 ("python-numpy" ,python-numpy)
15455 ("python-singledispatch" ,python-singledispatch)))
15456 ;; Needed for tests.
15458 `(("python-jinja2" ,python-jinja2)
15459 ("python-pygments" ,python-pygments)))
15460 (home-page "https://numba.pydata.org")
15461 (synopsis "Compile Python code using LLVM")
15462 (description "Numba gives you the power to speed up your applications with
15463 high performance functions written directly in Python. With a few
15464 annotations, array-oriented and math-heavy Python code can be just-in-time
15465 compiled to native machine instructions, similar in performance to C, C++ and
15466 Fortran, without having to switch languages or Python interpreters.
15468 Numba works by generating optimized machine code using the LLVM compiler
15469 infrastructure at import time, runtime, or statically (using the included pycc
15471 (license license:bsd-3)))
15473 (define-public python-anndata
15475 (name "python-anndata")
15480 (uri (pypi-uri "anndata" version))
15483 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15484 (build-system python-build-system)
15486 `(("python-h5py" ,python-h5py)
15487 ("python-natsort" ,python-natsort)
15488 ("python-pandas" ,python-pandas)
15489 ("python-scipy" ,python-scipy)))
15490 (home-page "https://github.com/theislab/anndata")
15491 (synopsis "Annotated data for data analysis pipelines")
15492 (description "Anndata is a package for simple (functional) high-level APIs
15493 for data analysis pipelines. In this context, it provides an efficient,
15494 scalable way of keeping track of data together with learned annotations and
15495 reduces the code overhead typically encountered when using a mostly
15496 object-oriented library such as @code{scikit-learn}.")
15497 (license license:bsd-3)))
15499 (define-public python-dill
15501 (name "python-dill")
15506 (uri (pypi-uri "dill" version))
15508 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15509 (build-system python-build-system)
15510 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15511 (arguments '(#:tests? #f))
15512 (home-page "https://pypi.org/project/dill")
15513 (synopsis "Serialize all of Python")
15514 (description "Dill extends Python's @code{pickle} module for serializing
15515 and de-serializing Python objects to the majority of the built-in Python
15516 types. Dill provides the user the same interface as the @code{pickle} module,
15517 and also includes some additional features. In addition to pickling Python
15518 objects, @code{dill} provides the ability to save the state of an interpreter
15519 session in a single command. Hence, it would be feasible to save a
15520 interpreter session, close the interpreter, ship the pickled file to another
15521 computer, open a new interpreter, unpickle the session and thus continue from
15522 the saved state of the original interpreter session.")
15523 (license license:bsd-3)))
15525 (define-public python-multiprocess
15527 (name "python-multiprocess")
15528 (version "0.70.6.1")
15532 (uri (pypi-uri "multiprocess" version))
15535 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15536 (build-system python-build-system)
15538 `(("python-dill" ,python-dill)))
15539 (home-page "https://pypi.org/project/multiprocess")
15540 (synopsis "Multiprocessing and multithreading in Python")
15542 "This package is a fork of the multiprocessing Python package, a package
15543 which supports the spawning of processes using the API of the standard
15544 library's @code{threading} module.")
15545 (license license:bsd-3)))
15547 (define-public python-toolz
15549 (name "python-toolz")
15554 (uri (pypi-uri "toolz" version))
15557 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15558 (build-system python-build-system)
15559 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15560 ;; unregistered loader type"
15561 (arguments '(#:tests? #f))
15562 (home-page "https://github.com/pytoolz/toolz/")
15563 (synopsis "List processing tools and functional utilities")
15565 "This package provides a set of utility functions for iterators,
15566 functions, and dictionaries.")
15567 (license license:bsd-3)))
15569 (define-public python2-toolz
15570 (package-with-python2 python-toolz))
15572 (define-public python-cytoolz
15574 (name "python-cytoolz")
15575 (version "0.9.0.1")
15579 (uri (pypi-uri "cytoolz" version))
15582 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15583 (build-system python-build-system)
15584 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15586 (arguments '(#:tests? #f))
15588 `(("python-toolz" ,python-toolz)))
15590 `(("python-cython" ,python-cython)))
15591 (home-page "https://github.com/pytoolz/cytoolz")
15592 (synopsis "High performance functional utilities")
15594 "The cytoolz package implements the same API as provided by toolz. The
15595 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15596 that is accessible to other projects developed in Cython.")
15597 (license license:bsd-3)))
15599 (define-public python-sortedcontainers
15601 (name "python-sortedcontainers")
15606 (uri (pypi-uri "sortedcontainers" version))
15609 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15610 (build-system python-build-system)
15612 `(("python-tox" ,python-tox)))
15613 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15614 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15616 "This package provides a sorted collections library, written in
15618 (license license:asl2.0)))
15620 (define-public python-cloudpickle
15622 (name "python-cloudpickle")
15627 (uri (pypi-uri "cloudpickle" version))
15630 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15631 (build-system python-build-system)
15632 ;; FIXME: there are 5 errors in 122 tests:
15633 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15634 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15635 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15636 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15637 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15638 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15639 (arguments '(#:tests? #f))
15641 `(("python-pytest" ,python-pytest)
15642 ("python-mock" ,python-mock)
15643 ("python-tornado" ,python-tornado)))
15644 (home-page "https://github.com/cloudpipe/cloudpickle")
15645 (synopsis "Extended pickling support for Python objects")
15647 "Cloudpickle makes it possible to serialize Python constructs not
15648 supported by the default pickle module from the Python standard library. It
15649 is especially useful for cluster computing where Python expressions are
15650 shipped over the network to execute on remote hosts, possibly close to the
15652 (license license:bsd-3)))
15654 (define-public python2-cloudpickle
15655 (package-with-python2 python-cloudpickle))
15657 (define-public python-locket
15659 (name "python-locket")
15664 (uri (pypi-uri "locket" version))
15667 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15668 (build-system python-build-system)
15669 (home-page "https://github.com/mwilliamson/locket.py")
15670 (synopsis "File-based locks for Python")
15672 "Locket implements a lock that can be used by multiple processes provided
15673 they use the same path.")
15674 (license license:bsd-2)))
15676 (define-public python2-locket
15677 (package-with-python2 python-locket))
15679 (define-public python-blosc
15681 (name "python-blosc")
15686 (uri (pypi-uri "blosc" version))
15689 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15690 (build-system python-build-system)
15691 ;; FIXME: all tests pass, but then this error is printed:
15692 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15693 (arguments '(#:tests? #f))
15695 `(("python-numpy" ,python-numpy)))
15696 (home-page "https://github.com/blosc/python-blosc")
15697 (synopsis "Python wrapper for the Blosc data compressor library")
15698 (description "Blosc is a high performance compressor optimized for binary
15699 data. It has been designed to transmit data to the processor cache faster
15700 than the traditional, non-compressed, direct memory fetch approach via a
15701 @code{memcpy()} system call.
15703 Blosc works well for compressing numerical arrays that contains data with
15704 relatively low entropy, like sparse data, time series, grids with
15705 regular-spaced values, etc.
15707 This Python package wraps the Blosc library.")
15708 (license license:bsd-3)))
15710 (define-public python2-blosc
15711 (package-with-python2 python-blosc))
15713 (define-public python-partd
15715 (name "python-partd")
15720 (uri (pypi-uri "partd" version))
15723 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15724 (build-system python-build-system)
15726 `(("python-blosc" ,python-blosc)
15727 ("python-locket" ,python-locket)
15728 ("python-numpy" ,python-numpy)
15729 ("python-pandas" ,python-pandas)
15730 ("python-pyzmq" ,python-pyzmq)
15731 ("python-toolz" ,python-toolz)))
15732 (home-page "https://github.com/dask/partd/")
15733 (synopsis "Appendable key-value storage")
15734 (description "Partd stores key-value pairs. Values are raw bytes. We
15735 append on old values. Partd excels at shuffling operations.")
15736 (license license:bsd-3)))
15738 (define-public python2-partd
15739 (package-with-python2 python-partd))
15741 (define-public python-dask
15743 (name "python-dask")
15748 (uri (pypi-uri "dask" version))
15750 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15751 (build-system python-build-system)
15752 ;; A single test out of 5000+ fails. This test is marked as xfail when
15753 ;; pytest-xdist is used.
15756 (modify-phases %standard-phases
15757 (add-after 'unpack 'disable-broken-test
15759 (substitute* "dask/tests/test_threaded.py"
15760 (("def test_interrupt\\(\\)" m)
15761 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15763 (when (which "python2")
15764 ;; This test fails with recent Pandas:
15765 ;; <https://github.com/dask/dask/issues/3794>.
15766 (substitute* "dask/dataframe/tests/test_dataframe.py"
15767 (("def test_info\\(\\)" m)
15768 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15772 (lambda _ (invoke "pytest" "-vv"))))))
15774 `(("python-cloudpickle" ,python-cloudpickle)
15775 ("python-numpy" ,python-numpy)
15776 ("python-pandas" ,python-pandas)
15777 ("python-partd" ,python-partd)
15778 ("python-toolz" ,python-toolz)
15779 ("python-pyyaml" ,python-pyyaml)))
15781 `(("python-pytest" ,python-pytest)
15782 ("python-pytest-runner" ,python-pytest-runner)))
15783 (home-page "https://github.com/dask/dask/")
15784 (synopsis "Parallel computing with task scheduling")
15786 "Dask is a flexible parallel computing library for analytics. It
15787 consists of two components: dynamic task scheduling optimized for computation,
15788 and large data collections like parallel arrays, dataframes, and lists that
15789 extend common interfaces like NumPy, Pandas, or Python iterators to
15790 larger-than-memory or distributed environments. These parallel collections
15791 run on top of the dynamic task schedulers. ")
15792 (license license:bsd-3)))
15794 (define-public python2-dask
15795 (package-with-python2 python-dask))
15797 (define-public python-ilinkedlist
15799 (name "python-ilinkedlist")
15804 (uri (pypi-uri "ilinkedlist" version))
15807 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15808 (build-system python-build-system)
15809 (native-inputs `(("python-pytest" ,python-pytest)))
15810 (inputs `(("python" ,python)))
15811 (home-page "https://github.com/luther9/ilinkedlist-py")
15812 (synopsis "Immutable linked list library")
15814 "This is a implementation of immutable linked lists for Python. It
15815 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15816 Since a linked list is treated as immutable, it is hashable, and its length
15817 can be retrieved in constant time. Some of the terminology is inspired by
15818 LISP. It is possible to create an improper list by creating a @code{Pair}
15819 with a non-list @code{cdr}.")
15820 (license license:gpl3+)))
15822 (define-public python-readlike
15824 (name "python-readlike")
15829 (uri (pypi-uri "readlike" version))
15831 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15832 (build-system python-build-system)
15833 (home-page "https://github.com/jangler/readlike")
15834 (synopsis "GNU Readline-like line editing module")
15836 "This Python module provides line editing functions similar to the default
15837 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15838 @code{readline} package, this one allows access to those capabilties in settings
15839 outside of a standard command-line interface. It is especially well-suited to
15840 interfacing with Urwid, due to a shared syntax for describing key inputs.
15842 Currently, all stateless Readline commands are implemented. Yanking and history
15843 are not supported.")
15844 (license license:expat)))
15846 (define-public python2-readlike
15847 (package-with-python2 python-readlike))
15849 (define-public python-reparser
15851 (name "python-reparser")
15856 (uri (pypi-uri "ReParser" version))
15858 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15859 (build-system python-build-system)
15860 (home-page "https://github.com/xmikos/reparser")
15861 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15863 "This Python library provides a simple lexer/parser for inline markup based
15864 on regular expressions.")
15865 (license license:expat)))
15867 (define-public python2-reparser
15868 (let ((reparser (package-with-python2
15869 (strip-python2-variant python-reparser))))
15870 (package (inherit reparser)
15872 `(("python2-enum34" ,python2-enum34)
15873 ,@(package-propagated-inputs reparser))))))
15875 (define-public python-precis-i18n
15877 (name "python-precis-i18n")
15882 (uri (pypi-uri "precis_i18n" version))
15885 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15886 (build-system python-build-system)
15887 (home-page "https://github.com/byllyfish/precis_i18n")
15888 (synopsis "Implementation of the PRECIS framework")
15890 "This module implements the PRECIS Framework as described in RFC 8264,
15891 RFC 8265 and RFC 8266.")
15892 (license license:expat)))
15894 (define-public python-absl-py
15896 (name "python-absl-py")
15901 (uri (pypi-uri "absl-py" version))
15904 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15905 (build-system python-build-system)
15907 `(("python-six" ,python-six)))
15908 (home-page "https://github.com/abseil/abseil-py")
15909 (synopsis "Abseil Python common libraries")
15911 "This package provides the Abseil Python Common Libraries, a collection
15912 of Python libraries for building Python applications.")
15913 (license license:asl2.0)))
15915 (define-public python-astor
15917 (name "python-astor")
15922 (uri (pypi-uri "astor" version))
15925 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15926 (build-system python-build-system)
15927 ;; FIXME: There are two errors and two test failures.
15928 (arguments `(#:tests? #f))
15929 (home-page "https://github.com/berkerpeksag/astor")
15930 (synopsis "Read and write Python ASTs")
15931 (description "Astor is designed to allow easy manipulation of Python
15932 source via the Abstract Syntax Tree.")
15933 (license license:bsd-3)))
15935 (define-public python2-astor
15936 (package-with-python2 python-astor))
15938 (define-public python-grpcio
15940 (name "python-grpcio")
15945 (uri (pypi-uri "grpcio" version))
15948 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15949 (build-system python-build-system)
15951 `(("python-six" ,python-six)))
15952 (home-page "https://grpc.io")
15953 (synopsis "HTTP/2-based RPC framework")
15954 (description "This package provides a Python library for communicating
15955 with the HTTP/2-based RPC framework gRPC.")
15956 (license license:asl2.0)))
15958 (define-public python-astunparse
15960 (name "python-astunparse")
15965 (uri (pypi-uri "astunparse" version))
15967 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15968 (build-system python-build-system)
15969 (arguments '(#:tests? #f)) ; there are none
15971 `(("python-six" ,python-six)
15972 ("python-wheel" ,python-wheel)))
15973 (home-page "https://github.com/simonpercivall/astunparse")
15974 (synopsis "AST unparser for Python")
15975 (description "This package provides an AST unparser for Python. It is a
15976 factored out version of @code{unparse} found in the Python source
15978 (license license:bsd-3)))
15980 (define-public python-gast
15982 (name "python-gast")
15987 (uri (pypi-uri "gast" version))
15989 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15990 (build-system python-build-system)
15992 `(("python-astunparse" ,python-astunparse)))
15993 (home-page "https://pypi.org/project/gast/")
15994 (synopsis "Generic Python AST that abstracts the underlying Python version")
15996 "GAST provides a compatibility layer between the AST of various Python
15997 versions, as produced by @code{ast.parse} from the standard @code{ast}
15999 (license license:bsd-3)))
16001 (define-public python-wikidata
16003 (name "python-wikidata")
16008 (uri (pypi-uri "Wikidata" version))
16011 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16012 (build-system python-build-system)
16014 `(("python-babel" ,python-babel)))
16015 (home-page "https://github.com/dahlia/wikidata")
16016 (synopsis "Wikidata client library")
16018 "This package provides a Python interface to
16019 @url{https://www.wikidata.org/, Wikidata}.")
16020 (properties '((upstream-name . "Wikidata")))
16021 (license license:gpl3+)))
16023 (define-public python-doctest-ignore-unicode
16025 (name "python-doctest-ignore-unicode")
16030 (uri (pypi-uri "doctest-ignore-unicode" version))
16033 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16034 (build-system python-build-system)
16036 `(("python-nose" ,python-nose)))
16037 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16038 (synopsis "Ignore Unicode literal prefixes in doctests")
16040 "This package adds support for a flag to ignore Unicode literal prefixes
16042 (license license:asl2.0)))
16044 (define-public python-attr
16046 (name "python-attr")
16051 (uri (pypi-uri "attr" version))
16054 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16055 (build-system python-build-system)
16056 (home-page "https://github.com/denis-ryzhkov/attr")
16057 (synopsis "Decorator for attributes of target function or class")
16058 (description "Simple decorator to set attributes of target function or
16059 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16060 (license license:expat)))
16062 (define-public python-construct
16064 (name "python-construct")
16069 (uri (pypi-uri "construct" version))
16072 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16073 (build-system python-build-system)
16075 `(#:tests? #f)) ; No tests exist.
16077 `(("python-extras" ,python-extras)
16078 ("python-arrow" ,python-arrow)
16079 ("python-numpy" ,python-numpy)
16080 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16081 (home-page "http://construct.readthedocs.io")
16082 (synopsis "Declarative and symmetrical parser and builder for binary data")
16084 "This package provides both simple, atomic constructs (such as
16085 integers of various sizes), as well as composite ones which allow you
16086 form hierarchical and sequential structures of increasing complexity.
16087 It features bit and byte granularity, easy debugging and testing, an
16088 easy-to-extend subclass system, and lots of primitive constructs to
16089 make your work easier.")
16090 (license license:expat)))
16092 (define-public python-humanize
16094 (name "python-humanize")
16099 (uri (pypi-uri "humanize" version))
16102 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16104 '(#:tests? #f)) ; tests not in pypi archive
16105 (build-system python-build-system)
16106 (home-page "https://github.com/jmoiron/humanize")
16107 (synopsis "Print numerical information in a human-readable form")
16108 (description "This package provides a Python module that displays numbers
16109 and dates in \"human readable\" forms. For example, it would display
16110 \"12345591313\" as \"12.3 billion\".")
16111 (license license:expat)))
16113 (define-public python-txaio
16115 (name "python-txaio")
16120 (uri (pypi-uri "txaio" version))
16123 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16124 (build-system python-build-system)
16126 `(("python-twisted" ,python-twisted)
16127 ("python-six" ,python-six)))
16128 (home-page "https://github.com/crossbario/txaio")
16129 (synopsis "Compatibility layer between Python asyncio and Twisted")
16130 (description "Txaio provides a compatibility layer between the Python
16131 @code{asyncio} module and @code{Twisted}.")
16132 (license license:expat)))
16134 (define-public python-toolshed
16136 (name "python-toolshed")
16141 (uri (pypi-uri "toolshed" version))
16144 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16145 (build-system python-build-system)
16147 `(("python-nose" ,python-nose)))
16148 (home-page "https://github.com/brentp/toolshed/")
16149 (synopsis "Collection of modules and functions for working with data")
16150 (description "This is a collection of well-tested, simple modules and
16151 functions that aim to reduce boilerplate when working with data.")
16152 (license license:bsd-2)))
16154 (define-public python-annoy
16156 (name "python-annoy")
16161 (uri (pypi-uri "annoy" version))
16164 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16165 (build-system python-build-system)
16167 `(("python-nose" ,python-nose)))
16168 (home-page "https://github.com/spotify/annoy/")
16169 (synopsis "Approximate nearest neighbors library")
16171 "Annoy is a C++ library with Python bindings to search for points in
16172 space that are close to a given query point. It also creates large read-only
16173 file-based data structures that are @code{mmap}ped into memory so that many
16174 processes may share the same data.")
16175 (license license:asl2.0)))
16177 (define-public python-pylzma
16179 (name "python-pylzma")
16184 (uri (pypi-uri "pylzma" version))
16187 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16188 (build-system python-build-system)
16189 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16190 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16191 (description "This package provides Python bindings for the LZMA library
16193 (license license:lgpl2.1+)))
16195 (define-public python2-pylzma
16196 (package-with-python2 python-pylzma))
16198 (define-public python2-zeroconf
16200 (name "python2-zeroconf")
16202 ;; This is the last version that supports Python 2.x.
16207 (uri (pypi-uri "zeroconf" version))
16210 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16211 (build-system python-build-system)
16213 `(#:python ,python-2
16215 (modify-phases %standard-phases
16216 (add-after 'unpack 'patch-requires
16217 (lambda* (#:key inputs #:allow-other-keys)
16218 (substitute* "setup.py"
16223 `(("python2-six" ,python2-six)
16224 ("python2-enum32" ,python2-enum34)
16225 ("python2-netifaces" ,python2-netifaces)
16226 ("python2-typing" ,python2-typing)))
16227 (home-page "https://github.com/jstasiak/python-zeroconf")
16228 (synopsis "Pure Python mDNS service discovery")
16230 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16232 (license license:lgpl2.1+)))
16234 (define-public python-bsddb3
16236 (name "python-bsddb3")
16241 (uri (pypi-uri "bsddb3" version))
16244 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16245 (build-system python-build-system)
16250 (modify-phases %standard-phases
16251 (add-after 'unpack 'configure-locations
16252 (lambda* (#:key inputs #:allow-other-keys)
16253 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16254 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16258 (invoke "python3" "test3.py" "-v"))))))
16259 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16260 (synopsis "Python bindings for Oracle Berkeley DB")
16262 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16263 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16264 Transaction objects, and each of these is exposed as a Python type in the
16265 bsddb3.db module. The database objects can use various access methods: btree,
16266 hash, recno, and queue. Complete support of Berkeley DB distributed
16267 transactions. Complete support for Berkeley DB Replication Manager.
16268 Complete support for Berkeley DB Base Replication. Support for RPC.")
16269 (license license:bsd-3)))
16271 (define-public python-dbfread
16273 (name "python-dbfread")
16277 (uri (pypi-uri "dbfread" version))
16280 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16281 (build-system python-build-system)
16283 `(("python-pytest" ,python-pytest)))
16284 (home-page "https://dbfread.readthedocs.io")
16285 (synopsis "Read DBF Files with Python")
16287 "This library reads DBF files and returns the data as native Python data
16288 types for further processing. It is primarily intended for batch jobs and
16290 (license license:expat)))
16292 (define-public python-cached-property
16294 (name "python-cached-property")
16299 (uri (pypi-uri "cached-property" version))
16302 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16303 (build-system python-build-system)
16306 (modify-phases %standard-phases
16307 ;; https://github.com/pydanny/cached-property/issues/131
16308 ;; recent versions of freezegun break one test
16309 (add-after 'unpack 'disable-broken-test
16311 (substitute* "tests/test_cached_property.py"
16312 (("def test_threads_ttl_expiry\\(self\\)" m)
16313 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16317 `(("python-freezegun" ,python-freezegun)))
16319 "https://github.com/pydanny/cached-property")
16321 "Decorator for caching properties in classes")
16323 "This package provides a decorator which makes caching
16324 time-or-computationally-expensive properties quick and easy and works in Python
16326 (license license:bsd-3)))
16328 (define-public python-folium
16330 (name "python-folium")
16335 (uri (pypi-uri "folium" version))
16338 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16339 (build-system python-build-system)
16341 `(("python-branca" ,python-branca)
16342 ("python-jinja2" ,python-jinja2)
16343 ("python-numpy" ,python-numpy)
16344 ("python-requests" ,python-requests)))
16346 `(("python-pytest" ,python-pytest)))
16347 (home-page "https://github.com/python-visualization/folium")
16348 (synopsis "Make beautiful maps with Leaflet.js & Python")
16349 (description "@code{folium} makes it easy to visualize data that’s been
16350 manipulated in Python on an interactive leaflet map. It enables both the
16351 binding of data to a map for @code{choropleth} visualizations as well as
16352 passing rich vector/raster/HTML visualizations as markers on the map.
16354 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16355 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16356 supports Image, Video, GeoJSON and TopoJSON overlays.")
16357 (license license:expat)))
16359 (define-public jube
16361 ;; This is a command-line tool, so no "python-" prefix.
16366 (uri (string-append
16367 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16371 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16372 (file-name (string-append "jube-" version ".tar.gz"))))
16373 (build-system python-build-system)
16374 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16375 (synopsis "Benchmarking environment")
16377 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16378 benchmarked application, benchmark data is stored in a format that allows JUBE
16379 to deduct the desired information. This data can be parsed by automatic pre-
16380 and post-processing scripts that draw information and store it more densely
16381 for manual interpretation.")
16382 (license license:gpl3+)))
16384 (define-public python-pyroutelib3
16386 (name "python-pyroutelib3")
16387 (version "1.3.post1")
16391 (uri (pypi-uri "pyroutelib3" version))
16394 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16395 (build-system python-build-system)
16397 `(("python-dateutil" ,python-dateutil)))
16398 (home-page "https://github.com/MKuranowski/pyroutelib3")
16399 (synopsis "Library for simple routing on OSM data")
16400 (description "Library for simple routing on OSM data")
16401 (license license:gpl3+)))
16403 (define-public python-elementpath
16405 (name "python-elementpath")
16410 (uri (pypi-uri "elementpath" version))
16413 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16414 (build-system python-build-system)
16416 "https://github.com/sissaschool/elementpath")
16418 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16420 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16421 for Python's ElementTree XML data structures, both for the standard
16422 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16424 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16425 because lxml.etree already has it's own implementation of XPath 1.0.")
16426 (license license:expat)))
16428 (define-public python-bibtexparser
16430 (name "python-bibtexparser")
16435 (uri (pypi-uri "bibtexparser" version))
16438 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16439 (build-system python-build-system)
16441 `(("python-pyparsing" ,python-pyparsing)))
16443 `(("python-future" ,python-future)))
16444 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16445 (synopsis "Python library to parse BibTeX files")
16446 (description "BibtexParser is a Python library to parse BibTeX files.")
16447 (license (list license:bsd-3 license:lgpl3))))
16449 (define-public python-distro
16451 (name "python-distro")
16456 (uri (pypi-uri "distro" version))
16459 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16460 (build-system python-build-system)
16462 `(("python-pytest" ,python-pytest)))
16463 (home-page "https://github.com/nir0s/distro")
16465 "OS platform information API")
16467 "@code{distro} provides information about the OS distribution it runs on,
16468 such as a reliable machine-readable ID, or version information.
16470 It is the recommended replacement for Python's original
16471 `platform.linux_distribution` function (which will be removed in Python 3.8).
16472 @code{distro} also provides a command-line interface to output the platform
16473 information in various formats.")
16474 (license license:asl2.0)))