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 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
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 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7753 (build-system python-build-system)
7755 `(("python-webencodings" ,python-webencodings)
7756 ("python-six" ,python-six)))
7758 `(("python-pytest" ,python-pytest)
7759 ("python-pytest-runner" ,python-pytest-runner-2)))
7760 (home-page "https://github.com/jsocol/bleach")
7761 (synopsis "Whitelist-based HTML-sanitizing tool")
7762 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7763 (license license:asl2.0)))
7765 (define-public python2-bleach
7766 (package-with-python2 python-bleach))
7768 (define-public python-entrypoints
7770 (name "python-entrypoints")
7775 (uri (pypi-uri "entrypoints" version))
7778 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7779 (build-system python-build-system)
7780 ;; The package does not come with a setup.py file, so we have to generate
7785 (modify-phases %standard-phases
7786 (add-after 'unpack 'create-setup.py
7788 (call-with-output-file "setup.py"
7791 from setuptools import setup
7792 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7794 (home-page "https://github.com/takluyver/entrypoints")
7795 (synopsis "Discover and load entry points from installed Python packages")
7796 (description "Entry points are a way for Python packages to advertise
7797 objects with some common interface. The most common examples are
7798 @code{console_scripts} entry points, which define shell commands by
7799 identifying a Python function to run. The @code{entrypoints} module contains
7800 functions to find and load entry points.")
7801 (license license:expat)))
7803 (define-public python2-entrypoints
7804 (package-with-python2 python-entrypoints))
7806 (define-public python-nbconvert
7808 (name "python-nbconvert")
7813 (uri (pypi-uri "nbconvert" version))
7816 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7817 (build-system python-build-system)
7819 `(;; The "bdist_egg" target is disabled by default, causing the installation
7821 #:configure-flags (list "bdist_egg")
7822 ;; FIXME: 5 failures, 40 errors.
7825 ;; (modify-phases %standard-phases
7828 ;; (zero? (system* "py.test" "-v")))))
7830 `(("python-pytest" ,python-pytest)))
7832 `(("python-bleach" ,python-bleach)
7833 ("python-entrypoints" ,python-entrypoints)
7834 ("python-jinja2" ,python-jinja2)
7835 ("python-jupyter-core" ,python-jupyter-core)
7836 ("python-mistune" ,python-mistune)
7837 ("python-nbformat" ,python-nbformat)
7838 ("python-pygments" ,python-pygments)
7839 ("python-traitlets" ,python-traitlets)))
7840 (home-page "http://jupyter.org")
7841 (synopsis "Converting Jupyter Notebooks")
7842 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7843 notebooks to various other formats via Jinja templates. It allows you to
7844 convert an @code{.ipynb} notebook file into various static formats including:
7852 @item ReStructured Text (rst)
7853 @item executable script
7855 (license license:bsd-3)))
7857 (define-public python2-nbconvert
7858 (package-with-python2 python-nbconvert))
7860 (define-public python-notebook
7862 (name "python-notebook")
7866 (uri (pypi-uri "notebook" version))
7869 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7870 (build-system python-build-system)
7873 (modify-phases %standard-phases
7876 ;; These tests require a browser
7877 (delete-file-recursively "notebook/tests/selenium")
7878 ;; Some tests need HOME
7879 (setenv "HOME" "/tmp")
7880 ;; This file contains "warningfilters", which are not supported
7881 ;; by this version of nose.
7882 (delete-file "setup.cfg")
7883 (with-directory-excursion "/tmp"
7884 (invoke "nosetests" "-v"))
7887 `(("python-jupyter-core" ,python-jupyter-core)
7888 ("python-nbformat" ,python-nbformat)
7889 ("python-nbconvert" ,python-nbconvert)
7890 ("python-prometheus-client" ,python-prometheus-client)
7891 ("python-send2trash" ,python-send2trash)
7892 ("python-terminado" ,python-terminado)))
7894 `(("python-nose" ,python-nose)
7895 ("python-sphinx" ,python-sphinx)
7896 ("python-requests" ,python-requests)))
7897 (home-page "http://jupyter.org/")
7898 (synopsis "Web-based notebook environment for interactive computing")
7900 "The Jupyter HTML notebook is a web-based notebook environment for
7901 interactive computing.")
7902 (properties `((python2-variant . ,(delay python2-notebook))))
7903 (license license:bsd-3)))
7905 (define-public python2-notebook
7906 (let ((base (package-with-python2
7907 (strip-python2-variant python-notebook))))
7908 (package (inherit base)
7910 `(("python2-mock" ,python2-mock)
7911 ,@(package-native-inputs base)))
7913 (substitute-keyword-arguments (package-arguments base)
7915 `(modify-phases ,phases
7916 (add-before 'check 'disable-test-case
7917 ;; The test requires network access to localhost. Curiously it
7918 ;; fails with Python 2 only. Simply make the test-case return
7922 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7923 (("formats = self.nbconvert_api") "return #")))))))))))
7925 (define-public python-widgetsnbextension
7927 (name "python-widgetsnbextension")
7932 (uri (pypi-uri "widgetsnbextension" version))
7935 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7936 (build-system python-build-system)
7938 `(("python-ipykernel" ,python-ipykernel)
7939 ("python-notebook" ,python-notebook)))
7941 `(("python-certifi" ,python-certifi)
7942 ("python-nose" ,python-nose)))
7943 (home-page "https://ipython.org")
7944 (synopsis "IPython HTML widgets for Jupyter")
7945 (description "This package provides interactive HTML widgets for Jupyter
7947 (license license:bsd-3)))
7949 (define-public python2-widgetsnbextension
7950 (package-with-python2 python-widgetsnbextension))
7952 (define-public python-ipywidgets
7954 (name "python-ipywidgets")
7959 (uri (pypi-uri "ipywidgets" version))
7962 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7963 (build-system python-build-system)
7965 `(("python-ipython" ,python-ipython)
7966 ("python-traitlets" ,python-traitlets)
7967 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7969 `(("python-nose" ,python-nose)
7970 ("python-pytest" ,python-pytest)))
7971 (home-page "https://ipython.org")
7972 (synopsis "IPython HTML widgets for Jupyter")
7973 (description "Ipywidgets are interactive HTML widgets for Jupyter
7974 notebooks and the IPython kernel. Notebooks come alive when interactive
7975 widgets are used. Users gain control of their data and can visualize changes
7977 (license license:bsd-3)))
7979 (define-public python2-ipywidgets
7980 (package-with-python2 python-ipywidgets))
7982 (define-public python-jupyter-console
7984 (name "python-jupyter-console")
7989 (uri (pypi-uri "jupyter_console" version))
7992 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7993 (build-system python-build-system)
7995 `(("python-ipykernel" ,python-ipykernel)
7996 ("python-jupyter-client" ,python-jupyter-client)
7997 ("python-prompt-toolkit" ,python-prompt-toolkit)
7998 ("python-pygments" ,python-pygments)))
8000 `(("python-nose" ,python-nose)))
8001 (home-page "https://jupyter.org")
8002 (synopsis "Jupyter terminal console")
8003 (description "This package provides a terminal-based console frontend for
8004 Jupyter kernels. It also allows for console-based interaction with non-Python
8005 Jupyter kernels such as IJulia and IRKernel.")
8006 (license license:bsd-3)))
8008 (define-public python2-jupyter-console
8010 (name "python2-jupyter-console")
8015 (uri (pypi-uri "jupyter_console" version))
8018 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8019 (build-system python-build-system)
8020 ;; Tests only run in an TTY.
8021 (arguments `(#:tests? #f))
8023 `(("python2-ipykernel" ,python2-ipykernel)
8024 ("python2-jupyter-client" ,python2-jupyter-client)
8025 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8026 ("python2-pygments" ,python2-pygments)))
8028 `(("python2-nose" ,python2-nose)))
8029 (home-page "https://jupyter.org")
8030 (synopsis "Jupyter terminal console")
8031 (description "This package provides a terminal-based console frontend for
8032 Jupyter kernels. It also allows for console-based interaction with non-Python
8033 Jupyter kernels such as IJulia and IRKernel.")
8034 (license license:bsd-3)))
8036 ;; The python-ipython and python-jupyter-console require each other. To get
8037 ;; the functionality in both packages working, strip down the
8038 ;; python-jupyter-console package when using it as an input to python-ipython.
8039 (define python-jupyter-console-minimal
8041 (inherit python-jupyter-console)
8042 (name "python-jupyter-console-minimal")
8044 (substitute-keyword-arguments
8045 (package-arguments python-jupyter-console)
8047 `(modify-phases ,phases
8048 (add-after 'install 'delete-bin
8049 (lambda* (#:key outputs #:allow-other-keys)
8050 ;; Delete the bin files, to avoid conflicts in profiles
8051 ;; where python-ipython and python-jupyter-console are
8053 (delete-file-recursively
8055 (assoc-ref outputs "out") "/bin"))))))))
8056 ;; Remove the python-ipython propagated input, to avoid the cycle
8060 (package-propagated-inputs python-jupyter-console)))))
8062 (define-public python-qtconsole
8064 (name "python-qtconsole")
8069 (uri (pypi-uri "qtconsole" version))
8072 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8073 (build-system python-build-system)
8075 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8076 ;; but we only have the LTS version 5.x. This means that there might be
8077 ;; runtime errors, but since this is a dependency of the Jupyter package,
8078 ;; and Jupyter can be used without the qtconsole we can overlook this for
8082 (modify-phases %standard-phases
8083 (add-before 'check 'pre-check
8085 (setenv "QT_QPA_PLATFORM" "offscreen")
8088 `(("python-ipykernel" ,python-ipykernel)
8089 ("python-ipython" ,python-ipython)))
8091 `(("python-pytest" ,python-pytest)))
8092 (home-page "http://jupyter.org")
8093 (synopsis "Jupyter Qt console")
8094 (description "This package provides a Qt-based console for Jupyter with
8095 support for rich media output.")
8096 (license license:bsd-3)))
8098 (define-public python-jsbeautifier
8100 (name "python-jsbeautifier")
8102 (home-page "https://github.com/beautify-web/js-beautify")
8107 (commit (string-append "v" version))))
8108 (file-name (git-file-name name version))
8111 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8112 (build-system python-build-system)
8114 `(#:phases (modify-phases %standard-phases
8115 (add-after 'unpack 'chdir
8117 ;; The upstream Git repository contains all the code,
8118 ;; but this package only builds the python code.
8121 (add-after 'unpack 'patch-python-six-requirements
8123 (substitute* "python/setup.py"
8128 `(("python-editorconfig" ,python-editorconfig)
8129 ("python-six" ,python-six)))
8131 `(("python-pytest" ,python-pytest)))
8132 (synopsis "JavaScript unobfuscator and beautifier")
8133 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8134 popular online obfuscators.")
8135 (license license:expat)))
8137 (define-public jupyter
8144 (uri (pypi-uri "jupyter" version))
8147 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8148 (build-system python-build-system)
8149 (arguments '(#:tests? #f)) ; there are none.
8151 `(("python-ipykernel" ,python-ipykernel)
8152 ("python-ipywidgets" ,python-ipywidgets)
8153 ("python-jupyter-console" ,python-jupyter-console)
8154 ("python-nbconvert" ,python-nbconvert)
8155 ("python-notebook" ,python-notebook)
8156 ("python-qtconsole" ,python-qtconsole)))
8157 (native-search-paths
8158 (list (search-path-specification
8159 (variable "JUPYTER_PATH")
8160 (files '("share/jupyter")))))
8161 (home-page "https://jupyter.org")
8162 (synopsis "Web application for interactive documents")
8164 "The Jupyter Notebook is a web application that allows you to create and
8165 share documents that contain live code, equations, visualizations and
8166 explanatory text. Uses include: data cleaning and transformation, numerical
8167 simulation, statistical modeling, machine learning and much more.")
8168 (license license:bsd-3)))
8170 (define-public python-chardet
8172 (name "python-chardet")
8177 (uri (pypi-uri "chardet" version))
8180 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8182 `(("python-hypothesis" ,python-hypothesis)
8183 ("python-pytest" ,python-pytest)
8184 ("python-pytest-runner" ,python-pytest-runner)))
8185 (build-system python-build-system)
8186 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8187 (arguments `(#:tests? #f))
8188 (home-page "https://github.com/chardet/chardet")
8189 (synopsis "Universal encoding detector for Python 2 and 3")
8191 "This package provides @code{chardet}, a Python module that can
8192 automatically detect a wide range of file encodings.")
8193 (license license:lgpl2.1+)))
8195 (define-public python2-chardet
8196 (package-with-python2 python-chardet))
8198 (define-public python-docopt
8200 (name "python-docopt")
8205 ;; The release on PyPI does not include tests.
8207 "https://github.com/docopt/docopt/archive/"
8209 (file-name (string-append name "-" version ".tar.gz"))
8212 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8213 (build-system python-build-system)
8215 `(("python-pytest" ,python-pytest)))
8218 (modify-phases %standard-phases
8220 (lambda _ (invoke "py.test"))))))
8221 (home-page "http://docopt.org")
8222 (synopsis "Command-line interface description language for Python")
8223 (description "This library allows the user to define a command-line
8224 interface from a program's help message rather than specifying it
8225 programmatically with command-line parsers like @code{getopt} and
8227 (license license:expat)))
8229 (define-public python2-docopt
8230 (package-with-python2 python-docopt))
8232 (define-public python-pythondialog
8234 (name "python-pythondialog")
8239 (uri (pypi-uri "pythondialog" version))
8242 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8243 (build-system python-build-system)
8246 (modify-phases %standard-phases
8247 (add-after 'unpack 'patch-path
8248 (lambda* (#:key inputs #:allow-other-keys)
8249 (let* ((dialog (assoc-ref inputs "dialog")))
8250 ;; Since this library really wants to grovel the search path, we
8251 ;; must hardcode dialog's store path into it.
8252 (substitute* "dialog.py"
8253 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8254 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8256 #:tests? #f)) ; no test suite
8258 `(("dialog" ,dialog)))
8259 (home-page "http://pythondialog.sourceforge.net/")
8260 (synopsis "Python interface to the UNIX dialog utility")
8261 (description "A Python wrapper for the dialog utility. Its purpose is to
8262 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8263 This allows one to make simple text-mode user interfaces on Unix-like systems")
8264 (license license:lgpl2.1)
8265 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8267 (define-public python2-pythondialog
8268 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8271 (version (package-version python-pythondialog))
8274 (uri (pypi-uri "python2-pythondialog" version))
8277 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8279 (define-public python-configobj
8281 (name "python-configobj")
8285 (uri (pypi-uri "configobj" version))
8288 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8289 ;; Patch setup.py so it looks for python-setuptools, which is
8290 ;; required to parse the keyword 'install_requires' in setup.py.
8291 (patches (search-patches "python-configobj-setuptools.patch"))))
8292 (build-system python-build-system)
8294 `(("python-six" ,python-six)))
8295 (synopsis "Config file reading, writing and validation")
8296 (description "ConfigObj is a simple but powerful config file reader and
8297 writer: an ini file round tripper. Its main feature is that it is very easy to
8298 use, with a straightforward programmer’s interface and a simple syntax for
8300 (home-page "https://github.com/DiffSK/configobj")
8301 (license license:bsd-3)))
8303 (define-public python2-configobj
8304 (package-with-python2 python-configobj))
8306 (define-public python-configargparse
8308 (name "python-configargparse")
8312 (uri (pypi-uri "ConfigArgParse" version))
8315 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8316 (build-system python-build-system)
8318 `(("python-pyyaml" ,python-pyyaml)))
8321 (modify-phases %standard-phases
8324 ;; Bypass setuptools-shim because one test relies on "setup.py"
8325 ;; being the first argument passed to the python call.
8327 ;; NOTE: Many tests do not run because they rely on Python's
8328 ;; built-in test.test_argparse, but we remove the unit tests from
8329 ;; our Python installation.
8330 (invoke "python" "setup.py" "test"))))))
8331 (synopsis "Replacement for argparse")
8332 (description "A drop-in replacement for argparse that allows options to also
8333 be set via config files and/or environment variables.")
8334 (home-page "https://github.com/bw2/ConfigArgParse")
8335 (license license:expat)))
8337 (define-public python2-configargparse
8338 (package-with-python2 python-configargparse))
8340 (define-public python-argparse-manpage
8342 (name "python-argparse-manpage")
8347 (uri (pypi-uri "argparse-manpage" version))
8350 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8351 (build-system python-build-system)
8352 (home-page "https://github.com/praiskup/argparse-manpage")
8353 (synopsis "Build manual page from Python's ArgumentParser object")
8355 "This package provides tools to build manual pages from Python's
8356 @code{ArgumentParser} object.")
8357 (license license:asl2.0)))
8359 (define-public python-contextlib2
8361 (name "python-contextlib2")
8366 (uri (pypi-uri "contextlib2" version))
8369 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8370 (build-system python-build-system)
8371 (home-page "http://contextlib2.readthedocs.org/")
8372 (synopsis "Tools for decorators and context managers")
8373 (description "This module is primarily a backport of the Python
8374 3.2 contextlib to earlier Python versions. Like contextlib, it
8375 provides utilities for common tasks involving decorators and context
8376 managers. It also contains additional features that are not part of
8377 the standard library.")
8378 (license license:psfl)))
8380 (define-public python2-contextlib2
8382 (name "python2-contextlib2")
8387 (uri (pypi-uri "contextlib2" version))
8390 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8391 (build-system python-build-system)
8393 `(#:python ,python-2
8395 (modify-phases %standard-phases
8397 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8399 `(("python2-unittest2" ,python2-unittest2)))
8400 (home-page "http://contextlib2.readthedocs.org/")
8401 (synopsis "Tools for decorators and context managers")
8402 (description "This module is primarily a backport of the Python
8403 3.2 contextlib to earlier Python versions. Like contextlib, it
8404 provides utilities for common tasks involving decorators and context
8405 managers. It also contains additional features that are not part of
8406 the standard library.")
8407 (license license:psfl)))
8409 (define-public python-texttable
8411 (name "python-texttable")
8416 (uri (pypi-uri "texttable" version))
8419 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8420 (build-system python-build-system)
8421 (arguments '(#:tests? #f)) ; no tests
8422 (home-page "https://github.com/foutaise/texttable/")
8423 (synopsis "Python module for creating simple ASCII tables")
8424 (description "Texttable is a Python module for creating simple ASCII
8426 (license license:lgpl2.1+)))
8428 (define-public python2-texttable
8429 (package-with-python2 python-texttable))
8431 (define-public python-atomicwrites
8433 (name "python-atomicwrites")
8437 (uri (pypi-uri "atomicwrites" version))
8440 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8441 (build-system python-build-system)
8442 (synopsis "Atomic file writes in Python")
8443 (description "Library for atomic file writes using platform dependent tools
8444 for atomic file system operations.")
8445 (home-page "https://github.com/untitaker/python-atomicwrites")
8446 (license license:expat)))
8448 (define-public python2-atomicwrites
8449 (package-with-python2 python-atomicwrites))
8451 (define-public python-click-threading
8453 (name "python-click-threading")
8457 (uri (pypi-uri "click-threading" version))
8460 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8461 (build-system python-build-system)
8463 `(("python-click" ,python-click)))
8464 (synopsis "Utilities for multithreading in Click")
8465 (description "This package provides utilities for multithreading in Click
8467 (home-page "https://github.com/click-contrib/click-threading")
8468 (license license:expat)))
8470 (define-public python-click-log
8472 (name "python-click-log")
8476 (uri (pypi-uri "click-log" version))
8479 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8480 (build-system python-build-system)
8482 `(("python-click" ,python-click)))
8483 (synopsis "Logging for click applications")
8484 (description "This package provides a Python library for logging Click
8486 (home-page "https://github.com/click-contrib/click-log")
8487 (license license:expat)))
8489 (define-public python-apipkg
8491 (name "python-apipkg")
8495 (uri (pypi-uri "apipkg" version))
8498 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8499 (build-system python-build-system)
8501 `(("python-pytest" ,python-pytest)))
8502 (synopsis "Namespace control and lazy-import mechanism")
8503 (description "With apipkg you can control the exported namespace of a Python
8504 package and greatly reduce the number of imports for your users. It is a small
8505 pure Python module that works on virtually all Python versions.")
8506 (home-page "https://github.com/pytest-dev/apipkg")
8507 (license license:expat)))
8509 (define-public python2-apipkg
8510 (package-with-python2 python-apipkg))
8512 (define-public python-execnet
8514 (name "python-execnet")
8518 (uri (pypi-uri "execnet" version))
8521 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8522 (build-system python-build-system)
8524 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8525 ;; The two test failures are caused by the lack of an `ssh` executable.
8526 ;; The test suite can be run with pytest after the 'install' phase.
8529 `(("python-pytest" ,python-pytest)
8530 ("python-setuptools-scm" ,python-setuptools-scm)))
8532 `(("python-apipkg" ,python-apipkg)))
8533 (synopsis "Rapid multi-Python deployment")
8534 (description "Execnet provides a share-nothing model with
8535 channel-send/receive communication for distributing execution across many
8536 Python interpreters across version, platform and network barriers. It has a
8537 minimal and fast API targeting the following uses:
8539 @item distribute tasks to (many) local or remote CPUs
8540 @item write and deploy hybrid multi-process applications
8541 @item write scripts to administer multiple environments
8543 (home-page "http://codespeak.net/execnet/")
8544 (license license:expat)))
8546 (define-public python2-execnet
8547 (package-with-python2 python-execnet))
8549 (define-public python-icalendar
8551 (name "python-icalendar")
8555 (uri (pypi-uri "icalendar" version))
8558 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8559 (build-system python-build-system)
8561 `(("python-dateutil" ,python-dateutil)
8562 ("python-pytz" ,python-pytz)))
8563 (synopsis "Python library for parsing iCalendar files")
8564 (description "The icalendar package is a parser/generator of iCalendar
8565 files for use with Python.")
8566 (home-page "https://github.com/collective/icalendar")
8567 (license license:bsd-2)))
8569 (define-public python-args
8571 (name "python-args")
8575 (uri (pypi-uri "args" version))
8578 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8579 (build-system python-build-system)
8580 (home-page "https://github.com/kennethreitz/args")
8581 (synopsis "Command-line argument parser")
8583 "This library provides a Python module to parse command-line arguments.")
8584 (license license:bsd-3)))
8586 (define-public python2-args
8587 (package-with-python2 python-args))
8589 (define-public python-clint
8591 (name "python-clint")
8595 (uri (pypi-uri "clint" version))
8598 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8599 (build-system python-build-system)
8602 (modify-phases %standard-phases
8604 (lambda _ (invoke "py.test" "-v"))))))
8606 `(("python-pytest" ,python-pytest)))
8608 `(("python-args" ,python-args)))
8609 (home-page "https://github.com/kennethreitz/clint")
8610 (synopsis "Command-line interface tools")
8612 "Clint is a Python module filled with a set of tools for developing
8613 command-line applications, including tools for colored and indented
8614 output, progress bar display, and pipes.")
8615 (license license:isc)))
8617 (define-public python2-clint
8618 (package-with-python2 python-clint))
8620 (define-public python-rply
8622 (name "python-rply")
8626 (uri (pypi-uri "rply" version))
8629 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8630 (build-system python-build-system)
8632 `(("python-appdirs" ,python-appdirs)))
8633 (home-page "https://github.com/alex/rply")
8634 (synopsis "Parser generator for Python")
8636 "This package provides a pure Python based parser generator, that also
8637 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8638 with a new public API, and RPython support.")
8639 (license license:bsd-3)))
8641 (define-public python2-rply
8642 (package-with-python2 python-rply))
8644 (define-public python-hy
8650 (uri (pypi-uri "hy" version))
8653 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8654 (build-system python-build-system)
8657 (modify-phases %standard-phases
8660 ;; Tests require write access to HOME.
8661 (setenv "HOME" "/tmp")
8662 (invoke "nosetests"))))))
8664 `(("python-coverage" ,python-coverage)
8665 ("python-nose" ,python-nose)))
8667 `(("python-astor" ,python-astor)
8668 ("python-clint" ,python-clint)
8669 ("python-rply" ,python-rply)))
8670 (home-page "http://hylang.org/")
8671 (synopsis "Lisp frontend to Python")
8673 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8674 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8675 Python at your fingertips, in Lisp form.")
8676 (license license:expat)))
8678 (define-public python2-hy
8679 (package-with-python2 python-hy))
8681 (define-public python2-functools32
8683 (name "python2-functools32")
8688 (uri (pypi-uri "functools32" version))
8691 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8692 (build-system python-build-system)
8694 `(#:python ,python-2
8695 #:tests? #f)) ; no test target
8696 (home-page "https://github.com/MiCHiLU/python-functools32")
8698 "Backport of the functools module from Python 3.2.3")
8700 "This package is a backport of the @code{functools} module from Python
8701 3.2.3 for use with older versions of Python and PyPy.")
8702 (license license:expat)))
8704 (define-public python2-subprocess32
8706 (name "python2-subprocess32")
8710 (uri (pypi-uri "subprocess32" version))
8713 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8715 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8716 (build-system python-build-system)
8718 `(#:python ,python-2
8719 ;; The test suite fails with Python > 2.7.13:
8720 ;; import test.support
8721 ;; ImportError: No module named support
8724 (modify-phases %standard-phases
8725 (add-after 'unpack 'patch-/bin/sh
8727 (substitute* '("subprocess32.py"
8728 "test_subprocess32.py")
8729 (("/bin/sh") (which "sh")))
8731 (home-page "https://github.com/google/python-subprocess32")
8732 (synopsis "Backport of the subprocess module from Python 3.2")
8734 "This is a backport of the @code{subprocess} standard library module
8735 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8736 new features. On POSIX systems it is guaranteed to be reliable when used
8737 in threaded applications. It includes timeout support from Python 3.3 but
8738 otherwise matches 3.2’s API.")
8739 (license license:psfl)))
8741 (define-public python2-futures
8743 (name "python2-futures")
8748 (uri (pypi-uri "futures" version))
8751 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8752 (build-system python-build-system)
8754 `(#:python ,python-2
8756 (modify-phases %standard-phases
8759 (invoke "python" "test_futures.py")
8761 (home-page "https://github.com/agronholm/pythonfutures")
8763 "Backport of the concurrent.futures package from Python 3.2")
8765 "The concurrent.futures module provides a high-level interface for
8766 asynchronously executing callables. This package backports the
8767 concurrent.futures package from Python 3.2")
8768 (license license:bsd-3)))
8770 (define-public python-promise
8772 (name "python-promise")
8777 (uri (pypi-uri "promise" version))
8780 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8781 (build-system python-build-system)
8782 ;; Tests wants python-futures, which is a python2 only program, and
8783 ;; can't be found by python-promise at test time.
8784 (arguments `(#:tests? #f))
8785 (home-page "https://github.com/syrusakbary/promise")
8786 (synopsis "Promises/A+ implementation for Python")
8788 "Promises/A+ implementation for Python")
8789 (properties `((python2-variant . ,(delay python2-promise))))
8790 (license license:expat)))
8792 (define-public python2-promise
8793 (let ((promise (package-with-python2
8794 (strip-python2-variant python-promise))))
8795 (package (inherit promise)
8796 (arguments (substitute-keyword-arguments (package-arguments promise)
8799 `(("python2-futures" ,python2-futures)
8800 ("python2-pytest" ,python2-pytest)
8801 ,@(package-native-inputs promise))))))
8803 (define-public python-progressbar33
8805 (name "python-progressbar33")
8810 (uri (pypi-uri "progressbar33" version))
8813 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8814 (build-system python-build-system)
8815 (home-page "http://github.com/germangh/python-progressbar")
8816 (synopsis "Text progress bar library for Python")
8818 "This package provides a text progress bar library for Python. This
8819 version only differs from the original @code{progressbar} package in that it
8820 uses relative package imports instead of absolute imports, which is necessary
8821 for the module to work under Python 3.3.")
8822 ;; Either or both of these licenses may be selected.
8823 (license (list license:lgpl2.1+ license:bsd-3))))
8825 (define-public python-colorama
8827 (name "python-colorama")
8832 (uri (pypi-uri "colorama" version))
8835 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8836 (build-system python-build-system)
8837 (synopsis "Colored terminal text rendering for Python")
8838 (description "Colorama is a Python library for rendering colored terminal
8840 (home-page "https://pypi.python.org/pypi/colorama")
8841 (license license:bsd-3)))
8843 (define-public python2-colorama
8844 (package-with-python2 python-colorama))
8846 (define-public python-rsa
8853 (uri (pypi-uri "rsa" version))
8856 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8857 (build-system python-build-system)
8859 `(("python-pyasn1" ,python-pyasn1)))
8860 (synopsis "Pure-Python RSA implementation")
8861 (description "Python-RSA is a pure-Python RSA implementation. It supports
8862 encryption and decryption, signing and verifying signatures, and key
8863 generation according to PKCS#1 version 1.5. It can be used as a Python
8864 library as well as on the command line.")
8865 (home-page "https://stuvel.eu/rsa")
8866 (license license:asl2.0)))
8868 (define-public python2-rsa
8869 (package-with-python2 python-rsa))
8871 (define-public python-pluggy
8873 (name "python-pluggy")
8878 (uri (pypi-uri "pluggy" version))
8881 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8882 (build-system python-build-system)
8884 `(("python-setuptools-scm" ,python-setuptools-scm)))
8885 (synopsis "Plugin and hook calling mechanism for Python")
8886 (description "Pluggy is an extraction of the plugin manager as used by
8887 Pytest but stripped of Pytest specific details.")
8888 (home-page "https://pypi.python.org/pypi/pluggy")
8889 (license license:expat)))
8891 (define-public python2-pluggy
8892 (package-with-python2 python-pluggy))
8894 (define-public python-tox
8901 (uri (pypi-uri "tox" version))
8904 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8905 (build-system python-build-system)
8907 ;; FIXME: Tests require pytest-timeout, which itself requires
8908 ;; pytest>=2.8.0 for installation.
8911 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8912 ("python-py" ,python-py)
8913 ("python-virtualenv" ,python-virtualenv)))
8915 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8916 ("python-pytest" ,python-pytest) ; >= 2.3.5
8917 ("python-setuptools-scm" ,python-setuptools-scm)))
8918 (home-page "http://tox.testrun.org/")
8919 (synopsis "Virtualenv-based automation of test activities")
8920 (description "Tox is a generic virtualenv management and test command line
8921 tool. It can be used to check that a package installs correctly with
8922 different Python versions and interpreters, or run tests in each type of
8923 supported environment, or act as a frontend to continuous integration
8925 (license license:expat)))
8927 (define-public python2-tox
8928 (package-with-python2 python-tox))
8930 (define-public python-jmespath
8932 (name "python-jmespath")
8937 (uri (pypi-uri "jmespath" version))
8940 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8941 (build-system python-build-system)
8943 `(("python-nose" ,python-nose)))
8944 (synopsis "JSON Matching Expressions")
8945 (description "JMESPath (pronounced “james path”) is a Python library that
8946 allows one to declaratively specify how to extract elements from a JSON
8948 (home-page "https://github.com/jmespath/jmespath.py")
8949 (license license:expat)))
8951 (define-public python2-jmespath
8952 (package-with-python2 python-jmespath))
8954 (define-public python-botocore
8956 (name "python-botocore")
8957 (version "1.12.149")
8961 (uri (pypi-uri "botocore" version))
8964 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8965 (build-system python-build-system)
8967 ;; FIXME: Many tests are failing.
8970 `(("python-dateutil" ,python-dateutil)
8971 ("python-docutils" ,python-docutils)
8972 ("python-jmespath" ,python-jmespath)))
8974 `(("python-mock" ,python-mock)
8975 ("python-nose" ,python-nose)
8977 ("python-tox" ,python-tox)
8978 ("python-urllib3" ,python-urllib3)
8979 ("python-wheel" ,python-wheel)))
8980 (home-page "https://github.com/boto/botocore")
8981 (synopsis "Low-level interface to AWS")
8982 (description "Botocore is a Python library that provides a low-level
8983 interface to the Amazon Web Services (AWS) API.")
8984 (license license:asl2.0)))
8986 (define-public python2-botocore
8987 (package-with-python2 python-botocore))
8989 (define-public python-xdo
8996 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8997 "python-xdo_" version ".orig.tar.gz"))
9000 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9001 (build-system python-build-system)
9004 (modify-phases %standard-phases
9005 (add-before 'install 'patch-libxdo-path
9006 ;; Hardcode the path of dynamically loaded libxdo library.
9007 (lambda* (#:key inputs #:allow-other-keys)
9008 (let ((libxdo (string-append
9009 (assoc-ref inputs "xdotool")
9011 (substitute* "xdo/_xdo.py"
9012 (("find_library\\(\"xdo\"\\)")
9013 (simple-format #f "\"~a\"" libxdo)))
9015 #:tests? #f)) ; no tests provided
9017 `(("python-six" ,python-six)))
9019 `(("xdotool" ,xdotool)
9020 ("libX11" ,libx11)))
9021 (home-page "https://tracker.debian.org/pkg/python-xdo")
9022 (synopsis "Python library for simulating X11 keyboard/mouse input")
9023 (description "Provides bindings to libxdo for manipulating X11 via simulated
9024 input. (Note that this is mostly a legacy library; you may wish to look at
9025 python-xdo for newer bindings.)")
9026 (license license:bsd-3)))
9028 (define-public python2-xdo
9029 (package-with-python2 python-xdo))
9031 (define-public python-mako
9033 (name "python-mako")
9038 (uri (pypi-uri "Mako" version))
9041 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9042 (build-system python-build-system)
9044 `(#:phases (modify-phases %standard-phases
9047 (invoke "pytest" "-vv"))))))
9049 `(("python-markupsafe" ,python-markupsafe)))
9051 `(("python-mock" ,python-mock)
9052 ("python-pytest" ,python-pytest)))
9053 (home-page "https://www.makotemplates.org/")
9054 (synopsis "Templating language for Python")
9055 (description "Mako is a templating language for Python that compiles
9056 templates into Python modules.")
9057 (license license:expat)))
9059 (define-public python2-mako
9060 (package-with-python2 python-mako))
9062 (define-public python-waitress
9064 (name "python-waitress")
9069 (uri (pypi-uri "waitress" version))
9070 (patches (search-patches "python-waitress-fix-tests.patch"))
9073 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9074 (build-system python-build-system)
9075 (home-page "https://github.com/Pylons/waitress")
9076 (synopsis "Waitress WSGI server")
9077 (description "Waitress is meant to be a production-quality pure-Python WSGI
9078 server with very acceptable performance.")
9079 (license license:zpl2.1)))
9081 (define-public python2-waitress
9082 (package-with-python2 python-waitress))
9084 (define-public python-pyquery
9086 (name "python-pyquery")
9091 (uri (pypi-uri "pyquery" version))
9094 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9095 (build-system python-build-system)
9097 `(("python-webob" ,python-webob)
9098 ("python-webtest" ,python-webtest)))
9100 `(("python-lxml" ,python-lxml)
9101 ("python-cssselect" ,python-cssselect)))
9102 (home-page "https://github.com/gawel/pyquery")
9103 (synopsis "Make jQuery-like queries on xml documents")
9104 (description "pyquery allows you to make jQuery queries on xml documents.
9105 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9106 fast xml and html manipulation.")
9107 (license license:bsd-3)))
9109 (define-public python-anyjson
9111 (name "python-anyjson")
9116 (uri (pypi-uri "anyjson" version))
9119 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9120 (build-system python-build-system)
9122 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9123 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9124 ;; whatever) so this transformation needs to be done before the tests
9125 ;; can be run. Maybe we could add a build step to transform beforehand
9126 ;; but it could be annoying/difficult.
9127 ;; We can enable tests for the Python 2 version, though, and do below.
9129 (home-page "https://bitbucket.org/runeh/anyjson/")
9131 "Wraps best available JSON implementation in a common interface")
9133 "Anyjson loads whichever is the fastest JSON module installed
9134 and provides a uniform API regardless of which JSON implementation is used.")
9135 (license license:bsd-3)
9136 (properties `((python2-variant . ,(delay python2-anyjson))))))
9138 (define-public python2-anyjson
9139 (let ((anyjson (package-with-python2
9140 (strip-python2-variant python-anyjson))))
9143 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9145 ,@(package-arguments anyjson)))
9146 (native-inputs `(("python2-nose" ,python2-nose))))))
9148 (define-public python-amqp
9150 (name "python-amqp")
9155 (uri (pypi-uri "amqp" version))
9158 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9159 (build-system python-build-system)
9161 `(("python-case" ,python-case)
9162 ("python-pytest-sugar" ,python-pytest-sugar)
9163 ("python-mock" ,python-mock)))
9165 `(("python-vine" ,python-vine)))
9166 (home-page "https://github.com/celery/py-amqp")
9168 "Low-level AMQP client for Python (fork of amqplib)")
9170 "This is a fork of amqplib which was originally written by Barry Pederson.
9171 It is maintained by the Celery project, and used by kombu as a pure python
9172 alternative when librabbitmq is not available.")
9173 (license license:lgpl2.1+)
9174 (properties `((python2-variant . ,(delay python2-amqp))))))
9176 (define-public python2-amqp
9177 (let ((amqp (package-with-python2
9178 (strip-python2-variant python-amqp))))
9181 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9182 ;; unmaintained. Weirdly, does not do this on the python 3
9185 ,@(package-arguments amqp))))))
9187 (define-public python-txamqp
9189 (name "python-txamqp")
9194 (uri (pypi-uri "txAMQP" version))
9197 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9198 (build-system python-build-system)
9200 `(("python-six" ,python-six)
9201 ("python-twisted" ,python-twisted)))
9202 (home-page "https://github.com/txamqp/txamqp")
9203 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9205 "This package provides a Python library for communicating with AMQP peers
9206 and brokers using the asynchronous networking framework Twisted. It contains
9207 all the necessary code to connect, send and receive messages to/from an
9208 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9209 also includes support for using Thrift RPC over AMQP in Twisted
9211 (license license:asl2.0)))
9213 (define-public python2-txamqp
9214 (package-with-python2 python-txamqp))
9216 (define-public python-kombu
9218 (name "python-kombu")
9223 (uri (pypi-uri "kombu" version))
9226 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9227 (build-system python-build-system)
9229 `(("python-mock" ,python-mock)
9230 ("python-case" ,python-case)
9231 ("python-pyro4" ,python-pyro4)
9232 ("python-pytest-sugar" ,python-pytest-sugar)
9233 ("python-pytz" ,python-pytz)))
9235 `(("python-anyjson" ,python-anyjson)
9236 ("python-amqp" ,python-amqp)
9237 ("python-redis" ,python-redis)))
9238 (home-page "https://kombu.readthedocs.io")
9239 (synopsis "Message passing library for Python")
9240 (description "The aim of Kombu is to make messaging in Python as easy as
9241 possible by providing an idiomatic high-level interface for the AMQ protocol,
9242 and also provide proven and tested solutions to common messaging problems.
9243 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9244 message orientation, queuing, routing, reliability and security, for which the
9245 RabbitMQ messaging server is the most popular implementation.")
9246 (license license:bsd-3)
9247 (properties `((python2-variant . ,(delay python2-kombu))))))
9249 (define-public python2-kombu
9250 (let ((kombu (package-with-python2
9251 (strip-python2-variant python-kombu))))
9254 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9255 ;; It works fine on the python3 variant.
9257 ,@(package-arguments kombu)))
9258 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9259 ,@(package-native-inputs kombu))))))
9261 (define-public python-billiard
9263 (name "python-billiard")
9268 (uri (pypi-uri "billiard" version))
9271 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9272 (build-system python-build-system)
9274 `(("python-case" ,python-case)
9275 ("python-pytest" ,python-pytest)))
9276 (home-page "https://github.com/celery/billiard")
9278 "Python multiprocessing fork with improvements and bugfixes")
9280 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9281 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9282 pyprocessing package. This standalone variant is intended to be compatible with
9283 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9284 (license license:bsd-3)
9285 (properties `((python2-variant . ,(delay python2-billiard))))))
9287 (define-public python2-billiard
9288 (let ((billiard (package-with-python2
9289 (strip-python2-variant python-billiard))))
9292 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9293 ("python2-mock" ,python2-mock)
9294 ,@(package-native-inputs billiard))))))
9296 (define-public python-celery
9298 (name "python-celery")
9303 (uri (pypi-uri "celery" version))
9306 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9307 (build-system python-build-system)
9309 '(;; TODO The tests fail with Python 3.7
9310 ;; https://github.com/celery/celery/issues/4849
9313 (modify-phases %standard-phases
9314 (add-after 'unpack 'patch-requirements
9316 (substitute* "requirements/test.txt"
9317 (("pytest>=3\\.0,<3\\.3")
9321 `(("python-case" ,python-case)
9322 ("python-pytest" ,python-pytest)))
9324 `(("python-pytz" ,python-pytz)
9325 ("python-billiard" ,python-billiard)
9326 ("python-kombu" ,python-kombu)))
9327 (home-page "https://celeryproject.org")
9328 (synopsis "Distributed Task Queue")
9329 (description "Celery is an asynchronous task queue/job queue based on
9330 distributed message passing. It is focused on real-time operation, but
9331 supports scheduling as well. The execution units, called tasks, are executed
9332 concurrently on a single or more worker servers using multiprocessing,
9333 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9334 synchronously (wait until ready).")
9335 (license license:bsd-3)
9336 (properties `((python2-variant . ,(delay python2-celery))))))
9338 (define-public python2-celery
9339 (let ((celery (package-with-python2
9340 (strip-python2-variant python-celery))))
9343 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9344 ("python2-mock" ,python2-mock)
9345 ,@(package-native-inputs celery))))))
9347 (define-public python-translitcodec
9349 (name "python-translitcodec")
9354 (uri (pypi-uri "translitcodec" version))
9357 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9358 (build-system python-build-system)
9360 `(#:tests? #f)) ; no tests provided
9362 "https://github.com/claudep/translitcodec")
9364 "Unicode to 8-bit charset transliteration codec")
9366 "This package contains codecs for transliterating ISO 10646 texts into
9367 best-effort representations using smaller coded character sets (ASCII,
9369 (license license:expat)))
9371 (define-public python2-translitcodec
9372 (package-with-python2 python-translitcodec))
9374 (define-public python-editor
9376 (name "python-editor")
9381 (uri (pypi-uri "python-editor" version))
9384 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9385 (build-system python-build-system)
9387 "https://github.com/fmoo/python-editor")
9389 "Programmatically open an editor, capture the result")
9391 "python-editor is a library that provides the editor module for
9392 programmatically interfacing with your system's $EDITOR.")
9393 (license license:asl2.0)))
9395 (define-public python2-editor
9396 (package-with-python2 python-editor))
9398 (define-public python-vobject
9400 (name "python-vobject")
9404 (uri (pypi-uri "vobject" version))
9407 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9408 (build-system python-build-system)
9410 '(;; The test suite relies on some non-portable Windows interfaces.
9413 `(("python-dateutil" ,python-dateutil)
9414 ("python-pyicu" ,python-pyicu)))
9415 (synopsis "Parse and generate vCard and vCalendar files")
9416 (description "Vobject is intended to be a full featured Python package for
9417 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9418 are supported and well tested. vCard 3.0 files are supported, and all data
9419 should be imported, but only a few components are understood in a sophisticated
9421 (home-page "http://eventable.github.io/vobject/")
9422 (license license:asl2.0)))
9424 (define-public python2-vobject
9425 (package-with-python2 python-vobject))
9427 (define-public python-munkres
9429 (name "python-munkres")
9433 (uri (pypi-uri "munkres" version))
9436 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9437 (build-system python-build-system)
9439 '(#:tests? #f)) ; no test suite
9440 (home-page "http://software.clapper.org/munkres/")
9441 (synopsis "Implementation of the Munkres algorithm")
9442 (description "The Munkres module provides an implementation of the Munkres
9443 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9444 useful for solving the Assignment Problem.")
9445 (license license:bsd-3)))
9447 (define-public python2-munkres
9448 (package-with-python2 python-munkres))
9450 (define-public python-whoosh
9452 (name "python-whoosh")
9457 (uri (pypi-uri "Whoosh" version))
9460 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9461 (build-system python-build-system)
9463 `(("python-pytest" ,python-pytest)))
9464 (home-page "https://bitbucket.org/mchaput/whoosh")
9465 (synopsis "Full text indexing, search, and spell checking library")
9467 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9469 (license license:bsd-2)))
9471 (define-public python2-whoosh
9472 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9473 (package (inherit whoosh)
9475 `(("python2-backport-ssl-match-hostname"
9476 ,python2-backport-ssl-match-hostname)
9477 ,@(package-propagated-inputs whoosh))))))
9479 (define-public python-pathlib
9481 (name "python-pathlib")
9485 (uri (pypi-uri "pathlib" version))
9488 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9489 (build-system python-build-system)
9490 ;; The tests depend on the internal "test" module, which does not provide
9491 ;; a stable interface.
9492 (arguments `(#:tests? #f))
9493 (home-page "https://pathlib.readthedocs.org/")
9494 (synopsis "Object-oriented file system paths")
9495 (description "Pathlib offers a set of classes to handle file system paths.
9496 It offers the following advantages over using string objects:
9499 @item No more cumbersome use of os and os.path functions. Everything can
9500 be done easily through operators, attribute accesses, and method calls.
9501 @item Embodies the semantics of different path types. For example,
9502 comparing Windows paths ignores casing.
9503 @item Well-defined semantics, eliminating any inconsistencies or
9504 ambiguities (forward vs. backward slashes, etc.).
9507 Note: In Python 3.4, pathlib is now part of the standard library. For other
9508 Python versions please consider python-pathlib2 instead, which tracks the
9509 standard library module. This module (python-pathlib) isn't maintained
9511 (license license:expat)))
9513 (define-public python2-pathlib
9514 (package-with-python2 python-pathlib))
9516 (define-public python2-pathlib2
9518 (name "python2-pathlib2")
9522 (uri (pypi-uri "pathlib2" version))
9525 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9526 (build-system python-build-system)
9527 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9528 ;; version is 3.4 which already includes this package as part of the
9529 ;; standard library.
9531 `(#:python ,python-2))
9533 `(("python2-scandir" ,python2-scandir)
9534 ("python2-six" ,python2-six)))
9535 (home-page "https://pypi.python.org/pypi/pathlib2/")
9536 (synopsis "Object-oriented file system paths - backport of standard
9538 (description "The goal of pathlib2 is to provide a backport of standard
9539 pathlib module which tracks the standard library module, so all the newest
9540 features of the standard pathlib can be used also on older Python versions.
9542 Pathlib offers a set of classes to handle file system paths. It offers the
9543 following advantages over using string objects:
9546 @item No more cumbersome use of os and os.path functions. Everything can
9547 be done easily through operators, attribute accesses, and method calls.
9548 @item Embodies the semantics of different path types. For example,
9549 comparing Windows paths ignores casing.
9550 @item Well-defined semantics, eliminating any inconsistencies or
9551 ambiguities (forward vs. backward slashes, etc.).
9553 (license license:expat)))
9555 (define-public python2-pathlib2-bootstrap
9558 (inherit python2-pathlib2)
9559 (name "python2-pathlib2-bootstrap")
9561 `(("python2-scandir" ,python2-scandir)
9562 ("python2-six" ,python2-six-bootstrap))))))
9564 (define-public python-jellyfish
9566 (name "python-jellyfish")
9570 (uri (pypi-uri "jellyfish" version))
9573 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9574 (build-system python-build-system)
9576 `(("python-pytest" ,python-pytest)))
9577 (home-page "https://github.com/jamesturk/jellyfish")
9578 (synopsis "Approximate and phonetic matching of strings")
9579 (description "Jellyfish uses a variety of string comparison and phonetic
9580 encoding algorithms to do fuzzy string matching.")
9581 (license license:bsd-2)
9582 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9584 (define-public python2-jellyfish
9585 (let ((jellyfish (package-with-python2
9586 (strip-python2-variant python-jellyfish))))
9587 (package (inherit jellyfish)
9588 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9589 ,@(package-native-inputs jellyfish))))))
9591 (define-public python2-unicodecsv
9593 (name "python2-unicodecsv")
9597 ;; The test suite is not included in the PyPi release.
9598 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9599 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9600 "archive/" version ".tar.gz"))
9601 (file-name (string-append name "-" version ".tar.gz"))
9604 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9605 (build-system python-build-system)
9607 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9608 #:python ,python-2))
9610 `(("python2-unittest2" ,python2-unittest2)))
9611 (home-page "https://github.com/jdunck/python-unicodecsv")
9612 (synopsis "Unicode CSV module for Python 2")
9613 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9614 module, adding support for Unicode strings.")
9615 (license license:bsd-2)))
9617 (define-public python-rarfile
9619 (name "python-rarfile")
9623 (uri (pypi-uri "rarfile" version))
9626 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9627 (build-system python-build-system)
9630 (modify-phases %standard-phases
9632 ;; Many tests fail, but the installation proceeds.
9633 (lambda _ (invoke "make" "-C" "test" "test"))))))
9635 `(("which" ,which))) ; required for tests
9637 `(("libarchive" ,libarchive)))
9638 (home-page "https://github.com/markokr/rarfile")
9639 (synopsis "RAR archive reader for Python")
9640 (description "This is Python module for RAR archive reading. The interface
9641 is made as zipfile like as possible.")
9642 (license license:isc)))
9644 (define-public python2-rarfile
9645 (package-with-python2 python-rarfile))
9647 (define-public python-magic
9649 (name "python-magic")
9654 (uri (pypi-uri "python-magic" version))
9657 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9658 (file-name (string-append name "-" version "-checkout"))))
9659 (build-system python-build-system)
9661 ;; The tests are unreliable, so don't run them. The tests fail
9662 ;; under Python3 because they were written for Python2 and
9663 ;; contain import statements that do not work in Python3. One of
9664 ;; the tests fails under Python2 because its assertions are
9665 ;; overly stringent; it relies on comparing output strings which
9666 ;; are brittle and can change depending on the version of
9667 ;; libmagic being used and the system on which the test is
9668 ;; running. In my case, under GuixSD 0.10.0, only one test
9669 ;; failed, and it seems to have failed only because the version
9670 ;; of libmagic that is packaged in Guix outputs a slightly
9671 ;; different (but not wrong) string than the one that the test
9674 #:phases (modify-phases %standard-phases
9675 ;; Replace a specific method call with a hard-coded
9676 ;; path to the necessary libmagic.so file in the
9677 ;; store. If we don't do this, then the method call
9678 ;; will fail to find the libmagic.so file, which in
9679 ;; turn will cause any application using
9680 ;; python-magic to fail.
9681 (add-before 'build 'hard-code-path-to-libmagic
9682 (lambda* (#:key inputs #:allow-other-keys)
9683 (let ((file (assoc-ref inputs "file")))
9684 (substitute* "magic.py"
9685 (("ctypes.util.find_library\\('magic'\\)")
9686 (string-append "'" file "/lib/libmagic.so'")))
9688 (add-before 'install 'disable-egg-compression
9690 (let ((port (open-file "setup.cfg" "a")))
9691 (display "\n[easy_install]\nzip_ok = 0\n"
9696 ;; python-magic needs to be able to find libmagic.so.
9699 "https://github.com/ahupp/python-magic")
9701 "File type identification using libmagic")
9703 "This module uses ctypes to access the libmagic file type
9704 identification library. It makes use of the local magic database and
9705 supports both textual and MIME-type output. Note that this module and
9706 the python-file module both provide a \"magic.py\" file; these two
9707 modules, which are different and were developed separately, both serve
9708 the same purpose: to provide Python bindings for libmagic.")
9709 (license license:expat)))
9711 (define-public python2-magic
9712 (package-with-python2 python-magic))
9714 (define-public python2-s3cmd
9716 (name "python2-s3cmd")
9721 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9722 "s3cmd-" version ".tar.gz"))
9725 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9726 (build-system python-build-system)
9728 ;; s3cmd is written for python2 only and contains no tests.
9729 `(#:python ,python-2
9732 `(("python2-dateutil" ,python2-dateutil)
9733 ;; The python-file package also provides a magic.py module.
9734 ;; This is an unfortunate state of affairs; however, s3cmd
9735 ;; fails to install if it cannot find specifically the
9736 ;; python-magic package. Thus we include it, instead of using
9737 ;; python-file. Ironically, s3cmd sometimes works better
9738 ;; without libmagic bindings at all:
9739 ;; https://github.com/s3tools/s3cmd/issues/198
9740 ("python2-magic" ,python2-magic)))
9741 (home-page "http://s3tools.org/s3cmd")
9742 (synopsis "Command line tool for S3-compatible storage services")
9744 "S3cmd is a command line tool for uploading, retrieving and managing data
9745 in storage services that are compatible with the Amazon Simple Storage
9746 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9747 GnuPG encryption, and more. It also supports management of Amazon's
9748 CloudFront content delivery network.")
9749 (license license:gpl2+)))
9751 (define-public python-pkgconfig
9753 (name "python-pkgconfig")
9758 (uri (pypi-uri "pkgconfig" version))
9761 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9762 (build-system python-build-system)
9764 `(("python-nose" ,python-nose)))
9766 `(("pkg-config" ,pkg-config)))
9769 (modify-phases %standard-phases
9770 (add-before 'build 'patch
9771 ;; Hard-code the path to pkg-config.
9773 (substitute* "pkgconfig/pkgconfig.py"
9774 (("cmd = 'pkg-config")
9775 (string-append "cmd = '" (which "pkg-config"))))
9779 (invoke "nosetests" "test.py"))))))
9780 (home-page "https://github.com/matze/pkgconfig")
9781 (synopsis "Python interface for pkg-config")
9782 (description "This module provides a Python interface to pkg-config. It
9783 can be used to find all pkg-config packages, check if a package exists,
9784 check if a package meets certain version requirements, query CFLAGS and
9785 LDFLAGS and parse the output to build extensions with setup.py.")
9786 (license license:expat)))
9788 (define-public python2-pkgconfig
9789 (package-with-python2 python-pkgconfig))
9791 (define-public python-bz2file
9793 (name "python-bz2file")
9798 (uri (pypi-uri "bz2file" version))
9801 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9802 (build-system python-build-system)
9804 `(#:tests? #f)) ; Tests use deprecated python modules.
9805 (home-page "https://github.com/nvawda/bz2file")
9806 (synopsis "Read and write bzip2-compressed files")
9808 "Bz2file is a Python library for reading and writing bzip2-compressed
9809 files. It contains a drop-in replacement for the I/O interface in the
9810 standard library's @code{bz2} module, including features from the latest
9811 development version of CPython that are not available in older releases.")
9812 (license license:asl2.0)))
9814 (define-public python2-bz2file
9815 (package-with-python2 python-bz2file))
9817 (define-public python-future
9819 (name "python-future")
9824 (uri (pypi-uri "future" version))
9827 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9828 (build-system python-build-system)
9829 ;; Many tests connect to the network or are otherwise flawed.
9830 ;; https://github.com/PythonCharmers/python-future/issues/210
9833 (home-page "http://python-future.org")
9834 (synopsis "Single-source support for Python 3 and 2")
9836 "@code{python-future} is the missing compatibility layer between Python 2 and
9837 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9838 to support both Python 2 and Python 3 with minimal overhead.")
9839 (license license:expat)))
9841 (define-public python2-future
9842 (package-with-python2 python-future))
9844 (define-public python-cysignals
9846 (name "python-cysignals")
9851 (uri (pypi-uri "cysignals" version))
9854 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9855 (build-system python-build-system)
9857 `(("python-cython" ,python-cython)
9858 ("python-sphinx" ,python-sphinx)))
9860 `(("pari-gp" ,pari-gp)))
9862 `(#:modules ((guix build python-build-system)
9863 ((guix build gnu-build-system) #:prefix gnu:)
9865 ;; FIXME: Tests are executed after installation and currently fail
9866 ;; when not installing into standard locations; the author is working
9870 (modify-phases %standard-phases
9873 (assoc-ref gnu:%standard-phases 'configure)))))
9875 "https://github.com/sagemath/cysignals")
9877 "Handling of interrupts and signals for Cython")
9879 "The cysignals package provides mechanisms to handle interrupts (and
9880 other signals and errors) in Cython code, using two related approaches,
9881 for mixed Cython/Python code or external C libraries and pure Cython code,
9883 (license license:lgpl3+)))
9885 (define-public python2-cysignals
9886 (package-with-python2 python-cysignals))
9888 (define-public python2-shedskin
9890 (name "python2-shedskin")
9895 (uri (string-append "https://github.com/shedskin/shedskin/"
9896 "releases/download/v" version
9897 "/shedskin-" version ".tgz"))
9900 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9901 (build-system python-build-system)
9903 `(#:python ,python-2
9904 #:phases (modify-phases %standard-phases
9905 (add-after 'unpack 'fix-resulting-include-libs
9906 (lambda* (#:key inputs #:allow-other-keys)
9907 (let ((libgc (assoc-ref inputs "libgc"))
9908 (pcre (assoc-ref inputs "pcre")))
9909 (substitute* "shedskin/makefile.py"
9910 (("variable == 'CCFLAGS':[ ]*")
9911 (string-append "variable == 'CCFLAGS':\n"
9912 " line += ' -I " pcre "/include"
9913 " -I " libgc "/include'"))
9914 (("variable == 'LFLAGS':[ ]*")
9915 (string-append "variable == 'LFLAGS':\n"
9916 " line += ' -L" pcre "/lib"
9917 " -L " libgc "/lib'")))
9919 (inputs `(("pcre" ,pcre)
9921 (home-page "https://shedskin.github.io/")
9922 (synopsis "Experimental Python-2 to C++ Compiler")
9923 (description (string-append "This is an experimental compiler for a subset of
9924 Python. It generates C++ code and a Makefile."))
9925 (license (list license:gpl3 license:bsd-3 license:expat))))
9927 (define-public python2-rope
9929 (name "python2-rope")
9934 (uri (pypi-uri "rope" version))
9937 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9939 ;; Rope has only partial python3 support, see `python-rope'
9940 `(#:python ,python-2))
9941 (build-system python-build-system)
9943 `(("python2-unittest2" ,python2-unittest2)))
9944 (home-page "https://github.com/python-rope/rope")
9945 (synopsis "Refactoring library for Python")
9946 (description "Rope is a refactoring library for Python. It facilitates
9947 the renaming, moving and extracting of attributes, functions, modules, fields
9948 and parameters in Python 2 source code. These refactorings can also be applied
9949 to occurrences in strings and comments.")
9950 (license license:gpl2)))
9952 (define-public python-rope
9954 (inherit python2-rope)
9955 (name "python-rope")
9956 (arguments `(#:python ,python-wrapper
9957 ;; XXX: Only partial python3 support, results in some failing
9958 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9960 (properties `((python2-variant . ,(delay python2-rope))))))
9962 (define-public python-py3status
9964 (name "python-py3status")
9969 (uri (pypi-uri "py3status" version))
9972 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9973 (build-system python-build-system)
9978 (modify-phases %standard-phases
9979 ;; 'file' is used for detection of configuration file encoding
9980 ;; let's make link the dependency to particular input
9981 (add-before 'build 'patch-file-path
9982 (lambda* (#:key inputs #:allow-other-keys)
9983 (let ((file-path (assoc-ref inputs "file")))
9984 (substitute* "py3status/parse_config.py"
9985 (("\\['file', '-b'")
9986 (string-append "['" file-path "/bin/file', '-b'")))
9988 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9989 (home-page "https://github.com/ultrabug/py3status")
9990 (synopsis "Extensible i3status wrapper written in Python")
9991 (description "py3status is an i3status wrapper which extends i3status
9992 functionality in a modular way, allowing you to extend your panel with your
9993 own code, responding to click events and updating clock every second.")
9994 (license license:bsd-3)))
9996 (define-public python-tblib
9998 (name "python-tblib")
10002 (uri (pypi-uri "tblib" version))
10004 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10005 (build-system python-build-system)
10008 (modify-phases %standard-phases
10009 (add-before 'check 'adjust-tests
10011 (when (which "python3")
10012 ;; Adjust the example output to match that of Python 3.7:
10013 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10014 (substitute* "README.rst"
10015 (("Exception\\('fail',") "Exception('fail'"))
10019 ;; Upstream runs tests after installation and the package itself
10020 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10022 (setenv "PYTHONPATH"
10023 (string-append (getcwd) "/build/lib:"
10024 (getenv "PYTHONPATH")))
10025 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10027 `(("python-pytest" ,python-pytest)
10028 ("python-six" ,python-six)))
10029 (home-page "https://github.com/ionelmc/python-tblib")
10030 (synopsis "Traceback serialization library")
10032 "Traceback serialization allows you to:
10035 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10036 different processes. This allows better error handling when running code over
10037 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10039 @item Parse traceback strings and raise with the parsed tracebacks.
10041 (license license:bsd-3)))
10043 (define-public python2-tblib
10044 (package-with-python2 python-tblib))
10046 (define-public python-greenlet
10048 (name "python-greenlet")
10052 (uri (pypi-uri "greenlet" version))
10055 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10056 (build-system python-build-system)
10057 (home-page "https://greenlet.readthedocs.io/")
10058 (synopsis "Lightweight in-process concurrent programming")
10060 "Greenlet package is a spin-off of Stackless, a version of CPython
10061 that supports micro-threads called \"tasklets\". Tasklets run
10062 pseudo-concurrently (typically in a single or a few OS-level threads) and
10063 are synchronized with data exchanges on \"channels\".")
10064 (license (list license:psfl license:expat))))
10066 (define-public python2-greenlet
10067 (package-with-python2 python-greenlet))
10069 (define-public python-objgraph
10071 (name "python-objgraph")
10076 (uri (pypi-uri "objgraph" version))
10079 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10080 (build-system python-build-system)
10082 `(("python-graphviz" ,python-graphviz)))
10084 `(("python-mock" ,python-mock)
10085 ("graphviz" ,graphviz)))
10086 (home-page "https://mg.pov.lt/objgraph/")
10087 (synopsis "Draw Python object reference graphs with graphviz")
10089 "This package provides tools to draw Python object reference graphs with
10091 (license license:expat)))
10093 (define-public python-gevent
10095 (name "python-gevent")
10099 (uri (pypi-uri "gevent" version))
10102 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10103 (modules '((guix build utils)))
10106 ;; unbunding libev and c-ares
10107 (delete-file-recursively "deps")
10109 (build-system python-build-system)
10111 `(#:modules ((ice-9 ftw)
10115 (guix build python-build-system))
10116 #:phases (modify-phases %standard-phases
10117 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10119 (substitute* "src/gevent/subprocess.py"
10120 (("/bin/sh") (which "sh")))
10121 (for-each (lambda (file)
10123 (("/bin/sh") (which "sh"))
10124 (("/bin/true") (which "true"))))
10125 (find-files "src/greentest" "\\.py$"))
10127 (add-before 'build 'do-not-use-bundled-sources
10128 (lambda* (#:key inputs #:allow-other-keys)
10129 (setenv "CONFIG_SHELL" (which "bash"))
10130 (setenv "LIBEV_EMBED" "false")
10131 (setenv "CARES_EMBED" "false")
10132 (setenv "EMBED" "false")
10134 ;; Prevent building bundled libev.
10135 (substitute* "setup.py"
10136 (("run_make=_BUILDING")
10139 (let ((greenlet (string-append
10140 (assoc-ref inputs "python-greenlet")
10142 (match (scandir greenlet
10144 (string-prefix? "python" item)))
10146 (setenv "C_INCLUDE_PATH"
10147 (string-append greenlet "/" python)))))
10149 (add-before 'check 'skip-timer-test
10151 ;; XXX: Skip 'TestTimerResolution', which appears to be
10153 (substitute* "src/greentest/test__core_timer.py"
10154 (("not greentest.RUNNING_ON_CI") "False"))
10158 ;; Make sure the build directory is on PYTHONPATH.
10159 (setenv "PYTHONPATH"
10161 (getenv "PYTHONPATH") ":"
10163 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10164 (with-directory-excursion "src/greentest"
10165 ;; XXX: Many tests require network access. Instead we only
10166 ;; run known-good tests. Unfortunately we cannot use
10167 ;; recursion here since this directory also contains
10168 ;; Python-version-specific subfolders.
10169 (apply invoke "python" "testrunner.py" "--config"
10170 "known_failures.py"
10171 (scandir "." (cut regexp-exec
10172 (make-regexp "test_+(subprocess|core)")
10175 `(("python-greenlet" ,python-greenlet)
10176 ("python-objgraph" ,python-objgraph)))
10178 `(("python-six" ,python-six)))
10180 `(("c-ares" ,c-ares)
10182 (home-page "http://www.gevent.org/")
10183 (synopsis "Coroutine-based network library")
10185 "gevent is a coroutine-based Python networking library that uses greenlet
10186 to provide a high-level synchronous API on top of the libev event loop.")
10187 (license license:expat)
10188 (properties `((python2-variant . ,(delay python2-gevent))))))
10190 (define-public python2-gevent
10191 (let ((base (package-with-python2
10192 (strip-python2-variant python-gevent))))
10195 (native-inputs `(,@(package-native-inputs python-gevent)
10196 ("python-mock" ,python2-mock))))))
10198 (define-public python-fastimport
10200 (name "python-fastimport")
10205 (uri (pypi-uri "fastimport" version))
10207 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10208 (build-system python-build-system)
10209 (home-page "https://github.com/jelmer/python-fastimport")
10210 (synopsis "VCS fastimport parser and generator in Python")
10211 (description "This package provides a parser for and generator of the Git
10212 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10214 (license license:gpl2+)))
10216 (define-public python2-fastimport
10217 (package-with-python2 python-fastimport))
10219 (define-public python-twisted
10221 (name "python-twisted")
10225 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10228 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10229 (build-system python-build-system)
10231 '(#:tests? #f)) ; FIXME: some tests fail
10233 `(("python-zope-interface" ,python-zope-interface)
10234 ("python-pyhamcrest" ,python-pyhamcrest)
10235 ("python-incremental" ,python-incremental)
10236 ("python-hyperlink" ,python-hyperlink)
10237 ("python-constantly" ,python-constantly)
10238 ("python-automat" ,python-automat)))
10239 (home-page "https://twistedmatrix.com/")
10240 (synopsis "Asynchronous networking framework written in Python")
10242 "Twisted is an extensible framework for Python programming, with special
10243 focus on event-based network programming and multiprotocol integration.")
10244 (license license:expat)))
10246 (define-public python2-twisted
10247 (package-with-python2 python-twisted))
10249 (define-public python-pika
10251 (name "python-pika")
10256 (uri (pypi-uri "pika" version))
10259 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10260 (build-system python-build-system)
10262 `(("python-pyev" ,python-pyev)
10263 ("python-tornado" ,python-tornado)
10264 ("python-twisted" ,python-twisted)))
10265 (home-page "https://pika.readthedocs.org")
10266 (synopsis "Pure Python AMQP Client Library")
10268 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10269 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10270 network support library.")
10271 (license license:bsd-3)))
10273 (define-public python2-pika
10274 (package-with-python2 python-pika))
10276 (define-public python-ply
10278 (name "python-ply")
10283 (uri (pypi-uri "ply" version))
10286 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10287 (build-system python-build-system)
10288 (home-page "http://www.dabeaz.com/ply/")
10289 (synopsis "Python Lex & Yacc")
10290 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10291 It uses LR parsing and does extensive error checking.")
10292 (license license:bsd-3)))
10294 (define-public python2-ply
10295 (package-with-python2 python-ply))
10297 (define-public python-tabulate
10299 (name "python-tabulate")
10303 (uri (pypi-uri "tabulate" version))
10306 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10307 (build-system python-build-system)
10309 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10310 ;; and the latest release is not tagged in the upstream repository.
10312 (home-page "https://bitbucket.org/astanin/python-tabulate")
10313 (synopsis "Pretty-print tabular data")
10315 "Tabulate is a library and command-line utility to pretty-print tabular
10317 (license license:expat)))
10319 (define-public python2-tabulate
10320 (package-with-python2 python-tabulate))
10322 (define-public python-kazoo
10324 (name "python-kazoo")
10329 (uri (pypi-uri "kazoo" version))
10332 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10333 (build-system python-build-system)
10334 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10336 `(("python-six" ,python-six)))
10337 (home-page "https://kazoo.readthedocs.org")
10338 (synopsis "High-level Zookeeper client library")
10340 "Kazoo is a Python client library for the Apache Zookeeper distributed
10341 application service. It is designed to be easy to use and to avoid common
10342 programming errors.")
10343 (license license:asl2.0)))
10345 (define-public python2-kazoo
10346 (package-with-python2 python-kazoo))
10348 (define-public python-pykafka
10350 (name "python-pykafka")
10354 (uri (pypi-uri "pykafka" version))
10357 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10358 (build-system python-build-system)
10359 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10361 `(("python-gevent" ,python-gevent)
10362 ("python-kazoo" ,python-kazoo)
10363 ("python-tabulate" ,python-tabulate)))
10365 `(("librdkafka" ,librdkafka)))
10366 (home-page "https://pykafka.readthedocs.io/")
10367 (synopsis "Apache Kafka client for Python")
10369 "PyKafka is a client for the Apache Kafka distributed messaging system.
10370 It includes Python implementations of Kafka producers and consumers, which
10371 are optionally backed by a C extension built on librdkafka.")
10372 (license license:asl2.0)))
10374 (define-public python2-pykafka
10375 (package-with-python2 python-pykafka))
10377 (define-public python-wcwidth
10379 (name "python-wcwidth")
10384 (uri (pypi-uri "wcwidth" version))
10387 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10388 (build-system python-build-system)
10389 (home-page "https://github.com/jquast/wcwidth")
10390 (synopsis "Measure number of terminal column cells of wide-character codes")
10391 (description "Wcwidth measures the number of terminal column cells of
10392 wide-character codes. It is useful for those implementing a terminal emulator,
10393 or programs that carefully produce output to be interpreted by one. It is a
10394 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10395 specified in POSIX.1-2001 and POSIX.1-2008.")
10396 (license license:expat)))
10398 (define-public python2-wcwidth
10399 (package-with-python2 python-wcwidth))
10401 (define-public python2-jsonrpclib
10403 (name "python2-jsonrpclib")
10407 (uri (pypi-uri "jsonrpclib" version))
10410 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10411 (build-system python-build-system)
10414 #:python ,python-2))
10415 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10416 (synopsis "Implementation of JSON-RPC specification for Python")
10418 "This library is an implementation of the JSON-RPC specification.
10419 It supports both the original 1.0 specification, as well as the
10420 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10422 (license license:asl2.0)))
10424 (define-public python-chai
10426 (name "python-chai")
10430 (uri (pypi-uri "chai" version))
10433 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10434 (build-system python-build-system)
10435 (home-page "https://github.com/agoragames/chai")
10436 (synopsis "Mocking framework for Python")
10438 "Chai provides an api for mocking, stubbing and spying your python
10439 objects, patterned after the Mocha library for Ruby.")
10440 (license license:bsd-3)))
10442 (define-public python2-chai
10443 (package-with-python2 python-chai))
10445 (define-public python-inflection
10447 (name "python-inflection")
10450 (origin (method url-fetch)
10451 (uri (pypi-uri "inflection" version))
10454 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10455 (build-system python-build-system)
10457 `(("python-pytest" ,python-pytest)))
10458 (home-page "https://github.com/jpvanhal/inflection")
10459 (synopsis "Python string transformation library")
10461 "Inflection is a string transformation library. It singularizes
10462 and pluralizes English words, and transforms strings from CamelCase to
10463 underscored string.")
10464 (license license:expat)))
10466 (define-public python2-inflection
10467 (package-with-python2 python-inflection))
10469 (define-public python-pylev
10471 (name "python-pylev")
10475 (uri (pypi-uri "pylev" version))
10478 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10479 (build-system python-build-system)
10480 (home-page "https://github.com/toastdriven/pylev")
10481 (synopsis "Levenshtein distance implementation in Python")
10482 (description "Pure Python Levenshtein implementation, based off the
10483 Wikipedia code samples at
10484 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10485 (license license:bsd-3)))
10487 (define-public python2-pylev
10488 (package-with-python2 python-pylev))
10490 (define-public python-cleo
10492 (name "python-cleo")
10496 (uri (pypi-uri "cleo" version))
10499 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10500 (build-system python-build-system)
10503 ("python-mock" ,python-mock)
10504 ("python-pytest-mock" ,python-pytest-mock)
10505 ("python-pytest" ,python-pytest)))
10507 `(("python-backpack" ,python-backpack)
10508 ("python-pastel" ,python-pastel)
10509 ("python-pylev" ,python-pylev)))
10510 (home-page "https://github.com/sdispater/cleo")
10511 (synopsis "Command-line arguments library for Python")
10513 "Cleo allows you to create command-line commands with signature in
10514 docstring and colored output.")
10515 (license license:expat)))
10517 (define-public python2-cleo
10518 (package-with-python2 python-cleo))
10520 (define-public python-lazy-object-proxy
10522 (name "python-lazy-object-proxy")
10526 (uri (pypi-uri "lazy-object-proxy" version))
10529 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10530 (build-system python-build-system)
10531 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10532 (synopsis "Lazy object proxy for python")
10534 "Lazy object proxy is an object that wraps a callable but defers the call
10535 until the object is actually required, and caches the result of said call.")
10536 (license license:bsd-2)))
10538 (define-public python2-lazy-object-proxy
10539 (package-with-python2 python-lazy-object-proxy))
10541 (define-public python-dnspython
10543 (name "python-dnspython")
10547 (uri (string-append "http://www.dnspython.org/kits/"
10548 version "/dnspython-" version ".tar.gz"))
10551 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10552 (build-system python-build-system)
10553 (arguments '(#:tests? #f)) ; XXX: requires internet access
10554 (home-page "http://www.dnspython.org")
10555 (synopsis "DNS toolkit for Python")
10557 "dnspython is a DNS toolkit for Python. It supports almost all record
10558 types. It can be used for queries, zone transfers, and dynamic updates.
10559 It supports TSIG authenticated messages and EDNS0.")
10560 (license license:expat)))
10562 (define-public python2-dnspython
10563 (package-with-python2 python-dnspython))
10565 (define-public python-email-validator
10567 (name "python-email-validator")
10570 (origin (method url-fetch)
10571 (uri (pypi-uri "email_validator" version))
10574 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10575 (build-system python-build-system)
10578 (modify-phases %standard-phases
10579 (add-before 'build 'use-dnspython
10581 (substitute* "setup.py"
10582 (("dnspython3") "dnspython"))
10585 `(("python-dnspython" ,python-dnspython)
10586 ("python-idna" ,python-idna)))
10587 (home-page "https://github.com/JoshData/python-email-validator")
10588 (synopsis "Email address validation library for Python")
10590 "This library validates email address syntax and deliverability.")
10591 (license license:cc0)))
10593 (define-public python2-email-validator
10594 (package-with-python2 python-email-validator))
10596 (define-public python-ukpostcodeparser
10598 (name "python-ukpostcodeparser")
10602 (uri (pypi-uri "UkPostcodeParser" version))
10605 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10606 (build-system python-build-system)
10607 (home-page "https://github.com/hamstah/ukpostcodeparser")
10608 (synopsis "UK Postcode parser for Python")
10610 "This library provides the @code{parse_uk_postcode} function for
10611 parsing UK postcodes.")
10612 (license license:expat)))
10614 (define-public python2-ukpostcodeparser
10615 (package-with-python2 python-ukpostcodeparser))
10617 (define-public python-faker
10619 (name "python-faker")
10623 (uri (pypi-uri "Faker" version))
10626 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10628 (search-patches "python-faker-fix-build-32bit.patch"))
10629 (modules '((guix build utils)))
10632 (for-each delete-file (find-files "." "\\.pyc$"))
10634 (build-system python-build-system)
10637 (modify-phases %standard-phases
10639 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10642 ("python-email-validator" ,python-email-validator)
10643 ("python-mock" ,python-mock)
10644 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10646 `(("python-dateutil" ,python-dateutil)
10647 ("python-six" ,python-six)))
10648 (home-page "https://github.com/joke2k/faker")
10649 (synopsis "Python package that generates fake data")
10651 "Faker is a Python package that generates fake data such as names,
10652 addresses, and phone numbers.")
10653 (license license:expat)
10654 (properties `((python2-variant . ,(delay python2-faker))))))
10656 (define-public python2-faker
10657 (let ((base (package-with-python2 (strip-python2-variant
10662 `(("python2-ipaddress" ,python2-ipaddress)
10663 ,@(package-propagated-inputs base))))))
10665 (define-public python-pyaml
10667 (name "python-pyaml")
10668 (version "18.11.0")
10671 (uri (pypi-uri "pyaml" version))
10674 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10675 (build-system python-build-system)
10677 `(("python-unidecode" ,python-unidecode)))
10679 `(("python-pyyaml" ,python-pyyaml)))
10680 (home-page "https://github.com/mk-fg/pretty-yaml")
10681 (synopsis "YAML pretty-print library for Python")
10683 "pyaml is a PyYAML based python module to produce pretty and readable
10684 YAML-serialized data.")
10685 (license license:wtfpl2)))
10687 (define-public python2-pyaml
10688 (package-with-python2 python-pyaml))
10690 (define-public python-backpack
10692 (name "python-backpack")
10697 (uri (pypi-uri "backpack" version))
10700 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10701 (build-system python-build-system)
10703 `(("python-pytest" ,python-pytest)
10704 ("python-nose" ,python-nose)))
10706 `(("python-simplejson" ,python-simplejson)))
10707 (home-page "https://github.com/sdispater/backpack")
10708 (synopsis "Utilities for working with Python collections")
10709 (description "Backpack provides some useful utilities for working with
10710 collections of data.")
10711 (license license:expat)))
10713 (define-public python2-backpack
10714 (package-with-python2 python-backpack))
10716 (define-public python-prompt-toolkit
10718 (name "python-prompt-toolkit")
10723 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10726 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10727 (build-system python-build-system)
10730 (modify-phases %standard-phases
10732 (add-after 'install 'post-install-check
10733 (lambda* (#:key inputs outputs #:allow-other-keys)
10734 ;; HOME is needed for the test
10735 ;; "test_pathcompleter_can_expanduser".
10736 (setenv "HOME" "/tmp")
10737 (add-installed-pythonpath inputs outputs)
10738 (invoke "py.test"))))))
10740 `(("python-wcwidth" ,python-wcwidth)
10741 ("python-six" ,python-six)
10742 ("python-pygments" ,python-pygments)))
10744 `(("python-pytest" ,python-pytest)))
10745 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10746 (synopsis "Library for building command line interfaces in Python")
10748 "Prompt-Toolkit is a library for building interactive command line
10749 interfaces in Python. It's like GNU Readline but it also features syntax
10750 highlighting while typing, out-of-the-box multi-line input editing, advanced
10751 code completion, incremental search, support for Chinese double-width
10752 characters, mouse support, and auto suggestions.")
10753 (license license:bsd-3)))
10755 (define-public python2-prompt-toolkit
10756 (package-with-python2 python-prompt-toolkit))
10758 (define-public python-prompt-toolkit-1
10759 (package (inherit python-prompt-toolkit)
10764 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10767 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10769 (define-public python2-prompt-toolkit-1
10770 (package-with-python2 python-prompt-toolkit-1))
10772 (define-public python-jedi
10774 (name "python-jedi")
10779 (uri (pypi-uri "jedi" version))
10782 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10783 (build-system python-build-system)
10786 (modify-phases %standard-phases
10787 (add-after 'unpack 'disable-file-completion-test
10788 ;; A single parameterized test currently fail (see:
10789 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10791 (substitute* "test/test_api/test_completion.py"
10792 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10796 (setenv "HOME" "/tmp")
10797 (invoke "python" "-m" "pytest"))))))
10799 `(("python-pytest" ,python-pytest)
10800 ("python-docopt" ,python-docopt)))
10802 `(("python-parso" ,python-parso)))
10803 (home-page "https://github.com/davidhalter/jedi")
10804 (synopsis "Autocompletion and static analysis library for Python")
10806 "Jedi is a static analysis tool for Python that can be used in Integrated
10807 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10808 on a deeper level than many other static analysis frameworks for Python.
10810 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10812 (license license:expat)))
10814 (define-public python2-jedi
10815 (package-with-python2 python-jedi))
10817 (define-public ptpython
10823 (uri (pypi-uri "ptpython" version))
10826 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10827 (build-system python-build-system)
10829 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10831 `(("python-docopt" ,python-docopt)
10832 ("python-jedi" ,python-jedi)
10833 ("python-prompt-toolkit" ,python-prompt-toolkit)
10834 ("python-pygments" ,python-pygments)))
10835 (home-page "https://github.com/jonathanslenders/ptpython")
10836 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10838 "ptpython is a Python read-eval-print loop with IDE-like features.
10839 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10840 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10842 (license license:bsd-3)
10843 (properties `((python2-variant . ,(delay ptpython-2))))))
10845 (define-public ptpython-2
10846 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10849 (name "ptpython2"))))
10851 (define-public python-stem
10853 (name "python-stem")
10858 (uri (pypi-uri "stem" version))
10861 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10862 (build-system python-build-system)
10865 (modify-phases %standard-phases
10868 (invoke "./run_tests.py" "--unit")
10871 `(("python-mock" ,python-mock)
10872 ("python-pycodestyle" ,python-pycodestyle)
10873 ("python-pyflakes" ,python-pyflakes)))
10874 (home-page "https://stem.torproject.org/")
10876 "Python controller library that allows applications to interact with Tor")
10878 "Stem is a Python controller library for Tor. With it you can use Tor's
10879 control protocol to script against the Tor process and read descriptor data
10880 relays publish about themselves.")
10881 (license license:lgpl3)))
10883 (define-public python2-stem
10884 (package-with-python2 python-stem))
10886 (define-public python-pyserial
10888 (name "python-pyserial")
10893 (uri (pypi-uri "pyserial" version))
10896 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10897 (build-system python-build-system)
10899 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10901 ;; (modify-phases %standard-phases
10904 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10906 "https://github.com/pyserial/pyserial")
10907 (synopsis "Python Serial Port Bindings")
10908 (description "@code{pyserial} provide serial port bindings for Python. It
10909 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10910 and/or Xon/Xoff. The port is accessed in RAW mode.")
10911 (license license:bsd-3)))
10913 (define-public python2-pyserial
10914 (package-with-python2 python-pyserial))
10916 (define-public python-kivy
10918 (name "python-kivy")
10923 (uri (pypi-uri "Kivy" version))
10924 (file-name (string-append name "-" version ".tar.gz"))
10927 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10928 (build-system python-build-system)
10930 `(#:tests? #f ; Tests require many optional packages
10932 (modify-phases %standard-phases
10933 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10934 (lambda* (#:key inputs #:allow-other-keys)
10935 (setenv "KIVY_SDL2_PATH"
10936 (string-append (assoc-ref inputs "sdl-union")
10941 ("pkg-config" ,pkg-config)
10942 ("python-cython" ,python-cython)))
10944 `(("gstreamer" ,gstreamer)
10947 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10948 (home-page "http://kivy.org")
10950 "Multitouch application framework")
10952 "A software library for rapid development of
10953 hardware-accelerated multitouch applications.")
10954 (license license:expat)))
10956 (define-public python2-kivy
10957 (package-with-python2 python-kivy))
10959 (define-public python-kivy-next
10960 (deprecated-package "python-kivy-next" python-kivy))
10962 (define-public python2-kivy-next
10963 (deprecated-package "python2-kivy-next" python2-kivy))
10965 (define-public python-binaryornot
10967 (name "python-binaryornot")
10971 (uri (pypi-uri "binaryornot" version))
10974 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10975 (build-system python-build-system)
10978 (modify-phases %standard-phases
10979 (add-after 'unpack 'patch-tests
10981 ;; TypeError: binary() got an unexpected keyword argument
10983 (substitute* "tests/test_check.py"
10984 (("average_size=512") ""))
10987 `(("python-chardet" ,python-chardet)
10988 ("python-hypothesis" ,python-hypothesis)))
10989 (home-page "https://github.com/audreyr/binaryornot")
10990 (synopsis "Package to check if a file is binary or text")
10991 (description "Ultra-lightweight pure Python package to check if a file is
10993 (license license:bsd-3)
10994 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10996 (define-public python2-binaryornot
10997 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10998 (package (inherit base)
11000 `(("python2-enum34" ,python2-enum34)
11001 ,@(package-propagated-inputs base))))))
11003 (define-public python-binwalk
11004 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11007 (name "python-binwalk")
11008 (version (git-version "2.1.1" revision commit))
11012 (uri (git-reference
11013 (url "https://github.com/ReFirmLabs/binwalk")
11015 (file-name (git-file-name name version))
11018 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11019 (build-system python-build-system)
11022 (modify-phases %standard-phases
11023 (add-before 'check 'set-pythonpath
11025 (setenv "PYTHONPATH"
11028 ":" (getenv "PYTHONPATH")))
11032 `(("python-coverage" ,python-coverage)
11033 ("python-nose" ,python-nose)))
11034 (home-page "https://github.com/ReFirmLabs/binwalk")
11035 (synopsis "Firmware analysis tool")
11036 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11037 (license license:expat))))
11039 (define-public python-nltk
11041 (name "python-nltk")
11045 (uri (pypi-uri "nltk" version))
11048 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11049 (build-system python-build-system)
11051 '(;; The tests require some extra resources to be downloaded.
11052 ;; TODO Try packaging these resources.
11054 (home-page "http://nltk.org/")
11055 (synopsis "Natural Language Toolkit")
11056 (description "It provides interfaces to over 50 corpora and lexical
11057 resources such as WordNet, along with a suite of text processing libraries
11058 for classification, tokenization, stemming, tagging, parsing, and semantic
11059 reasoning, wrappers for natural language processing libraries.")
11060 (license license:asl2.0)))
11062 (define-public python2-nltk
11063 (package-with-python2 python-nltk))
11065 (define-public python-pymongo
11067 (name "python-pymongo")
11071 (uri (pypi-uri "pymongo" version))
11074 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11075 (build-system python-build-system)
11077 `(("python-certifi" ,python-certifi)))
11078 (home-page "https://github.com/mongodb/mongo-python-driver")
11079 (synopsis "Python driver for MongoDB")
11080 (description "Python driver for MongoDB.")
11081 (license license:asl2.0)))
11083 (define-public python2-pymongo
11084 (package-with-python2 python-pymongo))
11086 (define-public python-consul
11088 (name "python-consul")
11093 (uri (pypi-uri "python-consul" version))
11096 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11097 (build-system python-build-system)
11099 '(#:tests? #f)) ; The tests are not distributed
11101 `(("python-requests" ,python-requests)
11102 ("python-six" ,python-six)))
11103 (home-page "https://github.com/cablehead/python-consul")
11104 (synopsis "Python client for Consul")
11106 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11107 discovery, monitoring and configuration.")
11108 (license license:expat)))
11110 (define-public python2-consul
11111 (package-with-python2 python-consul))
11113 (define-public python-schematics
11115 (name "python-schematics")
11120 (uri (git-reference
11121 (url "https://github.com/schematics/schematics.git")
11122 (commit (string-append "v" version))))
11123 (file-name (git-file-name name version))
11125 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11126 (build-system python-build-system)
11128 `(("python-six" ,python-six)))
11130 ;; The tests require a bunch of not very nice packages with fixed
11131 ;; version requirements (e.g. python-coveralls).
11133 (home-page "https://github.com/schematics/schematics")
11134 (synopsis "Python Data Structures for Humans")
11135 (description "Python Data Structures for Humans.")
11136 (license license:bsd-3)))
11138 (define-public python2-schematics
11139 (package-with-python2 python-schematics))
11141 (define-public python-odfpy
11143 (name "python-odfpy")
11147 (uri (pypi-uri "odfpy" version))
11150 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11152 `(#:modules ((srfi srfi-1)
11153 (guix build python-build-system)
11154 (guix build utils))
11156 (modify-phases %standard-phases
11158 ;; The test runner invokes python2 and python3 for test*.py.
11159 ;; To avoid having both in inputs, we replicate it here.
11161 (for-each (lambda (test-file) (invoke "python" test-file))
11162 (find-files "tests" "^test.*\\.py$"))
11164 (build-system python-build-system)
11165 (home-page "https://github.com/eea/odfpy")
11166 (synopsis "Python API and tools to manipulate OpenDocument files")
11167 (description "Collection of libraries and utility programs written in
11168 Python to manipulate OpenDocument 1.2 files.")
11170 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11171 ;; number of files with other licenses.
11172 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11174 (define-public python2-odfpy
11175 (package-with-python2 python-odfpy))
11177 (define-public python-natsort
11179 (name "python-natsort")
11183 (uri (pypi-uri "natsort" version))
11186 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11187 (build-system python-build-system)
11189 `(#:modules ((guix build utils)
11190 (guix build python-build-system)
11195 (modify-phases %standard-phases
11196 (add-before 'check 'set-cachedir
11197 ;; Tests require write access to $HOME by default
11198 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11201 (let ((cwd (getcwd)))
11202 (setenv "PYTHONPATH"
11205 (find (cut string-prefix? "lib" <>)
11206 (scandir (string-append cwd "/build")))
11208 (getenv "PYTHONPATH")))
11209 (invoke "pytest" "-v")))))))
11211 `(("python-hypothesis" ,python-hypothesis)
11212 ("python-pytest-cov" ,python-pytest-cov)
11213 ("python-pytest-mock" ,python-pytest-mock)
11214 ("python-pytest" ,python-pytest)))
11215 (propagated-inputs ; TODO: Add python-fastnumbers.
11216 `(("python-pyicu" ,python-pyicu)))
11217 (home-page "https://github.com/SethMMorton/natsort")
11218 (synopsis "Natural sorting for python and shell")
11220 "Natsort lets you apply natural sorting on lists instead of
11221 lexicographical. If you use the built-in @code{sorted} method in python
11222 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11223 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11224 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11225 identifies numbers and sorts them separately from strings. It can also sort
11226 version numbers, real numbers, mixed types and more, and comes with a shell
11227 command @command{natsort} that exposes this functionality in the command line.")
11228 (license license:expat)
11229 (properties `((python2-variant . ,(delay python2-natsort))))))
11231 (define-public python2-natsort
11232 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11233 (package (inherit base)
11235 `(("python2-pathlib" ,python2-pathlib)
11236 ,@(package-native-inputs base))))))
11238 (define-public python-glances
11240 (name "python-glances")
11245 (uri (pypi-uri "Glances" version))
11248 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11249 (modules '((guix build utils)))
11252 ;; Glances phones PyPI for weekly update checks by default.
11253 ;; Disable these. The user can re-enable them if desired.
11254 (substitute* "glances/outdated.py"
11255 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11256 (string-append indentation
11257 "self.args.disable_check_update = True\n"
11260 (build-system python-build-system)
11262 `(("python-future" ,python-future)
11263 ("python-psutil" ,python-psutil)))
11265 "https://github.com/nicolargo/glances")
11266 (synopsis "Cross-platform curses-based monitoring tool")
11268 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11269 Glances uses the PsUtil library to get information from your system. It
11270 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11271 (license license:lgpl3+)))
11273 (define-public python2-glances
11274 (package-with-python2 python-glances))
11276 (define-public python-graphql-core
11278 (name "python-graphql-core")
11283 (uri (pypi-uri "graphql-core" version))
11286 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11287 (build-system python-build-system)
11289 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11291 (modify-phases %standard-phases
11292 (add-after 'unpack 'patch-hardcoded-version
11293 (lambda _ (substitute*
11295 (("'gevent==1.1rc1'") "'gevent'"))
11298 `(("python-gevent" ,python-gevent)
11299 ("python-mock" ,python-mock)
11300 ("python-pytest-mock" ,python-pytest-mock)))
11302 `(("python-promise" ,python-promise)
11303 ("python-six" ,python-six)))
11304 (home-page "https://github.com/graphql-python/graphql-core")
11305 (synopsis "GraphQL implementation for Python")
11307 "GraphQL implementation for Python. GraphQL is a data query language and
11308 runtime designed and used to request and deliver data to mobile and web apps.
11309 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11311 (license license:expat)))
11313 (define-public python2-graphql-core
11314 (package-with-python2 python-graphql-core))
11316 (define-public python-graphql-relay
11318 (name "python-graphql-relay")
11323 (uri (pypi-uri "graphql-relay" version))
11326 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11327 (build-system python-build-system)
11329 '(#:tests? #f)) ; The tests are not distributed
11331 `(("python-graphql-core" ,python-graphql-core)
11332 ("python-promise" ,python-promise)
11333 ("python-six" ,python-six)))
11334 (home-page "https://github.com/graphql-python/graphql-relay-py")
11335 (synopsis "Relay implementation for Python")
11337 "This is a library to allow the easy creation of Relay-compliant servers
11338 using the GraphQL Python reference implementation of a GraphQL server. It
11339 should be noted that the code is a exact port of the original
11340 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11342 (license license:expat)))
11344 (define-public python2-graphql-relay
11345 (package-with-python2 python-graphql-relay))
11347 (define-public python-graphene
11349 (name "python-graphene")
11354 (uri (pypi-uri "graphene" version))
11357 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11358 (build-system python-build-system)
11360 `(("python-graphql-core" ,python-graphql-core)
11361 ("python-graphql-relay" ,python-graphql-relay)
11362 ("python-iso8601" ,python-iso8601)
11363 ("python-promise" ,python-promise)
11364 ("python-six" ,python-six)))
11366 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11367 (home-page "http://graphene-python.org/")
11368 (synopsis "GraphQL Framework for Python")
11370 "Graphene is a Python library for building GraphQL schemas/types.
11371 A GraphQL schema describes your data model, and provides a GraphQL server
11372 with an associated set of resolve methods that know how to fetch data.")
11373 (properties `((python2-variant . ,(delay python2-graphene))))
11374 (license license:expat)))
11376 (define-public python2-graphene
11377 (let ((base (package-with-python2
11378 (strip-python2-variant python-graphene))))
11379 (package (inherit base)
11381 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11382 ,@(package-native-inputs base))))))
11384 (define-public python-nautilus
11386 (name "python-nautilus")
11391 (uri (pypi-uri "nautilus" version))
11394 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11395 (build-system python-build-system)
11396 (arguments `(#:tests? #f)) ; fails to import test modules
11398 `(("python-bcrypt" ,python-bcrypt)
11399 ("python-click" ,python-click)
11400 ("python-consul" ,python-consul)
11401 ("python-graphene" ,python-graphene)
11402 ("python-jinja2" ,python-jinja2)
11403 ("python-peewee" ,python-peewee)
11404 ("python-pika" ,python-pika)
11405 ("python-tornado" ,python-tornado)
11406 ("python-wtforms" ,python-wtforms)))
11408 `(("python-nose2" ,python-nose2)))
11409 (home-page "https://github.com/AlecAivazis/nautilus")
11410 (synopsis "Library for creating microservice applications")
11412 "Nautilus is a framework for flux based microservices that looks to
11413 provide extendible implementations of common aspects of a cloud so that you can
11414 focus on building massively scalable web applications.")
11415 (license license:expat)))
11417 (define-public python-snowballstemmer
11419 (name "python-snowballstemmer")
11423 (uri (pypi-uri "snowballstemmer" version))
11426 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11427 (build-system python-build-system)
11429 `(;; No tests exist
11431 (home-page "https://github.com/shibukawa/snowball_py")
11432 (synopsis "Snowball stemming library collection for Python")
11433 (description "This package provides 16 word stemmer algorithms generated
11434 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11436 (license license:bsd-3)))
11438 (define-public python2-snowballstemmer
11439 (package-with-python2 python-snowballstemmer))
11441 (define-public python-setproctitle
11443 (name "python-setproctitle")
11448 (uri (pypi-uri "setproctitle" version))
11451 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11452 (build-system python-build-system)
11455 (modify-phases %standard-phases
11456 (add-before 'check 'patch-Makefile
11457 ;; Stricly this is only required for the python2 variant.
11458 ;; But adding a phase in an inherited package seems to be
11459 ;; cumbersum. So we patch even for python3.
11461 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11463 (substitute* "Makefile"
11464 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11465 (string-append nose "/bin/nosetests "))))
11469 (setenv "PYTHON" (or (which "python3") (which "python")))
11470 (setenv "PYCONFIG" (or (which "python3-config")
11471 (which "python-config")))
11472 (setenv "CC" "gcc")
11473 ;; No need to extend PYTHONPATH to find the built package, since
11474 ;; the Makefile will build anyway
11475 (invoke "make" "check"))))))
11477 `(("procps" ,procps))) ; required for tests
11479 "https://github.com/dvarrazzo/py-setproctitle")
11481 "Setproctitle implementation for Python to customize the process title")
11482 (description "The library allows a process to change its title (as displayed
11483 by system tools such as ps and top).
11485 Changing the title is mostly useful in multi-process systems, for
11486 example when a master process is forked: changing the children's title
11487 allows to identify the task each process is busy with. The technique
11488 is used by PostgreSQL and the OpenSSH Server for example.")
11489 (license license:bsd-3)
11490 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11492 (define-public python2-setproctitle
11493 (let ((base (package-with-python2
11494 (strip-python2-variant python-setproctitle))))
11497 (native-inputs `(("python2-nose" ,python2-nose)
11498 ,@(package-native-inputs base))))))
11500 (define-public python-validictory
11502 (name "python-validictory")
11507 (uri (pypi-uri "validictory" version))
11510 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11511 (build-system python-build-system)
11514 (modify-phases %standard-phases
11515 (add-after 'unpack 'bootstrap
11516 ;; Move the tests out of the package directory to avoid
11519 (rename-file "validictory/tests" "tests")
11520 (delete-file "tests/__init__.py")))
11523 ;; Extend PYTHONPATH so the built package will be found.
11524 (setenv "PYTHONPATH"
11525 (string-append (getcwd) "/build/lib:"
11526 (getenv "PYTHONPATH")))
11527 (invoke "py.test" "-vv" ))))))
11529 `(("python-pytest" ,python-pytest)))
11531 "https://github.com/jamesturk/validictory")
11532 (synopsis "General purpose Python data validator")
11533 (description "It allows validation of arbitrary Python data structures.
11535 The schema format is based on the JSON Schema
11536 proposal (http://json-schema.org), so combined with json the library is also
11537 useful as a validator for JSON data.")
11538 (license license:expat)))
11540 (define-public python2-validictory
11541 (package-with-python2 python-validictory))
11543 (define-public python-pyelftools
11545 (name "python-pyelftools")
11550 (uri (pypi-uri "pyelftools" version))
11553 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11554 (build-system python-build-system)
11557 (modify-phases %standard-phases
11558 (add-before 'check 'set-pythonpath
11560 (setenv "PYTHONPATH"
11563 ":" (getenv "PYTHONPATH")))
11566 "https://github.com/eliben/pyelftools")
11568 "Analyze binary and library file information")
11569 (description "This Python library provides interfaces for parsing and
11570 analyzing two binary and library file formats; the Executable and Linking
11571 Format (ELF), and debugging information in the Debugging With Attributed
11572 Record Format (DWARF).")
11573 (license license:public-domain)))
11575 (define-public python-pyev
11577 (name "python-pyev")
11582 (uri (pypi-uri "pyev" version))
11585 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11586 (build-system python-build-system)
11588 `(#:tests? #f ; no test suite
11590 (modify-phases %standard-phases
11591 (add-after 'unpack 'patch
11592 (lambda* (#:key inputs #:allow-other-keys)
11593 (let ((libev (string-append (assoc-ref inputs "libev")
11594 "/lib/libev.so.4")))
11595 (substitute* "setup.py"
11596 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11597 (string-append "libev_dll_name = \"" libev "\"")))))))))
11599 `(("libev" ,libev)))
11600 (home-page "http://pythonhosted.org/pyev/")
11601 (synopsis "Python libev interface")
11602 (description "Pyev provides a Python interface to libev.")
11603 (license license:gpl3)))
11605 (define-public python2-pyev
11606 (package-with-python2 python-pyev))
11608 (define-public python-imagesize
11610 (name "python-imagesize")
11615 (uri (pypi-uri "imagesize" version))
11618 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11619 (build-system python-build-system)
11620 (home-page "https://github.com/shibukawa/imagesize_py")
11621 (synopsis "Gets image size of files in various formats in Python")
11623 "This package allows determination of image size from
11624 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11625 (license license:expat)))
11627 (define-public python2-imagesize
11628 (package-with-python2 python-imagesize))
11630 (define-public python-termstyle
11632 (name "python-termstyle")
11637 (uri (pypi-uri "termstyle" version))
11640 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11641 (build-system python-build-system)
11644 (modify-phases %standard-phases
11647 (invoke "python" "test3.py"))))))
11648 (home-page "https://github.com/gfxmonk/termstyle")
11649 (synopsis "Console text coloring for Python")
11650 (description "This package provides console text coloring for Python.")
11651 (license license:bsd-3)))
11653 (define-public python-argcomplete
11655 (name "python-argcomplete")
11660 (uri (pypi-uri "argcomplete" version))
11663 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11664 (build-system python-build-system)
11666 `(("python-pexpect" ,python-pexpect)
11668 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11669 (home-page "https://github.com/kislyuk/argcomplete")
11670 (synopsis "Shell tab completion for Python argparse")
11671 (description "argcomplete provides extensible command line tab completion
11672 of arguments and options for Python scripts using @code{argparse}. It's
11673 particularly useful for programs with many options or sub-parsers that can
11674 dynamically suggest completions; for example, when browsing resources over the
11676 (license license:asl2.0)))
11678 (define-public python2-argcomplete
11679 (package-with-python2 python-argcomplete))
11681 (define-public python-xopen
11683 (name "python-xopen")
11688 (uri (pypi-uri "xopen" version))
11691 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11692 (build-system python-build-system)
11694 `(("python-setuptools-scm" ,python-setuptools-scm)))
11695 (home-page "https://github.com/marcelm/xopen/")
11696 (synopsis "Open compressed files transparently")
11697 (description "This module provides an @code{xopen} function that works like
11698 Python's built-in @code{open} function, but can also deal with compressed files.
11699 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11700 recognized by their file extensions. The focus is on being as efficient as
11701 possible on all supported Python versions.")
11702 (license license:expat)))
11704 (define-public python2-xopen
11705 (let ((base (package-with-python2
11706 (strip-python2-variant python-xopen))))
11709 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11710 ,@(package-propagated-inputs base))))))
11712 (define-public python-cheetah
11714 (name "python-cheetah")
11719 (uri (pypi-uri "Cheetah3" version))
11722 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11723 (build-system python-build-system)
11725 `(#:modules ((guix build utils)
11726 (guix build python-build-system)
11730 #:phases (modify-phases %standard-phases
11731 (add-after 'unpack 'use-absolute-python
11733 (substitute* "Cheetah/CheetahWrapper.py"
11734 (("#!/usr/bin/env python")
11735 (string-append "#!" (which "python"))))
11739 (let ((cwd (getcwd)))
11740 (setenv "PYTHONPATH"
11743 (find (cut string-prefix? "lib" <>)
11744 (scandir (string-append cwd "/build")))
11745 ":" (getenv "PYTHONPATH")))
11747 (string-append (getenv "PATH")
11749 (setenv "TMPDIR" "/tmp")
11751 (substitute* "Cheetah/Tests/Test.py"
11752 (("unittest.TextTestRunner\\(\\)")
11753 "unittest.TextTestRunner(verbosity=2)"))
11755 (invoke "python" "Cheetah/Tests/Test.py")))))))
11757 `(("python-markdown" ,python-markdown))) ;optional
11758 (home-page "http://cheetahtemplate.org/")
11759 (synopsis "Template engine")
11760 (description "Cheetah is a text-based template engine and Python code
11763 Cheetah can be used as a standalone templating utility or referenced as
11764 a library from other Python applications. It has many potential uses,
11765 but web developers looking for a viable alternative to ASP, JSP, PHP and
11766 PSP are expected to be its principle user group.
11770 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11772 @item Cleanly separates content, graphic design, and program code.
11773 @item Blends the power and flexibility of Python with a simple template language
11774 that non-programmers can understand.
11775 @item Gives template writers full access to any Python data structure, module,
11776 function, object, or method in their templates.
11777 @item Makes code reuse easy by providing an object-orientated interface to
11778 templates that is accessible from Python code or other Cheetah templates.
11779 One template can subclass another and selectively reimplement sections of it.
11780 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11781 improve the performance of a dynamic website.
11782 @item Compiles templates into optimized, yet readable, Python code.
11784 (license (license:x11-style "file://LICENSE"))))
11786 (define-public python2-cheetah
11787 (package-with-python2 python-cheetah))
11789 (define-public python-dulwich
11791 (name "python-dulwich")
11796 (uri (list (string-append "https://www.dulwich.io/releases/"
11797 "dulwich-" version ".tar.gz")
11798 (pypi-uri "dulwich" version)))
11801 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11802 (build-system python-build-system)
11805 (modify-phases %standard-phases
11806 (add-before 'check 'fix-tests
11807 (lambda* (#:key inputs #:allow-other-keys)
11808 ;; The tests use Popen with a custom environment which doesn't
11810 (substitute* "dulwich/tests/compat/utils.py"
11811 (("'git'") (string-append "'"
11814 (substitute* '("dulwich/tests/test_repository.py"
11815 "dulwich/tests/test_hooks.py")
11816 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11817 (setenv "TEST_RUNNER" "unittest")
11818 (setenv "PYTHONHASHSEED" "random")
11821 `(("python-fastimport" ,python-fastimport)))
11823 `(("python-mock" ,python-mock)
11824 ("python-geventhttpclient" ,python-geventhttpclient)
11826 (home-page "https://www.dulwich.io/")
11827 (synopsis "Git implementation in Python")
11828 (description "Dulwich is an implementation of the Git file formats and
11829 protocols written in pure Python.")
11830 ;; Can be used with either license.
11831 (license (list license:asl2.0 license:gpl2+))))
11833 (define-public python2-dulwich
11834 (package-with-python2 python-dulwich))
11836 (define-public python-pbkdf2
11838 (name "python-pbkdf2")
11843 (uri (pypi-uri "pbkdf2" version))
11846 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11847 (build-system python-build-system)
11850 (modify-phases %standard-phases
11853 (setenv "PYTHONPATH"
11854 (string-append (getcwd) "/build/lib:"
11855 (getenv "PYTHONPATH")))
11856 (invoke "python" "test/test_pbkdf2.py"))))))
11858 `(("python-pycrypto" ,python-pycrypto))) ; optional
11859 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11860 (synopsis "Password-based key derivation")
11861 (description "This module implements the password-based key derivation
11862 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11864 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11865 is part of the RSA Public Key Cryptography Standards series. The provided
11866 implementation takes a password or a passphrase and a salt value (and
11867 optionally a iteration count, a digest module, and a MAC module) and provides
11868 a file-like object from which an arbitrarly-sized key can be read.")
11869 (license license:expat)))
11871 (define-public python2-pbkdf2
11872 (package-with-python2 python-pbkdf2))
11874 (define-public python-qrcode
11876 (name "python-qrcode")
11881 (uri (pypi-uri "qrcode" version))
11883 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11884 (build-system python-build-system)
11886 ;; FIXME: Tests require packaging 'pymaging'.
11889 `(("python-lxml" ,python-lxml) ; for SVG output
11890 ("python-pillow" ,python-pillow) ; for PNG output
11891 ("python-six" ,python-six)))
11892 (home-page "https://github.com/lincolnloop/python-qrcode")
11893 (synopsis "QR Code image generator")
11894 (description "This package provides a pure Python QR Code generator
11895 module. It uses the Python Imaging Library (PIL) to allow for the generation
11898 In addition this package provides a command line tool to generate QR codes and
11899 either write these QR codes to a file or do the output as ascii art at the
11901 (license license:bsd-3)))
11903 (define-public python2-qrcode
11904 (package-with-python2 python-qrcode))
11906 (define-public python-rst2ansi
11908 (name "python-rst2ansi")
11913 (uri (pypi-uri "rst2ansi" version))
11916 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11917 (build-system python-build-system)
11919 `(("python-docutils" ,python-docutils)))
11920 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11921 (synopsis "Convert RST to ANSI-decorated console output")
11923 "Python module dedicated to rendering RST (reStructuredText) documents
11924 to ansi-escaped strings suitable for display in a terminal.")
11925 (license license:expat)))
11927 (define-public python-ansi2html
11929 (name "python-ansi2html")
11934 (uri (pypi-uri "ansi2html" version))
11937 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11938 (build-system python-build-system)
11940 `(("python-mock" ,python-mock)
11941 ("python-nose" ,python-nose)))
11943 `(("python-six" ,python-six)))
11944 (home-page "https://github.com/ralphbean/ansi2html")
11945 (synopsis "Convert ANSI-decorated console output to HTML")
11947 "@command{ansi2html} is a Python library and command line utility for
11948 convering text with ANSI color codes to HTML or LaTeX.")
11949 (license license:gpl3+)))
11951 (define-public python2-ansi2html
11952 (package-with-python2 python-ansi2html))
11954 (define-public python-ddt
11956 (name "python-ddt")
11961 (uri (pypi-uri "ddt" version))
11964 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11965 (build-system python-build-system)
11967 `(("python-mock" ,python-mock)
11968 ("python-nose" ,python-nose)))
11970 `(("python-six" ,python-six)
11971 ("python-pyyaml" ,python-pyyaml)))
11972 (home-page "https://github.com/txels/ddt")
11973 (synopsis "Data-Driven Tests")
11975 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11976 running it with different test data, and make it appear as multiple test
11978 (license license:expat)))
11980 (define-public python2-ddt
11981 (package-with-python2 python-ddt))
11983 (define-public python-pycountry
11985 (name "python-pycountry")
11986 (version "18.5.26")
11990 (uri (pypi-uri "pycountry" version))
11993 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11994 (build-system python-build-system)
11995 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11996 (synopsis "ISO databases for languages, countries, currencies, etc.")
11998 "@code{pycountry} provides the ISO databases for the standards:
12000 @item 639-3 (Languages)
12001 @item 3166 (Countries)
12002 @item 3166-3 (Deleted Countries)
12003 @item 3166-2 (Subdivisions of countries)
12004 @item 4217 (Currencies)
12005 @item 15924 (Scripts)
12007 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12008 through a Python API.")
12009 (license license:lgpl2.1+)))
12011 (define-public python2-pycountry
12012 (package-with-python2 python-pycountry))
12014 (define-public python-pycosat
12016 (name "python-pycosat")
12021 (uri (pypi-uri "pycosat" version))
12024 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12025 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12026 (build-system python-build-system)
12027 (home-page "https://github.com/ContinuumIO/pycosat")
12028 (synopsis "Bindings to picosat (a SAT solver)")
12030 "This package provides efficient Python bindings to @code{picosat} on
12031 the C level. When importing pycosat, the @code{picosat} solver becomes part
12032 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12033 Problem} (SAT) solver.")
12034 (license license:expat)))
12036 (define-public python2-pycosat
12037 (package-with-python2 python-pycosat))
12039 (define-public python2-ruamel.ordereddict
12041 (name "python2-ruamel.ordereddict")
12046 (uri (pypi-uri "ruamel.ordereddict" version))
12049 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12050 (build-system python-build-system)
12052 `(#:python ,python-2
12054 (modify-phases %standard-phases
12056 (add-after 'install 'check
12057 (lambda* (#:key inputs outputs #:allow-other-keys)
12058 (add-installed-pythonpath inputs outputs)
12059 (invoke "python" "test/testordereddict.py"))))))
12060 (home-page "https://bitbucket.org/ruamel/ordereddict")
12061 (synopsis "Version of dict that keeps keys in insertion order")
12063 "This is an implementation of an ordered dictionary with @dfn{Key
12064 Insertion Order} (KIO: updates of values do not affect the position of the
12065 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12066 removed and put at the back). The standard library module @code{OrderedDict},
12067 implemented later, implements a subset of @code{ordereddict} functionality.
12068 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12069 Order} (KSO, no sorting function can be specified, but a transform can be
12070 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12071 (license license:expat)))
12073 (define-public python-pypeg2
12075 (name "python-pypeg2")
12080 (uri (pypi-uri "pyPEG2" version))
12083 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12084 (build-system python-build-system)
12085 (propagated-inputs `(("python-lxml" ,python-lxml)))
12087 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12089 (home-page "https://fdik.org/pyPEG/")
12090 (synopsis "Parsering Expression Grammars in Python")
12091 (description "PyPEG is an intrinsic parser interpreter framework for
12092 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12093 parse many formal languages.")
12094 (license license:gpl2)))
12096 (define-public python-incremental
12098 (name "python-incremental")
12103 (uri (pypi-uri "incremental" version))
12106 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12107 (build-system python-build-system)
12108 (home-page "https://github.com/hawkowl/incremental")
12109 (synopsis "Library for versioning Python projects")
12110 (description "Incremental is a small library that versions your Python
12112 (license license:expat)))
12114 (define-public python2-incremental
12115 (package-with-python2 python-incremental))
12117 (define-public python-invoke
12119 (name "python-invoke")
12120 (home-page "http://www.pyinvoke.org/")
12124 (uri (pypi-uri "invoke" version))
12127 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12128 (build-system python-build-system)
12130 ;; XXX: Requires many dependencies that are not yet in Guix.
12132 (synopsis "Pythonic task execution")
12134 "Invoke is a Python task execution tool and library, drawing inspiration
12135 from various sources to arrive at a powerful and clean feature set. It is
12136 evolved from the Fabric project, but focuses on local and abstract concerns
12137 instead of servers and network commands.")
12138 (license license:bsd-3)))
12140 (define-public python2-invoke
12141 (package-with-python2 python-invoke))
12143 (define-public python-automat
12145 (name "python-automat")
12149 (uri (pypi-uri "Automat" version))
12152 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12153 (build-system python-build-system)
12154 ;; We disable the tests because they require python-twisted, while
12155 ;; python-twisted depends on python-automat. Twisted is optional, but the
12156 ;; tests fail if it is not available. Also see
12157 ;; <https://github.com/glyph/automat/issues/71>.
12158 (arguments '(#:tests? #f))
12160 `(("python-m2r" ,python-m2r)
12161 ("python-setuptools-scm" ,python-setuptools-scm)
12162 ("python-graphviz" ,python-graphviz)))
12164 `(("python-six" ,python-six)
12165 ("python-attrs" ,python-attrs)))
12166 (home-page "https://github.com/glyph/Automat")
12167 (synopsis "Self-service finite-state machines")
12168 (description "Automat is a library for concise, idiomatic Python
12169 expression of finite-state automata (particularly deterministic finite-state
12171 (license license:expat)))
12173 (define-public python2-automat
12174 (package-with-python2 python-automat))
12176 (define-public python-m2r
12178 (name "python-m2r")
12182 (uri (pypi-uri "m2r" version))
12185 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12186 (build-system python-build-system)
12188 `(("python-docutils" ,python-docutils)
12189 ("python-mistune" ,python-mistune)))
12191 `(("python-pygments" ,python-pygments)
12192 ("python-mock" ,python-mock)))
12193 (home-page "https://github.com/miyakogi/m2r")
12194 (synopsis "Markdown to reStructuredText converter")
12195 (description "M2R converts a markdown file including reST markups to valid
12197 (license license:expat)))
12199 (define-public python2-m2r
12200 (package-with-python2 python-m2r))
12202 (define-public python-constantly
12204 (name "python-constantly")
12208 (uri (pypi-uri "constantly" version))
12211 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12212 (build-system python-build-system)
12213 (home-page "https://github.com/twisted/constantly")
12214 (synopsis "Symbolic constants in Python")
12215 (description "Constantly is a Python library that provides symbolic
12216 constant support. It includes collections and constants with text, numeric,
12217 and bit flag values.")
12218 (license license:expat)))
12220 (define-public python2-constantly
12221 (package-with-python2 python-constantly))
12223 (define-public python-attrs
12225 (name "python-attrs")
12229 (uri (pypi-uri "attrs" version))
12232 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12233 (build-system python-build-system)
12235 `(#:modules ((guix build utils)
12236 (guix build python-build-system)
12240 #:phases (modify-phases %standard-phases
12243 (let ((cwd (getcwd)))
12244 (setenv "PYTHONPATH"
12247 (find (cut string-prefix? "lib" <>)
12248 (scandir (string-append cwd "/build")))
12250 (getenv "PYTHONPATH")))
12251 (invoke "python" "-m" "pytest")))))))
12253 `(("python-coverage" ,python-coverage)
12254 ("python-hypothesis" ,python-hypothesis)
12255 ("python-pympler" ,python-pympler)
12256 ("python-pytest" ,python-pytest)
12257 ("python-six" ,python-six)
12258 ("python-sphinx" ,python-sphinx)
12259 ("python-zope-interface" ,python-zope-interface)))
12260 (home-page "https://github.com/python-attrs/attrs/")
12261 (synopsis "Attributes without boilerplate")
12262 (description "@code{attrs} is a Python package with class decorators that
12263 ease the chores of implementing the most common attribute-related object
12265 (license license:expat)))
12267 (define-public python2-attrs
12268 (package-with-python2 python-attrs))
12270 (define-public python-attrs-bootstrap
12272 (inherit python-attrs)
12273 (name "python-attrs-bootstrap")
12274 (native-inputs `())
12275 (arguments `(#:tests? #f))))
12277 (define-public python2-attrs-bootstrap
12278 (package-with-python2 python-attrs-bootstrap))
12280 (define-public python2-cliapp
12282 (name "python2-cliapp")
12283 (version "1.20180812.1")
12287 (uri (string-append
12288 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12289 version ".tar.gz"))
12292 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12293 (build-system python-build-system)
12295 `(#:python ,python-2
12297 (modify-phases %standard-phases
12298 ;; check phase needs to be run before the build phase. If not,
12299 ;; coverage-test-runner looks for tests for the built source files,
12302 (add-before 'build 'check
12304 ;; Disable python3 tests
12305 (substitute* "check"
12306 (("python3") "# python3"))
12307 (invoke "./check"))))))
12309 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12310 ("python2-pep8" ,python2-pep8)))
12312 `(("python2-pyaml" ,python2-pyaml)))
12313 (home-page "https://liw.fi/cliapp/")
12314 (synopsis "Python framework for command line programs")
12315 (description "@code{python2-cliapp} is a python framework for
12316 command line programs. It contains the typical stuff such programs
12317 need to do, such as parsing the command line for options, and
12318 iterating over input files.")
12319 (license license:gpl2+)))
12321 (define-public python2-ttystatus
12323 (name "python2-ttystatus")
12328 (uri (string-append
12329 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12330 version ".tar.gz"))
12333 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12334 (build-system python-build-system)
12336 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12337 ("python2-pep8" ,python2-pep8)))
12339 `(#:python ,python-2
12341 (modify-phases %standard-phases
12342 ;; check phase needs to be run before the build phase. If not,
12343 ;; coverage-test-runner looks for tests for the built source files,
12346 (add-before 'build 'check
12347 (lambda _ (invoke "make" "check"))))))
12348 (home-page "https://liw.fi/ttystatus/")
12349 (synopsis "Python library for showing progress reporting and
12350 status updates on terminals")
12351 (description "@code{python2-ttystatus} is a python library for
12352 showing progress reporting and status updates on terminals, for
12353 command line programs. Output is automatically adapted to the width
12354 of the terminal: truncated if it does not fit, and resized if the
12355 terminal size changes.")
12356 (license license:gpl3+)))
12358 (define-public python2-tracing
12360 (name "python2-tracing")
12365 (uri (string-append
12366 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12367 version ".tar.gz"))
12370 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12371 (build-system python-build-system)
12373 `(#:python ,python-2))
12374 (home-page "https://liw.fi/tracing/")
12375 (synopsis "Python debug logging helper")
12376 (description "@code{python2-tracing} is a python library for
12377 logging debug messages. It provides a way to turn debugging messages
12378 on and off, based on the filename they occur in. It is much faster
12379 than using @code{logging.Filter} to accomplish the same thing, which
12380 matters when code is run in production mode. The actual logging still
12381 happens using the @code{logging} library.")
12382 (license license:gpl3+)))
12384 (define-public python2-larch
12386 (name "python2-larch")
12387 (version "1.20151025")
12391 (uri (string-append
12392 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12393 version ".tar.gz"))
12394 (patches (search-patches
12395 "python2-larch-coverage-4.0a6-compatibility.patch"))
12398 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12399 (build-system python-build-system)
12401 `(#:python ,python-2
12403 (modify-phases %standard-phases
12404 ;; check phase needs to be run before the build phase. If not,
12405 ;; coverage-test-runner looks for tests for the built source files,
12408 (add-before 'build 'check
12409 (lambda _ (invoke "make" "check"))))))
12411 `(("cmdtest" ,cmdtest)
12412 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12414 `(("python2-tracing" ,python2-tracing)))
12415 (home-page "https://liw.fi/larch/")
12416 (synopsis "Python copy-on-write B-tree library")
12417 (description "@code{python2-larch} is an implementation of
12418 particular kind of B-tree, based on research by Ohad Rodeh. See
12419 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12420 on the data structure.
12422 The distinctive feature of this B-tree is that a node is never
12423 (conceptually) modified. Instead, all updates are done by
12424 copy-on-write. This makes it easy to clone a tree, and modify only the
12425 clone, while other processes access the original tree.")
12426 (license license:gpl3+)))
12428 (define-public python-astroid
12430 (name "python-astroid")
12435 (uri (pypi-uri "astroid" version))
12438 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12439 (build-system python-build-system)
12441 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12442 ("python-six" ,python-six)
12443 ("python-wrapt" ,python-wrapt)))
12445 `(("python-dateutil" ,python-dateutil)
12446 ("python-nose" ,python-nose)
12447 ("python-pytest" ,python-pytest)
12448 ("python-pytest-runner" ,python-pytest-runner)))
12451 (modify-phases %standard-phases
12452 (add-after 'unpack 'remove-spurious-test
12454 ;; This can be removed after upgrading from python-3.7
12455 ;; https://github.com/PyCQA/astroid/issues/593
12456 ;; https://bugs.python.org/issue34056
12457 (delete-file "astroid/tests/unittest_modutils.py")
12461 (invoke "pytest" "astroid"))))))
12462 (home-page "https://github.com/PyCQA/astroid")
12463 (synopsis "Common base representation of python source code for pylint and
12465 (description "@code{python-astroid} provides a common base representation
12466 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12468 It provides a compatible representation which comes from the _ast module. It
12469 rebuilds the tree generated by the builtin _ast module by recursively walking
12470 down the AST and building an extended ast. The new node classes have
12471 additional methods and attributes for different usages. They include some
12472 support for static inference and local name scopes. Furthermore, astroid
12473 builds partial trees by inspecting living objects.")
12474 (license license:lgpl2.1+)
12475 (properties `((python2-variant . ,(delay python2-astroid))))))
12477 (define-public python2-astroid
12478 (let ((base (package-with-python2
12479 (strip-python2-variant python-astroid))))
12480 (package (inherit base)
12481 ;; Version 2.x removes python2 support.
12486 (uri (pypi-uri "astroid" version))
12489 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12491 (substitute-keyword-arguments (package-arguments base)
12493 `(modify-phases ,phases
12494 (add-after 'unpack 'remove-spurious-test
12496 ;; https://github.com/PyCQA/astroid/issues/276
12497 (delete-file "astroid/tests/unittest_brain.py")
12501 (invoke"python" "-m" "unittest" "discover"
12502 "-p" "unittest*.py")))))))
12503 (native-inputs `())
12505 `(("python2-backports-functools-lru-cache"
12506 ,python2-backports-functools-lru-cache)
12507 ("python2-enum34" ,python2-enum34)
12508 ("python2-singledispatch" ,python2-singledispatch)
12509 ,@(package-propagated-inputs base))))))
12511 (define-public python-isort
12513 (name "python-isort")
12518 (uri (git-reference
12519 ;; Tests pass only from the Github sources
12520 (url "https://github.com/timothycrosley/isort")
12522 (file-name (git-file-name name version))
12525 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12526 (build-system python-build-system)
12528 `(("python-mock" ,python-mock)
12529 ("python-pytest" ,python-pytest)))
12530 (home-page "https://github.com/timothycrosley/isort")
12531 (synopsis "Python utility/library to sort python imports")
12532 (description "@code{python-isort} is a python utility/library to sort
12533 imports alphabetically, and automatically separated into sections. It
12534 provides a command line utility, a python library and plugins for various
12536 (license license:expat)
12537 (properties `((python2-variant . ,(delay python2-isort))))))
12539 (define-public python2-isort
12540 (let ((base (package-with-python2
12541 (strip-python2-variant python-isort))))
12542 (package (inherit base)
12544 `(("python2-futures" ,python2-futures)
12545 ,@(package-native-inputs base))))))
12547 (define-public python2-backports-functools-lru-cache
12549 (name "python2-backports-functools-lru-cache")
12554 ;; only the pypi tarballs contain the necessary metadata
12555 (uri (pypi-uri "backports.functools_lru_cache" version))
12558 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12559 (build-system python-build-system)
12561 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12563 `(#:python ,python-2))
12564 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12565 (synopsis "Backport of functools.lru_cache from Python 3.3")
12566 (description "@code{python2-backports-functools-lru-cache} is a backport
12567 of @code{functools.lru_cache} from python 3.3.")
12568 (license license:expat)))
12570 (define-public python-configparser
12572 (name "python-configparser")
12577 (uri (pypi-uri "configparser" version))
12580 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12581 (build-system python-build-system)
12582 (home-page "https://github.com/jaraco/configparser/")
12583 (synopsis "Backport of configparser from python 3.5")
12584 (description "@code{python-configparser} is a backport of
12585 @code{configparser} from Python 3.5 so that it can be used directly
12586 in other versions.")
12587 (license license:expat)))
12589 (define-public python2-configparser
12590 (package-with-python2 python-configparser))
12592 (define-public python-mando
12594 (name "python-mando")
12598 (uri (pypi-uri "mando" version))
12601 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12602 (build-system python-build-system)
12604 `(("python-rst2ansi" ,python-rst2ansi)
12605 ("python-six" ,python-six)))
12607 `(("python-pytest" ,python-pytest)))
12608 (home-page "https://mando.readthedocs.org/")
12610 "Wrapper around argparse, allowing creation of complete CLI applications")
12612 "This package is a wrapper around argparse, allowing you to write complete CLI
12613 applications in seconds while maintaining all the flexibility.")
12614 (license license:expat)))
12616 (define-public python2-mando
12617 (package-with-python2 python-mando))
12619 (define-public python2-argparse
12621 (name "python2-argparse")
12626 (uri (pypi-uri "argparse" version))
12629 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12630 (build-system python-build-system)
12632 `(#:python ,python-2))
12633 (home-page "https://github.com/ThomasWaldmann/argparse/")
12634 (synopsis "Python command-line parsing library")
12636 "This package is mostly for people who want to have @code{argparse} on
12637 older Pythons because it was not part of the standard library back then.")
12638 (license license:psfl)))
12640 (define-public python-fudge
12642 (name "python-fudge")
12643 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12644 ;; package, which is currently the only use of this package.
12649 (uri (pypi-uri "fudge" version))
12652 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12653 (build-system python-build-system)
12655 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12656 (home-page "https://github.com/fudge-py/fudge")
12657 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12659 "Fudge is a Python module for using fake objects (mocks and stubs) to
12662 In readable Python code, you declare the methods available on your fake object
12663 and how they should be called. Then you inject that into your application and
12664 start testing. This declarative approach means you don’t have to record and
12665 playback actions and you don’t have to inspect your fakes after running code.
12666 If the fake object was used incorrectly then you’ll see an informative
12667 exception message with a traceback that points to the culprit.")
12668 (license license:expat)))
12670 (define-public python2-fudge
12671 (package-with-python2 python-fudge))
12673 (define-public python-mwclient
12675 (name "python-mwclient")
12680 ;; The PyPI version wouldn't contain tests.
12681 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12682 "v" version ".tar.gz"))
12683 (file-name (string-append name "-" version ".tar.gz"))
12686 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12687 (build-system python-build-system)
12689 `(("python-requests" ,python-requests)
12690 ("python-requests-oauthlib"
12691 ,python-requests-oauthlib)
12692 ("python-six" ,python-six)))
12694 `(("python-mock" ,python-mock)
12695 ("python-pytest" ,python-pytest)
12696 ("python-pytest-pep8" ,python-pytest-pep8)
12697 ("python-pytest-cache" ,python-pytest-cache)
12698 ("python-pytest-cov" ,python-pytest-cov)
12699 ("python-responses" ,python-responses)))
12700 (home-page "https://github.com/btongminh/mwclient")
12701 (synopsis "MediaWiki API client")
12702 (description "This package provides a MediaWiki API client.")
12703 (license license:expat)))
12705 (define-public python2-mwclient
12706 (package-with-python2 python-mwclient))
12708 (define-public python-utils
12710 (name "python-utils")
12714 (uri (pypi-uri "python-utils" version))
12717 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12718 (build-system python-build-system)
12720 `(("pytest-runner" ,python-pytest-runner)
12721 ("pytest" ,python-pytest)
12722 ("six" ,python-six)))
12723 (home-page "https://github.com/WoLpH/python-utils")
12724 (synopsis "Convenient utilities not included with the standard Python install")
12726 "Python Utils is a collection of small Python functions and classes which
12727 make common patterns shorter and easier.")
12728 (license license:bsd-2)))
12730 (define-public python2-utils
12731 (package-with-python2 python-utils))
12733 (define-public python-diff-match-patch
12735 (name "python-diff-match-patch")
12736 (version "20121119")
12740 (uri (pypi-uri "diff-match-patch" version))
12743 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12744 (build-system python-build-system)
12745 (home-page "https://code.google.com/p/google-diff-match-patch")
12746 (synopsis "Synchronize plain text")
12747 (description "Diff Match and Patch libraries offer robust algorithms to
12748 perform the operations required for synchronizing plain text.")
12749 (license license:asl2.0)))
12751 (define-public python2-diff-match-patch
12752 (package-with-python2 python-diff-match-patch))
12754 (define-public python-dirsync
12756 (name "python-dirsync")
12761 (uri (pypi-uri "dirsync" version))
12764 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12765 (build-system python-build-system)
12767 `(("six" ,python-six)))
12768 (home-page "https://bitbucket.org/tkhyn/dirsync")
12769 (synopsis "Advanced directory tree synchronisation tool")
12770 (description "Advanced directory tree synchronisation tool.")
12771 (license license:expat)))
12773 (define-public python2-dirsync
12774 (package-with-python2 python-dirsync))
12776 (define-public python-levenshtein
12778 (name "python-levenshtein")
12783 (uri (pypi-uri "python-Levenshtein" version))
12786 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12787 (build-system python-build-system)
12788 (home-page "https://github.com/ztane/python-Levenshtein")
12789 (synopsis "Fast computation of Levenshtein distance and string similarity")
12791 "The Levenshtein Python C extension module contains functions for fast computation of
12793 @item Levenshtein (edit) distance, and edit operations
12794 @item string similarity
12795 @item approximate median strings, and generally string averaging
12796 @item string sequence and set similarity
12798 It supports both normal and Unicode strings.")
12799 (license license:gpl2+)))
12801 (define-public python2-levenshtein
12802 (package-with-python2 python-levenshtein))
12804 (define-public python-scandir
12806 (name "python-scandir")
12811 (uri (pypi-uri "scandir" version))
12813 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12814 (build-system python-build-system)
12816 `(#:phases (modify-phases %standard-phases
12819 (invoke "python" "test/run_tests.py"))))))
12820 (home-page "https://github.com/benhoyt/scandir")
12821 (synopsis "Directory iteration function")
12823 "Directory iteration function like os.listdir(), except that instead of
12824 returning a list of bare filenames, it yields DirEntry objects that include
12825 file type and stat information along with the name. Using scandir() increases
12826 the speed of os.walk() by 2-20 times (depending on the platform and file
12827 system) by avoiding unnecessary calls to os.stat() in most cases.
12829 This package is part of the Python standard library since version 3.5.")
12830 (license license:bsd-3)))
12832 (define-public python2-scandir
12833 (package-with-python2 python-scandir))
12835 (define-public python2-stemming
12837 (name "python2-stemming")
12842 (uri (pypi-uri "stemming" version))
12844 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12845 (build-system python-build-system)
12847 `(#:python ,python-2))
12848 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12849 (synopsis "Python implementations of various stemming algorithms")
12851 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12852 stemming algorithms for English. These implementations are straightforward and
12853 efficient, unlike some Python versions of the same algorithms available on the
12854 Web. This package is an extraction of the stemming code included in the Whoosh
12856 (license license:public-domain)))
12858 (define-public python-factory-boy
12860 (name "python-factory-boy")
12865 (uri (pypi-uri "factory_boy" version))
12867 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12868 (build-system python-build-system)
12870 ;; Tests are not included in the tarball.
12873 `(("faker" ,python-faker)))
12874 (home-page "https://github.com/benhoyt/scandir")
12875 (synopsis "Versatile test fixtures replacement")
12877 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12879 As a fixtures replacement tool, it aims to replace static, hard to maintain
12880 fixtures with easy-to-use factories for complex object.
12882 Instead of building an exhaustive test setup with every possible combination
12883 of corner cases, factory_boy allows you to use objects customized for the
12884 current test, while only declaring the test-specific fields")
12885 (license license:expat)))
12887 (define-public python2-factory-boy
12888 (package-with-python2 python-factory-boy))
12890 (define-public python-translate-toolkit
12892 (name "python-translate-toolkit")
12897 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12899 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12900 (build-system python-build-system)
12902 `(("python-pytest" ,python-pytest)
12903 ("python-sphinx" ,python-sphinx)))
12905 `(("python-babel" ,python-babel)
12906 ("python-beautifulsoup4" ,python-beautifulsoup4)
12907 ("python-chardet" ,python-chardet)
12908 ("python-diff-match-patch" ,python-diff-match-patch)
12909 ("python-levenshtein" ,python-levenshtein)
12910 ("python-lxml" ,python-lxml)
12911 ("python-six" ,python-six)
12912 ("python-vobject" ,python-vobject)
12913 ("python-pyyaml" ,python-pyyaml)))
12915 ;; TODO: tests are not run, because they end with
12916 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12918 ;; during test setup.
12920 (home-page "https://toolkit.translatehouse.org")
12921 (synopsis "Tools and API for translation and localization engineering")
12923 "Tools and API for translation and localization engineering. It contains
12924 several utilities, as well as an API for building localization tools.")
12925 (license license:gpl2+)))
12927 (define-public python2-translate-toolkit
12928 (package-with-python2 python-translate-toolkit))
12930 (define-public python-packaging
12932 (name "python-packaging")
12937 (uri (pypi-uri "packaging" version))
12940 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
12941 (build-system python-build-system)
12943 `(#:phases (modify-phases %standard-phases
12945 (lambda _ (invoke "py.test" "-vv"))))))
12947 `(("python-pretend" ,python-pretend)
12948 ("python-pytest" ,python-pytest)))
12950 `(("python-pyparsing" ,python-pyparsing)
12951 ("python-six" ,python-six)))
12952 (home-page "https://github.com/pypa/packaging")
12953 (synopsis "Core utilities for Python packages")
12954 (description "Packaging is a Python module for dealing with Python packages.
12955 It offers an interface for working with package versions, names, and dependency
12957 ;; From 'LICENSE': This software is made available under the terms of
12958 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12959 ;; Contributions to this software is made under the terms of *both* these
12961 (license (list license:asl2.0 license:bsd-2))))
12963 (define-public python2-packaging
12964 (package-with-python2 python-packaging))
12966 (define-public python-relatorio
12968 (name "python-relatorio")
12973 (uri (pypi-uri "relatorio" version))
12976 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12977 (build-system python-build-system)
12979 `(("python-lxml" ,python-lxml)
12980 ("python-genshi" ,python-genshi)))
12982 `(("python-magic" ,python-magic)))
12983 (home-page "https://relatorio.tryton.org/")
12984 (synopsis "Templating library able to output ODT and PDF files")
12985 (description "Relatorio is a templating library which provides a way to
12986 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12987 for more filetypes can be easily added by creating plugins for them.")
12988 (license license:gpl3+)))
12990 (define-public python2-relatorio
12991 (package-with-python2 python-relatorio))
12993 (define-public python-radon
12995 (name "python-radon")
13000 (uri (pypi-uri "radon" version))
13003 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13004 (build-system python-build-system)
13006 `(#:phases (modify-phases %standard-phases
13009 (invoke "python" "radon/tests/run.py"))))))
13011 `(("python-colorama" ,python-colorama)
13012 ("python-flake8-polyfill" ,python-flake8-polyfill)
13013 ("python-mando" ,python-mando)))
13015 `(("python-pytest" ,python-pytest)
13016 ("python-pytest-mock" ,python-pytest-mock)))
13017 (home-page "https://radon.readthedocs.org/")
13018 (synopsis "Code Metrics in Python")
13019 (description "Radon is a Python tool which computes various code metrics.
13020 Supported metrics are:
13022 @item raw metrics: SLOC, comment lines, blank lines, &c.
13023 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13024 @item Halstead metrics (all of them)
13025 @item the Maintainability Index (a Visual Studio metric)
13027 (license license:expat)))
13029 (define-public python2-radon
13030 (package-with-python2 python-radon))
13032 (define-public python-sure
13034 (name "python-sure")
13039 (uri (pypi-uri "sure" version))
13042 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13043 (build-system python-build-system)
13045 `(("python-mock" ,python-mock)
13046 ("python-six" ,python-six)))
13048 `(("python-nose" ,python-nose)))
13049 (home-page "https://github.com/gabrielfalcao/sure")
13050 (synopsis "Automated testing library in python for python")
13052 "Sure is a python library that leverages a DSL for writing assertions.
13053 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13054 (license license:gpl3+)))
13056 (define-public python2-sure
13057 (package-with-python2 python-sure))
13059 (define-public python2-couleur
13060 ;; This package does not seem to support python3 at all, hence,
13061 ;; only the python2 variant definition is provided.
13063 (name "python2-couleur")
13068 (uri (pypi-uri "couleur" version))
13071 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13072 (build-system python-build-system)
13074 `(#:python ,python-2))
13075 (home-page "https://github.com/gabrielfalcao/couleur")
13077 "ANSI terminal tool for python, colored shell and other handy fancy features")
13079 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13080 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13081 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13082 ;; https://github.com/gabrielfalcao/couleur/issues/11
13083 (license license:lgpl3+)))
13085 (define-public python-misaka
13087 (name "python-misaka")
13092 (uri (pypi-uri "misaka" version))
13095 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13096 (build-system python-build-system)
13098 `(;; Line 37 of setup.py calls self.run_command('develop')
13099 ;; in the 'check' phase. This command seems to be trying
13101 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13102 ;; for which it does not have the permission to write.
13105 `(("python-cffi" ,python-cffi)))
13106 (home-page "https://github.com/FSX/misaka")
13107 (synopsis "Python binding for Hoedown")
13109 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13110 library written in C. It features a fast HTML renderer and functionality to make custom
13111 renderers (e.g. man pages or LaTeX).")
13112 (license license:expat)))
13114 (define-public python2-misaka
13115 (package-with-python2 python-misaka))
13117 (define-public python2-steadymark
13118 ;; This is forced into being a python2 only variant
13119 ;; due to its dependence on couleur that has no support
13122 (name "python2-steadymark")
13127 (uri (pypi-uri "steadymark" version))
13130 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13131 (build-system python-build-system)
13133 `(("python-couleur" ,python2-couleur)
13134 ("python-sure" ,python2-sure)
13135 ("python-misaka" ,python2-misaka)))
13137 `(#:python ,python-2
13139 (modify-phases %standard-phases
13140 (add-before 'build 'patch-setup-py
13142 ;; Update requirements from dependency==version
13143 ;; to dependency>=version
13144 (substitute* "setup.py"
13147 (home-page "https://github.com/gabrielfalcao/steadymark")
13148 (synopsis "Markdown-based test runner for python")
13150 "@code{Steadymark} allows documentation to be written in github-flavoured
13151 markdown. The documentation may contain snippets of code surrounded by python
13152 code blocks and @code{Steadymark} will find these snippets and run them, making
13153 sure that there are no old malfunctional examples in the documentation examples.")
13154 (license license:expat)))
13156 (define-public python-jsonpointer
13158 (name "python-jsonpointer")
13163 (uri (pypi-uri "jsonpointer" version))
13166 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13167 (build-system python-build-system)
13168 (home-page "https://github.com/stefankoegl/python-json-pointer")
13169 (synopsis "Identify specific nodes in a JSON document")
13170 (description "@code{jsonpointer} allows you to access specific nodes
13171 by path in a JSON document (see RFC 6901).")
13172 (license license:bsd-3)))
13174 (define-public python2-jsonpointer
13175 (package-with-python2 python-jsonpointer))
13177 (define-public python-jsonpatch
13179 (name "python-jsonpatch")
13184 ;; pypi version lacks tests.js
13185 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13186 "archive/v" version ".tar.gz"))
13187 (file-name (string-append name "-" version ".tar.gz"))
13190 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13191 (build-system python-build-system)
13193 `(("python-jsonpointer" ,python-jsonpointer)))
13194 (home-page "https://github.com/stefankoegl/python-json-patch")
13195 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13196 (description "@code{jsonpatch} is a library and program that allows
13197 applying JSON Patches according to RFC 6902.")
13198 (license license:bsd-3)))
13200 (define-public python2-jsonpatch
13201 (package-with-python2 python-jsonpatch))
13203 (define-public python-jsonpatch-0.4
13204 (package (inherit python-jsonpatch)
13205 (name "python-jsonpatch")
13210 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13211 "archive/v" version ".tar.gz"))
13212 (file-name (string-append name "-" version ".tar.gz"))
13215 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13217 (define-public python2-jsonpatch-0.4
13218 (package-with-python2 python-jsonpatch-0.4))
13220 (define-public python-rfc3986
13222 (name "python-rfc3986")
13226 (uri (pypi-uri "rfc3986" version))
13229 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13230 (build-system python-build-system)
13232 `(#:modules ((guix build utils)
13233 (guix build python-build-system)
13238 (modify-phases %standard-phases
13241 (let ((cwd (getcwd)))
13242 (setenv "PYTHONPATH"
13243 (string-append cwd "/build/"
13244 (find (cut string-prefix? "lib" <>)
13245 (scandir (string-append cwd "/build")))
13247 (getenv "PYTHONPATH")))
13248 (invoke "pytest" "-v")))))))
13250 `(("python-pytest" ,python-pytest)))
13251 (home-page "https://rfc3986.readthedocs.io/")
13252 (synopsis "Parse and validate URI references")
13254 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13255 validation and authority parsing. This module also supports RFC@tie{}6874
13256 which adds support for zone identifiers to IPv6 addresses.")
13257 (license license:asl2.0)))
13259 (define-public python2-rfc3986
13260 (package-with-python2 python-rfc3986))
13262 (define-public python-rfc3987
13264 (name "python-rfc3987")
13269 (uri (pypi-uri "rfc3987" version))
13272 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13273 (build-system python-build-system)
13274 (home-page "https://pypi.python.org/pypi/rfc3987")
13275 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13276 (description "@code{rfc3987} provides routines for parsing and
13277 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13278 (license license:gpl3+)))
13280 (define-public python2-rfc3987
13281 (package-with-python2 python-rfc3987))
13283 (define-public python-validate-email
13285 (name "python-validate-email")
13290 (uri (pypi-uri "validate_email" version))
13293 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13294 (build-system python-build-system)
13295 (home-page "https://github.com/syrusakbary/validate_email")
13296 (synopsis "Verifies if an email address is valid and really exists")
13297 (description "@code{validate_email} can be used to verify if an email
13298 address is valid and really exists.")
13299 (license license:lgpl3+)))
13301 (define-public python2-validate-email
13302 (package-with-python2 python-validate-email))
13304 (define-public python-flex
13306 (name "python-flex")
13311 (uri (pypi-uri "flex" version))
13314 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13315 (build-system python-build-system)
13317 `(("python-click" ,python-click)
13318 ("python-iso8601" ,python-iso8601)
13319 ("python-jsonpointer" ,python-jsonpointer)
13320 ("python-pyyaml" ,python-pyyaml)
13321 ("python-requests" ,python-requests)
13322 ("python-rfc3987" ,python-rfc3987)
13323 ("python-six" ,python-six)
13324 ("python-validate-email" ,python-validate-email)))
13325 (home-page "https://github.com/pipermerriam/flex")
13326 (synopsis "Validates Swagger schemata")
13327 (description "@code{flex} can be used to validate Swagger schemata.")
13328 (license license:bsd-3)))
13330 (define-public python2-flex
13331 (package-with-python2 python-flex))
13333 (define-public python-marshmallow
13335 (name "python-marshmallow")
13336 (version "3.0.0b14")
13340 (uri (pypi-uri "marshmallow" version))
13343 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13344 (build-system python-build-system)
13346 `(("python-dateutil" ,python-dateutil)
13347 ("python-simplejson" ,python-simplejson)))
13349 `(("python-pytest" ,python-pytest)
13350 ("python-pytz" ,python-pytz)))
13351 (home-page "https://github.com/marshmallow-code/marshmallow")
13352 (synopsis "Convert complex datatypes to and from native
13353 Python datatypes.")
13354 (description "@code{marshmallow} provides a library for converting
13355 complex datatypes to and from native Python datatypes.")
13356 (license license:expat)))
13358 (define-public python2-marshmallow
13359 (package-with-python2 python-marshmallow))
13361 (define-public python-apispec
13363 (name "python-apispec")
13368 (uri (pypi-uri "apispec" version))
13371 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13372 (build-system python-build-system)
13374 `(("python-pyyaml" ,python-pyyaml)))
13376 `(("python-pytest" ,python-pytest)
13377 ("python-flask" ,python-flask)
13378 ("python-marshmallow" ,python-marshmallow)
13379 ("python-tornado" ,python-tornado)
13380 ("python-bottle" ,python-bottle)
13381 ("python-mock" ,python-mock)))
13382 (home-page "https://github.com/marshmallow-code/apispec")
13383 (synopsis "Swagger 2.0 API specification generator")
13384 (description "@code{python-apispec} is a pluggable API specification
13385 generator. Currently supports the OpenAPI specification (f.k.a.
13387 (license license:expat)))
13389 (define-public python2-apispec
13390 (package-with-python2 python-apispec))
13392 (define-public python-flasgger
13394 (name "python-flasgger")
13399 (uri (git-reference
13400 (url "https://github.com/rochacbruno/flasgger.git")
13402 (file-name (git-file-name name version))
13404 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13405 (build-system python-build-system)
13408 (modify-phases %standard-phases
13410 (lambda* (#:key inputs outputs #:allow-other-keys)
13411 (substitute* "Makefile"
13412 (("flake8 flasgger --ignore=F403")
13413 "flake8 flasgger --ignore=E731,F403"))
13414 (setenv "PYTHONPATH" (string-append (getcwd)
13416 (getenv "PYTHONPATH")))
13417 (invoke "py.test"))))))
13419 `(("python-flask" ,python-flask)
13420 ("python-pyyaml" ,python-pyyaml)
13421 ("python-jsonschema" ,python-jsonschema)
13422 ("python-mistune" ,python-mistune)
13423 ("python-six" ,python-six)))
13425 `(("python-decorator" ,python-decorator)
13426 ("python-flake8" ,python-flake8)
13427 ("python-flask-restful" ,python-flask-restful)
13428 ("python-flex" ,python-flex)
13429 ("python-pytest" ,python-pytest)
13430 ("python-pytest-cov" ,python-pytest-cov)
13431 ("python-marshmallow" ,python-marshmallow)
13432 ("python-apispec" ,python-apispec)))
13433 (home-page "https://github.com/rochacbruno/flasgger/")
13434 (synopsis "Extract Swagger specs from your Flask project")
13435 (description "@code{python-flasgger} allows extracting Swagger specs
13436 from your Flask project. It is a fork of Flask-Swagger.")
13437 (license license:expat)))
13439 (define-public python2-flasgger
13440 (package-with-python2 python-flasgger))
13442 (define-public python-swagger-spec-validator
13444 (name "python-swagger-spec-validator")
13449 (uri (pypi-uri "swagger-spec-validator" version))
13452 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13453 (build-system python-build-system)
13455 `(("python-jsonschema" ,python-jsonschema)
13456 ("python-pyyaml" ,python-pyyaml)
13457 ("python-six" ,python-six)))
13459 "https://github.com/Yelp/swagger_spec_validator")
13460 (synopsis "Validation of Swagger specifications")
13461 (description "@code{swagger_spec_validator} provides a library for
13462 validating Swagger API specifications.")
13463 (license license:asl2.0)))
13465 (define-public python2-swagger-spec-validator
13466 (package-with-python2 python-swagger-spec-validator))
13468 (define-public python-apache-libcloud
13470 (name "python-apache-libcloud")
13475 (uri (pypi-uri "apache-libcloud" version))
13478 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13479 (build-system python-build-system)
13482 (modify-phases %standard-phases
13483 (add-after 'unpack 'patch-ssh
13484 (lambda* (#:key inputs #:allow-other-keys)
13485 (substitute* "libcloud/compute/ssh.py"
13486 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13489 (add-after 'unpack 'patch-tests
13491 (substitute* "./libcloud/test/test_file_fixtures.py"
13492 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13493 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13494 return (httplib.OK,
13496 {\"test\": \"value\"},
13497 httplib.responses[httplib.OK])
13499 (substitute* "libcloud/test/compute/test_ssh_client.py"
13500 (("class ShellOutSSHClientTests")
13501 "@unittest.skip(\"Guix container doesn't have ssh service\")
13502 class ShellOutSSHClientTests")
13503 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13504 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13505 (("'.xF0', '.x90', '.x8D', '.x88'")
13506 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13508 (add-before 'check 'copy-secret
13510 (copy-file "libcloud/test/secrets.py-dist"
13511 "libcloud/test/secrets.py")
13514 `(("openssh" ,openssh)))
13516 `(("python-paramiko" ,python-paramiko)
13517 ("python-requests" ,python-requests)))
13519 `(("python-lockfile" ,python-lockfile)
13520 ("python-mock" ,python-mock)
13521 ("python-pytest" ,python-pytest)
13522 ("python-pytest-runner" ,python-pytest-runner)
13523 ("python-requests-mock" ,python-requests-mock)))
13524 (home-page "https://libcloud.apache.org/")
13525 (synopsis "Unified Cloud API")
13526 (description "@code{libcloud} is a Python library for interacting with
13527 many of the popular cloud service providers using a unified API.")
13528 (license license:asl2.0)))
13530 (define-public python2-apache-libcloud
13531 (package-with-python2 python-apache-libcloud))
13533 (define-public python-smmap2
13535 (name "python-smmap2")
13540 (uri (pypi-uri "smmap2" version))
13543 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13544 (build-system python-build-system)
13546 `(("python-nosexcover" ,python-nosexcover)))
13547 (home-page "https://github.com/Byron/smmap")
13548 (synopsis "Python sliding window memory map manager")
13549 (description "@code{smmap2} is a pure Python implementation of a sliding
13550 window memory map manager.")
13551 (license license:bsd-3)))
13553 (define-public python2-smmap2
13554 (package-with-python2 python-smmap2))
13556 (define-public python-regex
13558 (name "python-regex")
13559 (version "2019.04.14")
13562 (uri (pypi-uri "regex" version))
13565 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13566 ;; TODO: Fix and enable regex_test.py tests that complain about the
13567 ;; test.support module not existing.
13568 (build-system python-build-system)
13569 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13570 (synopsis "Alternative regular expression module")
13571 (description "This regular expression implementation is backwards-
13572 compatible with the standard @code{re} module, but offers additional
13573 functionality like full case-folding for case-insensitive matches in Unicode.")
13574 (license license:psfl)))
13576 (define-public python2-regex
13577 (package-with-python2 python-regex))
13579 (define-public python2-pyopengl
13581 (name "python2-pyopengl")
13586 (uri (pypi-uri "PyOpenGL" version))
13589 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13591 `(#:python ,python-2))
13592 (build-system python-build-system)
13593 (home-page "http://pyopengl.sourceforge.net")
13594 (synopsis "Standard OpenGL bindings for Python")
13596 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13597 related APIs. The binding is created using the standard @code{ctypes}
13599 (license license:bsd-3)))
13601 (define-public python2-pyopengl-accelerate
13603 (inherit python2-pyopengl)
13604 (name "python2-pyopengl-accelerate")
13609 (uri (pypi-uri "PyOpenGL-accelerate" version))
13612 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13613 (synopsis "Acceleration code for PyOpenGL")
13615 "This is the Cython-coded accelerator module for PyOpenGL.")))
13617 (define-public python-rencode
13619 (name "python-rencode")
13624 (uri (pypi-uri "rencode" version))
13627 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13628 (build-system python-build-system)
13631 (modify-phases %standard-phases
13632 (add-before 'check 'delete-bogus-test
13633 ;; This test requires /home/aresch/Downloads, which is not provided by
13634 ;; the build environment.
13636 (delete-file "rencode/t.py")
13638 (native-inputs `(("pkg-config" ,pkg-config)
13639 ("python-cython" ,python-cython)))
13640 (home-page "https://github.com/aresch/rencode")
13641 (synopsis "Serialization of heterogeneous data structures")
13643 "The @code{rencode} module is a data structure serialization library,
13644 similar to @code{bencode} from the BitTorrent project. For complex,
13645 heterogeneous data structures with many small elements, r-encoding stake up
13646 significantly less space than b-encodings. This version of rencode is a
13647 complete rewrite in Cython to attempt to increase the performance over the
13648 pure Python module.")
13649 (license license:bsd-3)))
13651 (define-public python2-rencode
13652 (package-with-python2 python-rencode))
13654 (define-public python-xenon
13656 (name "python-xenon")
13661 (uri (pypi-uri "xenon" version))
13664 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13665 (build-system python-build-system)
13667 `(("python-pyyaml" ,python-pyyaml)
13668 ("python-radon" ,python-radon)
13669 ("python-requests" ,python-requests)
13670 ("python-flake8" ,python-flake8)
13671 ("python-tox" ,python-tox)))
13674 (modify-phases %standard-phases
13675 (add-before 'build 'patch-test-requirements
13677 ;; Remove httpretty dependency for tests.
13678 (substitute* "setup.py"
13679 (("httpretty") ""))
13681 (home-page "https://xenon.readthedocs.org/")
13682 (synopsis "Monitor code metrics for Python on your CI server")
13684 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13685 Ideally, @code{xenon} is run every time code is committed. Through command
13686 line options, various thresholds can be set for the complexity of code. It
13687 will fail (i.e. it will exit with a non-zero exit code) when any of these
13688 requirements is not met.")
13689 (license license:expat)))
13691 (define-public python2-xenon
13692 (package-with-python2 python-xenon))
13694 (define-public python-pysocks
13696 (name "python-pysocks")
13701 (uri (pypi-uri "PySocks" version))
13704 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13705 (build-system python-build-system)
13706 (arguments `(#:tests? #f))
13707 (home-page "https://github.com/Anorov/PySocks")
13708 (synopsis "SOCKS client module")
13709 (description "@code{pysocks} is an updated and semi-actively maintained
13710 version of @code{SocksiPy} with bug fixes and extra features.")
13711 (license license:bsd-3)))
13713 (define-public python2-pysocks
13714 (package-with-python2 python-pysocks))
13716 (define-public python-pydiff
13718 (name "python-pydiff")
13723 (uri (pypi-uri "pydiff" version))
13726 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13727 (build-system python-build-system)
13728 (home-page "https://github.com/myint/pydiff")
13729 (synopsis "Library to diff two Python files at the bytecode level")
13731 "@code{pydiff} makes it easy to look for actual code changes while
13732 ignoring formatting changes.")
13733 (license license:expat)))
13735 (define-public python2-pydiff
13736 (package-with-python2 python-pydiff))
13738 (define-public python-tqdm
13740 (name "python-tqdm")
13745 (uri (pypi-uri "tqdm" version))
13748 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13749 (build-system python-build-system)
13751 `(("python-flake8" ,python-flake8)
13752 ("python-nose" ,python-nose)
13753 ("python-coverage" ,python-coverage)))
13754 (home-page "https://github.com/tqdm/tqdm")
13755 (synopsis "Fast, extensible progress meter")
13757 "Make loops show a progress bar on the console by just wrapping any
13758 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13759 design and layout.")
13760 (license (list license:mpl2.0 license:expat))
13761 (properties `((python2-variant . ,(delay python2-tqdm))))))
13763 (define-public python2-tqdm
13764 (let ((tqdm (package-with-python2
13765 (strip-python2-variant python-tqdm))))
13766 (package (inherit tqdm)
13767 (native-inputs `(("python2-functools32" ,python2-functools32)
13768 ,@(package-native-inputs tqdm))))))
13770 (define-public python-pkginfo
13772 (name "python-pkginfo")
13777 (uri (pypi-uri "pkginfo" version))
13780 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13781 (build-system python-build-system)
13783 ;; The tests are broken upstream.
13786 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13788 "Query metadatdata from sdists, bdists, and installed packages")
13790 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13791 source distriubtion (an sdist) or a binary distribution (e.g., created by
13792 running bdist_egg). It can also query the EGG-INFO directory of an installed
13793 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13794 created by running @code{python setup.py develop}).")
13795 (license license:expat)))
13797 (define-public python2-pkginfo
13798 (package-with-python2 python-pkginfo))
13800 (define-public python-twine
13802 (name "python-twine")
13807 (uri (pypi-uri "twine" version))
13810 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13811 (build-system python-build-system)
13813 `(("python-tqdm" ,python-tqdm)
13814 ("python-pkginfo" ,python-pkginfo)
13815 ("python-requests" ,python-requests)
13816 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13817 (home-page "https://github.com/pypa/twine")
13818 (synopsis "Collection of utilities for interacting with PyPI")
13820 "@code{twine} currently supports registering projects and uploading
13821 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13822 their files and supports any packaging format (including wheels).")
13823 (license license:asl2.0)))
13825 (define-public python2-twine
13826 (package-with-python2 python-twine))
13828 (define-public python-linecache2
13830 (name "python-linecache2")
13835 (uri (pypi-uri "linecache2" version))
13838 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13839 (build-system python-build-system)
13841 `(;; The tests depend on unittest2, and our version is a bit too old.
13844 `(("python-pbr" ,python-pbr-minimal)))
13846 "https://github.com/testing-cabal/linecache2")
13847 (synopsis "Backports of the linecache module")
13849 "The linecache module allows one to get any line from any file, while
13850 attempting to optimize internally, using a cache, the common case where many
13851 lines are read from a single file.")
13852 (license license:psfl)))
13854 (define-public python2-linecache2
13855 (package-with-python2 python-linecache2))
13857 (define-public python-traceback2
13859 (name "python-traceback2")
13864 (uri (pypi-uri "traceback2" version))
13867 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13868 (build-system python-build-system)
13870 `(;; python-traceback2 and python-unittest2 depend on one another.
13873 `(("python-pbr" ,python-pbr-minimal)))
13875 `(("python-linecache2" ,python-linecache2)))
13877 "https://github.com/testing-cabal/traceback2")
13878 (synopsis "Backports of the traceback module")
13880 "This module provides a standard interface to extract, format and print
13881 stack traces of Python programs. It exactly mimics the behavior of the Python
13882 interpreter when it prints a stack trace.")
13883 (license license:psfl)))
13885 (define-public python2-traceback2
13886 (package-with-python2 python-traceback2))
13888 (define-public python-ratelimiter
13890 (name "python-ratelimiter")
13895 (uri (pypi-uri "ratelimiter" version))
13898 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13899 (build-system python-build-system)
13901 '(#:tests? #f)) ; There are no tests in the pypi archive.
13902 (home-page "https://github.com/RazerM/ratelimiter")
13903 (synopsis "Simple rate limiting object")
13905 "The @code{ratelimiter} module ensures that an operation will not be
13906 executed more than a given number of times during a given period.")
13907 (license license:asl2.0)))
13909 (define-public python2-ratelimiter
13910 (package-with-python2 python-ratelimiter))
13912 (define-public python-dukpy
13914 (name "python-dukpy")
13919 (uri (git-reference
13920 (url "https://github.com/kovidgoyal/dukpy.git")
13921 (commit (string-append "v" version))))
13922 (file-name (git-file-name name version))
13924 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13925 (build-system python-build-system)
13926 (home-page "https://github.com/kovidgoyal/dukpy")
13927 (synopsis "Run JavaScript in python")
13929 "dukpy is a JavaScript runtime environment for Python using the duktape
13930 embeddable JavaScript engine.")
13931 ;; Dukpy is licensed under MIT like the embedded duktape library,
13932 ;; with 'errors.c' as GPL3.
13933 (license (list license:expat license:gpl3))))
13935 (define-public python2-dukpy
13936 (package-with-python2 python-dukpy))
13938 (define-public python-jsonrpclib-pelix
13940 (name "python-jsonrpclib-pelix")
13945 (uri (pypi-uri "jsonrpclib-pelix" version))
13948 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13949 (build-system python-build-system)
13951 `(#:tests? #f)) ; no tests in PyPI tarball
13952 (home-page "https://github.com/tcalmant/jsonrpclib/")
13953 (synopsis "JSON-RPC 2.0 client library for Python")
13955 "This library implements the JSON-RPC v2.0
13956 specification (backwards-compatible) as a client library for Python. This
13957 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13959 (license license:asl2.0)))
13961 (define-public python2-jsonrpclib-pelix
13962 (package-with-python2 python-jsonrpclib-pelix))
13964 (define-public python-setuptools-scm-git-archive
13966 (name "python-setuptools-scm-git-archive")
13971 (uri (pypi-uri "setuptools_scm_git_archive" version))
13974 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13975 (build-system python-build-system)
13977 `(("python-pytest" ,python-pytest)))
13979 `(("python-setuptools-scm" ,python-setuptools-scm)))
13980 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13981 (synopsis "Setuptools_scm plugin for git archives")
13983 "The setuptools_scm_git_archive package is a plugin to
13984 setuptools_scm, which supports obtaining versions from git archives that
13985 belong to tagged versions.")
13986 (license license:expat)))
13988 (define-public python2-setuptools-scm-git-archive
13989 (package-with-python2 python-setuptools-scm-git-archive))
13991 (define-public python-setuptools-git
13993 (name "python-setuptools-git")
13998 (uri (pypi-uri "setuptools-git" version))
14001 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14002 (build-system python-build-system)
14005 (modify-phases %standard-phases
14006 ;; This is needed for tests.
14007 (add-after 'unpack 'configure-git
14009 (setenv "HOME" "/tmp")
14010 (invoke "git" "config" "--global" "user.email" "guix")
14011 (invoke "git" "config" "--global" "user.name" "guix")
14014 `(("git" ,git-minimal)))
14015 (home-page "https://github.com/msabramo/setuptools-git")
14016 (synopsis "Setuptools revision control system plugin for Git")
14018 "This package provides a plugin for Setuptools for revision control with
14020 (license license:bsd-3)))
14022 (define-public python-pyclipper
14024 (name "python-pyclipper")
14025 (version "1.1.0.post1")
14029 (uri (pypi-uri "pyclipper" version ".zip"))
14032 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14033 (modules '((guix build utils)))
14036 ;; This file is generated by Cython.
14037 (delete-file "pyclipper/pyclipper.cpp") #t))))
14038 (build-system python-build-system)
14041 (modify-phases %standard-phases
14042 (add-before 'build 'cythonize-sources
14044 (with-directory-excursion "pyclipper"
14045 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14047 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14049 `(("python-cython" ,python-cython)
14050 ("python-pytest" ,python-pytest)
14051 ("python-pytest-runner" ,python-pytest-runner)
14052 ("python-unittest2" ,python-unittest2)
14054 (home-page "https://github.com/greginvm/pyclipper")
14055 (synopsis "Wrapper for Angus Johnson's Clipper library")
14057 "Pyclipper is a Cython wrapper for the C++ translation of the
14058 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14059 (license license:expat)))
14061 (define-public python2-pyclipper
14062 (package-with-python2 python-pyclipper))
14064 (define-public python2-booleanoperations
14066 (name "python2-booleanoperations")
14071 (uri (pypi-uri "booleanOperations" version ".zip"))
14074 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14075 (build-system python-build-system)
14077 `(#:python ,python-2))
14080 ("python2-pytest" ,python2-pytest)
14081 ("python2-pytest-runner" ,python2-pytest-runner)))
14083 `(("python-fonttools" ,python2-fonttools)
14084 ("python-pyclipper" ,python2-pyclipper)
14085 ("python-ufolib" ,python2-ufolib)))
14086 (home-page "https://github.com/typemytype/booleanOperations")
14087 (synopsis "Boolean operations on paths")
14089 "BooleanOperations provides a Python library that enables
14090 boolean operations on paths.")
14091 (license license:expat)))
14093 (define-public python-tempdir
14095 (name "python-tempdir")
14100 (uri (pypi-uri "tempdir" version))
14103 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14104 (build-system python-build-system)
14105 (home-page "https://pypi.org/project/tempdir/")
14107 ;; the package has no tests
14109 (synopsis "Python library for managing temporary directories")
14111 "This library manages temporary directories that are automatically
14112 deleted with all their contents when they are no longer needed. It is
14113 particularly convenient for use in tests.")
14114 (license license:expat)))
14116 (define-public python2-tempdir
14117 (package-with-python2 python-tempdir))
14119 (define-public python-activepapers
14121 (name "python-activepapers")
14126 (uri (pypi-uri "ActivePapers.Py" version))
14129 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14130 (build-system python-build-system)
14132 `(#:modules ((ice-9 ftw)
14135 (guix build python-build-system))
14138 (modify-phases %standard-phases
14139 (add-after 'unpack 'delete-python2-code
14141 (for-each delete-file
14142 '("lib/activepapers/builtins2.py"
14143 "lib/activepapers/standardlib2.py"
14144 "lib/activepapers/utility2.py"))))
14147 ;; Deactivate the test cases that download files
14148 (setenv "NO_NETWORK_ACCESS" "1")
14149 ;; For some strange reason, some tests fail if nosetests runs all
14150 ;; test modules in a single execution. They pass if each test
14151 ;; module is run individually.
14152 (for-each (lambda (filename)
14153 (invoke "nosetests"
14154 (string-append "tests/" filename)))
14157 (string-suffix? ".py" filename)))))))))
14159 `(("python-tempdir" ,python-tempdir)
14160 ("python-nose" ,python-nose)))
14162 `(("python-h5py" ,python-h5py)))
14163 (home-page "http://www.activepapers.org/")
14164 (synopsis "Executable papers for scientific computing")
14166 "ActivePapers is a tool for working with executable papers, which
14167 combine data, code, and documentation in single-file packages,
14168 suitable for publication as supplementary material or on repositories
14169 such as figshare or Zenodo.")
14170 (properties `((python2-variant . ,(delay python2-activepapers))))
14171 (license license:bsd-3)))
14173 (define-public python2-activepapers
14174 (let ((base (package-with-python2
14175 (strip-python2-variant python-activepapers))))
14179 (substitute-keyword-arguments (package-arguments base)
14181 `(modify-phases ,phases
14182 (delete 'delete-python2-code)
14183 (add-after 'unpack 'delete-python3-code
14185 (for-each delete-file
14186 '("lib/activepapers/builtins3.py"
14187 "lib/activepapers/standardlib3.py"
14188 "lib/activepapers/utility3.py")))))))))))
14190 (define-public python-semver
14192 (name "python-semver")
14197 (uri (pypi-uri "semver" version))
14200 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14201 (build-system python-build-system)
14204 (modify-phases %standard-phases
14205 (add-after 'unpack 'patch-test-requirements
14207 (substitute* "setup.py"
14208 ;; Our Python is new enough.
14209 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14212 `(("python-tox" ,python-tox)
14213 ("python-virtualenv" ,python-virtualenv)))
14214 (home-page "https://github.com/k-bx/python-semver")
14215 (synopsis "Python helper for Semantic Versioning")
14216 (description "This package provides a Python library for
14217 @url{Semantic Versioning, http://semver.org/}.")
14218 (license license:bsd-3)))
14220 (define-public python2-semver
14221 (package-with-python2 python-semver))
14223 (define-public python-pyro4
14225 (name "python-pyro4")
14230 (uri (pypi-uri "Pyro4" version))
14232 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14233 (build-system python-build-system)
14235 `(("python-serpent" ,python-serpent)))
14236 (home-page "https://pyro4.readthedocs.io")
14237 (synopsis "Distributed object middleware for Python")
14239 "Pyro enables you to build applications in which objects can talk to each
14240 other over the network. You can just use normal Python method calls to call
14241 objects on other machines, also known as remote procedure calls (RPC).")
14242 (license license:expat)))
14244 (define-public python2-pyro
14246 (name "python2-pyro")
14251 (uri (pypi-uri "Pyro" version))
14252 (file-name (string-append "Pyro-" version ".tar.gz"))
14255 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14256 (build-system python-build-system)
14258 ;; Pyro is not compatible with Python 3
14259 `(#:python ,python-2
14260 ;; Pyro has no test cases for automatic execution
14262 (home-page "http://pythonhosted.org/Pyro/")
14263 (synopsis "Distributed object manager for Python")
14264 (description "Pyro is a Distributed Object Technology system
14265 written in Python that is designed to be easy to use. It resembles
14266 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14267 which is a system and language independent Distributed Object Technology
14268 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14269 longer maintained. New projects should use Pyro4 instead, which
14270 is the new Pyro version that is actively developed.")
14271 (license license:expat)))
14273 (define-public python2-scientific
14275 (name "python2-scientific")
14280 (uri (string-append "https://bitbucket.org/khinsen/"
14281 "scientificpython/downloads/ScientificPython-"
14282 version ".tar.gz"))
14283 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14286 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14287 (build-system python-build-system)
14289 `(("netcdf" ,netcdf)))
14291 `(("python-numpy" ,python2-numpy-1.8)
14292 ("python-pyro" ,python2-pyro)))
14294 ;; ScientificPython is not compatible with Python 3
14295 `(#:python ,python-2
14296 #:tests? #f ; No test suite
14298 (modify-phases %standard-phases
14300 (lambda* (#:key inputs #:allow-other-keys)
14301 (invoke "python" "setup.py" "build"
14302 (string-append "--netcdf_prefix="
14303 (assoc-ref inputs "netcdf"))))))))
14304 (home-page "https://bitbucket.org/khinsen/scientificpython")
14305 (synopsis "Python modules for scientific computing")
14306 (description "ScientificPython is a collection of Python modules that are
14307 useful for scientific computing. Most modules are rather general (Geometry,
14308 physical units, automatic derivatives, ...) whereas others are more
14309 domain-specific (e.g. netCDF and PDB support). The library is currently
14310 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14311 (license license:cecill-c)))
14313 (define-public python2-mmtk
14315 (name "python2-mmtk")
14320 (uri (string-append "https://bitbucket.org/khinsen/"
14321 "mmtk/downloads/MMTK-" version ".tar.gz"))
14322 (file-name (string-append "MMTK-" version ".tar.gz"))
14325 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14326 (build-system python-build-system)
14328 `(("netcdf" ,netcdf)))
14330 `(("python-scientific" ,python2-scientific)
14331 ("python-tkinter" ,python-2 "tk")))
14333 `(#:python ,python-2
14336 (modify-phases %standard-phases
14337 (add-before 'build 'includes-from-scientific
14338 (lambda* (#:key inputs #:allow-other-keys)
14339 (mkdir-p "Include/Scientific")
14342 (assoc-ref inputs "python-scientific")
14343 "/include/python2.7/Scientific")
14344 "Include/Scientific"))))))
14345 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14346 (synopsis "Python library for molecular simulation")
14347 (description "MMTK is a library for molecular simulations with an emphasis
14348 on biomolecules. It provides widely used methods such as Molecular Dynamics
14349 and normal mode analysis, but also basic routines for implementing new methods
14350 for simulation and analysis. The library is currently not actively maintained
14351 and works only with Python 2 and NumPy < 1.9.")
14352 (license license:cecill-c)))
14354 (define-public python-phonenumbers
14356 (name "python-phonenumbers")
14361 (uri (pypi-uri "phonenumbers" version))
14364 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14365 (build-system python-build-system)
14367 "https://github.com/daviddrysdale/python-phonenumbers")
14369 "Python library for dealing with international phone numbers")
14371 "This package provides a Python port of Google's libphonenumber library.")
14372 (license license:asl2.0)))
14374 (define-public python2-phonenumbers
14375 (package-with-python2 python-phonenumbers))
14377 (define-public python-send2trash
14379 (name "python-send2trash")
14382 (origin (method git-fetch)
14383 ;; Source tarball on PyPI doesn't include tests.
14384 (uri (git-reference
14385 (url "https://github.com/hsoft/send2trash.git")
14387 (file-name (git-file-name name version))
14390 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14391 (build-system python-build-system)
14394 (modify-phases %standard-phases
14395 (add-before 'check 'pre-check
14397 (mkdir-p "/tmp/foo")
14398 (setenv "HOME" "/tmp/foo")
14400 (home-page "https://github.com/hsoft/send2trash")
14401 (synopsis "Send files to the user's @file{~/Trash} directory")
14402 (description "This package provides a Python library to send files to the
14403 user's @file{~/Trash} directory.")
14404 (properties `((python2-variant . ,(delay python2-send2trash))))
14405 (license license:bsd-3)))
14407 (define-public python2-send2trash
14409 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14411 (substitute-keyword-arguments (package-arguments python-send2trash)
14413 `(modify-phases ,phases
14414 (add-before 'check 'setenv
14416 (setenv "PYTHONPATH"
14417 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14420 (define-public python-yapf
14422 (name "python-yapf")
14427 (uri (pypi-uri "yapf" version))
14430 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14431 (build-system python-build-system)
14432 (home-page "https://github.com/google/yapf")
14433 (synopsis "Formatter for Python code")
14434 (description "YAPF is a formatter for Python code. It's based off of
14435 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14436 takes the code and reformats it to the best formatting that conforms to the
14437 style guide, even if the original code didn't violate the style guide.")
14438 (license license:asl2.0)))
14440 (define-public python2-yapf
14441 (package-with-python2 python-yapf))
14443 (define-public python-gyp
14444 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14447 (name "python-gyp")
14448 ;; Google does not release versions,
14449 ;; based on second most recent commit date.
14450 (version (git-version "0.0.0" revision commit))
14453 ;; Google does not release tarballs,
14454 ;; git checkout is needed.
14456 (uri (git-reference
14457 (url "https://chromium.googlesource.com/external/gyp")
14459 (file-name (git-file-name name version))
14462 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14463 (build-system python-build-system)
14464 (home-page "https://gyp.gsrc.io/")
14465 (synopsis "GYP is a Meta-Build system")
14467 "GYP builds build systems for large, cross platform applications.
14468 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14469 files, and Makefiles.")
14470 (license license:bsd-3))))
14472 (define-public python2-gyp
14473 (package-with-python2 python-gyp))
14475 (define-public python-whatever
14477 (name "python-whatever")
14482 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14486 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14487 (file-name (string-append name "-" version ".tar.gz"))))
14488 (build-system python-build-system)
14491 (modify-phases %standard-phases
14494 (invoke "py.test"))))))
14496 `(("python-pytest" ,python-pytest)))
14497 (home-page "http://github.com/Suor/whatever")
14498 (synopsis "Make anonymous functions by partial application of operators")
14499 (description "@code{whatever} provides an easy way to make anonymous
14500 functions by partial application of operators.")
14501 (license license:bsd-3)))
14503 (define-public python2-whatever
14504 (package-with-python2 python-whatever))
14506 (define-public python-funcy
14508 (name "python-funcy")
14513 (uri (git-reference
14514 (url "https://github.com/Suor/funcy.git")
14517 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14518 (file-name (git-file-name name version))))
14519 (build-system python-build-system)
14522 (modify-phases %standard-phases
14525 (invoke "py.test"))))))
14527 `(("python-pytest" ,python-pytest)
14528 ("python-whatever" ,python-whatever)))
14529 (home-page "http://github.com/Suor/funcy")
14530 (synopsis "Functional tools")
14531 (description "@code{funcy} is a library that provides functional tools.
14534 @item merge - Merges collections of the same type
14535 @item walk - Type-preserving map
14536 @item select - Selects a part of a collection
14537 @item take - Takes the first n items of a collection
14538 @item first - Takes the first item of a collection
14539 @item remove - Predicated-removes items of a collection
14540 @item concat - Concatenates two collections
14541 @item flatten - Flattens a collection with subcollections
14542 @item distinct - Returns only distinct items
14543 @item split - Predicated-splits a collection
14544 @item split_at - Splits a collection at a given item
14545 @item group_by - Groups items by group
14546 @item pairwise - Pairs off adjacent items
14547 @item partial - Partially-applies a function
14548 @item curry - Curries a function
14549 @item compose - Composes functions
14550 @item complement - Complements a predicate
14551 @item all_fn - \"all\" with predicate
14553 (license license:bsd-3)))
14555 (define-public python2-funcy
14556 (package-with-python2 python-funcy))
14558 (define-public python-isoweek
14560 (name "python-isoweek")
14565 (uri (pypi-uri "isoweek" version))
14568 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14569 (build-system python-build-system)
14570 (home-page "https://github.com/gisle/isoweek")
14571 (synopsis "Objects representing a week")
14572 (description "The @code{isoweek} module provide the class Week that
14573 implements the week definition of ISO 8601. This standard also defines
14574 a notation for identifying weeks; yyyyWww (where the W is a literal).
14575 Week instances stringify to this form.")
14576 (license license:bsd-3)))
14578 (define-public python2-isoweek
14579 (package-with-python2 python-isoweek))
14581 (define-public python-tokenize-rt
14583 (name "python-tokenize-rt")
14588 (uri (pypi-uri "tokenize-rt" version))
14591 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14592 (build-system python-build-system)
14593 (home-page "https://github.com/asottile/tokenize-rt")
14594 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14596 "This Python library is a wrapper around @code{tokenize} from the Python
14597 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14598 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14599 and @code{tokens_to_src} to roundtrip.")
14600 (license license:expat)))
14602 (define-public python-future-fstrings
14604 (name "python-future-fstrings")
14609 (uri (pypi-uri "future_fstrings" version))
14612 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14613 (build-system python-build-system)
14615 `(("python-tokenize-rt" ,python-tokenize-rt)))
14616 (home-page "https://github.com/asottile/future-fstrings")
14617 (synopsis "Backport of fstrings to Python < 3.6")
14619 "This package provides a UTF-8 compatible encoding
14620 @code{future_fstrings}, which performs source manipulation. It decodes the
14621 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14622 @code{f} strings.")
14623 (license license:expat)))
14625 (define-public python-typed-ast
14627 (name "python-typed-ast")
14632 (uri (pypi-uri "typed-ast" version))
14635 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14636 (build-system python-build-system)
14638 `(#:modules ((guix build utils)
14639 (guix build python-build-system)
14644 (modify-phases %standard-phases
14647 (let ((cwd (getcwd)))
14648 (setenv "PYTHONPATH"
14649 (string-append cwd "/build/"
14650 (find (cut string-prefix? "lib" <>)
14651 (scandir (string-append cwd "/build")))
14653 (getenv "PYTHONPATH"))))
14656 (native-inputs `(("python-pytest" ,python-pytest)))
14657 (home-page "https://github.com/python/typed_ast")
14658 (synopsis "Fork of Python @code{ast} modules with type comment support")
14659 (description "This package provides a parser similar to the standard
14660 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14661 include PEP 484 type comments and are independent of the version of Python
14662 under which they are run. The @code{typed_ast} parsers produce the standard
14663 Python AST (plus type comments), and are both fast and correct, as they are
14664 based on the CPython 2.7 and 3.7 parsers.")
14665 ;; See the file "LICENSE" for the details.
14666 (license (list license:psfl
14668 license:expat)))) ;ast27/Parser/spark.py
14670 (define-public python-typing
14672 (name "python-typing")
14677 (uri (pypi-uri "typing" version))
14680 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14681 (build-system python-build-system)
14682 (home-page "https://docs.python.org/3/library/typing.html")
14683 (synopsis "Type hints for Python")
14684 (description "This is a backport of the standard library @code{typing}
14685 module to Python versions older than 3.5. Typing defines a standard notation
14686 for Python function and variable type annotations. The notation can be used
14687 for documenting code in a concise, standard format, and it has been designed
14688 to also be used by static and runtime type checkers, static analyzers, IDEs
14690 (license license:psfl)))
14692 (define-public python2-typing
14693 (package-with-python2 python-typing))
14695 (define-public python-typing-extensions
14697 (name "python-typing-extensions")
14702 (uri (pypi-uri "typing_extensions" version))
14705 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14706 (build-system python-build-system)
14708 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14709 (synopsis "Experimental type hints for Python")
14711 "The typing_extensions module contains additional @code{typing} hints not
14712 yet present in the of the @code{typing} standard library.
14713 Included are implementations of:
14716 @item ContextManager
14727 @item TYPE_CHECKING
14728 @item AsyncGenerator
14730 (license license:psfl)))
14732 (define-public bpython
14739 (uri (pypi-uri "bpython" version))
14742 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14743 (build-system python-build-system)
14746 (modify-phases %standard-phases
14747 (add-after 'unpack 'remove-failing-test
14749 ;; Remove failing test. FIXME: make it pass
14750 (delete-file "bpython/test/test_args.py")
14752 (add-after 'wrap 'add-aliases
14753 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14754 (lambda* (#:key outputs #:allow-other-keys)
14755 (let ((out (assoc-ref outputs "out")))
14758 (symlink old (string-append out "/bin/" new)))
14759 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14760 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14763 `(("python-pygments" ,python-pygments)
14764 ("python-requests" ,python-requests)
14765 ("python-babel" ,python-babel) ; optional, for internationalization
14766 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14767 ("python-greenlet" ,python-greenlet)
14768 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14769 ("python-six" ,python-six)))
14771 `(("python-sphinx" ,python-sphinx)
14772 ("python-mock" ,python-mock)))
14773 (home-page "https://bpython-interpreter.org/")
14774 (synopsis "Fancy interface to the Python interpreter")
14775 (description "Bpython is a fancy interface to the Python
14776 interpreter. bpython's main features are
14779 @item in-line syntax highlighting,
14780 @item readline-like autocomplete with suggestions displayed as you type,
14781 @item expected parameter list for any Python function,
14782 @item \"rewind\" function to pop the last line of code from memory and
14784 @item send the code you've entered off to a pastebin,
14785 @item save the code you've entered to a file, and
14786 @item auto-indentation.
14788 (license license:expat)))
14790 (define-public bpython2
14791 (let ((base (package-with-python2
14792 (strip-python2-variant bpython))))
14793 (package (inherit base)
14796 `(#:python ,python-2
14798 (modify-phases %standard-phases
14799 (add-after 'unpack 'remove-failing-test
14801 ;; Remove failing test. FIXME: make it pass
14802 (delete-file "bpython/test/test_args.py")
14803 ;; Disable failing test-cases (renaming inhibits they are
14805 (substitute* "bpython/test/test_curtsies_repl.py"
14806 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14807 (string-append a "xxx_off_" b))
14808 (("^(\\s*def )(test_complex\\W)" _ a b)
14809 (string-append a "xxx_off_" b)))
14811 (add-before 'build 'rename-scripts
14812 ;; rename the scripts to bypthon2, bpdb2, etc.
14814 (substitute* "setup.py"
14815 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14816 (string-append name "2" rest "\n"))
14817 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14818 (string-append name "2" (or sub "") rest "\n")))
14821 (define-public python-pyinotify
14823 (name "python-pyinotify")
14827 (uri (pypi-uri "pyinotify" version))
14830 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14831 (build-system python-build-system)
14832 (arguments `(#:tests? #f)) ;no tests
14833 (home-page "https://github.com/seb-m/pyinotify")
14834 (synopsis "Python library for monitoring inotify events")
14836 "@code{pyinotify} provides a Python interface for monitoring
14837 file system events on Linux.")
14838 (license license:expat)))
14840 (define-public python2-pyinotify
14841 (package-with-python2 python-pyinotify))
14843 ;; Ada parser uses this version.
14844 (define-public python2-quex-0.67.3
14846 (name "python2-quex")
14851 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14852 (version-major+minor version)
14853 "/quex-" version ".zip"))
14856 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14857 (build-system python-build-system)
14859 `(("unzip" ,unzip)))
14861 `(#:python ,python-2
14864 (modify-phases %standard-phases
14865 (delete 'configure)
14868 (lambda* (#:key outputs #:allow-other-keys)
14869 (let* ((out (assoc-ref outputs "out"))
14870 (share/quex (string-append out "/share/quex"))
14871 (bin (string-append out "/bin")))
14872 (copy-recursively "." share/quex)
14874 (symlink (string-append share/quex "/quex-exe.py")
14875 (string-append bin "/quex"))
14877 (native-search-paths
14878 (list (search-path-specification
14879 (variable "QUEX_PATH")
14880 (files '("share/quex")))))
14881 (home-page "http://quex.sourceforge.net/")
14882 (synopsis "Lexical analyzer generator in Python")
14883 (description "@code{quex} is a lexical analyzer generator in Python.")
14884 (license license:lgpl2.1+))) ; Non-military
14886 (define-public python2-quex
14887 (package (inherit python2-quex-0.67.3)
14888 (name "python2-quex")
14893 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14896 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14897 (file-name (string-append name "-" version ".tar.gz"))))))
14899 (define-public python-more-itertools
14901 (name "python-more-itertools")
14906 (uri (pypi-uri "more-itertools" version))
14909 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14910 (build-system python-build-system)
14911 (home-page "https://github.com/erikrose/more-itertools")
14912 (synopsis "More routines for operating on iterables, beyond itertools")
14913 (description "Python's built-in @code{itertools} module implements a
14914 number of iterator building blocks inspired by constructs from APL, Haskell,
14915 and SML. @code{more-itertools} includes additional building blocks for
14916 working with iterables.")
14917 (properties `((python2-variant . ,(delay python2-more-itertools))))
14918 (license license:expat)))
14920 ;; The 5.x series are the last versions supporting Python 2.7.
14921 (define-public python2-more-itertools
14923 (inherit python-more-itertools)
14924 (name "python2-more-itertools")
14928 (uri (pypi-uri "more-itertools" version))
14931 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14933 `(#:python ,python2-minimal))
14935 `(("python2-six" ,python2-six-bootstrap)))))
14937 (define-public python-latexcodec
14939 (name "python-latexcodec")
14944 (uri (pypi-uri "latexcodec" version))
14946 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14947 (build-system python-build-system)
14949 `(("python-six" ,python-six)))
14950 (home-page "https://readthedocs.org/projects/latexcodec/")
14951 (synopsis "Work with LaTeX code in Python")
14952 (description "Lexer and codec to work with LaTeX code in Python.")
14953 (license license:expat)))
14955 (define-public python-pybtex
14957 (name "python-pybtex")
14962 (uri (pypi-uri "pybtex" version))
14964 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14965 (build-system python-build-system)
14967 `(("python-nose" ,python-nose)))
14969 `(("python-latexcodec" ,python-latexcodec)
14970 ("python-pyyaml" ,python-pyyaml)
14971 ("python-six" ,python-six)))
14973 `(#:test-target "nosetests"))
14974 (home-page "https://pybtex.org/")
14975 (synopsis "BibTeX-compatible bibliography processor")
14976 (description "Pybtex is a BibTeX-compatible bibliography processor written
14977 in Python. You can simply type pybtex instead of bibtex.")
14978 (license license:expat)))
14980 (define-public python-onetimepass
14982 (name "python-onetimepass")
14987 (uri (pypi-uri "onetimepass" version))
14989 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14990 (build-system python-build-system)
14991 (propagated-inputs `(("python-six" ,python-six)))
14992 (home-page "https://github.com/tadeck/onetimepass/")
14993 (synopsis "One-time password library")
14994 (description "Python one-time password library for HMAC-based (HOTP) and
14995 time-based (TOTP) passwords.")
14996 (license license:expat)))
14998 (define-public python-parso
15000 (name "python-parso")
15005 (uri (pypi-uri "parso" version))
15008 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15010 `(("python-pytest" ,python-pytest)))
15011 (build-system python-build-system)
15013 `(#:phases (modify-phases %standard-phases
15015 (lambda _ (invoke "pytest" "-vv"))))))
15016 (home-page "https://github.com/davidhalter/parso")
15017 (synopsis "Python Parser")
15018 (description "Parso is a Python parser that supports error recovery and
15019 round-trip parsing for different Python versions (in multiple Python versions).
15020 Parso is also able to list multiple syntax errors in your Python file.")
15021 (license license:expat)))
15023 (define-public python2-parso
15024 (package-with-python2 python-parso))
15026 (define-public python-async-generator
15028 (name "python-async-generator")
15033 (uri (pypi-uri "async_generator" version))
15036 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15037 (build-system python-build-system)
15039 `(("python-pytest" ,python-pytest)))
15040 (home-page "https://github.com/python-trio/async_generator")
15041 (synopsis "Async generators and context managers for Python 3.5+")
15042 (description "@code{async_generator} back-ports Python 3.6's native async
15043 generators and Python 3.7's context managers into Python 3.5.")
15045 (license (list license:expat license:asl2.0))))
15047 (define-public python-async-timeout
15049 (name "python-async-timeout")
15054 (uri (pypi-uri "async-timeout" version))
15057 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15058 (build-system python-build-system)
15059 (home-page "https://github.com/aio-libs/async_timeout/")
15060 (synopsis "Timeout context manager for asyncio programs")
15061 (description "@code{async-timeout} provides a timeout timeout context
15062 manager compatible with @code{asyncio}.")
15063 (license license:asl2.0)))
15065 (define-public python-glob2
15067 (name "python-glob2")
15072 (uri (git-reference
15073 (url "https://github.com/miracle2k/python-glob2.git")
15075 (file-name (git-file-name name version))
15077 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15078 (build-system python-build-system)
15079 (home-page "https://github.com/miracle2k/python-glob2/")
15080 (synopsis "Extended Version of the python buildin glob module")
15081 (description "This is an extended version of the Python
15082 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15086 @item The ability to capture the text matched by glob patterns, and return
15087 those matches alongside the file names.
15088 @item A recursive @code{**} globbing syntax, akin for example to the
15089 @code{globstar} option of Bash.
15090 @item The ability to replace the file system functions used, in order to glob
15091 on virtual file systems.
15092 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15095 Glob2 currently based on the glob code from Python 3.3.1.")
15096 (license license:bsd-2)))
15098 (define-public python2-glob2
15099 (package-with-python2 python-glob2))
15101 (define-public python-gipc
15103 (name "python-gipc")
15108 (uri (pypi-uri "gipc" version ".zip"))
15111 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15112 (build-system python-build-system)
15114 `(("unzip" ,unzip)))
15116 `(("python-gevent" ,python-gevent)))
15117 (home-page "http://gehrcke.de/gipc")
15118 (synopsis "Child process management in the context of gevent")
15119 (description "Usage of Python's multiprocessing package in a
15120 gevent-powered application may raise problems. With @code{gipc},
15121 process-based child processes can safely be created anywhere within a
15122 gevent-powered application.")
15123 (license license:expat)))
15125 (define-public python2-gipc
15126 (package-with-python2 python-gipc))
15128 (define-public python-fusepy
15130 (name "python-fusepy")
15135 (uri (pypi-uri "fusepy" version))
15138 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15139 (build-system python-build-system)
15142 (modify-phases %standard-phases
15143 (add-before 'build 'set-library-file-name
15144 (lambda* (#:key inputs #:allow-other-keys)
15145 (let ((fuse (assoc-ref inputs "fuse")))
15146 (substitute* "fuse.py"
15147 (("find_library\\('fuse'\\)")
15148 (string-append "'" fuse "/lib/libfuse.so'")))
15152 (home-page "https://github.com/fusepy/fusepy")
15153 (synopsis "Simple ctypes bindings for FUSE")
15154 (description "Python module that provides a simple interface to FUSE and
15155 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15156 (license license:isc)))
15158 (define-public python2-fusepy
15159 (package-with-python2 python-fusepy))
15161 (define-public python2-gdrivefs
15163 (name "python2-gdrivefs")
15168 (uri (pypi-uri "gdrivefs" version))
15171 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15172 (build-system python-build-system)
15174 `(#:python ,python-2
15176 (modify-phases %standard-phases
15177 (add-before 'build 'patch-setup-py
15179 ;; Update requirements from dependency==version
15180 ;; to dependency>=version
15181 (substitute* "gdrivefs/resources/requirements.txt"
15185 `(("python2-gipc" ,python2-gipc)
15186 ("python2-gevent" ,python2-gevent)
15187 ("python2-greenlet" ,python2-greenlet)
15188 ("python2-httplib2" ,python2-httplib2)
15189 ("python2-uritemplate" ,python2-uritemplate)
15190 ("python2-oauth2client" ,python2-oauth2client)
15191 ("python2-six" ,python2-six)))
15193 `(("python2-dateutil" ,python2-dateutil)
15194 ("python2-fusepy" ,python2-fusepy)
15195 ("python2-google-api-client" ,python2-google-api-client)))
15196 (home-page "https://github.com/dsoprea/GDriveFS")
15197 (synopsis "Mount Google Drive as a local file system")
15198 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15199 under Python 2.7.")
15200 (license license:gpl2)))
15202 (define-public pybind11
15208 (uri (git-reference
15209 (url "https://github.com/pybind/pybind11.git")
15210 (commit (string-append "v" version))))
15213 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15214 (file-name (git-file-name name version))))
15215 (build-system cmake-build-system)
15217 `(("python" ,python)
15218 ("python-pytest" ,python-pytest)))
15220 `(#:test-target "check"))
15221 (home-page "https://github.com/pybind/pybind11/")
15222 (synopsis "Seamless operability between C++11 and Python")
15223 (description "pybind11 is a lightweight header-only library that exposes
15224 C++ types in Python and vice versa, mainly to create Python bindings of
15225 existing C++ code. Its goals and syntax are similar to the excellent
15226 Boost.Python library by David Abrahams: to minimize boilerplate code in
15227 traditional extension modules by inferring type information using compile-time
15229 (license license:expat)))
15231 (define-public python-fasteners
15233 (name "python-fasteners")
15238 (uri (pypi-uri "fasteners" version))
15241 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15242 (build-system python-build-system)
15244 `(("python-monotonic" ,python-monotonic)
15245 ("python-six" ,python-six)
15246 ("python-testtools" ,python-testtools)))
15247 (home-page "https://github.com/harlowja/fasteners")
15248 (synopsis "Python package that provides useful locks")
15250 "This package provides a Python program that provides following locks:
15253 @item Locking decorator
15254 @item Reader-writer locks
15255 @item Inter-process locks
15256 @item Generic helpers
15258 (properties `((python2-variant . ,(delay python2-fasteners))))
15259 (license license:asl2.0)))
15261 (define-public python2-fasteners
15262 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15266 `(("python2-futures" ,python2-futures)
15267 ,@(package-propagated-inputs base))))))
15269 (define-public python-requests-file
15271 (name "python-requests-file")
15276 (uri (pypi-uri "requests-file" version))
15279 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15280 (build-system python-build-system)
15282 `(("python-requests" ,python-requests)
15283 ("python-six" ,python-six)))
15285 "https://github.com/dashea/requests-file")
15286 (synopsis "File transport adapter for Requests")
15288 "Requests-File is a transport adapter for use with the Requests Python
15289 library to allow local file system access via @code{file://} URLs.")
15290 (license license:asl2.0)))
15292 (define-public python2-requests-file
15293 (package-with-python2 python-requests-file))
15295 (define-public python-tldextract
15297 (name "python-tldextract")
15302 (uri (pypi-uri "tldextract" version))
15305 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15306 (build-system python-build-system)
15308 `(("python-pytest" ,python-pytest)
15309 ("python-responses" ,python-responses)))
15311 `(("python-idna" ,python-idna)
15312 ("python-requests" ,python-requests)
15313 ("python-requests-file" ,python-requests-file)))
15315 "https://github.com/john-kurkowski/tldextract")
15317 "Separate the TLD from the registered domain and subdomains of a URL")
15319 "TLDExtract accurately separates the TLD from the registered domain and
15320 subdomains of a URL, using the Public Suffix List. By default, this includes
15321 the public ICANN TLDs and their exceptions. It can optionally support the
15322 Public Suffix List's private domains as well.")
15323 (license license:bsd-3)))
15325 (define-public python2-tldextract
15326 (package-with-python2 python-tldextract))
15328 (define-public python-pynamecheap
15330 (name "python-pynamecheap")
15335 (uri (pypi-uri "PyNamecheap" version))
15338 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15339 (build-system python-build-system)
15341 `(("python-requests" ,python-requests)))
15343 "https://github.com/Bemmu/PyNamecheap")
15345 "Namecheap API client in Python")
15347 "PyNamecheap is a Namecheap API client in Python.")
15348 (license license:expat)))
15350 (define-public python2-pynamecheap
15351 (package-with-python2 python-pynamecheap))
15353 (define-public python-dns-lexicon
15355 (name "python-dns-lexicon")
15360 (uri (pypi-uri "dns-lexicon" version))
15363 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15364 (build-system python-build-system)
15366 `(#:tests? #f)) ;requires internet access
15368 `(("python-future" ,python-future)
15369 ("python-pynamecheap" ,python-pynamecheap)
15370 ("python-requests" ,python-requests)
15371 ("python-tldextract" ,python-tldextract)
15372 ("python-urllib3" ,python-urllib3)))
15373 (home-page "https://github.com/AnalogJ/lexicon")
15375 "Manipulate DNS records on various DNS providers")
15377 "Lexicon provides a way to manipulate DNS records on multiple DNS
15378 providers in a standardized way. It has a CLI but it can also be used as a
15379 Python library. It was designed to be used in automation, specifically with
15381 (license license:expat)))
15383 (define-public python2-dns-lexicon
15384 (package-with-python2 python-dns-lexicon))
15386 (define-public python-commandlines
15388 (name "python-commandlines")
15393 (uri (pypi-uri "commandlines" version))
15396 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15397 (build-system python-build-system)
15398 (home-page "https://github.com/chrissimpkins/commandlines")
15399 (synopsis "Command line argument to object parsing library")
15401 "@code{Commandlines} is a Python library for command line application
15402 development that supports command line argument parsing, command string
15403 validation testing and application logic.")
15404 (license license:expat)))
15406 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15407 ;; python-numba. They have a very unflexible relationship.
15408 (define-public python-numba
15410 (name "python-numba")
15415 (uri (pypi-uri "numba" version))
15418 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15419 (build-system python-build-system)
15421 `(#:modules ((guix build utils)
15422 (guix build python-build-system)
15427 (modify-phases %standard-phases
15428 (add-after 'unpack 'disable-proprietary-features
15430 (setenv "NUMBA_DISABLE_HSA" "1")
15431 (setenv "NUMBA_DISABLE_CUDA" "1")
15433 (add-after 'unpack 'remove-failing-tests
15435 ;; FIXME: these tests fail for unknown reasons:
15436 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15437 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15438 (substitute* "numba/tests/test_dispatcher.py"
15439 (("def test(_non_writable_pycache)" _ m)
15440 (string-append "def guix_skip" m))
15441 (("def test(_non_creatable_pycache)" _ m)
15442 (string-append "def guix_skip" m))
15443 (("def test(_frozen)" _ m)
15444 (string-append "def guix_skip" m)))
15446 ;; These tests fail because we don't run the tests from the build
15447 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15448 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15449 (substitute* "numba/tests/test_pycc.py"
15450 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15451 (string-append "def guix_skip" m)))
15455 (let ((cwd (getcwd)))
15456 (setenv "PYTHONPATH"
15457 (string-append cwd "/build/"
15458 (find (cut string-prefix? "lib" <>)
15459 (scandir (string-append cwd "/build")))
15461 (getenv "PYTHONPATH")))
15462 ;; Something is wrong with the PYTHONPATH when running the
15463 ;; tests from the build directory, as it complains about not being
15464 ;; able to import certain modules.
15465 (with-directory-excursion "/tmp"
15466 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15469 `(("python-llvmlite" ,python-llvmlite)
15470 ("python-numpy" ,python-numpy)
15471 ("python-singledispatch" ,python-singledispatch)))
15472 ;; Needed for tests.
15474 `(("python-jinja2" ,python-jinja2)
15475 ("python-pygments" ,python-pygments)))
15476 (home-page "https://numba.pydata.org")
15477 (synopsis "Compile Python code using LLVM")
15478 (description "Numba gives you the power to speed up your applications with
15479 high performance functions written directly in Python. With a few
15480 annotations, array-oriented and math-heavy Python code can be just-in-time
15481 compiled to native machine instructions, similar in performance to C, C++ and
15482 Fortran, without having to switch languages or Python interpreters.
15484 Numba works by generating optimized machine code using the LLVM compiler
15485 infrastructure at import time, runtime, or statically (using the included pycc
15487 (license license:bsd-3)))
15489 (define-public python-anndata
15491 (name "python-anndata")
15496 (uri (pypi-uri "anndata" version))
15499 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15500 (build-system python-build-system)
15502 `(("python-h5py" ,python-h5py)
15503 ("python-natsort" ,python-natsort)
15504 ("python-pandas" ,python-pandas)
15505 ("python-scipy" ,python-scipy)))
15506 (home-page "https://github.com/theislab/anndata")
15507 (synopsis "Annotated data for data analysis pipelines")
15508 (description "Anndata is a package for simple (functional) high-level APIs
15509 for data analysis pipelines. In this context, it provides an efficient,
15510 scalable way of keeping track of data together with learned annotations and
15511 reduces the code overhead typically encountered when using a mostly
15512 object-oriented library such as @code{scikit-learn}.")
15513 (license license:bsd-3)))
15515 (define-public python-dill
15517 (name "python-dill")
15522 (uri (pypi-uri "dill" version))
15524 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15525 (build-system python-build-system)
15526 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15527 (arguments '(#:tests? #f))
15528 (home-page "https://pypi.org/project/dill")
15529 (synopsis "Serialize all of Python")
15530 (description "Dill extends Python's @code{pickle} module for serializing
15531 and de-serializing Python objects to the majority of the built-in Python
15532 types. Dill provides the user the same interface as the @code{pickle} module,
15533 and also includes some additional features. In addition to pickling Python
15534 objects, @code{dill} provides the ability to save the state of an interpreter
15535 session in a single command. Hence, it would be feasible to save a
15536 interpreter session, close the interpreter, ship the pickled file to another
15537 computer, open a new interpreter, unpickle the session and thus continue from
15538 the saved state of the original interpreter session.")
15539 (license license:bsd-3)))
15541 (define-public python-multiprocess
15543 (name "python-multiprocess")
15544 (version "0.70.6.1")
15548 (uri (pypi-uri "multiprocess" version))
15551 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15552 (build-system python-build-system)
15554 `(("python-dill" ,python-dill)))
15555 (home-page "https://pypi.org/project/multiprocess")
15556 (synopsis "Multiprocessing and multithreading in Python")
15558 "This package is a fork of the multiprocessing Python package, a package
15559 which supports the spawning of processes using the API of the standard
15560 library's @code{threading} module.")
15561 (license license:bsd-3)))
15563 (define-public python-toolz
15565 (name "python-toolz")
15570 (uri (pypi-uri "toolz" version))
15573 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15574 (build-system python-build-system)
15575 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15576 ;; unregistered loader type"
15577 (arguments '(#:tests? #f))
15578 (home-page "https://github.com/pytoolz/toolz/")
15579 (synopsis "List processing tools and functional utilities")
15581 "This package provides a set of utility functions for iterators,
15582 functions, and dictionaries.")
15583 (license license:bsd-3)))
15585 (define-public python2-toolz
15586 (package-with-python2 python-toolz))
15588 (define-public python-cytoolz
15590 (name "python-cytoolz")
15591 (version "0.9.0.1")
15595 (uri (pypi-uri "cytoolz" version))
15598 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15599 (build-system python-build-system)
15600 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15602 (arguments '(#:tests? #f))
15604 `(("python-toolz" ,python-toolz)))
15606 `(("python-cython" ,python-cython)))
15607 (home-page "https://github.com/pytoolz/cytoolz")
15608 (synopsis "High performance functional utilities")
15610 "The cytoolz package implements the same API as provided by toolz. The
15611 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15612 that is accessible to other projects developed in Cython.")
15613 (license license:bsd-3)))
15615 (define-public python-sortedcontainers
15617 (name "python-sortedcontainers")
15622 (uri (pypi-uri "sortedcontainers" version))
15625 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15626 (build-system python-build-system)
15628 `(("python-tox" ,python-tox)))
15629 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15630 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15632 "This package provides a sorted collections library, written in
15634 (license license:asl2.0)))
15636 (define-public python-cloudpickle
15638 (name "python-cloudpickle")
15643 (uri (pypi-uri "cloudpickle" version))
15646 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15647 (build-system python-build-system)
15648 ;; FIXME: there are 5 errors in 122 tests:
15649 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15650 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15651 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15652 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15653 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15654 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15655 (arguments '(#:tests? #f))
15657 `(("python-pytest" ,python-pytest)
15658 ("python-mock" ,python-mock)
15659 ("python-tornado" ,python-tornado)))
15660 (home-page "https://github.com/cloudpipe/cloudpickle")
15661 (synopsis "Extended pickling support for Python objects")
15663 "Cloudpickle makes it possible to serialize Python constructs not
15664 supported by the default pickle module from the Python standard library. It
15665 is especially useful for cluster computing where Python expressions are
15666 shipped over the network to execute on remote hosts, possibly close to the
15668 (license license:bsd-3)))
15670 (define-public python2-cloudpickle
15671 (package-with-python2 python-cloudpickle))
15673 (define-public python-locket
15675 (name "python-locket")
15680 (uri (pypi-uri "locket" version))
15683 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15684 (build-system python-build-system)
15685 (home-page "https://github.com/mwilliamson/locket.py")
15686 (synopsis "File-based locks for Python")
15688 "Locket implements a lock that can be used by multiple processes provided
15689 they use the same path.")
15690 (license license:bsd-2)))
15692 (define-public python2-locket
15693 (package-with-python2 python-locket))
15695 (define-public python-blosc
15697 (name "python-blosc")
15702 (uri (pypi-uri "blosc" version))
15705 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15706 (build-system python-build-system)
15707 ;; FIXME: all tests pass, but then this error is printed:
15708 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15709 (arguments '(#:tests? #f))
15711 `(("python-numpy" ,python-numpy)))
15712 (home-page "https://github.com/blosc/python-blosc")
15713 (synopsis "Python wrapper for the Blosc data compressor library")
15714 (description "Blosc is a high performance compressor optimized for binary
15715 data. It has been designed to transmit data to the processor cache faster
15716 than the traditional, non-compressed, direct memory fetch approach via a
15717 @code{memcpy()} system call.
15719 Blosc works well for compressing numerical arrays that contains data with
15720 relatively low entropy, like sparse data, time series, grids with
15721 regular-spaced values, etc.
15723 This Python package wraps the Blosc library.")
15724 (license license:bsd-3)))
15726 (define-public python2-blosc
15727 (package-with-python2 python-blosc))
15729 (define-public python-partd
15731 (name "python-partd")
15736 (uri (pypi-uri "partd" version))
15739 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15740 (build-system python-build-system)
15742 `(("python-blosc" ,python-blosc)
15743 ("python-locket" ,python-locket)
15744 ("python-numpy" ,python-numpy)
15745 ("python-pandas" ,python-pandas)
15746 ("python-pyzmq" ,python-pyzmq)
15747 ("python-toolz" ,python-toolz)))
15748 (home-page "https://github.com/dask/partd/")
15749 (synopsis "Appendable key-value storage")
15750 (description "Partd stores key-value pairs. Values are raw bytes. We
15751 append on old values. Partd excels at shuffling operations.")
15752 (license license:bsd-3)))
15754 (define-public python2-partd
15755 (package-with-python2 python-partd))
15757 (define-public python-dask
15759 (name "python-dask")
15764 (uri (pypi-uri "dask" version))
15766 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15767 (build-system python-build-system)
15768 ;; A single test out of 5000+ fails. This test is marked as xfail when
15769 ;; pytest-xdist is used.
15772 (modify-phases %standard-phases
15773 (add-after 'unpack 'disable-broken-test
15775 (substitute* "dask/tests/test_threaded.py"
15776 (("def test_interrupt\\(\\)" m)
15777 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15779 (when (which "python2")
15780 ;; This test fails with recent Pandas:
15781 ;; <https://github.com/dask/dask/issues/3794>.
15782 (substitute* "dask/dataframe/tests/test_dataframe.py"
15783 (("def test_info\\(\\)" m)
15784 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15788 (lambda _ (invoke "pytest" "-vv"))))))
15790 `(("python-cloudpickle" ,python-cloudpickle)
15791 ("python-numpy" ,python-numpy)
15792 ("python-pandas" ,python-pandas)
15793 ("python-partd" ,python-partd)
15794 ("python-toolz" ,python-toolz)
15795 ("python-pyyaml" ,python-pyyaml)))
15797 `(("python-pytest" ,python-pytest)
15798 ("python-pytest-runner" ,python-pytest-runner)))
15799 (home-page "https://github.com/dask/dask/")
15800 (synopsis "Parallel computing with task scheduling")
15802 "Dask is a flexible parallel computing library for analytics. It
15803 consists of two components: dynamic task scheduling optimized for computation,
15804 and large data collections like parallel arrays, dataframes, and lists that
15805 extend common interfaces like NumPy, Pandas, or Python iterators to
15806 larger-than-memory or distributed environments. These parallel collections
15807 run on top of the dynamic task schedulers. ")
15808 (license license:bsd-3)))
15810 (define-public python2-dask
15811 (package-with-python2 python-dask))
15813 (define-public python-ilinkedlist
15815 (name "python-ilinkedlist")
15820 (uri (pypi-uri "ilinkedlist" version))
15823 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15824 (build-system python-build-system)
15825 (native-inputs `(("python-pytest" ,python-pytest)))
15826 (inputs `(("python" ,python)))
15827 (home-page "https://github.com/luther9/ilinkedlist-py")
15828 (synopsis "Immutable linked list library")
15830 "This is a implementation of immutable linked lists for Python. It
15831 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15832 Since a linked list is treated as immutable, it is hashable, and its length
15833 can be retrieved in constant time. Some of the terminology is inspired by
15834 LISP. It is possible to create an improper list by creating a @code{Pair}
15835 with a non-list @code{cdr}.")
15836 (license license:gpl3+)))
15838 (define-public python-readlike
15840 (name "python-readlike")
15845 (uri (pypi-uri "readlike" version))
15847 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15848 (build-system python-build-system)
15849 (home-page "https://github.com/jangler/readlike")
15850 (synopsis "GNU Readline-like line editing module")
15852 "This Python module provides line editing functions similar to the default
15853 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15854 @code{readline} package, this one allows access to those capabilties in settings
15855 outside of a standard command-line interface. It is especially well-suited to
15856 interfacing with Urwid, due to a shared syntax for describing key inputs.
15858 Currently, all stateless Readline commands are implemented. Yanking and history
15859 are not supported.")
15860 (license license:expat)))
15862 (define-public python2-readlike
15863 (package-with-python2 python-readlike))
15865 (define-public python-reparser
15867 (name "python-reparser")
15872 (uri (pypi-uri "ReParser" version))
15874 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15875 (build-system python-build-system)
15876 (home-page "https://github.com/xmikos/reparser")
15877 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15879 "This Python library provides a simple lexer/parser for inline markup based
15880 on regular expressions.")
15881 (license license:expat)))
15883 (define-public python2-reparser
15884 (let ((reparser (package-with-python2
15885 (strip-python2-variant python-reparser))))
15886 (package (inherit reparser)
15888 `(("python2-enum34" ,python2-enum34)
15889 ,@(package-propagated-inputs reparser))))))
15891 (define-public python-precis-i18n
15893 (name "python-precis-i18n")
15898 (uri (pypi-uri "precis_i18n" version))
15901 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15902 (build-system python-build-system)
15903 (home-page "https://github.com/byllyfish/precis_i18n")
15904 (synopsis "Implementation of the PRECIS framework")
15906 "This module implements the PRECIS Framework as described in RFC 8264,
15907 RFC 8265 and RFC 8266.")
15908 (license license:expat)))
15910 (define-public python-absl-py
15912 (name "python-absl-py")
15917 (uri (pypi-uri "absl-py" version))
15920 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15921 (build-system python-build-system)
15923 `(("python-six" ,python-six)))
15924 (home-page "https://github.com/abseil/abseil-py")
15925 (synopsis "Abseil Python common libraries")
15927 "This package provides the Abseil Python Common Libraries, a collection
15928 of Python libraries for building Python applications.")
15929 (license license:asl2.0)))
15931 (define-public python-astor
15933 (name "python-astor")
15938 (uri (pypi-uri "astor" version))
15941 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15942 (build-system python-build-system)
15943 ;; FIXME: There are two errors and two test failures.
15944 (arguments `(#:tests? #f))
15945 (home-page "https://github.com/berkerpeksag/astor")
15946 (synopsis "Read and write Python ASTs")
15947 (description "Astor is designed to allow easy manipulation of Python
15948 source via the Abstract Syntax Tree.")
15949 (license license:bsd-3)))
15951 (define-public python2-astor
15952 (package-with-python2 python-astor))
15954 (define-public python-grpcio
15956 (name "python-grpcio")
15961 (uri (pypi-uri "grpcio" version))
15964 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15965 (build-system python-build-system)
15967 `(("python-six" ,python-six)))
15968 (home-page "https://grpc.io")
15969 (synopsis "HTTP/2-based RPC framework")
15970 (description "This package provides a Python library for communicating
15971 with the HTTP/2-based RPC framework gRPC.")
15972 (license license:asl2.0)))
15974 (define-public python-astunparse
15976 (name "python-astunparse")
15981 (uri (pypi-uri "astunparse" version))
15983 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15984 (build-system python-build-system)
15985 (arguments '(#:tests? #f)) ; there are none
15987 `(("python-six" ,python-six)
15988 ("python-wheel" ,python-wheel)))
15989 (home-page "https://github.com/simonpercivall/astunparse")
15990 (synopsis "AST unparser for Python")
15991 (description "This package provides an AST unparser for Python. It is a
15992 factored out version of @code{unparse} found in the Python source
15994 (license license:bsd-3)))
15996 (define-public python-gast
15998 (name "python-gast")
16003 (uri (pypi-uri "gast" version))
16005 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16006 (build-system python-build-system)
16008 `(("python-astunparse" ,python-astunparse)))
16009 (home-page "https://pypi.org/project/gast/")
16010 (synopsis "Generic Python AST that abstracts the underlying Python version")
16012 "GAST provides a compatibility layer between the AST of various Python
16013 versions, as produced by @code{ast.parse} from the standard @code{ast}
16015 (license license:bsd-3)))
16017 (define-public python-wikidata
16019 (name "python-wikidata")
16024 (uri (pypi-uri "Wikidata" version))
16027 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16028 (build-system python-build-system)
16030 `(("python-babel" ,python-babel)))
16031 (home-page "https://github.com/dahlia/wikidata")
16032 (synopsis "Wikidata client library")
16034 "This package provides a Python interface to
16035 @url{https://www.wikidata.org/, Wikidata}.")
16036 (properties '((upstream-name . "Wikidata")))
16037 (license license:gpl3+)))
16039 (define-public python-doctest-ignore-unicode
16041 (name "python-doctest-ignore-unicode")
16046 (uri (pypi-uri "doctest-ignore-unicode" version))
16049 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16050 (build-system python-build-system)
16052 `(("python-nose" ,python-nose)))
16053 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16054 (synopsis "Ignore Unicode literal prefixes in doctests")
16056 "This package adds support for a flag to ignore Unicode literal prefixes
16058 (license license:asl2.0)))
16060 (define-public python-attr
16062 (name "python-attr")
16067 (uri (pypi-uri "attr" version))
16070 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16071 (build-system python-build-system)
16072 (home-page "https://github.com/denis-ryzhkov/attr")
16073 (synopsis "Decorator for attributes of target function or class")
16074 (description "Simple decorator to set attributes of target function or
16075 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16076 (license license:expat)))
16078 (define-public python-construct
16080 (name "python-construct")
16085 (uri (pypi-uri "construct" version))
16088 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16089 (build-system python-build-system)
16091 `(#:tests? #f)) ; No tests exist.
16093 `(("python-extras" ,python-extras)
16094 ("python-arrow" ,python-arrow)
16095 ("python-numpy" ,python-numpy)
16096 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16097 (home-page "http://construct.readthedocs.io")
16098 (synopsis "Declarative and symmetrical parser and builder for binary data")
16100 "This package provides both simple, atomic constructs (such as
16101 integers of various sizes), as well as composite ones which allow you
16102 form hierarchical and sequential structures of increasing complexity.
16103 It features bit and byte granularity, easy debugging and testing, an
16104 easy-to-extend subclass system, and lots of primitive constructs to
16105 make your work easier.")
16106 (license license:expat)))
16108 (define-public python-humanize
16110 (name "python-humanize")
16115 (uri (pypi-uri "humanize" version))
16118 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16120 '(#:tests? #f)) ; tests not in pypi archive
16121 (build-system python-build-system)
16122 (home-page "https://github.com/jmoiron/humanize")
16123 (synopsis "Print numerical information in a human-readable form")
16124 (description "This package provides a Python module that displays numbers
16125 and dates in \"human readable\" forms. For example, it would display
16126 \"12345591313\" as \"12.3 billion\".")
16127 (license license:expat)))
16129 (define-public python-txaio
16131 (name "python-txaio")
16136 (uri (pypi-uri "txaio" version))
16139 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16140 (build-system python-build-system)
16142 `(("python-twisted" ,python-twisted)
16143 ("python-six" ,python-six)))
16144 (home-page "https://github.com/crossbario/txaio")
16145 (synopsis "Compatibility layer between Python asyncio and Twisted")
16146 (description "Txaio provides a compatibility layer between the Python
16147 @code{asyncio} module and @code{Twisted}.")
16148 (license license:expat)))
16150 (define-public python-toolshed
16152 (name "python-toolshed")
16157 (uri (pypi-uri "toolshed" version))
16160 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16161 (build-system python-build-system)
16163 `(("python-nose" ,python-nose)))
16164 (home-page "https://github.com/brentp/toolshed/")
16165 (synopsis "Collection of modules and functions for working with data")
16166 (description "This is a collection of well-tested, simple modules and
16167 functions that aim to reduce boilerplate when working with data.")
16168 (license license:bsd-2)))
16170 (define-public python-annoy
16172 (name "python-annoy")
16177 (uri (pypi-uri "annoy" version))
16180 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16181 (build-system python-build-system)
16183 `(("python-nose" ,python-nose)))
16184 (home-page "https://github.com/spotify/annoy/")
16185 (synopsis "Approximate nearest neighbors library")
16187 "Annoy is a C++ library with Python bindings to search for points in
16188 space that are close to a given query point. It also creates large read-only
16189 file-based data structures that are @code{mmap}ped into memory so that many
16190 processes may share the same data.")
16191 (license license:asl2.0)))
16193 (define-public python-pylzma
16195 (name "python-pylzma")
16200 (uri (pypi-uri "pylzma" version))
16203 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16204 (build-system python-build-system)
16205 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16206 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16207 (description "This package provides Python bindings for the LZMA library
16209 (license license:lgpl2.1+)))
16211 (define-public python2-pylzma
16212 (package-with-python2 python-pylzma))
16214 (define-public python2-zeroconf
16216 (name "python2-zeroconf")
16218 ;; This is the last version that supports Python 2.x.
16223 (uri (pypi-uri "zeroconf" version))
16226 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16227 (build-system python-build-system)
16229 `(#:python ,python-2
16231 (modify-phases %standard-phases
16232 (add-after 'unpack 'patch-requires
16233 (lambda* (#:key inputs #:allow-other-keys)
16234 (substitute* "setup.py"
16239 `(("python2-six" ,python2-six)
16240 ("python2-enum32" ,python2-enum34)
16241 ("python2-netifaces" ,python2-netifaces)
16242 ("python2-typing" ,python2-typing)))
16243 (home-page "https://github.com/jstasiak/python-zeroconf")
16244 (synopsis "Pure Python mDNS service discovery")
16246 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16248 (license license:lgpl2.1+)))
16250 (define-public python-bsddb3
16252 (name "python-bsddb3")
16257 (uri (pypi-uri "bsddb3" version))
16260 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16261 (build-system python-build-system)
16266 (modify-phases %standard-phases
16267 (add-after 'unpack 'configure-locations
16268 (lambda* (#:key inputs #:allow-other-keys)
16269 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16270 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16274 (invoke "python3" "test3.py" "-v"))))))
16275 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16276 (synopsis "Python bindings for Oracle Berkeley DB")
16278 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16279 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16280 Transaction objects, and each of these is exposed as a Python type in the
16281 bsddb3.db module. The database objects can use various access methods: btree,
16282 hash, recno, and queue. Complete support of Berkeley DB distributed
16283 transactions. Complete support for Berkeley DB Replication Manager.
16284 Complete support for Berkeley DB Base Replication. Support for RPC.")
16285 (license license:bsd-3)))
16287 (define-public python-dbfread
16289 (name "python-dbfread")
16293 (uri (pypi-uri "dbfread" version))
16296 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16297 (build-system python-build-system)
16299 `(("python-pytest" ,python-pytest)))
16300 (home-page "https://dbfread.readthedocs.io")
16301 (synopsis "Read DBF Files with Python")
16303 "This library reads DBF files and returns the data as native Python data
16304 types for further processing. It is primarily intended for batch jobs and
16306 (license license:expat)))
16308 (define-public python-cached-property
16310 (name "python-cached-property")
16315 (uri (pypi-uri "cached-property" version))
16318 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16319 (build-system python-build-system)
16322 (modify-phases %standard-phases
16323 ;; https://github.com/pydanny/cached-property/issues/131
16324 ;; recent versions of freezegun break one test
16325 (add-after 'unpack 'disable-broken-test
16327 (substitute* "tests/test_cached_property.py"
16328 (("def test_threads_ttl_expiry\\(self\\)" m)
16329 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16333 `(("python-freezegun" ,python-freezegun)))
16335 "https://github.com/pydanny/cached-property")
16337 "Decorator for caching properties in classes")
16339 "This package provides a decorator which makes caching
16340 time-or-computationally-expensive properties quick and easy and works in Python
16342 (license license:bsd-3)))
16344 (define-public python-folium
16346 (name "python-folium")
16351 (uri (pypi-uri "folium" version))
16354 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16355 (build-system python-build-system)
16357 `(("python-branca" ,python-branca)
16358 ("python-jinja2" ,python-jinja2)
16359 ("python-numpy" ,python-numpy)
16360 ("python-requests" ,python-requests)))
16362 `(("python-pytest" ,python-pytest)))
16363 (home-page "https://github.com/python-visualization/folium")
16364 (synopsis "Make beautiful maps with Leaflet.js & Python")
16365 (description "@code{folium} makes it easy to visualize data that’s been
16366 manipulated in Python on an interactive leaflet map. It enables both the
16367 binding of data to a map for @code{choropleth} visualizations as well as
16368 passing rich vector/raster/HTML visualizations as markers on the map.
16370 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16371 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16372 supports Image, Video, GeoJSON and TopoJSON overlays.")
16373 (license license:expat)))
16375 (define-public jube
16377 ;; This is a command-line tool, so no "python-" prefix.
16382 (uri (string-append
16383 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16387 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16388 (file-name (string-append "jube-" version ".tar.gz"))))
16389 (build-system python-build-system)
16390 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16391 (synopsis "Benchmarking environment")
16393 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16394 benchmarked application, benchmark data is stored in a format that allows JUBE
16395 to deduct the desired information. This data can be parsed by automatic pre-
16396 and post-processing scripts that draw information and store it more densely
16397 for manual interpretation.")
16398 (license license:gpl3+)))
16400 (define-public python-pyroutelib3
16402 (name "python-pyroutelib3")
16403 (version "1.3.post1")
16407 (uri (pypi-uri "pyroutelib3" version))
16410 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16411 (build-system python-build-system)
16413 `(("python-dateutil" ,python-dateutil)))
16414 (home-page "https://github.com/MKuranowski/pyroutelib3")
16415 (synopsis "Library for simple routing on OSM data")
16416 (description "Library for simple routing on OSM data")
16417 (license license:gpl3+)))
16419 (define-public python-elementpath
16421 (name "python-elementpath")
16426 (uri (pypi-uri "elementpath" version))
16429 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16430 (build-system python-build-system)
16432 "https://github.com/sissaschool/elementpath")
16434 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16436 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16437 for Python's ElementTree XML data structures, both for the standard
16438 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16440 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16441 because lxml.etree already has it's own implementation of XPath 1.0.")
16442 (license license:expat)))
16444 (define-public python-bibtexparser
16446 (name "python-bibtexparser")
16451 (uri (pypi-uri "bibtexparser" version))
16454 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16455 (build-system python-build-system)
16457 `(("python-pyparsing" ,python-pyparsing)))
16459 `(("python-future" ,python-future)))
16460 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16461 (synopsis "Python library to parse BibTeX files")
16462 (description "BibtexParser is a Python library to parse BibTeX files.")
16463 (license (list license:bsd-3 license:lgpl3))))
16465 (define-public python-distro
16467 (name "python-distro")
16472 (uri (pypi-uri "distro" version))
16475 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16476 (build-system python-build-system)
16478 `(("python-pytest" ,python-pytest)))
16479 (home-page "https://github.com/nir0s/distro")
16481 "OS platform information API")
16483 "@code{distro} provides information about the OS distribution it runs on,
16484 such as a reliable machine-readable ID, or version information.
16486 It is the recommended replacement for Python's original
16487 `platform.linux_distribution` function (which will be removed in Python 3.8).
16488 @code{distro} also provides a command-line interface to output the platform
16489 information in various formats.")
16490 (license license:asl2.0)))