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 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <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 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 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 Brendan Tildesley <brendan.tildesley@openmailbox.org>
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 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 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>
62 ;;; This file is part of GNU Guix.
64 ;;; GNU Guix is free software; you can redistribute it and/or modify it
65 ;;; under the terms of the GNU General Public License as published by
66 ;;; the Free Software Foundation; either version 3 of the License, or (at
67 ;;; your option) any later version.
69 ;;; GNU Guix is distributed in the hope that it will be useful, but
70 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72 ;;; GNU General Public License for more details.
74 ;;; You should have received a copy of the GNU General Public License
75 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
77 (define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
109 #:use-module (gnu packages monitoring)
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
118 #:use-module (gnu packages python-check)
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
141 #:use-module (gnu packages serialization)
142 #:use-module (guix packages)
143 #:use-module (guix download)
144 #:use-module (guix git-download)
145 #:use-module (guix utils)
146 #:use-module (guix build-system gnu)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system python)
149 #:use-module (guix build-system trivial)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26))
153 (define-public python-psutil
155 (name "python-psutil")
160 (uri (pypi-uri "psutil" version))
163 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
164 (build-system python-build-system)
166 ;; FIXME: some tests does not return and times out.
168 (home-page "https://www.github.com/giampaolo/psutil")
169 (synopsis "Library for retrieving information on running processes")
171 "psutil (Python system and process utilities) is a library for retrieving
172 information on running processes and system utilization (CPU, memory, disks,
173 network) in Python. It is useful mainly for system monitoring, profiling and
174 limiting process resources and management of running processes. It implements
175 many functionalities offered by command line tools such as: ps, top, lsof,
176 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
177 pidof, tty, taskset, pmap.")
178 (properties `((python2-variant . ,(delay python2-psutil))))
179 (license license:bsd-3)))
181 (define-public python2-psutil
182 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
186 `(("python2-enum34" ,python2-enum34) ;optional
187 ,@(package-propagated-inputs base))))))
189 (define-public python-shapely
191 (name "python-shapely")
196 (uri (pypi-uri "Shapely" version))
199 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
200 (build-system python-build-system)
202 `(("python-cython" ,python-cython)
203 ("python-matplotlib" ,python-matplotlib)
204 ("python-pytest" ,python-pytest)
205 ("python-pytest-cov" ,python-pytest-cov)))
209 `(("python-numpy" ,python-numpy)))
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch-geos-path
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let ((geos (assoc-ref inputs "geos"))
216 (glibc (assoc-ref inputs ,(if (%current-target-system)
217 "cross-libc" "libc"))))
218 (substitute* "shapely/geos.py"
219 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
220 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
221 geos "/lib/libgeos_c.so'])"))
222 (("free = load_dll\\('c'\\)\\.free")
223 (string-append "free = load_dll('c', fallbacks=['"
224 glibc "/lib/libc.so.6']).free"))))
226 (home-page "https://github.com/Toblerity/Shapely")
227 (synopsis "Library for the manipulation and analysis of geometric objects")
228 (description "Shapely is a Python package for manipulation and analysis of
229 planar geometric objects. It is based on the @code{GEOS} library.")
230 (license license:bsd-3)))
232 (define-public python-logwrap
234 (name "python-logwrap")
239 (uri (pypi-uri "logwrap" version ".zip"))
242 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
243 (build-system python-build-system)
245 `(("python-six" ,python-six)
246 ("python-typing" ,python-typing)))
249 ("python-cython" ,python-cython)
250 ("python-pytest" ,python-pytest)
251 ("python-pytest-cov" ,python-pytest-cov)
252 ("python-pytest-runner" ,python-pytest-runner)))
253 (home-page "https://github.com/penguinolog/logwrap")
254 (synopsis "Decorator for logging function arguments")
255 (description "This package provides a decorator to log function arguments
256 and function call return values in a human-readable way.")
257 (license license:asl2.0)))
259 (define-public python2-shapely
260 (package-with-python2 python-shapely))
262 (define-public python-clyent
264 (name "python-clyent")
269 (uri (pypi-uri "clyent" version))
272 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
273 (build-system python-build-system)
275 `(("python-mock" ,python-mock)))
276 (home-page "https://github.com/binstar/clyent")
277 (synopsis "Command line client library")
278 (description "Clyent is a Python command line utiliy library. It is used
279 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
280 (license license:bsd-3)))
282 (define-public python2-clyent
283 (package-with-python2 python-clyent))
285 (define-public python-babel
287 (name "python-babel")
292 (uri (pypi-uri "Babel" version))
295 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
296 (build-system python-build-system)
298 `(("python-freezegun" ,python-freezegun)
299 ("python-pytest" ,python-pytest)))
301 `(("python-pytz" ,python-pytz)))
303 `(#:phases (modify-phases %standard-phases
305 (lambda _ (invoke "pytest" "-vv"))))))
306 (home-page "http://babel.pocoo.org/")
308 "Tools for internationalizing Python applications")
310 "Babel is composed of two major parts:
311 - tools to build and work with gettext message catalogs
312 - a Python interface to the CLDR (Common Locale Data Repository), providing
313 access to various locale display names, localized number and date formatting,
315 (license license:bsd-3)))
317 (define-public python2-babel
318 (package-with-python2 python-babel))
320 (define-public python2-backport-ssl-match-hostname
322 (name "python2-backport-ssl-match-hostname")
327 (uri (pypi-uri "backports.ssl_match_hostname" version))
330 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
331 (build-system python-build-system)
334 #:tests? #f)) ; no test target
335 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
336 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
338 "This backport brings the ssl.match_hostname() function to users of
339 earlier versions of Python. The function checks the hostname in the
340 certificate returned by the server to which a connection has been established,
341 and verifies that it matches the intended target hostname.")
342 (license license:psfl)))
344 (define-public python-hdf4
351 (uri (pypi-uri name version))
354 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
355 (build-system python-build-system)
356 (native-inputs `(("nose" ,python-nose)))
357 (propagated-inputs `(("numpy" ,python-numpy)))
364 (modify-phases %standard-phases
367 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
368 ;; on to import numpy. Somehow this works on their CI system.
369 ;; Let's just manage PYTHONPATH here instead.
370 (substitute* "runexamples.sh"
371 (("export PYTHONPATH=.*") ""))
373 (string-append (getcwd) ":"
374 (getenv "PYTHONPATH")))
375 (invoke "./runexamples.sh")
376 (invoke "nosetests" "-v"))))))
377 (home-page "https://github.com/fhs/python-hdf4")
378 (synopsis "Python interface to the NCSA HDF4 library")
380 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
381 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
382 NetCDF files can also be read and modified. Python-HDF4 is a fork of
383 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
384 (license license:expat)))
386 (define-public python2-hdf4
387 (package-with-python2 python-hdf4))
389 (define-public python-h5py
396 (uri (pypi-uri "h5py" version))
399 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
400 (build-system python-build-system)
402 `(#:tests? #f ; no test target
404 (modify-phases %standard-phases
405 (add-after 'unpack 'fix-hdf5-paths
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((prefix (assoc-ref inputs "hdf5")))
408 (substitute* "setup_build.py"
409 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
410 (string-append "['" prefix "/lib" "']"))
411 (("'/opt/local/include', '/usr/local/include'")
412 (string-append "'" prefix "/include" "'")))
413 (substitute* "setup_configure.py"
414 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
415 (string-append "['" prefix "/lib" "']")))
418 `(("python-six" ,python-six)
419 ("python-numpy" ,python-numpy)))
423 `(("python-cython" ,python-cython)
424 ("python-pkgconfig" ,python-pkgconfig)))
425 (home-page "http://www.h5py.org/")
426 (synopsis "Read and write HDF5 files from Python")
428 "The h5py package provides both a high- and low-level interface to the
429 HDF5 library from Python. The low-level interface is intended to be a
430 complete wrapping of the HDF5 API, while the high-level component supports
431 access to HDF5 files, datasets and groups using established Python and NumPy
433 (license license:bsd-3)))
435 (define-public python2-h5py
436 (package-with-python2 python-h5py))
438 (define-public python-sh
445 (uri (pypi-uri "sh" version))
448 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
449 (build-system python-build-system)
452 (modify-phases %standard-phases
455 (invoke "python" "sh.py" "test"))))))
457 `(("python-coverage" ,python-coverage)))
458 (home-page "https://github.com/amoffat/sh")
459 (synopsis "Python subprocess replacement")
460 (description "This package provides a replacement for Python's
461 @code{subprocess} feature.")
462 (license license:expat)))
464 (define-public python2-sh
465 (package-with-python2 python-sh))
467 (define-public python-cftime
469 (name "python-cftime")
474 (uri (pypi-uri "cftime" version))
477 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
478 (build-system python-build-system)
480 `(("python-numpy" ,python-numpy)))
482 `(("python-coveralls" ,python-coveralls)
483 ("python-cython" ,python-cython)
484 ("python-pytest-cov" ,python-pytest-cov)))
485 (home-page "https://github.com/Unidata/cftime")
486 (synopsis "Library for time handling")
488 "This package provides time-handling functionality that used to be part
489 of the netcdf4 package before.")
490 ;; This package claims to include code under the GPLv3 but is released
492 (license (list license:isc license:gpl3+))))
494 (define-public python-netcdf4
496 (name "python-netcdf4")
501 (uri (pypi-uri "netCDF4" version))
504 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
505 (build-system python-build-system)
508 (modify-phases %standard-phases
509 (add-after 'unpack 'configure-locations
510 (lambda* (#:key inputs #:allow-other-keys)
511 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
514 `(("python-cython" ,python-cython)))
516 `(("python-numpy" ,python-numpy)
517 ("python-cftime" ,python-cftime)))
522 (home-page "https://github.com/Unidata/netcdf4-python")
523 (synopsis "Python/numpy interface to the netCDF library")
524 (description "Netcdf4-python is a Python interface to the netCDF C
525 library. netCDF version 4 has many features not found in earlier
526 versions of the library and is implemented on top of HDF5. This module
527 can read and write files in both the new netCDF 4 and the old netCDF 3
528 format, and can create files that are readable by HDF5 clients. The
529 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
530 to users of that module.")
531 ;; The software is mainly ISC, but includes some files covered
532 ;; by the Expat license.
533 (license (list license:isc license:expat))))
535 (define-public python2-netcdf4
536 (package-with-python2 python-netcdf4))
538 (define-public python-lockfile
540 (name "python-lockfile")
545 (uri (pypi-uri "lockfile" version))
548 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
549 (build-system python-build-system)
550 (arguments '(#:test-target "check"))
552 `(("python-pbr" ,python-pbr)))
553 (home-page "https://launchpad.net/pylockfile")
554 (synopsis "Platform-independent file locking module")
556 "The lockfile package exports a LockFile class which provides a simple
557 API for locking files.")
558 (license license:expat)))
560 (define-public python2-lockfile
561 (package-with-python2 python-lockfile))
563 (define-public python-semantic-version
565 (name "python-semantic-version")
570 (uri (pypi-uri "semantic_version" version))
573 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
574 (build-system python-build-system)
576 `(#:tests? #f)) ; PyPI tarball lacks tests
577 (home-page "https://github.com/rbarrois/python-semanticversion")
578 (synopsis "Semantic versioning module for Python")
580 "The @code{semantic_version} class is a small library for handling
581 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
583 It can compare versions, generate a new version that represents a bump in one of
584 the version levels, and check whether any given string is a proper semantic
585 version identifier.")
586 (license license:bsd-3)))
588 (define-public python2-semantic-version
589 (package-with-python2 python-semantic-version))
591 (define-public python-serpent
593 (name "python-serpent")
598 (uri (pypi-uri "serpent" version))
601 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
602 (build-system python-build-system)
603 (home-page "https://github.com/irmen/Serpent")
604 (synopsis "Serializer for literal Python expressions")
606 "Serpent provides ast.literal_eval() compatible object tree
607 serialization. It serializes an object tree into bytes (utf-8 encoded string)
608 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
609 as the original object tree. As such it is safe to send serpent data to other
610 machines over the network for instance (because only safe literals are
612 (license license:expat)))
614 (define-public python-setuptools
616 (name "python-setuptools")
621 (uri (pypi-uri "setuptools" version ".zip"))
624 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
625 (modules '((guix build utils)))
628 ;; Remove included binaries which are used to build self-extracting
629 ;; installers for Windows.
630 ;; TODO: Find some way to build them ourself so we can include them.
631 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
633 (build-system python-build-system)
634 ;; FIXME: Tests require pytest, which itself relies on setuptools.
635 ;; One could bootstrap with an internal untested setuptools.
638 (home-page "https://pypi.python.org/pypi/setuptools")
640 "Library designed to facilitate packaging Python projects")
642 "Setuptools is a fully-featured, stable library designed to facilitate
643 packaging Python projects, where packaging includes:
644 Python package and module definitions,
645 distribution package metadata,
647 project installation,
648 platform-specific details,
650 ;; TODO: setuptools now bundles the following libraries:
651 ;; packaging, pyparsing, six and appdirs. How to unbundle?
652 (license (list license:psfl ; setuptools itself
653 license:expat ; six, appdirs, pyparsing
654 license:asl2.0 ; packaging is dual ASL2/BSD-2
657 (define-public python2-setuptools
658 (package-with-python2 python-setuptools))
660 (define-public python-uniseg
662 (name "python-uniseg")
667 (uri (pypi-uri "uniseg" version ".zip"))
670 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
671 (build-system python-build-system)
673 '(#:tests? #f)) ; The test suite requires network access.
677 "https://bitbucket.org/emptypage/uniseg-python")
679 "Python library to determine Unicode text segmentations")
681 "Uniseg is a Python package used to determine Unicode text segmentations.
682 Supported segmentations include:
684 @item @dfn{Code point} (any value in the Unicode codespace)
685 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
686 multiple Unicode code points, e.g. \"G\" + acute-accent)
691 (license license:expat)))
693 (define-public python2-uniseg
694 (package-with-python2 python-uniseg))
696 (define-public python-humanfriendly
698 (name "python-humanfriendly")
703 (uri (pypi-uri "humanfriendly" version))
706 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
707 (build-system python-build-system)
709 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
712 `(("python-monotonic" ,python-monotonic)))
713 (home-page "https://humanfriendly.readthedocs.io")
714 (synopsis "Human-friendly input and output in Python")
716 "The functions and classes in @code{humanfriendly} can be used to make
717 text interfaces more user-friendly. It includes tools to parse and format
718 numbers, file sizes, and timespans, timers for long-running operations, menus
719 to allow the user to choose from a list of options, and terminal interaction
721 (license license:expat)))
723 (define-public python2-humanfriendly
724 (package-with-python2 python-humanfriendly))
726 (define-public python-capturer
728 (name "python-capturer")
733 (uri (pypi-uri "capturer" version))
736 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
737 (build-system python-build-system)
741 `(("python-humanfriendly" ,python-humanfriendly)))
742 (home-page "https://capturer.readthedocs.io")
743 (synopsis "Capture stdout and stderr streams of the current process")
745 "The capturer package makes it easy to capture the stdout and stderr
746 streams of the current process and subprocesses. Output can be relayed
747 to the terminal in real time but is also available to the Python program
748 for additional processing.")
749 (license license:expat)))
751 (define-public python2-capturer
752 (package-with-python2 python-capturer))
754 (define-public python-case
761 (uri (pypi-uri "case" version))
764 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
765 (build-system python-build-system)
767 `(("python-mock" ,python-mock)
768 ("python-nose" ,python-nose)
769 ("python-six" ,python-six)
770 ("python-unittest2" ,python-unittest2)))
772 `(("python-coverage" ,python-coverage)))
773 (home-page "https://github.com/celery/case")
774 (synopsis "Unittest utilities and convenience methods")
776 "The @code{case} package provides utilities on top of unittest, including
777 some helpful Python 2 compatibility convenience methods.")
778 (license license:bsd-3)))
780 (define-public python-verboselogs
782 (name "python-verboselogs")
787 (uri (pypi-uri "verboselogs" version))
790 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
791 (build-system python-build-system)
793 `(("python-mock" ,python-mock)
794 ("python-astroid" ,python-astroid)
795 ("python-pylint" ,python-pylint)))
796 (home-page "https://verboselogs.readthedocs.io")
797 (synopsis "Verbose logging level for Python's logging module")
799 "The @code{verboselogs} package extends Python's @code{logging} module to
800 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
801 (license license:expat)))
803 (define-public python2-verboselogs
804 (package-with-python2 python-verboselogs))
806 (define-public python-coloredlogs
808 (name "python-coloredlogs")
813 (uri (pypi-uri "coloredlogs" version))
816 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
817 (build-system python-build-system)
819 `(;Tests require some updated modules
822 `(("python-capturer" ,python-capturer)))
823 (home-page "https://coloredlogs.readthedocs.io")
824 (synopsis "Colored stream handler for Python's logging module")
826 "The @code{coloredlogs} package enables colored terminal output for
827 Python's logging module. The @code{ColoredFormatter} class inherits from
828 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
830 (license license:expat)))
832 (define-public python2-coloredlogs
833 (package-with-python2 python-coloredlogs))
835 (define-public python-eventlet
837 (name "python-eventlet")
842 (uri (pypi-uri "eventlet" version))
845 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
846 (build-system python-build-system)
848 `(("python-greenlet" ,python-greenlet)))
850 ;; TODO: Requires unpackaged 'enum-compat'.
852 (home-page "http://eventlet.net")
853 (synopsis "Concurrent networking library for Python")
855 "Eventlet is a concurrent networking library for Python that
856 allows you to change how you run your code, not how you write it.
857 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
858 Coroutines ensure that the developer uses a blocking style of programming
859 that is similar to threading, but provide the benefits of non-blocking I/O.
860 The event dispatch is implicit, which means you can easily use @code{Eventlet}
861 from the Python interpreter, or as a small part of a larger application.")
862 (license license:expat)))
864 (define-public python2-eventlet
865 (let ((base (package-with-python2
866 (strip-python2-variant python-eventlet))))
867 (package (inherit base)
869 `(("python2-enum34" ,python2-enum34)
870 ,@(package-propagated-inputs base))))))
872 (define-public python-six
879 (uri (pypi-uri "six" version))
882 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
883 (build-system python-build-system)
886 (modify-phases %standard-phases
889 (invoke "py.test" "-v"))))))
891 `(("python-py" ,python-py)
892 ("python-pytest" ,python-pytest-bootstrap)))
893 (home-page "https://pypi.python.org/pypi/six/")
894 (synopsis "Python 2 and 3 compatibility utilities")
896 "Six is a Python 2 and 3 compatibility library. It provides utility
897 functions for smoothing over the differences between the Python versions with
898 the goal of writing Python code that is compatible on both Python versions.
899 Six supports every Python version since 2.5. It is contained in only one
900 Python file, so it can be easily copied into your project.")
901 (license license:x11)))
903 (define-public python2-six
904 (package-with-python2 python-six))
906 (define-public python-six-bootstrap
909 (name "python-six-bootstrap")
911 (arguments `(#:tests? #f))))
913 (define-public python2-six-bootstrap
914 (package-with-python2 python-six-bootstrap))
916 (define-public python-schedule
918 (name "python-schedule")
923 (uri (pypi-uri "schedule" version))
926 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
927 (build-system python-build-system)
929 `(("python-pytest" ,python-pytest)
930 ("python-mock" ,python-mock)))
931 (home-page "https://github.com/dbader/schedule")
932 (synopsis "Schedule periodic function calls in Python")
934 "Schedule is an in-process scheduler for periodic jobs that uses the
935 builder pattern for configuration. Schedule lets you run Python functions (or
936 any other callable) periodically at pre-determined intervals using a simple,
937 human-friendly syntax.")
938 (license license:expat)))
940 (define-public python2-schedule
941 (package-with-python2 python-schedule))
943 (define-public python-pandas
945 (name "python-pandas")
950 (uri (pypi-uri "pandas" version))
952 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
953 (build-system python-build-system)
955 `(#:modules ((guix build utils)
956 (guix build python-build-system)
959 #:phases (modify-phases %standard-phases
962 (let ((build-directory
965 (car (scandir "build"
966 (cut string-prefix? "lib." <>))))))
967 ;; Disable the "strict data files" option which causes
968 ;; the build to error out if required data files are not
969 ;; available (as is the case with PyPI archives).
970 (substitute* "setup.cfg"
971 (("addopts = --strict-data-files") "addopts = "))
972 (with-directory-excursion build-directory
973 ;; Delete tests that require "moto" which is not yet in Guix.
974 (for-each delete-file
975 '("pandas/tests/io/conftest.py"
976 "pandas/tests/io/json/test_compression.py"
977 "pandas/tests/io/parser/test_network.py"
978 "pandas/tests/io/test_excel.py"
979 "pandas/tests/io/test_parquet.py"))
980 (invoke "pytest" "-vv" "pandas" "--skip-slow"
981 "--skip-network" "-k"
982 ;; XXX: Due to the deleted tests above.
983 "not test_read_s3_jsonl"))))))))
985 `(("python-numpy" ,python-numpy)
986 ("python-pytz" ,python-pytz)
987 ("python-dateutil" ,python-dateutil)))
989 `(("python-cython" ,python-cython)
990 ("python-beautifulsoup4" ,python-beautifulsoup4)
991 ("python-lxml" ,python-lxml)
992 ("python-html5lib" ,python-html5lib)
993 ("python-nose" ,python-nose)
994 ("python-pytest" ,python-pytest)))
995 (home-page "https://pandas.pydata.org")
996 (synopsis "Data structures for data analysis, time series, and statistics")
998 "Pandas is a Python package providing fast, flexible, and expressive data
999 structures designed to make working with structured (tabular,
1000 multidimensional, potentially heterogeneous) and time series data both easy
1001 and intuitive. It aims to be the fundamental high-level building block for
1002 doing practical, real world data analysis in Python.")
1003 (license license:bsd-3)))
1005 (define-public python2-pandas
1006 (package-with-python2 python-pandas))
1008 (define-public python2-mechanize
1010 (name "python2-mechanize")
1015 (uri (pypi-uri "mechanize" version))
1018 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1019 (build-system python-build-system)
1021 `(#:python ,python-2 ; apparently incompatible with Python 3
1023 ;; test fails with message
1024 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1025 ;; (python-3.3.2) or
1026 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1028 ;; The source code is from March 2011 and probably not up-to-date
1029 ;; with respect to python unit tests.
1030 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1032 "Stateful programmatic web browsing in Python")
1034 "Mechanize implements stateful programmatic web browsing in Python,
1035 after Andy Lester’s Perl module WWW::Mechanize.")
1036 (license (license:non-copyleft
1038 "See COPYING in the distribution."))))
1041 (define-public python-simplejson
1043 (name "python-simplejson")
1048 (uri (pypi-uri "simplejson" version))
1051 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1052 (build-system python-build-system)
1053 (home-page "http://simplejson.readthedocs.org/en/latest/")
1055 "Json library for Python")
1057 "JSON (JavaScript Object Notation) is a subset of JavaScript
1058 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1061 Simplejson exposes an API familiar to users of the standard library marshal
1062 and pickle modules. It is the externally maintained version of the json
1063 library contained in Python 2.6, but maintains compatibility with Python 2.5
1064 and (currently) has significant performance advantages, even without using
1065 the optional C extension for speedups. Simplejson is also supported on
1067 (license license:x11)))
1069 (define-public python2-simplejson
1070 (package-with-python2 python-simplejson))
1073 (define-public python-pyicu
1075 (name "python-pyicu")
1080 (uri (pypi-uri "PyICU" version))
1083 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1084 (build-system python-build-system)
1086 `(("icu4c" ,icu4c)))
1088 `(("python-pytest" ,python-pytest)
1089 ("python-six" ,python-six)))
1090 (home-page "https://github.com/ovalhub/pyicu")
1091 (synopsis "Python extension wrapping the ICU C++ API")
1093 "PyICU is a python extension wrapping the ICU C++ API.")
1094 (properties `((python2-variant . ,(delay python2-pyicu))))
1095 (license license:x11)))
1097 (define-public python2-pyicu
1098 (let ((base (package-with-python2
1099 (strip-python2-variant python-pyicu))))
1103 `(,@(package-arguments base)
1105 (modify-phases %standard-phases
1106 (add-before 'check 'delete-failing-test
1108 ;; XXX: This fails due to Unicode issues unique to Python 2,
1109 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1110 (delete-file "test/test_Script.py")
1113 (define-public python2-dogtail
1114 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1115 ;; spaces in indentation" with Python 3.
1117 (name "python2-dogtail")
1121 (uri (pypi-uri "dogtail" version))
1124 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1125 (build-system python-build-system)
1126 (arguments `(#:python ,python-2
1127 #:tests? #f)) ; invalid command "test"
1128 ;; Currently no offical homepage.
1129 (home-page "https://pypi.python.org/pypi/dogtail/")
1130 (synopsis "GUI test tool and automation framework written in Python")
1132 "Dogtail is a GUI test tool and automation framework written in Python.
1133 It uses Accessibility (a11y) technologies to communicate with desktop
1134 applications. dogtail scripts are written in Python and executed like any
1135 other Python program.")
1136 (license license:gpl2+)))
1138 (define-public python-empy
1140 (name "python-empy")
1144 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1148 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1149 (build-system python-build-system)
1151 `(#:tests? #f)) ;python2 only
1152 (home-page "http://www.alcyone.com/software/empy/")
1153 (synopsis "Templating system for Python")
1155 "EmPy is a system for embedding Python expressions and statements in
1156 template text; it takes an EmPy source file, processes it, and produces
1157 output. This is accomplished via expansions, which are special signals to the
1158 EmPy system and are set off by a special prefix (by default the at sign, @@).
1159 EmPy can expand arbitrary Python expressions and statements in this way, as
1160 well as a variety of special forms. Textual data not explicitly delimited in
1161 this way is sent unaffected to the output, allowing Python to be used in
1162 effect as a markup language. Also supported are callbacks via hooks,
1163 recording and playback via diversions, and dynamic, chainable filters. The
1164 system is highly configurable via command line options and embedded
1166 (license license:lgpl2.1+)))
1168 (define-public python2-empy
1169 (package-with-python2 python-empy))
1171 (define-public python2-element-tree
1173 (name "python2-element-tree")
1178 "http://effbot.org/media/downloads/elementtree-"
1179 version "-20050316.tar.gz"))
1182 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1183 (build-system python-build-system)
1185 `(#:python ,python-2 ; seems to be part of Python 3
1186 #:tests? #f)) ; no 'test' sub-command
1187 (synopsis "Toolkit for XML processing in Python")
1189 "ElementTree is a Python library supporting lightweight XML processing.")
1190 (home-page "http://effbot.org/zone/element-index.htm")
1191 (license (license:x11-style
1192 "http://docs.python.org/2/license.html"
1193 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1195 (define-public python2-pybugz
1197 (name "python2-pybugz")
1202 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1206 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1207 (patches (search-patches "pybugz-stty.patch"
1208 "pybugz-encode-error.patch"))))
1209 (build-system python-build-system)
1211 `(#:python ,python-2 ; SyntaxError with Python 3
1212 #:tests? #f)) ; no 'test' sub-command
1214 `(("element-tree" ,python2-element-tree)))
1215 (synopsis "Python and command-line interface to Bugzilla")
1217 "PyBugz is a Python library and command-line tool to query the Bugzilla
1218 bug tracking system. It is meant as an aid to speed up interaction with the
1220 (home-page "http://www.liquidx.net/pybugz/")
1221 (license license:gpl2)))
1223 (define-public python2-enum
1225 (name "python2-enum")
1229 (uri (pypi-uri "enum" version))
1232 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1233 (build-system python-build-system)
1235 `(#:python ,python-2))
1236 (home-page "http://pypi.python.org/pypi/enum/")
1237 (synopsis "Robust enumerated type support in Python")
1239 "This provides a module for robust enumerations in Python. It has
1240 been superseded by the Python standard library and is provided only for
1242 ;; Choice of either license.
1243 (license (list license:gpl3+ license:psfl))))
1245 (define-public python-enum34
1247 (name "python-enum34")
1252 (uri (pypi-uri "enum34" version))
1255 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1256 (build-system python-build-system)
1257 (home-page "https://pypi.python.org/pypi/enum34")
1258 (synopsis "Backported Python 3.4 Enum")
1260 "Enum34 is the new Python stdlib enum module available in Python 3.4
1261 backported for previous versions of Python from 2.4 to 3.3.")
1262 (license license:bsd-3)))
1264 (define-public python2-enum34
1265 (package-with-python2 python-enum34))
1267 (define-public python-parse-type
1269 (name "python-parse-type")
1274 (uri (pypi-uri "parse_type" version))
1277 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1278 (build-system python-build-system)
1280 `(("python-six" ,python-six)
1281 ("python-parse" ,python-parse)))
1283 `(("python-pytest" ,python-pytest)
1284 ("python-pytest-runner" ,python-pytest-runner)))
1285 (home-page "https://github.com/jenisys/parse_type")
1286 (synopsis "Extended parse module")
1288 "Parse_type extends the python parse module.")
1290 `((python2-variant . ,(delay python2-parse-type))))
1291 (license license:bsd-3)))
1293 (define-public python2-parse-type
1294 (let ((base (package-with-python2
1295 (strip-python2-variant python-parse-type))))
1296 (package (inherit base)
1298 `(("python2-enum34" ,python2-enum34)
1299 ,@(package-propagated-inputs base))))))
1301 (define-public python-parse
1303 (name "python-parse")
1308 (uri (pypi-uri "parse" version))
1311 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1312 (build-system python-build-system)
1315 (modify-phases %standard-phases
1317 (lambda _ (invoke "python" "test_parse.py"))))))
1318 (home-page "https://github.com/r1chardj0n3s/parse")
1319 (synopsis "Parse strings")
1321 "Parse strings using a specification based on the Python @code{format()}
1323 (license license:x11)))
1325 (define-public python-polib
1327 (name "python-polib")
1331 (uri (pypi-uri "polib" version))
1334 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1335 (build-system python-build-system)
1336 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1337 (synopsis "Manipulate, create and modify gettext files")
1338 (description "Polib can manipulate any gettext format (po, pot and mo)
1339 files. It can be used to create po files from scratch or to modify
1341 (license license:expat)))
1343 (define-public python2-polib
1344 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1347 (arguments `(,@(package-arguments base)
1348 ;; Tests don't work with python2.
1351 (define-public scons
1358 (url "https://github.com/SCons/scons.git")
1360 (file-name (git-file-name name version))
1363 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
1364 (build-system python-build-system)
1366 `(#:use-setuptools? #f ; still relies on distutils
1367 #:tests? #f ; no 'python setup.py test' command
1369 (modify-phases %standard-phases
1370 (add-before 'build 'bootstrap
1372 (substitute* "src/engine/SCons/compat/__init__.py"
1373 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1374 "sys.modules[new] = __import__(old)"))
1375 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1376 (chdir "build/scons")
1378 (home-page "http://scons.org/")
1379 (synopsis "Software construction tool written in Python")
1381 "SCons is a software construction tool. Think of SCons as an improved,
1382 cross-platform substitute for the classic Make utility with integrated
1383 functionality similar to autoconf/automake and compiler caches such as ccache.
1384 In short, SCons is an easier, more reliable and faster way to build
1386 (license license:x11)))
1388 (define-public scons-python2
1390 (inherit (package-with-python2 scons))
1391 (name "scons-python2")))
1393 (define-public python-extras
1395 (name "python-extras")
1400 (uri (pypi-uri "extras" version))
1403 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1404 (build-system python-build-system)
1406 ;; FIXME: Circular dependency on testtools.
1408 (home-page "https://github.com/testing-cabal/extras")
1409 (synopsis "Useful extensions to the Python standard library")
1411 "Extras is a set of extensions to the Python standard library.")
1412 (license license:expat)))
1414 (define-public python2-extras
1415 (package-with-python2 python-extras))
1417 (define-public python-mimeparse
1419 (name "python-mimeparse")
1424 (uri (pypi-uri "python-mimeparse" version))
1427 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1428 (build-system python-build-system)
1431 (modify-phases %standard-phases
1434 (invoke "./mimeparse_test.py"))))))
1436 "https://github.com/dbtsai/python-mimeparse")
1437 (synopsis "Python library for parsing MIME types")
1439 "Mimeparse provides basic functions for parsing MIME type names and
1440 matching them against a list of media-ranges.")
1441 (license license:expat)))
1443 (define-public python2-mimeparse
1444 (package-with-python2 python-mimeparse))
1446 (define-public python-miniboa
1448 (name "python-miniboa")
1453 (uri (pypi-uri "miniboa" version))
1456 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1457 (build-system python-build-system)
1458 (home-page "https://github.com/shmup/miniboa")
1459 (synopsis "Simple, single-threaded Telnet server")
1461 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1463 (license license:asl2.0)))
1465 (define-public python2-miniboa
1466 (package-with-python2 python-miniboa))
1468 (define-public python-pafy
1470 (name "python-pafy")
1475 (uri (pypi-uri "pafy" version))
1478 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1479 (build-system python-build-system)
1481 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1483 ;; Youtube-dl is a python package which is imported in the file
1484 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1485 `(("youtube-dl" ,youtube-dl)))
1486 (home-page "https://np1.github.io/pafy/")
1487 (synopsis "Retrieve YouTube content and metadata")
1489 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1490 (license license:lgpl3+)))
1492 (define-public python2-funcsigs
1494 (name "python2-funcsigs")
1498 (uri (pypi-uri "funcsigs" version))
1501 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1502 (build-system python-build-system)
1504 `(#:python ,python-2))
1506 `(("python2-unittest2" ,python2-unittest2)))
1507 (home-page "http://funcsigs.readthedocs.org")
1508 (synopsis "Python function signatures from PEP362")
1510 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1511 (license license:asl2.0)))
1513 (define-public python2-funcsigs-bootstrap
1515 (inherit python2-funcsigs)
1516 (name "python2-funcsigs-bootstrap")
1520 ,@(package-arguments python2-funcsigs)))))
1522 (define-public python-py
1529 (uri (pypi-uri "py" version))
1532 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1533 (build-system python-build-system)
1535 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1536 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1537 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1538 ;; Is this module globally installed?"
1541 `(("python-setuptools-scm" ,python-setuptools-scm)))
1542 (home-page "https://github.com/pytest-dev/py")
1543 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1545 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1546 code introspection, and logging.")
1547 (license license:expat)))
1549 (define-public python2-py
1550 (package-with-python2 python-py))
1552 ;; Recent versions of python-fixtures and python-testrepository need
1553 ;; python-pbr for packaging, which itself needs these two packages for
1555 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1556 ;; same source, just without any test dependencies and with tests disabled.
1557 ;; python-pbr-minmal is then used to package python-fixtures and
1558 ;; python-testrepository.
1559 ;; Strictly speaking we currently could remove the test-requirements from the
1560 ;; normal python-pbr package (and save this package) since test are disabled
1561 ;; there anyway. But this may change in future.
1562 (define-public python-pbr-minimal
1564 (name "python-pbr-minimal")
1569 (uri (pypi-uri "pbr" version))
1572 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1573 (build-system python-build-system)
1576 (home-page "http://docs.openstack.org/developer/pbr/")
1577 (synopsis "Minimal build of python-pbr used for bootstrapping")
1579 "Used only for bootstrapping python2-pbr, you should not need this.")
1580 (license license:asl2.0)))
1582 (define-public python2-pbr-minimal
1583 (package-with-python2 python-pbr-minimal))
1585 (define-public python-pbr
1587 (inherit python-pbr-minimal)
1590 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1592 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1594 `(("python-fixtures" ,python-fixtures-bootstrap)
1595 ;; discover, coverage, hacking, subunit
1596 ("python-mock" ,python-mock)
1597 ("python-six" ,python-six)
1598 ("python-sphinx" ,python-sphinx)
1599 ("python-testrepository" ,python-testrepository-bootstrap)
1600 ("python-testresources" ,python-testresources-bootstrap)
1601 ("python-testscenarios" ,python-testscenarios-bootstrap)
1602 ("python-testtools" ,python-testtools-bootstrap)
1603 ("python-virtualenv" ,python-virtualenv)))
1604 (synopsis "Enhance the default behavior of Python’s setuptools")
1606 "Python Build Reasonableness (PBR) is a library that injects some useful
1607 and sensible default behaviors into your setuptools run. It will set
1608 versions, process requirements files and generate AUTHORS and ChangeLog file
1609 from git information.
1612 (define-public python2-pbr
1613 (package-with-python2 python-pbr))
1615 (define-public python-exif-read
1617 (name "python-exif-read")
1621 (uri (pypi-uri "ExifRead" version))
1624 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1625 (build-system python-build-system)
1626 (arguments `(#:tests? #f)) ; no tests
1627 (home-page "https://github.com/ianare/exif-py")
1628 (synopsis "Python library to extract EXIF data from image files")
1630 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1632 (license license:bsd-3)))
1634 (define-public python2-exif-read
1635 (package-with-python2 python-exif-read))
1637 (define-public python-pyld
1639 (name "python-pyld")
1643 (uri (pypi-uri "PyLD" version))
1646 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1647 (build-system python-build-system)
1648 (home-page "https://github.com/digitalbazaar/pyld")
1649 (synopsis "Python implementation of the JSON-LD specification")
1651 "PyLD is an implementation of the JSON-LD specification.")
1652 (license license:bsd-3)))
1654 (define-public python2-pyld
1655 (package-with-python2 python-pyld))
1657 (define-public python-click
1659 (name "python-click")
1664 (uri (pypi-uri "click" version))
1667 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1668 (build-system python-build-system)
1671 (modify-phases %standard-phases
1672 (add-after 'unpack 'fix-paths
1673 (lambda* (#:key inputs #:allow-other-keys)
1674 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1675 "cross-libc" "libc"))))
1676 (substitute* "click/_unicodefun.py"
1678 (string-append "'" glibc "/bin/locale'"))))
1682 (invoke "python" "-m" "pytest"))))))
1684 `(("python-pytest" ,python-pytest)))
1685 (home-page "https://palletsprojects.com/p/click/")
1686 (synopsis "Command line library for Python")
1688 "Click is a Python package for creating command line interfaces in a
1689 composable way with as little code as necessary. Its name stands for
1690 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1691 with sensible defaults out of the box.")
1692 (license license:bsd-3)))
1694 (define-public python2-click
1695 (package-with-python2 python-click))
1697 (define-public python-wheel
1699 (name "python-wheel")
1704 (uri (pypi-uri "wheel" version))
1707 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1708 (build-system python-build-system)
1710 `(("python-jsonschema" ,python-jsonschema)
1711 ("python-pytest-cov" ,python-pytest-cov)))
1712 (home-page "https://bitbucket.org/pypa/wheel/")
1713 (synopsis "Format for built Python packages")
1715 "A wheel is a ZIP-format archive with a specially formatted filename and
1716 the @code{.whl} extension. It is designed to contain all the files for a PEP
1717 376 compatible install in a way that is very close to the on-disk format. Many
1718 packages will be properly installed with only the @code{Unpack} step and the
1719 unpacked archive preserves enough information to @code{Spread} (copy data and
1720 scripts to their final locations) at any later time. Wheel files can be
1721 installed with a newer @code{pip} or with wheel's own command line utility.")
1722 (license license:expat)
1723 (properties `((python2-variant . ,(delay python2-wheel))))))
1725 (define-public python2-wheel
1726 (let ((wheel (package-with-python2
1727 (strip-python2-variant python-wheel))))
1728 (package (inherit wheel)
1729 (native-inputs `(("python2-functools32" ,python2-functools32)
1730 ,@(package-native-inputs wheel))))))
1732 (define-public python-vcversioner
1734 (name "python-vcversioner")
1735 (version "2.16.0.0")
1739 (uri (pypi-uri "vcversioner" version))
1742 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1743 (build-system python-build-system)
1744 (synopsis "Python library for version number discovery")
1745 (description "Vcversioner is a Python library that inspects tagging
1746 information in a variety of version control systems in order to discover
1748 (home-page "https://github.com/habnabit/vcversioner")
1749 (license license:isc)))
1751 (define-public python2-vcversioner
1752 (package-with-python2 python-vcversioner))
1754 (define-public python-jsonschema
1756 (name "python-jsonschema")
1760 (uri (pypi-uri "jsonschema" version))
1763 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1764 (build-system python-build-system)
1767 (modify-phases %standard-phases
1768 (replace 'check (lambda _ (invoke "nosetests"))))))
1770 `(("python-nose" ,python-nose)
1771 ("python-vcversioner" ,python-vcversioner)))
1772 (home-page "https://github.com/Julian/jsonschema")
1773 (synopsis "Implementation of JSON Schema for Python")
1775 "Jsonschema is an implementation of JSON Schema for Python.")
1776 (license license:expat)
1777 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1779 (define-public python2-jsonschema
1780 (let ((jsonschema (package-with-python2
1781 (strip-python2-variant python-jsonschema))))
1782 (package (inherit jsonschema)
1784 `(("python2-mock" ,python2-mock)
1785 ,@(package-native-inputs jsonschema)))
1787 `(("python2-functools32" ,python2-functools32))))))
1789 (define-public python-schema
1791 (name "python-schema")
1796 (uri (pypi-uri "schema" version))
1799 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1800 (build-system python-build-system)
1802 `(("python-pytest" ,python-pytest)))
1803 (home-page "https://github.com/keleshev/schema")
1804 (synopsis "Simple data validation library")
1806 "@code{python-schema} is a library for validating Python data
1807 structures, such as those obtained from config-files, forms, external
1808 services or command-line parsing, converted from JSON/YAML (or
1809 something else) to Python data-types.")
1810 (license license:psfl)))
1812 (define-public python2-schema
1813 (package-with-python2 python-schema))
1815 (define-public python-schema-0.5
1816 (package (inherit python-schema)
1821 (uri (pypi-uri "schema" version))
1824 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1826 (define-public python2-schema-0.5
1827 (package-with-python2 python-schema-0.5))
1829 (define-public python-kitchen
1831 (name "python-kitchen")
1836 (uri (pypi-uri "kitchen" version))
1839 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1840 (build-system python-build-system)
1842 `(("python-chardet" ,python-chardet)))
1843 (home-page "https://github.com/fedora-infra/kitchen")
1844 (synopsis "Python API for snippets")
1845 (description "@code{kitchen} module provides a python API for all sorts of
1846 little useful snippets of code that everybody ends up writing for their projects
1847 but never seem big enough to build an independent release. Use kitchen and stop
1848 cutting and pasting that code over and over.")
1849 (license (list license:lgpl2.1+
1850 ;; subprocess.py, test_subprocess.py,
1851 ;; kitchen/pycompat25/defaultdict.py:
1854 (define-public python2-kitchen
1855 (package-with-python2 python-kitchen))
1857 (define-public python-unidecode
1859 (name "python-unidecode")
1863 (uri (pypi-uri "Unidecode" version))
1866 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1867 (build-system python-build-system)
1868 (home-page "https://pypi.python.org/pypi/Unidecode")
1869 (synopsis "ASCII transliterations of Unicode text")
1871 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1872 useful when integrating with legacy code that doesn't support Unicode, or for
1873 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1874 machine identifiers from human-readable Unicode strings that should still be
1875 somewhat intelligible.")
1876 (license license:gpl2+)))
1878 (define-public python2-unidecode
1879 (package-with-python2 python-unidecode))
1881 (define-public python-pyjwt
1883 (name "python-pyjwt")
1888 (uri (pypi-uri "PyJWT" version))
1891 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1892 (modules '((guix build utils)))
1895 (for-each delete-file-recursively
1896 (find-files "." "\\.pyc$"))
1898 (build-system python-build-system)
1900 `(("python-pytest" ,python-pytest)
1901 ("python-pytest-cov" ,python-pytest-cov)
1902 ("python-pytest-runner" ,python-pytest-runner)))
1903 (home-page "https://github.com/progrium/pyjwt")
1904 (synopsis "JSON Web Token implementation in Python")
1906 "PyJWT is a JSON Web Token implementation written in Python.")
1907 (license license:expat)))
1909 (define-public python2-pyjwt
1910 (package-with-python2 python-pyjwt))
1912 (define-public python-pykka
1914 (name "python-pykka")
1919 (uri (pypi-uri "Pykka" version))
1922 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1923 (build-system python-build-system)
1925 `(("python-mock" ,python-mock)
1926 ("python-nose" ,python-nose)
1927 ("python-gevent" ,python-gevent)
1928 ("python-eventlet" ,python-eventlet)))
1929 (home-page "https://www.pykka.org/")
1930 (synopsis "Pykka is a Python implementation of the actor model")
1932 "Pykka is a Python implementation of the actor model.
1933 The actor model introduces some simple rules to control the sharing
1934 of state and cooperation between execution units, which makes it
1935 easier to build concurrent applications.")
1936 (license license:asl2.0)))
1938 (define-public python2-pykka
1939 (package-with-python2 python-pykka))
1941 (define-public python-pymsgbox
1943 (name "python-pymsgbox")
1949 ;; LICENSE.txt is not present on pypi
1950 (url "https://github.com/asweigart/PyMsgBox")
1951 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1952 (file-name (git-file-name name version))
1955 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1957 ;; Circular dependency to run tests:
1958 ;; Tests need pyautogui, which depends on pymsgbox.
1960 (build-system python-build-system)
1961 (home-page "https://github.com/asweigart/PyMsgBox")
1962 (synopsis "Python module for JavaScript-like message boxes")
1964 "PyMsgBox is a simple, cross-platform, pure Python module for
1965 JavaScript-like message boxes. Types of dialog boxes include:
1973 (license license:bsd-3)))
1975 (define-public python-pympler
1977 (name "python-pympler")
1978 (home-page "https://pythonhosted.org/Pympler/")
1982 (uri (pypi-uri "Pympler" version))
1985 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1986 (build-system python-build-system)
1988 `(#:phases (modify-phases %standard-phases
1990 (add-after 'install 'check
1991 (lambda* (#:key inputs outputs #:allow-other-keys)
1992 (add-installed-pythonpath inputs outputs)
1993 (invoke "python" "setup.py" "test"))))))
1994 (synopsis "Measure, monitor and analyze memory behavior")
1996 "Pympler is a development tool to measure, monitor and analyze
1997 the memory behavior of Python objects in a running Python application.
1999 By pympling a Python application, detailed insight in the size and the
2000 lifetime of Python objects can be obtained. Undesirable or unexpected
2001 runtime behavior like memory bloat and other @samp{pymples} can easily
2004 A web profiling frontend exposes process statistics, garbage
2005 visualisation and class tracker statistics.")
2006 (license license:asl2.0)))
2008 (define-public python2-pympler
2009 (package-with-python2 python-pympler))
2011 (define-public python-itsdangerous
2013 (name "python-itsdangerous")
2018 (uri (pypi-uri "itsdangerous" version))
2021 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2022 (build-system python-build-system)
2023 (home-page "https://palletsprojects.com/p/itsdangerous/")
2024 (synopsis "Python library for passing data to/from untrusted environments")
2026 "Itsdangerous provides various helpers to pass trusted data to untrusted
2027 environments and back.")
2028 (license license:bsd-3)))
2030 (define-public python2-itsdangerous
2031 (package-with-python2 python-itsdangerous))
2033 (define-public python-pyyaml
2035 (name "python-pyyaml")
2040 (uri (pypi-uri "PyYAML" version))
2043 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2044 (build-system python-build-system)
2046 `(("libyaml" ,libyaml)))
2047 (home-page "http://pyyaml.org/wiki/PyYAML")
2048 (synopsis "YAML parser and emitter for Python")
2050 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2051 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2052 API, and sensible error messages. PyYAML supports standard YAML tags and
2053 provides Python-specific tags that allow to represent an arbitrary Python
2055 (license license:expat)))
2057 (define-public python2-pyyaml
2058 (package-with-python2 python-pyyaml))
2060 (define-public python-vine
2062 (name "python-vine")
2067 (uri (pypi-uri "vine" version))
2070 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2071 (build-system python-build-system)
2073 `(("python-pytest" ,python-pytest)
2074 ("python-case" ,python-case)))
2075 (home-page "https://github.com/celery/vine")
2076 (synopsis "Promises for Python")
2078 "@code{vine} provides a special implementation of promises in that it can
2079 be used both for \"promise of a value\" and lazy evaluation. The biggest
2080 upside for this is that everything in a promise can also be a promise,
2081 e.g. filters, callbacks and errbacks can all be promises.")
2082 (license license:bsd-3)))
2084 (define-public python-virtualenv
2086 (name "python-virtualenv")
2091 (uri (pypi-uri "virtualenv" version))
2094 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2095 (build-system python-build-system)
2098 (modify-phases %standard-phases
2099 (add-before 'check 'disable-failing-test
2101 ;; Disable failing test. See upstream bug report
2102 ;; https://github.com/pypa/virtualenv/issues/957
2103 (substitute* "tests/test_virtualenv.py"
2104 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2107 `(("python-mock" ,python-mock)
2108 ("python-pytest" ,python-pytest)))
2109 (home-page "https://virtualenv.pypa.io/")
2110 (synopsis "Virtual Python environment builder")
2112 "Virtualenv is a tool to create isolated Python environments.")
2113 (license license:expat)))
2115 (define-public python2-virtualenv
2116 (package-with-python2 python-virtualenv))
2118 (define-public python-markupsafe
2120 (name "python-markupsafe")
2125 (uri (pypi-uri "MarkupSafe" version))
2128 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2129 (build-system python-build-system)
2130 (home-page "https://github.com/mitsuhiko/markupsafe")
2131 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2133 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2135 (license license:bsd-3)))
2137 (define-public python2-markupsafe
2138 (package-with-python2 python-markupsafe))
2140 (define-public python-jinja2
2142 (name "python-jinja2")
2147 (uri (pypi-uri "Jinja2" version))
2150 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2151 (build-system python-build-system)
2153 `(("python-markupsafe" ,python-markupsafe)))
2154 (home-page "http://jinja.pocoo.org/")
2155 (synopsis "Python template engine")
2157 "Jinja2 is a small but fast and easy to use stand-alone template engine
2158 written in pure Python.")
2159 (license license:bsd-3)))
2161 (define-public python2-jinja2
2162 (package-with-python2 python-jinja2))
2164 (define-public python-pystache
2166 (name "python-pystache")
2170 (uri (pypi-uri "pystache" version))
2173 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2174 (build-system python-build-system)
2176 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2177 (home-page "http://defunkt.io/pystache/")
2178 (synopsis "Python logic-less template engine")
2180 "Pystache is a Python implementation of the framework agnostic,
2181 logic-free templating system Mustache.")
2182 (license license:expat)
2183 (properties `((python2-variant . ,(delay python2-pystache))))))
2185 (define-public python2-pystache
2186 (package (inherit (package-with-python2
2187 (strip-python2-variant python-pystache)))
2189 `(#:python ,python-2
2191 (modify-phases %standard-phases
2194 (invoke "python" "test_pystache.py"))))))))
2196 (define-public python-joblib
2198 (name "python-joblib")
2202 (uri (pypi-uri "joblib" version))
2205 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2206 (build-system python-build-system)
2209 (modify-phases %standard-phases
2211 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2213 `(("python-pytest" ,python-pytest)))
2214 (home-page "https://joblib.readthedocs.io/")
2215 (synopsis "Using Python functions as pipeline jobs")
2217 "Joblib is a set of tools to provide lightweight pipelining in Python.
2218 In particular, joblib offers: transparent disk-caching of the output values
2219 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2220 logging and tracing of the execution.")
2221 (license license:bsd-3)))
2223 (define-public python2-joblib
2224 (package-with-python2 python-joblib))
2226 (define-public python-daemon
2228 (name "python-daemon")
2233 (uri (pypi-uri "python-daemon" version))
2236 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2237 (build-system python-build-system)
2240 (modify-phases %standard-phases
2241 (add-before 'check 'disable-tests
2243 ;; FIXME: Determine why test fails
2244 (substitute* "test/test_daemon.py"
2245 (("test_detaches_process_context")
2246 "skip_test_detaches_process_context"))
2249 `(("python-lockfile" ,python-lockfile)))
2251 `(("python-unittest2" ,python-unittest2)
2252 ("python-testtools" ,python-testtools)
2253 ("python-testscenarios" ,python-testscenarios)
2254 ("python-mock" ,python-mock)
2255 ("python-docutils" ,python-docutils)))
2256 (home-page "https://pagure.io/python-daemon/")
2257 (synopsis "Python library for making a Unix daemon process")
2258 (description "Python-daemon is a library that assists a Python program to
2259 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2261 This library provides a @code{DaemonContext} class that manages the following
2262 important tasks for becoming a daemon process:
2264 @item Detach the process into its own process group.
2265 @item Set process environment appropriate for running inside a chroot.
2266 @item Renounce suid and sgid privileges.
2267 @item Close all open file descriptors.
2268 @item Change the working directory, uid, gid, and umask.
2269 @item Set appropriate signal handlers.
2270 @item Open new file descriptors for stdin, stdout, and stderr.
2271 @item Manage a specified PID lock file.
2272 @item Register cleanup functions for at-exit processing.
2274 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2275 (license (list license:asl2.0 license:gpl3+))))
2277 (define-public python-docutils
2279 (name "python-docutils")
2284 (uri (pypi-uri "docutils" version))
2287 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2288 (build-system python-build-system)
2290 '(#:tests? #f)) ; no setup.py test command
2291 (home-page "http://docutils.sourceforge.net/")
2292 (synopsis "Python Documentation Utilities")
2294 "Docutils is a modular system for processing documentation into useful
2295 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2297 ;; Most of the source code is public domain, but some source files are
2298 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2299 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2301 (define-public python2-docutils
2302 (package-with-python2 python-docutils))
2304 (define-public python-pygments
2306 (name "python-pygments")
2311 (uri (pypi-uri "Pygments" version))
2314 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2315 (build-system python-build-system)
2317 ;; FIXME: Tests require sphinx, which depends on this.
2319 (home-page "http://pygments.org/")
2320 (synopsis "Syntax highlighting")
2322 "Pygments is a syntax highlighting package written in Python.")
2323 (license license:bsd-2)))
2325 (define-public python2-pygments
2326 (package-with-python2 python-pygments))
2328 (define-public python-sphinxcontrib-websupport
2330 (name "python-sphinxcontrib-websupport")
2334 (uri (pypi-uri "sphinxcontrib-websupport" version))
2337 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2338 (build-system python-build-system)
2340 ;; FIXME: Tests depend on Sphinx, which depends on this.
2342 (home-page "http://sphinx-doc.org/")
2343 (synopsis "Sphinx API for web applications")
2344 (description "This package provides a Python API to easily integrate
2345 Sphinx documentation into your web application. It provides tools to
2346 integrate Sphinx documents in web templates and to handle searches.")
2347 (license license:bsd-3)))
2349 (define-public python2-sphinxcontrib-websupport
2350 (package-with-python2 python-sphinxcontrib-websupport))
2352 (define-public python-sphinx
2354 (name "python-sphinx")
2359 (uri (pypi-uri "Sphinx" version))
2362 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2363 (build-system python-build-system)
2366 (modify-phases %standard-phases
2369 ;; Requires Internet access.
2370 (delete-file "tests/test_build_linkcheck.py")
2371 (substitute* "tests/test_build_latex.py"
2372 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2373 "@pytest.mark.skip()"))
2374 (when (which "python")
2375 ;; XXX: These tests are broken when using Python2:
2376 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2377 (delete-file "tests/test_api_translator.py")
2378 (delete-file "tests/test_setup_command.py"))
2379 (invoke "make" "test"))))))
2381 `(("python-imagesize" ,python-imagesize)
2382 ("python-sphinx-alabaster-theme"
2383 ,python-sphinx-alabaster-theme)
2384 ("python-babel" ,python-babel)
2385 ("python-snowballstemmer" ,python-snowballstemmer)
2386 ("python-docutils" ,python-docutils)
2387 ("python-jinja2" ,python-jinja2)
2388 ("python-packaging" ,python-packaging)
2389 ("python-pygments" ,python-pygments)
2390 ("python-requests" ,python-requests)
2391 ("python-six" ,python-six)
2392 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2394 `(("graphviz" ,graphviz)
2395 ("imagemagick" ,imagemagick) ;for "convert"
2396 ("python-html5lib" ,python-html5lib)
2397 ("python-mock" ,python-mock)
2398 ("python-nose" ,python-nose)
2399 ("python-pytest" ,python-pytest)))
2400 (home-page "http://sphinx-doc.org/")
2401 (synopsis "Python documentation generator")
2402 (description "Sphinx is a tool that makes it easy to create documentation
2403 for Python projects or other documents consisting of multiple reStructuredText
2405 (license license:bsd-3)
2406 (properties `((python2-variant . ,(delay python2-sphinx))))))
2408 (define-public python2-sphinx
2409 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2412 (native-inputs `(("python2-mock" ,python2-mock)
2413 ("python2-enum34" ,python2-enum34)
2414 ,@(package-native-inputs base)))
2415 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2416 ("python2-typing" ,python2-typing)
2417 ,@(package-propagated-inputs base))))))
2419 (define-public python-sphinx-gallery
2421 (name "python-sphinx-gallery")
2425 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2426 "/archive/v" version ".tar.gz"))
2427 (file-name (string-append name "-" version ".tar.gz"))
2430 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2431 (build-system python-build-system)
2433 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2434 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2435 ;; <https://matplotlib.org/objects.inv>.
2438 `(("python-pytest-runner" ,python-pytest-runner)))
2439 (home-page "https://sphinx-gallery.github.io/")
2440 (synopsis "Generate an examples gallery automatically")
2442 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2443 from any set of Python scripts and puts it into an examples gallery.")
2444 (license license:bsd-3)))
2446 (define-public python2-sphinx-gallery
2447 (package-with-python2 python-sphinx-gallery))
2449 (define-public python-sphinx-rtd-theme
2451 (name "python-sphinx-rtd-theme")
2456 (uri (pypi-uri "sphinx_rtd_theme" version))
2459 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2460 (build-system python-build-system)
2461 (arguments '(#:tests? #f)) ; No tests.
2463 `(("python-sphinx" ,python-sphinx)))
2464 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2465 (synopsis "ReadTheDocs.org theme for Sphinx")
2466 (description "A theme for Sphinx used by ReadTheDocs.org.")
2467 (license license:expat)))
2469 (define-public python2-sphinx-rtd-theme
2470 (package-with-python2 python-sphinx-rtd-theme))
2472 (define-public python-guzzle-sphinx-theme
2474 (name "python-guzzle-sphinx-theme")
2479 (uri (pypi-uri "guzzle_sphinx_theme" version))
2482 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2483 (build-system python-build-system)
2485 `(("python-sphinx" ,python-sphinx)))
2486 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2487 (synopsis "Sphinx theme used by Guzzle")
2488 (description "This package provides guzzle_sphinx_theme, a theme for the
2489 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2490 and several other projects.")
2491 (license license:expat)))
2493 (define-public python2-guzzle-sphinx-theme
2494 (package-with-python2 python-guzzle-sphinx-theme))
2496 (define-public python-rst.linker
2498 (name "python-rst.linker")
2503 (uri (pypi-uri "rst.linker" version))
2506 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2507 (build-system python-build-system)
2509 `(("python-dateutil" ,python-dateutil)
2510 ("python-six" ,python-six)))
2512 `(("python-setuptools-scm" ,python-setuptools-scm)))
2513 ;; Test would require path.py, which would introduce a cyclic dependence.
2514 (arguments `(#:tests? #f))
2515 ;; Note: As of version 1.7 the documentation is not worth building.
2516 (home-page "https://github.com/jaraco/rst.linker")
2517 (synopsis "Sphinx plugin to add links and timestamps")
2518 (description "rst.linker allows to automatically replace text by a
2519 reStructuredText external reference or timestamps. It's primary purpose is to
2520 augment the changelog, but it can be used for other documents, too.")
2521 (license license:expat)))
2523 (define-public python2-rst.linker
2524 (package-with-python2 python-rst.linker))
2526 (define-public python-feedgenerator
2528 (name "python-feedgenerator")
2533 (uri (pypi-uri "feedgenerator" version))
2536 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2537 (modules '((guix build utils)))
2540 ;; Remove pre-compiled .pyc files from source.
2541 (for-each delete-file-recursively
2542 (find-files "." "__pycache__" #:directories? #t))
2543 (for-each delete-file (find-files "." "\\.pyc$"))
2545 (build-system python-build-system)
2547 `(("python-pytz" ,python-pytz)
2548 ("python-six" ,python-six)))
2549 (home-page "https://github.com/getpelican/feedgenerator")
2551 "Standalone version of Django's Atom/RSS feed generator")
2553 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2554 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2555 (license license:bsd-3)))
2557 (define-public python2-feedgenerator
2558 (package-with-python2 python-feedgenerator))
2560 (define-public python-toml
2562 (name "python-toml")
2567 (uri (pypi-uri "toml" version))
2570 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2571 (build-system python-build-system)
2573 `(#:tests? #f)) ;no tests suite in release
2574 (home-page "https://github.com/uiri/toml")
2575 (synopsis "Library for TOML")
2577 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2578 Language (TOML) configuration files.")
2579 (license license:expat)))
2581 (define-public python-jsonrpc-server
2583 (name "python-jsonrpc-server")
2588 (uri (pypi-uri "python-jsonrpc-server" version))
2591 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2592 (build-system python-build-system)
2594 `(("python-future" ,python-future)
2595 ("python-mock" ,python-mock)
2596 ("python-pytest" ,python-pytest)))
2598 "https://github.com/palantir/python-jsonrpc-server")
2599 (synopsis "JSON RPC 2.0 server library")
2601 "This packages provides a JSON RPC 2.0 server library for Python.")
2602 (license license:expat)))
2604 (define-public python-pydocstyle
2606 (name "python-pydocstyle")
2611 (uri (pypi-uri "pydocstyle" version))
2614 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2615 (build-system python-build-system)
2617 `(("python-six" ,python-six)
2618 ("python-snowballstemmer" ,python-snowballstemmer)))
2620 "https://github.com/PyCQA/pydocstyle/")
2621 (synopsis "Python docstring style checker")
2623 "This package provides a style checker for the Python Language
2625 (license license:expat)))
2627 (define-public python-language-server
2629 (name "python-language-server")
2634 (uri (pypi-uri "python-language-server" version))
2637 "04pbxl06hg0ddm2xx99jn9jh40yv0mmzdjw8pqd2rbcdg42hhia6"))))
2638 (build-system python-build-system)
2640 `(("python-pluggy" ,python-pluggy)
2641 ("python-jsonrpc-server" ,python-jsonrpc-server)
2642 ("python-jedi" ,python-jedi)
2643 ("python-yapf" ,python-yapf)
2644 ("python-pyflakes" ,python-pyflakes)
2645 ("python-pydocstyle" ,python-pydocstyle)
2646 ("python-pycodestyle" ,python-pycodestyle)
2647 ("python-mccabe" ,python-mccabe)
2648 ("python-rope" ,python-rope)
2649 ("python-autopep8" ,python-autopep8)))
2650 (home-page "https://github.com/palantir/python-language-server")
2651 (synopsis "Python implementation of the Language Server Protocol")
2653 "The Python Language Server (pyls) is an implementation of the Python 3
2654 language specification for the Language Server Protocol (LSP). This tool is
2655 used in text editing environments to provide a complete and integrated
2656 feature-set for programming Python effectively.")
2657 (license license:expat)))
2659 (define-public python-black
2661 (name "python-black")
2666 (uri (pypi-uri "black" version))
2669 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2670 (build-system python-build-system)
2673 (modify-phases %standard-phases
2674 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2676 (let ((python3 (which "python3")))
2677 (substitute* '("tests/data/fmtonoff.py"
2678 "tests/data/string_prefixes.py"
2679 "tests/data/function.py")
2680 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2681 (string-append "#!" python3 (if (string? minor-version)
2685 `(("python-click" ,python-click)
2686 ("python-attrs" ,python-attrs)
2687 ("python-appdirs" ,python-appdirs)
2688 ("python-toml" ,python-toml)))
2689 (home-page "https://github.com/ambv/black")
2690 (synopsis "The uncompromising code formatter")
2691 (description "Black is the uncompromising Python code formatter.")
2692 (license license:expat)))
2694 (define-public python-blinker
2696 (name "python-blinker")
2701 (uri (pypi-uri "blinker" version))
2704 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2705 (build-system python-build-system)
2706 (home-page "http://pythonhosted.org/blinker/")
2707 (synopsis "Fast, simple object-to-object and broadcast signaling")
2709 "Blinker provides a fast dispatching system that allows any number of
2710 interested parties to subscribe to events, or \"signals\".")
2711 (license license:expat)))
2713 (define-public python2-blinker
2714 (package-with-python2 python-blinker))
2716 (define-public pelican
2723 (uri (pypi-uri "pelican" version))
2726 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
2727 (build-system python-build-system)
2729 `(("python-feedgenerator" ,python-feedgenerator)
2730 ("python-jinja2" ,python-jinja2)
2731 ("python-pygments" ,python-pygments)
2732 ("python-docutils" ,python-docutils)
2733 ("python-pytz" ,python-pytz)
2734 ("python-blinker" ,python-blinker)
2735 ("python-unidecode" ,python-unidecode)
2736 ("python-six" ,python-six)
2737 ("python-dateutil" ,python-dateutil)
2738 ("python-markdown" ,python-markdown)))
2739 (home-page "https://getpelican.com/")
2741 `(;; XXX Requires a lot more packages to do unit tests :P
2743 #:phases (modify-phases %standard-phases
2745 'install 'adjust-requires
2746 ;; Since feedgenerator is installed from git, it doesn't
2747 ;; conform to the version requirements.
2749 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2750 ;; version requirement so setuptools doesn't get confused.
2752 (substitute* "setup.py"
2753 (("['\"]feedgenerator.*?['\"]")
2754 "'feedgenerator'")))))))
2755 (synopsis "Python-based static site publishing system")
2757 "Pelican is a tool to generate a static blog from reStructuredText,
2758 Markdown input files, and more. Pelican uses Jinja2 for templating
2759 and is very extensible.")
2760 (license license:agpl3+)))
2762 (define-public python-scikit-image
2764 (name "python-scikit-image")
2769 (uri (pypi-uri "scikit-image" version))
2771 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2772 (build-system python-build-system)
2774 ;; TODO: Some tests require running X11 server. Disable them?
2776 ;; See DEPENDS.txt for the list of build and run time requiremnts
2778 `(("python-cloudpickle" ,python-cloudpickle)
2779 ("python-dask" ,python-dask)
2780 ("python-matplotlib" ,python-matplotlib)
2781 ("python-networkx" ,python-networkx)
2782 ("python-numpy" ,python-numpy)
2783 ("python-pillow" ,python-pillow)
2784 ("python-pywavelets" ,python-pywavelets)
2785 ("python-scipy" ,python-scipy)
2786 ("python-six" ,python-six)))
2788 `(("python-cython" ,python-cython)))
2789 (home-page "http://scikit-image.org/")
2790 (synopsis "Image processing in Python")
2792 "Scikit-image is a collection of algorithms for image processing.")
2793 (license license:bsd-3)))
2795 (define-public python2-scikit-image
2796 (package-with-python2 python-scikit-image))
2798 (define-public python-cython
2800 (name "python-cython")
2805 (uri (pypi-uri "Cython" version))
2808 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
2809 (build-system python-build-system)
2810 ;; we need the full python package and not just the python-wrapper
2811 ;; because we need libpython3.3m.so
2813 `(("python" ,python)))
2816 (modify-phases %standard-phases
2817 (add-before 'check 'set-HOME
2818 ;; some tests require access to "$HOME/.cython"
2819 (lambda _ (setenv "HOME" "/tmp") #t))
2821 ;; FIXME: These tests started failing on armhf after the 0.28 update
2822 ;; (commit c69d11c5930), both with an error such as this:
2823 ;; compiling (cpp) and running dictcomp ...
2824 ;; === C/C++ compiler error output: ===
2826 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2827 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2828 ,@(if (target-arm32?)
2829 `((add-before 'check 'disable-failing-tests
2831 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2832 (for-each (lambda (test)
2833 (format disabled-tests "~a\n" test))
2834 '("memslice" "dictcomp"))
2835 (close-port disabled-tests)))))
2840 ;; The "with_outer_raising" test fails with Python 3.7. See
2841 ;; https://github.com/cython/cython/issues/2454
2842 (delete-file "tests/run/generators_py.py")
2843 (invoke "python" "runtests.py" "-vv"))))))
2844 (home-page "http://cython.org/")
2845 (synopsis "C extensions for Python")
2846 (description "Cython is an optimising static compiler for both the Python
2847 programming language and the extended Cython programming language. It makes
2848 writing C extensions for Python as easy as Python itself.")
2849 (license license:asl2.0)
2850 (properties `((python2-variant . ,(delay python2-cython))))))
2852 (define-public python2-cython
2853 (package (inherit (package-with-python2
2854 (strip-python2-variant python-cython)))
2855 (name "python2-cython")
2857 `(("python-2" ,python-2))))) ; this is not automatically changed
2859 ;; The RPython toolchain currently does not support Python 3.
2860 (define-public python2-rpython
2862 (name "python2-rpython")
2867 (uri (pypi-uri "rpython" version))
2870 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2871 (build-system python-build-system)
2872 (arguments `(#:python ,python-2))
2874 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2875 (home-page "https://rpython.readthedocs.org")
2876 (synopsis "Framework for implementing interpreters and virtual machines")
2877 (description "RPython is a translation and support framework for
2878 producing implementations of dynamic languages, emphasizing a clean separation
2879 between language specification and implementation aspects.")
2880 (license license:expat)))
2882 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2883 ;; python-scipy still build, as these three packages are often used together.
2884 (define-public python-numpy
2886 (name "python-numpy")
2892 "https://github.com/numpy/numpy/releases/download/v"
2893 version "/numpy-" version ".tar.gz"))
2896 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2897 (build-system python-build-system)
2899 `(("openblas" ,openblas)
2900 ("lapack" ,lapack)))
2902 `(("python-cython" ,python-cython)
2903 ("python-pytest" ,python-pytest)
2904 ("gfortran" ,gfortran)))
2907 (modify-phases %standard-phases
2908 (add-before 'build 'configure-blas-lapack
2909 (lambda* (#:key inputs #:allow-other-keys)
2910 (call-with-output-file "site.cfg"
2914 libraries = openblas
2915 library_dirs = ~a/lib
2916 include_dirs = ~a/include
2918 # backslash-n to make emacs happy
2920 lapack_libs = lapack
2921 library_dirs = ~a/lib
2922 include_dirs = ~a/include
2924 (assoc-ref inputs "openblas")
2925 (assoc-ref inputs "openblas")
2926 (assoc-ref inputs "lapack")
2927 (assoc-ref inputs "lapack"))))
2929 (add-before 'build 'fix-executable-paths
2930 (lambda* (#:key inputs #:allow-other-keys)
2931 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2932 ;; instead of /bin/sh.
2933 (substitute* "numpy/distutils/exec_command.py"
2934 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2935 (string-append match-start (assoc-ref inputs "bash") match-end)))
2936 ;; Use "gcc" executable, not "cc".
2937 (substitute* "numpy/distutils/system_info.py"
2938 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2939 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2941 ;; Tests can only be run after the library has been installed and not
2942 ;; within the source directory.
2944 (add-after 'install 'check
2945 (lambda* (#:key outputs inputs #:allow-other-keys)
2946 ;; Make installed package available for running the tests
2947 (add-installed-pythonpath inputs outputs)
2948 ;; Make sure "f2py" etc is found.
2949 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2950 ":" (getenv "PATH")))
2951 (with-directory-excursion "/tmp"
2952 (invoke "python" "-c"
2953 "import numpy; numpy.test(verbose=2)")))))))
2954 (home-page "http://www.numpy.org/")
2955 (synopsis "Fundamental package for scientific computing with Python")
2956 (description "NumPy is the fundamental package for scientific computing
2957 with Python. It contains among other things: a powerful N-dimensional array
2958 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2959 and Fortran code, useful linear algebra, Fourier transform, and random number
2961 (license license:bsd-3)))
2963 (define-public python2-numpy
2964 (package-with-python2 python-numpy))
2966 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2967 ;; interest only for legacy code going back to NumPy's predecessor
2969 (define-public python2-numpy-1.8
2970 (package (inherit python2-numpy)
2976 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2977 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2980 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2982 (substitute-keyword-arguments (package-arguments python2-numpy)
2984 `(modify-phases ,phases
2985 (replace 'configure-blas-lapack
2986 (lambda* (#:key inputs #:allow-other-keys)
2987 (call-with-output-file "site.cfg"
2991 libraries = openblas,lapack
2992 library_dirs = ~a/lib:~a/lib
2993 include_dirs = ~a/include:~a/include
2995 (assoc-ref inputs "openblas")
2996 (assoc-ref inputs "lapack")
2997 (assoc-ref inputs "openblas")
2998 (assoc-ref inputs "lapack"))))
3001 `(("python2-nose" ,python2-nose)))
3002 (description "NumPy is the fundamental package for scientific computing
3003 with Python. It contains among other things: a powerful N-dimensional array
3004 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3005 and Fortran code, useful linear algebra, Fourier transform, and random number
3006 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3007 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3009 (license license:bsd-3)))
3011 (define-public python-munch
3013 (name "python-munch")
3018 (uri (pypi-uri "munch" version))
3021 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3022 (build-system python-build-system)
3023 (home-page "https://github.com/Infinidat/munch")
3024 (synopsis "Dot-accessible dictionary")
3025 (description "Munch is a dot-accessible dictionary similar to JavaScript
3027 (license license:expat)))
3029 (define-public python2-munch
3030 (package-with-python2 python-munch))
3032 (define-public python-colormath
3034 (name "python-colormath")
3039 (uri (pypi-uri "colormath" version))
3042 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3043 (build-system python-build-system)
3045 `(("python-networkx" ,python-networkx)
3046 ("python-numpy" ,python-numpy)))
3047 (home-page "https://github.com/gtaylor/python-colormath")
3048 (synopsis "Color math and conversion library")
3050 "This is a Python library for color math and conversions.")
3051 (license license:bsd-3)))
3053 (define-public python2-colormath
3054 (package-with-python2 python-colormath))
3056 (define-public python-spectra
3058 (name "python-spectra")
3063 (uri (pypi-uri "spectra" version))
3066 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3067 (build-system python-build-system)
3070 (modify-phases %standard-phases
3072 (lambda _ (invoke "nosetests" "-v"))))))
3074 `(("python-colormath" ,python-colormath)))
3076 `(("python-nose" ,python-nose)))
3077 (home-page "https://github.com/jsvine/spectra")
3078 (synopsis "Color scales and color conversion")
3080 "This package provides a Python library intended to make color math,
3081 color scales, and color space conversion easy. It has support for:
3086 @item Color blending
3087 @item Brightening/darkening colors
3088 @item Saturating/desaturating colors
3089 @item Conversion to/from multiple color spaces.
3091 (license license:expat)))
3093 (define-public python2-spectra
3094 (package-with-python2 python-spectra))
3096 (define-public python-numpy-documentation
3098 (name "python-numpy-documentation")
3099 (version (package-version python-numpy))
3100 (source (package-source python-numpy))
3101 (build-system python-build-system)
3103 `(("python-matplotlib" ,python-matplotlib)
3104 ("python-numpy" ,python-numpy)
3105 ("pkg-config" ,pkg-config)
3106 ("python-sphinx" ,python-sphinx)
3107 ("python-numpydoc" ,python-numpydoc)
3108 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3109 texlive-fonts-cm-super
3111 texlive-generic-ifxetex
3112 texlive-generic-pdftex
3113 texlive-latex-amsfonts
3114 texlive-latex-capt-of
3116 texlive-latex-environ
3117 texlive-latex-eqparbox
3118 texlive-latex-etoolbox
3119 texlive-latex-expdlist
3120 texlive-latex-fancyhdr
3121 texlive-latex-fancyvrb
3122 texlive-latex-fncychap
3124 texlive-latex-framed
3125 texlive-latex-geometry
3126 texlive-latex-graphics
3127 texlive-latex-hyperref
3128 texlive-latex-mdwtools
3129 texlive-latex-multirow
3130 texlive-latex-needspace
3131 texlive-latex-oberdiek
3132 texlive-latex-parskip
3133 texlive-latex-preview
3134 texlive-latex-tabulary
3135 texlive-latex-threeparttable
3136 texlive-latex-titlesec
3137 texlive-latex-trimspaces
3139 texlive-latex-upquote
3141 texlive-latex-varwidth
3142 texlive-latex-wrapfig)))
3143 ("texinfo" ,texinfo)
3145 ("scipy-sphinx-theme"
3146 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3149 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3150 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3153 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3154 ,@(package-native-inputs python-numpy)))
3156 `(#:tests? #f ; we're only generating the documentation
3158 (modify-phases %standard-phases
3161 (lambda* (#:key inputs outputs #:allow-other-keys)
3162 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3164 data "/doc/" ,name "-"
3165 ,(package-version python-numpy)))
3166 (info-reader (string-append data "/info"))
3167 (html (string-append doc "/html"))
3168 (scipy-sphinx-theme "scipy-sphinx-theme")
3169 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3170 (pyver ,(string-append "PYVER=")))
3172 ;; FIXME: this is needed to for texlive-union to generate
3173 ;; fonts, which are not found.
3174 (setenv "HOME" "/tmp")
3176 (with-directory-excursion "doc"
3177 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3179 (invoke "make" "html" pyver)
3180 (invoke "make" "latex" "PAPER=a4" pyver)
3181 (invoke "make" "-C" "build/latex"
3182 "all-pdf" "PAPER=a4" pyver)
3183 ;; FIXME: Generation of the info file fails.
3184 ;; (invoke "make" "info" pyver)
3186 ;; (copy-file "build/texinfo/numpy.info"
3187 ;; (string-append info "/numpy.info"))
3188 (for-each (lambda (file)
3189 (copy-file (string-append "build/latex" file)
3190 (string-append doc file)))
3191 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3192 (with-directory-excursion "build/html"
3193 (for-each (lambda (file)
3194 (let* ((dir (dirname file))
3195 (tgt-dir (string-append html "/" dir)))
3196 (unless (equal? "." dir)
3198 (install-file file html)))
3199 (find-files "." ".*")))))
3201 (home-page (package-home-page python-numpy))
3202 (synopsis "Documentation for the python-numpy package")
3203 (description (package-description python-numpy))
3204 (license (package-license python-numpy))))
3206 (define-public python2-numpy-documentation
3207 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3209 (inherit numpy-documentation)
3210 (native-inputs `(("python2-functools32" ,python2-functools32)
3211 ,@(package-native-inputs numpy-documentation))))))
3213 (define-public python-pygit2
3215 (name "python-pygit2")
3220 (uri (pypi-uri "pygit2" version))
3223 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3224 (build-system python-build-system)
3227 (modify-phases %standard-phases
3228 ;; Remove after the next update. See:
3229 ;; https://github.com/libgit2/pygit2/pull/851
3230 (add-after 'unpack 'compile-with-cffi
3232 (substitute* "setup.py"
3233 (("install_requires")
3234 "setup_requires=['cffi'],\n install_requires"))
3236 (add-after 'unpack 'fix-dependency-versioning
3238 (substitute* "setup.py"
3242 `(("python-six" ,python-six)
3243 ("python-cffi" ,python-cffi)
3244 ("libgit2" ,libgit2)
3245 ("python-tox" ,python-tox)))
3247 `(("python-pytest" ,python-pytest)))
3248 (home-page "https://github.com/libgit2/pygit2")
3249 (synopsis "Python bindings for libgit2")
3250 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3251 library, libgit2 implements Git plumbing.")
3252 ;; GPL2.0 only, with linking exception.
3253 (license license:gpl2)))
3255 (define-public python2-pygit2
3256 (package-with-python2 python-pygit2))
3258 (define-public python-pyparsing
3260 (name "python-pyparsing")
3265 (uri (pypi-uri "pyparsing" version))
3267 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3268 (build-system python-build-system)
3269 (outputs '("out" "doc"))
3271 `(#:tests? #f ; no test target
3273 (modify-phases %standard-phases
3274 (add-after 'install 'install-doc
3275 (lambda* (#:key outputs #:allow-other-keys)
3276 (let* ((doc (string-append (assoc-ref outputs "doc")
3277 "/share/doc/" ,name "-" ,version))
3278 (html-doc (string-append doc "/html"))
3279 (examples (string-append doc "/examples")))
3285 (install-file file tgt))
3286 (find-files dir ".*")))
3287 (list "docs" "htmldoc" "examples")
3288 (list doc html-doc examples))
3290 (home-page "https://github.com/pyparsing/pyparsing")
3291 (synopsis "Python parsing class library")
3293 "The pyparsing module is an alternative approach to creating and
3294 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3295 of regular expressions. The pyparsing module provides a library of classes
3296 that client code uses to construct the grammar directly in Python code.")
3297 (license license:expat)))
3299 (define-public python2-pyparsing
3300 (package-with-python2 python-pyparsing))
3302 (define-public python-numpydoc
3304 (name "python-numpydoc")
3309 (uri (pypi-uri "numpydoc" version))
3312 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3313 (build-system python-build-system)
3315 `(("python-sphinx" ,python-sphinx)))
3317 `(("python-nose" ,python-nose)))
3318 (home-page "https://pypi.python.org/pypi/numpydoc")
3320 "Numpy's Sphinx extensions")
3322 "Sphinx extension to support docstrings in Numpy format.")
3323 (license license:bsd-2)))
3325 (define-public python2-numpydoc
3326 (package-with-python2 python-numpydoc))
3328 (define-public python-numexpr
3330 (name "python-numexpr")
3335 (uri (pypi-uri "numexpr" version))
3338 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3339 (build-system python-build-system)
3340 (arguments `(#:tests? #f)) ; no tests included
3342 `(("python-numpy" ,python-numpy)))
3343 (home-page "https://github.com/pydata/numexpr")
3344 (synopsis "Fast numerical expression evaluator for NumPy")
3346 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3347 expressions that operate on arrays are accelerated and use less memory than
3348 doing the same calculation in Python. In addition, its multi-threaded
3349 capabilities can make use of all your cores, which may accelerate
3350 computations, most specially if they are not memory-bounded (e.g. those using
3351 transcendental functions).")
3352 (license license:expat)))
3354 (define-public python2-numexpr
3355 (package-with-python2 python-numexpr))
3357 (define-public python-cycler
3359 (name "python-cycler")
3363 (uri (pypi-uri "cycler" version))
3366 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3367 (build-system python-build-system)
3369 ;; XXX: The current version requires 'coveralls' which we don't have.
3370 ;; Enable this for the next release which uses 'python-pytest'.
3373 `(("python-six" ,python-six)))
3374 (home-page "http://matplotlib.org/cycler/")
3375 (synopsis "Composable keyword argument iterator")
3377 "When using @code{matplotlib} and plotting more than one line, it is
3378 common to want to be able to want to be able to cycle over one or more artist
3379 styles; but the plotting logic can quickly become involved.
3380 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3381 @code{Cycler} class was developed.")
3382 (license license:bsd-3)))
3384 (define-public python2-cycler
3385 (package-with-python2 python-cycler))
3387 (define-public python-colorspacious
3389 (name "python-colorspacious")
3394 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3396 (file-name (string-append name "-" version))
3398 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3399 (build-system python-build-system)
3401 `(("python-numpy" ,python-numpy)))
3403 `(("python-nose" ,python-nose)))
3406 (modify-phases %standard-phases
3409 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3410 (home-page "https://github.com/njsmith/colorspacious")
3411 (synopsis "Python library for colorspace conversions")
3412 (description "@code{colorspacious} is a Python library that lets you
3413 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3414 (license license:expat)))
3416 (define-public python2-colorspacious
3417 (package-with-python2 python-colorspacious))
3419 (define-public python-matplotlib
3421 (name "python-matplotlib")
3426 (uri (pypi-uri "matplotlib" version))
3429 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3430 (build-system python-build-system)
3431 (propagated-inputs ; the following packages are all needed at run time
3432 `(("python-cycler" ,python-cycler)
3433 ("python-kiwisolver" ,python-kiwisolver)
3434 ("python-pyparsing" ,python-pyparsing)
3435 ("python-pygobject" ,python-pygobject)
3436 ("gobject-introspection" ,gobject-introspection)
3437 ("python-tkinter" ,python "tk")
3438 ("python-dateutil" ,python-dateutil)
3439 ("python-numpy" ,python-numpy)
3440 ("python-pillow" ,python-pillow)
3441 ("python-pytz" ,python-pytz)
3442 ("python-six" ,python-six)
3443 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3444 ;; from 'gtk+') provides the required 'typelib' files used by
3445 ;; 'gobject-introspection'. The location of these files is set with the
3446 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3447 ;; is done automatically by a 'native-search-path' procedure. However,
3448 ;; at run-time the user must set this variable as follows:
3450 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3452 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3453 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3454 ;; object. For this reason we need to import both libraries.
3455 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3456 ("python-pycairo" ,python-pycairo)
3457 ;; XXX: qtwebkit cannot be built reliably.
3458 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3459 ("python-cairocffi" ,python-cairocffi)))
3461 `(("libpng" ,libpng)
3462 ("imagemagick" ,imagemagick)
3463 ("freetype" ,freetype)
3466 ;; FIXME: Add backends when available.
3467 ;("python-wxpython" ,python-wxpython)
3471 `(("pkg-config" ,pkg-config)
3472 ("python-nose" ,python-nose)
3473 ("python-mock" ,python-mock)))
3476 (modify-phases %standard-phases
3477 (add-before 'build 'configure-environment
3478 (lambda* (#:key outputs inputs #:allow-other-keys)
3479 (let ((cairo (assoc-ref inputs "cairo"))
3480 (gtk+ (assoc-ref inputs "gtk+")))
3481 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3483 (setenv "LD_LIBRARY_PATH"
3484 (string-append cairo "/lib:" gtk+ "/lib"))
3485 (setenv "HOME" (getcwd))
3486 (call-with-output-file "setup.cfg"
3488 (format port "[directories]~%
3489 basedirlist = ~a,~a~%
3492 (assoc-ref inputs "tcl")
3493 (assoc-ref inputs "tk")))))
3495 (home-page "http://matplotlib.org")
3496 (synopsis "2D plotting library for Python")
3498 "Matplotlib is a Python 2D plotting library which produces publication
3499 quality figures in a variety of hardcopy formats and interactive environments
3500 across platforms. Matplotlib can be used in Python scripts, the python and
3501 ipython shell, web application servers, and six graphical user interface
3503 (license license:psfl)
3504 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3506 (define-public python2-matplotlib
3507 (let ((matplotlib (package-with-python2
3508 (strip-python2-variant python-matplotlib))))
3509 (package (inherit matplotlib)
3510 ;; Make sure to use special packages for Python 2 instead
3511 ;; of those automatically rewritten by package-with-python2.
3513 `(("python2-pycairo" ,python2-pycairo)
3514 ("python2-backports-functools-lru-cache"
3515 ,python2-backports-functools-lru-cache)
3516 ("python2-functools32" ,python2-functools32)
3517 ("python2-pygobject-2" ,python2-pygobject-2)
3518 ("python2-subprocess32" ,python2-subprocess32)
3519 ("python2-tkinter" ,python-2 "tk")
3520 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3521 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3523 (define-public python-matplotlib-documentation
3525 (name "python-matplotlib-documentation")
3526 (version (package-version python-matplotlib))
3527 (source (package-source python-matplotlib))
3528 (build-system python-build-system)
3530 `(("python-matplotlib" ,python-matplotlib)
3531 ("python-colorspacious" ,python-colorspacious)
3532 ("python-sphinx" ,python-sphinx)
3533 ("python-sphinx-gallery" ,python-sphinx-gallery)
3534 ("python-numpydoc" ,python-numpydoc)
3535 ("python-ipython" ,python-ipython)
3536 ("python-mock" ,python-mock)
3537 ("graphviz" ,graphviz)
3538 ("texlive" ,texlive)
3539 ("texinfo" ,texinfo)
3540 ,@(package-native-inputs python-matplotlib)))
3542 `(#:tests? #f ; we're only generating documentation
3544 (modify-phases %standard-phases
3548 ;; Produce pdf in 'A4' format.
3549 (substitute* "conf.py"
3550 (("latex_paper_size = 'letter'") "")
3551 ;; latex_paper_size is deprecated -> set paper size using
3553 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3554 ;; insert at a point where latex_elements{} is defined:
3555 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3556 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3558 (lambda* (#:key inputs outputs #:allow-other-keys)
3559 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3560 (doc (string-append data "/doc/python-matplotlib-" ,version))
3561 (info (string-append data "/info"))
3562 (html (string-append doc "/html")))
3565 (copy-recursively "build/html" html)
3566 (symlink (string-append html "/_images")
3567 (string-append info "/matplotlib-figures"))
3568 (with-directory-excursion "build/texinfo"
3569 (substitute* "matplotlib.texi"
3570 (("@image\\{([^,]*)" all file)
3571 (string-append "@image{matplotlib-figures/" file)))
3572 (symlink (string-append html "/_images")
3573 "./matplotlib-figures")
3574 (system* "makeinfo" "--no-split"
3575 "-o" "matplotlib.info" "matplotlib.texi"))
3576 (copy-file "build/texinfo/matplotlib.info"
3577 (string-append info "/matplotlib.info"))
3578 (copy-file "build/latex/Matplotlib.pdf"
3579 (string-append doc "/Matplotlib.pdf")))
3581 (home-page (package-home-page python-matplotlib))
3582 (synopsis "Documentation for the python-matplotlib package")
3583 (description (package-description python-matplotlib))
3584 (license (package-license python-matplotlib))))
3586 (define-public python2-matplotlib-documentation
3587 (package-with-python2 python-matplotlib-documentation))
3589 (define-public python2-pysnptools
3591 (name "python2-pysnptools")
3596 (uri (pypi-uri "pysnptools" version))
3599 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3600 (build-system python-build-system)
3602 `(#:python ,python-2 ; only Python 2.7 is supported
3603 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3605 `(("python2-numpy" ,python2-numpy)
3606 ("python2-scipy" ,python2-scipy)
3607 ("python2-pandas" ,python2-pandas)))
3609 `(("python2-cython" ,python2-cython)))
3610 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3611 (synopsis "Library for reading and manipulating genetic data")
3613 "PySnpTools is a library for reading and manipulating genetic data. It
3614 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3615 those files. It can also efficiently manipulate ranges of integers using set
3616 operators such as union, intersection, and difference.")
3617 (license license:asl2.0)))
3619 (define-public python-scipy
3621 (name "python-scipy")
3626 (uri (pypi-uri "scipy" version))
3629 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3630 (build-system python-build-system)
3632 `(("python-numpy" ,python-numpy)
3633 ("python-matplotlib" ,python-matplotlib)
3634 ("python-pyparsing" ,python-pyparsing)))
3636 `(("lapack" ,lapack)
3637 ("openblas" ,openblas)))
3639 `(("python-cython" ,python-cython)
3640 ("python-pytest" ,python-pytest)
3641 ("python-sphinx" ,python-sphinx)
3642 ("python-numpydoc" ,python-numpydoc)
3643 ("gfortran" ,gfortran)
3646 (outputs '("out" "doc"))
3649 (modify-phases %standard-phases
3650 (add-after 'unpack 'disable-broken-tests
3652 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3653 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3654 (string-append indent
3655 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3657 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3658 (("^def test_parallel_threads\\(\\):" m)
3659 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3662 (add-before 'build 'configure-openblas
3663 (lambda* (#:key inputs #:allow-other-keys)
3664 (call-with-output-file "site.cfg"
3668 libraries = openblas
3669 library_dirs = ~a/lib
3670 include_dirs = ~a/include
3672 # backslash-n to make emacs happy
3674 library_dirs = ~a/lib
3675 atlas_libs = openblas
3677 (assoc-ref inputs "openblas")
3678 (assoc-ref inputs "openblas")
3679 (assoc-ref inputs "openblas"))))
3681 (add-after 'install 'install-doc
3682 (lambda* (#:key inputs outputs #:allow-other-keys)
3683 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3684 (doc (string-append data "/doc/" ,name "-" ,version))
3685 (html (string-append doc "/html"))
3686 (pyver ,(string-append "PYVER=" (version-major+minor
3687 (package-version python))))
3688 ;; By default it tries to run sphinx-build through the Python
3689 ;; interpreter which won't work with our shell wrapper.
3690 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3691 ;; Make installed package available for building the
3693 (add-installed-pythonpath inputs outputs)
3694 (with-directory-excursion "doc"
3695 ;; Fix generation of images for mathematical expressions.
3696 (substitute* (find-files "source" "conf\\.py")
3697 (("pngmath_use_preview = True")
3698 "pngmath_use_preview = False"))
3700 (invoke "make" "html" pyver sphinxbuild)
3701 (with-directory-excursion "build/html"
3702 (for-each (lambda (file)
3703 (let* ((dir (dirname file))
3704 (tgt-dir (string-append html "/" dir)))
3705 (install-file file html)))
3706 (find-files "." ".*")))))
3708 ;; Tests can only be run after the library has been installed and not
3709 ;; within the source directory.
3711 (add-after 'install 'check
3712 (lambda* (#:key inputs outputs #:allow-other-keys)
3713 (add-installed-pythonpath inputs outputs)
3714 (with-directory-excursion "/tmp"
3715 (invoke "python" "-c"
3716 "import scipy; scipy.test(verbose=2)")))))))
3717 (home-page "https://www.scipy.org/")
3718 (synopsis "The Scipy library provides efficient numerical routines")
3719 (description "The SciPy library is one of the core packages that make up
3720 the SciPy stack. It provides many user-friendly and efficient numerical
3721 routines such as routines for numerical integration and optimization.")
3722 (properties `((python2-variant . ,(delay python2-scipy))))
3723 (license license:bsd-3)))
3725 (define-public python2-scipy
3726 (package-with-python2
3727 (strip-python2-variant python-scipy)))
3729 (define-public python-socksipy-branch
3731 (name "python-socksipy-branch")
3736 (uri (pypi-uri "SocksiPy-branch" version))
3739 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3740 (build-system python-build-system)
3742 `(#:tests? #f)) ; There are no tests
3743 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3744 (synopsis "Python SOCKS module")
3746 "SocksiPy - A Python SOCKS client module. It provides a
3747 socket-like interface that supports connections to any TCP
3748 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3749 The original version was developed by Dan Haim, this is a
3750 branch created by Mario Vilas to address some open issues,
3751 as the original project seems to have been abandoned circa 2007.")
3752 (license license:bsd-3)))
3754 (define-public python2-socksipy-branch
3755 (package-with-python2 python-socksipy-branch))
3757 (define-public python-pycodestyle
3759 (name "python-pycodestyle")
3764 (uri (pypi-uri "pycodestyle" version))
3767 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3768 (build-system python-build-system)
3769 (home-page "https://pycodestyle.readthedocs.io/")
3770 (synopsis "Python style guide checker")
3771 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3772 Python code against some of the style conventions in
3773 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3774 (license license:expat)))
3776 (define-public python2-pycodestyle
3777 (package-with-python2 python-pycodestyle))
3779 (define-public python-multidict
3781 (name "python-multidict")
3786 (uri (pypi-uri "multidict" version))
3789 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3790 (build-system python-build-system)
3792 `(("python-pytest" ,python-pytest)
3793 ("python-pytest-runner" ,python-pytest-runner)))
3794 (home-page "https://github.com/aio-libs/multidict/")
3795 (synopsis "Multidict implementation")
3796 (description "Multidict is dict-like collection of key-value pairs
3797 where key might be occurred more than once in the container.")
3798 (license license:asl2.0)))
3800 (define-public python-orderedmultidict
3802 (name "python-orderedmultidict")
3807 (uri (pypi-uri "orderedmultidict" version))
3810 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3811 (build-system python-build-system)
3814 (modify-phases %standard-phases
3815 (add-after 'unpack 'fix-tests
3817 ;; The package uses nosetest for running the tests.
3818 ;; Adding this initfile allows to run the test suite
3819 ;; without requiring nosetest.
3820 (with-output-to-file "tests/__init__.py" newline)
3823 `(("python-six" ,python-six)))
3825 `(("python-pycodestyle" ,python-pycodestyle)))
3826 (home-page "https://github.com/gruns/orderedmultidict")
3827 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3828 (description "This package contains a library for ordered multivalue
3829 dictionaries. A multivalue dictionary is a dictionary that can store
3830 multiple values for the same key. An ordered multivalue dictionary is a
3831 multivalue dictionary that retains the order of insertions and deletions.")
3832 (license license:unlicense)))
3834 (define-public python2-orderedmultidict
3835 (package-with-python2 python-orderedmultidict))
3837 (define-public python-autopep8
3839 (name "python-autopep8")
3844 (uri (pypi-uri "autopep8" version))
3847 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3848 (build-system python-build-system)
3850 `(("python-pycodestyle" ,python-pycodestyle)))
3851 (home-page "https://github.com/hhatto/autopep8")
3852 (synopsis "Format Python code according to the PEP 8 style guide")
3854 "@code{autopep8} automatically formats Python code to conform to
3855 the PEP 8 style guide. It uses the pycodestyle utility to determine
3856 what parts of the code needs to be formatted. @code{autopep8} is
3857 capable of fixing most of the formatting issues that can be reported
3859 (license (license:non-copyleft
3860 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3862 (define-public python2-autopep8
3863 (package-with-python2 python-autopep8))
3865 (define-public python-distutils-extra
3867 (name "python-distutils-extra")
3872 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3873 version "/+download/python-distutils-extra-"
3877 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3878 (build-system python-build-system)
3879 (home-page "https://launchpad.net/python-distutils-extra/")
3880 (synopsis "Enhancements to Python's distutils")
3882 "The python-distutils-extra module enables you to easily integrate
3883 gettext support, themed icons, and scrollkeeper-based documentation into
3884 Python's distutils.")
3885 (license license:gpl2)))
3887 (define-public python2-distutils-extra
3888 (package-with-python2 python-distutils-extra))
3890 (define-public python2-elib.intl
3892 (name "python2-elib.intl")
3896 ;; This project doesn't tag releases or publish tarballs, so we take
3897 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3900 (url "https://github.com/dieterv/elib.intl.git")
3901 (commit "d09997cfef")))
3902 (file-name (string-append name "-" version "-checkout"))
3905 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3906 (build-system python-build-system)
3908 ;; incompatible with Python 3 (exception syntax)
3909 `(#:python ,python-2
3911 (home-page "https://github.com/dieterv/elib.intl")
3912 (synopsis "Enhanced internationalization for Python")
3914 "The elib.intl module provides enhanced internationalization (I18N)
3915 services for your Python modules and applications.")
3916 (license license:lgpl3+)))
3918 (define-public python-olefile
3920 (name "python-olefile")
3925 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3927 (file-name (string-append name "-" version ".tar.gz"))
3930 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3931 (build-system python-build-system)
3933 "https://www.decalage.info/python/olefileio")
3934 (synopsis "Read and write Microsoft OLE2 files.")
3936 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3937 Storage or Compound Document, Microsoft Office). It is an improved version of
3938 the OleFileIO module from PIL, the Python Image Library.")
3939 (license license:bsd-3)))
3941 (define-public python2-olefile
3942 (package-with-python2 python-olefile))
3944 (define-public python-pillow
3946 (name "python-pillow")
3951 (uri (pypi-uri "Pillow" version))
3954 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3955 (build-system python-build-system)
3957 `(("python-pytest" ,python-pytest)))
3959 `(("freetype" ,freetype)
3962 ("libjpeg" ,libjpeg)
3963 ("openjpeg" ,openjpeg)
3964 ("libtiff" ,libtiff)
3965 ("libwebp" ,libwebp)))
3967 `(("python-olefile" ,python-olefile)))
3970 (modify-phases %standard-phases
3971 (add-after 'unpack 'patch-ldconfig
3973 (substitute* "setup.py"
3974 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3975 (delete 'check) ; We must run checks after python-pillow is installed.
3976 (add-after 'install 'check-installed
3977 (lambda* (#:key outputs inputs #:allow-other-keys)
3979 (setenv "HOME" (getcwd))
3980 ;; Make installed package available for running the tests.
3981 (add-installed-pythonpath inputs outputs)
3982 (invoke "python" "selftest.py" "--installed")
3983 (invoke "python" "-m" "pytest" "-vv")))))))
3984 (home-page "https://python-pillow.org")
3985 (synopsis "Fork of the Python Imaging Library")
3987 "The Python Imaging Library adds image processing capabilities to your
3988 Python interpreter. This library provides extensive file format support, an
3989 efficient internal representation, and fairly powerful image processing
3990 capabilities. The core image library is designed for fast access to data
3991 stored in a few basic pixel formats. It should provide a solid foundation for
3992 a general image processing tool.")
3993 (license (license:x11-style
3994 "http://www.pythonware.com/products/pil/license.htm"
3995 "The PIL Software License"))))
3997 (define-public python2-pillow
3998 (package-with-python2 python-pillow))
4000 (define-public python-pycparser
4002 (name "python-pycparser")
4007 (uri (pypi-uri "pycparser" version))
4010 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4011 (outputs '("out" "doc"))
4012 (build-system python-build-system)
4014 `(("pkg-config" ,pkg-config)))
4017 (modify-phases %standard-phases
4020 (with-directory-excursion "tests"
4021 (invoke "python" "all_tests.py"))
4023 (add-after 'install 'install-doc
4024 (lambda* (#:key outputs #:allow-other-keys)
4025 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4026 (doc (string-append data "/doc/" ,name "-" ,version))
4027 (examples (string-append doc "/examples")))
4029 (for-each (lambda (file)
4030 (copy-file (string-append "." file)
4031 (string-append doc file)))
4032 '("/README.rst" "/CHANGES" "/LICENSE"))
4033 (copy-recursively "examples" examples)))))))
4034 (home-page "https://github.com/eliben/pycparser")
4035 (synopsis "C parser in Python")
4037 "Pycparser is a complete parser of the C language, written in pure Python
4038 using the PLY parsing library. It parses C code into an AST and can serve as
4039 a front-end for C compilers or analysis tools.")
4040 (license license:bsd-3)))
4042 (define-public python2-pycparser
4043 (package-with-python2 python-pycparser))
4045 (define-public python-pywavelets
4047 (name "python-pywavelets")
4049 (home-page "https://github.com/PyWavelets/pywt")
4052 (uri (pypi-uri "PyWavelets" version))
4055 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4056 (build-system python-build-system)
4058 '(#:modules ((ice-9 ftw)
4062 (guix build python-build-system))
4063 #:phases (modify-phases %standard-phases
4066 (let ((cwd (getcwd))
4067 (libdir (find (cut string-prefix? "lib." <>)
4068 (scandir "build"))))
4069 (with-directory-excursion (string-append cwd "/build/" libdir)
4070 (invoke "nosetests" "-v" "."))))))))
4072 `(("python-matplotlib" ,python-matplotlib) ;for tests
4073 ("python-nose" ,python-nose)))
4075 `(("python-numpy" ,python-numpy)))
4076 (synopsis "Wavelet transforms in Python")
4078 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4079 mathematical basis functions that are localized in both time and frequency.
4080 Wavelet transforms are time-frequency transforms employing wavelets. They are
4081 similar to Fourier transforms, the difference being that Fourier transforms are
4082 localized only in frequency instead of in time and frequency.")
4083 (license license:expat)))
4085 (define-public python2-pywavelets
4086 (package-with-python2 python-pywavelets))
4088 (define-public python-xcffib
4090 (name "python-xcffib")
4095 (uri (pypi-uri "xcffib" version))
4098 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4099 (build-system python-build-system)
4101 `(("libxcb" ,libxcb)))
4103 `(("python-cffi" ,python-cffi) ; used at run time
4104 ("python-six" ,python-six)))
4106 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4109 (modify-phases %standard-phases
4110 (add-after 'unpack 'fix-libxcb-path
4111 (lambda* (#:key inputs #:allow-other-keys)
4112 (let ((libxcb (assoc-ref inputs "libxcb")))
4113 (substitute* '("xcffib/__init__.py")
4114 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4116 (add-after 'install 'install-doc
4117 (lambda* (#:key outputs #:allow-other-keys)
4118 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4119 "/doc/" ,name "-" ,version)))
4121 (copy-file "README.md"
4122 (string-append doc "/README.md"))
4124 (home-page "https://github.com/tych0/xcffib")
4125 (synopsis "XCB Python bindings")
4127 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4128 support for Python 3 and PyPy. It is based on cffi.")
4129 (license license:expat)))
4131 (define-public python2-xcffib
4132 (package-with-python2 python-xcffib))
4134 (define-public python-cairocffi
4136 (name "python-cairocffi")
4141 (uri (pypi-uri "cairocffi" version))
4144 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4145 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4146 (build-system python-build-system)
4147 (outputs '("out" "doc"))
4151 ("gdk-pixbuf" ,gdk-pixbuf)
4155 `(("pkg-config" ,pkg-config)
4156 ("python-pytest" ,python-pytest)
4157 ("python-pytest-cov" ,python-pytest-cov)
4158 ("python-pytest-runner" ,python-pytest-runner)
4159 ("python-sphinx" ,python-sphinx)
4160 ("python-docutils" ,python-docutils)))
4162 `(("python-xcffib" ,python-xcffib))) ; used at run time
4165 (modify-phases %standard-phases
4166 (add-after 'unpack 'patch-paths
4167 (lambda* (#:key inputs outputs #:allow-other-keys)
4168 (substitute* (find-files "." "\\.py$")
4169 (("dlopen\\(ffi, 'cairo'")
4170 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4171 "/lib/libcairo.so.2'"))
4172 (("dlopen\\(ffi, 'gdk-3'")
4173 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4174 "/lib/libgtk-3.so.0'"))
4175 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4176 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4177 "/lib/libgdk_pixbuf-2.0.so.0'"))
4178 (("dlopen\\(ffi, 'glib-2.0'")
4179 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4180 "/lib/libglib-2.0.so.0'"))
4181 (("dlopen\\(ffi, 'gobject-2.0'")
4182 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4183 "/lib/libgobject-2.0.so.0'"))
4184 (("dlopen\\(ffi, 'pangocairo-1.0'")
4185 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4186 "/lib/libpangocairo-1.0.so.0'"))
4187 (("dlopen\\(ffi, 'pango-1.0'")
4188 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4189 "/lib/libpango-1.0.so.0'")))
4191 (add-after 'install 'install-doc
4192 (lambda* (#:key inputs outputs #:allow-other-keys)
4193 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4194 (doc (string-append data "/doc/" ,name "-" ,version))
4195 (html (string-append doc "/html")))
4196 (setenv "LD_LIBRARY_PATH"
4197 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4198 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4199 (setenv "LANG" "en_US.UTF-8")
4201 (for-each (lambda (file)
4202 (copy-file (string-append "." file)
4203 (string-append doc file)))
4204 '("/README.rst" "/CHANGES" "/LICENSE"))
4205 (system* "python" "setup.py" "build_sphinx")
4206 (copy-recursively "docs/_build/html" html)
4208 (home-page "https://github.com/Kozea/cairocffi")
4209 (synopsis "Python bindings and object-oriented API for Cairo")
4211 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4212 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4213 graphics library with support for multiple backends including image buffers,
4214 PNG, PostScript, PDF, and SVG file output.")
4215 (license license:bsd-3)))
4217 (define-public python2-cairocffi
4218 (package-with-python2 python-cairocffi))
4220 (define-public python-decorator
4222 (name "python-decorator")
4227 (uri (pypi-uri "decorator" version))
4229 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4230 (build-system python-build-system)
4231 (home-page "https://pypi.python.org/pypi/decorator/")
4232 (synopsis "Python module to simplify usage of decorators")
4234 "The aim of the decorator module is to simplify the usage of decorators
4235 for the average programmer, and to popularize decorators usage giving examples
4236 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4237 etc. The core of this module is a decorator factory.")
4238 (license license:expat)))
4240 (define-public python2-decorator
4241 (package-with-python2 python-decorator))
4243 (define-public python-drmaa
4245 (name "python-drmaa")
4250 (uri (pypi-uri "drmaa" version))
4252 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4253 (build-system python-build-system)
4254 ;; The test suite requires libdrmaa which is provided by the cluster
4255 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4256 ;; should be set to the path of the libdrmaa library.
4257 (arguments '(#:tests? #f))
4259 `(("python-nose" ,python-nose)))
4260 (home-page "https://pypi.python.org/pypi/drmaa")
4261 (synopsis "Python bindings for the DRMAA library")
4263 "A Python package for Distributed Resource Management (DRM) job
4264 submission and control. This package is an implementation of the DRMAA 1.0
4265 Python language binding specification.")
4266 (license license:bsd-3)))
4268 (define-public python2-drmaa
4269 (package-with-python2 python-drmaa))
4271 (define-public python-grako
4273 (name "python-grako")
4279 (pypi-uri "grako" version ".zip"))
4282 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4283 (build-system python-build-system)
4284 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4287 ("python-pytest" ,python-pytest)
4288 ("python-pytest-runner" ,python-pytest-runner)))
4289 (home-page "https://bitbucket.org/neogeny/grako")
4290 (synopsis "EBNF parser generator")
4292 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4293 memoizing PEG/Packrat parser in Python.")
4294 (license license:bsd-3)))
4296 (define-public python2-grako
4297 (package-with-python2 python-grako))
4299 (define-public python-gridmap
4301 (name "python-gridmap")
4307 "https://github.com/pygridtools/gridmap/archive/v"
4309 (file-name (string-append name "-" version ".tar.gz"))
4311 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4312 (build-system python-build-system)
4314 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4316 `(("python-psutil" ,python-psutil)
4317 ("python-drmaa" ,python-drmaa)
4318 ("python-pyzmq" ,python-pyzmq)))
4319 (home-page "https://github.com/pygridtools/gridmap")
4320 (synopsis "Create jobs on a cluster directly from Python")
4322 "Gridmap is a Python package to allow you to easily create jobs on the
4323 cluster directly from Python. You can directly map Python functions onto the
4324 cluster without needing to write any wrapper code yourself.")
4325 (license license:gpl3+)))
4327 (define-public python2-gridmap
4328 (package-with-python2 python-gridmap))
4330 (define-public python-honcho
4332 (name "python-honcho")
4338 "https://github.com/nickstenning/honcho/archive/v"
4340 (file-name (string-append name "-" version ".tar.gz"))
4342 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4343 (build-system python-build-system)
4345 `(("python-pytest" ,python-pytest)
4346 ("python-mock" ,python-mock)
4347 ("python-tox" ,python-tox)
4348 ("which" ,which))) ;for tests
4350 `(("python-jinja2" ,python-jinja2)))
4353 (modify-phases %standard-phases
4355 (add-after 'install 'check
4356 (lambda* (#:key outputs inputs #:allow-other-keys)
4357 ;; fix honcho path in testsuite
4358 (substitute* "tests/conftest.py"
4359 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4360 "/bin/honcho" "'")))
4361 ;; It's easier to run tests after install.
4362 ;; Make installed package available for running the tests
4363 (add-installed-pythonpath inputs outputs)
4364 (invoke "py.test" "-v"))))))
4365 (home-page "https://github.com/nickstenning/honcho")
4366 (synopsis "Manage Procfile-based applications")
4368 "A Procfile is a file which describes how to run an application
4369 consisting of serveral processes. honcho starts all listed processes.
4370 The output of all running processes is collected by honcho and
4372 (license license:expat)))
4374 (define-public python2-honcho
4375 (package-with-python2 python-honcho))
4377 (define-public python-pexpect
4379 (name "python-pexpect")
4384 (uri (pypi-uri "pexpect" version))
4386 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4387 (build-system python-build-system)
4390 (modify-phases %standard-phases
4391 (add-before 'check 'prepare-tests
4393 (substitute* (find-files "tests")
4394 (("/bin/ls") (which "ls"))
4395 (("/bin/echo") (which "echo"))
4396 (("/bin/which") (which "which"))
4397 ;; Many tests try to use the /bin directory which
4398 ;; is not present in the build environment.
4399 ;; Use one that's non-empty and unlikely to change.
4400 (("/bin'") "/dev'"))
4401 ;; XXX: Socket connection test gets "Connection reset by peer".
4402 ;; Why does it not work? Delete for now.
4403 (delete-file "tests/test_socket.py")
4405 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4407 `(("python-nose" ,python-nose)
4408 ("python-pytest" ,python-pytest)
4411 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4413 `(("python-ptyprocess" ,python-ptyprocess)))
4414 (home-page "http://pexpect.readthedocs.org/")
4415 (synopsis "Controlling interactive console applications")
4417 "Pexpect is a pure Python module for spawning child applications;
4418 controlling them; and responding to expected patterns in their output.
4419 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4420 child application and control it as if a human were typing commands.")
4421 (license license:isc)))
4423 (define-public python2-pexpect
4424 (package-with-python2 python-pexpect))
4426 (define-public python-setuptools-scm
4428 (name "python-setuptools-scm")
4432 (uri (pypi-uri "setuptools_scm" version))
4435 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4436 (build-system python-build-system)
4437 (home-page "https://github.com/pypa/setuptools_scm/")
4438 (synopsis "Manage Python package versions in SCM metadata")
4440 "Setuptools_scm handles managing your Python package versions in
4441 @dfn{software configuration management} (SCM) metadata instead of declaring
4442 them as the version argument or in a SCM managed file.")
4443 (license license:expat)))
4445 (define-public python2-setuptools-scm
4446 (package-with-python2 python-setuptools-scm))
4448 (define-public python-pathpy
4450 (name "python-pathpy")
4455 (uri (pypi-uri "path.py" version))
4457 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4458 ;; (outputs '("out" "doc"))
4459 (build-system python-build-system)
4461 `(("python-appdirs" ,python-appdirs)))
4463 `(("python-setuptools-scm" ,python-setuptools-scm)
4464 ("python-sphinx" ,python-sphinx)
4465 ("python-rst.linker" ,python-rst.linker)
4466 ("python-pytest" ,python-pytest)
4467 ("python-pytest-runner" ,python-pytest-runner)))
4469 ;; FIXME: Documentation and tests require "jaraco.packaging".
4472 ;; (modify-phases %standard-phases
4473 ;; (add-after 'build 'build-doc
4475 ;; (setenv "LANG" "en_US.UTF-8")
4476 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4477 ;; (add-after 'install 'install-doc
4478 ;; (lambda* (#:key outputs #:allow-other-keys)
4479 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4480 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4481 ;; (html (string-append doc "/html")))
4483 ;; (for-each (lambda (file)
4484 ;; (copy-file file (string-append doc "/" file)))
4485 ;; '("README.rst" "CHANGES.rst"))
4486 ;; (copy-recursively "build/sphinx/html" html)))))))
4487 (home-page "https://github.com/jaraco/path.py")
4488 (synopsis "Python module wrapper for built-in os.path")
4490 "@code{path.py} implements path objects as first-class entities, allowing
4491 common operations on files to be invoked on those path objects directly.")
4492 (license license:expat)))
4494 (define-public python2-pathpy
4495 (package-with-python2 python-pathpy))
4497 (define-public python-simplegeneric
4499 (name "python-simplegeneric")
4504 (uri (pypi-uri "simplegeneric" version ".zip"))
4506 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4507 (build-system python-build-system)
4509 `(("unzip" ,unzip)))
4510 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4511 (synopsis "Python module for simple generic functions")
4513 "The simplegeneric module lets you define simple single-dispatch generic
4514 functions, akin to Python’s built-in generic functions like @code{len()},
4515 @code{iter()} and so on. However, instead of using specially-named methods,
4516 these generic functions use simple lookup tables, akin to those used by
4517 e.g. @code{pickle.dump()} and other generic functions found in the Python
4519 (license license:zpl2.1)))
4521 (define-public python2-simplegeneric
4522 (package-with-python2 python-simplegeneric))
4524 (define-public python-ipython-genutils
4525 ;; TODO: This package is retired, check if can be removed, see description.
4527 (name "python-ipython-genutils")
4532 (uri (pypi-uri "ipython_genutils" version))
4534 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4535 (build-system python-build-system)
4536 (arguments `(#:tests? #f)) ; no tests
4537 (home-page "https://ipython.org")
4538 (synopsis "Vestigial utilities from IPython")
4540 "This package provides retired utilities from IPython. No packages
4541 outside IPython/Jupyter should depend on it.
4543 This package shouldn't exist. It contains some common utilities shared by
4544 Jupyter and IPython projects during The Big Split. As soon as possible, those
4545 packages will remove their dependency on this, and this package will go
4547 (license license:bsd-3)))
4549 (define-public python2-ipython-genutils
4550 (package-with-python2 python-ipython-genutils))
4552 (define-public python-traitlets
4554 (name "python-traitlets")
4559 (uri (pypi-uri "traitlets" version))
4562 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4563 (build-system python-build-system)
4566 (modify-phases %standard-phases
4567 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4569 `(("python-ipython-genutils" ,python-ipython-genutils)
4570 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4572 `(("python-pytest" ,python-pytest)))
4573 (properties `((python2-variant . ,(delay python2-traitlets))))
4574 (home-page "https://ipython.org")
4575 (synopsis "Configuration system for Python applications")
4577 "Traitlets is a framework that lets Python classes have attributes with
4578 type checking, dynamically calculated default values, and ‘on change’
4579 callbacks. The package also includes a mechanism to use traitlets for
4580 configuration, loading values from files or from command line arguments. This
4581 is a distinct layer on top of traitlets, so you can use traitlets in your code
4582 without using the configuration machinery.")
4583 (license license:bsd-3)))
4585 (define-public python2-traitlets
4586 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4590 `(("python2-enum34" ,python2-enum34)
4591 ,@(package-propagated-inputs traitlets))))))
4593 (define-public python-jupyter-core
4595 (name "python-jupyter-core")
4600 (uri (string-append (pypi-uri "jupyter_core" version)))
4603 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4604 (build-system python-build-system)
4605 ;; FIXME: not sure how to run the tests
4606 (arguments `(#:tests? #f))
4608 `(("python-traitlets" ,python-traitlets)))
4609 (home-page "http://jupyter.org/")
4610 (synopsis "Jupyter base package")
4612 "Jupyter core is the base package on which Jupyter projects rely.")
4613 (license license:bsd-3)))
4615 (define-public python2-jupyter-core
4616 (package-with-python2 python-jupyter-core))
4618 (define-public python-jupyter-client
4620 (name "python-jupyter-client")
4625 (uri (pypi-uri "jupyter_client" version))
4628 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4629 (build-system python-build-system)
4630 ;; Tests fail because of missing native python kernel which I assume is
4631 ;; provided by the ipython package, which we cannot use because it would
4632 ;; cause a dependency cycle.
4633 (arguments `(#:tests? #f))
4635 `(("python-pyzmq" ,python-pyzmq)
4636 ("python-traitlets" ,python-traitlets)
4637 ("python-jupyter-core" ,python-jupyter-core)))
4638 (home-page "http://jupyter.org/")
4639 (synopsis "Jupyter protocol implementation and client libraries")
4641 "The @code{jupyter_client} package contains the reference implementation
4642 of the Jupyter protocol. It also provides client and kernel management APIs
4643 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4644 installing @code{kernelspec}s for use with Jupyter frontends.")
4645 (license license:bsd-3)))
4647 (define-public python2-jupyter-client
4648 (package-with-python2 python-jupyter-client))
4650 (define-public python-ipykernel
4652 (name "python-ipykernel")
4657 (uri (pypi-uri "ipykernel" version))
4659 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4660 (build-system python-build-system)
4663 (modify-phases %standard-phases
4666 (setenv "HOME" "/tmp")
4667 (invoke "pytest" "-v")
4670 `(("python-ipython" ,python-ipython)
4671 ;; imported at runtime during connect
4672 ("python-jupyter-client" ,python-jupyter-client)))
4674 `(("python-pytest" ,python-pytest)
4675 ("python-nose" ,python-nose)))
4676 (home-page "https://ipython.org")
4677 (synopsis "IPython Kernel for Jupyter")
4679 "This package provides the IPython kernel for Jupyter.")
4680 (license license:bsd-3)))
4682 (define-public python2-ipykernel
4683 (package-with-python2 python-ipykernel))
4685 (define-public python-pari-jupyter
4687 (name "python-pari-jupyter")
4692 (uri (pypi-uri "pari_jupyter" version))
4695 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4696 (build-system python-build-system)
4698 `(("python-ipykernel" ,python-ipykernel)))
4700 `(("pari-gp" ,pari-gp)
4701 ("readline" ,readline)))
4703 `(#:tests? #f)) ; no test suite
4705 "https://github.com/jdemeyer/pari_jupyter")
4706 (synopsis "A Jupyter kernel for PARI/GP")
4707 (description "The package provides a PARI/GP kernel for Jupyter.")
4708 (license license:gpl3+)))
4710 ;; This is the latest release of the LTS version of ipython with support for
4711 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4712 ;; dropped support for Python 2.7. We may want to rename this package.
4713 (define-public python-ipython
4715 (name "python-ipython")
4720 (uri (pypi-uri "ipython" version ".tar.gz"))
4722 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4723 (build-system python-build-system)
4724 (outputs '("out" "doc"))
4726 `(("python-pyzmq" ,python-pyzmq)
4727 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4728 ("python-terminado" ,python-terminado)
4729 ("python-matplotlib" ,python-matplotlib)
4730 ("python-numpy" ,python-numpy)
4731 ("python-numpydoc" ,python-numpydoc)
4732 ("python-jinja2" ,python-jinja2)
4733 ("python-mistune" ,python-mistune)
4734 ("python-pexpect" ,python-pexpect)
4735 ("python-pickleshare" ,python-pickleshare)
4736 ("python-simplegeneric" ,python-simplegeneric)
4737 ("python-jsonschema" ,python-jsonschema)
4738 ("python-traitlets" ,python-traitlets)
4739 ("python-nbformat" ,python-nbformat)
4740 ("python-pygments" ,python-pygments)))
4742 `(("readline" ,readline)
4745 `(("graphviz" ,graphviz)
4746 ("pkg-config" ,pkg-config)
4747 ("python-requests" ,python-requests) ;; for tests
4748 ("python-testpath" ,python-testpath)
4749 ("python-nose" ,python-nose)
4750 ("python-sphinx" ,python-sphinx)
4751 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4752 ;; FIXME: It's possible that a smaller union would work just as well.
4753 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4755 texlive-generic-ifxetex
4756 texlive-generic-pdftex
4757 texlive-latex-amsfonts
4758 texlive-latex-capt-of
4760 texlive-latex-environ
4761 texlive-latex-eqparbox
4762 texlive-latex-etoolbox
4763 texlive-latex-expdlist
4764 texlive-latex-fancyhdr
4765 texlive-latex-fancyvrb
4766 texlive-latex-fncychap
4768 texlive-latex-framed
4769 texlive-latex-geometry
4770 texlive-latex-graphics
4771 texlive-latex-hyperref
4772 texlive-latex-mdwtools
4773 texlive-latex-multirow
4774 texlive-latex-oberdiek
4775 texlive-latex-parskip
4776 texlive-latex-preview
4777 texlive-latex-tabulary
4778 texlive-latex-threeparttable
4779 texlive-latex-titlesec
4780 texlive-latex-trimspaces
4782 texlive-latex-upquote
4784 texlive-latex-varwidth
4785 texlive-latex-wrapfig)))
4786 ("texinfo" ,texinfo)))
4789 (modify-phases %standard-phases
4790 (add-after 'install 'install-doc
4791 (lambda* (#:key inputs outputs #:allow-other-keys)
4792 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4793 (doc (string-append data "/doc/" ,name "-" ,version))
4794 (html (string-append doc "/html"))
4795 (man1 (string-append data "/man/man1"))
4796 (info (string-append data "/info"))
4797 (examples (string-append doc "/examples"))
4798 (python-arg (string-append "PYTHON=" (which "python"))))
4799 (setenv "LANG" "en_US.utf8")
4800 ;; Make installed package available for running the tests
4801 (add-installed-pythonpath inputs outputs)
4802 (with-directory-excursion "docs"
4803 ;; FIXME: pdf fails to build
4804 ;;(system* "make" "pdf" "PAPER=a4")
4805 (system* "make" python-arg "html")
4806 (system* "make" python-arg "info"))
4807 (copy-recursively "docs/man" man1)
4808 (copy-recursively "examples" examples)
4809 (copy-recursively "docs/build/html" html)
4810 ;; (copy-file "docs/build/latex/ipython.pdf"
4811 ;; (string-append doc "/ipython.pdf"))
4813 (copy-file "docs/build/texinfo/ipython.info"
4814 (string-append info "/ipython.info"))
4815 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4817 ;; Tests can only be run after the library has been installed and not
4818 ;; within the source directory.
4820 (add-after 'install 'check
4821 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4824 ;; Make installed package available for running the tests
4825 (add-installed-pythonpath inputs outputs)
4826 (setenv "HOME" "/tmp/") ;; required by a test
4827 ;; We only test the core because one of the other tests
4828 ;; tries to import ipykernel.
4829 (invoke "python" "IPython/testing/iptest.py"
4830 "-v" "IPython/core/tests"))
4832 (add-before 'check 'fix-tests
4833 (lambda* (#:key inputs #:allow-other-keys)
4834 (substitute* "./IPython/utils/_process_posix.py"
4835 (("/usr/bin/env', 'which") (which "which")))
4836 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4837 (("#!/usr/bin/env python")
4838 (string-append "#!" (which "python"))))
4839 ;; Disable 1 failing test
4840 (substitute* "./IPython/core/tests/test_magic.py"
4841 (("def test_dirops\\(\\):" all)
4842 (string-append "@dec.skipif(True)\n" all)))
4843 ;; This test introduces a circular dependency on ipykernel
4844 ;; (which depends on ipython).
4845 (delete-file "IPython/core/tests/test_display.py")
4846 ;; These tests throw errors for unknown reasons.
4847 (delete-file "IPython/extensions/tests/test_storemagic.py")
4848 (delete-file "IPython/core/tests/test_displayhook.py")
4849 (delete-file "IPython/core/tests/test_interactiveshell.py")
4850 (delete-file "IPython/core/tests/test_pylabtools.py")
4851 (delete-file "IPython/core/tests/test_paths.py")
4853 (home-page "https://ipython.org")
4854 (synopsis "IPython is a tool for interactive computing in Python")
4856 "IPython provides a rich architecture for interactive computing with:
4857 Powerful interactive shells, a browser-based notebook, support for interactive
4858 data visualization, embeddable interpreters and tools for parallel
4860 (license license:bsd-3)
4861 (properties `((python2-variant . ,(delay python2-ipython))))))
4863 (define-public python2-ipython
4864 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4867 ;; FIXME: add pyreadline once available.
4869 `(("python2-backports-shutil-get-terminal-size"
4870 ,python2-backports-shutil-get-terminal-size)
4871 ("python2-pathlib2" ,python2-pathlib2)
4872 ,@(package-propagated-inputs ipython)))
4874 `(("python2-mock" ,python2-mock)
4875 ,@(package-native-inputs ipython))))))
4877 (define-public python-urwid
4879 (name "python-urwid")
4884 (uri (pypi-uri "urwid" version))
4887 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4888 (build-system python-build-system)
4889 (home-page "http://urwid.org")
4890 (synopsis "Console user interface library for Python")
4892 "Urwid is a curses-based UI/widget library for Python. It includes many
4893 features useful for text console applications.")
4894 (license license:lgpl2.1+)))
4896 (define-public python2-urwid
4897 (package-with-python2 python-urwid))
4899 (define-public python-urwidtrees
4901 (name "python-urwidtrees")
4906 ;; package author intends on distributing via github rather than pypi:
4907 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4908 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4910 (file-name (string-append name "-" version ".tar.gz"))
4913 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4914 (build-system python-build-system)
4916 '(#:tests? #f)) ; no tests
4917 (propagated-inputs `(("python-urwid" ,python-urwid)))
4918 (home-page "https://github.com/pazz/urwidtrees")
4919 (synopsis "Tree widgets for urwid")
4920 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4921 toolkit. Use it to build trees of widgets.")
4922 (license license:gpl3+)))
4924 (define-public python2-urwidtrees
4925 (package-with-python2 python-urwidtrees))
4927 (define-public python-ua-parser
4929 (name "python-ua-parser")
4934 (uri (pypi-uri "ua-parser" version))
4937 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4938 (build-system python-build-system)
4940 `(#:tests? #f)) ;no test suite in release
4942 `(("python-pyyaml" ,python-pyyaml)))
4943 (home-page "https://github.com/ua-parser/uap-python")
4944 (synopsis "User agent parser")
4946 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4947 (license license:asl2.0)))
4949 (define-public python2-ua-parser
4950 (package-with-python2 python-ua-parser))
4952 (define-public python-user-agents
4954 (name "python-user-agents")
4959 (uri (pypi-uri "user-agents" version))
4962 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4963 (build-system python-build-system)
4965 `(#:tests? #f)) ;missing devices.json test file in release
4967 `(("python-ua-parser" ,python-ua-parser)))
4968 (home-page "https://github.com/selwin/python-user-agents")
4969 (synopsis "User Agent strings parsing library")
4971 "A library to identify devices (phones, tablets) and their capabilities by
4972 parsing (browser/HTTP) user agent strings.")
4973 (license license:expat)))
4975 (define-public python2-user-agents
4976 (package-with-python2 python-user-agents))
4978 (define-public python-dbus
4980 (name "python-dbus")
4985 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4986 "dbus-python-" version ".tar.gz"))
4989 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4990 (build-system gnu-build-system)
4993 (modify-phases %standard-phases
4997 ;; XXX: For the missing '/etc/machine-id'.
4998 (substitute* "test/run-test.sh"
4999 (("DBUS_FATAL_WARNINGS=1")
5000 "DBUS_FATAL_WARNINGS=0"))
5003 `(("pkg-config" ,pkg-config)))
5005 `(("python" ,python-wrapper)
5006 ("dbus-glib" ,dbus-glib)))
5007 (synopsis "Python bindings for D-bus")
5008 (description "python-dbus provides bindings for libdbus, the reference
5009 implementation of D-Bus.")
5010 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5011 (license license:expat)))
5013 (define-public python2-dbus
5014 (package (inherit python-dbus)
5015 (name "python2-dbus")
5016 (inputs `(("python" ,python-2)
5017 ,@(alist-delete "python"
5018 (package-inputs python-dbus)
5020 ;; FIXME: on Python 2, the test_utf8 fails with:
5021 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5022 (arguments `(#:tests? #f))))
5024 (define-public python-lxml
5026 (name "python-lxml")
5031 (uri (pypi-uri "lxml" version))
5034 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5035 (build-system python-build-system)
5037 `(("libxml2" ,libxml2)
5038 ("libxslt" ,libxslt)))
5039 (home-page "http://lxml.de/")
5041 "Python XML processing library")
5043 "The lxml XML toolkit is a Pythonic binding for the C libraries
5044 libxml2 and libxslt.")
5045 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5047 (define-public python2-lxml
5048 (package-with-python2 python-lxml))
5050 ;; beautifulsoup4 has a totally different namespace than 3.x,
5051 ;; and pypi seems to put it under its own name, so I guess we should too
5052 (define-public python-beautifulsoup4
5054 (name "python-beautifulsoup4")
5059 (uri (pypi-uri "beautifulsoup4" version))
5062 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5063 (build-system python-build-system)
5066 (modify-phases %standard-phases
5067 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5068 ;; must use this conversion script when building with Python 3. The
5069 ;; conversion script also runs the tests.
5070 ;; For more information, see the file 'convert-py3k' in the source
5073 (lambda _ (invoke "./convert-py3k"))))))
5075 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5077 "Python screen-scraping library")
5079 "Beautiful Soup is a Python library designed for rapidly setting up
5080 screen-scraping projects. It offers Pythonic idioms for navigating,
5081 searching, and modifying a parse tree, providing a toolkit for
5082 dissecting a document and extracting what you need. It automatically
5083 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5084 (license license:expat)
5085 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5087 (define-public python2-beautifulsoup4
5089 (inherit (package-with-python2
5090 (strip-python2-variant python-beautifulsoup4)))
5091 (arguments `(#:python ,python-2))))
5093 (define-public python-netifaces
5095 (name "python-netifaces")
5100 (uri (pypi-uri "netifaces" version))
5103 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5104 (build-system python-build-system)
5105 (home-page "https://github.com/al45tair/netifaces")
5107 "Python module for portable network interface information")
5109 "Netifaces is a Python module providing information on network
5110 interfaces in an easy and portable manner.")
5111 (license license:expat)))
5113 (define-public python2-netifaces
5114 (package-with-python2 python-netifaces))
5116 (define-public python-networkx
5118 (name "python-networkx")
5123 (uri (pypi-uri "networkx" version ".zip"))
5125 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5126 (build-system python-build-system)
5127 ;; python-decorator is needed at runtime.
5129 `(("python-decorator" ,python-decorator)))
5131 `(("python-nose" ,python-nose)
5133 (home-page "https://networkx.github.io/")
5134 (synopsis "Python module for creating and manipulating graphs and networks")
5136 "NetworkX is a Python package for the creation, manipulation, and study
5137 of the structure, dynamics, and functions of complex networks.")
5138 (license license:bsd-3)))
5140 (define-public python2-networkx
5141 (package-with-python2 python-networkx))
5143 (define-public python-datrie
5145 (name "python-datrie")
5150 (uri (pypi-uri "datrie" version))
5153 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5154 (build-system python-build-system)
5156 `(#:phases (modify-phases %standard-phases
5157 (add-before 'build 'cythonize
5159 ;; Regenerate Cython classes to solve ABI issues with Python
5160 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5161 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5162 "src/stdio_ext.pxd" "-a"))))))
5164 `(("python-cython" ,python-cython)
5165 ("python-hypothesis" ,python-hypothesis)
5166 ("python-pytest" ,python-pytest)
5167 ("python-pytest-runner" ,python-pytest-runner)))
5168 (home-page "https://github.com/kmike/datrie")
5169 (synopsis "Fast, efficiently stored trie for Python")
5171 "This package provides a fast, efficiently stored trie implementation for
5173 (license license:lgpl2.1+)))
5175 (define-public snakemake
5182 (uri (pypi-uri "snakemake" version))
5184 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5185 (build-system python-build-system)
5187 ;; TODO: Package missing test dependencies.
5190 (modify-phases %standard-phases
5191 ;; For cluster execution Snakemake will call Python. Since there is
5192 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5193 ;; this by calling the snakemake wrapper instead.
5194 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5195 (lambda* (#:key outputs #:allow-other-keys)
5196 (substitute* "snakemake/executors.py"
5197 (("\\{sys.executable\\} -m snakemake")
5198 (string-append (assoc-ref outputs "out")
5202 `(("python-gitpython" ,python-gitpython)
5203 ("python-wrapt" ,python-wrapt)
5204 ("python-requests" ,python-requests)
5205 ("python-appdirs" ,python-appdirs)
5206 ("python-configargparse" ,python-configargparse)
5207 ("python-datrie" ,python-datrie)
5208 ("python-docutils" ,python-docutils)
5209 ("python-jinja2" ,python-jinja2)
5210 ("python-jsonschema" ,python-jsonschema)
5211 ("python-networkx" ,python-networkx)
5212 ("python-pyyaml" ,python-pyyaml)
5213 ("python-ratelimiter" ,python-ratelimiter)))
5214 (home-page "https://snakemake.readthedocs.io")
5215 (synopsis "Python-based execution environment for make-like workflows")
5217 "Snakemake aims to reduce the complexity of creating workflows by
5218 providing a clean and modern domain specific specification language (DSL) in
5219 Python style, together with a fast and comfortable execution environment.")
5220 (license license:expat)))
5222 ;; This is currently needed for the pigx-* packages.
5223 (define-public snakemake-4
5224 (package (inherit snakemake)
5229 (uri (pypi-uri "snakemake" version))
5231 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5233 `(("python-wrapt" ,python-wrapt)
5234 ("python-requests" ,python-requests)
5235 ("python-appdirs" ,python-appdirs)
5236 ("python-configargparse" ,python-configargparse)
5237 ("python-pyyaml" ,python-pyyaml)
5238 ("python-ratelimiter" ,python-ratelimiter)))))
5240 (define-public python-pyqrcode
5242 (name "python-pyqrcode")
5247 (uri (pypi-uri "PyQRCode" version))
5250 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5251 (build-system python-build-system)
5253 "https://github.com/mnooner256/pyqrcode")
5254 (synopsis "QR code generator")
5256 "Pyqrcode is a QR code generator written purely in Python with
5257 SVG, EPS, PNG and terminal output.")
5258 (license license:bsd-3)))
5260 (define-public python-seaborn
5262 (name "python-seaborn")
5267 (uri (pypi-uri "seaborn" version))
5269 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5270 (build-system python-build-system)
5273 (modify-phases %standard-phases
5274 (add-before 'check 'start-xserver
5275 (lambda* (#:key inputs #:allow-other-keys)
5276 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5277 ;; There must be a running X server and make check doesn't
5278 ;; start one. Therefore we must do it.
5279 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5280 (setenv "DISPLAY" ":1")
5282 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5284 `(("python-pandas" ,python-pandas)
5285 ("python-matplotlib" ,python-matplotlib)
5286 ("python-numpy" ,python-numpy)
5287 ("python-scipy" ,python-scipy)))
5289 `(("python-pytest" ,python-pytest)
5290 ("xorg-server" ,xorg-server)))
5291 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5292 (synopsis "Statistical data visualization")
5294 "Seaborn is a library for making attractive and informative statistical
5295 graphics in Python. It is built on top of matplotlib and tightly integrated
5296 with the PyData stack, including support for numpy and pandas data structures
5297 and statistical routines from scipy and statsmodels.")
5298 (license license:bsd-3)))
5300 (define-public python2-seaborn
5301 (package-with-python2 python-seaborn))
5303 (define-public python-mpmath
5305 (name "python-mpmath")
5309 (uri (string-append "http://mpmath.org/files/mpmath-"
5313 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5314 (build-system python-build-system)
5317 (modify-phases %standard-phases
5320 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5321 (home-page "http://mpmath.org")
5322 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5324 "@code{mpmath} can be used as an arbitrary-precision substitute for
5325 Python's float/complex types and math/cmath modules, but also does much
5326 more advanced mathematics.")
5327 (license license:bsd-3)))
5329 (define-public python2-mpmath
5330 (package-with-python2 python-mpmath))
5332 (define-public python-bigfloat
5334 (name "python-bigfloat")
5339 (uri (pypi-uri "bigfloat" version))
5341 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5342 (build-system python-build-system)
5345 (home-page "https://github.com/mdickinson/bigfloat")
5346 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5348 "This packages provides a Python interface to the MPFR library for
5349 multiprecision arithmetic.")
5350 (license license:lgpl3+)))
5352 (define-public python2-bigfloat
5353 (package-with-python2 python-bigfloat))
5355 (define-public python-sympy
5357 (name "python-sympy")
5363 "https://github.com/sympy/sympy/releases/download/sympy-"
5364 version "/sympy-" version ".tar.gz"))
5366 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5367 (build-system python-build-system)
5370 (modify-phases %standard-phases
5371 ;; Run the core tests after installation. By default it would run
5372 ;; *all* tests, which take a very long time to complete and are known
5375 (add-after 'install 'check
5376 (lambda* (#:key outputs #:allow-other-keys)
5377 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5380 `(("python-mpmath" ,python-mpmath)))
5381 (home-page "http://www.sympy.org/")
5382 (synopsis "Python library for symbolic mathematics")
5384 "SymPy is a Python library for symbolic mathematics. It aims to become a
5385 full-featured computer algebra system (CAS) while keeping the code as simple
5386 as possible in order to be comprehensible and easily extensible.")
5387 (license license:bsd-3)))
5389 (define-public python2-sympy
5391 (inherit (package-with-python2 python-sympy))
5394 (modify-phases %standard-phases
5395 ;; Run the core tests after installation. By default it would run
5396 ;; *all* tests, which take a very long time to complete and are known
5399 (add-after 'install 'check
5400 (lambda* (#:key outputs #:allow-other-keys)
5401 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5404 (define-public python-q
5411 (uri (pypi-uri "q" version))
5414 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5415 (build-system python-build-system)
5416 (home-page "https://github.com/zestyping/q")
5417 (synopsis "Quick-and-dirty debugging output for tired programmers")
5419 "q is a Python module for \"print\" style of debugging Python code. It
5420 provides convenient short API for print out of values, tracebacks, and
5421 falling into the Python interpreter.")
5422 (license license:asl2.0)))
5424 (define-public python2-q
5425 (package-with-python2 python-q))
5427 (define-public python2-xlib
5429 (name "python2-xlib")
5433 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5435 "python-xlib-" version ".tar.gz"))
5438 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5439 (build-system python-build-system)
5441 `(#:python ,python-2 ;Python 2 only
5442 #:tests? #f)) ;no tests
5443 (home-page "http://python-xlib.sourceforge.net/")
5444 (synopsis "Python X11 client library")
5446 "The Python X Library is intended to be a fully functional X client
5447 library for Python programs. It is useful to implement low-level X clients.
5448 It is written entirely in Python.")
5449 (license license:gpl2+)))
5451 (define-public python-singledispatch
5453 (name "python-singledispatch")
5458 (uri (pypi-uri "singledispatch" version))
5461 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5462 (build-system python-build-system)
5464 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5466 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5467 (synopsis "Backport of singledispatch feature from Python 3.4")
5469 "This library brings functools.singledispatch from Python 3.4 to Python
5471 (license license:expat)))
5473 (define-public python2-singledispatch
5474 (package-with-python2 python-singledispatch))
5476 ;; the python- version can be removed with python-3.5
5477 (define-public python-backports-abc
5479 (name "python-backports-abc")
5484 (uri (pypi-uri "backports_abc" version))
5487 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5488 (build-system python-build-system)
5489 (home-page "https://github.com/cython/backports_abc")
5490 (synopsis "Backport of additions to the 'collections.abc' module")
5492 "Python-backports-abc provides a backport of additions to the
5493 'collections.abc' module in Python-3.5.")
5494 (license license:psfl)))
5496 (define-public python2-backports-abc
5497 (package-with-python2 python-backports-abc))
5499 (define-public python-backports-csv
5501 (name "python-backports-csv")
5506 (uri (pypi-uri "backports.csv" version))
5509 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5510 (build-system python-build-system)
5511 (home-page "https://github.com/ryanhiebert/backports.csv")
5512 (synopsis "Backport of Python 3's csv module for Python 2")
5514 "Provides a backport of Python 3's @code{csv} module for parsing
5515 comma separated values. The API of the @code{csv} module in Python 2
5516 is drastically different from the @code{csv} module in Python 3.
5517 This is due, for the most part, to the difference between str in
5518 Python 2 and Python 3.")
5519 (license license:psfl)))
5521 (define-public python2-backports-csv
5522 (package-with-python2 python-backports-csv))
5524 (define-public python2-backports-shutil-get-terminal-size
5526 (name "python2-backports-shutil-get-terminal-size")
5531 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5534 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5535 (build-system python-build-system)
5537 `(#:python ,python-2
5539 (modify-phases %standard-phases
5542 (invoke "py.test" "-v"))))))
5544 `(("python2-pytest" ,python2-pytest)))
5545 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5546 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5548 "This package provides a backport of the @code{get_terminal_size
5549 function} from Python 3.3's @code{shutil}.
5550 Unlike the original version it is written in pure Python rather than C,
5551 so it might be a tiny bit slower.")
5552 (license license:expat)))
5554 (define-public python-waf
5560 (uri (string-append "https://waf.io/"
5561 "waf-" version ".tar.bz2"))
5564 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5565 (build-system python-build-system)
5568 (modify-phases %standard-phases
5571 (invoke "python" "waf-light" "configure" "build")))
5574 (invoke "python" "waf" "--version")))
5576 (lambda* (#:key outputs #:allow-other-keys)
5577 (let ((out (assoc-ref outputs "out")))
5578 (install-file "waf" (string-append out "/bin")))
5580 ;; waf breaks when it is wrapped.
5582 (home-page "https://waf.io/")
5583 (synopsis "Python-based build system")
5585 "Waf is a Python-based framework for configuring, compiling and installing
5587 (license license:bsd-3)))
5589 (define-public python2-waf
5590 (package-with-python2 python-waf))
5592 (define-public python-pyzmq
5594 (name "python-pyzmq")
5599 (uri (pypi-uri "pyzmq" version))
5601 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5602 (build-system python-build-system)
5605 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5606 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5607 ;; --inplace' for 'python setup.py test' to work.
5610 `(("zeromq" ,zeromq)))
5612 `(("pkg-config" ,pkg-config)
5613 ("python-nose" ,python-nose)))
5614 (home-page "https://github.com/zeromq/pyzmq")
5615 (synopsis "Python bindings for 0MQ")
5617 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5618 (license license:bsd-4)))
5620 (define-public python2-pyzmq
5621 (package-with-python2 python-pyzmq))
5623 (define-public python-pep8
5624 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5625 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5626 ;; some dependents' test suites, and nothing more.
5628 (name "python-pep8")
5633 (uri (pypi-uri "pep8" version))
5636 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5637 (build-system python-build-system)
5638 (home-page "https://pep8.readthedocs.org/")
5639 (synopsis "Python style guide checker")
5641 "This tools checks Python code against some of the style conventions in
5643 (license license:expat)))
5645 (define-public python2-pep8
5646 (package-with-python2 python-pep8))
5648 (define-public python-pyflakes
5650 (name "python-pyflakes")
5655 (uri (pypi-uri "pyflakes" version))
5658 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5659 (build-system python-build-system)
5661 "https://github.com/pyflakes/pyflakes")
5662 (synopsis "Passive checker of Python programs")
5664 "Pyflakes statically checks Python source code for common errors.")
5665 (license license:expat)))
5667 (define-public python2-pyflakes
5668 (package-with-python2 python-pyflakes))
5670 (define-public python-mccabe
5672 (name "python-mccabe")
5677 (uri (pypi-uri "mccabe" version))
5680 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5681 (build-system python-build-system)
5683 `(("python-pytest" ,python-pytest-bootstrap)
5684 ("python-pytest-runner" ,python-pytest-runner)))
5685 (home-page "https://github.com/flintwork/mccabe")
5686 (synopsis "McCabe checker, plugin for flake8")
5688 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5689 complexity of Python source code.")
5690 (license license:expat)))
5692 (define-public python2-mccabe
5693 (package-with-python2 python-mccabe))
5695 (define-public python-mccabe-0.2.1
5696 (package (inherit python-mccabe)
5701 (uri (pypi-uri "mccabe" version))
5704 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5706 (define-public python2-mccabe-0.2.1
5707 (package-with-python2 python-mccabe-0.2.1))
5709 ;; Flake8 2.4.1 requires an older version of pep8.
5710 ;; This should be removed ASAP.
5711 (define-public python-pep8-1.5.7
5712 (package (inherit python-pep8)
5717 (uri (pypi-uri "pep8" version))
5720 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5722 ;; XXX Tests not compatible with Python 3.5.
5725 (define-public python2-pep8-1.5.7
5726 (package-with-python2 python-pep8-1.5.7))
5728 ;; Flake8 2.4.1 requires an older version of pyflakes.
5729 ;; This should be removed ASAP.
5730 (define-public python-pyflakes-0.8.1
5731 (package (inherit python-pyflakes)
5736 (uri (pypi-uri "pyflakes" version))
5739 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5741 ;; XXX Tests not compatible with Python 3.5.
5744 (define-public python2-pyflakes-0.8.1
5745 (package-with-python2 python-pyflakes-0.8.1))
5747 ;; This package is used by hypothesis which has thousands of dependent packages.
5748 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5749 (define-public python-flake8-3.5
5751 (name "python-flake8")
5756 (uri (pypi-uri "flake8" version))
5759 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5760 (build-system python-build-system)
5763 (modify-phases %standard-phases
5764 ;; Two errors don't seem to have assigned codes.
5765 (add-after 'unpack 'delete-broken-test
5766 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5767 (add-after 'unpack 'fix-problem-with-pycodestyle
5769 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5770 ;; This should no longer be needed with the next release.
5771 (substitute* "setup.py"
5772 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5773 "PEP8_PLUGIN('break_after_binary_operator'),\
5774 PEP8_PLUGIN('break_before_binary_operator'),"))
5777 (add-after 'install 'check
5778 (lambda* (#:key inputs outputs #:allow-other-keys)
5779 (add-installed-pythonpath inputs outputs)
5780 (invoke "pytest" "-v")
5783 `(("python-pycodestyle" ,python-pycodestyle)
5784 ("python-pyflakes" ,python-pyflakes)
5785 ("python-mccabe" ,python-mccabe)))
5787 `(("python-mock" ,python-mock)
5788 ("python-pytest" ,python-pytest-bootstrap)
5789 ("python-pytest-runner" ,python-pytest-runner)))
5790 (home-page "https://gitlab.com/pycqa/flake8")
5792 "The modular source code checker: pep8, pyflakes and co")
5794 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5795 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5796 (license license:expat)))
5798 (define-public python2-flake8-3.5
5799 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5800 (package (inherit base)
5802 `(("python2-configparser" ,python2-configparser)
5803 ("python2-enum34" ,python2-enum34)
5804 ,@(package-propagated-inputs base))))))
5806 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5807 ;; this newer version. Keep it as a separate variable for now to avoid
5808 ;; rebuilding "python-hypothesis"; this should be removed in the next
5810 (define-public python-flake8
5812 (inherit python-flake8-3.5)
5816 (uri (pypi-uri "flake8" version))
5819 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5821 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5823 `(modify-phases ,phases
5824 (delete 'delete-broken-test)
5825 (delete 'fix-problem-with-pycodestyle)))))
5826 (properties `((python2-variant . ,(delay python2-flake8))))))
5828 (define-public python2-flake8
5829 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5830 (package (inherit base)
5832 (package-propagated-inputs python2-flake8-3.5)))))
5834 ;; python-hacking requires flake8 <2.6.0.
5835 (define-public python-flake8-2.5
5837 (inherit python-flake8)
5841 (uri (pypi-uri "flake8" version))
5844 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5846 `(("python-pep8" ,python-pep8)
5847 ,@(package-propagated-inputs python-flake8)))
5848 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5850 (define-public python2-flake8-2.5
5852 (inherit python2-flake8)
5853 (version (package-version python-flake8-2.5))
5855 (inherit (package-source python-flake8-2.5))))
5857 `(("python2-pep8" ,python2-pep8)
5858 ,@(package-propagated-inputs python2-flake8)))))
5860 (define-public python-flake8-polyfill
5862 (name "python-flake8-polyfill")
5867 (uri (pypi-uri "flake8-polyfill" version))
5870 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5871 (build-system python-build-system)
5874 (modify-phases %standard-phases
5877 (setenv "PYTHONPATH"
5878 (string-append (getcwd) "/build/lib:"
5879 (getenv "PYTHONPATH")))
5880 (invoke "py.test" "-v"))))))
5882 `(("python-flake8" ,python-flake8)
5883 ("python-mock" ,python-mock)
5884 ("python-pep8" ,python-pep8)
5885 ("python-pycodestyle" ,python-pycodestyle)
5886 ("python-pytest" ,python-pytest)))
5887 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5888 (synopsis "Polyfill package for Flake8 plugins")
5890 "This package that provides some compatibility helpers for Flake8
5891 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5892 (license license:expat)))
5894 (define-public python2-flake8-polyfill
5895 (package-with-python2 python-flake8-polyfill))
5897 (define-public python-mistune
5899 (name "python-mistune")
5904 (uri (pypi-uri "mistune" version))
5907 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5908 (build-system python-build-system)
5910 `(("python-nose" ,python-nose)
5911 ("python-cython" ,python-cython)))
5912 (home-page "https://github.com/lepture/mistune")
5913 (synopsis "Markdown parser in pure Python")
5914 (description "This package provides a fast markdown parser in pure
5916 (license license:bsd-3)))
5918 (define-public python2-mistune
5919 (package-with-python2 python-mistune))
5921 (define-public python-markdown
5923 (name "python-markdown")
5928 (uri (pypi-uri "Markdown" version))
5931 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5932 (build-system python-build-system)
5934 `(("python-nose" ,python-nose)
5935 ("python-pyyaml" ,python-pyyaml)))
5936 (home-page "https://python-markdown.github.io/")
5937 (synopsis "Python implementation of Markdown")
5939 "This package provides a Python implementation of John Gruber's
5940 Markdown. The library features international input, various Markdown
5941 extensions, and several HTML output formats. A command line wrapper
5942 markdown_py is also provided to convert Markdown files to HTML.")
5943 (license license:bsd-3)))
5945 (define-public python2-markdown
5946 (package-with-python2 python-markdown))
5948 (define-public python-ptyprocess
5950 (name "python-ptyprocess")
5955 (uri (pypi-uri "ptyprocess" version))
5958 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5959 (build-system python-build-system)
5961 `(("python-nose" ,python-nose)))
5964 (modify-phases %standard-phases
5966 (lambda _ (invoke "nosetests"))))))
5967 (home-page "https://github.com/pexpect/ptyprocess")
5968 (synopsis "Run a subprocess in a pseudo terminal")
5970 "This package provides a Python library used to launch a subprocess in a
5971 pseudo terminal (pty), and interact with both the process and its pty.")
5972 (license license:isc)))
5974 (define-public python2-ptyprocess
5975 (package-with-python2 python-ptyprocess))
5977 (define-public python-cram
5979 (name "python-cram")
5981 (home-page "https://bitheap.org/cram/")
5984 (uri (list (string-append home-page "cram-"
5986 (pypi-uri "cram" version)))
5989 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5992 (modify-phases %standard-phases
5993 (add-after 'unpack 'patch-source
5995 (substitute* (find-files "cram" ".*\\.py$")
5996 ;; Replace default shell path.
5997 (("/bin/sh") (which "sh")))
5998 (substitute* (find-files "tests" ".*\\.t$")
6000 (("/bin/bash") (which "bash"))
6001 (("/bin/sh") (which "sh")))
6002 (substitute* "cram/_test.py"
6003 ;; This hack works around a bug triggered by substituting
6004 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6005 ;; "cram -h", which breaks the output at 80 characters. This
6006 ;; causes the line showing the default shell to break into two
6007 ;; lines, but the test expects a single line...
6008 (("env\\['COLUMNS'\\] = '80'")
6009 "env['COLUMNS'] = '160'"))
6012 (add-after 'install 'check
6013 ;; The test phase uses the built library and executable.
6014 ;; It's easier to run it after install since the build
6015 ;; directory contains version-specific PATH.
6016 (lambda* (#:key inputs outputs #:allow-other-keys)
6017 (add-installed-pythonpath inputs outputs)
6018 (setenv "PATH" (string-append (getenv "PATH") ":"
6019 (assoc-ref outputs "out") "/bin"))
6020 (invoke "make" "test"))))))
6021 (build-system python-build-system)
6023 `(("python-coverage" ,python-coverage)
6025 (synopsis "Simple testing framework for command line applications")
6027 "Cram is a functional testing framework for command line applications.
6028 Cram tests look like snippets of interactive shell sessions. Cram runs each
6029 command and compares the command output in the test with the command’s actual
6031 (license license:gpl2+)))
6033 (define-public python2-cram
6034 (package-with-python2 python-cram))
6036 (define-public python-straight-plugin
6038 (name "python-straight-plugin")
6043 (uri (pypi-uri "straight.plugin" version))
6046 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6047 (build-system python-build-system)
6048 (home-page "https://github.com/ironfroggy/straight.plugin")
6049 (synopsis "Simple namespaced plugin facility")
6050 (description "Straight Plugin provides a type of plugin you can create from
6051 almost any existing Python modules, and an easy way for outside developers to
6052 add functionality and customization to your projects with their own plugins.")
6053 (license license:expat)))
6055 (define-public python2-straight-plugin
6056 (package-with-python2 python-straight-plugin))
6058 (define-public python-fonttools
6060 (name "python-fonttools")
6064 (uri (pypi-uri "fonttools" version ".zip"))
6067 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6068 (build-system python-build-system)
6071 ("python-pytest" ,python-pytest)
6072 ("python-pytest-runner" ,python-pytest-runner)))
6073 (home-page "https://github.com/behdad/fonttools")
6074 (synopsis "Tools to manipulate font files")
6076 "FontTools/TTX is a library to manipulate font files from Python. It
6077 supports reading and writing of TrueType/OpenType fonts, reading and writing
6078 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6079 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6080 from an XML-based format.")
6081 (license license:expat)))
6083 (define-public python2-fonttools
6084 (package-with-python2 python-fonttools))
6086 (define-public python-ly
6093 (uri (pypi-uri name version))
6096 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6097 (build-system python-build-system)
6099 ;; FIXME: Some tests need network access.
6101 (synopsis "Tool and library for manipulating LilyPond files")
6102 (description "This package provides a Python library to parse, manipulate
6103 or create documents in LilyPond format. A command line program ly is also
6104 provided that can be used to do various manipulations with LilyPond files.")
6105 (home-page "https://pypi.python.org/pypi/python-ly")
6106 (license license:gpl2+)))
6108 (define-public python-appdirs
6110 (name "python-appdirs")
6115 (uri (pypi-uri "appdirs" version))
6118 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6119 (build-system python-build-system)
6120 (home-page "https://github.com/ActiveState/appdirs")
6122 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6124 "This module provides a portable way of finding out where user data
6125 should be stored on various operating systems.")
6126 (license license:expat)))
6128 (define-public python2-appdirs
6129 (package-with-python2 python-appdirs))
6131 (define-public python-llfuse
6133 (name "python-llfuse")
6137 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6140 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6141 (build-system python-build-system)
6146 `(("pkg-config" ,pkg-config)))
6147 (synopsis "Python bindings for FUSE")
6149 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6150 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6151 (license license:lgpl2.0+)
6152 (properties `((python2-variant . ,(delay python2-llfuse))))))
6154 (define-public python2-llfuse
6155 (package (inherit (package-with-python2
6156 (strip-python2-variant python-llfuse)))
6157 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6160 (define-public python-llfuse-0.41
6161 (package (inherit python-llfuse)
6166 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6167 "llfuse-" version ".tar.bz2"))
6170 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6171 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6172 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6173 (license (list license:expat license:lgpl2.0+))))
6175 (define-public python-msgpack
6177 (name "python-msgpack")
6181 (uri (pypi-uri "msgpack" version))
6184 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6185 (build-system python-build-system)
6187 `(#:modules ((guix build utils)
6188 (guix build python-build-system)
6193 (modify-phases %standard-phases
6196 (let ((cwd (getcwd)))
6197 (setenv "PYTHONPATH"
6198 (string-append cwd "/build/"
6199 (find (cut string-prefix? "lib" <>)
6200 (scandir (string-append cwd "/build")))
6202 (getenv "PYTHONPATH")))
6203 (invoke "pytest" "-v" "test")))))))
6205 `(("python-pytest" ,python-pytest)))
6206 (synopsis "MessagePack (de)serializer")
6207 (description "MessagePack is a fast, compact binary serialization format,
6208 suitable for similar data to JSON. This package provides CPython bindings for
6209 reading and writing MessagePack data.")
6210 (home-page "https://pypi.python.org/pypi/msgpack/")
6211 (license license:asl2.0)))
6213 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6214 ;; release 0.5. Some packages like borg still call it by the old name for now.
6215 ;; <https://bugs.gnu.org/30662>
6216 (define-public python-msgpack-transitional
6218 (inherit python-msgpack)
6219 (name "python-msgpack-transitional")
6221 (substitute-keyword-arguments (package-arguments python-msgpack)
6223 `(modify-phases ,phases
6224 (add-after 'unpack 'configure-transitional
6226 ;; Keep using the old name.
6227 (substitute* "setup.py"
6228 (("TRANSITIONAL = False")
6229 "TRANSITIONAL = 1"))
6232 (define-public python2-msgpack
6233 (package-with-python2 python-msgpack))
6235 (define-public python-netaddr
6237 (name "python-netaddr")
6242 (uri (pypi-uri "netaddr" version))
6245 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6246 (build-system python-build-system)
6247 (arguments `(#:tests? #f)) ;; No tests.
6248 (home-page "https://github.com/drkjam/netaddr/")
6249 (synopsis "Pythonic manipulation of network addresses")
6251 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6252 and MAC network addresses.")
6253 (license license:bsd-3)))
6255 (define-public python2-netaddr
6256 (package-with-python2 python-netaddr))
6258 (define-public python-wrapt
6260 (name "python-wrapt")
6265 (uri (pypi-uri "wrapt" version))
6268 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6269 (build-system python-build-system)
6271 ;; Tests are not included in the tarball, they are only available in the
6274 (home-page "https://github.com/GrahamDumpleton/wrapt")
6275 (synopsis "Module for decorators, wrappers and monkey patching")
6277 "The aim of the wrapt module is to provide a transparent object proxy for
6278 Python, which can be used as the basis for the construction of function
6279 wrappers and decorator functions.")
6280 (license license:bsd-2)))
6282 (define-public python2-wrapt
6283 (package-with-python2 python-wrapt))
6285 (define-public python-xlrd
6287 (name "python-xlrd")
6291 (uri (pypi-uri "xlrd" version))
6294 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6295 (build-system python-build-system)
6298 (modify-phases %standard-phases
6299 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6300 ;; run tests instead for now.
6301 (replace 'check (lambda _ (invoke "nosetests"))))))
6302 (native-inputs `(("python-nose" ,python-nose)))
6303 (home-page "http://www.python-excel.org/")
6304 (synopsis "Library for extracting data from Excel files")
6305 (description "This packages provides a library to extract data from
6306 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6307 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6308 Unicode-aware. It is not intended as an end-user tool.")
6309 (license license:bsd-3)))
6311 (define-public python2-xlrd
6312 (package-with-python2 python-xlrd))
6314 (define-public python-prettytable
6316 (name "python-prettytable")
6321 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6324 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6325 (build-system python-build-system)
6326 (home-page "http://code.google.com/p/prettytable/")
6327 (synopsis "Display tabular data in an ASCII table format")
6329 "A library designed to represent tabular data in visually appealing ASCII
6330 tables. PrettyTable allows for selection of which columns are to be printed,
6331 independent alignment of columns (left or right justified or centred) and
6332 printing of sub-tables by specifying a row range.")
6333 (license license:bsd-3)))
6335 (define-public python2-prettytable
6336 (package-with-python2 python-prettytable))
6338 (define-public python-tables
6340 (name "python-tables")
6345 (uri (pypi-uri "tables" version))
6348 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6349 (modules '((guix build utils)))
6352 ;; Remove pre-compiled .pyc files from source.
6353 (for-each delete-file-recursively
6354 (find-files "." "__pycache__" #:directories? #t))
6355 (for-each delete-file (find-files "." "\\.pyc$"))
6357 (build-system python-build-system)
6359 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6360 ;; or "check", so we must override the build and check phases.
6362 (modify-phases %standard-phases
6363 (add-after 'unpack 'use-gcc
6365 (substitute* "setup.py"
6366 (("compiler = new_compiler\\(\\)" line)
6368 "\ncompiler.set_executables(compiler='gcc',"
6369 "compiler_so='gcc',"
6371 "linker_so='gcc -shared')")))
6374 (lambda* (#:key inputs #:allow-other-keys)
6375 (invoke "python" "setup.py" "build"
6376 (string-append "--hdf5="
6377 (assoc-ref inputs "hdf5")))))
6379 (lambda* (#:key inputs #:allow-other-keys)
6380 (invoke "python" "setup.py" "check"
6381 (string-append "--hdf5="
6382 (assoc-ref inputs "hdf5"))))))))
6384 `(("python-numexpr" ,python-numexpr)
6385 ("python-numpy" ,python-numpy)))
6387 `(("python-cython" ,python-cython)
6388 ("pkg-config" ,pkg-config)))
6393 (home-page "http://www.pytables.org/")
6394 (synopsis "Hierarchical datasets for Python")
6395 (description "PyTables is a package for managing hierarchical datasets and
6396 designed to efficiently cope with extremely large amounts of data.")
6397 (license license:bsd-3)))
6399 (define-public python2-tables
6400 (package-with-python2 python-tables))
6402 (define-public python-pyasn1
6404 (name "python-pyasn1")
6409 (uri (pypi-uri "pyasn1" version))
6412 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6413 (build-system python-build-system)
6414 (home-page "http://pyasn1.sourceforge.net/")
6415 (synopsis "ASN.1 types and codecs")
6417 "This is an implementation of ASN.1 types and codecs in Python. It is
6418 suitable for a wide range of protocols based on the ASN.1 specification.")
6419 (license license:bsd-2)))
6421 (define-public python2-pyasn1
6422 (package-with-python2 python-pyasn1))
6424 (define-public python-pyasn1-modules
6426 (name "python-pyasn1-modules")
6431 (uri (pypi-uri "pyasn1-modules" version))
6434 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6435 (build-system python-build-system)
6437 `(("python-pyasn1" ,python-pyasn1)))
6438 (home-page "https://sourceforge.net/projects/pyasn1/")
6439 (synopsis "ASN.1 codec implementations")
6441 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6442 implementations of ASN.1-based codecs and protocols.")
6443 (license license:bsd-3)))
6445 (define-public python2-pyasn1-modules
6446 (package-with-python2 python-pyasn1-modules))
6448 (define-public python-ipaddress
6450 (name "python-ipaddress")
6454 (uri (pypi-uri "ipaddress" version))
6457 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6458 (build-system python-build-system)
6459 (home-page "https://github.com/phihag/ipaddress")
6460 (synopsis "IP address manipulation library")
6462 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6463 in Python. This library is used to create, poke at, and manipulate IPv4 and
6464 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6465 module to older versions of Python.")
6466 (license license:psfl)))
6468 (define-public python2-ipaddress
6469 (package-with-python2 python-ipaddress))
6471 (define-public python2-ipaddr
6473 (name "python2-ipaddr")
6478 (uri (pypi-uri "ipaddr" version))
6480 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6481 (build-system python-build-system)
6483 `(#:python ,python-2 ;version 2 only
6485 (modify-phases %standard-phases
6487 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6488 (home-page "https://github.com/google/ipaddr-py")
6489 (synopsis "IP address manipulation library")
6491 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6492 IPv6 addresses and networks.
6494 For new implementations you may prefer to use the standard module
6495 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6496 versions of Python.")
6497 (license license:asl2.0)))
6499 (define-public python-idna
6501 (name "python-idna")
6506 (uri (pypi-uri "idna" version))
6509 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6510 (build-system python-build-system)
6511 (home-page "https://github.com/kjd/idna")
6512 (synopsis "Internationalized domain names in applications")
6514 "This is a library to support the Internationalised Domain Names in
6515 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6516 protocol is often referred to as “IDNA2008” and can produce different results
6517 from the earlier standard from 2003. The library is also intended to act as a
6518 suitable drop-in replacement for the “encodings.idna” module that comes with
6519 the Python standard library but currently only supports the older 2003
6521 (license license:bsd-4)))
6523 (define-public python2-idna
6524 (package-with-python2 python-idna))
6526 (define-public python-idna-ssl
6528 (name "python-idna-ssl")
6533 (uri (pypi-uri "idna-ssl" version))
6536 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6537 (build-system python-build-system)
6539 `(#:tests? #f)) ;circular dependency with python-aiohttp
6540 (home-page "https://github.com/aio-libs/idna-ssl")
6541 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6542 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6544 (license license:expat)))
6546 (define-public python-pretend
6548 (name "python-pretend")
6553 (uri (pypi-uri "pretend" version))
6556 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6557 (build-system python-build-system)
6558 (home-page "https://github.com/alex/pretend")
6559 (synopsis "Library for stubbing in Python")
6561 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6562 technique for writing tests. You may hear the term mixed up with mocks,
6563 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6564 responses, rather than doing any computation.")
6565 (license license:bsd-3)))
6567 (define-public python2-pretend
6568 (package-with-python2 python-pretend))
6570 (define-public python-pip
6577 (uri (pypi-uri "pip" version))
6580 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6581 (build-system python-build-system)
6583 '(#:tests? #f)) ; there are no tests in the pypi archive.
6584 (home-page "https://pip.pypa.io/")
6585 (synopsis "Package manager for Python software")
6587 "Pip is a package manager for Python software, that finds packages on the
6588 Python Package Index (PyPI).")
6589 (license license:expat)))
6591 (define-public python2-pip
6592 (package-with-python2 python-pip))
6594 (define-public python-tlsh
6596 (name "python-tlsh")
6598 (home-page "https://github.com/trendmicro/tlsh")
6601 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6605 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6606 (file-name (string-append name "-" version ".tar.gz"))))
6607 (build-system cmake-build-system)
6609 '(#:out-of-source? #f
6610 #:phases (modify-phases %standard-phases
6613 (lambda* (#:key outputs #:allow-other-keys)
6614 ;; Build and install the Python bindings. The underlying
6615 ;; C++ library is apparently not meant to be installed.
6616 (let ((out (assoc-ref outputs "out")))
6617 (with-directory-excursion "py_ext"
6618 (and (system* "python" "setup.py" "build")
6619 (system* "python" "setup.py" "install"
6620 (string-append "--prefix=" out))))))))))
6621 (inputs `(("python" ,python-wrapper))) ;for the bindings
6622 (synopsis "Fuzzy matching library for Python")
6624 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6625 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6626 value which can be used for similarity comparisons. Similar objects have
6627 similar hash values, which allows for the detection of similar objects by
6628 comparing their hash values. The byte stream should have a sufficient amount
6629 of complexity; for example, a byte stream of identical bytes will not generate
6631 (license license:asl2.0)))
6633 (define-public python2-tlsh
6635 (inherit python-tlsh)
6636 (name "python2-tlsh")
6637 (inputs `(("python" ,python-2)))))
6639 (define-public python-termcolor
6641 (name "python-termcolor")
6646 (uri (pypi-uri "termcolor" version))
6649 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6650 (build-system python-build-system)
6652 ;; There are no tests.
6654 (home-page "https://pypi.python.org/pypi/termcolor")
6655 (synopsis "ANSII Color formatting for terminal output")
6657 "This package provides ANSII Color formatting for output in terminals.")
6658 (license license:expat)))
6660 (define-public python2-termcolor
6661 (package-with-python2 python-termcolor))
6663 (define-public python-libarchive-c
6665 (name "python-libarchive-c")
6669 (uri (pypi-uri "libarchive-c" version))
6672 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6673 (build-system python-build-system)
6675 '(#:phases (modify-phases %standard-phases
6677 'build 'reference-libarchive
6678 (lambda* (#:key inputs #:allow-other-keys)
6679 ;; Retain the absolute file name of libarchive.so.
6680 (let ((libarchive (assoc-ref inputs "libarchive")))
6681 (substitute* "libarchive/ffi.py"
6682 (("find_library\\('archive'\\)")
6683 (string-append "'" libarchive
6684 "/lib/libarchive.so'"))))))
6686 (lambda _ (invoke "pytest" "-vv"))))))
6688 `(("python-mock" ,python-mock)
6689 ("python-pytest" ,python-pytest)))
6691 `(("libarchive" ,libarchive)))
6692 (home-page "https://github.com/Changaco/python-libarchive-c")
6693 (synopsis "Python interface to libarchive")
6695 "This package provides Python bindings to libarchive, a C library to
6696 access possibly compressed archives in many different formats. It uses
6697 Python's @code{ctypes} foreign function interface (FFI).")
6698 (license license:lgpl2.0+)))
6700 (define-public python2-libarchive-c
6701 (package-with-python2 python-libarchive-c))
6703 (define-public python-file
6706 (name "python-file")
6707 (build-system python-build-system)
6709 '(#:tests? #f ;no tests
6710 #:configure-flags '("--single-version-externally-managed" "--root=/")
6711 #:phases (modify-phases %standard-phases
6712 (add-before 'build 'change-directory
6716 (add-before 'build 'set-library-file-name
6717 (lambda* (#:key inputs #:allow-other-keys)
6718 (let ((file (assoc-ref inputs "file")))
6719 (substitute* "magic.py"
6720 (("find_library\\('magic'\\)")
6721 (string-append "'" file "/lib/libmagic.so'")))
6723 (inputs `(("file" ,file)))
6724 (self-native-input? #f)
6725 (synopsis "Python bindings to the libmagic file type guesser. Note that
6726 this module and the python-magic module both provide a \"magic.py\" file;
6727 these two modules, which are different and were developed separately, both
6728 serve the same purpose: provide Python bindings for libmagic.")))
6730 (define-public python2-file
6731 (package-with-python2 python-file))
6733 (define-public python-debian
6735 (name "python-debian")
6736 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6741 (uri (pypi-uri name version))
6744 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6745 (build-system python-build-system)
6747 `(("python-six" ,python-six)))
6748 (synopsis "Debian package related modules")
6750 ;; XXX: Use @enumerate instead of @itemize to work around
6751 ;; <http://bugs.gnu.org/21772>.
6752 "This package provides Python modules that abstract many formats of
6753 Debian-related files, such as:
6756 @item Debtags information;
6757 @item @file{debian/changelog} files;
6758 @item packages files, pdiffs;
6759 @item control files of single or multiple RFC822-style paragraphs---e.g.
6760 @file{debian/control}, @file{.changes}, @file{.dsc};
6761 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6762 contained files and meta-information.
6765 ;; Modules are either GPLv2+ or GPLv3+.
6766 (license license:gpl3+)))
6768 (define-public python2-debian
6769 (package-with-python2 python-debian))
6771 (define-public python-nbformat
6773 (name "python-nbformat")
6778 (uri (pypi-uri "nbformat" version))
6781 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6782 (build-system python-build-system)
6783 (arguments `(#:tests? #f)) ; no test target
6785 `(("python-ipython-genutils" ,python-ipython-genutils)
6786 ("python-jsonschema" ,python-jsonschema)
6787 ("python-jupyter-core" ,python-jupyter-core)
6788 ("python-traitlets" ,python-traitlets)))
6789 (home-page "http://jupyter.org")
6790 (synopsis "Jupyter Notebook format")
6791 (description "This package provides the reference implementation of the
6792 Jupyter Notebook format and Python APIs for working with notebooks.")
6793 (license license:bsd-3)))
6795 (define-public python2-nbformat
6796 (package-with-python2 python-nbformat))
6798 (define-public python-bleach
6800 (name "python-bleach")
6805 (uri (pypi-uri "bleach" version))
6808 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6809 (build-system python-build-system)
6811 `(("python-html5lib" ,python-html5lib-0.9)
6812 ("python-six" ,python-six)))
6814 `(("python-nose" ,python-nose)))
6815 (home-page "https://github.com/jsocol/bleach")
6816 (synopsis "Whitelist-based HTML-sanitizing tool")
6817 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6818 (license license:asl2.0)))
6820 (define-public python2-bleach
6821 (package-with-python2 python-bleach))
6823 (define-public python-entrypoints
6825 (name "python-entrypoints")
6830 (uri (pypi-uri "entrypoints" version))
6833 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
6834 (build-system python-build-system)
6835 ;; The package does not come with a setup.py file, so we have to generate
6840 (modify-phases %standard-phases
6841 (add-after 'unpack 'create-setup.py
6843 (call-with-output-file "setup.py"
6846 from setuptools import setup
6847 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6849 (home-page "https://github.com/takluyver/entrypoints")
6850 (synopsis "Discover and load entry points from installed Python packages")
6851 (description "Entry points are a way for Python packages to advertise
6852 objects with some common interface. The most common examples are
6853 @code{console_scripts} entry points, which define shell commands by
6854 identifying a Python function to run. The @code{entrypoints} module contains
6855 functions to find and load entry points.")
6856 (license license:expat)))
6858 (define-public python2-entrypoints
6859 (package-with-python2 python-entrypoints))
6861 (define-public python-nbconvert
6863 (name "python-nbconvert")
6868 (uri (pypi-uri "nbconvert" version))
6871 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6872 (build-system python-build-system)
6874 `(;; The "bdist_egg" target is disabled by default, causing the installation
6876 #:configure-flags (list "bdist_egg")
6877 ;; FIXME: 5 failures, 40 errors.
6880 ;; (modify-phases %standard-phases
6883 ;; (zero? (system* "py.test" "-v")))))
6885 `(("python-pytest" ,python-pytest)))
6887 `(("python-bleach" ,python-bleach)
6888 ("python-entrypoints" ,python-entrypoints)
6889 ("python-jinja2" ,python-jinja2)
6890 ("python-jupyter-core" ,python-jupyter-core)
6891 ("python-mistune" ,python-mistune)
6892 ("python-nbformat" ,python-nbformat)
6893 ("python-pygments" ,python-pygments)
6894 ("python-traitlets" ,python-traitlets)))
6895 (home-page "http://jupyter.org")
6896 (synopsis "Converting Jupyter Notebooks")
6897 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6898 notebooks to various other formats via Jinja templates. It allows you to
6899 convert an @code{.ipynb} notebook file into various static formats including:
6907 @item ReStructured Text (rst)
6908 @item executable script
6910 (license license:bsd-3)))
6912 (define-public python2-nbconvert
6913 (package-with-python2 python-nbconvert))
6915 (define-public python-notebook
6917 (name "python-notebook")
6921 (uri (pypi-uri "notebook" version))
6924 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6925 (build-system python-build-system)
6928 (modify-phases %standard-phases
6931 ;; These tests require a browser
6932 (delete-file-recursively "notebook/tests/selenium")
6933 ;; Some tests need HOME
6934 (setenv "HOME" "/tmp")
6935 ;; This file contains "warningfilters", which are not supported
6936 ;; by this version of nose.
6937 (delete-file "setup.cfg")
6938 (with-directory-excursion "/tmp"
6939 (invoke "nosetests" "-v"))
6942 `(("python-jupyter-core" ,python-jupyter-core)
6943 ("python-nbformat" ,python-nbformat)
6944 ("python-nbconvert" ,python-nbconvert)
6945 ("python-prometheus-client" ,python-prometheus-client)
6946 ("python-send2trash" ,python-send2trash)
6947 ("python-terminado" ,python-terminado)))
6949 `(("python-nose" ,python-nose)
6950 ("python-sphinx" ,python-sphinx)
6951 ("python-requests" ,python-requests)))
6952 (home-page "http://jupyter.org/")
6953 (synopsis "Web-based notebook environment for interactive computing")
6955 "The Jupyter HTML notebook is a web-based notebook environment for
6956 interactive computing.")
6957 (properties `((python2-variant . ,(delay python2-notebook))))
6958 (license license:bsd-3)))
6960 (define-public python2-notebook
6961 (let ((base (package-with-python2
6962 (strip-python2-variant python-notebook))))
6963 (package (inherit base)
6965 `(("python2-mock" ,python2-mock)
6966 ,@(package-native-inputs base)))
6968 (substitute-keyword-arguments (package-arguments base)
6970 `(modify-phases ,phases
6971 (add-before 'check 'disable-test-case
6972 ;; The test requires network access to localhost. Curiously it
6973 ;; fails with Python 2 only. Simply make the test-case return
6977 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6978 (("formats = self.nbconvert_api") "return #")))))))))))
6980 (define-public python-widgetsnbextension
6982 (name "python-widgetsnbextension")
6987 (uri (pypi-uri "widgetsnbextension" version))
6990 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6991 (build-system python-build-system)
6993 `(("python-ipykernel" ,python-ipykernel)
6994 ("python-notebook" ,python-notebook)))
6996 `(("python-certifi" ,python-certifi)
6997 ("python-nose" ,python-nose)))
6998 (home-page "https://ipython.org")
6999 (synopsis "IPython HTML widgets for Jupyter")
7000 (description "This package provides interactive HTML widgets for Jupyter
7002 (license license:bsd-3)))
7004 (define-public python2-widgetsnbextension
7005 (package-with-python2 python-widgetsnbextension))
7007 (define-public python-ipywidgets
7009 (name "python-ipywidgets")
7014 (uri (pypi-uri "ipywidgets" version))
7017 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7018 (build-system python-build-system)
7020 `(("python-ipython" ,python-ipython)
7021 ("python-traitlets" ,python-traitlets)
7022 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7024 `(("python-nose" ,python-nose)
7025 ("python-pytest" ,python-pytest)))
7026 (home-page "https://ipython.org")
7027 (synopsis "IPython HTML widgets for Jupyter")
7028 (description "Ipywidgets are interactive HTML widgets for Jupyter
7029 notebooks and the IPython kernel. Notebooks come alive when interactive
7030 widgets are used. Users gain control of their data and can visualize changes
7032 (license license:bsd-3)))
7034 (define-public python2-ipywidgets
7035 (package-with-python2 python-ipywidgets))
7037 (define-public python-jupyter-console
7039 (name "python-jupyter-console")
7044 (uri (pypi-uri "jupyter_console" version))
7047 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7048 (build-system python-build-system)
7049 ;; Tests only run in an TTY.
7050 (arguments `(#:tests? #f))
7052 `(("python-ipykernel" ,python-ipykernel)
7053 ("python-jupyter-client" ,python-jupyter-client)
7054 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7055 ("python-pygments" ,python-pygments)))
7057 `(("python-nose" ,python-nose)))
7058 (home-page "https://jupyter.org")
7059 (synopsis "Jupyter terminal console")
7060 (description "This package provides a terminal-based console frontend for
7061 Jupyter kernels. It also allows for console-based interaction with non-Python
7062 Jupyter kernels such as IJulia and IRKernel.")
7063 (license license:bsd-3)))
7065 (define-public python2-jupyter-console
7066 (package-with-python2 python-jupyter-console))
7068 ;; The python-ipython and python-jupyter-console require each other. To get
7069 ;; the functionality in both packages working, strip down the
7070 ;; python-jupyter-console package when using it as an input to python-ipython.
7071 (define python-jupyter-console-minimal
7073 (inherit python-jupyter-console)
7074 (name "python-jupyter-console-minimal")
7076 (substitute-keyword-arguments
7077 (package-arguments python-jupyter-console)
7079 `(modify-phases ,phases
7080 (add-after 'install 'delete-bin
7081 (lambda* (#:key outputs #:allow-other-keys)
7082 ;; Delete the bin files, to avoid conflicts in profiles
7083 ;; where python-ipython and python-jupyter-console are
7085 (delete-file-recursively
7087 (assoc-ref outputs "out") "/bin"))))))))
7088 ;; Remove the python-ipython propagated input, to avoid the cycle
7092 (package-propagated-inputs python-jupyter-console)))))
7094 (define-public python-qtconsole
7096 (name "python-qtconsole")
7101 (uri (pypi-uri "qtconsole" version))
7104 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7105 (build-system python-build-system)
7107 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7108 ;; but we only have the LTS version 5.x. This means that there might be
7109 ;; runtime errors, but since this is a dependency of the Jupyter package,
7110 ;; and Jupyter can be used without the qtconsole we can overlook this for
7114 (modify-phases %standard-phases
7115 (add-before 'check 'pre-check
7117 (setenv "QT_QPA_PLATFORM" "offscreen")
7120 `(("python-ipykernel" ,python-ipykernel)
7121 ("python-ipython" ,python-ipython)))
7123 `(("python-pytest" ,python-pytest)))
7124 (home-page "http://jupyter.org")
7125 (synopsis "Jupyter Qt console")
7126 (description "This package provides a Qt-based console for Jupyter with
7127 support for rich media output.")
7128 (license license:bsd-3)))
7130 (define-public jupyter
7137 (uri (pypi-uri "jupyter" version))
7140 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7141 (build-system python-build-system)
7142 (arguments '(#:tests? #f)) ; there are none.
7144 `(("python-ipykernel" ,python-ipykernel)
7145 ("python-ipywidgets" ,python-ipywidgets)
7146 ("python-jupyter-console" ,python-jupyter-console)
7147 ("python-nbconvert" ,python-nbconvert)
7148 ("python-notebook" ,python-notebook)
7149 ("python-qtconsole" ,python-qtconsole)))
7150 (native-search-paths
7151 (list (search-path-specification
7152 (variable "JUPYTER_PATH")
7153 (files '("share/jupyter")))))
7154 (home-page "https://jupyter.org")
7155 (synopsis "Web application for interactive documents")
7157 "The Jupyter Notebook is a web application that allows you to create and
7158 share documents that contain live code, equations, visualizations and
7159 explanatory text. Uses include: data cleaning and transformation, numerical
7160 simulation, statistical modeling, machine learning and much more.")
7161 (license license:bsd-3)))
7163 (define-public python-chardet
7165 (name "python-chardet")
7170 (uri (pypi-uri "chardet" version))
7173 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7175 `(("python-hypothesis" ,python-hypothesis)
7176 ("python-pytest" ,python-pytest)
7177 ("python-pytest-runner" ,python-pytest-runner)))
7178 (build-system python-build-system)
7179 (home-page "https://github.com/chardet/chardet")
7180 (synopsis "Universal encoding detector for Python 2 and 3")
7182 "This package provides @code{chardet}, a Python module that can
7183 automatically detect a wide range of file encodings.")
7184 (license license:lgpl2.1+)))
7186 (define-public python2-chardet
7187 (package-with-python2 python-chardet))
7189 (define-public python-docopt
7191 (name "python-docopt")
7196 ;; The release on PyPI does not include tests.
7198 "https://github.com/docopt/docopt/archive/"
7200 (file-name (string-append name "-" version ".tar.gz"))
7203 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7204 (build-system python-build-system)
7206 `(("python-pytest" ,python-pytest)))
7209 (modify-phases %standard-phases
7211 (lambda _ (invoke "py.test"))))))
7212 (home-page "http://docopt.org")
7213 (synopsis "Command-line interface description language for Python")
7214 (description "This library allows the user to define a command-line
7215 interface from a program's help message rather than specifying it
7216 programatically with command-line parsers like @code{getopt} and
7218 (license license:expat)))
7220 (define-public python2-docopt
7221 (package-with-python2 python-docopt))
7223 (define-public python-pythondialog
7225 (name "python-pythondialog")
7230 (uri (pypi-uri "pythondialog" version))
7233 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7234 (build-system python-build-system)
7237 (modify-phases %standard-phases
7238 (add-after 'unpack 'patch-path
7239 (lambda* (#:key inputs #:allow-other-keys)
7240 (let* ((dialog (assoc-ref inputs "dialog")))
7241 ;; Since this library really wants to grovel the search path, we
7242 ;; must hardcode dialog's store path into it.
7243 (substitute* "dialog.py"
7244 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7245 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7247 #:tests? #f)) ; no test suite
7249 `(("dialog" ,dialog)))
7250 (home-page "http://pythondialog.sourceforge.net/")
7251 (synopsis "Python interface to the UNIX dialog utility")
7252 (description "A Python wrapper for the dialog utility. Its purpose is to
7253 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7254 This allows one to make simple text-mode user interfaces on Unix-like systems")
7255 (license license:lgpl2.1)
7256 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7258 (define-public python2-pythondialog
7259 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7262 (version (package-version python-pythondialog))
7265 (uri (pypi-uri "python2-pythondialog" version))
7268 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7270 (define-public python-configobj
7272 (name "python-configobj")
7276 (uri (pypi-uri "configobj" version))
7279 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7280 ;; Patch setup.py so it looks for python-setuptools, which is
7281 ;; required to parse the keyword 'install_requires' in setup.py.
7282 (patches (search-patches "python-configobj-setuptools.patch"))))
7283 (build-system python-build-system)
7285 `(("python-six" ,python-six)))
7286 (synopsis "Config file reading, writing and validation")
7287 (description "ConfigObj is a simple but powerful config file reader and
7288 writer: an ini file round tripper. Its main feature is that it is very easy to
7289 use, with a straightforward programmer’s interface and a simple syntax for
7291 (home-page "https://github.com/DiffSK/configobj")
7292 (license license:bsd-3)))
7294 (define-public python2-configobj
7295 (package-with-python2 python-configobj))
7297 (define-public python-configargparse
7299 (name "python-configargparse")
7303 (uri (pypi-uri "ConfigArgParse" version))
7306 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
7307 (build-system python-build-system)
7309 `(("python-pyyaml" ,python-pyyaml)))
7312 (modify-phases %standard-phases
7315 ;; Bypass setuptools-shim because one test relies on "setup.py"
7316 ;; being the first argument passed to the python call.
7318 ;; NOTE: Many tests do not run because they rely on Python's
7319 ;; built-in test.test_argparse, but we remove the unit tests from
7320 ;; our Python installation.
7321 (invoke "python" "setup.py" "test"))))))
7322 (synopsis "Replacement for argparse")
7323 (description "A drop-in replacement for argparse that allows options to also
7324 be set via config files and/or environment variables.")
7325 (home-page "https://github.com/bw2/ConfigArgParse")
7326 (license license:expat)))
7328 (define-public python2-configargparse
7329 (package-with-python2 python-configargparse))
7331 (define-public python-argparse-manpage
7333 (name "python-argparse-manpage")
7338 (uri (pypi-uri "argparse-manpage" version))
7341 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7342 (build-system python-build-system)
7343 (home-page "https://github.com/praiskup/argparse-manpage")
7344 (synopsis "Build manual page from Python's ArgumentParser object")
7346 "This package provides tools to build manual pages from Python's
7347 @code{ArgumentParser} object.")
7348 (license license:asl2.0)))
7350 (define-public python2-contextlib2
7352 (name "python2-contextlib2")
7357 (uri (pypi-uri "contextlib2" version))
7360 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7361 (build-system python-build-system)
7363 `(#:python ,python-2
7365 (modify-phases %standard-phases
7367 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7369 `(("python2-unittest2" ,python2-unittest2)))
7370 (home-page "http://contextlib2.readthedocs.org/")
7371 (synopsis "Tools for decorators and context managers")
7372 (description "This module is primarily a backport of the Python
7373 3.2 contextlib to earlier Python versions. Like contextlib, it
7374 provides utilities for common tasks involving decorators and context
7375 managers. It also contains additional features that are not part of
7376 the standard library.")
7377 (license license:psfl)))
7379 (define-public python-texttable
7381 (name "python-texttable")
7386 (uri (pypi-uri "texttable" version))
7389 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7390 (build-system python-build-system)
7391 (arguments '(#:tests? #f)) ; no tests
7392 (home-page "https://github.com/foutaise/texttable/")
7393 (synopsis "Python module for creating simple ASCII tables")
7394 (description "Texttable is a Python module for creating simple ASCII
7396 (license license:lgpl2.1+)))
7398 (define-public python2-texttable
7399 (package-with-python2 python-texttable))
7401 (define-public python-atomicwrites
7403 (name "python-atomicwrites")
7407 (uri (pypi-uri "atomicwrites" version))
7410 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7411 (build-system python-build-system)
7412 (synopsis "Atomic file writes in Python")
7413 (description "Library for atomic file writes using platform dependent tools
7414 for atomic file system operations.")
7415 (home-page "https://github.com/untitaker/python-atomicwrites")
7416 (license license:expat)))
7418 (define-public python2-atomicwrites
7419 (package-with-python2 python-atomicwrites))
7421 (define-public python-click-threading
7423 (name "python-click-threading")
7427 (uri (pypi-uri "click-threading" version))
7430 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7431 (build-system python-build-system)
7433 `(("python-click" ,python-click)))
7434 (synopsis "Utilities for multithreading in Click")
7435 (description "This package provides utilities for multithreading in Click
7437 (home-page "https://github.com/click-contrib/click-threading")
7438 (license license:expat)))
7440 (define-public python-click-log
7442 (name "python-click-log")
7446 (uri (pypi-uri "click-log" version))
7449 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7450 (build-system python-build-system)
7452 `(("python-click" ,python-click)))
7453 (synopsis "Logging for click applications")
7454 (description "This package provides a Python library for logging Click
7456 (home-page "https://github.com/click-contrib/click-log")
7457 (license license:expat)))
7459 (define-public python-apipkg
7461 (name "python-apipkg")
7465 (uri (pypi-uri "apipkg" version))
7468 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7469 (build-system python-build-system)
7471 `(("python-pytest" ,python-pytest)))
7472 (synopsis "Namespace control and lazy-import mechanism")
7473 (description "With apipkg you can control the exported namespace of a Python
7474 package and greatly reduce the number of imports for your users. It is a small
7475 pure Python module that works on virtually all Python versions.")
7476 (home-page "https://github.com/pytest-dev/apipkg")
7477 (license license:expat)))
7479 (define-public python2-apipkg
7480 (package-with-python2 python-apipkg))
7482 (define-public python-execnet
7484 (name "python-execnet")
7488 (uri (pypi-uri "execnet" version))
7491 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7492 (build-system python-build-system)
7494 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7495 ;; The two test failures are caused by the lack of an `ssh` executable.
7496 ;; The test suite can be run with pytest after the 'install' phase.
7499 `(("python-pytest" ,python-pytest)
7500 ("python-setuptools-scm" ,python-setuptools-scm)))
7502 `(("python-apipkg" ,python-apipkg)))
7503 (synopsis "Rapid multi-Python deployment")
7504 (description "Execnet provides a share-nothing model with
7505 channel-send/receive communication for distributing execution across many
7506 Python interpreters across version, platform and network barriers. It has a
7507 minimal and fast API targeting the following uses:
7509 @item distribute tasks to (many) local or remote CPUs
7510 @item write and deploy hybrid multi-process applications
7511 @item write scripts to administer multiple environments
7513 (home-page "http://codespeak.net/execnet/")
7514 (license license:expat)))
7516 (define-public python2-execnet
7517 (package-with-python2 python-execnet))
7519 (define-public python-icalendar
7521 (name "python-icalendar")
7525 (uri (pypi-uri "icalendar" version))
7528 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7529 (build-system python-build-system)
7531 `(("python-dateutil" ,python-dateutil)
7532 ("python-pytz" ,python-pytz)))
7533 (synopsis "Python library for parsing iCalendar files")
7534 (description "The icalendar package is a parser/generator of iCalendar
7535 files for use with Python.")
7536 (home-page "https://github.com/collective/icalendar")
7537 (license license:bsd-2)))
7539 (define-public python-sphinxcontrib-newsfeed
7541 (name "python-sphinxcontrib-newsfeed")
7545 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7548 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7549 (arguments '(#:tests? #f)) ; No tests.
7550 (build-system python-build-system)
7552 `(("python-sphinx" ,python-sphinx)))
7553 (synopsis "News Feed extension for Sphinx")
7554 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7555 Blog, News or Announcements section to a Sphinx website.")
7556 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7557 (license license:bsd-2)))
7559 (define-public python-args
7561 (name "python-args")
7565 (uri (pypi-uri "args" version))
7568 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7569 (build-system python-build-system)
7570 (home-page "https://github.com/kennethreitz/args")
7571 (synopsis "Command-line argument parser")
7573 "This library provides a Python module to parse command-line arguments.")
7574 (license license:bsd-3)))
7576 (define-public python2-args
7577 (package-with-python2 python-args))
7579 (define-public python-clint
7581 (name "python-clint")
7585 (uri (pypi-uri "clint" version))
7588 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7589 (build-system python-build-system)
7592 (modify-phases %standard-phases
7594 (lambda _ (invoke "py.test" "-v"))))))
7596 `(("python-pytest" ,python-pytest)))
7598 `(("python-args" ,python-args)))
7599 (home-page "https://github.com/kennethreitz/clint")
7600 (synopsis "Command-line interface tools")
7602 "Clint is a Python module filled with a set of tools for developing
7603 command-line applications, including tools for colored and indented
7604 output, progress bar display, and pipes.")
7605 (license license:isc)))
7607 (define-public python2-clint
7608 (package-with-python2 python-clint))
7610 (define-public python-rply
7612 (name "python-rply")
7616 (uri (pypi-uri "rply" version))
7619 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7620 (build-system python-build-system)
7622 `(("python-appdirs" ,python-appdirs)))
7623 (home-page "https://github.com/alex/rply")
7624 (synopsis "Parser generator for Python")
7626 "This package provides a pure Python based parser generator, that also
7627 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7628 with a new public API, and RPython support.")
7629 (license license:bsd-3)))
7631 (define-public python2-rply
7632 (package-with-python2 python-rply))
7634 (define-public python-hy
7640 (uri (pypi-uri "hy" version))
7643 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7644 (build-system python-build-system)
7647 (modify-phases %standard-phases
7650 ;; Tests require write access to HOME.
7651 (setenv "HOME" "/tmp")
7652 (invoke "nosetests"))))))
7654 `(("python-coverage" ,python-coverage)
7655 ("python-nose" ,python-nose)))
7657 `(("python-astor" ,python-astor)
7658 ("python-clint" ,python-clint)
7659 ("python-rply" ,python-rply)))
7660 (home-page "http://hylang.org/")
7661 (synopsis "Lisp frontend to Python")
7663 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7664 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7665 Python at your fingertips, in Lisp form.")
7666 (license license:expat)))
7668 (define-public python2-hy
7669 (package-with-python2 python-hy))
7671 (define-public python2-functools32
7673 (name "python2-functools32")
7678 (uri (pypi-uri "functools32" version))
7681 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7682 (build-system python-build-system)
7684 `(#:python ,python-2
7685 #:tests? #f)) ; no test target
7686 (home-page "https://github.com/MiCHiLU/python-functools32")
7688 "Backport of the functools module from Python 3.2.3")
7690 "This package is a backport of the @code{functools} module from Python
7691 3.2.3 for use with older versions of Python and PyPy.")
7692 (license license:expat)))
7694 (define-public python2-subprocess32
7696 (name "python2-subprocess32")
7700 (uri (pypi-uri "subprocess32" version))
7703 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7705 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7706 (build-system python-build-system)
7708 `(#:python ,python-2
7709 ;; The test suite fails with Python > 2.7.13:
7710 ;; import test.support
7711 ;; ImportError: No module named support
7714 (modify-phases %standard-phases
7715 (add-after 'unpack 'patch-/bin/sh
7717 (substitute* '("subprocess32.py"
7718 "test_subprocess32.py")
7719 (("/bin/sh") (which "sh")))
7721 (home-page "https://github.com/google/python-subprocess32")
7722 (synopsis "Backport of the subprocess module from Python 3.2")
7724 "This is a backport of the @code{subprocess} standard library module
7725 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7726 new features. On POSIX systems it is guaranteed to be reliable when used
7727 in threaded applications. It includes timeout support from Python 3.3 but
7728 otherwise matches 3.2’s API.")
7729 (license license:psfl)))
7731 (define-public python2-futures
7733 (name "python2-futures")
7738 (uri (pypi-uri "futures" version))
7741 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7742 (build-system python-build-system)
7743 (arguments `(#:python ,python-2
7744 ;; FIXME: Python 2.7.14 moved the test.support library,
7745 ;; but our package has not yet been adjusted. Enable
7746 ;; tests when the python2 package has been fixed.
7748 (home-page "https://github.com/agronholm/pythonfutures")
7750 "Backport of the concurrent.futures package from Python 3.2")
7752 "The concurrent.futures module provides a high-level interface for
7753 asynchronously executing callables. This package backports the
7754 concurrent.futures package from Python 3.2")
7755 (license license:bsd-3)))
7757 (define-public python-promise
7759 (name "python-promise")
7764 (uri (pypi-uri "promise" version))
7767 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7768 (build-system python-build-system)
7769 ;; Tests wants python-futures, which is a python2 only program, and
7770 ;; can't be found by python-promise at test time.
7771 (arguments `(#:tests? #f))
7772 (home-page "https://github.com/syrusakbary/promise")
7773 (synopsis "Promises/A+ implementation for Python")
7775 "Promises/A+ implementation for Python")
7776 (properties `((python2-variant . ,(delay python2-promise))))
7777 (license license:expat)))
7779 (define-public python2-promise
7780 (let ((promise (package-with-python2
7781 (strip-python2-variant python-promise))))
7782 (package (inherit promise)
7783 (arguments (substitute-keyword-arguments (package-arguments promise)
7786 `(("python2-futures" ,python2-futures)
7787 ("python2-pytest" ,python2-pytest)
7788 ,@(package-native-inputs promise))))))
7790 (define-public python-colorama
7792 (name "python-colorama")
7797 (uri (pypi-uri "colorama" version))
7800 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7801 (build-system python-build-system)
7802 (synopsis "Colored terminal text rendering for Python")
7803 (description "Colorama is a Python library for rendering colored terminal
7805 (home-page "https://pypi.python.org/pypi/colorama")
7806 (license license:bsd-3)))
7808 (define-public python2-colorama
7809 (package-with-python2 python-colorama))
7811 (define-public python-rsa
7818 (uri (pypi-uri "rsa" version))
7821 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7822 (build-system python-build-system)
7824 `(("python-pyasn1" ,python-pyasn1)))
7825 (synopsis "Pure-Python RSA implementation")
7826 (description "Python-RSA is a pure-Python RSA implementation. It supports
7827 encryption and decryption, signing and verifying signatures, and key
7828 generation according to PKCS#1 version 1.5. It can be used as a Python
7829 library as well as on the command line.")
7830 (home-page "https://stuvel.eu/rsa")
7831 (license license:asl2.0)))
7833 (define-public python2-rsa
7834 (package-with-python2 python-rsa))
7836 (define-public python-pluggy
7838 (name "python-pluggy")
7843 (uri (pypi-uri "pluggy" version))
7846 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7847 (build-system python-build-system)
7849 `(("python-setuptools-scm" ,python-setuptools-scm)))
7850 (synopsis "Plugin and hook calling mechanism for Python")
7851 (description "Pluggy is an extraction of the plugin manager as used by
7852 Pytest but stripped of Pytest specific details.")
7853 (home-page "https://pypi.python.org/pypi/pluggy")
7854 (license license:expat)))
7856 (define-public python2-pluggy
7857 (package-with-python2 python-pluggy))
7859 (define-public python-tox
7866 (uri (pypi-uri "tox" version))
7869 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7870 (build-system python-build-system)
7872 ;; FIXME: Tests require pytest-timeout, which itself requires
7873 ;; pytest>=2.8.0 for installation.
7876 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7877 ("python-py" ,python-py)
7878 ("python-virtualenv" ,python-virtualenv)))
7880 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7881 ("python-pytest" ,python-pytest) ; >= 2.3.5
7882 ("python-setuptools-scm" ,python-setuptools-scm)))
7883 (home-page "http://tox.testrun.org/")
7884 (synopsis "Virtualenv-based automation of test activities")
7885 (description "Tox is a generic virtualenv management and test command line
7886 tool. It can be used to check that a package installs correctly with
7887 different Python versions and interpreters, or run tests in each type of
7888 supported environment, or act as a frontend to continuous integration
7890 (license license:expat)))
7892 (define-public python2-tox
7893 (package-with-python2 python-tox))
7895 (define-public python-jmespath
7897 (name "python-jmespath")
7902 (uri (pypi-uri "jmespath" version))
7905 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7906 (build-system python-build-system)
7908 `(("python-nose" ,python-nose)))
7909 (synopsis "JSON Matching Expressions")
7910 (description "JMESPath (pronounced “james path”) is a Python library that
7911 allows one to declaratively specify how to extract elements from a JSON
7913 (home-page "https://github.com/jmespath/jmespath.py")
7914 (license license:expat)))
7916 (define-public python2-jmespath
7917 (package-with-python2 python-jmespath))
7919 (define-public python-botocore
7921 (name "python-botocore")
7926 (uri (pypi-uri "botocore" version))
7929 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7930 (build-system python-build-system)
7932 ;; FIXME: Many tests are failing.
7935 `(("python-dateutil" ,python-dateutil)
7936 ("python-docutils" ,python-docutils)
7937 ("python-jmespath" ,python-jmespath)))
7939 `(("python-mock" ,python-mock)
7940 ("python-nose" ,python-nose)
7942 ("python-tox" ,python-tox)
7943 ("python-wheel" ,python-wheel)))
7944 (home-page "https://github.com/boto/botocore")
7945 (synopsis "Low-level interface to AWS")
7946 (description "Botocore is a Python library that provides a low-level
7947 interface to the Amazon Web Services (AWS) API.")
7948 (license license:asl2.0)))
7950 (define-public python2-botocore
7951 (package-with-python2 python-botocore))
7953 (define-public python-xdo
7960 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7961 "python-xdo_" version ".orig.tar.gz"))
7964 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7965 (build-system python-build-system)
7968 (modify-phases %standard-phases
7969 (add-before 'install 'patch-libxdo-path
7970 ;; Hardcode the path of dynamically loaded libxdo library.
7971 (lambda* (#:key inputs #:allow-other-keys)
7972 (let ((libxdo (string-append
7973 (assoc-ref inputs "xdotool")
7975 (substitute* "xdo/_xdo.py"
7976 (("find_library\\(\"xdo\"\\)")
7977 (simple-format #f "\"~a\"" libxdo)))
7979 #:tests? #f)) ; no tests provided
7981 `(("python-six" ,python-six)))
7983 `(("xdotool" ,xdotool)
7984 ("libX11" ,libx11)))
7985 (home-page "https://tracker.debian.org/pkg/python-xdo")
7986 (synopsis "Python library for simulating X11 keyboard/mouse input")
7987 (description "Provides bindings to libxdo for manipulating X11 via simulated
7988 input. (Note that this is mostly a legacy library; you may wish to look at
7989 python-xdo for newer bindings.)")
7990 (license license:bsd-3)))
7992 (define-public python2-xdo
7993 (package-with-python2 python-xdo))
7995 (define-public python-mako
7997 (name "python-mako")
8002 (uri (pypi-uri "Mako" version))
8005 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8006 (build-system python-build-system)
8008 `(("python-markupsafe" ,python-markupsafe)))
8010 `(("python-mock" ,python-mock)
8011 ("python-nose" ,python-nose)
8012 ("python-pytest" ,python-pytest)))
8013 (home-page "http://www.makotemplates.org/")
8014 (synopsis "Templating language for Python")
8015 (description "Mako is a templating language for Python that compiles
8016 templates into Python modules.")
8017 (license license:expat)))
8019 (define-public python2-mako
8020 (package-with-python2 python-mako))
8022 (define-public python-waitress
8024 (name "python-waitress")
8029 (uri (pypi-uri "waitress" version))
8030 (patches (search-patches "python-waitress-fix-tests.patch"))
8033 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8034 (build-system python-build-system)
8035 (home-page "https://github.com/Pylons/waitress")
8036 (synopsis "Waitress WSGI server")
8037 (description "Waitress is meant to be a production-quality pure-Python WSGI
8038 server with very acceptable performance.")
8039 (license license:zpl2.1)))
8041 (define-public python2-waitress
8042 (package-with-python2 python-waitress))
8044 (define-public python-pyquery
8046 (name "python-pyquery")
8051 (uri (pypi-uri "pyquery" version))
8054 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8055 (build-system python-build-system)
8057 `(("python-webob" ,python-webob)
8058 ("python-webtest" ,python-webtest)))
8060 `(("python-lxml" ,python-lxml)
8061 ("python-cssselect" ,python-cssselect)))
8062 (home-page "https://github.com/gawel/pyquery")
8063 (synopsis "Make jQuery-like queries on xml documents")
8064 (description "pyquery allows you to make jQuery queries on xml documents.
8065 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8066 fast xml and html manipulation.")
8067 (license license:bsd-3)))
8069 (define-public python-anyjson
8071 (name "python-anyjson")
8076 (uri (pypi-uri "anyjson" version))
8079 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8080 (build-system python-build-system)
8082 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8083 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8084 ;; whatever) so this transformation needs to be done before the tests
8085 ;; can be run. Maybe we could add a build step to transform beforehand
8086 ;; but it could be annoying/difficult.
8087 ;; We can enable tests for the Python 2 version, though, and do below.
8089 (home-page "https://bitbucket.org/runeh/anyjson/")
8091 "Wraps best available JSON implementation in a common interface")
8093 "Anyjson loads whichever is the fastest JSON module installed
8094 and provides a uniform API regardless of which JSON implementation is used.")
8095 (license license:bsd-3)
8096 (properties `((python2-variant . ,(delay python2-anyjson))))))
8098 (define-public python2-anyjson
8099 (let ((anyjson (package-with-python2
8100 (strip-python2-variant python-anyjson))))
8103 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8105 ,@(package-arguments anyjson)))
8106 (native-inputs `(("python2-nose" ,python2-nose))))))
8108 (define-public python-amqp
8110 (name "python-amqp")
8115 (uri (pypi-uri "amqp" version))
8118 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8119 (build-system python-build-system)
8121 `(("python-case" ,python-case)
8122 ("python-pytest-sugar" ,python-pytest-sugar)
8123 ("python-mock" ,python-mock)))
8125 `(("python-vine" ,python-vine)))
8126 (home-page "https://github.com/celery/py-amqp")
8128 "Low-level AMQP client for Python (fork of amqplib)")
8130 "This is a fork of amqplib which was originally written by Barry Pederson.
8131 It is maintained by the Celery project, and used by kombu as a pure python
8132 alternative when librabbitmq is not available.")
8133 (license license:lgpl2.1+)
8134 (properties `((python2-variant . ,(delay python2-amqp))))))
8136 (define-public python2-amqp
8137 (let ((amqp (package-with-python2
8138 (strip-python2-variant python-amqp))))
8141 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8142 ;; unmaintained. Weirdly, does not do this on the python 3
8145 ,@(package-arguments amqp))))))
8147 (define-public python-txamqp
8149 (name "python-txamqp")
8154 (uri (pypi-uri "txAMQP" version))
8157 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8158 (build-system python-build-system)
8160 `(("python-six" ,python-six)
8161 ("python-twisted" ,python-twisted)))
8162 (home-page "https://github.com/txamqp/txamqp")
8163 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8165 "This package provides a Python library for communicating with AMQP peers
8166 and brokers using the asynchronous networking framework Twisted. It contains
8167 all the necessary code to connect, send and receive messages to/from an
8168 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8169 also includes support for using Thrift RPC over AMQP in Twisted
8171 (license license:asl2.0)))
8173 (define-public python2-txamqp
8174 (package-with-python2 python-txamqp))
8176 (define-public python-kombu
8178 (name "python-kombu")
8183 (uri (pypi-uri "kombu" version))
8186 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8187 (build-system python-build-system)
8189 `(("python-mock" ,python-mock)
8190 ("python-case" ,python-case)
8191 ("python-pyro4" ,python-pyro4)
8192 ("python-pytest-sugar" ,python-pytest-sugar)
8193 ("python-pytz" ,python-pytz)))
8195 `(("python-anyjson" ,python-anyjson)
8196 ("python-amqp" ,python-amqp)
8197 ("python-redis" ,python-redis)))
8198 (home-page "https://kombu.readthedocs.io")
8199 (synopsis "Message passing library for Python")
8200 (description "The aim of Kombu is to make messaging in Python as easy as
8201 possible by providing an idiomatic high-level interface for the AMQ protocol,
8202 and also provide proven and tested solutions to common messaging problems.
8203 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8204 message orientation, queuing, routing, reliability and security, for which the
8205 RabbitMQ messaging server is the most popular implementation.")
8206 (license license:bsd-3)
8207 (properties `((python2-variant . ,(delay python2-kombu))))))
8209 (define-public python2-kombu
8210 (let ((kombu (package-with-python2
8211 (strip-python2-variant python-kombu))))
8214 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8215 ;; It works fine on the python3 variant.
8217 ,@(package-arguments kombu)))
8218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8219 ,@(package-native-inputs kombu))))))
8221 (define-public python-billiard
8223 (name "python-billiard")
8228 (uri (pypi-uri "billiard" version))
8231 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8232 (build-system python-build-system)
8234 `(("python-case" ,python-case)
8235 ("python-pytest" ,python-pytest)))
8236 (home-page "https://github.com/celery/billiard")
8238 "Python multiprocessing fork with improvements and bugfixes")
8240 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8241 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8242 pyprocessing package. This standalone variant is intended to be compatible with
8243 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8244 (license license:bsd-3)
8245 (properties `((python2-variant . ,(delay python2-billiard))))))
8247 (define-public python2-billiard
8248 (let ((billiard (package-with-python2
8249 (strip-python2-variant python-billiard))))
8252 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8253 ("python2-mock" ,python2-mock)
8254 ,@(package-native-inputs billiard))))))
8256 (define-public python-celery
8258 (name "python-celery")
8263 (uri (pypi-uri "celery" version))
8266 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8267 (build-system python-build-system)
8269 '(;; TODO The tests fail with Python 3.7
8270 ;; https://github.com/celery/celery/issues/4849
8273 (modify-phases %standard-phases
8274 (add-after 'unpack 'patch-requirements
8276 (substitute* "requirements/test.txt"
8277 (("pytest>=3\\.0,<3\\.3")
8281 `(("python-case" ,python-case)
8282 ("python-pytest" ,python-pytest)))
8284 `(("python-pytz" ,python-pytz)
8285 ("python-billiard" ,python-billiard)
8286 ("python-kombu" ,python-kombu)))
8287 (home-page "https://celeryproject.org")
8288 (synopsis "Distributed Task Queue")
8289 (description "Celery is an asynchronous task queue/job queue based on
8290 distributed message passing. It is focused on real-time operation, but
8291 supports scheduling as well. The execution units, called tasks, are executed
8292 concurrently on a single or more worker servers using multiprocessing,
8293 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8294 synchronously (wait until ready).")
8295 (license license:bsd-3)
8296 (properties `((python2-variant . ,(delay python2-celery))))))
8298 (define-public python2-celery
8299 (let ((celery (package-with-python2
8300 (strip-python2-variant python-celery))))
8303 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8304 ("python2-mock" ,python2-mock)
8305 ,@(package-native-inputs celery))))))
8307 (define-public python-translitcodec
8309 (name "python-translitcodec")
8314 (uri (pypi-uri "translitcodec" version))
8317 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8318 (build-system python-build-system)
8320 `(#:tests? #f)) ; no tests provided
8322 "https://github.com/claudep/translitcodec")
8324 "Unicode to 8-bit charset transliteration codec")
8326 "This package contains codecs for transliterating ISO 10646 texts into
8327 best-effort representations using smaller coded character sets (ASCII,
8329 (license license:expat)))
8331 (define-public python2-translitcodec
8332 (package-with-python2 python-translitcodec))
8334 (define-public python-editor
8336 (name "python-editor")
8341 (uri (pypi-uri "python-editor" version))
8344 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8345 (build-system python-build-system)
8347 "https://github.com/fmoo/python-editor")
8349 "Programmatically open an editor, capture the result")
8351 "python-editor is a library that provides the editor module for
8352 programmatically interfacing with your system's $EDITOR.")
8353 (license license:asl2.0)))
8355 (define-public python2-editor
8356 (package-with-python2 python-editor))
8358 (define-public python-sphinxcontrib-programoutput
8360 (name "python-sphinxcontrib-programoutput")
8364 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8367 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8368 (build-system python-build-system)
8370 ;; FIXME: Many tests are failing and the upstream is gone.
8373 `(("python-sphinx" ,python-sphinx)))
8374 (synopsis "Sphinx extension to include program output")
8375 (description "A Sphinx extension to literally insert the output of arbitrary
8376 commands into documents, helping you to keep your command examples up to date.")
8377 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8378 (license license:bsd-2)))
8380 (define-public python2-sphinxcontrib-programoutput
8381 (package-with-python2 python-sphinxcontrib-programoutput))
8383 (define-public python-sphinx-repoze-autointerface
8385 (name "python-sphinx-repoze-autointerface")
8389 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8392 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8393 (build-system python-build-system)
8394 (arguments '(#:tests? #f)) ; No tests.
8396 `(("python-sphinx" ,python-sphinx)
8397 ("python-zope-interface" ,python-zope-interface)))
8398 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8399 (description "This package defines an extension for the Sphinx documentation
8400 system. The extension allows generation of API documentation by
8401 introspection of @code{zope.interface} instances in code.")
8402 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8403 (license license:repoze)))
8405 (define-public python2-sphinx-repoze-autointerface
8406 (package-with-python2 python-sphinx-repoze-autointerface))
8408 (define-public python-vobject
8410 (name "python-vobject")
8414 (uri (pypi-uri "vobject" version))
8417 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8418 (build-system python-build-system)
8420 '(;; The test suite relies on some non-portable Windows interfaces.
8423 `(("python-dateutil" ,python-dateutil)
8424 ("python-pyicu" ,python-pyicu)))
8425 (synopsis "Parse and generate vCard and vCalendar files")
8426 (description "Vobject is intended to be a full featured Python package for
8427 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8428 are supported and well tested. vCard 3.0 files are supported, and all data
8429 should be imported, but only a few components are understood in a sophisticated
8431 (home-page "http://eventable.github.io/vobject/")
8432 (license license:asl2.0)))
8434 (define-public python2-vobject
8435 (package-with-python2 python-vobject))
8437 (define-public python-munkres
8439 (name "python-munkres")
8443 (uri (pypi-uri "munkres" version))
8446 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8447 (build-system python-build-system)
8449 '(#:tests? #f)) ; no test suite
8450 (home-page "http://software.clapper.org/munkres/")
8451 (synopsis "Implementation of the Munkres algorithm")
8452 (description "The Munkres module provides an implementation of the Munkres
8453 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8454 useful for solving the Assignment Problem.")
8455 (license license:bsd-3)))
8457 (define-public python2-munkres
8458 (package-with-python2 python-munkres))
8460 (define-public python-whoosh
8462 (name "python-whoosh")
8467 (uri (pypi-uri "Whoosh" version))
8470 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8471 (build-system python-build-system)
8473 `(("python-pytest" ,python-pytest)))
8474 (home-page "https://bitbucket.org/mchaput/whoosh")
8475 (synopsis "Full text indexing, search, and spell checking library")
8477 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8479 (license license:bsd-2)))
8481 (define-public python2-whoosh
8482 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8483 (package (inherit whoosh)
8485 `(("python2-backport-ssl-match-hostname"
8486 ,python2-backport-ssl-match-hostname)
8487 ,@(package-propagated-inputs whoosh))))))
8489 (define-public python-pathlib
8491 (name "python-pathlib")
8495 (uri (pypi-uri "pathlib" version))
8498 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8499 (build-system python-build-system)
8500 ;; The tests depend on the internal "test" module, which does not provide
8501 ;; a stable interface.
8502 (arguments `(#:tests? #f))
8503 (home-page "https://pathlib.readthedocs.org/")
8504 (synopsis "Object-oriented file system paths")
8505 (description "Pathlib offers a set of classes to handle file system paths.
8506 It offers the following advantages over using string objects:
8509 @item No more cumbersome use of os and os.path functions. Everything can
8510 be done easily through operators, attribute accesses, and method calls.
8511 @item Embodies the semantics of different path types. For example,
8512 comparing Windows paths ignores casing.
8513 @item Well-defined semantics, eliminating any inconsistencies or
8514 ambiguities (forward vs. backward slashes, etc.).
8517 Note: In Python 3.4, pathlib is now part of the standard library. For other
8518 Python versions please consider python-pathlib2 instead, which tracks the
8519 standard library module. This module (python-pathlib) isn't maintained
8521 (license license:expat)))
8523 (define-public python2-pathlib
8524 (package-with-python2 python-pathlib))
8526 (define-public python2-pathlib2
8528 (name "python2-pathlib2")
8532 (uri (pypi-uri "pathlib2" version))
8535 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8536 (build-system python-build-system)
8537 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8538 ;; version is 3.4 which already includes this package as part of the
8539 ;; standard library.
8541 `(#:python ,python-2))
8543 `(("python2-scandir" ,python2-scandir)
8544 ("python2-six" ,python2-six)))
8545 (home-page "https://pypi.python.org/pypi/pathlib2/")
8546 (synopsis "Object-oriented file system paths - backport of standard
8548 (description "The goal of pathlib2 is to provide a backport of standard
8549 pathlib module which tracks the standard library module, so all the newest
8550 features of the standard pathlib can be used also on older Python versions.
8552 Pathlib offers a set of classes to handle file system paths. It offers the
8553 following advantages over using string objects:
8556 @item No more cumbersome use of os and os.path functions. Everything can
8557 be done easily through operators, attribute accesses, and method calls.
8558 @item Embodies the semantics of different path types. For example,
8559 comparing Windows paths ignores casing.
8560 @item Well-defined semantics, eliminating any inconsistencies or
8561 ambiguities (forward vs. backward slashes, etc.).
8563 (license license:expat)))
8565 (define-public python2-pathlib2-bootstrap
8568 (inherit python2-pathlib2)
8569 (name "python2-pathlib2-bootstrap")
8571 `(("python2-scandir" ,python2-scandir)
8572 ("python2-six" ,python2-six-bootstrap))))))
8574 (define-public python-jellyfish
8576 (name "python-jellyfish")
8580 (uri (pypi-uri "jellyfish" version))
8583 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8584 (build-system python-build-system)
8586 `(("python-pytest" ,python-pytest)))
8587 (home-page "https://github.com/jamesturk/jellyfish")
8588 (synopsis "Approximate and phonetic matching of strings")
8589 (description "Jellyfish uses a variety of string comparison and phonetic
8590 encoding algorithms to do fuzzy string matching.")
8591 (license license:bsd-2)
8592 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8594 (define-public python2-jellyfish
8595 (let ((jellyfish (package-with-python2
8596 (strip-python2-variant python-jellyfish))))
8597 (package (inherit jellyfish)
8598 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8599 ,@(package-native-inputs jellyfish))))))
8601 (define-public python2-unicodecsv
8603 (name "python2-unicodecsv")
8607 ;; The test suite is not included in the PyPi release.
8608 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8609 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8610 "archive/" version ".tar.gz"))
8611 (file-name (string-append name "-" version ".tar.gz"))
8614 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8615 (build-system python-build-system)
8617 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8618 #:python ,python-2))
8620 `(("python2-unittest2" ,python2-unittest2)))
8621 (home-page "https://github.com/jdunck/python-unicodecsv")
8622 (synopsis "Unicode CSV module for Python 2")
8623 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8624 module, adding support for Unicode strings.")
8625 (license license:bsd-2)))
8627 (define-public python-rarfile
8629 (name "python-rarfile")
8633 (uri (pypi-uri "rarfile" version))
8636 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8637 (build-system python-build-system)
8640 (modify-phases %standard-phases
8642 ;; Many tests fail, but the installation proceeds.
8643 (lambda _ (invoke "make" "-C" "test" "test"))))))
8645 `(("which" ,which))) ; required for tests
8647 `(("libarchive" ,libarchive)))
8648 (home-page "https://github.com/markokr/rarfile")
8649 (synopsis "RAR archive reader for Python")
8650 (description "This is Python module for RAR archive reading. The interface
8651 is made as zipfile like as possible.")
8652 (license license:isc)))
8654 (define-public python2-rarfile
8655 (package-with-python2 python-rarfile))
8657 (define-public python-magic
8659 (name "python-magic")
8664 (uri (pypi-uri "python-magic" version))
8667 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8668 (file-name (string-append name "-" version "-checkout"))))
8669 (build-system python-build-system)
8671 ;; The tests are unreliable, so don't run them. The tests fail
8672 ;; under Python3 because they were written for Python2 and
8673 ;; contain import statements that do not work in Python3. One of
8674 ;; the tests fails under Python2 because its assertions are
8675 ;; overly stringent; it relies on comparing output strings which
8676 ;; are brittle and can change depending on the version of
8677 ;; libmagic being used and the system on which the test is
8678 ;; running. In my case, under GuixSD 0.10.0, only one test
8679 ;; failed, and it seems to have failed only because the version
8680 ;; of libmagic that is packaged in Guix outputs a slightly
8681 ;; different (but not wrong) string than the one that the test
8684 #:phases (modify-phases %standard-phases
8685 ;; Replace a specific method call with a hard-coded
8686 ;; path to the necessary libmagic.so file in the
8687 ;; store. If we don't do this, then the method call
8688 ;; will fail to find the libmagic.so file, which in
8689 ;; turn will cause any application using
8690 ;; python-magic to fail.
8691 (add-before 'build 'hard-code-path-to-libmagic
8692 (lambda* (#:key inputs #:allow-other-keys)
8693 (let ((file (assoc-ref inputs "file")))
8694 (substitute* "magic.py"
8695 (("ctypes.util.find_library\\('magic'\\)")
8696 (string-append "'" file "/lib/libmagic.so'")))
8698 (add-before 'install 'disable-egg-compression
8700 (let ((port (open-file "setup.cfg" "a")))
8701 (display "\n[easy_install]\nzip_ok = 0\n"
8706 ;; python-magic needs to be able to find libmagic.so.
8709 "https://github.com/ahupp/python-magic")
8711 "File type identification using libmagic")
8713 "This module uses ctypes to access the libmagic file type
8714 identification library. It makes use of the local magic database and
8715 supports both textual and MIME-type output. Note that this module and
8716 the python-file module both provide a \"magic.py\" file; these two
8717 modules, which are different and were developed separately, both serve
8718 the same purpose: to provide Python bindings for libmagic.")
8719 (license license:expat)))
8721 (define-public python2-magic
8722 (package-with-python2 python-magic))
8724 (define-public python2-s3cmd
8726 (name "python2-s3cmd")
8731 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8732 "s3cmd-" version ".tar.gz"))
8735 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8736 (build-system python-build-system)
8738 ;; s3cmd is written for python2 only and contains no tests.
8739 `(#:python ,python-2
8742 `(("python2-dateutil" ,python2-dateutil)
8743 ;; The python-file package also provides a magic.py module.
8744 ;; This is an unfortunate state of affairs; however, s3cmd
8745 ;; fails to install if it cannot find specifically the
8746 ;; python-magic package. Thus we include it, instead of using
8747 ;; python-file. Ironically, s3cmd sometimes works better
8748 ;; without libmagic bindings at all:
8749 ;; https://github.com/s3tools/s3cmd/issues/198
8750 ("python2-magic" ,python2-magic)))
8751 (home-page "http://s3tools.org/s3cmd")
8752 (synopsis "Command line tool for S3-compatible storage services")
8754 "S3cmd is a command line tool for uploading, retrieving and managing data
8755 in storage services that are compatible with the Amazon Simple Storage
8756 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8757 GnuPG encryption, and more. It also supports management of Amazon's
8758 CloudFront content delivery network.")
8759 (license license:gpl2+)))
8761 (define-public python-pkgconfig
8763 (name "python-pkgconfig")
8768 (uri (pypi-uri "pkgconfig" version))
8771 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8772 (build-system python-build-system)
8774 `(("python-nose" ,python-nose)))
8776 `(("pkg-config" ,pkg-config)))
8779 (modify-phases %standard-phases
8780 (add-before 'build 'patch
8781 ;; Hard-code the path to pkg-config.
8783 (substitute* "pkgconfig/pkgconfig.py"
8784 (("cmd = 'pkg-config")
8785 (string-append "cmd = '" (which "pkg-config"))))
8789 (invoke "nosetests" "test.py"))))))
8790 (home-page "https://github.com/matze/pkgconfig")
8791 (synopsis "Python interface for pkg-config")
8792 (description "This module provides a Python interface to pkg-config. It
8793 can be used to find all pkg-config packages, check if a package exists,
8794 check if a package meets certain version requirements, query CFLAGS and
8795 LDFLAGS and parse the output to build extensions with setup.py.")
8796 (license license:expat)))
8798 (define-public python2-pkgconfig
8799 (package-with-python2 python-pkgconfig))
8801 (define-public python-bz2file
8803 (name "python-bz2file")
8808 (uri (pypi-uri "bz2file" version))
8811 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8812 (build-system python-build-system)
8814 `(#:tests? #f)) ; Tests use deprecated python modules.
8815 (home-page "https://github.com/nvawda/bz2file")
8816 (synopsis "Read and write bzip2-compressed files")
8818 "Bz2file is a Python library for reading and writing bzip2-compressed
8819 files. It contains a drop-in replacement for the I/O interface in the
8820 standard library's @code{bz2} module, including features from the latest
8821 development version of CPython that are not available in older releases.")
8822 (license license:asl2.0)))
8824 (define-public python2-bz2file
8825 (package-with-python2 python-bz2file))
8827 (define-public python-future
8829 (name "python-future")
8834 (uri (pypi-uri "future" version))
8837 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8838 (build-system python-build-system)
8839 ;; Many tests connect to the network or are otherwise flawed.
8840 ;; https://github.com/PythonCharmers/python-future/issues/210
8843 (home-page "http://python-future.org")
8844 (synopsis "Single-source support for Python 3 and 2")
8846 "@code{python-future} is the missing compatibility layer between Python 2 and
8847 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8848 to support both Python 2 and Python 3 with minimal overhead.")
8849 (license license:expat)))
8851 (define-public python2-future
8852 (package-with-python2 python-future))
8854 (define-public python-cysignals
8856 (name "python-cysignals")
8861 (uri (pypi-uri "cysignals" version))
8864 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8865 (build-system python-build-system)
8867 `(("python-cython" ,python-cython)
8868 ("python-sphinx" ,python-sphinx)))
8870 `(("pari-gp" ,pari-gp)))
8872 `(#:modules ((guix build python-build-system)
8873 ((guix build gnu-build-system) #:prefix gnu:)
8875 ;; FIXME: Tests are executed after installation and currently fail
8876 ;; when not installing into standard locations; the author is working
8880 (modify-phases %standard-phases
8883 (assoc-ref gnu:%standard-phases 'configure)))))
8885 "https://github.com/sagemath/cysignals")
8887 "Handling of interrupts and signals for Cython")
8889 "The cysignals package provides mechanisms to handle interrupts (and
8890 other signals and errors) in Cython code, using two related approaches,
8891 for mixed Cython/Python code or external C libraries and pure Cython code,
8893 (license license:lgpl3+)))
8895 (define-public python2-cysignals
8896 (package-with-python2 python-cysignals))
8898 (define-public python2-shedskin
8900 (name "python2-shedskin")
8905 (uri (string-append "https://github.com/shedskin/shedskin/"
8906 "releases/download/v" version
8907 "/shedskin-" version ".tgz"))
8910 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8911 (build-system python-build-system)
8913 `(#:python ,python-2
8914 #:phases (modify-phases %standard-phases
8915 (add-after 'unpack 'fix-resulting-include-libs
8916 (lambda* (#:key inputs #:allow-other-keys)
8917 (let ((libgc (assoc-ref inputs "libgc"))
8918 (pcre (assoc-ref inputs "pcre")))
8919 (substitute* "shedskin/makefile.py"
8920 (("variable == 'CCFLAGS':[ ]*")
8921 (string-append "variable == 'CCFLAGS':\n"
8922 " line += ' -I " pcre "/include"
8923 " -I " libgc "/include'"))
8924 (("variable == 'LFLAGS':[ ]*")
8925 (string-append "variable == 'LFLAGS':\n"
8926 " line += ' -L" pcre "/lib"
8927 " -L " libgc "/lib'")))
8929 (inputs `(("pcre" ,pcre)
8931 (home-page "https://shedskin.github.io/")
8932 (synopsis "Experimental Python-2 to C++ Compiler")
8933 (description (string-append "This is an experimental compiler for a subset of
8934 Python. It generates C++ code and a Makefile."))
8935 (license (list license:gpl3 license:bsd-3 license:expat))))
8937 (define-public python2-rope
8939 (name "python2-rope")
8944 (uri (pypi-uri "rope" version))
8947 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
8949 ;; Rope has only partial python3 support, see `python-rope'
8950 `(#:python ,python-2))
8951 (build-system python-build-system)
8953 `(("python2-unittest2" ,python2-unittest2)))
8954 (home-page "https://github.com/python-rope/rope")
8955 (synopsis "Refactoring library for Python")
8956 (description "Rope is a refactoring library for Python. It facilitates
8957 the renaming, moving and extracting of attributes, functions, modules, fields
8958 and parameters in Python 2 source code. These refactorings can also be applied
8959 to occurrences in strings and comments.")
8960 (license license:gpl2)))
8962 (define-public python-rope
8964 (inherit python2-rope)
8965 (name "python-rope")
8966 (arguments `(#:python ,python-wrapper
8967 ;; XXX: Only partial python3 support, results in some failing
8968 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8970 (properties `((python2-variant . ,(delay python2-rope))))))
8972 (define-public python-py3status
8974 (name "python-py3status")
8979 (uri (pypi-uri "py3status" version))
8982 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8983 (build-system python-build-system)
8988 (modify-phases %standard-phases
8989 ;; 'file' is used for detection of configuration file encoding
8990 ;; let's make link the dependency to particular input
8991 (add-before 'build 'patch-file-path
8992 (lambda* (#:key inputs #:allow-other-keys)
8993 (let ((file-path (assoc-ref inputs "file")))
8994 (substitute* "py3status/parse_config.py"
8995 (("\\['file', '-b'")
8996 (string-append "['" file-path "/bin/file', '-b'")))
8998 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8999 (home-page "https://github.com/ultrabug/py3status")
9000 (synopsis "Extensible i3status wrapper written in Python")
9001 (description "py3status is an i3status wrapper which extends i3status
9002 functionality in a modular way, allowing you to extend your panel with your
9003 own code, responding to click events and updating clock every second.")
9004 (license license:bsd-3)))
9006 (define-public python-tblib
9008 (name "python-tblib")
9012 (uri (pypi-uri "tblib" version))
9014 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9015 (build-system python-build-system)
9018 (modify-phases %standard-phases
9019 (add-before 'check 'adjust-tests
9021 (when (which "python3")
9022 ;; Adjust the example output to match that of Python 3.7:
9023 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9024 (substitute* "README.rst"
9025 (("Exception\\('fail',") "Exception('fail'"))
9029 ;; Upstream runs tests after installation and the package itself
9030 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9032 (setenv "PYTHONPATH"
9033 (string-append (getcwd) "/build/lib:"
9034 (getenv "PYTHONPATH")))
9035 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9037 `(("python-pytest" ,python-pytest)
9038 ("python-six" ,python-six)))
9039 (home-page "https://github.com/ionelmc/python-tblib")
9040 (synopsis "Traceback serialization library")
9042 "Traceback serialization allows you to:
9045 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9046 different processes. This allows better error handling when running code over
9047 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9049 @item Parse traceback strings and raise with the parsed tracebacks.
9051 (license license:bsd-3)))
9053 (define-public python2-tblib
9054 (package-with-python2 python-tblib))
9056 (define-public python-greenlet
9058 (name "python-greenlet")
9062 (uri (pypi-uri "greenlet" version))
9065 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9066 (build-system python-build-system)
9067 (home-page "https://greenlet.readthedocs.io/")
9068 (synopsis "Lightweight in-process concurrent programming")
9070 "Greenlet package is a spin-off of Stackless, a version of CPython
9071 that supports micro-threads called \"tasklets\". Tasklets run
9072 pseudo-concurrently (typically in a single or a few OS-level threads) and
9073 are synchronized with data exchanges on \"channels\".")
9074 (license (list license:psfl license:expat))))
9076 (define-public python2-greenlet
9077 (package-with-python2 python-greenlet))
9079 (define-public python-objgraph
9081 (name "python-objgraph")
9086 (uri (pypi-uri "objgraph" version))
9089 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9090 (build-system python-build-system)
9092 `(("python-graphviz" ,python-graphviz)))
9094 `(("python-mock" ,python-mock)
9095 ("graphviz" ,graphviz)))
9096 (home-page "https://mg.pov.lt/objgraph/")
9097 (synopsis "Draw Python object reference graphs with graphviz")
9099 "This package provides tools to draw Python object reference graphs with
9101 (license license:expat)))
9103 (define-public python-gevent
9105 (name "python-gevent")
9109 (uri (pypi-uri "gevent" version))
9112 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9113 (modules '((guix build utils)))
9116 ;; unbunding libev and c-ares
9117 (delete-file-recursively "deps")
9119 (build-system python-build-system)
9121 `(#:modules ((ice-9 ftw)
9125 (guix build python-build-system))
9126 #:phases (modify-phases %standard-phases
9127 (add-after 'unpack 'unpack-libev
9128 (lambda* (#:key inputs #:allow-other-keys)
9129 (mkdir-p "deps/libev")
9130 ;; FIXME: gevent requires building libev, even though
9131 ;; it only links against the proper one.
9132 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9133 "--strip-components=1" "-C" "deps/libev")))
9134 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9136 (substitute* "src/gevent/subprocess.py"
9137 (("/bin/sh") (which "sh")))
9138 (for-each (lambda (file)
9140 (("/bin/sh") (which "sh"))
9141 (("/bin/true") (which "true"))))
9142 (find-files "src/greentest" "\\.py$"))
9144 (add-before 'build 'do-not-use-bundled-sources
9145 (lambda* (#:key inputs #:allow-other-keys)
9146 (setenv "CONFIG_SHELL" (which "bash"))
9147 (setenv "LIBEV_EMBED" "false")
9148 (setenv "CARES_EMBED" "false")
9149 (setenv "EMBED" "false")
9151 (let ((greenlet (string-append
9152 (assoc-ref inputs "python-greenlet")
9154 (match (scandir greenlet
9156 (string-prefix? "python" item)))
9159 (string-append greenlet "/" python)))))
9161 (add-before 'check 'skip-timer-test
9163 ;; XXX: Skip 'TestTimerResolution', which appears to be
9165 (substitute* "src/greentest/test__core_timer.py"
9166 (("not greentest.RUNNING_ON_CI") "False"))
9170 ;; Make sure the build directory is on PYTHONPATH.
9171 (setenv "PYTHONPATH"
9173 (getenv "PYTHONPATH") ":"
9175 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9176 (with-directory-excursion "src/greentest"
9177 ;; XXX: Many tests require network access. Instead we only
9178 ;; run known-good tests. Unfortunately we cannot use
9179 ;; recursion here since this directory also contains
9180 ;; Python-version-specific subfolders.
9181 (apply invoke "python" "testrunner.py" "--config"
9183 (scandir "." (cut regexp-exec
9184 (make-regexp "test_+(subprocess|core)")
9187 `(("python-greenlet" ,python-greenlet)
9188 ("python-objgraph" ,python-objgraph)))
9190 `(("libev-source" ,(package-source libev))
9191 ("python-six" ,python-six)))
9193 `(("c-ares" ,c-ares)
9195 (home-page "http://www.gevent.org/")
9196 (synopsis "Coroutine-based network library")
9198 "gevent is a coroutine-based Python networking library that uses greenlet
9199 to provide a high-level synchronous API on top of the libev event loop.")
9200 (license license:expat)
9201 (properties `((python2-variant . ,(delay python2-gevent))))))
9203 (define-public python2-gevent
9204 (let ((base (package-with-python2
9205 (strip-python2-variant python-gevent))))
9208 (native-inputs `(,@(package-native-inputs python-gevent)
9209 ("python-mock" ,python2-mock))))))
9211 (define-public python-fastimport
9213 (name "python-fastimport")
9218 (uri (pypi-uri "fastimport" version))
9220 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9221 (build-system python-build-system)
9222 (home-page "https://github.com/jelmer/python-fastimport")
9223 (synopsis "VCS fastimport parser and generator in Python")
9224 (description "This package provides a parser for and generator of the Git
9225 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9227 (license license:gpl2+)))
9229 (define-public python2-fastimport
9230 (package-with-python2 python-fastimport))
9232 (define-public python-twisted
9234 (name "python-twisted")
9238 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9241 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9242 (build-system python-build-system)
9244 '(#:tests? #f)) ; FIXME: Some tests are failing.
9246 ;; (modify-phases %standard-phases
9249 ;; (zero? (system* "./bin/trial" "twisted")))))
9251 `(("python-zope-interface" ,python-zope-interface)
9252 ("python-incremental" ,python-incremental)
9253 ("python-constantly" ,python-constantly)
9254 ("python-automat" ,python-automat)))
9255 (home-page "https://twistedmatrix.com/")
9256 (synopsis "Asynchronous networking framework written in Python")
9258 "Twisted is an extensible framework for Python programming, with special
9259 focus on event-based network programming and multiprotocol integration.")
9260 (license license:expat)))
9262 (define-public python2-twisted
9263 (package-with-python2 python-twisted))
9265 (define-public python-pika
9267 (name "python-pika")
9272 (uri (pypi-uri "pika" version))
9275 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9276 (build-system python-build-system)
9278 `(("python-pyev" ,python-pyev)
9279 ("python-tornado" ,python-tornado)
9280 ("python-twisted" ,python-twisted)))
9281 (home-page "https://pika.readthedocs.org")
9282 (synopsis "Pure Python AMQP Client Library")
9284 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9285 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9286 network support library.")
9287 (license license:bsd-3)))
9289 (define-public python2-pika
9290 (package-with-python2 python-pika))
9292 (define-public python-ply
9299 (uri (pypi-uri "ply" version))
9302 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9303 (build-system python-build-system)
9304 (home-page "http://www.dabeaz.com/ply/")
9305 (synopsis "Python Lex & Yacc")
9306 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9307 It uses LR parsing and does extensive error checking.")
9308 (license license:bsd-3)))
9310 (define-public python2-ply
9311 (package-with-python2 python-ply))
9313 (define-public python-tabulate
9315 (name "python-tabulate")
9319 (uri (pypi-uri "tabulate" version))
9322 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9323 (build-system python-build-system)
9325 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9326 ;; and the latest release is not tagged in the upstream repository.
9328 (home-page "https://bitbucket.org/astanin/python-tabulate")
9329 (synopsis "Pretty-print tabular data")
9331 "Tabulate is a library and command-line utility to pretty-print tabular
9333 (license license:expat)))
9335 (define-public python2-tabulate
9336 (package-with-python2 python-tabulate))
9338 (define-public python-kazoo
9340 (name "python-kazoo")
9345 (uri (pypi-uri "kazoo" version))
9348 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9349 (build-system python-build-system)
9350 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9352 `(("python-six" ,python-six)))
9353 (home-page "https://kazoo.readthedocs.org")
9354 (synopsis "High-level Zookeeper client library")
9356 "Kazoo is a Python client library for the Apache Zookeeper distributed
9357 application service. It is designed to be easy to use and to avoid common
9358 programming errors.")
9359 (license license:asl2.0)))
9361 (define-public python2-kazoo
9362 (package-with-python2 python-kazoo))
9364 (define-public python-pykafka
9366 (name "python-pykafka")
9370 (uri (pypi-uri "pykafka" version))
9373 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9374 (build-system python-build-system)
9375 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9377 `(("python-gevent" ,python-gevent)
9378 ("python-kazoo" ,python-kazoo)
9379 ("python-tabulate" ,python-tabulate)))
9381 `(("librdkafka" ,librdkafka)))
9382 (home-page "https://pykafka.readthedocs.io/")
9383 (synopsis "Apache Kafka client for Python")
9385 "PyKafka is a client for the Apache Kafka distributed messaging system.
9386 It includes Python implementations of Kafka producers and consumers, which
9387 are optionally backed by a C extension built on librdkafka.")
9388 (license license:asl2.0)))
9390 (define-public python2-pykafka
9391 (package-with-python2 python-pykafka))
9393 (define-public python-wcwidth
9395 (name "python-wcwidth")
9400 (uri (pypi-uri "wcwidth" version))
9403 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9404 (build-system python-build-system)
9405 (home-page "https://github.com/jquast/wcwidth")
9406 (synopsis "Measure number of terminal column cells of wide-character codes")
9407 (description "Wcwidth measures the number of terminal column cells of
9408 wide-character codes. It is useful for those implementing a terminal emulator,
9409 or programs that carefully produce output to be interpreted by one. It is a
9410 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9411 specified in POSIX.1-2001 and POSIX.1-2008.")
9412 (license license:expat)))
9414 (define-public python2-wcwidth
9415 (package-with-python2 python-wcwidth))
9417 (define-public python2-jsonrpclib
9419 (name "python2-jsonrpclib")
9423 (uri (pypi-uri "jsonrpclib" version))
9426 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9427 (build-system python-build-system)
9430 #:python ,python-2))
9431 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9432 (synopsis "Implementation of JSON-RPC specification for Python")
9434 "This library is an implementation of the JSON-RPC specification.
9435 It supports both the original 1.0 specification, as well as the
9436 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9438 (license license:asl2.0)))
9440 (define-public python-chai
9442 (name "python-chai")
9446 (uri (pypi-uri "chai" version))
9449 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9450 (build-system python-build-system)
9451 (home-page "https://github.com/agoragames/chai")
9452 (synopsis "Mocking framework for Python")
9454 "Chai provides an api for mocking, stubbing and spying your python
9455 objects, patterned after the Mocha library for Ruby.")
9456 (license license:bsd-3)))
9458 (define-public python2-chai
9459 (package-with-python2 python-chai))
9461 (define-public python-inflection
9463 (name "python-inflection")
9466 (origin (method url-fetch)
9467 (uri (pypi-uri "inflection" version))
9470 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9471 (build-system python-build-system)
9473 `(("python-pytest" ,python-pytest)))
9474 (home-page "https://github.com/jpvanhal/inflection")
9475 (synopsis "Python string transformation library")
9477 "Inflection is a string transformation library. It singularizes
9478 and pluralizes English words, and transforms strings from CamelCase to
9479 underscored string.")
9480 (license license:expat)))
9482 (define-public python2-inflection
9483 (package-with-python2 python-inflection))
9485 (define-public python-pylev
9487 (name "python-pylev")
9491 (uri (pypi-uri "pylev" version))
9494 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9495 (build-system python-build-system)
9496 (home-page "https://github.com/toastdriven/pylev")
9497 (synopsis "Levenshtein distance implementation in Python")
9498 (description "Pure Python Levenshtein implementation, based off the
9499 Wikipedia code samples at
9500 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9501 (license license:bsd-3)))
9503 (define-public python2-pylev
9504 (package-with-python2 python-pylev))
9506 (define-public python-cleo
9508 (name "python-cleo")
9512 (uri (pypi-uri "cleo" version))
9515 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9516 (build-system python-build-system)
9519 ("python-mock" ,python-mock)
9520 ("python-pytest-mock" ,python-pytest-mock)
9521 ("python-pytest" ,python-pytest)))
9523 `(("python-backpack" ,python-backpack)
9524 ("python-pastel" ,python-pastel)
9525 ("python-pylev" ,python-pylev)))
9526 (home-page "https://github.com/sdispater/cleo")
9527 (synopsis "Command-line arguments library for Python")
9529 "Cleo allows you to create command-line commands with signature in
9530 docstring and colored output.")
9531 (license license:expat)))
9533 (define-public python2-cleo
9534 (package-with-python2 python-cleo))
9536 (define-public python-lazy-object-proxy
9538 (name "python-lazy-object-proxy")
9542 (uri (pypi-uri "lazy-object-proxy" version))
9545 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9546 (build-system python-build-system)
9547 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9548 (synopsis "Lazy object proxy for python")
9550 "Lazy object proxy is an object that wraps a callable but defers the call
9551 until the object is actually required, and caches the result of said call.")
9552 (license license:bsd-2)))
9554 (define-public python2-lazy-object-proxy
9555 (package-with-python2 python-lazy-object-proxy))
9557 (define-public python-dnspython
9559 (name "python-dnspython")
9563 (uri (string-append "http://www.dnspython.org/kits/"
9564 version "/dnspython-" version ".tar.gz"))
9567 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9568 (build-system python-build-system)
9569 (arguments '(#:tests? #f)) ; XXX: requires internet access
9570 (home-page "http://www.dnspython.org")
9571 (synopsis "DNS toolkit for Python")
9573 "dnspython is a DNS toolkit for Python. It supports almost all record
9574 types. It can be used for queries, zone transfers, and dynamic updates.
9575 It supports TSIG authenticated messages and EDNS0.")
9576 (license license:expat)))
9578 (define-public python2-dnspython
9579 (package-with-python2 python-dnspython))
9581 (define-public python-email-validator
9583 (name "python-email-validator")
9586 (origin (method url-fetch)
9587 (uri (pypi-uri "email_validator" version))
9590 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9591 (build-system python-build-system)
9594 (modify-phases %standard-phases
9595 (add-before 'build 'use-dnspython
9597 (substitute* "setup.py"
9598 (("dnspython3") "dnspython"))
9601 `(("python-dnspython" ,python-dnspython)
9602 ("python-idna" ,python-idna)))
9603 (home-page "https://github.com/JoshData/python-email-validator")
9604 (synopsis "Email address validation library for Python")
9606 "This library validates email address syntax and deliverability.")
9607 (license license:cc0)))
9609 (define-public python2-email-validator
9610 (package-with-python2 python-email-validator))
9612 (define-public python-ukpostcodeparser
9614 (name "python-ukpostcodeparser")
9618 (uri (pypi-uri "UkPostcodeParser" version))
9621 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9622 (build-system python-build-system)
9623 (home-page "https://github.com/hamstah/ukpostcodeparser")
9624 (synopsis "UK Postcode parser for Python")
9626 "This library provides the @code{parse_uk_postcode} function for
9627 parsing UK postcodes.")
9628 (license license:expat)))
9630 (define-public python2-ukpostcodeparser
9631 (package-with-python2 python-ukpostcodeparser))
9633 (define-public python-faker
9635 (name "python-faker")
9639 (uri (pypi-uri "Faker" version))
9642 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9644 (search-patches "python-faker-fix-build-32bit.patch"))
9645 (modules '((guix build utils)))
9648 (for-each delete-file (find-files "." "\\.pyc$"))
9650 (build-system python-build-system)
9653 (modify-phases %standard-phases
9655 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9658 ("python-email-validator" ,python-email-validator)
9659 ("python-mock" ,python-mock)
9660 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9662 `(("python-dateutil" ,python-dateutil)
9663 ("python-six" ,python-six)))
9664 (home-page "https://github.com/joke2k/faker")
9665 (synopsis "Python package that generates fake data")
9667 "Faker is a Python package that generates fake data such as names,
9668 addresses, and phone numbers.")
9669 (license license:expat)
9670 (properties `((python2-variant . ,(delay python2-faker))))))
9672 (define-public python2-faker
9673 (let ((base (package-with-python2 (strip-python2-variant
9678 `(("python2-ipaddress" ,python2-ipaddress)
9679 ,@(package-propagated-inputs base))))))
9681 (define-public python-pyaml
9683 (name "python-pyaml")
9687 (uri (pypi-uri "pyaml" version))
9690 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9691 (build-system python-build-system)
9693 `(("python-unidecode" ,python-unidecode)))
9695 `(("python-pyyaml" ,python-pyyaml)))
9696 (home-page "https://github.com/mk-fg/pretty-yaml")
9697 (synopsis "YAML pretty-print library for Python")
9699 "pyaml is a PyYAML based python module to produce pretty and readable
9700 YAML-serialized data.")
9701 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9703 (define-public python2-pyaml
9704 (package-with-python2 python-pyaml))
9706 (define-public python-backpack
9708 (name "python-backpack")
9713 (uri (pypi-uri "backpack" version))
9716 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9717 (build-system python-build-system)
9719 `(("python-pytest" ,python-pytest)
9720 ("python-nose" ,python-nose)))
9722 `(("python-simplejson" ,python-simplejson)))
9723 (home-page "https://github.com/sdispater/backpack")
9724 (synopsis "Utilities for working with Python collections")
9725 (description "Backpack provides some useful utilities for working with
9726 collections of data.")
9727 (license license:expat)))
9729 (define-public python2-backpack
9730 (package-with-python2 python-backpack))
9732 (define-public python-prompt-toolkit
9734 (name "python-prompt-toolkit")
9739 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9742 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9743 (build-system python-build-system)
9746 (modify-phases %standard-phases
9748 (add-after 'install 'post-install-check
9749 (lambda* (#:key inputs outputs #:allow-other-keys)
9750 ;; HOME is needed for the test
9751 ;; "test_pathcompleter_can_expanduser".
9752 (setenv "HOME" "/tmp")
9753 (add-installed-pythonpath inputs outputs)
9754 (invoke "py.test"))))))
9756 `(("python-wcwidth" ,python-wcwidth)
9757 ("python-six" ,python-six)
9758 ("python-pygments" ,python-pygments)))
9760 `(("python-pytest" ,python-pytest)))
9761 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9762 (synopsis "Library for building command line interfaces in Python")
9764 "Prompt-Toolkit is a library for building interactive command line
9765 interfaces in Python. It's like GNU Readline but it also features syntax
9766 highlighting while typing, out-of-the-box multi-line input editing, advanced
9767 code completion, incremental search, support for Chinese double-width
9768 characters, mouse support, and auto suggestions.")
9769 (license license:bsd-3)))
9771 (define-public python2-prompt-toolkit
9772 (package-with-python2 python-prompt-toolkit))
9774 (define-public python-prompt-toolkit-1
9775 (package (inherit python-prompt-toolkit)
9780 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9783 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9785 (define-public python2-prompt-toolkit-1
9786 (package-with-python2 python-prompt-toolkit-1))
9788 (define-public python-jedi
9790 (name "python-jedi")
9795 (uri (pypi-uri "jedi" version))
9798 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
9799 (build-system python-build-system)
9801 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
9802 ;; https://github.com/davidhalter/jedi/issues/1263)
9805 (modify-phases %standard-phases
9807 (lambda* (#:key tests? #:allow-other-keys)
9809 (invoke "py.test" "-vv")))))))
9811 `(("python-pytest" ,python-pytest)
9812 ("python-docopt" ,python-docopt)))
9814 `(("python-parso" ,python-parso)))
9815 (home-page "https://github.com/davidhalter/jedi")
9816 (synopsis "Autocompletion and static analysis library for Python")
9818 "Jedi is a static analysis tool for Python that can be used in Integrated
9819 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9820 on a deeper level than many other static analysis frameworks for Python.
9822 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9824 (license license:expat)))
9826 (define-public python2-jedi
9827 (package-with-python2 python-jedi))
9829 (define-public ptpython
9835 (uri (pypi-uri "ptpython" version))
9838 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9839 (build-system python-build-system)
9841 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9843 `(("python-docopt" ,python-docopt)
9844 ("python-jedi" ,python-jedi)
9845 ("python-prompt-toolkit" ,python-prompt-toolkit)
9846 ("python-pygments" ,python-pygments)))
9847 (home-page "https://github.com/jonathanslenders/ptpython")
9848 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9850 "ptpython is a Python read-eval-print loop with IDE-like features.
9851 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9852 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9854 (license license:bsd-3)
9855 (properties `((python2-variant . ,(delay ptpython-2))))))
9857 (define-public ptpython-2
9858 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9861 (name "ptpython2"))))
9863 (define-public python-stem
9865 (name "python-stem")
9870 (uri (pypi-uri "stem" version))
9873 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9874 (build-system python-build-system)
9877 (modify-phases %standard-phases
9880 (invoke "./run_tests.py" "--unit")
9883 `(("python-mock" ,python-mock)
9884 ("python-pycodestyle" ,python-pycodestyle)
9885 ("python-pyflakes" ,python-pyflakes)))
9886 (home-page "https://stem.torproject.org/")
9888 "Python controller library that allows applications to interact with Tor")
9890 "Stem is a Python controller library for Tor. With it you can use Tor's
9891 control protocol to script against the Tor process and read descriptor data
9892 relays publish about themselves.")
9893 (license license:lgpl3)))
9895 (define-public python2-stem
9896 (package-with-python2 python-stem))
9898 (define-public python-pyserial
9900 (name "python-pyserial")
9905 (uri (pypi-uri "pyserial" version))
9908 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9909 (build-system python-build-system)
9911 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9913 ;; (modify-phases %standard-phases
9916 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9918 "https://github.com/pyserial/pyserial")
9919 (synopsis "Python Serial Port Bindings")
9920 (description "@code{pyserial} provide serial port bindings for Python. It
9921 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9922 and/or Xon/Xoff. The port is accessed in RAW mode.")
9923 (license license:bsd-3)))
9925 (define-public python2-pyserial
9926 (package-with-python2 python-pyserial))
9928 (define-public python-kivy
9930 (name "python-kivy")
9935 (uri (pypi-uri "Kivy" version))
9936 (file-name (string-append name "-" version ".tar.gz"))
9939 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9940 (build-system python-build-system)
9942 `(#:tests? #f ; Tests require many optional packages
9944 (modify-phases %standard-phases
9945 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9946 (lambda* (#:key inputs #:allow-other-keys)
9947 (setenv "KIVY_SDL2_PATH"
9948 (string-append (assoc-ref inputs "sdl-union")
9953 ("pkg-config" ,pkg-config)
9954 ("python-cython" ,python-cython)))
9956 `(("gstreamer" ,gstreamer)
9959 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9960 (home-page "http://kivy.org")
9962 "Multitouch application framework")
9964 "A software library for rapid development of
9965 hardware-accelerated multitouch applications.")
9966 (license license:expat)))
9968 (define-public python2-kivy
9969 (package-with-python2 python-kivy))
9971 (define-public python-kivy-next
9972 (deprecated-package "python-kivy-next" python-kivy))
9974 (define-public python2-kivy-next
9975 (deprecated-package "python2-kivy-next" python2-kivy))
9977 (define-public python-binaryornot
9979 (name "python-binaryornot")
9983 (uri (pypi-uri "binaryornot" version))
9986 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9987 (build-system python-build-system)
9989 `(("python-chardet" ,python-chardet)
9990 ("python-hypothesis" ,python-hypothesis)))
9991 (home-page "https://github.com/audreyr/binaryornot")
9992 (synopsis "Package to check if a file is binary or text")
9993 (description "Ultra-lightweight pure Python package to check if a file is
9995 (license license:bsd-3)
9996 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9998 (define-public python2-binaryornot
9999 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10000 (package (inherit base)
10002 `(("python2-enum34" ,python2-enum34)
10003 ,@(package-propagated-inputs base))))))
10005 (define-public python-nltk
10007 (name "python-nltk")
10011 (uri (pypi-uri "nltk" version))
10014 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10015 (build-system python-build-system)
10017 '(;; The tests require some extra resources to be downloaded.
10018 ;; TODO Try packaging these resources.
10020 (home-page "http://nltk.org/")
10021 (synopsis "Natural Language Toolkit")
10022 (description "It provides interfaces to over 50 corpora and lexical
10023 resources such as WordNet, along with a suite of text processing libraries
10024 for classification, tokenization, stemming, tagging, parsing, and semantic
10025 reasoning, wrappers for natural language processing libraries.")
10026 (license license:asl2.0)))
10028 (define-public python2-nltk
10029 (package-with-python2 python-nltk))
10031 (define-public python-pymongo
10033 (name "python-pymongo")
10037 (uri (pypi-uri "pymongo" version))
10040 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10041 (build-system python-build-system)
10043 `(("python-certifi" ,python-certifi)))
10044 (home-page "https://github.com/mongodb/mongo-python-driver")
10045 (synopsis "Python driver for MongoDB")
10046 (description "Python driver for MongoDB.")
10047 (license license:asl2.0)))
10049 (define-public python2-pymongo
10050 (package-with-python2 python-pymongo))
10052 (define-public python-consul
10054 (name "python-consul")
10059 (uri (pypi-uri "python-consul" version))
10062 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10063 (build-system python-build-system)
10065 '(#:tests? #f)) ; The tests are not distributed
10067 `(("python-requests" ,python-requests)
10068 ("python-six" ,python-six)))
10069 (home-page "https://github.com/cablehead/python-consul")
10070 (synopsis "Python client for Consul")
10072 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10073 discovery, monitoring and configuration.")
10074 (license license:expat)))
10076 (define-public python2-consul
10077 (package-with-python2 python-consul))
10079 (define-public python-schematics
10081 (name "python-schematics")
10086 (uri (string-append
10087 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10088 (file-name (string-append name "-" version ".tar.gz"))
10091 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10092 (build-system python-build-system)
10094 `(("python-six" ,python-six)))
10096 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10097 ; version requirements (eg python-coveralls)
10098 (home-page "https://github.com/schematics/schematics")
10099 (synopsis "Python Data Structures for Humans")
10100 (description "Python Data Structures for Humans.")
10101 (license license:bsd-3)))
10103 (define-public python2-schematics
10104 (package-with-python2 python-schematics))
10106 (define-public python-odfpy
10108 (name "python-odfpy")
10112 (uri (pypi-uri "odfpy" version))
10115 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10117 `(#:modules ((srfi srfi-1)
10118 (guix build python-build-system)
10119 (guix build utils))
10121 (modify-phases %standard-phases
10123 ;; The test runner invokes python2 and python3 for test*.py.
10124 ;; To avoid having both in inputs, we replicate it here.
10126 (for-each (lambda (test-file) (invoke "python" test-file))
10127 (find-files "tests" "^test.*\\.py$"))
10129 (build-system python-build-system)
10130 (home-page "https://github.com/eea/odfpy")
10131 (synopsis "Python API and tools to manipulate OpenDocument files")
10132 (description "Collection of libraries and utility programs written in
10133 Python to manipulate OpenDocument 1.2 files.")
10135 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10136 ;; number of files with other licenses.
10137 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10139 (define-public python2-odfpy
10140 (package-with-python2 python-odfpy))
10142 (define-public python-natsort
10144 (name "python-natsort")
10148 (uri (pypi-uri "natsort" version))
10151 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10152 (build-system python-build-system)
10154 `(#:modules ((guix build utils)
10155 (guix build python-build-system)
10160 (modify-phases %standard-phases
10161 (add-before 'check 'set-cachedir
10162 ;; Tests require write access to $HOME by default
10163 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10166 (let ((cwd (getcwd)))
10167 (setenv "PYTHONPATH"
10170 (find (cut string-prefix? "lib" <>)
10171 (scandir (string-append cwd "/build")))
10173 (getenv "PYTHONPATH")))
10174 (invoke "pytest" "-v")))))))
10176 `(("python-hypothesis" ,python-hypothesis)
10177 ("python-pytest-cov" ,python-pytest-cov)
10178 ("python-pytest-mock" ,python-pytest-mock)
10179 ("python-pytest" ,python-pytest)))
10180 (propagated-inputs ; TODO: Add python-fastnumbers.
10181 `(("python-pyicu" ,python-pyicu)))
10182 (home-page "https://github.com/SethMMorton/natsort")
10183 (synopsis "Natural sorting for python and shell")
10185 "Natsort lets you apply natural sorting on lists instead of
10186 lexicographical. If you use the built-in @code{sorted} method in python
10187 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10188 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10189 function @code{natsorted} that identifies numbers and sorts them separately
10190 from strings. It can also sort version numbers, real numbers, mixed types
10191 and more, and comes with a shell command @command{natsort} that exposes this
10192 functionality in the command line.")
10193 (license license:expat)
10194 (properties `((python2-variant . ,(delay python2-natsort))))))
10196 (define-public python2-natsort
10197 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10198 (package (inherit base)
10200 `(("python2-pathlib" ,python2-pathlib)
10201 ,@(package-native-inputs base))))))
10203 (define-public python-glances
10205 (name "python-glances")
10210 (uri (pypi-uri "Glances" version))
10213 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10214 (build-system python-build-system)
10216 `(("python-psutil" ,python-psutil)))
10218 "https://github.com/nicolargo/glances")
10220 "A cross-platform curses-based monitoring tool")
10222 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10223 Glances uses the PsUtil library to get information from your system. It monitors
10224 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10225 (license license:lgpl3+)))
10227 (define-public python2-glances
10228 (package-with-python2 python-glances))
10230 (define-public python-graphql-core
10232 (name "python-graphql-core")
10237 (uri (pypi-uri "graphql-core" version))
10240 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10241 (build-system python-build-system)
10243 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10245 (modify-phases %standard-phases
10246 (add-after 'unpack 'patch-hardcoded-version
10247 (lambda _ (substitute*
10249 (("'gevent==1.1rc1'") "'gevent'"))
10252 `(("python-gevent" ,python-gevent)
10253 ("python-mock" ,python-mock)
10254 ("python-pytest-mock" ,python-pytest-mock)))
10256 `(("python-promise" ,python-promise)
10257 ("python-six" ,python-six)))
10258 (home-page "https://github.com/graphql-python/graphql-core")
10259 (synopsis "GraphQL implementation for Python")
10261 "GraphQL implementation for Python. GraphQL is a data query language and
10262 runtime designed and used to request and deliver data to mobile and web apps.
10263 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10265 (license license:expat)))
10267 (define-public python2-graphql-core
10268 (package-with-python2 python-graphql-core))
10270 (define-public python-graphql-relay
10272 (name "python-graphql-relay")
10277 (uri (pypi-uri "graphql-relay" version))
10280 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10281 (build-system python-build-system)
10283 '(#:tests? #f)) ; The tests are not distributed
10285 `(("python-graphql-core" ,python-graphql-core)
10286 ("python-promise" ,python-promise)
10287 ("python-six" ,python-six)))
10288 (home-page "https://github.com/graphql-python/graphql-relay-py")
10289 (synopsis "Relay implementation for Python")
10291 "This is a library to allow the easy creation of Relay-compliant servers
10292 using the GraphQL Python reference implementation of a GraphQL server. It
10293 should be noted that the code is a exact port of the original
10294 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10296 (license license:expat)))
10298 (define-public python2-graphql-relay
10299 (package-with-python2 python-graphql-relay))
10301 (define-public python-graphene
10303 (name "python-graphene")
10308 (uri (pypi-uri "graphene" version))
10311 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10312 (build-system python-build-system)
10314 `(("python-graphql-core" ,python-graphql-core)
10315 ("python-graphql-relay" ,python-graphql-relay)
10316 ("python-iso8601" ,python-iso8601)
10317 ("python-promise" ,python-promise)
10318 ("python-six" ,python-six)))
10320 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10321 (home-page "http://graphene-python.org/")
10322 (synopsis "GraphQL Framework for Python")
10324 "Graphene is a Python library for building GraphQL schemas/types.
10325 A GraphQL schema describes your data model, and provides a GraphQL server
10326 with an associated set of resolve methods that know how to fetch data.")
10327 (properties `((python2-variant . ,(delay python2-graphene))))
10328 (license license:expat)))
10330 (define-public python2-graphene
10331 (let ((base (package-with-python2
10332 (strip-python2-variant python-graphene))))
10333 (package (inherit base)
10335 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10336 ,@(package-native-inputs base))))))
10338 (define-public python-nautilus
10340 (name "python-nautilus")
10345 (uri (pypi-uri "nautilus" version))
10348 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10349 (build-system python-build-system)
10350 (arguments `(#:tests? #f)) ; fails to import test modules
10352 `(("python-bcrypt" ,python-bcrypt)
10353 ("python-click" ,python-click)
10354 ("python-consul" ,python-consul)
10355 ("python-graphene" ,python-graphene)
10356 ("python-jinja2" ,python-jinja2)
10357 ("python-peewee" ,python-peewee)
10358 ("python-pika" ,python-pika)
10359 ("python-tornado" ,python-tornado)
10360 ("python-wtforms" ,python-wtforms)))
10362 `(("python-nose2" ,python-nose2)))
10363 (home-page "https://github.com/AlecAivazis/nautilus")
10364 (synopsis "Library for creating microservice applications")
10366 "Nautilus is a framework for flux based microservices that looks to
10367 provide extendible implementations of common aspects of a cloud so that you can
10368 focus on building massively scalable web applications.")
10369 (license license:expat)))
10371 (define-public python-snowballstemmer
10373 (name "python-snowballstemmer")
10377 (uri (pypi-uri "snowballstemmer" version))
10380 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10381 (build-system python-build-system)
10383 `(;; No tests exist
10385 (home-page "https://github.com/shibukawa/snowball_py")
10386 (synopsis "Snowball stemming library collection for Python")
10387 (description "This package provides 16 word stemmer algorithms generated
10388 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10390 (license license:bsd-3)))
10392 (define-public python2-snowballstemmer
10393 (package-with-python2 python-snowballstemmer))
10395 (define-public python-sphinx-cloud-sptheme
10397 (name "python-sphinx-cloud-sptheme")
10401 (uri (pypi-uri "cloud_sptheme" version))
10404 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10405 (build-system python-build-system)
10406 ;; FIXME: The 'pypi' release archive does not contain tests.
10407 (arguments '(#:tests? #f))
10409 `(("python-sphinx" ,python-sphinx)))
10410 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10411 (synopsis "'Cloud' theme for Sphinx documenter")
10412 (description "This package contains the \"Cloud\" theme for Sphinx and some
10413 related extensions.")
10414 (license license:bsd-3)))
10416 (define-public python2-sphinx-cloud-sptheme
10417 (package-with-python2 python-sphinx-cloud-sptheme))
10419 (define-public python-sphinx-alabaster-theme
10421 (name "python-sphinx-alabaster-theme")
10425 (uri (pypi-uri "alabaster" version))
10428 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10429 (build-system python-build-system)
10431 `(("python-pygments" ,python-pygments)))
10432 (home-page "https://alabaster.readthedocs.io/")
10433 (synopsis "Configurable sidebar-enabled Sphinx theme")
10434 (description "Alabaster is a visually (c)lean, responsive, configurable
10435 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10436 (license license:bsd-3)))
10438 (define-public python2-sphinx-alabaster-theme
10439 (package-with-python2 python-sphinx-alabaster-theme))
10441 (define-public python-setproctitle
10443 (name "python-setproctitle")
10448 (uri (pypi-uri "setproctitle" version))
10451 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10452 (build-system python-build-system)
10455 (modify-phases %standard-phases
10456 (add-before 'check 'patch-Makefile
10457 ;; Stricly this is only required for the python2 variant.
10458 ;; But adding a phase in an inherited package seems to be
10459 ;; cumbersum. So we patch even for python3.
10461 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10463 (substitute* "Makefile"
10464 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10465 (string-append nose "/bin/nosetests "))))
10469 (setenv "PYTHON" (or (which "python3") (which "python")))
10470 (setenv "PYCONFIG" (or (which "python3-config")
10471 (which "python-config")))
10472 (setenv "CC" "gcc")
10473 ;; No need to extend PYTHONPATH to find the built package, since
10474 ;; the Makefile will build anyway
10475 (invoke "make" "check"))))))
10477 `(("procps" ,procps))) ; required for tests
10479 "https://github.com/dvarrazzo/py-setproctitle")
10481 "Setproctitle implementation for Python to customize the process title")
10482 (description "The library allows a process to change its title (as displayed
10483 by system tools such as ps and top).
10485 Changing the title is mostly useful in multi-process systems, for
10486 example when a master process is forked: changing the children's title
10487 allows to identify the task each process is busy with. The technique
10488 is used by PostgreSQL and the OpenSSH Server for example.")
10489 (license license:bsd-3)
10490 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10492 (define-public python2-setproctitle
10493 (let ((base (package-with-python2
10494 (strip-python2-variant python-setproctitle))))
10497 (native-inputs `(("python2-nose" ,python2-nose)
10498 ,@(package-native-inputs base))))))
10500 (define-public python-validictory
10502 (name "python-validictory")
10507 (uri (pypi-uri "validictory" version))
10510 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10511 (build-system python-build-system)
10514 (modify-phases %standard-phases
10515 (add-after 'unpack 'bootstrap
10516 ;; Move the tests out of the package directory to avoid
10519 (rename-file "validictory/tests" "tests")
10520 (delete-file "tests/__init__.py")))
10523 ;; Extend PYTHONPATH so the built package will be found.
10524 (setenv "PYTHONPATH"
10525 (string-append (getcwd) "/build/lib:"
10526 (getenv "PYTHONPATH")))
10527 (invoke "py.test" "-vv" ))))))
10529 `(("python-pytest" ,python-pytest)))
10531 "https://github.com/jamesturk/validictory")
10532 (synopsis "General purpose Python data validator")
10533 (description "It allows validation of arbitrary Python data structures.
10535 The schema format is based on the JSON Schema
10536 proposal (http://json-schema.org), so combined with json the library is also
10537 useful as a validator for JSON data.")
10538 (license license:expat)))
10540 (define-public python2-validictory
10541 (package-with-python2 python-validictory))
10543 (define-public python-pyelftools
10545 (name "python-pyelftools")
10550 (uri (pypi-uri "pyelftools" version))
10553 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10554 (build-system python-build-system)
10557 (modify-phases %standard-phases
10558 (add-before 'check 'set-pythonpath
10560 (setenv "PYTHONPATH"
10563 ":" (getenv "PYTHONPATH")))
10566 "https://github.com/eliben/pyelftools")
10568 "Analyze binary and library file information")
10569 (description "This Python library provides interfaces for parsing and
10570 analyzing two binary and library file formats; the Executable and Linking
10571 Format (ELF), and debugging information in the Debugging With Attributed
10572 Record Format (DWARF).")
10573 (license license:public-domain)))
10575 (define-public python-pyev
10577 (name "python-pyev")
10582 (uri (pypi-uri "pyev" version))
10585 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10586 (build-system python-build-system)
10588 `(#:tests? #f ; no test suite
10590 (modify-phases %standard-phases
10591 (add-after 'unpack 'patch
10592 (lambda* (#:key inputs #:allow-other-keys)
10593 (let ((libev (string-append (assoc-ref inputs "libev")
10594 "/lib/libev.so.4")))
10595 (substitute* "setup.py"
10596 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10597 (string-append "libev_dll_name = \"" libev "\"")))))))))
10599 `(("libev" ,libev)))
10600 (home-page "http://pythonhosted.org/pyev/")
10601 (synopsis "Python libev interface")
10602 (description "Pyev provides a Python interface to libev.")
10603 (license license:gpl3)))
10605 (define-public python2-pyev
10606 (package-with-python2 python-pyev))
10608 (define-public python-imagesize
10610 (name "python-imagesize")
10615 (uri (pypi-uri "imagesize" version))
10618 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10619 (build-system python-build-system)
10620 (home-page "https://github.com/shibukawa/imagesize_py")
10621 (synopsis "Gets image size of files in various formats in Python")
10623 "This package allows determination of image size from
10624 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10625 (license license:expat)))
10627 (define-public python2-imagesize
10628 (package-with-python2 python-imagesize))
10630 (define-public python-termstyle
10632 (name "python-termstyle")
10637 (uri (pypi-uri "termstyle" version))
10640 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10641 (build-system python-build-system)
10644 (modify-phases %standard-phases
10647 (invoke "python" "test3.py"))))))
10648 (home-page "https://github.com/gfxmonk/termstyle")
10649 (synopsis "Console text coloring for Python")
10650 (description "This package provides console text coloring for Python.")
10651 (license license:bsd-3)))
10653 (define-public python-argcomplete
10655 (name "python-argcomplete")
10660 (uri (pypi-uri "argcomplete" version))
10663 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10664 (build-system python-build-system)
10666 `(("python-pexpect" ,python-pexpect)
10668 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10669 (home-page "https://github.com/kislyuk/argcomplete")
10670 (synopsis "Shell tab completion for Python argparse")
10671 (description "argcomplete provides extensible command line tab completion
10672 of arguments and options for Python scripts using @code{argparse}. It's
10673 particularly useful for programs with many options or sub-parsers that can
10674 dynamically suggest completions; for example, when browsing resources over the
10676 (license license:asl2.0)))
10678 (define-public python2-argcomplete
10679 (package-with-python2 python-argcomplete))
10681 (define-public python-xopen
10683 (name "python-xopen")
10688 (uri (pypi-uri "xopen" version))
10691 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10692 (file-name (string-append name "-" version ".tar.gz"))))
10693 (build-system python-build-system)
10694 (home-page "https://github.com/marcelm/xopen/")
10695 (synopsis "Open compressed files transparently")
10696 (description "This module provides an @code{xopen} function that works like
10697 Python's built-in @code{open} function, but can also deal with compressed files.
10698 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10699 recognized by their file extensions. The focus is on being as efficient as
10700 possible on all supported Python versions.")
10701 (license license:expat)))
10703 (define-public python2-xopen
10704 (let ((base (package-with-python2
10705 (strip-python2-variant python-xopen))))
10708 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10709 ,@(package-propagated-inputs base))))))
10711 (define-public python-cheetah
10713 (name "python-cheetah")
10718 (uri (pypi-uri "Cheetah3" version))
10721 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10722 (build-system python-build-system)
10724 `(#:modules ((guix build utils)
10725 (guix build python-build-system)
10729 #:phases (modify-phases %standard-phases
10730 (add-after 'unpack 'use-absolute-python
10732 (substitute* "Cheetah/CheetahWrapper.py"
10733 (("#!/usr/bin/env python")
10734 (string-append "#!" (which "python"))))
10738 (let ((cwd (getcwd)))
10739 (setenv "PYTHONPATH"
10742 (find (cut string-prefix? "lib" <>)
10743 (scandir (string-append cwd "/build")))
10744 ":" (getenv "PYTHONPATH")))
10746 (string-append (getenv "PATH")
10748 (setenv "TMPDIR" "/tmp")
10750 (substitute* "Cheetah/Tests/Test.py"
10751 (("unittest.TextTestRunner\\(\\)")
10752 "unittest.TextTestRunner(verbosity=2)"))
10754 (invoke "python" "Cheetah/Tests/Test.py")))))))
10756 `(("python-markdown" ,python-markdown))) ;optional
10757 (home-page "http://cheetahtemplate.org/")
10758 (synopsis "Template engine")
10759 (description "Cheetah is a text-based template engine and Python code
10762 Cheetah can be used as a standalone templating utility or referenced as
10763 a library from other Python applications. It has many potential uses,
10764 but web developers looking for a viable alternative to ASP, JSP, PHP and
10765 PSP are expected to be its principle user group.
10769 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10771 @item Cleanly separates content, graphic design, and program code.
10772 @item Blends the power and flexibility of Python with a simple template language
10773 that non-programmers can understand.
10774 @item Gives template writers full access to any Python data structure, module,
10775 function, object, or method in their templates.
10776 @item Makes code reuse easy by providing an object-orientated interface to
10777 templates that is accessible from Python code or other Cheetah templates.
10778 One template can subclass another and selectively reimplement sections of it.
10779 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10780 improve the performance of a dynamic website.
10781 @item Compiles templates into optimized, yet readable, Python code.
10783 (license (license:x11-style "file://LICENSE"))))
10785 (define-public python2-cheetah
10786 (package-with-python2 python-cheetah))
10788 (define-public python-dulwich
10790 (name "python-dulwich")
10795 (uri (list (string-append "https://www.dulwich.io/releases/"
10796 "dulwich-" version ".tar.gz")
10797 (pypi-uri "dulwich" version)))
10800 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10801 (build-system python-build-system)
10804 (modify-phases %standard-phases
10805 (add-before 'check 'fix-tests
10806 (lambda* (#:key inputs #:allow-other-keys)
10807 ;; The tests use Popen with a custom environment which doesn't
10809 (substitute* "dulwich/tests/compat/utils.py"
10810 (("'git'") (string-append "'"
10813 (substitute* '("dulwich/tests/test_repository.py"
10814 "dulwich/tests/test_hooks.py")
10815 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10816 (setenv "TEST_RUNNER" "unittest")
10817 (setenv "PYTHONHASHSEED" "random")
10820 `(("python-fastimport" ,python-fastimport)))
10822 `(("python-mock" ,python-mock)
10823 ("python-geventhttpclient" ,python-geventhttpclient)
10825 (home-page "https://www.dulwich.io/")
10826 (synopsis "Git implementation in Python")
10827 (description "Dulwich is an implementation of the Git file formats and
10828 protocols written in pure Python.")
10829 ;; Can be used with either license.
10830 (license (list license:asl2.0 license:gpl2+))))
10832 (define-public python2-dulwich
10833 (package-with-python2 python-dulwich))
10835 (define-public python-pbkdf2
10837 (name "python-pbkdf2")
10842 (uri (pypi-uri "pbkdf2" version))
10845 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10846 (build-system python-build-system)
10849 (modify-phases %standard-phases
10852 (setenv "PYTHONPATH"
10853 (string-append (getcwd) "/build/lib:"
10854 (getenv "PYTHONPATH")))
10855 (invoke "python" "test/test_pbkdf2.py"))))))
10857 `(("python-pycrypto" ,python-pycrypto))) ; optional
10858 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10859 (synopsis "Password-based key derivation")
10860 (description "This module implements the password-based key derivation
10861 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10863 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10864 is part of the RSA Public Key Cryptography Standards series. The provided
10865 implementation takes a password or a passphrase and a salt value (and
10866 optionally a iteration count, a digest module, and a MAC module) and provides
10867 a file-like object from which an arbitrarly-sized key can be read.")
10868 (license license:expat)))
10870 (define-public python2-pbkdf2
10871 (package-with-python2 python-pbkdf2))
10873 (define-public python-qrcode
10875 (name "python-qrcode")
10880 (uri (pypi-uri "qrcode" version))
10882 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
10883 (build-system python-build-system)
10885 ;; FIXME: Tests require packaging 'pymaging'.
10888 `(("python-lxml" ,python-lxml) ; for SVG output
10889 ("python-pillow" ,python-pillow) ; for PNG output
10890 ("python-six" ,python-six)))
10891 (home-page "https://github.com/lincolnloop/python-qrcode")
10892 (synopsis "QR Code image generator")
10893 (description "This package provides a pure Python QR Code generator
10894 module. It uses the Python Imaging Library (PIL) to allow for the generation
10897 In addition this package provides a command line tool to generate QR codes and
10898 either write these QR codes to a file or do the output as ascii art at the
10900 (license license:bsd-3)))
10902 (define-public python2-qrcode
10903 (package-with-python2 python-qrcode))
10905 (define-public python-rst2ansi
10907 (name "python-rst2ansi")
10912 (uri (pypi-uri "rst2ansi" version))
10915 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10916 (build-system python-build-system)
10918 `(("python-docutils" ,python-docutils)))
10919 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10920 (synopsis "Convert RST to ANSI-decorated console output")
10922 "Python module dedicated to rendering RST (reStructuredText) documents
10923 to ansi-escaped strings suitable for display in a terminal.")
10924 (license license:expat)))
10926 (define-public python-ansi2html
10928 (name "python-ansi2html")
10933 (uri (pypi-uri "ansi2html" version))
10936 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10937 (build-system python-build-system)
10939 `(("python-mock" ,python-mock)
10940 ("python-nose" ,python-nose)))
10942 `(("python-six" ,python-six)))
10943 (home-page "https://github.com/ralphbean/ansi2html")
10944 (synopsis "Convert ANSI-decorated console output to HTML")
10946 "@command{ansi2html} is a Python library and command line utility for
10947 convering text with ANSI color codes to HTML or LaTeX.")
10948 (license license:gpl3+)))
10950 (define-public python2-ansi2html
10951 (package-with-python2 python-ansi2html))
10953 (define-public python-ddt
10955 (name "python-ddt")
10960 (uri (pypi-uri "ddt" version))
10963 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10964 (build-system python-build-system)
10966 `(("python-mock" ,python-mock)
10967 ("python-nose" ,python-nose)))
10969 `(("python-six" ,python-six)
10970 ("python-pyyaml" ,python-pyyaml)))
10971 (home-page "https://github.com/txels/ddt")
10972 (synopsis "Data-Driven Tests")
10974 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10975 running it with different test data, and make it appear as multiple test
10977 (license license:expat)))
10979 (define-public python2-ddt
10980 (package-with-python2 python-ddt))
10982 (define-public python-pycountry
10984 (name "python-pycountry")
10985 (version "18.5.26")
10989 (uri (pypi-uri "pycountry" version))
10992 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10993 (build-system python-build-system)
10994 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10995 (synopsis "ISO databases for languages, countries, currencies, etc.")
10997 "@code{pycountry} provides the ISO databases for the standards:
10999 @item 639-3 (Languages)
11000 @item 3166 (Countries)
11001 @item 3166-3 (Deleted Countries)
11002 @item 3166-2 (Subdivisions of countries)
11003 @item 4217 (Currencies)
11004 @item 15924 (Scripts)
11006 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11007 through a Python API.")
11008 (license license:lgpl2.1+)))
11010 (define-public python2-pycountry
11011 (package-with-python2 python-pycountry))
11013 (define-public python-pycosat
11015 (name "python-pycosat")
11020 (uri (pypi-uri "pycosat" version))
11023 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11024 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11025 (build-system python-build-system)
11026 (home-page "https://github.com/ContinuumIO/pycosat")
11027 (synopsis "Bindings to picosat (a SAT solver)")
11029 "This package provides efficient Python bindings to @code{picosat} on
11030 the C level. When importing pycosat, the @code{picosat} solver becomes part
11031 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11032 Problem} (SAT) solver.")
11033 (license license:expat)))
11035 (define-public python2-pycosat
11036 (package-with-python2 python-pycosat))
11038 (define-public python2-ruamel.ordereddict
11040 (name "python2-ruamel.ordereddict")
11045 (uri (pypi-uri "ruamel.ordereddict" version))
11048 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11049 (build-system python-build-system)
11051 `(#:python ,python-2
11053 (modify-phases %standard-phases
11055 (add-after 'install 'check
11056 (lambda* (#:key inputs outputs #:allow-other-keys)
11057 (add-installed-pythonpath inputs outputs)
11058 (invoke "python" "test/testordereddict.py"))))))
11059 (home-page "https://bitbucket.org/ruamel/ordereddict")
11060 (synopsis "Version of dict that keeps keys in insertion order")
11062 "This is an implementation of an ordered dictionary with @dfn{Key
11063 Insertion Order} (KIO: updates of values do not affect the position of the
11064 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11065 removed and put at the back). The standard library module @code{OrderedDict},
11066 implemented later, implements a subset of @code{ordereddict} functionality.
11067 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11068 Order} (KSO, no sorting function can be specified, but a transform can be
11069 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11070 (license license:expat)))
11072 (define-public python-pypeg2
11074 (name "python-pypeg2")
11079 (uri (pypi-uri "pyPEG2" version))
11082 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11083 (build-system python-build-system)
11084 (propagated-inputs `(("python-lxml" ,python-lxml)))
11086 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11088 (home-page "https://fdik.org/pyPEG/")
11089 (synopsis "Parsering Expression Grammars in Python")
11090 (description "PyPEG is an intrinsic parser interpreter framework for
11091 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11092 parse many formal languages.")
11093 (license license:gpl2)))
11095 (define-public python-incremental
11097 (name "python-incremental")
11102 (uri (pypi-uri "incremental" version))
11105 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11106 (build-system python-build-system)
11107 (home-page "https://github.com/hawkowl/incremental")
11108 (synopsis "Library for versioning Python projects")
11109 (description "Incremental is a small library that versions your Python
11111 (license license:expat)))
11113 (define-public python2-incremental
11114 (package-with-python2 python-incremental))
11116 (define-public python-invoke
11118 (name "python-invoke")
11119 (home-page "http://www.pyinvoke.org/")
11123 (uri (pypi-uri "invoke" version))
11126 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11127 (build-system python-build-system)
11129 ;; XXX: Requires many dependencies that are not yet in Guix.
11131 (synopsis "Pythonic task execution")
11133 "Invoke is a Python task execution tool and library, drawing inspiration
11134 from various sources to arrive at a powerful and clean feature set. It is
11135 evolved from the Fabric project, but focuses on local and abstract concerns
11136 instead of servers and network commands.")
11137 (license license:bsd-3)))
11139 (define-public python2-invoke
11140 (package-with-python2 python-invoke))
11142 (define-public python-automat
11144 (name "python-automat")
11148 (uri (pypi-uri "Automat" version))
11151 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11152 (build-system python-build-system)
11153 ;; We disable the tests because they require python-twisted, while
11154 ;; python-twisted depends on python-automat. Twisted is optional, but the
11155 ;; tests fail if it is not available. Also see
11156 ;; <https://github.com/glyph/automat/issues/71>.
11157 (arguments '(#:tests? #f))
11159 `(("python-m2r" ,python-m2r)
11160 ("python-setuptools-scm" ,python-setuptools-scm)
11161 ("python-graphviz" ,python-graphviz)))
11163 `(("python-six" ,python-six)
11164 ("python-attrs" ,python-attrs)))
11165 (home-page "https://github.com/glyph/Automat")
11166 (synopsis "Self-service finite-state machines")
11167 (description "Automat is a library for concise, idiomatic Python
11168 expression of finite-state automata (particularly deterministic finite-state
11170 (license license:expat)))
11172 (define-public python2-automat
11173 (package-with-python2 python-automat))
11175 (define-public python-m2r
11177 (name "python-m2r")
11181 (uri (pypi-uri "m2r" version))
11184 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11185 (build-system python-build-system)
11187 `(("python-docutils" ,python-docutils)
11188 ("python-mistune" ,python-mistune)))
11190 `(("python-pygments" ,python-pygments)
11191 ("python-mock" ,python-mock)))
11192 (home-page "https://github.com/miyakogi/m2r")
11193 (synopsis "Markdown to reStructuredText converter")
11194 (description "M2R converts a markdown file including reST markups to valid
11196 (license license:expat)))
11198 (define-public python2-m2r
11199 (package-with-python2 python-m2r))
11201 (define-public python-constantly
11203 (name "python-constantly")
11207 (uri (pypi-uri "constantly" version))
11210 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11211 (build-system python-build-system)
11212 (home-page "https://github.com/twisted/constantly")
11213 (synopsis "Symbolic constants in Python")
11214 (description "Constantly is a Python library that provides symbolic
11215 constant support. It includes collections and constants with text, numeric,
11216 and bit flag values.")
11217 (license license:expat)))
11219 (define-public python2-constantly
11220 (package-with-python2 python-constantly))
11222 (define-public python-attrs
11224 (name "python-attrs")
11228 (uri (pypi-uri "attrs" version))
11231 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11232 (build-system python-build-system)
11234 `(#:modules ((guix build utils)
11235 (guix build python-build-system)
11239 #:phases (modify-phases %standard-phases
11242 (let ((cwd (getcwd)))
11243 (setenv "PYTHONPATH"
11246 (find (cut string-prefix? "lib" <>)
11247 (scandir (string-append cwd "/build")))
11249 (getenv "PYTHONPATH")))
11250 (invoke "python" "-m" "pytest")))))))
11252 `(("python-coverage" ,python-coverage)
11253 ("python-hypothesis" ,python-hypothesis)
11254 ("python-pympler" ,python-pympler)
11255 ("python-pytest" ,python-pytest)
11256 ("python-six" ,python-six)
11257 ("python-sphinx" ,python-sphinx)
11258 ("python-zope-interface" ,python-zope-interface)))
11259 (home-page "https://github.com/python-attrs/attrs/")
11260 (synopsis "Attributes without boilerplate")
11261 (description "@code{attrs} is a Python package with class decorators that
11262 ease the chores of implementing the most common attribute-related object
11264 (license license:expat)))
11266 (define-public python2-attrs
11267 (package-with-python2 python-attrs))
11269 (define-public python-attrs-bootstrap
11271 (inherit python-attrs)
11272 (name "python-attrs-bootstrap")
11273 ;; Keep this on a fixed version so python-attrs can be updated without
11274 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11278 (uri (pypi-uri "attrs" version))
11281 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11282 (native-inputs `())
11283 (arguments `(#:tests? #f))))
11285 (define-public python2-attrs-bootstrap
11286 (package-with-python2 python-attrs-bootstrap))
11288 (define-public python2-cliapp
11290 (name "python2-cliapp")
11291 (version "1.20170823")
11295 (uri (string-append
11296 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11297 version ".tar.gz"))
11300 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11301 (build-system python-build-system)
11303 `(#:python ,python-2
11305 (modify-phases %standard-phases
11306 ;; check phase needs to be run before the build phase. If not,
11307 ;; coverage-test-runner looks for tests for the built source files,
11310 (add-before 'build 'check
11312 ;; Disable python3 tests
11313 (substitute* "check"
11314 (("python3") "# python3"))
11315 (invoke "./check"))))))
11317 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11318 ("python2-pep8" ,python2-pep8)))
11320 `(("python2-pyaml" ,python2-pyaml)))
11321 (home-page "https://liw.fi/cliapp/")
11322 (synopsis "Python framework for command line programs")
11323 (description "@code{python2-cliapp} is a python framework for
11324 command line programs. It contains the typical stuff such programs
11325 need to do, such as parsing the command line for options, and
11326 iterating over input files.")
11327 (license license:gpl2+)))
11329 (define-public python2-ttystatus
11331 (name "python2-ttystatus")
11336 (uri (string-append
11337 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11338 version ".tar.gz"))
11341 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11342 (build-system python-build-system)
11344 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11345 ("python2-pep8" ,python2-pep8)))
11347 `(#:python ,python-2
11349 (modify-phases %standard-phases
11350 ;; check phase needs to be run before the build phase. If not,
11351 ;; coverage-test-runner looks for tests for the built source files,
11354 (add-before 'build 'check
11355 (lambda _ (invoke "make" "check"))))))
11356 (home-page "https://liw.fi/ttystatus/")
11357 (synopsis "Python library for showing progress reporting and
11358 status updates on terminals")
11359 (description "@code{python2-ttystatus} is a python library for
11360 showing progress reporting and status updates on terminals, for
11361 command line programs. Output is automatically adapted to the width
11362 of the terminal: truncated if it does not fit, and resized if the
11363 terminal size changes.")
11364 (license license:gpl3+)))
11366 (define-public python2-tracing
11368 (name "python2-tracing")
11373 (uri (string-append
11374 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11375 version ".tar.gz"))
11378 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11379 (build-system python-build-system)
11381 `(#:python ,python-2))
11382 (home-page "https://liw.fi/tracing/")
11383 (synopsis "Python debug logging helper")
11384 (description "@code{python2-tracing} is a python library for
11385 logging debug messages. It provides a way to turn debugging messages
11386 on and off, based on the filename they occur in. It is much faster
11387 than using @code{logging.Filter} to accomplish the same thing, which
11388 matters when code is run in production mode. The actual logging still
11389 happens using the @code{logging} library.")
11390 (license license:gpl3+)))
11392 (define-public python2-larch
11394 (name "python2-larch")
11395 (version "1.20151025")
11399 (uri (string-append
11400 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11401 version ".tar.gz"))
11402 (patches (search-patches
11403 "python2-larch-coverage-4.0a6-compatibility.patch"))
11406 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11407 (build-system python-build-system)
11409 `(#:python ,python-2
11411 (modify-phases %standard-phases
11412 ;; check phase needs to be run before the build phase. If not,
11413 ;; coverage-test-runner looks for tests for the built source files,
11416 (add-before 'build 'check
11417 (lambda _ (invoke "make" "check"))))))
11419 `(("cmdtest" ,cmdtest)
11420 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11422 `(("python2-tracing" ,python2-tracing)))
11423 (home-page "https://liw.fi/larch/")
11424 (synopsis "Python copy-on-write B-tree library")
11425 (description "@code{python2-larch} is an implementation of
11426 particular kind of B-tree, based on research by Ohad Rodeh. See
11427 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11428 on the data structure.
11430 The distinctive feature of this B-tree is that a node is never
11431 (conceptually) modified. Instead, all updates are done by
11432 copy-on-write. This makes it easy to clone a tree, and modify only the
11433 clone, while other processes access the original tree.")
11434 (license license:gpl3+)))
11436 (define-public python-astroid
11438 (name "python-astroid")
11443 (uri (pypi-uri "astroid" version))
11446 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11447 (build-system python-build-system)
11449 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11450 ("python-six" ,python-six)
11451 ("python-wrapt" ,python-wrapt)))
11453 `(("python-dateutil" ,python-dateutil)
11454 ("python-nose" ,python-nose)
11455 ("python-pytest" ,python-pytest)
11456 ("python-pytest-runner" ,python-pytest-runner)))
11459 (modify-phases %standard-phases
11460 (add-after 'unpack 'remove-spurious-test
11462 ;; This can be removed after upgrading from python-3.7
11463 ;; https://github.com/PyCQA/astroid/issues/593
11464 ;; https://bugs.python.org/issue34056
11465 (delete-file "astroid/tests/unittest_modutils.py")
11469 (invoke "pytest" "astroid"))))))
11470 (home-page "https://github.com/PyCQA/astroid")
11471 (synopsis "Common base representation of python source code for pylint and
11473 (description "@code{python-astroid} provides a common base representation
11474 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11476 It provides a compatible representation which comes from the _ast module. It
11477 rebuilds the tree generated by the builtin _ast module by recursively walking
11478 down the AST and building an extended ast. The new node classes have
11479 additional methods and attributes for different usages. They include some
11480 support for static inference and local name scopes. Furthermore, astroid
11481 builds partial trees by inspecting living objects.")
11482 (license license:lgpl2.1+)
11483 (properties `((python2-variant . ,(delay python2-astroid))))))
11485 (define-public python2-astroid
11486 (let ((base (package-with-python2
11487 (strip-python2-variant python-astroid))))
11488 (package (inherit base)
11489 ;; Version 2.x removes python2 support.
11494 (uri (pypi-uri "astroid" version))
11497 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11499 (substitute-keyword-arguments (package-arguments base)
11501 `(modify-phases ,phases
11502 (add-after 'unpack 'remove-spurious-test
11504 ;; https://github.com/PyCQA/astroid/issues/276
11505 (delete-file "astroid/tests/unittest_brain.py")
11509 (invoke"python" "-m" "unittest" "discover"
11510 "-p" "unittest*.py")))))))
11511 (native-inputs `())
11513 `(("python2-backports-functools-lru-cache"
11514 ,python2-backports-functools-lru-cache)
11515 ("python2-enum34" ,python2-enum34)
11516 ("python2-singledispatch" ,python2-singledispatch)
11517 ,@(package-propagated-inputs base))))))
11519 (define-public python-isort
11521 (name "python-isort")
11526 (uri (git-reference
11527 ;; Tests pass only from the Github sources
11528 (url "https://github.com/timothycrosley/isort")
11530 (file-name (git-file-name name version))
11533 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11534 (build-system python-build-system)
11536 `(("python-mock" ,python-mock)
11537 ("python-pytest" ,python-pytest)))
11538 (home-page "https://github.com/timothycrosley/isort")
11539 (synopsis "Python utility/library to sort python imports")
11540 (description "@code{python-isort} is a python utility/library to sort
11541 imports alphabetically, and automatically separated into sections. It
11542 provides a command line utility, a python library and plugins for various
11544 (license license:expat)
11545 (properties `((python2-variant . ,(delay python2-isort))))))
11547 (define-public python2-isort
11548 (let ((base (package-with-python2
11549 (strip-python2-variant python-isort))))
11550 (package (inherit base)
11552 `(("python2-futures" ,python2-futures)
11553 ,@(package-native-inputs base))))))
11555 (define-public python2-backports-functools-lru-cache
11557 (name "python2-backports-functools-lru-cache")
11562 ;; only the pypi tarballs contain the necessary metadata
11563 (uri (pypi-uri "backports.functools_lru_cache" version))
11566 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11567 (build-system python-build-system)
11569 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11571 `(#:python ,python-2))
11572 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11573 (synopsis "Backport of functools.lru_cache from Python 3.3")
11574 (description "@code{python2-backports-functools-lru-cache} is a backport
11575 of @code{functools.lru_cache} from python 3.3.")
11576 (license license:expat)))
11578 (define-public python-configparser
11580 (name "python-configparser")
11585 (uri (string-append
11586 "https://bitbucket.org/ambv/configparser/get/"
11587 version ".tar.bz2"))
11588 (file-name (string-append name "-" version ".tar.gz"))
11591 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11592 (build-system python-build-system)
11593 (home-page "https://github.com/jaraco/configparser/")
11594 (synopsis "Backport of configparser from python 3.5")
11595 (description "@code{python-configparser} is a backport of
11596 @code{configparser} from Python 3.5 so that it can be used directly
11597 in other versions.")
11598 (license license:expat)))
11600 (define-public python2-configparser
11601 (package-with-python2 python-configparser))
11603 (define-public python-mando
11605 (name "python-mando")
11609 (uri (pypi-uri "mando" version))
11612 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11613 (build-system python-build-system)
11615 `(("python-rst2ansi" ,python-rst2ansi)
11616 ("python-six" ,python-six)))
11618 `(("python-pytest" ,python-pytest)))
11619 (home-page "https://mando.readthedocs.org/")
11621 "Wrapper around argparse, allowing creation of complete CLI applications")
11623 "This package is a wrapper around argparse, allowing you to write complete CLI
11624 applications in seconds while maintaining all the flexibility.")
11625 (license license:expat)))
11627 (define-public python2-mando
11628 (package-with-python2 python-mando))
11630 (define-public python-fudge
11632 (name "python-fudge")
11633 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11634 ;; package, which is currently the only use of this package.
11639 (uri (pypi-uri "fudge" version))
11642 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11643 (build-system python-build-system)
11645 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11646 (home-page "https://github.com/fudge-py/fudge")
11647 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11649 "Fudge is a Python module for using fake objects (mocks and stubs) to
11652 In readable Python code, you declare the methods available on your fake object
11653 and how they should be called. Then you inject that into your application and
11654 start testing. This declarative approach means you don’t have to record and
11655 playback actions and you don’t have to inspect your fakes after running code.
11656 If the fake object was used incorrectly then you’ll see an informative
11657 exception message with a traceback that points to the culprit.")
11658 (license license:expat)))
11660 (define-public python2-fudge
11661 (package-with-python2 python-fudge))
11663 (define-public python-mwclient
11665 (name "python-mwclient")
11670 ;; The PyPI version wouldn't contain tests.
11671 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11672 "v" version ".tar.gz"))
11673 (file-name (string-append name "-" version ".tar.gz"))
11676 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11677 (build-system python-build-system)
11679 `(("python-requests" ,python-requests)
11680 ("python-requests-oauthlib"
11681 ,python-requests-oauthlib)
11682 ("python-six" ,python-six)))
11684 `(("python-mock" ,python-mock)
11685 ("python-pytest" ,python-pytest)
11686 ("python-pytest-pep8" ,python-pytest-pep8)
11687 ("python-pytest-cache" ,python-pytest-cache)
11688 ("python-pytest-cov" ,python-pytest-cov)
11689 ("python-responses" ,python-responses)))
11690 (home-page "https://github.com/btongminh/mwclient")
11691 (synopsis "MediaWiki API client")
11692 (description "This package provides a MediaWiki API client.")
11693 (license license:expat)))
11695 (define-public python2-mwclient
11696 (package-with-python2 python-mwclient))
11698 (define-public python-utils
11700 (name "python-utils")
11704 (uri (pypi-uri "python-utils" version))
11707 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11708 (build-system python-build-system)
11710 `(("pytest-runner" ,python-pytest-runner)
11711 ("pytest" ,python-pytest)
11712 ("six" ,python-six)))
11713 (home-page "https://github.com/WoLpH/python-utils")
11714 (synopsis "Convenient utilities not included with the standard Python install")
11716 "Python Utils is a collection of small Python functions and classes which
11717 make common patterns shorter and easier.")
11718 (license license:bsd-2)))
11720 (define-public python2-utils
11721 (package-with-python2 python-utils))
11723 (define-public python-sphinx-me
11725 (name "python-sphinx-me")
11730 (uri (pypi-uri "sphinx-me" version))
11733 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11734 (build-system python-build-system)
11735 (home-page "https://github.com/stephenmcd/sphinx-me")
11736 (synopsis "Create a Sphinx documentation shell")
11738 "Create a Sphinx documentation shell for your project and include the
11739 README file as the documentation index. It handles extracting the required
11740 meta data such as the project name, author and version from your project for
11741 use in your Sphinx docs.")
11742 (license license:bsd-2)))
11744 (define-public python2-sphinx-me
11745 (package-with-python2 python-sphinx-me))
11747 (define-public python-diff-match-patch
11749 (name "python-diff-match-patch")
11750 (version "20121119")
11754 (uri (pypi-uri "diff-match-patch" version))
11757 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11758 (build-system python-build-system)
11759 (home-page "https://code.google.com/p/google-diff-match-patch")
11760 (synopsis "Synchronize plain text")
11761 (description "Diff Match and Patch libraries offer robust algorithms to
11762 perform the operations required for synchronizing plain text.")
11763 (license license:asl2.0)))
11765 (define-public python2-diff-match-patch
11766 (package-with-python2 python-diff-match-patch))
11768 (define-public python-dirsync
11770 (name "python-dirsync")
11775 (uri (pypi-uri "dirsync" version))
11778 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11779 (build-system python-build-system)
11781 `(("six" ,python-six)))
11782 (home-page "https://bitbucket.org/tkhyn/dirsync")
11783 (synopsis "Advanced directory tree synchronisation tool")
11784 (description "Advanced directory tree synchronisation tool.")
11785 (license license:expat)))
11787 (define-public python2-dirsync
11788 (package-with-python2 python-dirsync))
11790 (define-public python-levenshtein
11792 (name "python-levenshtein")
11797 (uri (pypi-uri "python-Levenshtein" version))
11800 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11801 (build-system python-build-system)
11802 (home-page "https://github.com/ztane/python-Levenshtein")
11803 (synopsis "Fast computation of Levenshtein distance and string similarity")
11805 "The Levenshtein Python C extension module contains functions for fast computation of
11807 @item Levenshtein (edit) distance, and edit operations
11808 @item string similarity
11809 @item approximate median strings, and generally string averaging
11810 @item string sequence and set similarity
11812 It supports both normal and Unicode strings.")
11813 (license license:gpl2+)))
11815 (define-public python2-levenshtein
11816 (package-with-python2 python-levenshtein))
11818 (define-public python-scandir
11820 (name "python-scandir")
11825 (uri (pypi-uri "scandir" version))
11827 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11828 (build-system python-build-system)
11830 `(#:phases (modify-phases %standard-phases
11833 (invoke "python" "test/run_tests.py"))))))
11834 (home-page "https://github.com/benhoyt/scandir")
11835 (synopsis "Directory iteration function")
11837 "Directory iteration function like os.listdir(), except that instead of
11838 returning a list of bare filenames, it yields DirEntry objects that include
11839 file type and stat information along with the name. Using scandir() increases
11840 the speed of os.walk() by 2-20 times (depending on the platform and file
11841 system) by avoiding unnecessary calls to os.stat() in most cases.
11843 This package is part of the Python standard library since version 3.5.")
11844 (license license:bsd-3)))
11846 (define-public python2-scandir
11847 (package-with-python2 python-scandir))
11849 (define-public python2-stemming
11851 (name "python2-stemming")
11856 (uri (pypi-uri "stemming" version))
11858 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11859 (build-system python-build-system)
11861 `(#:python ,python-2))
11862 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11863 (synopsis "Python implementations of various stemming algorithms")
11865 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11866 stemming algorithms for English. These implementations are straightforward and
11867 efficient, unlike some Python versions of the same algorithms available on the
11868 Web. This package is an extraction of the stemming code included in the Whoosh
11870 (license license:public-domain)))
11872 (define-public python-factory-boy
11874 (name "python-factory-boy")
11879 (uri (pypi-uri "factory_boy" version))
11881 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11882 (build-system python-build-system)
11884 ;; Tests are not included in the tarball.
11887 `(("faker" ,python-faker)))
11888 (home-page "https://github.com/benhoyt/scandir")
11889 (synopsis "Versatile test fixtures replacement")
11891 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11893 As a fixtures replacement tool, it aims to replace static, hard to maintain
11894 fixtures with easy-to-use factories for complex object.
11896 Instead of building an exhaustive test setup with every possible combination
11897 of corner cases, factory_boy allows you to use objects customized for the
11898 current test, while only declaring the test-specific fields")
11899 (license license:expat)))
11901 (define-public python2-factory-boy
11902 (package-with-python2 python-factory-boy))
11904 (define-public python-translate-toolkit
11906 (name "python-translate-toolkit")
11911 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11913 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11914 (build-system python-build-system)
11916 `(("python-pytest" ,python-pytest)
11917 ("python-sphinx" ,python-sphinx)))
11919 `(("python-babel" ,python-babel)
11920 ("python-beautifulsoup4" ,python-beautifulsoup4)
11921 ("python-chardet" ,python-chardet)
11922 ("python-diff-match-patch" ,python-diff-match-patch)
11923 ("python-levenshtein" ,python-levenshtein)
11924 ("python-lxml" ,python-lxml)
11925 ("python-six" ,python-six)
11926 ("python-vobject" ,python-vobject)
11927 ("python-pyyaml" ,python-pyyaml)))
11929 ;; TODO: tests are not run, because they end with
11930 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11932 ;; during test setup.
11934 (home-page "http://toolkit.translatehouse.org")
11935 (synopsis "Tools and API for translation and localization engineering")
11937 "Tools and API for translation and localization engineering. It contains
11938 several utilities, as well as an API for building localization tools.")
11939 (license license:gpl2+)))
11941 (define-public python2-translate-toolkit
11942 (package-with-python2 python-translate-toolkit))
11944 (define-public python-packaging
11946 (name "python-packaging")
11951 (uri (pypi-uri "packaging" version))
11954 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11955 (build-system python-build-system)
11957 `(#:phases (modify-phases %standard-phases
11959 (lambda _ (invoke "py.test" "-vv"))))))
11961 `(("python-pretend" ,python-pretend)
11962 ("python-pytest" ,python-pytest)))
11964 `(("python-pyparsing" ,python-pyparsing)
11965 ("python-six" ,python-six)))
11966 (home-page "https://github.com/pypa/packaging")
11967 (synopsis "Core utilities for Python packages")
11968 (description "Packaging is a Python module for dealing with Python packages.
11969 It offers an interface for working with package versions, names, and dependency
11971 ;; From 'LICENSE': This software is made available under the terms of
11972 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11973 ;; Contributions to this software is made under the terms of *both* these
11975 (license (list license:asl2.0 license:bsd-2))))
11977 (define-public python2-packaging
11978 (package-with-python2 python-packaging))
11980 (define-public python-relatorio
11982 (name "python-relatorio")
11987 (uri (pypi-uri "relatorio" version))
11990 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11991 (build-system python-build-system)
11993 `(("python-lxml" ,python-lxml)
11994 ("python-genshi" ,python-genshi)))
11996 `(("python-magic" ,python-magic)))
11997 (home-page "https://relatorio.tryton.org/")
11998 (synopsis "Templating library able to output ODT and PDF files")
11999 (description "Relatorio is a templating library which provides a way to
12000 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12001 for more filetypes can be easily added by creating plugins for them.")
12002 (license license:gpl3+)))
12004 (define-public python2-relatorio
12005 (package-with-python2 python-relatorio))
12007 (define-public python-radon
12009 (name "python-radon")
12014 (uri (pypi-uri "radon" version))
12017 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12018 (build-system python-build-system)
12020 `(#:phases (modify-phases %standard-phases
12023 (invoke "python" "radon/tests/run.py"))))))
12025 `(("python-colorama" ,python-colorama)
12026 ("python-flake8-polyfill" ,python-flake8-polyfill)
12027 ("python-mando" ,python-mando)))
12029 `(("python-pytest" ,python-pytest)
12030 ("python-pytest-mock" ,python-pytest-mock)))
12031 (home-page "https://radon.readthedocs.org/")
12032 (synopsis "Code Metrics in Python")
12033 (description "Radon is a Python tool which computes various code metrics.
12034 Supported metrics are:
12036 @item raw metrics: SLOC, comment lines, blank lines, &c.
12037 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12038 @item Halstead metrics (all of them)
12039 @item the Maintainability Index (a Visual Studio metric)
12041 (license license:expat)))
12043 (define-public python2-radon
12044 (package-with-python2 python-radon))
12046 (define-public python-sure
12048 (name "python-sure")
12053 (uri (pypi-uri "sure" version))
12056 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12057 (build-system python-build-system)
12059 `(("python-mock" ,python-mock)
12060 ("python-six" ,python-six)))
12062 `(("python-nose" ,python-nose)))
12063 (home-page "https://github.com/gabrielfalcao/sure")
12064 (synopsis "Automated testing library in python for python")
12066 "Sure is a python library that leverages a DSL for writing assertions.
12067 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12068 (license license:gpl3+)))
12070 (define-public python2-sure
12071 (package-with-python2 python-sure))
12073 (define-public python2-couleur
12074 ;; This package does not seem to support python3 at all, hence,
12075 ;; only the python2 variant definition is provided.
12077 (name "python2-couleur")
12082 (uri (pypi-uri "couleur" version))
12085 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12086 (build-system python-build-system)
12088 `(#:python ,python-2))
12089 (home-page "https://github.com/gabrielfalcao/couleur")
12091 "ANSI terminal tool for python, colored shell and other handy fancy features")
12093 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12094 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12095 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12096 ;; https://github.com/gabrielfalcao/couleur/issues/11
12097 (license license:lgpl3+)))
12099 (define-public python-misaka
12101 (name "python-misaka")
12106 (uri (pypi-uri "misaka" version))
12109 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12110 (build-system python-build-system)
12112 `(;; Line 37 of setup.py calls self.run_command('develop')
12113 ;; in the 'check' phase. This command seems to be trying
12115 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12116 ;; for which it does not have the permission to write.
12119 `(("python-cffi" ,python-cffi)))
12120 (home-page "https://github.com/FSX/misaka")
12121 (synopsis "Python binding for Hoedown")
12123 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12124 library written in C. It features a fast HTML renderer and functionality to make custom
12125 renderers (e.g. man pages or LaTeX).")
12126 (license license:expat)))
12128 (define-public python2-misaka
12129 (package-with-python2 python-misaka))
12131 (define-public python2-steadymark
12132 ;; This is forced into being a python2 only variant
12133 ;; due to its dependence on couleur that has no support
12136 (name "python2-steadymark")
12141 (uri (pypi-uri "steadymark" version))
12144 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12145 (build-system python-build-system)
12147 `(("python-couleur" ,python2-couleur)
12148 ("python-sure" ,python2-sure)
12149 ("python-misaka" ,python2-misaka)))
12151 `(#:python ,python-2
12153 (modify-phases %standard-phases
12154 (add-before 'build 'patch-setup-py
12156 ;; Update requirements from dependency==version
12157 ;; to dependency>=version
12158 (substitute* "setup.py"
12161 (home-page "https://github.com/gabrielfalcao/steadymark")
12162 (synopsis "Markdown-based test runner for python")
12164 "@code{Steadymark} allows documentation to be written in github-flavoured
12165 markdown. The documentation may contain snippets of code surrounded by python
12166 code blocks and @code{Steadymark} will find these snippets and run them, making
12167 sure that there are no old malfunctional examples in the documentation examples.")
12168 (license license:expat)))
12170 (define-public python-jsonpointer
12172 (name "python-jsonpointer")
12177 (uri (pypi-uri "jsonpointer" version))
12180 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12181 (build-system python-build-system)
12182 (home-page "https://github.com/stefankoegl/python-json-pointer")
12183 (synopsis "Identify specific nodes in a JSON document")
12184 (description "@code{jsonpointer} allows you to access specific nodes
12185 by path in a JSON document (see RFC 6901).")
12186 (license license:bsd-3)))
12188 (define-public python2-jsonpointer
12189 (package-with-python2 python-jsonpointer))
12191 (define-public python-jsonpatch
12193 (name "python-jsonpatch")
12198 ;; pypi version lacks tests.js
12199 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12200 "archive/v" version ".tar.gz"))
12201 (file-name (string-append name "-" version ".tar.gz"))
12204 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12205 (build-system python-build-system)
12207 `(("python-jsonpointer" ,python-jsonpointer)))
12208 (home-page "https://github.com/stefankoegl/python-json-patch")
12209 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12210 (description "@code{jsonpatch} is a library and program that allows
12211 applying JSON Patches according to RFC 6902.")
12212 (license license:bsd-3)))
12214 (define-public python2-jsonpatch
12215 (package-with-python2 python-jsonpatch))
12217 (define-public python-jsonpatch-0.4
12218 (package (inherit python-jsonpatch)
12219 (name "python-jsonpatch")
12224 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12225 "archive/v" version ".tar.gz"))
12226 (file-name (string-append name "-" version ".tar.gz"))
12229 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12231 (define-public python2-jsonpatch-0.4
12232 (package-with-python2 python-jsonpatch-0.4))
12234 (define-public python-rfc3986
12236 (name "python-rfc3986")
12240 (uri (pypi-uri "rfc3986" version))
12243 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12244 (build-system python-build-system)
12246 `(#:modules ((guix build utils)
12247 (guix build python-build-system)
12252 (modify-phases %standard-phases
12255 (let ((cwd (getcwd)))
12256 (setenv "PYTHONPATH"
12257 (string-append cwd "/build/"
12258 (find (cut string-prefix? "lib" <>)
12259 (scandir (string-append cwd "/build")))
12261 (getenv "PYTHONPATH")))
12262 (invoke "pytest" "-v")))))))
12264 `(("python-pytest" ,python-pytest)))
12265 (home-page "https://rfc3986.readthedocs.io/")
12266 (synopsis "Parse and validate URI references")
12268 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12269 validation and authority parsing. This module also supports RFC@tie{}6874
12270 which adds support for zone identifiers to IPv6 addresses.")
12271 (license license:asl2.0)))
12273 (define-public python2-rfc3986
12274 (package-with-python2 python-rfc3986))
12276 (define-public python-rfc3987
12278 (name "python-rfc3987")
12283 (uri (pypi-uri "rfc3987" version))
12286 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12287 (build-system python-build-system)
12288 (home-page "https://pypi.python.org/pypi/rfc3987")
12289 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12290 (description "@code{rfc3987} provides routines for parsing and
12291 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12292 (license license:gpl3+)))
12294 (define-public python2-rfc3987
12295 (package-with-python2 python-rfc3987))
12297 (define-public python-validate-email
12299 (name "python-validate-email")
12304 (uri (pypi-uri "validate_email" version))
12307 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12308 (build-system python-build-system)
12309 (home-page "https://github.com/syrusakbary/validate_email")
12310 (synopsis "Verifies if an email address is valid and really exists")
12311 (description "@code{validate_email} can be used to verify if an email
12312 address is valid and really exists.")
12313 (license license:lgpl3+)))
12315 (define-public python2-validate-email
12316 (package-with-python2 python-validate-email))
12318 (define-public python-flex
12320 (name "python-flex")
12325 (uri (pypi-uri "flex" version))
12328 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12329 (build-system python-build-system)
12331 `(("python-click" ,python-click)
12332 ("python-iso8601" ,python-iso8601)
12333 ("python-jsonpointer" ,python-jsonpointer)
12334 ("python-pyyaml" ,python-pyyaml)
12335 ("python-requests" ,python-requests)
12336 ("python-rfc3987" ,python-rfc3987)
12337 ("python-six" ,python-six)
12338 ("python-validate-email" ,python-validate-email)))
12339 (home-page "https://github.com/pipermerriam/flex")
12340 (synopsis "Validates Swagger schemata")
12341 (description "@code{flex} can be used to validate Swagger schemata.")
12342 (license license:bsd-3)))
12344 (define-public python2-flex
12345 (package-with-python2 python-flex))
12347 (define-public python-marshmallow
12349 (name "python-marshmallow")
12350 (version "3.0.0b14")
12354 (uri (pypi-uri "marshmallow" version))
12357 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12358 (build-system python-build-system)
12360 `(("python-dateutil" ,python-dateutil)
12361 ("python-simplejson" ,python-simplejson)))
12363 `(("python-pytest" ,python-pytest)
12364 ("python-pytz" ,python-pytz)))
12365 (home-page "https://github.com/marshmallow-code/marshmallow")
12366 (synopsis "Convert complex datatypes to and from native
12367 Python datatypes.")
12368 (description "@code{marshmallow} provides a library for converting
12369 complex datatypes to and from native Python datatypes.")
12370 (license license:expat)))
12372 (define-public python2-marshmallow
12373 (package-with-python2 python-marshmallow))
12375 (define-public python-apispec
12377 (name "python-apispec")
12382 (uri (pypi-uri "apispec" version))
12385 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12386 (build-system python-build-system)
12388 `(("python-pyyaml" ,python-pyyaml)))
12390 `(("python-pytest" ,python-pytest)
12391 ("python-flask" ,python-flask)
12392 ("python-marshmallow" ,python-marshmallow)
12393 ("python-tornado" ,python-tornado)
12394 ("python-bottle" ,python-bottle)
12395 ("python-mock" ,python-mock)))
12396 (home-page "https://github.com/marshmallow-code/apispec")
12397 (synopsis "Swagger 2.0 API specification generator")
12398 (description "@code{python-apispec} is a pluggable API specification
12399 generator. Currently supports the OpenAPI specification (f.k.a.
12401 (license license:expat)))
12403 (define-public python2-apispec
12404 (package-with-python2 python-apispec))
12406 (define-public python-flasgger
12408 (name "python-flasgger")
12413 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12414 version ".tar.gz"))
12415 (file-name (string-append name "-" version ".tar.gz"))
12418 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12419 (build-system python-build-system)
12422 (modify-phases %standard-phases
12424 (lambda* (#:key inputs outputs #:allow-other-keys)
12425 (substitute* "Makefile"
12426 (("flake8 flasgger --ignore=F403")
12427 "flake8 flasgger --ignore=E731,F403"))
12428 (setenv "PYTHONPATH" (string-append (getcwd)
12430 (getenv "PYTHONPATH")))
12431 (invoke "py.test"))))))
12433 `(("python-flask" ,python-flask)
12434 ("python-pyyaml" ,python-pyyaml)
12435 ("python-jsonschema" ,python-jsonschema)
12436 ("python-mistune" ,python-mistune)
12437 ("python-six" ,python-six)))
12439 `(("python-decorator" ,python-decorator)
12440 ("python-flake8" ,python-flake8)
12441 ("python-flask-restful" ,python-flask-restful)
12442 ("python-flex" ,python-flex)
12443 ("python-pytest" ,python-pytest)
12444 ("python-pytest-cov" ,python-pytest-cov)
12445 ("python-marshmallow" ,python-marshmallow)
12446 ("python-apispec" ,python-apispec)))
12447 (home-page "https://github.com/rochacbruno/flasgger/")
12448 (synopsis "Extract Swagger specs from your Flask project")
12449 (description "@code{python-flasgger} allows extracting Swagger specs
12450 from your Flask project. It is a fork of Flask-Swagger.")
12451 (license license:expat)))
12453 (define-public python2-flasgger
12454 (package-with-python2 python-flasgger))
12456 (define-public python-swagger-spec-validator
12458 (name "python-swagger-spec-validator")
12463 (uri (pypi-uri "swagger-spec-validator" version))
12466 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12467 (build-system python-build-system)
12469 `(("python-jsonschema" ,python-jsonschema)
12470 ("python-six" ,python-six)))
12472 "https://github.com/Yelp/swagger_spec_validator")
12473 (synopsis "Validation of Swagger specifications")
12474 (description "@code{swagger_spec_validator} provides a library for
12475 validating Swagger API specifications.")
12476 (license license:asl2.0)))
12478 (define-public python2-swagger-spec-validator
12479 (package-with-python2 python-swagger-spec-validator))
12481 (define-public python-apache-libcloud
12483 (name "python-apache-libcloud")
12488 (uri (pypi-uri "apache-libcloud" version))
12491 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12492 (build-system python-build-system)
12495 (modify-phases %standard-phases
12496 (add-after 'unpack 'patch-ssh
12497 (lambda* (#:key inputs #:allow-other-keys)
12498 (substitute* "libcloud/compute/ssh.py"
12499 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12502 (add-after 'unpack 'patch-tests
12504 (substitute* "./libcloud/test/test_file_fixtures.py"
12505 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12506 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12507 return (httplib.OK,
12509 {\"test\": \"value\"},
12510 httplib.responses[httplib.OK])
12512 (substitute* "libcloud/test/compute/test_ssh_client.py"
12513 (("class ShellOutSSHClientTests")
12514 "@unittest.skip(\"Guix container doesn't have ssh service\")
12515 class ShellOutSSHClientTests")
12516 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12517 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12518 (("'.xF0', '.x90', '.x8D', '.x88'")
12519 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12521 (add-before 'check 'copy-secret
12523 (copy-file "libcloud/test/secrets.py-dist"
12524 "libcloud/test/secrets.py")
12527 `(("openssh" ,openssh)))
12529 `(("python-paramiko" ,python-paramiko)
12530 ("python-requests" ,python-requests)))
12532 `(("python-lockfile" ,python-lockfile)
12533 ("python-mock" ,python-mock)
12534 ("python-pytest" ,python-pytest)
12535 ("python-pytest-runner" ,python-pytest-runner)
12536 ("python-requests-mock" ,python-requests-mock)))
12537 (home-page "https://libcloud.apache.org/")
12538 (synopsis "Unified Cloud API")
12539 (description "@code{libcloud} is a Python library for interacting with
12540 many of the popular cloud service providers using a unified API.")
12541 (license license:asl2.0)))
12543 (define-public python2-apache-libcloud
12544 (package-with-python2 python-apache-libcloud))
12546 (define-public python-smmap2
12548 (name "python-smmap2")
12553 (uri (pypi-uri "smmap2" version))
12556 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12557 (build-system python-build-system)
12559 `(("python-nosexcover" ,python-nosexcover)))
12560 (home-page "https://github.com/Byron/smmap")
12561 (synopsis "Python sliding window memory map manager")
12562 (description "@code{smmap2} is a pure Python implementation of a sliding
12563 window memory map manager.")
12564 (license license:bsd-3)))
12566 (define-public python2-smmap2
12567 (package-with-python2 python-smmap2))
12569 (define-public python-regex
12571 (name "python-regex")
12572 (version "2017.06.07")
12575 (uri (pypi-uri "regex" version))
12578 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12579 (build-system python-build-system)
12580 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12581 (synopsis "Alternative regular expression module")
12582 (description "This regular expression implementation is backwards-
12583 compatible with the standard @code{re} module, but offers additional
12584 functionality like full case-folding for case-insensitive matches in Unicode.")
12585 (license license:psfl)))
12587 (define-public python2-regex
12588 (package-with-python2 python-regex))
12590 (define-public python2-pyopengl
12592 (name "python2-pyopengl")
12597 (uri (pypi-uri "PyOpenGL" version))
12600 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12602 `(#:python ,python-2))
12603 (build-system python-build-system)
12604 (home-page "http://pyopengl.sourceforge.net")
12605 (synopsis "Standard OpenGL bindings for Python")
12607 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12608 related APIs. The binding is created using the standard @code{ctypes}
12610 (license license:bsd-3)))
12612 (define-public python2-pyopengl-accelerate
12614 (inherit python2-pyopengl)
12615 (name "python2-pyopengl-accelerate")
12620 (uri (pypi-uri "PyOpenGL-accelerate" version))
12623 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12624 (synopsis "Acceleration code for PyOpenGL")
12626 "This is the Cython-coded accelerator module for PyOpenGL.")))
12628 (define-public python-rencode
12630 (name "python-rencode")
12635 (uri (pypi-uri "rencode" version))
12638 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12639 (build-system python-build-system)
12642 (modify-phases %standard-phases
12643 (add-before 'check 'delete-bogus-test
12644 ;; This test requires /home/aresch/Downloads, which is not provided by
12645 ;; the build environment.
12647 (delete-file "rencode/t.py")
12649 (native-inputs `(("pkg-config" ,pkg-config)
12650 ("python-cython" ,python-cython)))
12651 (home-page "https://github.com/aresch/rencode")
12652 (synopsis "Serialization of heterogeneous data structures")
12654 "The @code{rencode} module is a data structure serialization library,
12655 similar to @code{bencode} from the BitTorrent project. For complex,
12656 heterogeneous data structures with many small elements, r-encoding stake up
12657 significantly less space than b-encodings. This version of rencode is a
12658 complete rewrite in Cython to attempt to increase the performance over the
12659 pure Python module.")
12660 (license license:bsd-3)))
12662 (define-public python2-rencode
12663 (package-with-python2 python-rencode))
12665 (define-public python-xenon
12667 (name "python-xenon")
12672 (uri (pypi-uri "xenon" version))
12675 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12676 (build-system python-build-system)
12678 `(("python-pyyaml" ,python-pyyaml)
12679 ("python-radon" ,python-radon)
12680 ("python-requests" ,python-requests)
12681 ("python-flake8" ,python-flake8)
12682 ("python-tox" ,python-tox)))
12685 (modify-phases %standard-phases
12686 (add-before 'build 'patch-test-requirements
12688 ;; Remove httpretty dependency for tests.
12689 (substitute* "setup.py"
12690 (("httpretty") ""))
12692 (home-page "https://xenon.readthedocs.org/")
12693 (synopsis "Monitor code metrics for Python on your CI server")
12695 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12696 Ideally, @code{xenon} is run every time code is committed. Through command
12697 line options, various thresholds can be set for the complexity of code. It
12698 will fail (i.e. it will exit with a non-zero exit code) when any of these
12699 requirements is not met.")
12700 (license license:expat)))
12702 (define-public python2-xenon
12703 (package-with-python2 python-xenon))
12705 (define-public python-pysocks
12707 (name "python-pysocks")
12712 (uri (pypi-uri "PySocks" version))
12715 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12716 (build-system python-build-system)
12717 (arguments `(#:tests? #f))
12718 (home-page "https://github.com/Anorov/PySocks")
12719 (synopsis "SOCKS client module")
12720 (description "@code{pysocks} is an updated and semi-actively maintained
12721 version of @code{SocksiPy} with bug fixes and extra features.")
12722 (license license:bsd-3)))
12724 (define-public python2-pysocks
12725 (package-with-python2 python-pysocks))
12727 (define-public python-pydiff
12729 (name "python-pydiff")
12734 (uri (pypi-uri "pydiff" version))
12737 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12738 (build-system python-build-system)
12739 (home-page "https://github.com/myint/pydiff")
12740 (synopsis "Library to diff two Python files at the bytecode level")
12742 "@code{pydiff} makes it easy to look for actual code changes while
12743 ignoring formatting changes.")
12744 (license license:expat)))
12746 (define-public python2-pydiff
12747 (package-with-python2 python-pydiff))
12749 (define-public python-tqdm
12751 (name "python-tqdm")
12756 (uri (pypi-uri "tqdm" version))
12759 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12760 (build-system python-build-system)
12762 `(("python-flake8" ,python-flake8)
12763 ("python-nose" ,python-nose)
12764 ("python-coverage" ,python-coverage)))
12765 (home-page "https://github.com/tqdm/tqdm")
12766 (synopsis "Fast, extensible progress meter")
12768 "Make loops show a progress bar on the console by just wrapping any
12769 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12770 design and layout.")
12771 (license (list license:mpl2.0 license:expat))))
12773 (define-public python2-tqdm
12774 (package-with-python2 python-tqdm))
12776 (define-public python-pkginfo
12778 (name "python-pkginfo")
12783 (uri (pypi-uri "pkginfo" version))
12786 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12787 (build-system python-build-system)
12789 ;; The tests are broken upstream.
12792 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12794 "Query metadatdata from sdists, bdists, and installed packages")
12796 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12797 source distriubtion (an sdist) or a binary distribution (e.g., created by
12798 running bdist_egg). It can also query the EGG-INFO directory of an installed
12799 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12800 created by running @code{python setup.py develop}).")
12801 (license license:expat)))
12803 (define-public python2-pkginfo
12804 (package-with-python2 python-pkginfo))
12806 (define-public python-twine
12808 (name "python-twine")
12813 (uri (pypi-uri "twine" version))
12816 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12817 (build-system python-build-system)
12819 `(("python-tqdm" ,python-tqdm)
12820 ("python-pkginfo" ,python-pkginfo)
12821 ("python-requests" ,python-requests)
12822 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12823 (home-page "https://github.com/pypa/twine")
12824 (synopsis "Collection of utilities for interacting with PyPI")
12826 "@code{twine} currently supports registering projects and uploading
12827 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12828 their files and supports any packaging format (including wheels).")
12829 (license license:asl2.0)))
12831 (define-public python2-twine
12832 (package-with-python2 python-twine))
12834 (define-public python-linecache2
12836 (name "python-linecache2")
12841 (uri (pypi-uri "linecache2" version))
12844 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12845 (build-system python-build-system)
12847 `(;; The tests depend on unittest2, and our version is a bit too old.
12850 `(("python-pbr" ,python-pbr-minimal)))
12852 "https://github.com/testing-cabal/linecache2")
12853 (synopsis "Backports of the linecache module")
12855 "The linecache module allows one to get any line from any file, while
12856 attempting to optimize internally, using a cache, the common case where many
12857 lines are read from a single file.")
12858 (license license:psfl)))
12860 (define-public python2-linecache2
12861 (package-with-python2 python-linecache2))
12863 (define-public python-traceback2
12865 (name "python-traceback2")
12870 (uri (pypi-uri "traceback2" version))
12873 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12874 (build-system python-build-system)
12876 `(;; python-traceback2 and python-unittest2 depend on one another.
12879 `(("python-pbr" ,python-pbr-minimal)))
12881 `(("python-linecache2" ,python-linecache2)))
12883 "https://github.com/testing-cabal/traceback2")
12884 (synopsis "Backports of the traceback module")
12886 "This module provides a standard interface to extract, format and print
12887 stack traces of Python programs. It exactly mimics the behavior of the Python
12888 interpreter when it prints a stack trace.")
12889 (license license:psfl)))
12891 (define-public python2-traceback2
12892 (package-with-python2 python-traceback2))
12894 (define-public python-ratelimiter
12896 (name "python-ratelimiter")
12901 (uri (pypi-uri "ratelimiter" version))
12904 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12905 (build-system python-build-system)
12907 '(#:tests? #f)) ; There are no tests in the pypi archive.
12908 (home-page "https://github.com/RazerM/ratelimiter")
12909 (synopsis "Simple rate limiting object")
12911 "The @code{ratelimiter} module ensures that an operation will not be
12912 executed more than a given number of times during a given period.")
12913 (license license:asl2.0)))
12915 (define-public python2-ratelimiter
12916 (package-with-python2 python-ratelimiter))
12918 (define-public python-dukpy
12920 (name "python-dukpy")
12925 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12926 version ".tar.gz"))
12927 (file-name (string-append name "-" version ".tar.gz"))
12930 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12931 (build-system python-build-system)
12932 (home-page "https://github.com/kovidgoyal/dukpy")
12933 (synopsis "Run JavaScript in python")
12935 "dukpy is a JavaScript runtime environment for Python using the duktape
12936 embeddable JavaScript engine.")
12937 ;; Dukpy is licensed under MIT like the embedded duktape library,
12938 ;; with 'errors.c' as GPL3.
12939 (license (list license:expat license:gpl3))))
12941 (define-public python2-dukpy
12942 (package-with-python2 python-dukpy))
12944 (define-public python-jsonrpclib-pelix
12946 (name "python-jsonrpclib-pelix")
12951 (uri (pypi-uri "jsonrpclib-pelix" version))
12954 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12955 (build-system python-build-system)
12957 `(#:tests? #f)) ; no tests in PyPI tarball
12958 (home-page "https://github.com/tcalmant/jsonrpclib/")
12959 (synopsis "JSON-RPC 2.0 client library for Python")
12961 "This library implements the JSON-RPC v2.0
12962 specification (backwards-compatible) as a client library for Python. This
12963 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12965 (license license:asl2.0)))
12967 (define-public python2-jsonrpclib-pelix
12968 (package-with-python2 python-jsonrpclib-pelix))
12970 (define-public python-setuptools-scm-git-archive
12972 (name "python-setuptools-scm-git-archive")
12977 (uri (pypi-uri "setuptools_scm_git_archive" version))
12980 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12981 (build-system python-build-system)
12983 `(("python-pytest" ,python-pytest)))
12985 `(("python-setuptools-scm" ,python-setuptools-scm)))
12986 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12987 (synopsis "Setuptools_scm plugin for git archives")
12989 "The setuptools_scm_git_archive package is a plugin to
12990 setuptools_scm, which supports obtaining versions from git archives that
12991 belong to tagged versions.")
12992 (license license:expat)))
12994 (define-public python2-setuptools-scm-git-archive
12995 (package-with-python2 python-setuptools-scm-git-archive))
12997 (define-public python-pyclipper
12999 (name "python-pyclipper")
13000 (version "1.1.0.post1")
13004 (uri (pypi-uri "pyclipper" version ".zip"))
13007 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13008 (modules '((guix build utils)))
13011 ;; This file is generated by Cython.
13012 (delete-file "pyclipper/pyclipper.cpp") #t))))
13013 (build-system python-build-system)
13016 (modify-phases %standard-phases
13017 (add-before 'build 'cythonize-sources
13019 (with-directory-excursion "pyclipper"
13020 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13022 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13024 `(("python-cython" ,python-cython)
13025 ("python-pytest" ,python-pytest)
13026 ("python-pytest-runner" ,python-pytest-runner)
13027 ("python-unittest2" ,python-unittest2)
13029 (home-page "https://github.com/greginvm/pyclipper")
13030 (synopsis "Wrapper for Angus Johnson's Clipper library")
13032 "Pyclipper is a Cython wrapper for the C++ translation of the
13033 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13034 (license license:expat)))
13036 (define-public python2-pyclipper
13037 (package-with-python2 python-pyclipper))
13039 (define-public python2-booleanoperations
13041 (name "python2-booleanoperations")
13046 (uri (pypi-uri "booleanOperations" version ".zip"))
13049 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13050 (build-system python-build-system)
13052 `(#:python ,python-2))
13055 ("python2-pytest" ,python2-pytest)
13056 ("python2-pytest-runner" ,python2-pytest-runner)))
13058 `(("python-fonttools" ,python2-fonttools)
13059 ("python-pyclipper" ,python2-pyclipper)
13060 ("python-ufolib" ,python2-ufolib)))
13061 (home-page "https://github.com/typemytype/booleanOperations")
13062 (synopsis "Boolean operations on paths")
13064 "BooleanOperations provides a Python library that enables
13065 boolean operations on paths.")
13066 (license license:expat)))
13068 (define-public python-tempdir
13070 (name "python-tempdir")
13075 (uri (pypi-uri "tempdir" version))
13078 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13079 (build-system python-build-system)
13080 (home-page "https://pypi.org/project/tempdir/")
13082 ;; the package has no tests
13084 (synopsis "Python library for managing temporary directories")
13086 "This library manages temporary directories that are automatically
13087 deleted with all their contents when they are no longer needed. It is
13088 particularly convenient for use in tests.")
13089 (license license:expat)))
13091 (define-public python2-tempdir
13092 (package-with-python2 python-tempdir))
13094 (define-public python-activepapers
13096 (name "python-activepapers")
13101 (uri (pypi-uri "ActivePapers.Py" version))
13104 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13105 (build-system python-build-system)
13107 `(#:modules ((ice-9 ftw)
13110 (guix build python-build-system))
13113 (modify-phases %standard-phases
13114 (add-after 'unpack 'delete-python2-code
13116 (for-each delete-file
13117 '("lib/activepapers/builtins2.py"
13118 "lib/activepapers/standardlib2.py"
13119 "lib/activepapers/utility2.py"))))
13122 ;; Deactivate the test cases that download files
13123 (setenv "NO_NETWORK_ACCESS" "1")
13124 ;; For some strange reason, some tests fail if nosetests runs all
13125 ;; test modules in a single execution. They pass if each test
13126 ;; module is run individually.
13127 (for-each (lambda (filename)
13128 (invoke "nosetests"
13129 (string-append "tests/" filename)))
13132 (string-suffix? ".py" filename)))))))))
13134 `(("python-tempdir" ,python-tempdir)
13135 ("python-nose" ,python-nose)))
13137 `(("python-h5py" ,python-h5py)))
13138 (home-page "http://www.activepapers.org/")
13139 (synopsis "Executable papers for scientific computing")
13141 "ActivePapers is a tool for working with executable papers, which
13142 combine data, code, and documentation in single-file packages,
13143 suitable for publication as supplementary material or on repositories
13144 such as figshare or Zenodo.")
13145 (properties `((python2-variant . ,(delay python2-activepapers))))
13146 (license license:bsd-3)))
13148 (define-public python2-activepapers
13149 (let ((base (package-with-python2
13150 (strip-python2-variant python-activepapers))))
13154 (substitute-keyword-arguments (package-arguments base)
13156 `(modify-phases ,phases
13157 (delete 'delete-python2-code)
13158 (add-after 'unpack 'delete-python3-code
13160 (for-each delete-file
13161 '("lib/activepapers/builtins3.py"
13162 "lib/activepapers/standardlib3.py"
13163 "lib/activepapers/utility3.py")))))))))))
13165 (define-public python-semver
13167 (name "python-semver")
13172 (uri (pypi-uri "semver" version))
13175 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13176 (build-system python-build-system)
13179 (modify-phases %standard-phases
13180 (add-after 'unpack 'patch-test-requirements
13182 (substitute* "setup.py"
13183 ;; Our Python is new enough.
13184 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13187 `(("python-tox" ,python-tox)
13188 ("python-virtualenv" ,python-virtualenv)))
13189 (home-page "https://github.com/k-bx/python-semver")
13190 (synopsis "Python helper for Semantic Versioning")
13191 (description "This package provides a Python library for
13192 @url{Semantic Versioning, http://semver.org/}.")
13193 (license license:bsd-3)))
13195 (define-public python2-semver
13196 (package-with-python2 python-semver))
13198 (define-public python-pyro4
13200 (name "python-pyro4")
13205 (uri (pypi-uri "Pyro4" version))
13208 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13209 (build-system python-build-system)
13211 `(("python-serpent" ,python-serpent)))
13212 (home-page "https://pyro4.readthedocs.io")
13213 (synopsis "Distributed object middleware for Python")
13215 "Pyro enables you to build applications in which objects can talk to each
13216 other over the network. You can just use normal Python method calls to call
13217 objects on other machines, also known as remote procedure calls (RPC).")
13218 (license license:expat)))
13220 (define-public python2-pyro
13222 (name "python2-pyro")
13227 (uri (pypi-uri "Pyro" version))
13228 (file-name (string-append "Pyro-" version ".tar.gz"))
13231 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13232 (build-system python-build-system)
13234 ;; Pyro is not compatible with Python 3
13235 `(#:python ,python-2
13236 ;; Pyro has no test cases for automatic execution
13238 (home-page "http://pythonhosted.org/Pyro/")
13239 (synopsis "Distributed object manager for Python")
13240 (description "Pyro is a Distributed Object Technology system
13241 written in Python that is designed to be easy to use. It resembles
13242 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13243 which is a system and language independent Distributed Object Technology
13244 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13245 longer maintained. New projects should use Pyro4 instead, which
13246 is the new Pyro version that is actively developed.")
13247 (license license:expat)))
13249 (define-public python2-scientific
13251 (name "python2-scientific")
13256 (uri (string-append "https://bitbucket.org/khinsen/"
13257 "scientificpython/downloads/ScientificPython-"
13258 version ".tar.gz"))
13259 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13262 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13263 (build-system python-build-system)
13265 `(("netcdf" ,netcdf)))
13267 `(("python-numpy" ,python2-numpy-1.8)
13268 ("python-pyro" ,python2-pyro)))
13270 ;; ScientificPython is not compatible with Python 3
13271 `(#:python ,python-2
13272 #:tests? #f ; No test suite
13274 (modify-phases %standard-phases
13276 (lambda* (#:key inputs #:allow-other-keys)
13277 (invoke "python" "setup.py" "build"
13278 (string-append "--netcdf_prefix="
13279 (assoc-ref inputs "netcdf"))))))))
13280 (home-page "https://bitbucket.org/khinsen/scientificpython")
13281 (synopsis "Python modules for scientific computing")
13282 (description "ScientificPython is a collection of Python modules that are
13283 useful for scientific computing. Most modules are rather general (Geometry,
13284 physical units, automatic derivatives, ...) whereas others are more
13285 domain-specific (e.g. netCDF and PDB support). The library is currently
13286 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13287 (license license:cecill-c)))
13289 (define-public python2-mmtk
13291 (name "python2-mmtk")
13296 (uri (string-append "https://bitbucket.org/khinsen/"
13297 "mmtk/downloads/MMTK-" version ".tar.gz"))
13298 (file-name (string-append "MMTK-" version ".tar.gz"))
13301 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13302 (build-system python-build-system)
13304 `(("netcdf" ,netcdf)))
13306 `(("python-scientific" ,python2-scientific)
13307 ("python-tkinter" ,python-2 "tk")))
13309 `(#:python ,python-2
13312 (modify-phases %standard-phases
13313 (add-before 'build 'includes-from-scientific
13314 (lambda* (#:key inputs #:allow-other-keys)
13315 (mkdir-p "Include/Scientific")
13318 (assoc-ref inputs "python-scientific")
13319 "/include/python2.7/Scientific")
13320 "Include/Scientific"))))))
13321 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13322 (synopsis "Python library for molecular simulation")
13323 (description "MMTK is a library for molecular simulations with an emphasis
13324 on biomolecules. It provides widely used methods such as Molecular Dynamics
13325 and normal mode analysis, but also basic routines for implementing new methods
13326 for simulation and analysis. The library is currently not actively maintained
13327 and works only with Python 2 and NumPy < 1.9.")
13328 (license license:cecill-c)))
13330 (define-public python-phonenumbers
13332 (name "python-phonenumbers")
13337 (uri (pypi-uri "phonenumbers" version))
13340 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13341 (build-system python-build-system)
13343 "https://github.com/daviddrysdale/python-phonenumbers")
13345 "Python library for dealing with international phone numbers")
13347 "This package provides a Python port of Google's libphonenumber library.")
13348 (license license:asl2.0)))
13350 (define-public python2-phonenumbers
13351 (package-with-python2 python-phonenumbers))
13353 (define-public python-send2trash
13355 (name "python-send2trash")
13358 (origin (method git-fetch)
13359 ;; Source tarball on PyPI doesn't include tests.
13360 (uri (git-reference
13361 (url "https://github.com/hsoft/send2trash.git")
13363 (file-name (git-file-name name version))
13366 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13367 (build-system python-build-system)
13370 (modify-phases %standard-phases
13371 (add-before 'check 'pre-check
13373 (mkdir-p "/tmp/foo")
13374 (setenv "HOME" "/tmp/foo")
13376 (home-page "https://github.com/hsoft/send2trash")
13377 (synopsis "Send files to the user's @file{~/Trash} directory")
13378 (description "This package provides a Python library to send files to the
13379 user's @file{~/Trash} directory.")
13380 (license license:bsd-3)))
13382 (define-public python2-send2trash
13384 (inherit (package-with-python2 python-send2trash))
13386 (substitute-keyword-arguments (package-arguments python-send2trash)
13388 `(modify-phases ,phases
13389 (add-before 'check 'setenv
13391 (setenv "PYTHONPATH"
13392 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13394 (properties `((python2-variant . ,(delay python-send2trash))))))
13396 (define-public python-yapf
13398 (name "python-yapf")
13403 (uri (pypi-uri "yapf" version))
13406 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13407 (build-system python-build-system)
13408 (home-page "https://github.com/google/yapf")
13409 (synopsis "Formatter for Python code")
13410 (description "YAPF is a formatter for Python code. It's based off of
13411 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13412 takes the code and reformats it to the best formatting that conforms to the
13413 style guide, even if the original code didn't violate the style guide.")
13414 (license license:asl2.0)))
13416 (define-public python2-yapf
13417 (package-with-python2 python-yapf))
13419 (define-public python-gyp
13420 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13423 (name "python-gyp")
13424 ;; Google does not release versions,
13425 ;; based on second most recent commit date.
13426 (version (git-version "0.0.0" revision commit))
13429 ;; Google does not release tarballs,
13430 ;; git checkout is needed.
13432 (uri (git-reference
13433 (url "https://chromium.googlesource.com/external/gyp")
13435 (file-name (git-file-name name version))
13438 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13439 (build-system python-build-system)
13440 (home-page "https://gyp.gsrc.io/")
13441 (synopsis "GYP is a Meta-Build system")
13443 "GYP builds build systems for large, cross platform applications.
13444 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13445 files, and Makefiles.")
13446 (license license:bsd-3))))
13448 (define-public python2-gyp
13449 (package-with-python2 python-gyp))
13451 (define-public python-whatever
13453 (name "python-whatever")
13458 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13462 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13463 (file-name (string-append name "-" version ".tar.gz"))))
13464 (build-system python-build-system)
13467 (modify-phases %standard-phases
13470 (invoke "py.test"))))))
13472 `(("python-pytest" ,python-pytest)))
13473 (home-page "http://github.com/Suor/whatever")
13474 (synopsis "Make anonymous functions by partial application of operators")
13475 (description "@code{whatever} provides an easy way to make anonymous
13476 functions by partial application of operators.")
13477 (license license:bsd-3)))
13479 (define-public python2-whatever
13480 (package-with-python2 python-whatever))
13482 (define-public python-funcy
13484 (name "python-funcy")
13489 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13493 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13494 (file-name (string-append name "-" version ".tar.gz"))))
13495 (build-system python-build-system)
13498 (modify-phases %standard-phases
13501 (invoke "py.test"))))))
13503 `(("python-pytest" ,python-pytest)
13504 ("python-whatever" ,python-whatever)))
13505 (home-page "http://github.com/Suor/funcy")
13506 (synopsis "Functional tools")
13507 (description "@code{funcy} is a library that provides functional tools.
13510 @item merge - Merges collections of the same type
13511 @item walk - Type-preserving map
13512 @item select - Selects a part of a collection
13513 @item take - Takes the first n items of a collection
13514 @item first - Takes the first item of a collection
13515 @item remove - Predicated-removes items of a collection
13516 @item concat - Concatenates two collections
13517 @item flatten - Flattens a collection with subcollections
13518 @item distinct - Returns only distinct items
13519 @item split - Predicated-splits a collection
13520 @item split_at - Splits a collection at a given item
13521 @item group_by - Groups items by group
13522 @item pairwise - Pairs off adjacent items
13523 @item partial - Partially-applies a function
13524 @item curry - Curries a function
13525 @item compose - Composes functions
13526 @item complement - Complements a predicate
13527 @item all_fn - \"all\" with predicate
13529 (license license:bsd-3)))
13531 (define-public python2-funcy
13532 (package-with-python2 python-funcy))
13534 (define-public python-isoweek
13536 (name "python-isoweek")
13541 (uri (pypi-uri "isoweek" version))
13544 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13545 (build-system python-build-system)
13546 (home-page "https://github.com/gisle/isoweek")
13547 (synopsis "Objects representing a week")
13548 (description "The @code{isoweek} module provide the class Week that
13549 implements the week definition of ISO 8601. This standard also defines
13550 a notation for identifying weeks; yyyyWww (where the W is a literal).
13551 Week instances stringify to this form.")
13552 (license license:bsd-3)))
13554 (define-public python2-isoweek
13555 (package-with-python2 python-isoweek))
13557 (define-public python-tokenize-rt
13559 (name "python-tokenize-rt")
13564 (uri (pypi-uri "tokenize-rt" version))
13567 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13568 (build-system python-build-system)
13569 (home-page "https://github.com/asottile/tokenize-rt")
13570 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13572 "This Python library is a wrapper around @code{tokenize} from the Python
13573 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13574 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13575 and @code{tokens_to_src} to roundtrip.")
13576 (license license:expat)))
13578 (define-public python-future-fstrings
13580 (name "python-future-fstrings")
13585 (uri (pypi-uri "future_fstrings" version))
13588 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13589 (build-system python-build-system)
13591 `(("python-tokenize-rt" ,python-tokenize-rt)))
13592 (home-page "https://github.com/asottile/future-fstrings")
13593 (synopsis "Backport of fstrings to Python < 3.6")
13595 "This package provides a UTF-8 compatible encoding
13596 @code{future_fstrings}, which performs source manipulation. It decodes the
13597 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13598 @code{f} strings.")
13599 (license license:expat)))
13601 (define-public python-typing
13603 (name "python-typing")
13608 (uri (pypi-uri "typing" version))
13611 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13612 (build-system python-build-system)
13613 (home-page "https://docs.python.org/3/library/typing.html")
13614 (synopsis "Type hints for Python")
13615 (description "This is a backport of the standard library @code{typing}
13616 module to Python versions older than 3.5. Typing defines a standard notation
13617 for Python function and variable type annotations. The notation can be used
13618 for documenting code in a concise, standard format, and it has been designed
13619 to also be used by static and runtime type checkers, static analyzers, IDEs
13621 (license license:psfl)))
13623 (define-public python2-typing
13624 (package-with-python2 python-typing))
13626 (define-public python-typing-extensions
13628 (name "python-typing-extensions")
13633 (uri (pypi-uri "typing_extensions" version))
13636 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13637 (build-system python-build-system)
13639 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13640 (synopsis "Experimental type hints for Python")
13642 "The typing_extensions module contains additional @code{typing} hints not
13643 yet present in the of the @code{typing} standard library.
13644 Included are implementations of:
13647 @item ContextManager
13658 @item TYPE_CHECKING
13659 @item AsyncGenerator
13661 (license license:psfl)))
13663 (define-public bpython
13670 (uri (pypi-uri "bpython" version))
13673 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13674 (build-system python-build-system)
13677 (modify-phases %standard-phases
13678 (add-after 'unpack 'remove-failing-test
13680 ;; Remove failing test. FIXME: make it pass
13681 (delete-file "bpython/test/test_args.py")
13683 (add-after 'wrap 'add-aliases
13684 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13685 (lambda* (#:key outputs #:allow-other-keys)
13686 (let ((out (assoc-ref outputs "out")))
13689 (symlink old (string-append out "/bin/" new)))
13690 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13691 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13694 `(("python-pygments" ,python-pygments)
13695 ("python-requests" ,python-requests)
13696 ("python-babel" ,python-babel) ; optional, for internationalization
13697 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13698 ("python-greenlet" ,python-greenlet)
13699 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13700 ("python-six" ,python-six)))
13702 `(("python-sphinx" ,python-sphinx)
13703 ("python-mock" ,python-mock)))
13704 (home-page "https://bpython-interpreter.org/")
13705 (synopsis "Fancy interface to the Python interpreter")
13706 (description "Bpython is a fancy interface to the Python
13707 interpreter. bpython's main features are
13710 @item in-line syntax highlighting,
13711 @item readline-like autocomplete with suggestions displayed as you type,
13712 @item expected parameter list for any Python function,
13713 @item \"rewind\" function to pop the last line of code from memory and
13715 @item send the code you've entered off to a pastebin,
13716 @item save the code you've entered to a file, and
13717 @item auto-indentation.
13719 (license license:expat)))
13721 (define-public bpython2
13722 (let ((base (package-with-python2
13723 (strip-python2-variant bpython))))
13724 (package (inherit base)
13727 `(#:python ,python-2
13729 (modify-phases %standard-phases
13730 (add-after 'unpack 'remove-failing-test
13732 ;; Remove failing test. FIXME: make it pass
13733 (delete-file "bpython/test/test_args.py")
13734 ;; Disable failing test-cases (renaming inhibits they are
13736 (substitute* "bpython/test/test_curtsies_repl.py"
13737 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13738 (string-append a "xxx_off_" b))
13739 (("^(\\s*def )(test_complex\\W)" _ a b)
13740 (string-append a "xxx_off_" b)))
13742 (add-before 'build 'rename-scripts
13743 ;; rename the scripts to bypthon2, bpdb2, etc.
13745 (substitute* "setup.py"
13746 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13747 (string-append name "2" rest "\n"))
13748 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13749 (string-append name "2" (or sub "") rest "\n")))
13752 (define-public python-pyinotify
13754 (name "python-pyinotify")
13758 (uri (pypi-uri "pyinotify" version))
13761 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13762 (build-system python-build-system)
13763 (arguments `(#:tests? #f)) ;no tests
13764 (home-page "https://github.com/seb-m/pyinotify")
13765 (synopsis "Python library for monitoring inotify events")
13767 "@code{pyinotify} provides a Python interface for monitoring
13768 file system events on Linux.")
13769 (license license:expat)))
13771 (define-public python2-pyinotify
13772 (package-with-python2 python-pyinotify))
13774 ;; Ada parser uses this version.
13775 (define-public python2-quex-0.67.3
13777 (name "python2-quex")
13782 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13783 (version-major+minor version)
13784 "/quex-" version ".zip"))
13787 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13788 (build-system python-build-system)
13790 `(("unzip" ,unzip)))
13792 `(#:python ,python-2
13795 (modify-phases %standard-phases
13796 (delete 'configure)
13799 (lambda* (#:key outputs #:allow-other-keys)
13800 (let* ((out (assoc-ref outputs "out"))
13801 (share/quex (string-append out "/share/quex"))
13802 (bin (string-append out "/bin")))
13803 (copy-recursively "." share/quex)
13805 (symlink (string-append share/quex "/quex-exe.py")
13806 (string-append bin "/quex"))
13808 (native-search-paths
13809 (list (search-path-specification
13810 (variable "QUEX_PATH")
13811 (files '("share/quex")))))
13812 (home-page "http://quex.sourceforge.net/")
13813 (synopsis "Lexical analyzer generator in Python")
13814 (description "@code{quex} is a lexical analyzer generator in Python.")
13815 (license license:lgpl2.1+))) ; Non-military
13817 (define-public python2-quex
13818 (package (inherit python2-quex-0.67.3)
13819 (name "python2-quex")
13824 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13827 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13828 (file-name (string-append name "-" version ".tar.gz"))))))
13830 (define-public python-more-itertools
13832 (name "python-more-itertools")
13837 (uri (pypi-uri "more-itertools" version))
13840 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13841 (build-system python-build-system)
13843 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13844 (%current-target-system)))
13847 (modify-phases %standard-phases
13848 ;; This is required for 32-bit hardware.
13849 ;; TODO: Try to remove this when upgrading.
13850 (add-after 'unpack 'patch-test
13852 (substitute* "more_itertools/tests/test_more.py"
13853 (("10 \\*\\* 10") "9 ** 9"))
13857 `(("python-six" ,python-six-bootstrap)))
13858 (home-page "https://github.com/erikrose/more-itertools")
13859 (synopsis "More routines for operating on iterables, beyond itertools")
13860 (description "Python's built-in @code{itertools} module implements a
13861 number of iterator building blocks inspired by constructs from APL, Haskell,
13862 and SML. @code{more-itertools} includes additional building blocks for
13863 working with iterables.")
13864 (license license:expat)))
13866 (define-public python2-more-itertools
13867 (package-with-python2 python-more-itertools))
13869 (define-public python-latexcodec
13871 (name "python-latexcodec")
13876 (uri (pypi-uri "latexcodec" version))
13879 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13880 (build-system python-build-system)
13882 `(("python-six" ,python-six)))
13883 (home-page "https://readthedocs.org/projects/latexcodec/")
13884 (synopsis "Work with LaTeX code in Python")
13885 (description "Lexer and codec to work with LaTeX code in Python.")
13886 (license license:expat)))
13888 (define-public python-pybtex
13890 (name "python-pybtex")
13895 (uri (pypi-uri "pybtex" version))
13898 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13899 (build-system python-build-system)
13901 `(("python-nose" ,python-nose)))
13903 `(("python-latexcodec" ,python-latexcodec)
13904 ("python-pyyaml" ,python-pyyaml)
13905 ("python-six" ,python-six)))
13907 `(#:test-target "nosetests"))
13908 (home-page "https://pybtex.org/")
13909 (synopsis "BibTeX-compatible bibliography processor")
13910 (description "Pybtex is a BibTeX-compatible bibliography processor written
13911 in Python. You can simply type pybtex instead of bibtex.")
13912 (license license:expat)))
13914 (define-public python-onetimepass
13916 (name "python-onetimepass")
13921 (uri (pypi-uri "onetimepass" version))
13923 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13924 (build-system python-build-system)
13925 (propagated-inputs `(("python-six" ,python-six)))
13926 (home-page "https://github.com/tadeck/onetimepass/")
13927 (synopsis "One-time password library")
13928 (description "Python one-time password library for HMAC-based (HOTP) and
13929 time-based (TOTP) passwords.")
13930 (license license:expat)))
13932 (define-public python-parso
13934 (name "python-parso")
13939 (uri (pypi-uri "parso" version))
13942 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13944 `(("python-pytest" ,python-pytest)))
13945 (build-system python-build-system)
13946 (home-page "https://github.com/davidhalter/parso")
13947 (synopsis "Python Parser")
13948 (description "Parso is a Python parser that supports error recovery and
13949 round-trip parsing for different Python versions (in multiple Python versions).
13950 Parso is also able to list multiple syntax errors in your Python file.")
13951 (license license:expat)))
13953 (define-public python2-parso
13954 (package-with-python2 python-parso))
13956 (define-public python-async-generator
13958 (name "python-async-generator")
13963 (uri (pypi-uri "async_generator" version))
13966 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13967 (build-system python-build-system)
13969 `(("python-pytest" ,python-pytest)))
13970 (home-page "https://github.com/python-trio/async_generator")
13971 (synopsis "Async generators and context managers for Python 3.5+")
13972 (description "@code{async_generator} back-ports Python 3.6's native async
13973 generators and Python 3.7's context managers into Python 3.5.")
13975 (license (list license:expat license:asl2.0))))
13977 (define-public python-async-timeout
13979 (name "python-async-timeout")
13984 (uri (pypi-uri "async-timeout" version))
13987 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13988 (build-system python-build-system)
13989 (home-page "https://github.com/aio-libs/async_timeout/")
13990 (synopsis "Timeout context manager for asyncio programs")
13991 (description "@code{async-timeout} provides a timeout timeout context
13992 manager compatible with @code{asyncio}.")
13993 (license license:asl2.0)))
13995 (define-public python-glob2
13997 (name "python-glob2")
14001 (uri (string-append
14002 "https://github.com/miracle2k/python-glob2/archive/"
14007 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14008 (file-name (string-append name "-" version ".tar.gz"))))
14009 (build-system python-build-system)
14010 (home-page "https://github.com/miracle2k/python-glob2/")
14011 (synopsis "Extended Version of the python buildin glob module")
14012 (description "This is an extended version of the Python
14013 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14017 @item The ability to capture the text matched by glob patterns, and return
14018 those matches alongside the file names.
14019 @item A recursive @code{**} globbing syntax, akin for example to the
14020 @code{globstar} option of Bash.
14021 @item The ability to replace the file system functions used, in order to glob
14022 on virtual file systems.
14023 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14026 Glob2 currently based on the glob code from Python 3.3.1.")
14027 (license license:bsd-2)))
14029 (define-public python2-glob2
14030 (package-with-python2 python-glob2))
14032 (define-public python-gipc
14034 (name "python-gipc")
14039 (uri (pypi-uri "gipc" version ".zip"))
14042 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14043 (build-system python-build-system)
14045 `(("unzip" ,unzip)))
14047 `(("python-gevent" ,python-gevent)))
14048 (home-page "http://gehrcke.de/gipc")
14049 (synopsis "Child process management in the context of gevent")
14050 (description "Usage of Python's multiprocessing package in a
14051 gevent-powered application may raise problems. With @code{gipc},
14052 process-based child processes can safely be created anywhere within a
14053 gevent-powered application.")
14054 (license license:expat)))
14056 (define-public python2-gipc
14057 (package-with-python2 python-gipc))
14059 (define-public python-fusepy
14061 (name "python-fusepy")
14066 (uri (pypi-uri "fusepy" version))
14069 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14070 (build-system python-build-system)
14073 (modify-phases %standard-phases
14074 (add-before 'build 'set-library-file-name
14075 (lambda* (#:key inputs #:allow-other-keys)
14076 (let ((fuse (assoc-ref inputs "fuse")))
14077 (substitute* "fuse.py"
14078 (("find_library\\('fuse'\\)")
14079 (string-append "'" fuse "/lib/libfuse.so'")))
14083 (home-page "https://github.com/fusepy/fusepy")
14084 (synopsis "Simple ctypes bindings for FUSE")
14085 (description "Python module that provides a simple interface to FUSE and
14086 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14087 (license license:isc)))
14089 (define-public python2-fusepy
14090 (package-with-python2 python-fusepy))
14092 (define-public python2-gdrivefs
14094 (name "python2-gdrivefs")
14099 (uri (pypi-uri "gdrivefs" version))
14102 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14103 (build-system python-build-system)
14105 `(#:python ,python-2
14107 (modify-phases %standard-phases
14108 (add-before 'build 'patch-setup-py
14110 ;; Update requirements from dependency==version
14111 ;; to dependency>=version
14112 (substitute* "gdrivefs/resources/requirements.txt"
14116 `(("python2-gipc" ,python2-gipc)
14117 ("python2-gevent" ,python2-gevent)
14118 ("python2-greenlet" ,python2-greenlet)
14119 ("python2-httplib2" ,python2-httplib2)
14120 ("python2-uritemplate" ,python2-uritemplate)
14121 ("python2-oauth2client" ,python2-oauth2client)
14122 ("python2-six" ,python2-six)))
14124 `(("python2-dateutil" ,python2-dateutil)
14125 ("python2-fusepy" ,python2-fusepy)
14126 ("python2-google-api-client" ,python2-google-api-client)))
14127 (home-page "https://github.com/dsoprea/GDriveFS")
14128 (synopsis "Mount Google Drive as a local file system")
14129 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14130 under Python 2.7.")
14131 (license license:gpl2)))
14133 (define-public pybind11
14139 (uri (git-reference
14140 (url "https://github.com/pybind/pybind11.git")
14141 (commit (string-append "v" version))))
14144 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14145 (file-name (git-file-name name version))))
14146 (build-system cmake-build-system)
14148 `(("python" ,python)
14149 ("python-pytest" ,python-pytest)))
14151 `(#:test-target "check"))
14152 (home-page "https://github.com/pybind/pybind11/")
14153 (synopsis "Seamless operability between C++11 and Python")
14154 (description "pybind11 is a lightweight header-only library that exposes
14155 C++ types in Python and vice versa, mainly to create Python bindings of
14156 existing C++ code. Its goals and syntax are similar to the excellent
14157 Boost.Python library by David Abrahams: to minimize boilerplate code in
14158 traditional extension modules by inferring type information using compile-time
14160 (license license:expat)))
14162 (define-public python-fasteners
14164 (name "python-fasteners")
14169 (uri (pypi-uri "fasteners" version))
14172 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14173 (build-system python-build-system)
14175 `(("python-monotonic" ,python-monotonic)
14176 ("python-six" ,python-six)
14177 ("python-testtools" ,python-testtools)))
14178 (home-page "https://github.com/harlowja/fasteners")
14179 (synopsis "Python package that provides useful locks")
14181 "This package provides a Python program that provides following locks:
14184 @item Locking decorator
14185 @item Reader-writer locks
14186 @item Inter-process locks
14187 @item Generic helpers
14189 (properties `((python2-variant . ,(delay python2-fasteners))))
14190 (license license:asl2.0)))
14192 (define-public python2-fasteners
14193 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14197 `(("python2-futures" ,python2-futures)
14198 ,@(package-propagated-inputs base))))))
14200 (define-public python-requests-file
14202 (name "python-requests-file")
14207 (uri (pypi-uri "requests-file" version))
14210 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14211 (build-system python-build-system)
14213 `(("python-requests" ,python-requests)
14214 ("python-six" ,python-six)))
14216 "https://github.com/dashea/requests-file")
14217 (synopsis "File transport adapter for Requests")
14219 "Requests-File is a transport adapter for use with the Requests Python
14220 library to allow local filesystem access via file:// URLs.")
14221 (license license:asl2.0)))
14223 (define-public python2-requests-file
14224 (package-with-python2 python-requests-file))
14226 (define-public python-tldextract
14228 (name "python-tldextract")
14233 (uri (pypi-uri "tldextract" version))
14236 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14237 (build-system python-build-system)
14239 `(("python-pytest" ,python-pytest)
14240 ("python-responses" ,python-responses)))
14242 `(("python-idna" ,python-idna)
14243 ("python-requests" ,python-requests)
14244 ("python-requests-file" ,python-requests-file)))
14246 "https://github.com/john-kurkowski/tldextract")
14248 "Separate the TLD from the registered domain and subdomains of a URL")
14250 "TLDExtract accurately separates the TLD from the registered domain and
14251 subdomains of a URL, using the Public Suffix List. By default, this includes
14252 the public ICANN TLDs and their exceptions. It can optionally support the
14253 Public Suffix List's private domains as well.")
14254 (license license:bsd-3)))
14256 (define-public python2-tldextract
14257 (package-with-python2 python-tldextract))
14259 (define-public python-pynamecheap
14261 (name "python-pynamecheap")
14266 (uri (pypi-uri "PyNamecheap" version))
14269 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14270 (build-system python-build-system)
14272 `(("python-requests" ,python-requests)))
14274 "https://github.com/Bemmu/PyNamecheap")
14276 "Namecheap API client in Python")
14278 "PyNamecheap is a Namecheap API client in Python.")
14279 (license license:expat)))
14281 (define-public python2-pynamecheap
14282 (package-with-python2 python-pynamecheap))
14284 (define-public python-dns-lexicon
14286 (name "python-dns-lexicon")
14291 (uri (pypi-uri "dns-lexicon" version))
14294 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14295 (build-system python-build-system)
14297 `(#:tests? #f)) ;requires internet access
14299 `(("python-future" ,python-future)
14300 ("python-pynamecheap" ,python-pynamecheap)
14301 ("python-requests" ,python-requests)
14302 ("python-tldextract" ,python-tldextract)
14303 ("python-urllib3" ,python-urllib3)))
14304 (home-page "https://github.com/AnalogJ/lexicon")
14306 "Manipulate DNS records on various DNS providers")
14308 "Lexicon provides a way to manipulate DNS records on multiple DNS
14309 providers in a standardized way. It has a CLI but it can also be used as a
14310 Python library. It was designed to be used in automation, specifically with
14312 (license license:expat)))
14314 (define-public python2-dns-lexicon
14315 (package-with-python2 python-dns-lexicon))
14317 (define-public python-commandlines
14319 (name "python-commandlines")
14324 (uri (pypi-uri "commandlines" version))
14327 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14328 (build-system python-build-system)
14329 (home-page "https://github.com/chrissimpkins/commandlines")
14330 (synopsis "Command line argument to object parsing library")
14332 "@code{Commandlines} is a Python library for command line application
14333 development that supports command line argument parsing, command string
14334 validation testing and application logic.")
14335 (license license:expat)))
14337 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14338 ;; python-numba. They have a very unflexible relationship.
14339 (define-public python-numba
14341 (name "python-numba")
14346 (uri (pypi-uri "numba" version))
14349 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14350 (build-system python-build-system)
14352 `(#:modules ((guix build utils)
14353 (guix build python-build-system)
14358 (modify-phases %standard-phases
14359 (add-after 'unpack 'disable-proprietary-features
14361 (setenv "NUMBA_DISABLE_HSA" "1")
14362 (setenv "NUMBA_DISABLE_CUDA" "1")
14364 (add-after 'unpack 'remove-failing-tests
14366 ;; FIXME: these tests fail for unknown reasons:
14367 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14368 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14369 (substitute* "numba/tests/test_dispatcher.py"
14370 (("def test(_non_writable_pycache)" _ m)
14371 (string-append "def guix_skip" m))
14372 (("def test(_non_creatable_pycache)" _ m)
14373 (string-append "def guix_skip" m))
14374 (("def test(_frozen)" _ m)
14375 (string-append "def guix_skip" m)))
14377 ;; These tests fail because we don't run the tests from the build
14378 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14379 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14380 (substitute* "numba/tests/test_pycc.py"
14381 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14382 (string-append "def guix_skip" m)))
14386 (let ((cwd (getcwd)))
14387 (setenv "PYTHONPATH"
14388 (string-append cwd "/build/"
14389 (find (cut string-prefix? "lib" <>)
14390 (scandir (string-append cwd "/build")))
14392 (getenv "PYTHONPATH")))
14393 ;; Something is wrong with the PYTHONPATH when running the
14394 ;; tests from the build directory, as it complains about not being
14395 ;; able to import certain modules.
14396 (with-directory-excursion "/tmp"
14397 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14400 `(("python-llvmlite" ,python-llvmlite)
14401 ("python-numpy" ,python-numpy)
14402 ("python-singledispatch" ,python-singledispatch)))
14403 ;; Needed for tests.
14405 `(("python-jinja2" ,python-jinja2)
14406 ("python-pygments" ,python-pygments)))
14407 (home-page "https://numba.pydata.org")
14408 (synopsis "Compile Python code using LLVM")
14409 (description "Numba gives you the power to speed up your applications with
14410 high performance functions written directly in Python. With a few
14411 annotations, array-oriented and math-heavy Python code can be just-in-time
14412 compiled to native machine instructions, similar in performance to C, C++ and
14413 Fortran, without having to switch languages or Python interpreters.
14415 Numba works by generating optimized machine code using the LLVM compiler
14416 infrastructure at import time, runtime, or statically (using the included pycc
14418 (license license:bsd-3)))
14420 (define-public python-anndata
14422 (name "python-anndata")
14427 (uri (pypi-uri "anndata" version))
14430 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14431 (build-system python-build-system)
14433 `(("python-h5py" ,python-h5py)
14434 ("python-natsort" ,python-natsort)
14435 ("python-pandas" ,python-pandas)
14436 ("python-scipy" ,python-scipy)))
14437 (home-page "https://github.com/theislab/anndata")
14438 (synopsis "Annotated data for data analysis pipelines")
14439 (description "Anndata is a package for simple (functional) high-level APIs
14440 for data analysis pipelines. In this context, it provides an efficient,
14441 scalable way of keeping track of data together with learned annotations and
14442 reduces the code overhead typically encountered when using a mostly
14443 object-oriented library such as @code{scikit-learn}.")
14444 (license license:bsd-3)))
14446 (define-public python-dill
14448 (name "python-dill")
14449 (version "0.2.8.2")
14453 (uri (pypi-uri "dill" version))
14456 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14457 (build-system python-build-system)
14458 ;; FIXME: The check phase fails with "don't know how to make test".
14459 (arguments '(#:tests? #f))
14460 (home-page "https://pypi.org/project/dill")
14461 (synopsis "Serialize all of Python")
14462 (description "Dill extends Python's @code{pickle} module for serializing
14463 and de-serializing Python objects to the majority of the built-in Python
14464 types. Dill provides the user the same interface as the @code{pickle} module,
14465 and also includes some additional features. In addition to pickling Python
14466 objects, @code{dill} provides the ability to save the state of an interpreter
14467 session in a single command. Hence, it would be feasable to save a
14468 interpreter session, close the interpreter, ship the pickled file to another
14469 computer, open a new interpreter, unpickle the session and thus continue from
14470 the saved state of the original interpreter session.")
14471 (license license:bsd-3)))
14473 (define-public python-multiprocess
14475 (name "python-multiprocess")
14476 (version "0.70.6.1")
14480 (uri (pypi-uri "multiprocess" version))
14483 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14484 (build-system python-build-system)
14486 `(("python-dill" ,python-dill)))
14487 (home-page "https://pypi.org/project/multiprocess")
14488 (synopsis "Multiprocessing and multithreading in Python")
14490 "This package is a fork of the multiprocessing Python package, a package
14491 which supports the spawning of processes using the API of the standard
14492 library's @code{threading} module.")
14493 (license license:bsd-3)))
14495 (define-public python-toolz
14497 (name "python-toolz")
14502 (uri (pypi-uri "toolz" version))
14505 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14506 (build-system python-build-system)
14507 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14508 ;; unregistered loader type"
14509 (arguments '(#:tests? #f))
14510 (home-page "https://github.com/pytoolz/toolz/")
14511 (synopsis "List processing tools and functional utilities")
14513 "This package provides a set of utility functions for iterators,
14514 functions, and dictionaries.")
14515 (license license:bsd-3)))
14517 (define-public python2-toolz
14518 (package-with-python2 python-toolz))
14520 (define-public python-cytoolz
14522 (name "python-cytoolz")
14523 (version "0.9.0.1")
14527 (uri (pypi-uri "cytoolz" version))
14530 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14531 (build-system python-build-system)
14532 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14534 (arguments '(#:tests? #f))
14536 `(("python-toolz" ,python-toolz)))
14538 `(("python-cython" ,python-cython)))
14539 (home-page "https://github.com/pytoolz/cytoolz")
14540 (synopsis "High performance functional utilities")
14542 "The cytoolz package implements the same API as provided by toolz. The
14543 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14544 that is accessible to other projects developed in Cython.")
14545 (license license:bsd-3)))
14547 (define-public python-sortedcontainers
14549 (name "python-sortedcontainers")
14554 (uri (pypi-uri "sortedcontainers" version))
14557 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14558 (build-system python-build-system)
14560 `(("python-tox" ,python-tox)))
14561 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14562 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14564 "This package provides a sorted collections library, written in
14566 (license license:asl2.0)))
14568 (define-public python-cloudpickle
14570 (name "python-cloudpickle")
14575 (uri (pypi-uri "cloudpickle" version))
14578 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14579 (build-system python-build-system)
14580 ;; FIXME: there are 5 errors in 122 tests:
14581 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14582 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14583 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14584 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14585 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14586 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14587 (arguments '(#:tests? #f))
14589 `(("python-pytest" ,python-pytest)
14590 ("python-mock" ,python-mock)
14591 ("python-tornado" ,python-tornado)))
14592 (home-page "https://github.com/cloudpipe/cloudpickle")
14593 (synopsis "Extended pickling support for Python objects")
14595 "Cloudpickle makes it possible to serialize Python constructs not
14596 supported by the default pickle module from the Python standard library. It
14597 is especially useful for cluster computing where Python expressions are
14598 shipped over the network to execute on remote hosts, possibly close to the
14600 (license license:bsd-3)))
14602 (define-public python2-cloudpickle
14603 (package-with-python2 python-cloudpickle))
14605 (define-public python-locket
14607 (name "python-locket")
14612 (uri (pypi-uri "locket" version))
14615 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14616 (build-system python-build-system)
14617 (home-page "https://github.com/mwilliamson/locket.py")
14618 (synopsis "File-based locks for Python")
14620 "Locket implements a lock that can be used by multiple processes provided
14621 they use the same path.")
14622 (license license:bsd-2)))
14624 (define-public python2-locket
14625 (package-with-python2 python-locket))
14627 (define-public python-blosc
14629 (name "python-blosc")
14634 (uri (pypi-uri "blosc" version))
14637 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14638 (build-system python-build-system)
14639 ;; FIXME: all tests pass, but then this error is printed:
14640 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14641 (arguments '(#:tests? #f))
14643 `(("python-numpy" ,python-numpy)))
14644 (home-page "https://github.com/blosc/python-blosc")
14645 (synopsis "Python wrapper for the Blosc data compressor library")
14646 (description "Blosc is a high performance compressor optimized for binary
14647 data. It has been designed to transmit data to the processor cache faster
14648 than the traditional, non-compressed, direct memory fetch approach via a
14649 @code{memcpy()} system call.
14651 Blosc works well for compressing numerical arrays that contains data with
14652 relatively low entropy, like sparse data, time series, grids with
14653 regular-spaced values, etc.
14655 This Python package wraps the Blosc library.")
14656 (license license:bsd-3)))
14658 (define-public python2-blosc
14659 (package-with-python2 python-blosc))
14661 (define-public python-partd
14663 (name "python-partd")
14668 (uri (pypi-uri "partd" version))
14671 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14672 (build-system python-build-system)
14674 `(("python-blosc" ,python-blosc)
14675 ("python-locket" ,python-locket)
14676 ("python-numpy" ,python-numpy)
14677 ("python-pandas" ,python-pandas)
14678 ("python-pyzmq" ,python-pyzmq)
14679 ("python-toolz" ,python-toolz)))
14680 (home-page "https://github.com/dask/partd/")
14681 (synopsis "Appendable key-value storage")
14682 (description "Partd stores key-value pairs. Values are raw bytes. We
14683 append on old values. Partd excels at shuffling operations.")
14684 (license license:bsd-3)))
14686 (define-public python2-partd
14687 (package-with-python2 python-partd))
14689 (define-public python-dask
14691 (name "python-dask")
14696 (uri (pypi-uri "dask" version))
14699 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14700 (build-system python-build-system)
14701 ;; A single test out of 5000+ fails. This test is marked as xfail when
14702 ;; pytest-xdist is used.
14705 (modify-phases %standard-phases
14706 (add-after 'unpack 'disable-broken-test
14708 (substitute* "dask/tests/test_threaded.py"
14709 (("def test_interrupt\\(\\)" m)
14710 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14712 (when (which "python2")
14713 ;; This test fails with recent Pandas:
14714 ;; <https://github.com/dask/dask/issues/3794>.
14715 (substitute* "dask/dataframe/tests/test_dataframe.py"
14716 (("def test_info\\(\\)" m)
14717 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14721 (lambda _ (invoke "pytest" "-vv"))))))
14723 `(("python-cloudpickle" ,python-cloudpickle)
14724 ("python-numpy" ,python-numpy)
14725 ("python-pandas" ,python-pandas)
14726 ("python-partd" ,python-partd)
14727 ("python-toolz" ,python-toolz)
14728 ("python-pyyaml" ,python-pyyaml)))
14730 `(("python-pytest" ,python-pytest)
14731 ("python-pytest-runner" ,python-pytest-runner)))
14732 (home-page "https://github.com/dask/dask/")
14733 (synopsis "Parallel computing with task scheduling")
14735 "Dask is a flexible parallel computing library for analytics. It
14736 consists of two components: dynamic task scheduling optimized for computation,
14737 and large data collections like parallel arrays, dataframes, and lists that
14738 extend common interfaces like NumPy, Pandas, or Python iterators to
14739 larger-than-memory or distributed environments. These parallel collections
14740 run on top of the dynamic task schedulers. ")
14741 (license license:bsd-3)))
14743 (define-public python2-dask
14744 (package-with-python2 python-dask))
14746 (define-public python-ilinkedlist
14748 (name "python-ilinkedlist")
14753 (uri (pypi-uri "ilinkedlist" version))
14756 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14757 (build-system python-build-system)
14758 (native-inputs `(("python-pytest" ,python-pytest)))
14759 (inputs `(("python" ,python)))
14760 (home-page "https://github.com/luther9/ilinkedlist-py")
14761 (synopsis "Immutable linked list library")
14763 "This is a implementation of immutable linked lists for Python. It
14764 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14765 Since a linked list is treated as immutable, it is hashable, and its length
14766 can be retrieved in constant time. Some of the terminology is inspired by
14767 LISP. It is possible to create an improper list by creating a @code{Pair}
14768 with a non-list @code{cdr}.")
14769 (license license:gpl3+)))
14771 (define-public python-readlike
14773 (name "python-readlike")
14778 (uri (pypi-uri "readlike" version))
14780 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14781 (build-system python-build-system)
14782 (home-page "https://github.com/jangler/readlike")
14783 (synopsis "GNU Readline-like line editing module")
14785 "This Python module provides line editing functions similar to the default
14786 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14787 @code{readline} package, this one allows access to those capabilties in settings
14788 outside of a standard command-line interface. It is especially well-suited to
14789 interfacing with Urwid, due to a shared syntax for describing key inputs.
14791 Currently, all stateless Readline commands are implemented. Yanking and history
14792 are not supported.")
14793 (license license:expat)))
14795 (define-public python2-readlike
14796 (package-with-python2 python-readlike))
14798 (define-public python-reparser
14800 (name "python-reparser")
14805 (uri (pypi-uri "ReParser" version))
14807 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14808 (build-system python-build-system)
14809 (home-page "https://github.com/xmikos/reparser")
14810 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14812 "This Python library provides a simple lexer/parser for inline markup based
14813 on regular expressions.")
14814 (license license:expat)))
14816 (define-public python2-reparser
14817 (let ((reparser (package-with-python2
14818 (strip-python2-variant python-reparser))))
14819 (package (inherit reparser)
14821 `(("python2-enum34" ,python2-enum34)
14822 ,@(package-propagated-inputs reparser))))))
14824 (define-public python-precis-i18n
14826 (name "python-precis-i18n")
14831 (uri (pypi-uri "precis_i18n" version))
14834 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14835 (build-system python-build-system)
14836 (home-page "https://github.com/byllyfish/precis_i18n")
14837 (synopsis "Implementation of the PRECIS framework")
14839 "This module implements the PRECIS Framework as described in RFC 8264,
14840 RFC 8265 and RFC 8266.")
14841 (license license:expat)))
14843 (define-public python-absl-py
14845 (name "python-absl-py")
14850 (uri (pypi-uri "absl-py" version))
14853 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14854 (build-system python-build-system)
14856 `(("python-six" ,python-six)))
14857 (home-page "https://github.com/abseil/abseil-py")
14858 (synopsis "Abseil Python common libraries")
14860 "This package provides the Abseil Python Common Libraries, a collection
14861 of Python libraries for building Python applications.")
14862 (license license:asl2.0)))
14864 (define-public python-astor
14866 (name "python-astor")
14871 (uri (pypi-uri "astor" version))
14874 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14875 (build-system python-build-system)
14876 ;; FIXME: There are two errors and two test failures.
14877 (arguments `(#:tests? #f))
14878 (home-page "https://github.com/berkerpeksag/astor")
14879 (synopsis "Read and write Python ASTs")
14880 (description "Astor is designed to allow easy manipulation of Python
14881 source via the Abstract Syntax Tree.")
14882 (license license:bsd-3)))
14884 (define-public python2-astor
14885 (package-with-python2 python-astor))
14887 (define-public python-grpcio
14889 (name "python-grpcio")
14894 (uri (pypi-uri "grpcio" version))
14897 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14898 (build-system python-build-system)
14900 `(("python-six" ,python-six)))
14901 (home-page "https://grpc.io")
14902 (synopsis "HTTP/2-based RPC framework")
14903 (description "This package provides a Python library for communicating
14904 with the HTTP/2-based RPC framework gRPC.")
14905 (license license:asl2.0)))
14907 (define-public python-astunparse
14909 (name "python-astunparse")
14914 (uri (pypi-uri "astunparse" version))
14917 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14918 (build-system python-build-system)
14919 (arguments '(#:tests? #f)) ; there are none
14921 `(("python-six" ,python-six)
14922 ("python-wheel" ,python-wheel)))
14923 (home-page "https://github.com/simonpercivall/astunparse")
14924 (synopsis "AST unparser for Python")
14925 (description "This package provides an AST unparser for Python. It is a
14926 factored out version of @code{unparse} found in the Python source
14928 (license license:bsd-3)))
14930 (define-public python-gast
14932 (name "python-gast")
14937 (uri (pypi-uri "gast" version))
14940 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14941 (build-system python-build-system)
14943 `(("python-astunparse" ,python-astunparse)))
14944 (home-page "https://pypi.org/project/gast/")
14945 (synopsis "Generic Python AST that abstracts the underlying Python version")
14947 "GAST provides a compatibility layer between the AST of various Python
14948 versions, as produced by @code{ast.parse} from the standard @code{ast}
14950 (license license:bsd-3)))
14952 (define-public python-wikidata
14954 (name "python-wikidata")
14959 (uri (pypi-uri "Wikidata" version))
14962 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14963 (build-system python-build-system)
14965 `(("python-babel" ,python-babel)))
14966 (home-page "https://github.com/dahlia/wikidata")
14967 (synopsis "Wikidata client library")
14969 "This package provides a Python interface to
14970 @url{https://www.wikidata.org/, Wikidata}.")
14971 (properties '((upstream-name . "Wikidata")))
14972 (license license:gpl3+)))
14974 (define-public python-doctest-ignore-unicode
14976 (name "python-doctest-ignore-unicode")
14981 (uri (pypi-uri "doctest-ignore-unicode" version))
14984 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14985 (build-system python-build-system)
14987 `(("python-nose" ,python-nose)))
14988 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14989 (synopsis "Ignore Unicode literal prefixes in doctests")
14991 "This package adds support for a flag to ignore Unicode literal prefixes
14993 (license license:asl2.0)))
14995 (define-public python-attr
14997 (name "python-attr")
15002 (uri (pypi-uri "attr" version))
15005 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15006 (build-system python-build-system)
15007 (home-page "https://github.com/denis-ryzhkov/attr")
15008 (synopsis "Decorator for attributes of target function or class")
15009 (description "Simple decorator to set attributes of target function or
15010 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15011 (license license:expat)))
15013 (define-public python-construct
15015 (name "python-construct")
15020 (uri (pypi-uri "construct" version))
15023 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15024 (build-system python-build-system)
15026 `(#:tests? #f)) ; No tests exist.
15028 `(("python-extras" ,python-extras)
15029 ("python-arrow" ,python-arrow)
15030 ("python-numpy" ,python-numpy)
15031 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15032 (home-page "http://construct.readthedocs.io")
15033 (synopsis "Declarative and symmetrical parser and builder for binary data")
15035 "This package provides both simple, atomic constructs (such as
15036 integers of various sizes), as well as composite ones which allow you
15037 form hierarchical and sequential structures of increasing complexity.
15038 It features bit and byte granularity, easy debugging and testing, an
15039 easy-to-extend subclass system, and lots of primitive constructs to
15040 make your work easier.")
15041 (license license:expat)))